From 169ecf57738e431ce30a20e5b10a94a4625dadba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxi=20Quo=C3=9F?= Date: Thu, 30 Jan 2025 18:52:50 +0100 Subject: [PATCH] fix: update components to comply with daiysUI v5 --- frontend/src/lib/components/DeviceCard.svelte | 2 +- .../src/lib/components/DeviceCardNic.svelte | 10 +- frontend/src/lib/components/DeviceForm.svelte | 534 ++++++----- .../src/lib/components/DeviceFormPort.svelte | 65 +- .../src/lib/components/NetworkScan.svelte | 20 +- frontend/src/lib/i18n/de/index.ts | 1 - frontend/src/lib/i18n/en/index.ts | 1 - frontend/src/lib/i18n/es/index.ts | 1 - frontend/src/lib/i18n/fr/index.ts | 1 - frontend/src/lib/i18n/i18n-svelte.ts | 1 + frontend/src/lib/i18n/i18n-types.ts | 828 +++++++++--------- frontend/src/lib/i18n/i18n-util.async.ts | 1 + frontend/src/lib/i18n/i18n-util.sync.ts | 1 + frontend/src/lib/i18n/i18n-util.ts | 1 + frontend/src/lib/i18n/it/index.ts | 1 - frontend/src/lib/i18n/ja/index.ts | 1 - frontend/src/lib/i18n/nl/index.ts | 1 - frontend/src/lib/i18n/pt/index.ts | 1 - frontend/src/lib/i18n/zh-TW/index.ts | 1 - frontend/src/lib/i18n/zh/index.ts | 1 - frontend/src/routes/account/+page.svelte | 18 +- frontend/src/routes/device/new/+page.svelte | 4 +- frontend/src/routes/login/+page.svelte | 16 +- frontend/src/routes/settings/+page.svelte | 16 +- frontend/src/routes/users/+page.svelte | 34 +- frontend/src/routes/welcome/+page.svelte | 22 +- 26 files changed, 763 insertions(+), 820 deletions(-) diff --git a/frontend/src/lib/components/DeviceCard.svelte b/frontend/src/lib/components/DeviceCard.svelte index 296a59d7..c6071d65 100644 --- a/frontend/src/lib/components/DeviceCard.svelte +++ b/frontend/src/lib/components/DeviceCard.svelte @@ -236,7 +236,7 @@

{$LL.device.modal_confirm_shutdown_desc({ device: device.name })}

{/if}
{device.ip}
-
{device.mac}
+
{device.mac}
{#if device?.expand?.ports} {#each device?.expand?.ports.sort((a, b) => a.number - b.number) as port} @@ -203,7 +203,7 @@

{$LL.device.modal_confirm_wake_desc({ device: device.name })}

@@ -327,18 +302,17 @@ {@html $LL.device.ping_desc()}

-
-
+
@@ -349,60 +323,56 @@ {@html $LL.settings.ping_interval_desc2()}

-
- - -
-
- - -
-
-
- +
+
-
- + +
+
+ {$LL.device.wake_cron_enable()} + + - -
+ +
+ {$LL.device.require_confirmation()} + +
@@ -421,93 +391,78 @@ {@html $LL.device.sol_desc3()}

-
-
-
-
- - -
-
- {#if device.sol_enabled} -
-
- -
-
-
-
- - -
-
- {/if} + + {/if} + @@ -518,81 +473,78 @@ {@html $LL.device.shutdown_desc()}

+
+ +

{$LL.device.shutdown_examples()}

-
{$LL.device.shutdown_examples_windows()}
+
{$LL.device.shutdown_examples_windows()}
net rpc shutdown -I 192.168.1.13 -U "user%password"
-
{$LL.device.shutdown_examples_linux()}
+
{$LL.device.shutdown_examples_linux()}
sshpass -p password ssh -o "StrictHostKeyChecking=no" user@192.168.1.13 "sudo poweroff"
-
- - -
-
-
- - -
-
-

+

{$LL.device.shutdown_cron_desc()}

-
-
-
- - -
+ +
+ {$LL.device.require_confirmation()} + +
+

{$LL.device.password()}

@@ -600,15 +552,18 @@ {@html $LL.device.password_desc()}

-
- -
+
+ +
@@ -642,9 +597,9 @@
{/each} -
+
- diff --git a/frontend/src/lib/components/DeviceFormPort.svelte b/frontend/src/lib/components/DeviceFormPort.svelte index 2d366f9b..6088afc4 100644 --- a/frontend/src/lib/components/DeviceFormPort.svelte +++ b/frontend/src/lib/components/DeviceFormPort.svelte @@ -30,39 +30,44 @@
# {device.expand.ports.length}
-
- +
+ +
+
+ +
+
+
+
-
- - -
-
-
- - -
+ +

{$LL.account.language_title()}

- @@ -219,16 +219,16 @@

{$LL.account.change_password_title()}

{$LL.account.change_password_body()}

-
+
{#if !$pocketbase.authStore.isSuperuser} {/if}
-
+
{$LL.device.page_title()}
-
- + - +