diff --git a/app/src/routes/system/status/+page.svelte b/app/src/routes/system/status/+page.svelte index a8baff9..e60f77c 100644 --- a/app/src/routes/system/status/+page.svelte +++ b/app/src/routes/system/status/+page.svelte @@ -1,7 +1,7 @@
- +
diff --git a/app/src/routes/system/status/+page.ts b/app/src/routes/system/status/+page.ts index 1412b4e..7a58e83 100644 --- a/app/src/routes/system/status/+page.ts +++ b/app/src/routes/system/status/+page.ts @@ -1,5 +1,5 @@ -import type { PageLoad } from './$types'; +import type { PageLoad } from './$types' export const load = (async () => { - return { title: 'System Status' }; -}) satisfies PageLoad; + return { title: 'System Status' } +}) satisfies PageLoad diff --git a/app/src/routes/system/status/ActionButton.svelte b/app/src/routes/system/status/ActionButton.svelte new file mode 100644 index 0000000..b032f6e --- /dev/null +++ b/app/src/routes/system/status/ActionButton.svelte @@ -0,0 +1,10 @@ + + + diff --git a/app/src/routes/system/status/StatusItem.svelte b/app/src/routes/system/status/StatusItem.svelte new file mode 100644 index 0000000..f3f1f03 --- /dev/null +++ b/app/src/routes/system/status/StatusItem.svelte @@ -0,0 +1,15 @@ + + +
+
+ +
+
+
{title}
+
{description}
+
+
diff --git a/app/src/routes/system/status/SystemStatus.svelte b/app/src/routes/system/status/SystemStatus.svelte index 27c4d0d..3c474ba 100644 --- a/app/src/routes/system/status/SystemStatus.svelte +++ b/app/src/routes/system/status/SystemStatus.svelte @@ -1,327 +1,246 @@ - {#snippet icon()} - - {/snippet} - {#snippet title()} - System Status - {/snippet} + {#snippet icon()} + + {/snippet} + {#snippet title()} + System Status + {/snippet} -
- {#await getSystemStatus()} - - {:then nothing} -
-
-
- -
-
-
Chip
-
- {systemInformation.cpu_type} Rev {systemInformation.cpu_rev} -
-
-
+
+ {#await getSystemStatus()} + + {:then nothing} +
+ -
-
- -
-
-
SDK Version
-
- ESP-IDF {systemInformation.sdk_version} / Arduino {systemInformation.arduino_version} -
-
-
+ -
-
- -
-
-
Firmware Version
-
- {systemInformation.firmware_version} -
-
-
+ -
-
- -
-
-
CPU Frequency
-
- {systemInformation.cpu_freq_mhz} MHz {systemInformation.cpu_cores == 2 ? - 'Dual Core' - : 'Single Core'} -
-
-
+ -
-
- -
-
-
Heap (Free / Max Alloc)
-
- {systemInformation.free_heap.toLocaleString('en-US')} / {systemInformation.max_alloc_heap.toLocaleString( - 'en-US' - )} bytes -
-
-
+ -
-
- -
-
-
PSRAM (Size / Free)
-
- {systemInformation.psram_size.toLocaleString('en-US')} / {systemInformation.psram_size.toLocaleString( - 'en-US' - )} bytes -
-
-
+ -
-
- -
-
-
Sketch (Used / Free)
-
- - {( - (systemInformation.sketch_size / - systemInformation.free_sketch_space) * - 100 - ).toFixed(1)} % of - {(systemInformation.free_sketch_space / 1000000).toLocaleString( - 'en-US' - )} MB used - + - - ({( - (systemInformation.free_sketch_space - - systemInformation.sketch_size) / - 1000000 - ).toLocaleString('en-US')} MB free) - -
-
-
+ -
-
- -
-
-
Flash Chip (Size / Speed)
-
- {(systemInformation.flash_chip_size / 1000000).toLocaleString('en-US')} MB - / {(systemInformation.flash_chip_speed / 1000000).toLocaleString( - 'en-US' - )} MHz -
-
-
+ -
-
- -
-
-
File System (Used / Total)
-
- {( - (systemInformation.fs_used / systemInformation.fs_total) * - 100 - ).toFixed(1)} % of {( - systemInformation.fs_total / 1000000 - ).toLocaleString('en-US')} MB used + - ({( - (systemInformation.fs_total - systemInformation.fs_used) / - 1000000 - ).toLocaleString('en-US')} - MB free) -
-
-
+ -
-
- -
-
-
Core Temperature
-
- {systemInformation.core_temp == 53.33 ? - 'NaN' - : systemInformation.core_temp.toFixed(2) + ' °C'} -
-
-
+ +
+ {/await} +
-
-
- -
-
-
Uptime
-
- {convertSeconds(systemInformation.uptime)} -
-
-
- -
-
- -
-
-
Reset Reason
-
- {systemInformation.cpu_reset_reason} -
-
-
-
- {/await} -
- -
- {#if $features.sleep} - - {/if} - - -
+
+ {#each actionButtons as button} + {#if button.condition === undefined || button.condition()} + + {/if} + {/each} +