mirror of
https://gitee.com/mirrors/AllinSSL.git
synced 2026-03-08 07:41:10 +08:00
BIN
frontend/.DS_Store
vendored
BIN
frontend/.DS_Store
vendored
Binary file not shown.
@@ -23,17 +23,16 @@ export default defineComponent({
|
||||
end_day: 30,
|
||||
name_server: '',
|
||||
skip_check: 1,
|
||||
algorithm: 'RSA2048',
|
||||
},
|
||||
}),
|
||||
},
|
||||
},
|
||||
setup(props) {
|
||||
const { updateNodeConfig, advancedOptions, isRefreshNode } = useStore()
|
||||
const { updateNodeConfig, isRefreshNode } = useStore()
|
||||
// 弹窗辅助
|
||||
const { confirm } = useModalHooks()
|
||||
// 获取表单助手函数
|
||||
const { useFormInput, useFormSelect, useFormMore, useFormHelp, useFormSwitch } = useFormHooks()
|
||||
const { useFormInput, useFormHelp, useFormSwitch } = useFormHooks()
|
||||
// 表单参数
|
||||
const param = ref(deepClone(props.node.config))
|
||||
|
||||
@@ -89,42 +88,23 @@ export default defineComponent({
|
||||
)
|
||||
},
|
||||
},
|
||||
useFormMore(advancedOptions),
|
||||
...(advancedOptions.value
|
||||
? [
|
||||
useFormSelect(
|
||||
$t('证书算法'),
|
||||
'algorithm',
|
||||
[
|
||||
{ label: 'RSA2048', value: 'RSA2048' },
|
||||
{ label: 'RSA3072', value: 'RSA3072' },
|
||||
{ label: 'RSA4096', value: 'RSA4096' },
|
||||
{ label: 'RSA8192', value: 'RSA8192' },
|
||||
{ label: 'EC256', value: 'EC256' },
|
||||
{ label: 'EC384', value: 'EC384' },
|
||||
],
|
||||
{},
|
||||
{ showRequireMark: false },
|
||||
),
|
||||
useFormInput(
|
||||
$t('t_0_1747106957037'),
|
||||
'name_server',
|
||||
{
|
||||
placeholder: $t('t_1_1747106961747'),
|
||||
onInput: (val: string) => {
|
||||
param.value.name_server = val.trim() // 去除空格
|
||||
param.value.name_server = param.value.name_server.replace(/,/g, ',') // 中文逗号分隔
|
||||
param.value.name_server = param.value.name_server.replace(/;/g, ',') // 去除分号
|
||||
},
|
||||
onFocus: () => {
|
||||
param.value.name_server = param.value.name_server.replace(/,^/g, '') // 中文逗号分隔
|
||||
},
|
||||
},
|
||||
{ showRequireMark: false },
|
||||
),
|
||||
useFormSwitch($t('t_2_1747106957037'), 'skip_check', {}, { showRequireMark: false }),
|
||||
]
|
||||
: []),
|
||||
useFormInput(
|
||||
$t('t_0_1747106957037'),
|
||||
'name_server',
|
||||
{
|
||||
placeholder: $t('t_1_1747106961747'),
|
||||
onInput: (val: string) => {
|
||||
param.value.name_server = val.trim() // 去除空格
|
||||
param.value.name_server = param.value.name_server.replace(/,/g, ',') // 中文逗号分隔
|
||||
param.value.name_server = param.value.name_server.replace(/;/g, ',') // 去除分号
|
||||
},
|
||||
onFocus: () => {
|
||||
param.value.name_server = param.value.name_server.replace(/,^/g, '') // 中文逗号分隔
|
||||
},
|
||||
},
|
||||
{ showRequireMark: false },
|
||||
),
|
||||
useFormSwitch($t('t_2_1747106957037'), 'skip_check', {}, { showRequireMark: false }),
|
||||
useFormHelp([
|
||||
{
|
||||
content: $t('t_0_1747040228657'),
|
||||
@@ -141,10 +121,6 @@ export default defineComponent({
|
||||
// 创建表单实例
|
||||
const { component: Form, data, example } = useForm<ApplyNodeConfig>({ defaultValue: param, config, rules })
|
||||
|
||||
onMounted(() => {
|
||||
advancedOptions.value = false
|
||||
})
|
||||
|
||||
// 确认事件触发
|
||||
confirm(async (close) => {
|
||||
try {
|
||||
|
||||
@@ -109,7 +109,6 @@ nodeOptions[APPLY] = () =>
|
||||
end_day: 30,
|
||||
provider: '',
|
||||
provider_id: '',
|
||||
algorithm: 'RSA2048',
|
||||
},
|
||||
childNode: null,
|
||||
},
|
||||
|
||||
@@ -20,7 +20,6 @@ export default {
|
||||
provider_id: '',
|
||||
provider: '',
|
||||
end_day: 30,
|
||||
algorithm: 'RSA2048',
|
||||
},
|
||||
childNode: {
|
||||
id: 'deploy-1',
|
||||
|
||||
@@ -203,10 +203,8 @@ export interface ApplyNodeConfig {
|
||||
provider_id: string // DNS提供商授权ID
|
||||
provider: string // DNS提供商
|
||||
end_day: number // 续签间隔
|
||||
// 高级功能
|
||||
name_server: string // DNS递归服务器
|
||||
skip_check: number // 跳过检查
|
||||
algorithm: string // 数字证书算法
|
||||
// 高级功能
|
||||
// algorithm: 'RSA2048' | 'RSA3072' | 'RSA4096' | 'RSA8192' | 'EC256' | 'EC384' // 数字证书算法
|
||||
// dnsServer?: string // 指定DNS解析服务器
|
||||
|
||||
@@ -33,7 +33,6 @@ export const useFlowStore = defineStore('flow-store', () => {
|
||||
},
|
||||
}) // 流程图数据
|
||||
const flowZoom = ref(100) // 流程图缩放比例
|
||||
const advancedOptions = ref(false) // 高级选项
|
||||
const addNodeSelectList = ref<NodeSelect[]>([]) // 添加节点选项列表
|
||||
const excludeNodeSelectList = ref<NodeNum[]>([]) // 排除的节点选项列表
|
||||
const addNodeBtnRef = ref<HTMLElement | null>(null) // 添加节点按钮
|
||||
@@ -537,7 +536,6 @@ export const useFlowStore = defineStore('flow-store', () => {
|
||||
flowZoom, // 流程图缩放比例
|
||||
selectedNodeId, // 当前选中的节点ID
|
||||
isRefreshNode, // 是否刷新节点
|
||||
advancedOptions, // 高级选项
|
||||
|
||||
// 方法
|
||||
initFlowData, // 初始化流程图数据
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ref, Ref, toRef, effectScope, onScopeDispose, shallowRef, toRefs, isRef } from 'vue'
|
||||
import { ref, Ref, toRef, effectScope, onScopeDispose, shallowRef, toRefs, watch, isRef } from 'vue'
|
||||
import {
|
||||
NForm,
|
||||
NFormItem,
|
||||
@@ -46,7 +46,7 @@ import {
|
||||
type CheckboxGroupProps,
|
||||
SwitchSlots,
|
||||
} from 'naive-ui'
|
||||
import { DownOutlined, UpOutlined } from '@vicons/antd'
|
||||
import { LeftOutlined, DownOutlined } from '@vicons/antd'
|
||||
import { translation, TranslationModule, type TranslationLocale } from '../locals/translation'
|
||||
import type {
|
||||
FormInstanceWithComponent,
|
||||
@@ -739,13 +739,18 @@ const useFormMore = (isMore: Ref<boolean>, content?: string) => {
|
||||
return {
|
||||
type: 'custom',
|
||||
render: () => (
|
||||
<NDivider class="cursor-pointer w-full !m-[1rem]" onClick={() => (isMore.value = !isMore.value)}>
|
||||
<NDivider
|
||||
class="cursor-pointer w-full"
|
||||
onClick={() => {
|
||||
isMore.value = !isMore.value
|
||||
}}
|
||||
>
|
||||
<div class="flex items-center w-full" style={{ color }}>
|
||||
<span class="mr-[4px]">
|
||||
{!isMore.value ? hookT('expand') : hookT('collapse')}
|
||||
{content || hookT('moreConfig')}
|
||||
</span>
|
||||
<NIcon>{isMore.value ? <DownOutlined /> : <UpOutlined />}</NIcon>
|
||||
<NIcon>{isMore.value ? <DownOutlined /> : <LeftOutlined />}</NIcon>
|
||||
</div>
|
||||
</NDivider>
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user