chore(translations): add missing translation keys
This commit is contained in:
@@ -26,7 +26,7 @@ const showEnableTotpModal = (
|
||||
qrCode: string;
|
||||
secret: string;
|
||||
password: string;
|
||||
},
|
||||
}
|
||||
) => {
|
||||
const t = translateOutsideContext();
|
||||
return modals.openModal({
|
||||
@@ -87,7 +87,7 @@ const CreateEnableTotpModal = ({
|
||||
<Button
|
||||
onClick={() => {
|
||||
navigator.clipboard.writeText(options.secret);
|
||||
toast.success("Copied to clipboard");
|
||||
toast.success(t("common.notify.copied"));
|
||||
}}
|
||||
>
|
||||
{options.secret}
|
||||
|
||||
@@ -89,9 +89,9 @@ const ManageShareTable = ({
|
||||
onClick={() => {
|
||||
if (window.isSecureContext) {
|
||||
clipboard.copy(
|
||||
`${window.location.origin}/s/${share.id}`,
|
||||
`${window.location.origin}/s/${share.id}`
|
||||
);
|
||||
toast.success(t("common.notify.copied"));
|
||||
toast.success(t("common.notify.copied-link"));
|
||||
} else {
|
||||
showShareLinkModal(modals, share.id);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,9 @@ import { useClipboard } from "@mantine/hooks";
|
||||
import { useModals } from "@mantine/modals";
|
||||
import { Dispatch, SetStateAction, useEffect, useState } from "react";
|
||||
import { TbDownload, TbEye, TbLink } from "react-icons/tb";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import useConfig from "../../hooks/config.hook";
|
||||
import useTranslate from "../../hooks/useTranslate.hook";
|
||||
import shareService from "../../services/share.service";
|
||||
import { FileMetaData } from "../../types/File.type";
|
||||
import { Share } from "../../types/share.type";
|
||||
@@ -19,8 +21,6 @@ import { byteToHumanSizeString } from "../../utils/fileSize.util";
|
||||
import toast from "../../utils/toast.util";
|
||||
import TableSortIcon, { TableSort } from "../core/SortIcon";
|
||||
import showFilePreviewModal from "./modals/showFilePreviewModal";
|
||||
import useTranslate from "../../hooks/useTranslate.hook";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
const FileList = ({
|
||||
files,
|
||||
@@ -71,7 +71,7 @@ const FileList = ({
|
||||
|
||||
if (window.isSecureContext) {
|
||||
clipboard.copy(link);
|
||||
toast.success(t("common.notify.copied"));
|
||||
toast.success(t("common.notify.copied-link"));
|
||||
} else {
|
||||
modals.openModal({
|
||||
title: t("share.modal.file-link"),
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { ActionIcon, TextInput, Tooltip } from "@mantine/core";
|
||||
import { useClipboard } from "@mantine/hooks";
|
||||
import { useRef, useState } from "react";
|
||||
import { TbCheck, TbCopy } from "react-icons/tb";
|
||||
import { IoOpenOutline } from "react-icons/io5";
|
||||
import { TbCheck, TbCopy } from "react-icons/tb";
|
||||
import useTranslate from "../../hooks/useTranslate.hook";
|
||||
import toast from "../../utils/toast.util";
|
||||
|
||||
@@ -13,12 +13,12 @@ function CopyTextField(props: { link: string }) {
|
||||
const [checkState, setCheckState] = useState(false);
|
||||
const [textClicked, setTextClicked] = useState(false);
|
||||
const timerRef = useRef<number | ReturnType<typeof setTimeout> | undefined>(
|
||||
undefined,
|
||||
undefined
|
||||
);
|
||||
|
||||
const copyLink = () => {
|
||||
clipboard.copy(props.link);
|
||||
toast.success(t("common.notify.copied"));
|
||||
toast.success(t("common.notify.copied-link"));
|
||||
if (timerRef.current) clearTimeout(timerRef.current);
|
||||
timerRef.current = setTimeout(() => {
|
||||
setCheckState(false);
|
||||
|
||||
Reference in New Issue
Block a user