Fix i18n
This commit is contained in:
@ -2,6 +2,7 @@ import styled from "@emotion/styled"
|
||||
import type { ItemSection, ItemField } from "opvault.js"
|
||||
import { FieldType } from "opvault.js"
|
||||
import { useCallback, useMemo, useState } from "react"
|
||||
import { useTranslate } from "../i18n"
|
||||
import { parseMonthYear } from "../utils"
|
||||
import { BigTextView } from "./BigTextView"
|
||||
import { ErrorBoundary } from "./ErrorBoundary"
|
||||
@ -31,6 +32,7 @@ export { Password as PasswordFieldView }
|
||||
const Password: React.FC<{
|
||||
field: Pick<ItemSection.Concealed, "v">
|
||||
}> = ({ field }) => {
|
||||
const t = useTranslate()
|
||||
const [show, setShow] = useState(false)
|
||||
const [bigText, showBigText] = useState(false)
|
||||
|
||||
@ -59,9 +61,11 @@ const Password: React.FC<{
|
||||
</Container>
|
||||
{bigText && <BigTextView onClose={onCloseBigText}>{field.v}</BigTextView>}
|
||||
<ContextMenuContainer>
|
||||
<Item onClick={onCopy}>Copier</Item>
|
||||
<Item onClick={onToggle}>{show ? "Cacher" : "Afficher"}</Item>
|
||||
{!bigText && <Item onClick={onOpenBigText}>Afficher en gros caractères</Item>}
|
||||
<Item onClick={onCopy}>{t.action.copy}</Item>
|
||||
<Item onClick={onToggle}>{show ? t.action.hide : t.action.show}</Item>
|
||||
{!bigText && (
|
||||
<Item onClick={onOpenBigText}>{t.action.show_in_big_characters}</Item>
|
||||
)}
|
||||
</ContextMenuContainer>
|
||||
</>
|
||||
)
|
||||
|
Reference in New Issue
Block a user