From a4e6e16fd80b5a03a8bc6cda56a2eada2c65d990 Mon Sep 17 00:00:00 2001 From: LIghtJUNction Date: Thu, 19 Mar 2026 20:35:32 +0800 Subject: [PATCH] fix: surface https backend requirement in dashboard (#6623) * fix: surface https backend requirement in dashboard * Update dashboard/src/stores/api.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- astrbot/dashboard/server.py | 7 +- dashboard/src/main.ts | 2 +- dashboard/src/views/Settings.vue | 128 +++++------------- dashboard/src/views/WelcomePage.vue | 96 ++++--------- .../views/authentication/auth/LoginPage.vue | 84 +++++------- 5 files changed, 103 insertions(+), 214 deletions(-) diff --git a/astrbot/dashboard/server.py b/astrbot/dashboard/server.py index eef3f37b1..91092a237 100644 --- a/astrbot/dashboard/server.py +++ b/astrbot/dashboard/server.py @@ -172,7 +172,12 @@ class AstrBotDashboard: self.app = cors( self.app, allow_origin="*", - allow_headers=["Authorization", "Content-Type", "X-API-Key"], + allow_headers=[ + "Authorization", + "Content-Type", + "X-API-Key", + "Accept-Language", + ], allow_methods=["GET", "POST", "PUT", "DELETE", "OPTIONS"], ) diff --git a/dashboard/src/main.ts b/dashboard/src/main.ts index 5f7e44991..2d7b64e82 100644 --- a/dashboard/src/main.ts +++ b/dashboard/src/main.ts @@ -103,7 +103,7 @@ async function initApp() { const headers = new Headers( init?.headers || (typeof input !== "string" && "headers" in input - ? (input ).headers + ? input.headers : undefined), ); if (token && !headers.has("Authorization")) { diff --git a/dashboard/src/views/Settings.vue b/dashboard/src/views/Settings.vue index efb94c949..04aba2694 100644 --- a/dashboard/src/views/Settings.vue +++ b/dashboard/src/views/Settings.vue @@ -3,10 +3,7 @@ - + {{ tm("network.title") }} - - mdi-help-circle-outline - + mdi-help-circle-outline {{ tm("apiKey.docsLink") }} - - + + - + - - + + {{ tm("apiKey.permanentWarning") }} - + - - mdi-key-plus - + mdi-key-plus {{ tm("apiKey.create") }} @@ -219,10 +192,7 @@
{{ tm("apiKey.scopes") }}
- +
- - + +
{{ tm("apiKey.plaintextHint") }} - - mdi-content-copy - {{ tm("apiKey.copy") }} + mdi-content-copy {{ tm("apiKey.copy") }}
{{ @@ -280,10 +243,7 @@ - + {{ item.name }} {{ item.key_prefix }} @@ -328,10 +288,7 @@ - + {{ tm("apiKey.empty") }} @@ -345,11 +302,7 @@ :subtitle="tm('system.migration.subtitle')" :title="tm('system.migration.title')" > - + {{ tm("system.migration.button") }}
@@ -371,14 +324,8 @@ >