Introduce creative landing page and workspace with focused editor layouts
This commit is contained in:
@@ -24,14 +24,14 @@ function localNext(value: string | string[] | undefined) {
|
||||
value.startsWith("//") ||
|
||||
/[\\\u0000-\u001f]/.test(value)
|
||||
)
|
||||
return "/write";
|
||||
return "/workspace";
|
||||
try {
|
||||
const url = new URL(value, "https://local.invalid");
|
||||
return url.origin === "https://local.invalid"
|
||||
? url.pathname + url.search + url.hash
|
||||
: "/write";
|
||||
: "/workspace";
|
||||
} catch {
|
||||
return "/write";
|
||||
return "/workspace";
|
||||
}
|
||||
}
|
||||
export default function AccountPage() {
|
||||
@@ -93,6 +93,7 @@ function AccountContent() {
|
||||
"如果信息符合条件,验证邮件已发送。请检查收件箱和垃圾邮件。",
|
||||
});
|
||||
await account.refresh();
|
||||
if (name === "login") await router.push(localNext(router.query.next));
|
||||
} catch (e) {
|
||||
setFeedback({
|
||||
tone: "error",
|
||||
|
||||
Reference in New Issue
Block a user