mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 19:59:50 +08:00
chore: update plugin from GitHub
This commit is contained in:
parent
ebebbb684b
commit
691dbf9d17
|
@ -7,6 +7,7 @@ import Button from '@/app/components/base/button'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
type SelectPackageProps = {
|
type SelectPackageProps = {
|
||||||
|
isEdit?: boolean
|
||||||
selectedVersion: string
|
selectedVersion: string
|
||||||
versions: Item[]
|
versions: Item[]
|
||||||
onSelectVersion: (item: Item) => void
|
onSelectVersion: (item: Item) => void
|
||||||
|
@ -18,6 +19,7 @@ type SelectPackageProps = {
|
||||||
}
|
}
|
||||||
|
|
||||||
const SelectPackage: React.FC<SelectPackageProps> = ({
|
const SelectPackage: React.FC<SelectPackageProps> = ({
|
||||||
|
isEdit = false,
|
||||||
selectedVersion,
|
selectedVersion,
|
||||||
versions,
|
versions,
|
||||||
onSelectVersion,
|
onSelectVersion,
|
||||||
|
@ -34,7 +36,9 @@ const SelectPackage: React.FC<SelectPackageProps> = ({
|
||||||
htmlFor='version'
|
htmlFor='version'
|
||||||
className='flex flex-col justify-center items-start self-stretch text-text-secondary'
|
className='flex flex-col justify-center items-start self-stretch text-text-secondary'
|
||||||
>
|
>
|
||||||
<span className='system-sm-semibold'>{t('plugin.installFromGitHub.selectVersion')}</span>
|
<span className='system-sm-semibold'>{isEdit ? t('plugin.installFromGitHub.updateVersion')
|
||||||
|
: t('plugin.installFromGitHub.selectVersion')}
|
||||||
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<PortalSelect
|
<PortalSelect
|
||||||
value={selectedVersion}
|
value={selectedVersion}
|
||||||
|
@ -57,13 +61,15 @@ const SelectPackage: React.FC<SelectPackageProps> = ({
|
||||||
popupClassName='w-[432px] z-[1001]'
|
popupClassName='w-[432px] z-[1001]'
|
||||||
/>
|
/>
|
||||||
<div className='flex justify-end items-center gap-2 self-stretch mt-4'>
|
<div className='flex justify-end items-center gap-2 self-stretch mt-4'>
|
||||||
<Button
|
{!isEdit
|
||||||
variant='secondary'
|
&& <Button
|
||||||
className='min-w-[72px]'
|
variant='secondary'
|
||||||
onClick={onBack}
|
className='min-w-[72px]'
|
||||||
>
|
onClick={onBack}
|
||||||
{t('plugin.installModal.back')}
|
>
|
||||||
</Button>
|
{t('plugin.installModal.back')}
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
<Button
|
<Button
|
||||||
variant='primary'
|
variant='primary'
|
||||||
className='min-w-[72px]'
|
className='min-w-[72px]'
|
||||||
|
|
|
@ -86,6 +86,7 @@ const translation = {
|
||||||
},
|
},
|
||||||
installFromGitHub: {
|
installFromGitHub: {
|
||||||
installPlugin: 'Install plugin from GitHub',
|
installPlugin: 'Install plugin from GitHub',
|
||||||
|
updateVersion: 'Update plugin from GitHub',
|
||||||
gitHubRepo: 'GitHub repository',
|
gitHubRepo: 'GitHub repository',
|
||||||
selectVersion: 'Select version',
|
selectVersion: 'Select version',
|
||||||
selectVersionPlaceholder: 'Please select a version',
|
selectVersionPlaceholder: 'Please select a version',
|
||||||
|
|
|
@ -86,6 +86,7 @@ const translation = {
|
||||||
},
|
},
|
||||||
installFromGitHub: {
|
installFromGitHub: {
|
||||||
installPlugin: '从 GitHub 安装插件',
|
installPlugin: '从 GitHub 安装插件',
|
||||||
|
updateVersion: '更新 GitHub 插件',
|
||||||
gitHubRepo: 'GitHub 仓库',
|
gitHubRepo: 'GitHub 仓库',
|
||||||
selectVersion: '选择版本',
|
selectVersion: '选择版本',
|
||||||
selectVersionPlaceholder: '请选择一个版本',
|
selectVersionPlaceholder: '请选择一个版本',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user