perf: 优化部分 UI 显示
Some checks are pending
Build Dev Image / build-dev-image (push) Waiting to run

This commit is contained in:
Junyan Qin 2024-11-12 18:57:43 +08:00
parent eabdda5eb1
commit e0d9a295ab
No known key found for this signature in database
GPG Key ID: 22FE3AFADC710CEB
2 changed files with 9 additions and 4 deletions

View File

@ -6,7 +6,7 @@
<div id="operation-btns">
<v-tooltip text="设置插件优先级" location="top">
<template v-slot:activator="{ props }">
<v-btn prepend-icon="mdi-priority-high" v-bind="props">
<v-btn prepend-icon="mdi-priority-high" v-bind="props" :disabled="plugins.length == 0">
编排
<v-dialog activator="parent" max-width="500" persistent v-model="isOrchestrationDialogActive">
@ -79,7 +79,8 @@
</div>
</v-card>
<div class="plugins-container">
<PluginCard class="plugin-card" v-for="plugin in plugins" :key="plugin.name" :plugin="plugin"
<v-alert id="no-plugins-alert" v-if="plugins.length == 0" color="warning" icon="$warning" title="暂无插件" text="暂无已安装的插件,请安装插件" density="compact" style="margin-inline: 1rem;"></v-alert>
<PluginCard class="plugin-card" v-if="plugins.length > 0" v-for="plugin in plugins" :key="plugin.name" :plugin="plugin"
@toggle="togglePlugin" @update="updatePlugin" @remove="removePlugin" />
</div>
</template>
@ -240,6 +241,10 @@ const installDialogSource = ref('')
margin-inline: 1rem;
}
#no-plugins-alert {
margin: 1rem;
}
.plugin-card {
width: 18rem;
height: 8rem;
@ -298,4 +303,4 @@ const installDialogSource = ref('')
flex-direction: column;
gap: 1rem;
}
</style>
</style>

View File

@ -72,7 +72,7 @@ import Vjsf from '@koumoul/vjsf';
const { proxy } = getCurrentInstance()
const managerList = ref([])
const configType = ref('json') // ui or json
const configType = ref('') // ui or json
const currentManager = ref(null)
const currentManagerName = ref('')
const currentManagerDocLink = ref('')