diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-07-23 15:01:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-23 15:01:04 +0100 |
commit | 27d712290a908fcb471c59a8e5c8e95bd862c49c (patch) | |
tree | e39aa55d097725fd9fcd448198d62a0c02b4966f /src/view/com/modals/AddAppPasswords.tsx | |
parent | 59bafb426ff018a3b8a92dee8994c5413fb30076 (diff) | |
download | voidsky-27d712290a908fcb471c59a8e5c8e95bd862c49c.tar.zst |
Use appropriate icons for toasts (#4803)
* use appropriate icons for toasts * use info for session expiry * tweak size * message -> safeMessage --------- Co-authored-by: Samuel Newman <10959775+mozzius@users.noreply.github.com>
Diffstat (limited to 'src/view/com/modals/AddAppPasswords.tsx')
-rw-r--r-- | src/view/com/modals/AddAppPasswords.tsx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/view/com/modals/AddAppPasswords.tsx b/src/view/com/modals/AddAppPasswords.tsx index 92229e7b6..f7991f59b 100644 --- a/src/view/com/modals/AddAppPasswords.tsx +++ b/src/view/com/modals/AddAppPasswords.tsx @@ -77,7 +77,7 @@ export function Component({}: {}) { const onCopy = React.useCallback(() => { if (appPassword) { setStringAsync(appPassword) - Toast.show(_(msg`Copied to clipboard`)) + Toast.show(_(msg`Copied to clipboard`), 'clipboard-check') setWasCopied(true) } }, [appPassword, _]) @@ -93,7 +93,7 @@ export function Component({}: {}) { _( msg`Please enter a name for your app password. All spaces is not allowed.`, ), - 'times', + 'xmark', ) return } @@ -101,13 +101,13 @@ export function Component({}: {}) { if (name.length < 4) { Toast.show( _(msg`App Password names must be at least 4 characters long.`), - 'times', + 'xmark', ) return } if (passwords?.find(p => p.name === name)) { - Toast.show(_(msg`This name is already in use`), 'times') + Toast.show(_(msg`This name is already in use`), 'xmark') return } @@ -116,11 +116,11 @@ export function Component({}: {}) { if (newPassword) { setAppPassword(newPassword.password) } else { - Toast.show(_(msg`Failed to create app password.`), 'times') + Toast.show(_(msg`Failed to create app password.`), 'xmark') // TODO: better error handling (?) } } catch (e) { - Toast.show(_(msg`Failed to create app password.`), 'times') + Toast.show(_(msg`Failed to create app password.`), 'xmark') logger.error('Failed to create app password', {message: e}) } } @@ -137,6 +137,7 @@ export function Component({}: {}) { _( msg`App Password names can only contain letters, numbers, spaces, dashes, and underscores.`, ), + 'xmark', ) } } |