|
@@ -1,25 +1,26 @@
|
|
|
-import React from 'react';
|
|
|
|
|
|
|
+import React, { useMemo } from 'react';
|
|
|
|
|
|
|
|
import { pagePathUtils } from '@growi/core';
|
|
import { pagePathUtils } from '@growi/core';
|
|
|
import {
|
|
import {
|
|
|
NextPage, GetServerSideProps, GetServerSidePropsContext,
|
|
NextPage, GetServerSideProps, GetServerSidePropsContext,
|
|
|
} from 'next';
|
|
} from 'next';
|
|
|
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
|
|
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
|
|
|
|
|
+import { useTranslation } from 'react-i18next';
|
|
|
|
|
|
|
|
import { NoLoginLayout } from '~/components/Layout/NoLoginLayout';
|
|
import { NoLoginLayout } from '~/components/Layout/NoLoginLayout';
|
|
|
|
|
|
|
|
|
|
+import CustomNavAndContents from '../components/CustomNavigation/CustomNavAndContents';
|
|
|
|
|
+import DataTransferForm from '../components/DataTransferForm';
|
|
|
import InstallerForm from '../components/InstallerForm';
|
|
import InstallerForm from '../components/InstallerForm';
|
|
|
import {
|
|
import {
|
|
|
useCurrentPagePath, useCsrfToken,
|
|
useCurrentPagePath, useCsrfToken,
|
|
|
useAppTitle, useSiteUrl, useConfidential,
|
|
useAppTitle, useSiteUrl, useConfidential,
|
|
|
} from '../stores/context';
|
|
} from '../stores/context';
|
|
|
|
|
|
|
|
-
|
|
|
|
|
import {
|
|
import {
|
|
|
CommonProps, getNextI18NextConfig, getServerSideCommonProps, useCustomTitle,
|
|
CommonProps, getNextI18NextConfig, getServerSideCommonProps, useCustomTitle,
|
|
|
} from './utils/commons';
|
|
} from './utils/commons';
|
|
|
|
|
|
|
|
-
|
|
|
|
|
const { isTrashPage: _isTrashPage } = pagePathUtils;
|
|
const { isTrashPage: _isTrashPage } = pagePathUtils;
|
|
|
|
|
|
|
|
async function injectNextI18NextConfigurations(context: GetServerSidePropsContext, props: Props, namespacesRequired?: string[] | undefined): Promise<void> {
|
|
async function injectNextI18NextConfigurations(context: GetServerSidePropsContext, props: Props, namespacesRequired?: string[] | undefined): Promise<void> {
|
|
@@ -33,6 +34,24 @@ type Props = CommonProps & {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const InstallerPage: NextPage<Props> = (props: Props) => {
|
|
const InstallerPage: NextPage<Props> = (props: Props) => {
|
|
|
|
|
+ const { t } = useTranslation();
|
|
|
|
|
+
|
|
|
|
|
+ const navTabMapping = useMemo(() => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ user_infomation: {
|
|
|
|
|
+ Icon: () => <i className="icon-fw icon-user"></i>,
|
|
|
|
|
+ Content: InstallerForm,
|
|
|
|
|
+ i18n: t('installer.tab'),
|
|
|
|
|
+ index: 0,
|
|
|
|
|
+ },
|
|
|
|
|
+ external_accounts: {
|
|
|
|
|
+ Icon: () => <i className="icon-fw icon-share-alt"></i>,
|
|
|
|
|
+ Content: DataTransferForm,
|
|
|
|
|
+ i18n: t('g2g_data_transfer.tab'),
|
|
|
|
|
+ index: 1,
|
|
|
|
|
+ },
|
|
|
|
|
+ };
|
|
|
|
|
+ }, [t]);
|
|
|
|
|
|
|
|
// commons
|
|
// commons
|
|
|
useAppTitle(props.appTitle);
|
|
useAppTitle(props.appTitle);
|
|
@@ -47,8 +66,8 @@ const InstallerPage: NextPage<Props> = (props: Props) => {
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<NoLoginLayout title={useCustomTitle(props, 'GROWI')} className={classNames.join(' ')}>
|
|
<NoLoginLayout title={useCustomTitle(props, 'GROWI')} className={classNames.join(' ')}>
|
|
|
- <div id="installer-form-container">
|
|
|
|
|
- <InstallerForm />
|
|
|
|
|
|
|
+ <div id="installer-form-container" className="noLogin-dialog mx-auto">
|
|
|
|
|
+ <CustomNavAndContents navTabMapping={navTabMapping} tabContentClasses={['p-0']} />
|
|
|
</div>
|
|
</div>
|
|
|
</NoLoginLayout>
|
|
</NoLoginLayout>
|
|
|
);
|
|
);
|