mirror of
https://gitee.com/mirrors/AllinSSL.git
synced 2026-03-09 16:21:10 +08:00
【新增】在翻译文件中添加ACME服务相关翻译
【修复】编辑状态部署阶段插件配置的数据读取 【修复】编辑状态授权Api添加插件类型插件配置无法编辑的问题
This commit is contained in:
@@ -33,6 +33,7 @@ export default defineComponent({
|
||||
<div class="rounded-lg">
|
||||
<TableComponent
|
||||
size="medium"
|
||||
scroll-x="1560"
|
||||
v-slots={{
|
||||
empty: () => <EmptyState addButtonText={$t('t_0_1745289355714')} onAddClick={openAddForm} />,
|
||||
}}
|
||||
|
||||
@@ -130,13 +130,13 @@ export const useController = (): AuthApiManageControllerExposes => {
|
||||
{
|
||||
title: $t('t_1_1746754499371'),
|
||||
key: 'type',
|
||||
width: 120,
|
||||
width: 140,
|
||||
render: (row) => <TypeIcon icon={row.type} type="success" />,
|
||||
},
|
||||
{
|
||||
title: $t('t_2_1746754500270'),
|
||||
key: 'type',
|
||||
width: 180,
|
||||
width: 200,
|
||||
render: (row) => (
|
||||
<NSpace>
|
||||
{row.access_type?.map((type) => {
|
||||
@@ -162,7 +162,7 @@ export const useController = (): AuthApiManageControllerExposes => {
|
||||
{
|
||||
title: $t('t_8_1745215914610'),
|
||||
key: 'actions',
|
||||
width: 240,
|
||||
width: 200,
|
||||
align: 'right',
|
||||
fixed: 'right',
|
||||
render: (row) => {
|
||||
@@ -756,6 +756,9 @@ export const useApiFormController = (props: ApiFormControllerProps): ApiFormCont
|
||||
? pluginConfig.config
|
||||
: JSON.stringify(pluginConfig.config, null, 2)
|
||||
}
|
||||
const handleConfigUpdate = (value: string) => {
|
||||
;(param.value.config as PluginAccessConfig).config = value
|
||||
}
|
||||
return (
|
||||
<NFormItem
|
||||
path="config.params"
|
||||
@@ -778,7 +781,13 @@ export const useApiFormController = (props: ApiFormControllerProps): ApiFormCont
|
||||
),
|
||||
}}
|
||||
>
|
||||
<NInput type="textarea" value={getConfigValue()} placeholder={pluginActionTips.value} rows={4} />
|
||||
<NInput
|
||||
type="textarea"
|
||||
value={getConfigValue()}
|
||||
onUpdateValue={handleConfigUpdate}
|
||||
placeholder={pluginActionTips.value}
|
||||
rows={4}
|
||||
/>
|
||||
</NFormItem>
|
||||
)
|
||||
}),
|
||||
|
||||
@@ -242,7 +242,7 @@ export default defineComponent({
|
||||
return (
|
||||
<NSpin show={isLoadingCA.value}>
|
||||
<NGrid cols={24}>
|
||||
<NFormItemGi span={13} label={$t('证书CA')} path="ca" showRequireMark={true}>
|
||||
<NFormItemGi span={13} label={$t('t_3_1750399513606')} path="ca" showRequireMark={true}>
|
||||
<NSelect
|
||||
value={param.value.ca}
|
||||
options={caOptions.value}
|
||||
@@ -263,7 +263,7 @@ export default defineComponent({
|
||||
</NFormItemGi>
|
||||
<NFormItemGi span={11}>
|
||||
<NButton class="mx-[8px]" onClick={goToAddCAProvider}>
|
||||
{$t('添加CA授权')}
|
||||
{$t('t_4_1747903685371')}
|
||||
</NButton>
|
||||
<NButton onClick={loadCAOptions} loading={isLoadingCA.value}>
|
||||
{$t('t_0_1746497662220')}
|
||||
|
||||
@@ -291,10 +291,10 @@ export default defineComponent({
|
||||
|
||||
watch(
|
||||
() => param.value.provider_id,
|
||||
() => {
|
||||
(newId, oldId) => {
|
||||
handleSiteSearch('')
|
||||
// 如果是插件类型,加载插件方法
|
||||
if (param.value.provider === 'plugin') {
|
||||
// 如果是插件类型且provider_id发生变化,加载插件方法
|
||||
if (param.value.provider === 'plugin' && newId && newId !== oldId) {
|
||||
loadPluginActions()
|
||||
}
|
||||
},
|
||||
@@ -343,24 +343,46 @@ export default defineComponent({
|
||||
if (!param.value.provider_id) return
|
||||
try {
|
||||
pluginActionOptionsLoading.value = true
|
||||
// 先获取插件列表,找到对应的插件
|
||||
const config = JSON.parse(param.value.provider_data?.data?.config || '{}')
|
||||
if (config.name) {
|
||||
|
||||
// 获取插件配置信息
|
||||
let pluginName = ''
|
||||
|
||||
// 如果有 provider_data,从中获取插件名称
|
||||
if (param.value.provider_data?.data?.config) {
|
||||
const config = JSON.parse(param.value.provider_data.data.config || '{}')
|
||||
pluginName = config.name
|
||||
} else if (param.value.type) {
|
||||
// 编辑模式下,从 type 字段获取插件名称
|
||||
pluginName = param.value.type
|
||||
}
|
||||
|
||||
if (pluginName) {
|
||||
const { data } = await getPlugins().fetch()
|
||||
const selectedPlugin = data?.find((plugin: { name: string }) => plugin.name === config.name)
|
||||
const selectedPlugin = data?.find((plugin: { name: string }) => plugin.name === pluginName)
|
||||
const actions = selectedPlugin?.actions || []
|
||||
pluginActionOptions.value = actions.map((item: any) => ({
|
||||
label: `${item.description}`,
|
||||
value: item.name,
|
||||
params: item.params,
|
||||
}))
|
||||
if (!param.value.action) {
|
||||
|
||||
// 如果当前已有选择的方法,设置对应的提示
|
||||
if (param.value.action) {
|
||||
const selectedAction = actions.find((action: any) => action.name === param.value.action)
|
||||
if (selectedAction) {
|
||||
pluginActionTips.value = renderPluginActionTips(selectedAction.params || {})
|
||||
}
|
||||
} else if (actions.length > 0) {
|
||||
// 如果没有选择方法,默认选择第一个
|
||||
const action = actions[0]
|
||||
param.value.action = action?.name
|
||||
pluginActionTips.value = renderPluginActionTips(action?.params || {})
|
||||
}
|
||||
|
||||
delete param.value.provider_data
|
||||
// // 只在创建模式下删除 provider_data
|
||||
// if (param.value.provider_data) {
|
||||
// delete param.value.provider_data
|
||||
// }
|
||||
}
|
||||
} catch (error) {
|
||||
handleError(error)
|
||||
|
||||
@@ -840,8 +840,8 @@ export const useCAFormController = (props?: { isEdit?: boolean; editId?: string
|
||||
useFormInput('CA名称', 'caName', {
|
||||
placeholder: '请输入CA提供商名称',
|
||||
}),
|
||||
useFormInput($t('ACME服务URL地址'), 'CADirURL', {
|
||||
placeholder: $t('请输入ACME服务URL地址'),
|
||||
useFormInput($t('t_0_1750399513983'), 'CADirURL', {
|
||||
placeholder: $t('t_1_1750399516161'),
|
||||
}),
|
||||
]
|
||||
: []),
|
||||
|
||||
@@ -51,6 +51,7 @@ export default defineComponent({
|
||||
<div class="rounded-lg">
|
||||
<TableComponent
|
||||
size="medium"
|
||||
scroll-x="1800"
|
||||
v-slots={{
|
||||
empty: () => <EmptyState addButtonText={$t('t_11_1745289354516')} onAddClick={openAddForm} />,
|
||||
}}
|
||||
|
||||
@@ -147,19 +147,19 @@ export const useController = (): MonitorControllerExposes => {
|
||||
render: (row: SiteMonitorItem) => row.end_time + '(' + row.end_day + ')',
|
||||
},
|
||||
{
|
||||
title: $t('上次异常时间'),
|
||||
title: $t('t_2_1750399515511'),
|
||||
key: 'except_end_time',
|
||||
width: 150,
|
||||
render: (row: SiteMonitorItem) => row.except_end_time || '-',
|
||||
},
|
||||
{
|
||||
title: $t('上次检查时间'),
|
||||
title: $t('t_19_1745289354676'),
|
||||
key: 'last_time',
|
||||
width: 150,
|
||||
render: (row: SiteMonitorItem) => row.last_time || '-',
|
||||
},
|
||||
{
|
||||
title: $t('更新时间'),
|
||||
title: $t('t_0_1745295228865'),
|
||||
key: 'update_time',
|
||||
width: 150,
|
||||
render: (row: SiteMonitorItem) => row.update_time || '-',
|
||||
|
||||
Reference in New Issue
Block a user