This commit is contained in:
Rizky 2024-07-27 14:08:54 +07:00
parent 70d650b4c4
commit 2e1618721f
3 changed files with 16 additions and 1 deletions

View File

@ -86,6 +86,8 @@ export const loadCompSnapshot = async (
if (res) { if (res) {
if (res.sv === res.diff && (res.sv as any) === "not-found") { if (res.sv === res.diff && (res.sv as any) === "not-found") {
console.warn("reload 5");
//location.reload();(); //location.reload();();
} }

View File

@ -81,6 +81,7 @@ export const reloadLayout = async (p: PG, layout_id: string, note: string) => {
if (res) { if (res) {
if (res.sv === res.diff && (res.sv as any) === "not-found") { if (res.sv === res.diff && (res.sv as any) === "not-found") {
console.warn("reload 1");
//location.reload();(); //location.reload();();
} }
@ -185,6 +186,8 @@ export const reloadPage = async (
if (page.page.id !== remotePage.id) { if (page.page.id !== remotePage.id) {
alert("Page ID Mismatch!\n Refreshing to preventing data loss..."); alert("Page ID Mismatch!\n Refreshing to preventing data loss...");
console.warn("reload 2");
//location.reload();(); //location.reload();();
return; return;
} }
@ -200,6 +203,8 @@ export const reloadPage = async (
if (res) { if (res) {
if (res.sv === res.diff && (res.sv as any) === "not-found") { if (res.sv === res.diff && (res.sv as any) === "not-found") {
console.warn("reload 3");
//location.reload();(); //location.reload();();
} }
@ -248,6 +253,8 @@ export const reloadPage = async (
p.sync.code p.sync.code
.action({ type: "flush-page-cache", page_id: page_id }) .action({ type: "flush-page-cache", page_id: page_id })
.then(() => { .then(() => {
console.warn("reload 4");
//location.reload();(); //location.reload();();
}); });
} }

View File

@ -92,6 +92,8 @@ export const EdApiDB = ({
localStorage.removeItem(`schema-md-${p.site.id}`); localStorage.removeItem(`schema-md-${p.site.id}`);
_api.clear_route_cache(p.site.id); _api.clear_route_cache(p.site.id);
console.warn("reload 6");
//location.reload();(); //location.reload();();
}} }}
> >
@ -114,6 +116,8 @@ export const EdApiDB = ({
localStorage.removeItem(`schema-md-${p.site.id}`); localStorage.removeItem(`schema-md-${p.site.id}`);
_api.clear_route_cache(p.site.id); _api.clear_route_cache(p.site.id);
console.warn("reload 7");
//location.reload();(); //location.reload();();
}} }}
> >
@ -135,6 +139,8 @@ export const EdApiDB = ({
render(); render();
alert("RESTART: OK"); alert("RESTART: OK");
_api.clear_route_cache(p.site.id); _api.clear_route_cache(p.site.id);
console.warn("reload 8");
//location.reload();(); //location.reload();();
}} }}
> >