From de98f95ea0ea628f6f733f903761bca5a5ffd254 Mon Sep 17 00:00:00 2001 From: Zhang Jianbin <1257817341@qq.com> Date: Sun, 27 Apr 2025 17:47:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=A8=E6=88=B7=E8=AE=A4?= =?UTF-8?q?=E8=AF=81=E9=94=99=E8=AF=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webview-ui/src/components/account/AccountView.tsx | 6 +++--- webview-ui/src/components/settings/SSYModelPicker.tsx | 2 +- webview-ui/src/context/SsyAuthContext.tsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/webview-ui/src/components/account/AccountView.tsx b/webview-ui/src/components/account/AccountView.tsx index 59c1db9e..35641f88 100644 --- a/webview-ui/src/components/account/AccountView.tsx +++ b/webview-ui/src/components/account/AccountView.tsx @@ -223,7 +223,7 @@ export const SSYAccountView = () => { } return (
- {user ? ( + {user && user.Wallet ? (
@@ -274,7 +274,7 @@ export const SSYAccountView = () => { ) : ( <> $ - + {

注册一个帐户以访问最新型号,注册账单仪表板以查看使用情况和积分, 以及更多即将推出的功能。

- 注册 Cline + 注册 / 登录 Cline

继续即表示您同意 服务条款 和{" "} diff --git a/webview-ui/src/components/settings/SSYModelPicker.tsx b/webview-ui/src/components/settings/SSYModelPicker.tsx index bd301114..bad89509 100644 --- a/webview-ui/src/components/settings/SSYModelPicker.tsx +++ b/webview-ui/src/components/settings/SSYModelPicker.tsx @@ -161,7 +161,7 @@ const SSYModelPicker: React.FC = ({ isPopup }) => { { handleModelChange((e.target as HTMLInputElement)?.value?.toLowerCase()) diff --git a/webview-ui/src/context/SsyAuthContext.tsx b/webview-ui/src/context/SsyAuthContext.tsx index dfc52e99..287298a4 100644 --- a/webview-ui/src/context/SsyAuthContext.tsx +++ b/webview-ui/src/context/SsyAuthContext.tsx @@ -29,7 +29,7 @@ export const SsyAuthProvider: React.FC<{ children: React.ReactNode }> = ({ child } const uri = "https://api.shengsuanyun.com/user/info" const res = await axios.get(uri, reqConfig) - if (!res.data || !res.data.data) { + if (!res.data || !res.data.data || res.data.code != 0) { throw new Error(`Invalid response from ${uri} API`) } const usi = { @@ -42,7 +42,7 @@ export const SsyAuthProvider: React.FC<{ children: React.ReactNode }> = ({ child } setUser(usi) setIsInitialized(true) - console.log("onAuthStateChanged user", usi) + console.log("SsyAuthProvider onAuthStateChanged user", usi) vscode.postMessage({ type: "authStateChanged", userSSY: usi,