refactor: refactor website ssl keyType default value (#14023)

This commit is contained in:
Yuki Guo
2026-10-10 17:49:14 +08:00
committed by GitHub
parent c692a9f5e3
commit faf4933a02
2 changed files with 11 additions and 1 deletions
+1
View File
@@ -311,6 +311,7 @@ export namespace Website {
email: string;
url: string;
type: string;
keyType: string;
useProxy: boolean;
}
@@ -179,7 +179,7 @@ import { Rules, checkMaxLength } from '@/global/form-rules';
import FileList from '@/components/file-list/index.vue';
import i18n from '@/lang';
import { FormInstance } from 'element-plus';
import { computed, reactive, ref } from 'vue';
import { computed, reactive, ref, watch } from 'vue';
import { MsgSuccess } from '@/utils/message';
import { KeyTypes } from '@/global/mimetype';
import { getDNSName, getAccountName } from '@/utils/ssl';
@@ -265,6 +265,15 @@ const initData = () => ({
const ssl = ref(initData());
const operate = ref('create');
watch([() => ssl.value.acmeAccountId, acmeAccounts], () => {
if (operate.value !== 'create' || ssl.value.provider === 'selfSigned') {
return;
}
const account = acmeAccounts.value?.find((item) => item.id === ssl.value.acmeAccountId);
if (account?.keyType) {
ssl.value.keyType = account.keyType;
}
});
const dnsResolve = ref<Website.DNSResolve[]>([]);
const em = defineEmits(['close', 'submit']);