feat: 修改主机额外配置.

This commit is contained in:
lijiahang
2023-12-25 19:03:24 +08:00
parent b2a697f6ba
commit f7cbd7b507
34 changed files with 321 additions and 59 deletions

View File

@@ -256,10 +256,10 @@
const localeRef = ref();
// 打开应用设置
const openAppSetting = inject(openAppSettingKey) as () => void;
const openAppSetting = inject<() => void>(openAppSettingKey);
// 注入收缩菜单
const toggleDrawerMenu = inject(toggleDrawerMenuKey) as () => void;
const toggleDrawerMenu = inject<() => void>(toggleDrawerMenuKey);
// 切换主题
const handleToggleTheme = () => {

View File

@@ -20,6 +20,7 @@
const props = defineProps({
modelValue: Number,
authorized: Boolean
});
const emits = defineEmits(['update:modelValue']);
@@ -45,7 +46,9 @@
onBeforeMount(async () => {
setLoading(true);
try {
const hostIdentities = await cacheStore.loadHostIdentities();
const hostIdentities = props.authorized
? await cacheStore.loadAuthorizedHostIdentities()
: await cacheStore.loadHostIdentities();
optionData.value = hostIdentities.map(s => {
return {
label: `${s.name} (${s.username})`,

View File

@@ -20,6 +20,7 @@
const props = defineProps({
modelValue: Number,
authorized: Boolean
});
const emits = defineEmits(['update:modelValue']);
@@ -45,7 +46,9 @@
onBeforeMount(async () => {
setLoading(true);
try {
const hostKeys = await cacheStore.loadHostKeys();
const hostKeys = props.authorized
? await cacheStore.loadAuthorizedHostKeys()
: await cacheStore.loadHostKeys();
optionData.value = hostKeys.map(s => {
return {
label: s.name,

View File

@@ -12,7 +12,7 @@
:cancel-button-props="{ disabled: loading }"
:on-before-ok="handlerOk"
@close="handleClose">
<a-spin :loading="loading">
<a-spin class="full" :loading="loading">
<a-form :model="formModel"
ref="formRef"
label-align="right"