mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-10-12 08:00:34 +00:00
refactor: refactor website ssl keyType default value (#14023)
This commit is contained in:
@@ -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']);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user