handy online tools for AT Protocol boat.kelinci.net
atproto bluesky atcute typescript solidjs
20
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor: generate phrases for confirmation

Mary acee994e f9d08cda

+107 -8
+104 -4
src/lib/utils/confirmation-code.ts
··· 1 - import { customAlphabet } from 'nanoid'; 1 + import { sample } from '@mary/array-fns'; 2 2 3 - const generateCode = customAlphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', 10); 3 + const words = [ 4 + 'abroad', 5 + 'acorn', 6 + 'anaconda', 7 + 'anchovy', 8 + 'aorta', 9 + 'argue', 10 + 'ashy', 11 + 'astound', 12 + 'attest', 13 + 'babied', 14 + 'bobcat', 15 + 'bondless', 16 + 'bullion', 17 + 'bunny', 18 + 'celtic', 19 + 'chivalry', 20 + 'circling', 21 + 'civic', 22 + 'clobber', 23 + 'conform', 24 + 'cosmic', 25 + 'crier', 26 + 'curtly', 27 + 'depose', 28 + 'diagnosis', 29 + 'disfigure', 30 + 'drank', 31 + 'ducktail', 32 + 'eel', 33 + 'effort', 34 + 'equipment', 35 + 'eternal', 36 + 'exemplify', 37 + 'filtrate', 38 + 'fit', 39 + 'flaccid', 40 + 'fool', 41 + 'germinate', 42 + 'glade', 43 + 'graveness', 44 + 'gray', 45 + 'hydrant', 46 + 'italicize', 47 + 'landowner', 48 + 'lavender', 49 + 'mandatory', 50 + 'molecule', 51 + 'multitude', 52 + 'music', 53 + 'national', 54 + 'neatly', 55 + 'omnivore', 56 + 'other', 57 + 'overdrive', 58 + 'overhang', 59 + 'overlying', 60 + 'padded', 61 + 'pang', 62 + 'paralyses', 63 + 'partner', 64 + 'pedometer', 65 + 'plaything', 66 + 'pointy', 67 + 'prescribe', 68 + 'pueblo', 69 + 'pursuant', 70 + 'reprise', 71 + 'resilient', 72 + 'reusable', 73 + 'roster', 74 + 'scenic', 75 + 'selected', 76 + 'singer', 77 + 'slacker', 78 + 'smirk', 79 + 'smoked', 80 + 'smugly', 81 + 'startle', 82 + 'sternum', 83 + 'strut', 84 + 'subsystem', 85 + 'supper', 86 + 'swifter', 87 + 'tacking', 88 + 'traffic', 89 + 'tragedy', 90 + 'trapper', 91 + 'tummy', 92 + 'twiddle', 93 + 'unglazed', 94 + 'ungloved', 95 + 'unicorn', 96 + 'unissued', 97 + 'unmovable', 98 + 'unwary', 99 + 'uselessly', 100 + 'venus', 101 + 'vertebrae', 102 + 'wildly', 103 + 'wrecker', 104 + ]; 4 105 5 106 export const generateConfirmationCode = () => { 6 - const code = generateCode(); 7 - return `${code.slice(0, 5)}-${code.slice(5, 10)}`; 107 + return sample(words, 3).join(' '); 8 108 };
+3 -4
src/views/identity/plc-applicator/steps/step5_private-key-confirmation.tsx
··· 78 78 }} 79 79 > 80 80 <p class="text-pretty"> 81 - To continue with this submission, type in the following code{' '} 82 - <code class="whitespace-nowrap font-bold">{code}</code> to the confirmation box below. 81 + To continue with this submission, type in <code class="whitespace-nowrap font-bold">{code}</code> to 82 + the confirmation box below. 83 83 </p> 84 84 85 85 <TextInput 86 - label="Confirmation code" 86 + label="Confirmation" 87 87 type="text" 88 88 autocomplete="one-time-code" 89 89 autocorrect="off" 90 90 required 91 91 pattern={code} 92 - placeholder="AAAAA-BBBBB" 93 92 autofocus={isActive()} 94 93 monospace 95 94 />