Navigator refactor (#648)

Navigation refactor
This commit is contained in:
Zef Hemel
2024-01-24 11:58:33 +01:00
committed by GitHub
parent 9fa52e43e0
commit aaacec6d61
25 changed files with 360 additions and 263 deletions
+3 -3
View File
@@ -1,4 +1,5 @@
import type { FilterOption } from "../../web/types.ts";
import { PageRef } from "$sb/lib/page.ts";
import { UploadFile } from "../types.ts";
import { syscall } from "./syscall.ts";
@@ -31,12 +32,11 @@ export function save(): Promise<void> {
}
export function navigate(
name: string,
pos?: string | number,
pageRef: PageRef,
replaceState = false,
newWindow = false,
): Promise<void> {
return syscall("editor.navigate", name, pos, replaceState, newWindow);
return syscall("editor.navigate", pageRef, replaceState, newWindow);
}
export function openPageNavigator(