diff --git a/config/architecture-inventory.json b/config/architecture-inventory.json index a15d82c..8f33db1 100644 --- a/config/architecture-inventory.json +++ b/config/architecture-inventory.json @@ -553,16 +553,16 @@ "bytes": 13681, "lines": 338 }, + { + "path": "frontend/shared/session.js", + "bytes": 13219, + "lines": 289 + }, { "path": "frontend/shared/dashboard.js", "bytes": 12894, "lines": 274 }, - { - "path": "frontend/shared/session.js", - "bytes": 12848, - "lines": 283 - }, { "path": "backend/features/market/insights_auction_data.py", "bytes": 12829, @@ -673,16 +673,16 @@ "bytes": 5451, "lines": 118 }, + { + "path": "frontend/pages.config.js", + "bytes": 5385, + "lines": 130 + }, { "path": "frontend/pages/market/search.js", "bytes": 5384, "lines": 131 }, - { - "path": "frontend/pages.config.js", - "bytes": 5380, - "lines": 130 - }, { "path": "frontend/pages/auction/page.html", "bytes": 5350, diff --git a/frontend/login/index.html b/frontend/login/index.html index c3d1333..32eaf8e 100644 --- a/frontend/login/index.html +++ b/frontend/login/index.html @@ -21,7 +21,7 @@ - + @@ -90,6 +90,6 @@
- + diff --git a/frontend/login/page.js b/frontend/login/page.js index 9c2617e..23af83b 100644 --- a/frontend/login/page.js +++ b/frontend/login/page.js @@ -77,9 +77,22 @@ return chips.join(""); } + function returnPath() { + const raw = new URLSearchParams(global.location.search).get("next") || ""; + if (!raw) return "/"; + try { + const url = new URL(raw, global.location.origin); + if (url.origin !== global.location.origin) return "/"; + const path = url.pathname || "/"; + if (path === "/login" || path.startsWith("/login/")) return "/"; + return `${path}${url.search}${url.hash}` || "/"; + } catch (_error) { + return "/"; + } + } + function enterApp() { - const next = new URLSearchParams(global.location.search).get("next"); - global.location.replace(next && next.startsWith("/") ? next : "/"); + global.location.replace(returnPath()); } function formMarkup(options) { @@ -120,7 +133,7 @@ "login-account-row", current ? "is-current" : "", confirming ? "is-confirming" : "", - !managing && !current ? "is-switchable" : "", + !managing ? "is-switchable" : "", ].filter(Boolean).join(" "); if (managing && confirming) { return [ @@ -138,11 +151,12 @@ const action = managing ? `` : current - ? '' + ? '继续使用' : ""; const switchAttr = !managing && !current ? ` data-switch-id="${account.user_id}"` : ""; + const resumeAttr = !managing && current ? ` data-resume-id="${account.user_id}"` : ""; return [ - `
`, + `
`, ``, '