Show one directory at a time and let the app load each directory

The browser no longer takes a nested tree. The app sets path and the
current directory's entries; selecting a directory or .. emits
octopus:navigate with the requested path for the app to load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-23 18:11:53 -07:00
co-authored by Claude Opus 5.5
parent 05db10911a
commit 13e2654415
7 changed files with 42 additions and 51 deletions
+2 -5
View File
@@ -6,7 +6,6 @@ export interface OctopusEntry {
size?: number;
modified?: OctopusDate;
icon?: string;
children?: OctopusEntry[];
}
export interface OctopusOpenDetail {
@@ -15,7 +14,6 @@ export interface OctopusOpenDetail {
}
export interface OctopusNavigateDetail {
entries: OctopusEntry[];
path: string[];
}
@@ -26,8 +24,7 @@ export interface OctopusFileBrowserEventMap {
export class OctopusFileBrowser extends HTMLElement {
entries: OctopusEntry[];
readonly path: string[];
navigate(path?: string[]): void;
path: string[];
addEventListener<K extends keyof OctopusFileBrowserEventMap>(
type: K,
listener: (this: OctopusFileBrowser, event: OctopusFileBrowserEventMap[K]) => void,
@@ -42,7 +39,7 @@ export class OctopusFileBrowser extends HTMLElement {
export function createOctopusFileBrowser(
target: Element,
options?: { entries?: OctopusEntry[]; emptyLabel?: string },
options?: { entries?: OctopusEntry[]; path?: string[]; emptyLabel?: string },
): OctopusFileBrowser;
export function fileKindLabel(name?: string): string;