@@ -6,8 +6,6 @@ const text = isEnglish
66 ? {
77 title : "OpenAI subscription login" ,
88 intro : "Authorize with a ChatGPT device code. Credentials stay on the AstrBot server." ,
9- warning :
10- "This Dashboard is using plain HTTP. The Dashboard session may be intercepted; HTTPS, a VPN, or an SSH tunnel is recommended." ,
119 accountTitle : "Account status" ,
1210 checkUsage : "Check quota" ,
1311 checkingUsage : "Checking quota…" ,
@@ -49,8 +47,6 @@ const text = isEnglish
4947 : {
5048 title : "OpenAI 订阅登录" ,
5149 intro : "使用 ChatGPT 设备码完成授权,凭据会由 AstrBot 服务端保存。" ,
52- warning :
53- "当前 Dashboard 使用明文 HTTP,会话可能被网络窃听;建议为整个 Dashboard 使用 HTTPS、VPN 或 SSH 隧道。" ,
5450 accountTitle : "账号状态" ,
5551 checkUsage : "查询额度" ,
5652 checkingUsage : "正在查询额度……" ,
@@ -123,12 +119,6 @@ usageButton.textContent = text.checkUsage;
123119startButton . textContent = text . start ;
124120cancelButton . textContent = text . cancel ;
125121
126- if ( window . location . protocol === "http:" ) {
127- const warning = byId ( "transport-warning" ) ;
128- warning . hidden = false ;
129- warning . querySelector ( "span" ) . textContent = text . warning ;
130- }
131-
132122function setStatus ( message ) {
133123 status . textContent = message ;
134124 error . hidden = true ;
@@ -171,7 +161,11 @@ function formatReset(timestamp) {
171161 if ( ! Number . isFinite ( value ) || value <= 0 ) {
172162 return "" ;
173163 }
174- return ` · ${ text . reset } ${ new Date ( value * 1000 ) . toLocaleString ( ) } ` ;
164+ const date = new Date ( value * 1000 ) ;
165+ if ( isEnglish ) {
166+ return ` · ${ text . reset } ${ date . toLocaleString ( ) } ` ;
167+ }
168+ return ` · 将于 ${ date . toLocaleString ( "zh-CN" , { hour12 : false } ) } 重置` ;
175169}
176170
177171function renderAccountStatus ( result ) {
0 commit comments