From 8969fb7cb6608c98a8f2bffab12c09ef570d5782 Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Sun, 9 Nov 2025 16:42:03 +0800 Subject: [PATCH] =?UTF-8?q?ui:=20=E7=AC=BC=E7=BB=9F=E7=9A=84=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/ui/snackbar.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/ui/snackbar.ts b/client/ui/snackbar.ts index ee583be..e8db54e 100644 --- a/client/ui/snackbar.ts +++ b/client/ui/snackbar.ts @@ -86,7 +86,10 @@ interface SnackbarOptions extends Options { export function checkApiSuccessOrSncakbar(re: ApiCallbackMessage, msg_ahead: string, opinions_override: Options = {}): Snackbar | null { return re.code != 200 ? snackbar( Object.assign({ - message: `${msg_ahead}: ${re.msg} [${re.code}]`, + message: `${msg_ahead}: ${re.msg.indexOf("Failed to fetch") != -1 + ? "HTTP 请求失败" + : re.msg + } [${re.code}]`, placement: "top", } as SnackbarOptions, opinions_override) ) : null