chore: enable WebUI ESLint

This commit is contained in:
Stellar鱼
2026-05-26 17:12:13 +08:00
committed by Xubin Ren
parent a4a2c55120
commit 1eddc129a1
6 changed files with 1257 additions and 42 deletions
+8 -8
View File
@@ -164,8 +164,7 @@ export default function App() {
if (cancelled) return;
if (secret) saveSecret(secret);
const url = deriveWsUrl(boot.ws_path, boot.token);
let client: NanobotClient;
client = new NanobotClient({
const client = new NanobotClient({
url,
onReauth: async () => {
try {
@@ -663,12 +662,13 @@ function Shell({
useEffect(() => {
return client.onStatus((status) => {
let startedAt = 0;
try {
startedAt = Number(window.localStorage.getItem(RESTART_STARTED_KEY) ?? "0");
} catch {
startedAt = 0;
}
const startedAt = (() => {
try {
return Number(window.localStorage.getItem(RESTART_STARTED_KEY) ?? "0");
} catch {
return 0;
}
})();
if (!startedAt) return;
if (status !== "open") {
restartSawDisconnectRef.current = true;