From 123cbf1dbb6908c3825b859b6e51adf2de32f34b Mon Sep 17 00:00:00 2001 From: MangoFanFanw Date: Tue, 28 Apr 2026 20:03:22 +0800 Subject: [PATCH] =?UTF-8?q?WebUI=20=E6=9B=B4=E6=96=B0=E8=87=B3=201.1.0=20?= =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 移除重启和关闭 Suan API 的按钮,因为按照目前的设计,这在技术上难以实现。 2. 增加 FastAPI docs 的配置选项。 --- webui/components.d.ts | 2 ++ webui/package.json | 2 +- webui/src/App.vue | 10 ++++++- webui/src/pages/Config.vue | 60 +++++++++++++++++++++++++++++--------- webui/src/types/config.ts | 1 + 5 files changed, 59 insertions(+), 16 deletions(-) diff --git a/webui/components.d.ts b/webui/components.d.ts index 89524f4..5a29d9a 100644 --- a/webui/components.d.ts +++ b/webui/components.d.ts @@ -38,6 +38,7 @@ declare module 'vue' { NSwitch: typeof import('naive-ui')['NSwitch'] NTag: typeof import('naive-ui')['NTag'] NText: typeof import('naive-ui')['NText'] + NTooltip: typeof import('naive-ui')['NTooltip'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] } @@ -71,6 +72,7 @@ declare global { const NSwitch: typeof import('naive-ui')['NSwitch'] const NTag: typeof import('naive-ui')['NTag'] const NText: typeof import('naive-ui')['NText'] + const NTooltip: typeof import('naive-ui')['NTooltip'] const RouterLink: typeof import('vue-router')['RouterLink'] const RouterView: typeof import('vue-router')['RouterView'] } \ No newline at end of file diff --git a/webui/package.json b/webui/package.json index b0017ec..7404b06 100644 --- a/webui/package.json +++ b/webui/package.json @@ -1,6 +1,6 @@ { "name": "webui", - "version": "1.0.0", + "version": "1.1.0", "private": true, "type": "module", "scripts": { diff --git a/webui/src/App.vue b/webui/src/App.vue index 56eff99..7a379e4 100644 --- a/webui/src/App.vue +++ b/webui/src/App.vue @@ -54,6 +54,7 @@ onMounted(async () => {
+
@@ -107,13 +108,20 @@ onMounted(async () => { #center-content { flex: 1; min-height: 0; + display: flex; + flex-direction: column; + + #extra-control { + flex: 0; + } #content-container { border: 1px solid #519f72; border-radius: 10px; padding: 10px; - height: 100%; overflow: auto; + height: 100%; + flex: 1; } } } diff --git a/webui/src/pages/Config.vue b/webui/src/pages/Config.vue index 4499334..feea52d 100644 --- a/webui/src/pages/Config.vue +++ b/webui/src/pages/Config.vue @@ -38,13 +38,6 @@ function varTag(code: string, description: string) { - + diff --git a/webui/src/types/config.ts b/webui/src/types/config.ts index 755caca..fafb134 100644 --- a/webui/src/types/config.ts +++ b/webui/src/types/config.ts @@ -3,6 +3,7 @@ export interface ConfigSystemDto { port?: number reload?: boolean public_host?: string + docs?: boolean } export interface ConfigScheduleDto {