Added more emojis to password generator
This commit is contained in:
parent
cb0124523f
commit
0481591d02
1 changed files with 2 additions and 7 deletions
|
|
@ -19,13 +19,14 @@ export default () => {
|
|||
const [password, setPassword] = createSignal('')
|
||||
const [showAlert, setShowAlert] = createSignal(false)
|
||||
|
||||
|
||||
const generatePassword = () => {
|
||||
let characters = ''
|
||||
if (uppercase()) characters += 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
||||
if (lowercase()) characters += 'abcdefghijklmnopqrstuvwxyz'
|
||||
if (numbers()) characters += '0123456789'
|
||||
if (symbols()) characters += '!@#$%^&*()_+-=[]{}|;:,.<>?~'
|
||||
if (emojis()) characters += '😊🙂😅🤩😜😝🐯🐱🐵🦊🦁🐷🐮🧭'
|
||||
if (emojis()) characters += '😊🙂😅🤩😜😝🐯🐱🐵🦊🦁🐷🐮🧭🦄🥝🏛️'
|
||||
|
||||
let passwordArray = Array.from({ length: length() }, () => characters[Math.floor(Math.random() * characters.length)])
|
||||
setPassword(passwordArray.join(''))
|
||||
|
|
@ -154,13 +155,7 @@ export default () => {
|
|||
</div>
|
||||
|
||||
<div class="display--group">
|
||||
{/* <div class="password-display">
|
||||
<p class="password-display__label">Generated Password:</p>
|
||||
<p class="password-display__content">{password()}</p>
|
||||
</div> */}
|
||||
|
||||
<MiniCard text="Generated Password" content={password()} onClick={copyToClipboard} />
|
||||
{/* <MiniCard text="Generated Password" content={password()} onClick={() => copyToClipboard()} alignLeft={true} /> */}
|
||||
|
||||
<div class="button--group">
|
||||
{/* <Button label="Copy" onClick={() => copyToClipboard()} /> */}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue