Added pageNamespace hook support

This commit is contained in:
Zef Hemel
2022-05-17 11:53:17 +02:00
parent cd89634fd6
commit 9a6a86f8b5
14 changed files with 302 additions and 15 deletions
+4 -1
View File
@@ -18,6 +18,8 @@ export type ActionButton = {
export type AppViewState = {
currentPage?: string;
perm: "ro" | "rw";
showPageNavigator: boolean;
showCommandPalette: boolean;
unsavedChanges: boolean;
@@ -45,6 +47,7 @@ export type AppViewState = {
};
export const initialViewState: AppViewState = {
perm: "rw",
showPageNavigator: false,
showCommandPalette: false,
unsavedChanges: false,
@@ -68,7 +71,7 @@ export const initialViewState: AppViewState = {
};
export type Action =
| { type: "page-loaded"; name: string }
| { type: "page-loaded"; meta: PageMeta }
| { type: "pages-listed"; pages: Set<PageMeta> }
| { type: "page-changed" }
| { type: "page-saved" }