This commit is contained in:
Rizky 2024-05-15 10:54:29 +07:00
parent 3245c0cb5a
commit e86340f9fd
9 changed files with 18 additions and 17 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -91,7 +91,18 @@ export default page({
return <Loading note="connecting-ws" />;
}
} else {
navSitePage(p);
if (!validate(params.site_id)) {
const last_open_str = localStorage.getItem("prasi-last-open");
try {
const last_open = JSON.parse(last_open_str || "");
if (last_open.site_id && last_open.page_id) {
navigate(`/ed/${last_open.site_id}/${last_open.page_id}`);
}
} catch (e) {}
} else {
navSitePage(p);
}
return <Loading note="finding-page" />;
}
@ -100,16 +111,6 @@ export default page({
});
const navSitePage = async (p: PG) => {
const last_open_str = localStorage.getItem("prasi-last-open");
try {
const last_open = JSON.parse(last_open_str || "");
if (last_open.site_id && last_open.page_id) {
navigate(`/ed/${last_open.site_id}/${last_open.page_id}`);
return;
}
} catch (e) {}
loadSession(p);
const e = await _db.page.findFirst({
where: {

View File

@ -373,7 +373,7 @@ export const EdSidePropInstance: FC<{ meta: IMeta }> = ({ meta }) => {
mprop={mprop}
name={name}
comp_id={comp_id}
label={cprop.label}
label={label}
labelClick={labelClick}
onEditCode={createEditScript(
p,