feat(account): polish reviews favorites and account UI

This commit is contained in:
2026-05-29 21:34:42 +08:00
parent abeb511c06
commit 439af8c26f
40 changed files with 3158 additions and 250 deletions
+26
View File
@@ -0,0 +1,26 @@
export const FALLBACK_ACCOUNT_CENTER_URL =
"https://account.spark-app.store/account";
export const buildAccountFrameUrl = (
baseUrl: string,
username: string,
): string => {
let url: URL;
try {
url = new URL(baseUrl);
} catch {
url = new URL(FALLBACK_ACCOUNT_CENTER_URL);
}
if (url.protocol !== "http:" && url.protocol !== "https:") {
url = new URL(FALLBACK_ACCOUNT_CENTER_URL);
}
const allowedParams = new URLSearchParams();
allowedParams.set("view", "management");
allowedParams.set("user", username);
url.search = allowedParams.toString();
return url.toString();
};