Minor page load fixes
This commit is contained in:
+12
-5
@@ -764,11 +764,18 @@ export class Client {
|
||||
meta: { name: pageName, lastModified: 0, perm: "rw" } as PageMeta,
|
||||
};
|
||||
} else {
|
||||
console.error("Could not load page", pageName, e);
|
||||
doc = {
|
||||
text: `**ERROR**: ${e.message}`,
|
||||
meta: { name: pageName, lastModified: 0, perm: "ro" } as PageMeta,
|
||||
};
|
||||
this.flashNotification(
|
||||
`Could not load page ${pageName}: ${e.message}`,
|
||||
"error",
|
||||
);
|
||||
if (previousPage) {
|
||||
this.ui.viewDispatch({
|
||||
type: "page-loading",
|
||||
name: previousPage,
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import {
|
||||
import type { Client } from "./client.ts";
|
||||
import { Panel } from "./components/panel.tsx";
|
||||
import { h } from "./deps.ts";
|
||||
import { async } from "https://cdn.skypack.dev/-/regenerator-runtime@v0.13.9-4Dxus9nU31cBsHxnWq2H/dist=es2020,mode=imports/optimized/regenerator-runtime.js";
|
||||
import { sleep } from "$sb/lib/async.ts";
|
||||
|
||||
export class MainUI {
|
||||
|
||||
Reference in New Issue
Block a user