|
@@ -1,5 +1,5 @@
|
|
|
import type { FC } from 'react';
|
|
import type { FC } from 'react';
|
|
|
-import React, { useCallback, useEffect } from 'react';
|
|
|
|
|
|
|
+import { useCallback, useEffect } from 'react';
|
|
|
import { useTranslation } from 'next-i18next';
|
|
import { useTranslation } from 'next-i18next';
|
|
|
import { useForm } from 'react-hook-form';
|
|
import { useForm } from 'react-hook-form';
|
|
|
import { Card, CardBody } from 'reactstrap';
|
|
import { Card, CardBody } from 'reactstrap';
|
|
@@ -44,82 +44,78 @@ export const CustomizeTitle: FC = () => {
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
- <React.Fragment>
|
|
|
|
|
- <div className="row">
|
|
|
|
|
- <div className="col-12">
|
|
|
|
|
- <h2 className="admin-setting-header">
|
|
|
|
|
- {t('admin:customize_settings.custom_title')}
|
|
|
|
|
- </h2>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <div className="row">
|
|
|
|
|
+ <div className="col-12">
|
|
|
|
|
+ <h2 className="admin-setting-header">
|
|
|
|
|
+ {t('admin:customize_settings.custom_title')}
|
|
|
|
|
+ </h2>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div className="col-12">
|
|
|
|
|
+ <Card className="card custom-card bg-body-tertiary mb-3">
|
|
|
|
|
+ <CardBody className="px-0 py-2">
|
|
|
|
|
+ <p
|
|
|
|
|
+ // biome-ignore lint/security/noDangerouslySetInnerHtml: trusted translation markup
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t('admin:customize_settings.custom_title_detail'),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
|
|
+ <ul>
|
|
|
|
|
+ <li>
|
|
|
|
|
+ <span
|
|
|
|
|
+ // biome-ignore lint/security/noDangerouslySetInnerHtml: trusted translation markup
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t(
|
|
|
|
|
+ 'admin:customize_settings.custom_title_detail_placeholder1',
|
|
|
|
|
+ ),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <li>
|
|
|
|
|
+ <span
|
|
|
|
|
+ // biome-ignore lint/security/noDangerouslySetInnerHtml: trusted translation markup
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t(
|
|
|
|
|
+ 'admin:customize_settings.custom_title_detail_placeholder2',
|
|
|
|
|
+ ),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <li>
|
|
|
|
|
+ <span
|
|
|
|
|
+ // biome-ignore lint/security/noDangerouslySetInnerHtml: trusted translation markup
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t(
|
|
|
|
|
+ 'admin:customize_settings.custom_title_detail_placeholder3',
|
|
|
|
|
+ ),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ </CardBody>
|
|
|
|
|
+ </Card>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
|
|
+ {/* TODO i18n */}
|
|
|
|
|
+ <div className="form-text text-muted col-12 mb-3">
|
|
|
|
|
+ Default Value:{' '}
|
|
|
|
|
+ <code>
|
|
|
|
|
+ {{pagename}} - {{sitename}}
|
|
|
|
|
+ </code>
|
|
|
|
|
+ <br />
|
|
|
|
|
+ Default Output Example:{' '}
|
|
|
|
|
+ <code className="xml">
|
|
|
|
|
+ <title>Page name - My GROWI</title>
|
|
|
|
|
+ </code>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <form onSubmit={handleSubmit(onSubmit)}>
|
|
|
<div className="col-12">
|
|
<div className="col-12">
|
|
|
- <Card className="card custom-card bg-body-tertiary mb-3">
|
|
|
|
|
- <CardBody className="px-0 py-2">
|
|
|
|
|
- {/* eslint-disable react/no-danger */}
|
|
|
|
|
- <p
|
|
|
|
|
- // biome-ignore lint/security/noDangerouslySetInnerHtml: trusted translation markup
|
|
|
|
|
- dangerouslySetInnerHTML={{
|
|
|
|
|
- __html: t('admin:customize_settings.custom_title_detail'),
|
|
|
|
|
- }}
|
|
|
|
|
- />
|
|
|
|
|
- <ul>
|
|
|
|
|
- <li>
|
|
|
|
|
- <span
|
|
|
|
|
- // biome-ignore lint/security/noDangerouslySetInnerHtml: trusted translation markup
|
|
|
|
|
- dangerouslySetInnerHTML={{
|
|
|
|
|
- __html: t(
|
|
|
|
|
- 'admin:customize_settings.custom_title_detail_placeholder1',
|
|
|
|
|
- ),
|
|
|
|
|
- }}
|
|
|
|
|
- />
|
|
|
|
|
- </li>
|
|
|
|
|
- <li>
|
|
|
|
|
- <span
|
|
|
|
|
- // biome-ignore lint/security/noDangerouslySetInnerHtml: trusted translation markup
|
|
|
|
|
- dangerouslySetInnerHTML={{
|
|
|
|
|
- __html: t(
|
|
|
|
|
- 'admin:customize_settings.custom_title_detail_placeholder2',
|
|
|
|
|
- ),
|
|
|
|
|
- }}
|
|
|
|
|
- />
|
|
|
|
|
- </li>
|
|
|
|
|
- <li>
|
|
|
|
|
- <span
|
|
|
|
|
- // biome-ignore lint/security/noDangerouslySetInnerHtml: trusted translation markup
|
|
|
|
|
- dangerouslySetInnerHTML={{
|
|
|
|
|
- __html: t(
|
|
|
|
|
- 'admin:customize_settings.custom_title_detail_placeholder3',
|
|
|
|
|
- ),
|
|
|
|
|
- }}
|
|
|
|
|
- />
|
|
|
|
|
- </li>
|
|
|
|
|
- </ul>
|
|
|
|
|
- {/* eslint-enable react/no-danger */}
|
|
|
|
|
- </CardBody>
|
|
|
|
|
- </Card>
|
|
|
|
|
|
|
+ <input className="form-control" {...register('customizeTitle')} />
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
- {/* TODO i18n */}
|
|
|
|
|
- <div className="form-text text-muted col-12 mb-3">
|
|
|
|
|
- Default Value:{' '}
|
|
|
|
|
- <code>
|
|
|
|
|
- {{pagename}} - {{sitename}}
|
|
|
|
|
- </code>
|
|
|
|
|
- <br />
|
|
|
|
|
- Default Output Example:{' '}
|
|
|
|
|
- <code className="xml">
|
|
|
|
|
- <title>Page name - My GROWI</title>
|
|
|
|
|
- </code>
|
|
|
|
|
|
|
+ <div className="col-12">
|
|
|
|
|
+ <AdminUpdateButtonRow type="submit" disabled={false} />
|
|
|
</div>
|
|
</div>
|
|
|
- <form onSubmit={handleSubmit(onSubmit)}>
|
|
|
|
|
- <div className="col-12">
|
|
|
|
|
- <input className="form-control" {...register('customizeTitle')} />
|
|
|
|
|
- </div>
|
|
|
|
|
- <div className="col-12">
|
|
|
|
|
- <AdminUpdateButtonRow type="submit" disabled={false} />
|
|
|
|
|
- </div>
|
|
|
|
|
- </form>
|
|
|
|
|
- </div>
|
|
|
|
|
- </React.Fragment>
|
|
|
|
|
|
|
+ </form>
|
|
|
|
|
+ </div>
|
|
|
);
|
|
);
|
|
|
};
|
|
};
|