|
|
@@ -5,6 +5,7 @@ import { useTranslation } from 'next-i18next';
|
|
|
import { apiv3Post } from '~/client/util/apiv3-client';
|
|
|
import { toastSuccess, toastError } from '~/client/util/toastr';
|
|
|
|
|
|
+import type { IGrowiPluginOrigin } from '../../../interfaces';
|
|
|
import { useSWRxPlugins } from '../../../stores/growi-plugin';
|
|
|
|
|
|
export const PluginInstallerForm = (): JSX.Element => {
|
|
|
@@ -18,13 +19,13 @@ export const PluginInstallerForm = (): JSX.Element => {
|
|
|
|
|
|
const {
|
|
|
'pluginInstallerForm[url]': { value: url },
|
|
|
- // 'pluginInstallerForm[ghBranch]': { value: ghBranch },
|
|
|
+ 'pluginInstallerForm[ghBranch]': { value: ghBranch },
|
|
|
// 'pluginInstallerForm[ghTag]': { value: ghTag },
|
|
|
} = formData;
|
|
|
|
|
|
- const pluginInstallerForm = {
|
|
|
+ const pluginInstallerForm: IGrowiPluginOrigin = {
|
|
|
url,
|
|
|
- // ghBranch,
|
|
|
+ ghBranch,
|
|
|
// ghTag,
|
|
|
};
|
|
|
|
|
|
@@ -44,7 +45,7 @@ export const PluginInstallerForm = (): JSX.Element => {
|
|
|
return (
|
|
|
<form role="form" onSubmit={submitHandler}>
|
|
|
<div className='form-group row'>
|
|
|
- <label className="text-left text-md-right col-md-3 col-form-label">{t('plugins.repository_url')}</label>
|
|
|
+ <label className="text-left text-md-right col-md-3 col-form-label">{t('plugins.form.label_url')}</label>
|
|
|
<div className="col-md-6">
|
|
|
<input
|
|
|
className="form-control"
|
|
|
@@ -53,7 +54,19 @@ export const PluginInstallerForm = (): JSX.Element => {
|
|
|
placeholder="https://github.com/growi/plugins"
|
|
|
required
|
|
|
/>
|
|
|
- <p className="form-text text-muted">{t('plugins.description')}</p>
|
|
|
+ <p className="form-text text-muted">{t('plugins.form.desc_url')}</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div className='form-group row'>
|
|
|
+ <label className="text-left text-md-right col-md-3 col-form-label">{t('plugins.form.label_branch')}</label>
|
|
|
+ <div className="col-md-6">
|
|
|
+ <input
|
|
|
+ className="form-control col-md-3"
|
|
|
+ type="text"
|
|
|
+ name="pluginInstallerForm[ghBranch]"
|
|
|
+ placeholder="main"
|
|
|
+ />
|
|
|
+ <p className="form-text text-muted">{t('plugins.form.desc_branch')}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
|