diff --git a/apps/app/public/static/locales/en_US/commons.json b/apps/app/public/static/locales/en_US/commons.json index eb6c0c50080..3e9e92d8e9c 100644 --- a/apps/app/public/static/locales/en_US/commons.json +++ b/apps/app/public/static/locales/en_US/commons.json @@ -157,6 +157,6 @@ "publish_transfer_key": "Publish transfer key", "transfer_key_limit": "Transfer keys are valid for 1 hour after issuance.", "once_transfer_key_used": "Once the transfer key is used for transfer, it cannot be used for any other transfer.", - "transfer_to_growi_cloud": "If you wish to transfer to GROWI.cloud, please click here." + "transfer_to_growi_cloud": "For more details, please click here." } } diff --git a/apps/app/public/static/locales/fr_FR/commons.json b/apps/app/public/static/locales/fr_FR/commons.json index 3771c037ee5..205f1532148 100644 --- a/apps/app/public/static/locales/fr_FR/commons.json +++ b/apps/app/public/static/locales/fr_FR/commons.json @@ -157,6 +157,6 @@ "publish_transfer_key": "Publier la clé de transfert", "transfer_key_limit": "Les clés de transfert sont valides durant une heure.", "once_transfer_key_used": "Les clés de transfert sont à usage unique.", - "transfer_to_growi_cloud": "Si vous souhaitez transférer depuis GROWI.cloud, cliquez ici." + "transfer_to_growi_cloud": "Pour plus de détails, veuillez cliquer ici." } } diff --git a/apps/app/public/static/locales/ja_JP/commons.json b/apps/app/public/static/locales/ja_JP/commons.json index f85a86db4f9..cd201e5ec03 100644 --- a/apps/app/public/static/locales/ja_JP/commons.json +++ b/apps/app/public/static/locales/ja_JP/commons.json @@ -159,6 +159,6 @@ "publish_transfer_key": "移行キーを発行する", "transfer_key_limit": "※ 移行キーの有効期限は発行から1時間となります。", "once_transfer_key_used": "※ 移行キーは一度移行に利用するとそれ以降はご利用いただけなくなります。", - "transfer_to_growi_cloud": "※ GROWI.cloud への移行を実施する場合はこちらをご確認ください。" + "transfer_to_growi_cloud": "※ 詳しくは こちら" } } diff --git a/apps/app/public/static/locales/zh_CN/commons.json b/apps/app/public/static/locales/zh_CN/commons.json index 9108400f2d3..677f7c63bca 100644 --- a/apps/app/public/static/locales/zh_CN/commons.json +++ b/apps/app/public/static/locales/zh_CN/commons.json @@ -160,6 +160,6 @@ "publish_transfer_key": "发布迁移密钥", "transfer_key_limit": "迁移密钥在签发后一小时内有效。", "once_transfer_key_used": "一旦迁移密钥被用于迁移,它将不再可用于进一步的迁移。", - "transfer_to_growi_cloud": "如果您希望迁移到GROWI.cloud,请点击这里。" + "transfer_to_growi_cloud": "有关更多详情,请点击此处。" } } diff --git a/apps/app/src/client/components/Admin/G2GDataTransfer.tsx b/apps/app/src/client/components/Admin/G2GDataTransfer.tsx index a61650af4a8..515d1b6d0bc 100644 --- a/apps/app/src/client/components/Admin/G2GDataTransfer.tsx +++ b/apps/app/src/client/components/Admin/G2GDataTransfer.tsx @@ -8,6 +8,7 @@ import { useGenerateTransferKey } from '~/client/services/g2g-transfer'; import { apiv3Get, apiv3Post } from '~/client/util/apiv3-client'; import { toastError, toastSuccess } from '~/client/util/toastr'; import { G2G_PROGRESS_STATUS, type G2GProgress } from '~/interfaces/g2g-transfer'; +import { useGrowiHelpDomain } from '~/stores-universal/context'; import { useAdminSocket } from '~/stores/socket-io'; import CustomCopyToClipBoard from '../Common/CustomCopyToClipBoard'; @@ -123,6 +124,8 @@ const G2GDataTransfer = (): JSX.Element => { } }, [setTransferring, startTransferKey, selectedCollections, optionsMap]); + const { data: growiHelpDomain } = useGrowiHelpDomain(); + // File upload // const onChangeFileUploadTypeHandler = useCallback((e: ChangeEvent, type: string) => { // setFileUploadType(type); @@ -275,7 +278,8 @@ const G2GDataTransfer = (): JSX.Element => {

{t('commons:g2g_data_transfer.transfer_key_limit')}

{t('commons:g2g_data_transfer.once_transfer_key_used')}

-

{t('commons:g2g_data_transfer.transfer_to_growi_cloud')}

+ {/* eslint-disable-next-line react/no-danger */} +

); diff --git a/apps/app/src/client/components/DataTransferForm.tsx b/apps/app/src/client/components/DataTransferForm.tsx index a5f7c18ed26..e52a0609f98 100644 --- a/apps/app/src/client/components/DataTransferForm.tsx +++ b/apps/app/src/client/components/DataTransferForm.tsx @@ -3,12 +3,14 @@ import React from 'react'; import { useTranslation } from 'next-i18next'; import { useGenerateTransferKey } from '~/client/services/g2g-transfer'; +import { useGrowiHelpDomain } from '~/stores-universal/context'; import CustomCopyToClipBoard from './Common/CustomCopyToClipBoard'; const DataTransferForm = (): JSX.Element => { const { t } = useTranslation('commons'); const { transferKey, generateTransferKey } = useGenerateTransferKey(); + const { data: growiHelpDomain } = useGrowiHelpDomain(); return (
@@ -33,7 +35,8 @@ const DataTransferForm = (): JSX.Element => {

{t('g2g_data_transfer.transfer_key_limit')}

{t('g2g_data_transfer.once_transfer_key_used')}

-

{t('g2g_data_transfer.transfer_to_growi_cloud')}

+ {/* eslint-disable-next-line react/no-danger */} +

); diff --git a/apps/app/src/stores-universal/context.tsx b/apps/app/src/stores-universal/context.tsx index c020cb75720..c0c3046bede 100644 --- a/apps/app/src/stores-universal/context.tsx +++ b/apps/app/src/stores-universal/context.tsx @@ -285,3 +285,18 @@ export const useAcceptedUploadFileType = (): SWRResponse => { + const { data: growiCloudUri } = useGrowiCloudUri(); + const { data: growiAppIdForGrowiCloud } = useGrowiAppIdForGrowiCloud(); + + return useSWRImmutable( + [growiCloudUri, growiAppIdForGrowiCloud], + ([growiCloudUri, growiAppIdForGrowiCloud]) => { + if (growiCloudUri != null && growiAppIdForGrowiCloud != null) { + return 'growi.cloud/help'; + } + return 'docs.growi.org'; + }, + ); +};