redirect to ed
This commit is contained in:
parent
22d6821986
commit
b0608a1bec
|
|
@ -19,7 +19,7 @@ export default page({
|
||||||
} else if (location.pathname.startsWith("/editor")) {
|
} else if (location.pathname.startsWith("/editor")) {
|
||||||
const arr = location.pathname.split("/");
|
const arr = location.pathname.split("/");
|
||||||
if (arr.length <= 2) {
|
if (arr.length <= 2) {
|
||||||
navigate("/editor/_/_");
|
navigate("/ed/_/_");
|
||||||
} else if (arr.length === 3) {
|
} else if (arr.length === 3) {
|
||||||
navigate(location.pathname + "/");
|
navigate(location.pathname + "/");
|
||||||
}
|
}
|
||||||
|
|
@ -27,7 +27,7 @@ export default page({
|
||||||
if (isLocalhost()) {
|
if (isLocalhost()) {
|
||||||
navigate("/ed");
|
navigate("/ed");
|
||||||
} else {
|
} else {
|
||||||
navigate("/editor/_/_");
|
navigate("/ed/_/_");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ export default page({
|
||||||
navigate(rto);
|
navigate(rto);
|
||||||
} else {
|
} else {
|
||||||
localStorage.setItem("prasi-session", JSON.stringify(s));
|
localStorage.setItem("prasi-session", JSON.stringify(s));
|
||||||
navigate("/editor/");
|
navigate("/ed/");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
form.init = true;
|
form.init = true;
|
||||||
|
|
@ -60,7 +60,7 @@ export default page({
|
||||||
if (location.href.includes("localhost")) {
|
if (location.href.includes("localhost")) {
|
||||||
navigate("/ed");
|
navigate("/ed");
|
||||||
} else {
|
} else {
|
||||||
navigate("/editor");
|
navigate("/ed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ export default page({
|
||||||
const s = await api.session();
|
const s = await api.session();
|
||||||
|
|
||||||
if (s && s.id) {
|
if (s && s.id) {
|
||||||
navigate("/editor");
|
navigate("/ed");
|
||||||
} else {
|
} else {
|
||||||
form.init = true;
|
form.init = true;
|
||||||
form.render();
|
form.render();
|
||||||
|
|
@ -47,7 +47,7 @@ export default page({
|
||||||
form.render();
|
form.render();
|
||||||
alert(s.reason);
|
alert(s.reason);
|
||||||
} else {
|
} else {
|
||||||
navigate("/editor");
|
navigate("/ed");
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
className={cx("border-[3px] border-black", formStyle)}
|
className={cx("border-[3px] border-black", formStyle)}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue