From c909ec9ee470c712fb1aff96d350d886471a32cf Mon Sep 17 00:00:00 2001 From: Abdenasser Date: Wed, 13 Nov 2024 16:58:53 +0100 Subject: [PATCH] big mess --- src/lib/components/AppInfo.svelte | 19 +- src/lib/components/ThemeSwitcher.svelte | 45 +-- src/lib/components/index.ts | 7 + .../components/modals/KillProcessModal.svelte | 2 +- .../modals/ProcessDetailsModal.svelte | 20 +- src/lib/components/process/ProcessRow.svelte | 4 +- .../components/process/ProcessTable.svelte | 4 +- src/lib/components/stats/CpuPanel.svelte | 3 +- src/lib/components/stats/MemoryPanel.svelte | 4 +- src/lib/components/stats/NetworkPanel.svelte | 17 +- src/lib/components/stats/ProgressBar.svelte | 2 +- src/lib/components/stats/StatsBar.svelte | 12 +- src/lib/components/stats/StoragePanel.svelte | 18 +- src/lib/components/stats/SystemPanel.svelte | 3 +- .../components/toolbar/ColumnToggle.svelte | 7 +- .../toolbar/PaginationControls.svelte | 13 +- .../components/toolbar/RefreshControls.svelte | 20 +- .../components/toolbar/StatusFilter.svelte | 20 +- src/lib/components/toolbar/ToolBar.svelte | 4 +- src/lib/constants/index.ts | 71 +++++ src/lib/constants/toolbar.ts | 9 - src/lib/definitions/columns.ts | 61 ++++ src/lib/definitions/index.ts | 3 + .../config.ts => definitions/settings.ts} | 11 +- .../index.ts => definitions/themes.ts} | 28 +- src/lib/stores/index.ts | 61 +--- src/lib/stores/processes.ts | 186 +++++++++++ src/lib/stores/{config.ts => settings.ts} | 8 +- src/lib/stores/theme.ts | 58 ++++ src/lib/types/index.ts | 73 +++++ src/lib/types/toolbar.ts | 28 -- src/lib/utils/index.ts | 110 +++++-- src/routes/+page.svelte | 294 ++++-------------- 33 files changed, 650 insertions(+), 575 deletions(-) create mode 100644 src/lib/components/index.ts create mode 100644 src/lib/constants/index.ts delete mode 100644 src/lib/constants/toolbar.ts create mode 100644 src/lib/definitions/columns.ts create mode 100644 src/lib/definitions/index.ts rename src/lib/{types/config.ts => definitions/settings.ts} (72%) rename src/lib/{styles/index.ts => definitions/themes.ts} (97%) create mode 100644 src/lib/stores/processes.ts rename src/lib/stores/{config.ts => settings.ts} (82%) create mode 100644 src/lib/stores/theme.ts delete mode 100644 src/lib/types/toolbar.ts diff --git a/src/lib/components/AppInfo.svelte b/src/lib/components/AppInfo.svelte index 9a4f77d..8fac7f6 100644 --- a/src/lib/components/AppInfo.svelte +++ b/src/lib/components/AppInfo.svelte @@ -1,31 +1,16 @@ @@ -54,9 +42,7 @@
Status: - - {@html formatStatus(currentProcess.status)} - + {currentProcess.status}
diff --git a/src/lib/components/process/ProcessRow.svelte b/src/lib/components/process/ProcessRow.svelte index 07ea55b..1f60e0e 100644 --- a/src/lib/components/process/ProcessRow.svelte +++ b/src/lib/components/process/ProcessRow.svelte @@ -1,11 +1,9 @@
diff --git a/src/lib/components/stats/ProgressBar.svelte b/src/lib/components/stats/ProgressBar.svelte index 0834121..830d21d 100644 --- a/src/lib/components/stats/ProgressBar.svelte +++ b/src/lib/components/stats/ProgressBar.svelte @@ -21,7 +21,7 @@
+ >
{Math.round(value)}% diff --git a/src/lib/components/stats/StatsBar.svelte b/src/lib/components/stats/StatsBar.svelte index 949d770..b4fa191 100644 --- a/src/lib/components/stats/StatsBar.svelte +++ b/src/lib/components/stats/StatsBar.svelte @@ -1,10 +1,12 @@ diff --git a/src/lib/components/stats/StoragePanel.svelte b/src/lib/components/stats/StoragePanel.svelte index cf1fae1..9ed0431 100644 --- a/src/lib/components/stats/StoragePanel.svelte +++ b/src/lib/components/stats/StoragePanel.svelte @@ -1,26 +1,12 @@ diff --git a/src/lib/components/stats/SystemPanel.svelte b/src/lib/components/stats/SystemPanel.svelte index d8faf32..b5fd204 100644 --- a/src/lib/components/stats/SystemPanel.svelte +++ b/src/lib/components/stats/SystemPanel.svelte @@ -1,7 +1,6 @@