This commit is contained in:
aet 2021-12-19 02:11:16 -05:00
parent 7362222f16
commit 82327da031
2 changed files with 8 additions and 2 deletions

View File

@ -18,13 +18,14 @@ const Container = styled.div`
` `
function useCopy(text: string) { function useCopy(text: string) {
const t = useTranslate()
return useCallback(() => { return useCallback(() => {
navigator.clipboard.writeText(text) navigator.clipboard.writeText(text)
toast({ toast({
type: ToastType.Secondary, type: ToastType.Secondary,
message: "Copied to clipboard.", message: t.tips.copied_to_clipboard,
}) })
}, [text]) }, [text, t])
} }
export { Password as PasswordFieldView } export { Password as PasswordFieldView }

View File

@ -138,3 +138,8 @@ tips:
en: Automatically lock after inactivity en: Automatically lock after inactivity
fr: Verouiller automatiquement après un temps dinactivité fr: Verouiller automatiquement après un temps dinactivité
ja: 一定時間使わないときに自動的にロックする ja: 一定時間使わないときに自動的にロックする
copied_to_clipboard:
en: Copied to clipboard
fr: Copié dans le presse-papier
ja: クリップボードへコピーしました