mirror of https://github.com/langgenius/dify.git
feat: plugin no data
This commit is contained in:
parent
8b290ac7a1
commit
29cac85b12
|
|
@ -3,7 +3,7 @@ import { AUTO_UPDATE_MODE, AUTO_UPDATE_STRATEGY } from './types'
|
|||
export const defaultValue: AutoUpdateConfig = {
|
||||
strategy_setting: AUTO_UPDATE_STRATEGY.fixOnly, // For test
|
||||
upgrade_time_of_day: 0,
|
||||
upgrade_mode: AUTO_UPDATE_MODE.update_all,
|
||||
upgrade_mode: AUTO_UPDATE_MODE.exclude, // For test
|
||||
exclude_plugins: [],
|
||||
include_plugins: [],
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,10 +132,13 @@ const AutoUpdateSetting: FC<Props> = ({
|
|||
))}
|
||||
</div>
|
||||
|
||||
<PluginsPicker
|
||||
value={plugins}
|
||||
onChange={handlePluginsChange}
|
||||
/>
|
||||
{upgrade_mode !== AUTO_UPDATE_MODE.update_all && (
|
||||
<PluginsPicker
|
||||
value={plugins}
|
||||
onChange={handlePluginsChange}
|
||||
updateMode={upgrade_mode}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -1,28 +1,31 @@
|
|||
'use client'
|
||||
import type { FC } from 'react'
|
||||
import React from 'react'
|
||||
import NoPluginSelected from './no-plugin-selected'
|
||||
import type { AUTO_UPDATE_MODE } from './types'
|
||||
|
||||
type Props = {
|
||||
updateMode: AUTO_UPDATE_MODE
|
||||
value: string[] // plugin ids
|
||||
onChange: (value: string[]) => void
|
||||
}
|
||||
|
||||
const PluginsPicker: FC<Props> = ({
|
||||
updateMode,
|
||||
value,
|
||||
onChange,
|
||||
}) => {
|
||||
const hasSelected = value.length > 0
|
||||
return (
|
||||
<div className='rounded-xl'>
|
||||
<div className='mt-2 rounded-[10px] bg-background-section-burn p-2.5'>
|
||||
{hasSelected ? (
|
||||
<div className='flex justify-between'>
|
||||
<div>Selected plugins will not auto-update</div>
|
||||
</div>
|
||||
) : (
|
||||
<div className='system-xs-regular text-center text-text-tertiary'>
|
||||
Only selected plugins will auto-update. No plugins are currently selected, so no plugins will auto-update.
|
||||
</div>
|
||||
<NoPluginSelected updateMode={updateMode} />
|
||||
)}
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,6 +139,10 @@ const translation = {
|
|||
exclude: 'Exclude selected',
|
||||
partial: 'Only selected',
|
||||
},
|
||||
upgradeModePlaceholder: {
|
||||
exclude: 'Selected plugins will not auto-update',
|
||||
partial: 'Only selected plugins will auto-update. No plugins are currently selected, so no plugins will auto-update.',
|
||||
},
|
||||
},
|
||||
pluginInfoModal: {
|
||||
title: 'Plugin info',
|
||||
|
|
|
|||
|
|
@ -139,6 +139,10 @@ const translation = {
|
|||
exclude: '排除选定',
|
||||
partial: '仅选定',
|
||||
},
|
||||
upgradeModePlaceholder: {
|
||||
exclude: '选定的插件将不会自动更新',
|
||||
partial: '仅选定的插件将自动更新。目前未选择任何插件,因此不会自动更新任何插件。',
|
||||
},
|
||||
},
|
||||
pluginInfoModal: {
|
||||
title: '插件信息',
|
||||
|
|
|
|||
Loading…
Reference in New Issue