diff --git a/app/src/lib/models.ts b/app/src/lib/models.ts index 8c07c32..0a22098 100644 --- a/app/src/lib/models.ts +++ b/app/src/lib/models.ts @@ -180,4 +180,10 @@ export type servo = { // max_pwm: number; // min_angle: number; // max_angle: number; -}; \ No newline at end of file +}; + +export type File = number; + +export interface Directory { + [key: string]: File | Directory; +} \ No newline at end of file diff --git a/app/src/routes/system/filesystem/File.svelte b/app/src/routes/system/filesystem/File.svelte index e72d78a..7fcb312 100644 --- a/app/src/routes/system/filesystem/File.svelte +++ b/app/src/routes/system/filesystem/File.svelte @@ -1,7 +1,18 @@ -{name} + + + + {name} + diff --git a/app/src/routes/system/filesystem/FileSystem.svelte b/app/src/routes/system/filesystem/FileSystem.svelte index b353d28..20ace7f 100644 --- a/app/src/routes/system/filesystem/FileSystem.svelte +++ b/app/src/routes/system/filesystem/FileSystem.svelte @@ -1,16 +1,33 @@ - @@ -19,7 +36,15 @@ {#await getFiles()} {:then files} - + + {/await} + + {#await getContent(filename)} +
+ +
+ {:then content} +
{content}
{/await}
\ No newline at end of file diff --git a/app/src/routes/system/filesystem/Folder.svelte b/app/src/routes/system/filesystem/Folder.svelte index dc6f1ad..8e15b3c 100644 --- a/app/src/routes/system/filesystem/Folder.svelte +++ b/app/src/routes/system/filesystem/Folder.svelte @@ -1,7 +1,8 @@ -