fix: update components to comply with daiysUI v5

This commit is contained in:
Maxi Quoß
2025-01-30 18:52:50 +01:00
parent f410caaa54
commit 169ecf5773
26 changed files with 763 additions and 820 deletions

View File

@@ -236,7 +236,7 @@
</h3>
<p class="py-4">{$LL.device.modal_confirm_shutdown_desc({ device: device.name })}</p>
<div class="modal-action">
<form method="dialog" class="flex flex-row flex-wrap gap-2">
<form method="dialog">
<button class="btn">{$LL.buttons.cancel()}</button>
<button class="btn btn-success" on:click={reboot}>{$LL.buttons.confirm()}</button>
</form>

View File

@@ -157,13 +157,13 @@
</span>
</button>
{:else}
<button class="btn btn-warning btn-circle size-12" aria-label="Unknown">
<div class="btn btn-warning btn-circle size-12">
<span class="loading loading-ring loading-sm"></span>
</button>
</div>
{/if}
<div class="grow">
<div class="text-lg leading-4 font-bold">{device.ip}</div>
<div class="">{device.mac}</div>
<div>{device.mac}</div>
<div class="flex flex-wrap gap-x-4">
{#if device?.expand?.ports}
{#each device?.expand?.ports.sort((a, b) => a.number - b.number) as port}
@@ -203,7 +203,7 @@
</h3>
<p class="py-4">{$LL.device.modal_confirm_wake_desc({ device: device.name })}</p>
<div class="modal-action">
<form method="dialog" class="flex flex-row flex-wrap gap-2">
<form method="dialog">
<button class="btn">{$LL.buttons.cancel()}</button>
<button class="btn btn-success" on:click={wake}>{$LL.buttons.confirm()}</button>
</form>
@@ -218,7 +218,7 @@
</h3>
<p class="py-4">{$LL.device.modal_confirm_shutdown_desc({ device: device.name })}</p>
<div class="modal-action">
<form method="dialog" class="flex flex-row flex-wrap gap-2">
<form method="dialog">
<button class="btn">{$LL.buttons.cancel()}</button>
<button class="btn btn-success" on:click={shutdown}>{$LL.buttons.confirm()}</button>
</form>

View File

@@ -182,85 +182,65 @@
<div class="card-body">
<h2 class="card-title">{$LL.device.general()}</h2>
<div class="grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-4">
<div class="w-full max-w-xs">
<label class="label" for="device-name">
<div class="label-text">
<span>{$LL.device.general_name()}</span>
<span class="text-error">*</span>
</div>
<fieldset class="fieldset">
<label class="floating-label">
<span>{$LL.device.general_name()} <span class="text-error">*</span></span>
<input
type="text"
placeholder={$LL.device.general_name()}
class="input"
bind:value={device.name}
required
/>
</label>
<input
id="device-name"
type="text"
placeholder={$LL.device.general_name_placeholder()}
class="input w-full max-w-xs"
bind:value={device.name}
required
/>
</div>
<div class="w-full max-w-xs">
<label class="label" for="device-ip">
<div class="label-text">
<span>{$LL.device.general_ip()}</span>
<span class="text-error">*</span>
</div>
</fieldset>
<fieldset class="fieldset">
<label class="floating-label">
<span>{$LL.device.general_ip()} <span class="text-error">*</span></span>
<input
type="text"
placeholder={$LL.device.general_ip()}
class="input"
bind:value={device.ip}
required
/>
</label>
<input
id="device-ip"
type="text"
placeholder="192.168.0.5"
class="input w-full max-w-xs"
bind:value={device.ip}
required
/>
</div>
<div class="w-full max-w-xs">
<label class="label" for="device-mac">
<div class="label-text">
<span>{$LL.device.general_mac()}</span>
<span class="text-error">*</span>
</div>
</fieldset>
<fieldset class="fieldset">
<label class="floating-label">
<span>{$LL.device.general_mac()} <span class="text-error">*</span></span>
<input
type="text"
placeholder={$LL.device.general_mac()}
class="input"
bind:value={device.mac}
required
/>
</label>
<input
id="device-mac"
type="text"
placeholder="aa:bb:cc:dd:ee:ff"
class="input w-full max-w-xs"
bind:value={device.mac}
required
/>
</div>
<div class="w-full max-w-xs">
<label class="label" for="device-netmask">
<div class="label-text">
<span>{$LL.device.general_netmask()}</span>
<span class="text-error">*</span>
</div>
</fieldset>
<fieldset class="fieldset">
<label class="floating-label">
<span>{$LL.device.general_netmask()} <span class="text-error">*</span></span>
<input
type="text"
placeholder={$LL.device.general_netmask()}
class="input"
bind:value={device.netmask}
required
/>
</label>
<input
id="device-netmask"
type="text"
placeholder="255.255.255.0"
class="input w-full max-w-xs"
bind:value={device.netmask}
required
/>
</div>
<div class="w-full max-w-xs">
<label class="label" for="device-description">
<div class="label-text">
<span>{$LL.device.general_description()}</span>
</div>
</fieldset>
<fieldset class="fieldset">
<label class="floating-label">
<span>{$LL.device.general_description()}</span>
<input
type="text"
placeholder={$LL.device.general_description()}
class="input"
bind:value={device.description}
/>
</label>
<input
id="device-description"
type="text"
placeholder={$LL.device.general_description_placeholder()}
class="input w-full max-w-xs"
bind:value={device.description}
/>
</div>
</fieldset>
<span class="badge text-error self-center">* {$LL.device.general_required_field()}</span>
</div>
</div>
@@ -291,32 +271,27 @@
{$LL.device.link_desc()}
</p>
<div class="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4">
<div class="w-full max-w-xs">
<label class="label" for="device-link">
<div class="label-text">{$LL.device.link()}</div>
<fieldset class="fieldset">
<label class="floating-label">
<span>{$LL.device.link()}</span>
<input
type="url"
placeholder={$LL.device.link()}
class="input"
bind:value={device.link}
/>
</label>
<input
id="device-link"
type="url"
placeholder="https:// ..."
class="input w-full max-w-xs"
bind:value={device.link}
/>
</div>
<div class="w-full max-w-xs">
<label class="label" for="device-link-open">
<div class="label-text">{$LL.device.link_open()}</div>
</fieldset>
<fieldset class="fieldset">
<label class="floating-label">
<span>{$LL.device.link_open()}</span>
<select class="select" bind:value={device.link_open}>
<option value="">{$LL.device.link_open_no()}</option>
<option value="same_tab">{$LL.device.link_open_same_tab()}</option>
<option value="new_tab">{$LL.device.link_open_new_tab()}</option>
</select>
</label>
<select
id="device-link-open"
class="select select-bordered"
bind:value={device.link_open}
>
<option value="">{$LL.device.link_open_no()}</option>
<option value="same_tab">{$LL.device.link_open_same_tab()}</option>
<option value="new_tab">{$LL.device.link_open_new_tab()}</option>
</select>
</div>
</fieldset>
</div>
</div>
</div>
@@ -327,18 +302,17 @@
<!-- eslint-disable svelte/no-at-html-tags -->
{@html $LL.device.ping_desc()}
</p>
<div class="w-full max-w-xs">
<label class="label cursor-pointer" for="ping-cmd">
<span class="label-text">{$LL.device.ping_cmd()}</span>
<fieldset class="fieldset">
<label class="floating-label">
<span>{$LL.device.ping_cmd()}</span>
<input
type="text"
placeholder={$LL.device.ping_cmd()}
class="input"
bind:value={device.ping_cmd}
/>
</label>
<input
id="ping-cmd"
type="text"
placeholder="$:"
class="input mb-2 w-full max-w-xs"
bind:value={device.ping_cmd}
/>
</div>
</fieldset>
</div>
</div>
<div class="card bg-base-200 mt-6 w-full shadow-sm">
@@ -349,60 +323,56 @@
<!-- eslint-disable svelte/no-at-html-tags -->
{@html $LL.settings.ping_interval_desc2()}
</p>
<div class="w-full max-w-xs">
<label class="label cursor-pointer" for="wake-cmd">
<span class="label-text">{$LL.device.wake_cmd()}</span>
</label>
<input
id="wake-cmd"
type="text"
placeholder="$:"
class="input mb-2 w-full max-w-xs"
bind:value={device.wake_cmd}
/>
</div>
<div class="flex flex-col">
<label class="label cursor-pointer" for="wake-confirm">
<span class="label-text">{$LL.device.require_confirmation()}</span>
</label>
<input
id="wake-confirm"
type="checkbox"
class="toggle toggle-success"
bind:checked={device.wake_confirm}
/>
</div>
<div class="flex flex-row flex-wrap gap-4">
<div class="flex flex-col">
<label class="label cursor-pointer" for="wake-cron-enable">
<span class="label-text">{$LL.device.wake_cron_enable()}</span>
</label>
<fieldset class="fieldset">
<label class="floating-label">
<span>{$LL.device.wake_cmd()}</span>
<input
id="wake-cron-enable"
type="checkbox"
class="toggle toggle-success"
bind:checked={device.wake_cron_enabled}
type="text"
placeholder={$LL.device.wake_cmd()}
class="input"
bind:value={device.wake_cmd}
/>
</div>
<div class="w-full max-w-xs">
<label class="label" for="wake-cron">
<span class="label-text"
>{$LL.device.shutdown_cron()}
</label>
</fieldset>
<div class="flex flex-row flex-wrap gap-4">
<fieldset class="fieldset bg-base-100 border-base-300 rounded-box w-64 border p-4">
<legend class="fieldset-legend">{$LL.device.wake_cron_enable()}</legend>
<label class="fieldset-label">
<input
type="checkbox"
bind:checked={device.wake_cron_enabled}
class="toggle toggle-success"
/>
{$LL.device.wake_cron_enable()}
</label>
<label class="floating-label mt-4">
<span
>{$LL.device.wake_cron()}
{#if device.wake_cron_enabled}
<span class="text-error">*</span>
{/if}
</span>
<input
type="text"
placeholder={$LL.device.wake_cron()}
class="input"
bind:value={device.wake_cron}
disabled={!device.wake_cron_enabled}
required={device.wake_cron_enabled}
/>
</label>
<input
id="wake-cron"
type="text"
placeholder="M H DoM M DoW"
class="input w-full max-w-xs"
bind:value={device.wake_cron}
disabled={!device.wake_cron_enabled}
required={device.wake_cron_enabled}
/>
</div>
</fieldset>
<fieldset class="fieldset bg-base-100 border-base-300 rounded-box w-64 border p-4">
<legend class="fieldset-legend">{$LL.device.require_confirmation()}</legend>
<label class="fieldset-label">
<input
type="checkbox"
bind:checked={device.wake_confirm}
class="toggle toggle-success"
/>
{$LL.device.require_confirmation()}
</label>
</fieldset>
</div>
</div>
</div>
@@ -421,93 +391,78 @@
<!-- eslint-disable svelte/no-at-html-tags -->
{@html $LL.device.sol_desc3()}
</p>
<div class="flex flex-row flex-wrap gap-4">
<div class="flex flex-col">
<label class="label cursor-pointer" for="sol-enable">
<span class="label-text">{$LL.device.sol_enable()}</span>
<fieldset class="fieldset bg-base-100 border-base-300 rounded-box w-64 border p-4">
<legend class="fieldset-legend">{$LL.device.sol_enable()}</legend>
<label class="fieldset-label">
<input
type="checkbox"
bind:checked={device.sol_enabled}
class="toggle toggle-success"
/>
{$LL.device.sol_enable()}
</label>
<input
id="sol-enable"
type="checkbox"
class="toggle toggle-success"
bind:checked={device.sol_enabled}
/>
</div>
<div class="flex flex-col">
<label class="label" for="sol-port">
<span class="label-text"
<label class="floating-label mt-4">
<span
>{$LL.device.sol_port()}
{#if device.sol_enabled}
<span class="text-error">*</span>
{/if}
</span>
</label>
<input
id="sol-port"
type="number"
min="1"
max="65535"
class="input"
bind:value={device.sol_port}
disabled={!device.sol_enabled}
required={device.sol_enabled}
/>
</div>
</div>
{#if device.sol_enabled}
<div class="flex flex-row flex-wrap gap-4">
<div class="flex flex-col">
<label class="label cursor-pointer" for="sol-auth">
<span class="label-text">{$LL.device.sol_authorization()}</span>
</label>
<input
id="sol-auth"
type="checkbox"
class="toggle toggle-success"
bind:checked={device.sol_auth}
class="input"
type="number"
min="1"
max="65535"
placeholder={$LL.device.sol_port()}
bind:value={device.sol_port}
disabled={!device.sol_enabled}
required={device.sol_enabled}
/>
</div>
<div class="flex flex-col">
<label class="label" for="sol-user">
<span class="label-text"
</label>
</fieldset>
{#if device.sol_enabled}
<fieldset class="fieldset bg-base-100 border-base-300 rounded-box w-64 border p-4">
<legend class="fieldset-legend">{$LL.device.sol_authorization()}</legend>
<label class="fieldset-label">
<input type="checkbox" bind:checked={device.sol_auth} class="toggle toggle-success" />
{$LL.device.sol_authorization()}
</label>
<label class="floating-label mt-4">
<span
>{$LL.device.sol_user()}
{#if device.sol_auth}
<span class="text-error">*</span>
{/if}
</span>
<input
type="text"
placeholder={$LL.device.sol_user()}
class="input"
bind:value={device.sol_user}
disabled={!device.sol_auth}
required={device.sol_auth}
/>
</label>
<input
id="sol-user"
type="text"
placeholder={$LL.device.sol_user()}
class="input"
bind:value={device.sol_user}
disabled={!device.sol_auth}
required={device.sol_auth}
/>
</div>
<div class="flex flex-col">
<label class="label" for="sol-password">
<span class="label-text"
<label class="floating-label">
<span
>{$LL.device.sol_password()}
{#if device.sol_auth}
<span class="text-error">*</span>
{/if}
</span>
<input
type="password"
placeholder={$LL.device.sol_password()}
class="input"
bind:value={device.sol_passwort}
disabled={!device.sol_auth}
required={device.sol_auth}
/>
</label>
<input
id="sol-password"
type="password"
placeholder={$LL.device.sol_password()}
class="input"
bind:value={device.sol_password}
disabled={!device.sol_auth}
required={device.sol_auth}
/>
</div>
</div>
{/if}
</fieldset>
{/if}
</div>
</div>
</div>
@@ -518,81 +473,78 @@
<!-- eslint-disable svelte/no-at-html-tags -->
{@html $LL.device.shutdown_desc()}
</p>
<fieldset class="fieldset">
<label class="floating-label">
<span>{$LL.device.shutdown_cmd()}</span>
<input
type="text"
placeholder={$LL.device.shutdown_cmd()}
class="input"
bind:value={device.shutdown_cmd}
/>
</label>
</fieldset>
<p class="my-2 font-bold">{$LL.device.shutdown_examples()}</p>
<div class="mockup-code max-w-fit min-w-0 text-sm">
<pre data-prefix="#"><code>{$LL.device.shutdown_examples_windows()}</code></pre>
<pre data-prefix="#" class="italic"><code>{$LL.device.shutdown_examples_windows()}</code
></pre>
<pre data-prefix="$" class="text-warning"><code
>net rpc shutdown -I 192.168.1.13 -U "user%password"</code
></pre>
</div>
<div class="mockup-code max-w-fit min-w-0 text-sm">
<pre data-prefix="#"><code>{$LL.device.shutdown_examples_linux()}</code></pre>
<pre data-prefix="#" class="italic"><code>{$LL.device.shutdown_examples_linux()}</code
></pre>
<pre data-prefix="$" class="text-warning"><code
>sshpass -p password ssh -o "StrictHostKeyChecking=no" user@192.168.1.13 "sudo poweroff"</code
></pre>
</div>
<div class="w-full max-w-xs">
<label class="label cursor-pointer" for="shutdown-cmd">
<span class="label-text">{$LL.device.shutdown_cmd()}</span>
</label>
<input
id="shutdown-cmd"
type="text"
placeholder="$:"
class="input mb-2 w-full max-w-xs"
bind:value={device.shutdown_cmd}
/>
</div>
<div class="flex flex-row flex-wrap gap-4">
<div class="flex flex-col">
<label class="label cursor-pointer" for="shutdown-confirm">
<span class="label-text">{$LL.device.require_confirmation()}</span>
</label>
<input
id="shutdown-confirm"
type="checkbox"
class="toggle toggle-success"
bind:checked={device.shutdown_confirm}
/>
</div>
</div>
<p class="my-2">
<p class="mt-4">
{$LL.device.shutdown_cron_desc()}
</p>
<div class="flex flex-row flex-wrap gap-4">
<div class="flex flex-col">
<label class="label cursor-pointer" for="shutdown-cron-enable">
<span class="label-text">{$LL.device.shutdown_cron_enable()}</span>
<fieldset class="fieldset bg-base-100 border-base-300 rounded-box w-64 border p-4">
<legend class="fieldset-legend">{$LL.device.shutdown_cron_enable()}</legend>
<label class="fieldset-label">
<input
type="checkbox"
bind:checked={device.shutdown_cron_enabled}
class="toggle toggle-success"
/>
{$LL.device.shutdown_cron_enable()}
</label>
<input
id="shutdown-cron-enable"
type="checkbox"
class="toggle toggle-success"
bind:checked={device.shutdown_cron_enabled}
/>
</div>
<div class="w-full max-w-xs">
<label class="label" for="shutdown-cron">
<span class="label-text"
<label class="floating-label mt-4">
<span
>{$LL.device.shutdown_cron()}
{#if device.shutdown_cron_enabled}
<span class="text-error">*</span>
{/if}
</span>
<input
type="text"
placeholder={$LL.device.shutdown_cron()}
class="input"
bind:value={device.shutdown_cron}
disabled={!device.shutdown_cron_enabled}
required={device.shutdown_cron_enabled}
/>
</label>
<input
id="shutdown-cron"
type="text"
placeholder="M H DoM M DoW"
class="input w-full max-w-xs"
bind:value={device.shutdown_cron}
disabled={!device.shutdown_cron_enabled}
required={device.shutdown_cron_enabled}
/>
</div>
</fieldset>
<fieldset class="fieldset bg-base-100 border-base-300 rounded-box w-64 border p-4">
<legend class="fieldset-legend">{$LL.device.require_confirmation()}</legend>
<label class="fieldset-label">
<input
type="checkbox"
bind:checked={device.shutdown_confirm}
class="toggle toggle-success"
/>
{$LL.device.require_confirmation()}
</label>
</fieldset>
</div>
</div>
</div>
<div class="card bg-base-200 mt-6 w-full shadow-sm">
<div class="card-body">
<h2 class="card-title">{$LL.device.password()}</h2>
@@ -600,15 +552,18 @@
<!-- eslint-disable svelte/no-at-html-tags -->
{@html $LL.device.password_desc()}
</p>
<div class="w-full">
<input
type="password"
placeholder="123456"
class="input w-full max-w-xs"
maxlength="6"
bind:value={device.password}
/>
</div>
<fieldset class="fieldset">
<label class="floating-label">
<span>{$LL.device.password()}</span>
<input
type="text"
placeholder={$LL.device.password()}
class="input"
maxlength="6"
bind:value={device.password}
/>
</label>
</fieldset>
</div>
</div>
<div class="card bg-base-200 mt-6 w-full shadow-sm">
@@ -642,9 +597,9 @@
</div>
{/each}
</div>
<div class="join max-w-xs">
<div class="join">
<input
class="input join-item input-bordered w-full"
class="input join-item"
placeholder={$LL.device.groups_placeholder()}
type="text"
bind:value={newGroup}
@@ -665,12 +620,15 @@
</div>
</form>
<dialog class="modal" bind:this={deleteModal}>
<form method="dialog" class="modal-box">
<div class="modal-box">
<h3 class="text-lg font-bold">{$LL.users.confirm_delete_title()}</h3>
<p class="py-4">{$LL.users.confirm_delete_desc({ username: device.name })}</p>
<div class="modal-action">
<button class="btn">{$LL.buttons.cancel()}</button>
<button class="btn btn-error" on:click={() => deleteDevice()}>{$LL.buttons.delete()}</button>
<form method="dialog">
<button class="btn">{$LL.buttons.cancel()}</button>
<button class="btn btn-error" on:click={() => deleteDevice()}>{$LL.buttons.delete()}</button
>
</form>
</div>
</form>
</div>
</dialog>

View File

@@ -30,39 +30,44 @@
<fieldset class="fieldset bg-base-100 border-base-300 rounded-box w-xs border p-4">
<legend class="fieldset-legend"># {device.expand.ports.length}</legend>
<div class="flex flex-row gap-2">
<div>
<label class="fieldset-label" for="port-name-{index}">{$LL.device.ports_name()}</label>
<fieldset class="fieldset">
<label class="floating-label">
<span>{$LL.device.ports_name()} <span class="text-error">*</span></span>
<input
type="text"
placeholder={$LL.device.ports_name()}
class="input"
required
bind:value={device.expand.ports[index].name}
/>
</label>
</fieldset>
<fieldset class="fieldset">
<label class="floating-label">
<span>{$LL.device.ports_number()} <span class="text-error">*</span></span>
<input
type="number"
placeholder={$LL.device.ports_number()}
class="input"
min="1"
max="65535"
required
bind:value={device.expand.ports[index].number}
/>
</label>
</fieldset>
</div>
<fieldset class="fieldset">
<label class="floating-label">
<span>{$LL.device.link()}</span>
<input
id="port-name-{index}"
type="text"
class="input input-sm"
placeholder="ssh"
bind:value={device.expand.ports[index].name}
placeholder={$LL.device.link()}
class="input"
bind:value={device.expand.ports[index].link}
/>
</div>
<div>
<label class="fieldset-label" for="port-number-{index}">{$LL.device.ports_number()}</label>
<input
type="number"
class="input input-sm"
min="1"
max="65535"
placeholder="22"
required
bind:value={device.expand.ports[index].number}
/>
</div>
</div>
<div>
<label class="fieldset-label" for="port-link-{index}">{$LL.device.link()}</label>
<input
id="port-link-{index}"
type="url"
class="input input-sm"
placeholder="https:// ..."
bind:value={device.expand.ports[index].link}
/>
</div>
</label>
</fieldset>
<button
class="btn btn-error btn-xs btn-soft ms-auto"
on:click={() => deletePort(device.expand.ports[index])}

View File

@@ -126,12 +126,12 @@
<div class="flex flex-row flex-wrap items-end gap-4">
<form on:submit|preventDefault={saveSettings}>
<label class="label" for="scan-range">
<span class="label-text">{$LL.device.network_scan_ip_range()}</span>
<span>{$LL.device.network_scan_ip_range()}</span>
</label>
<div class="join max-w-xs">
<input
id="scan-range"
class="input join-item input-bordered w-full"
class="input join-item w-full"
type="text"
placeholder="192.168.1.0/24"
bind:value={scanRange}
@@ -205,22 +205,22 @@
</div>
{/each}
<h2 class="card-title mt-4">{$LL.device.network_scan_add_all()}</h2>
<div class="form-control max-w-fit">
<div class="max-w-fit">
<label class="label cursor-pointer">
<input type="checkbox" class="checkbox" bind:checked={replaceNetmaskCheckbox} />
<span class="label-text ms-2 text-wrap break-words"
<span class="ms-2 text-wrap break-words"
>{$LL.device.network_scan_replace_netmask()}</span
>
</label>
</div>
{#if replaceNetmaskCheckbox}
<div class="form-control max-w-fit">
<div class="max-w-fit">
<label class="label cursor-pointer" for="replaceNetmaskInput">
<span class="label-text ms-2">{$LL.device.network_scan_new_netmask()}</span>
<span class="ms-2">{$LL.device.network_scan_new_netmask()}</span>
</label>
<input
id="replaceNetmaskInput"
class="input input-bordered"
class="input"
type="text"
placeholder="255.255.255.0"
bind:value={replaceNetmask}
@@ -228,10 +228,10 @@
</div>
{/if}
{#if scanResponse.devices.find((dev) => dev.name === 'Unknown')}
<div class="form-control max-w-fit">
<div class="max-w-fit">
<label class="label cursor-pointer">
<input type="checkbox" class="checkbox" bind:checked={addAllCheckbox} />
<span class="label-text ms-2 text-wrap break-words"
<span class="ms-2 text-wrap break-words"
>{$LL.device.network_scan_include_unknown()}</span
>
</label>
@@ -258,7 +258,7 @@
{/if}
</div>
{:else}
<div class="form-control max-w-fit">
<div class="max-w-fit">
<button
class="btn btn-success"
on:click={() => addAll()}

View File

@@ -51,7 +51,6 @@ const de = {
modal_confirm_shutdown_desc: 'Bitte bestätigen, um {device} herunterzufahren.',
general: 'Allgemein',
general_name: 'Name',
general_name_placeholder: 'Gerätename',
general_ip: 'IP',
general_mac: 'Mac',
general_netmask: 'Netmask',

View File

@@ -49,7 +49,6 @@ const en = {
modal_confirm_shutdown_desc: 'Please confirm to shutdown {device}.',
general: 'General',
general_name: 'Name',
general_name_placeholder: 'Device name',
general_ip: 'IP',
general_mac: 'Mac',
general_netmask: 'Netmask',

View File

@@ -51,7 +51,6 @@ const es = {
modal_confirm_shutdown_desc: 'Por favor confirme para apagar {device}.',
general: 'General',
general_name: 'Nombre',
general_name_placeholder: 'Nombre del dispositivo',
general_ip: 'IP',
general_mac: 'Mac',
general_netmask: 'Máscara de red',

View File

@@ -52,7 +52,6 @@ const fr = {
modal_confirm_shutdown_desc: "Veuillez confirmer l'arrêt du {device}.",
general: 'Général',
general_name: 'Nom',
general_name_placeholder: "Nom de l'appareil",
general_ip: 'IP',
general_mac: 'Mac',
general_netmask: 'Masque réseau',

View File

@@ -1,4 +1,5 @@
// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten.
import { initI18nSvelte } from 'typesafe-i18n/svelte';
import type { Formatters, Locales, TranslationFunctions, Translations } from './i18n-types';

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,5 @@
// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten.
import { initFormatters } from './formatters';
import type { Locales, Translations } from './i18n-types';

View File

@@ -1,4 +1,5 @@
// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten.
import { initFormatters } from './formatters';
import type { Locales, Translations } from './i18n-types';

View File

@@ -1,4 +1,5 @@
// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten.
import {
i18n as initI18n,

View File

@@ -51,7 +51,6 @@ const it = {
modal_confirm_shutdown_desc: 'Sicuro di voler spegnere {device}.',
general: 'Generale',
general_name: 'Nome',
general_name_placeholder: 'Nome dispositivo',
general_ip: 'IP',
general_mac: 'Mac',
general_netmask: 'Maschera di rete',

View File

@@ -49,7 +49,6 @@ const ja = {
modal_confirm_shutdown_desc: '{device} をシャットダウンすることを確認してください。',
general: '一般',
general_name: '名前',
general_name_placeholder: 'デバイス名',
general_ip: 'IP',
general_mac: 'Mac',
general_netmask: 'ネットマスク',

View File

@@ -51,7 +51,6 @@ const nl = {
modal_confirm_shutdown_desc: 'Bevestig om {device} af te sluiten.',
general: 'Algemeen',
general_name: 'Naam',
general_name_placeholder: 'Apparaatnaam',
general_ip: 'IP',
general_mac: 'Mac',
general_netmask: 'Subnetmask',

View File

@@ -51,7 +51,6 @@ const pt = {
modal_confirm_shutdown_desc: 'Confirme o encerramento do {device}.',
general: 'Geral',
general_name: 'Nome',
general_name_placeholder: 'Nome do dispositivo',
general_ip: 'IP',
general_mac: 'Mac',
general_netmask: 'Máscara de rede',

View File

@@ -50,7 +50,6 @@ const zh_TW = {
modal_confirm_shutdown_desc: '你確定要關閉 {device} 嗎?',
general: '通用',
general_name: '名稱',
general_name_placeholder: '裝置名稱',
general_ip: 'IP',
general_mac: 'Mac',
general_netmask: '子網域遮罩',

View File

@@ -48,7 +48,6 @@ const zh = {
modal_confirm_shutdown_desc: '您确定要关闭 {device} 吗?',
general: '通用',
general_name: '名称',
general_name_placeholder: '设备名',
general_ip: 'IP',
general_mac: 'Mac',
general_netmask: '子网掩码',

View File

@@ -195,7 +195,7 @@
{/each}
</div>
<h2 class="card-title mt-4 mb-2">{$LL.account.language_title()}</h2>
<select class="select select-bordered w-full max-w-xs" bind:value={selectedLanguage}>
<select class="select w-full max-w-xs" bind:value={selectedLanguage}>
<option value="auto" selected={localStorageLang === null}
>🌐 {$LL.account.language_option_auto()}</option
>
@@ -219,16 +219,16 @@
<h2 class="card-title">{$LL.account.change_password_title()}</h2>
<p>{$LL.account.change_password_body()}</p>
<form on:submit|preventDefault={changePassword}>
<div class="form-control w-full max-w-xs">
<div class="w-full max-w-xs">
{#if !$pocketbase.authStore.isSuperuser}
<label class="label" for="password-old">
<span class="label-text">{$LL.account.change_password_label()}</span>
<span>{$LL.account.change_password_label()}</span>
</label>
<input
id="password-old"
type="password"
placeholder={$LL.account.change_password_label()}
class="input input-bordered w-full max-w-xs"
class="input w-full max-w-xs"
minlength="5"
maxlength="72"
bind:value={newPassword.old}
@@ -236,28 +236,28 @@
/>
{/if}
<label class="label" for="password-new">
<span class="label-text">{$LL.account.change_password_new()}</span>
<span>{$LL.account.change_password_new()}</span>
</label>
<input
id="password-new"
type="password"
placeholder={$LL.account.change_password_new()}
class="input input-bordered w-full max-w-xs"
class="input w-full max-w-xs"
minlength={$pocketbase.authStore.isSuperuser ? 10 : 5}
maxlength="72"
bind:value={newPassword.password}
required
/>
</div>
<div class="form-control w-full max-w-xs">
<div class="w-full max-w-xs">
<label class="label" for="password-confirm">
<span class="label-text">{$LL.account.change_password_confirm()}</span>
<span>{$LL.account.change_password_confirm()}</span>
</label>
<input
id="password-confirm"
type="password"
placeholder={$LL.account.change_password_confirm()}
class="input input-bordered w-full max-w-xs"
class="input w-full max-w-xs"
minlength={$pocketbase.authStore.isSuperuser ? 10 : 5}
maxlength="72"
bind:value={newPassword.confirm}

View File

@@ -45,11 +45,11 @@
<h1 class="mb-8 text-3xl font-bold">{$LL.device.page_title()}</h1>
<div class="mb-6 flex justify-center">
<ul class="menu menu-horizontal rounded-box bg-base-200">
<ul class="menu menu-horizontal rounded-box bg-base-200 gap-1">
{#each tabs as tab}
{#if tab.show}
<li>
<button class:active={activeTab === tab.name} on:click={() => (activeTab = tab.name)}
<button class:menu-active={activeTab === tab.name} on:click={() => (activeTab = tab.name)}
>{tab.ll_name} <Fa icon={tab.icon} class="ms-2" /></button
>
</li>

View File

@@ -73,19 +73,13 @@
</figure>
<h2 class="card-title">{$LL.login.welcome()}</h2>
</div>
<form class="form-control w-full" on:submit|preventDefault={tryAdminThenUser}>
<form class="w-full" on:submit|preventDefault={tryAdminThenUser}>
<label class="label" for="email">
<span class="label-text">{$LL.login.email_label()}</span>
<span>{$LL.login.email_label()}</span>
</label>
<input
id="email"
type="text"
class="input input-bordered w-full"
required
bind:value={form.email}
/>
<input id="email" type="text" class="input w-full" required bind:value={form.email} />
<label class="label" for="password">
<span class="label-text">{$LL.login.password_label()}</span>
<span>{$LL.login.password_label()}</span>
</label>
<label class="relative block">
<div
@@ -99,7 +93,7 @@
<input
id="password"
type="password"
class="input input-bordered w-full"
class="input w-full"
maxlength="72"
required
bind:value={form.password}

View File

@@ -106,11 +106,11 @@
<!-- eslint-disable svelte/no-at-html-tags -->
{@html $LL.settings.ping_interval_desc2()}
</p>
<div class="form-control mt-2 w-full">
<div class="mt-2 w-full">
<input
type="text"
placeholder="e.g. '@every 5s' or '@every 1m'"
class="input w-full max-w-xs"
class="input"
bind:value={settingsPrivClone.interval}
/>
</div>
@@ -118,10 +118,10 @@
<p class="mt-2">
{$LL.settings.lazy_ping_desc()}
</p>
<div class="form-control w-fit">
<div class="w-fit">
<label class="label cursor-pointer gap-2">
<input type="checkbox" class="checkbox" bind:checked={settingsPrivClone.lazy_ping} />
<span class="label-text">{$LL.settings.lazy_ping_enable()}</span>
<span>{$LL.settings.lazy_ping_enable()}</span>
</label>
</div>
</div>
@@ -130,11 +130,11 @@
<div class="card-body">
<h2 class="card-title">{$LL.settings.website_title_title()}</h2>
<p class="my-2">{$LL.settings.website_title_desc()}</p>
<div class="form-control w-full">
<div class="w-full">
<input
type="text"
placeholder="e.g. 'UpSnap'"
class="input w-full max-w-xs"
class="input"
bind:value={settingsPubClone.website_title}
/>
</div>
@@ -159,10 +159,10 @@
bind:this={faviconPreview}
/>
</div>
<div class="form-control flex w-full max-w-md flex-row gap-4">
<div class="flex w-full max-w-md flex-row gap-4">
<input
type="file"
class="file-input w-full max-w-xs"
class="file-input"
accept=".ico,.png,.svg,.gif,.jpg,.jpeg"
bind:this={faviconInputElement}
/>

View File

@@ -195,7 +195,7 @@
{user.username}
</h2>
{#each permissions.filter((perm) => perm.user === user.id) as permission}
<div class="form-control w-fit">
<div class="w-fit">
<label class="label cursor-pointer gap-2 text-wrap">
<input type="checkbox" bind:checked={permission.create} class="checkbox" />
{$LL.users.allow_create_devices({ username: user.username })}
@@ -316,16 +316,18 @@
</div>
</form>
<dialog class="modal" bind:this={deleteModal[index]}>
<form method="dialog" class="modal-box">
<div class="modal-box">
<h3 class="text-lg font-bold">{$LL.users.confirm_delete_title()}</h3>
<p class="py-4">{$LL.users.confirm_delete_desc({ username: user.username })}</p>
<div class="modal-action">
<button class="btn">{$LL.buttons.cancel()}</button>
<button class="btn btn-error" on:click={() => deleteUser(user)}
>{$LL.buttons.delete()}</button
>
<form method="dialog">
<button class="btn">{$LL.buttons.cancel()}</button>
<button class="btn btn-error" on:click={() => deleteUser(user)}
>{$LL.buttons.delete()}</button
>
</form>
</div>
</form>
</div>
</dialog>
{/each}
<div class="card bg-base-200 mt-6 w-full shadow-sm">
@@ -333,9 +335,9 @@
<h2 class="card-title">{$LL.users.create_new_user()}</h2>
<form on:submit|preventDefault={createUser}>
<div class="flex flex-row flex-wrap gap-4">
<div class="form-control w-full max-w-xs">
<div class="w-full max-w-xs">
<label class="label" for="username">
<div class="label-text">
<div>
<span>{$LL.users.username()}</span>
<span class="text-error">*</span>
</div>
@@ -344,14 +346,14 @@
id="username"
type="text"
placeholder={$LL.users.username()}
class="input input-bordered w-full max-w-xs"
class="input w-full max-w-xs"
required
bind:value={newUser.username}
/>
</div>
<div class="form-control w-full max-w-xs">
<div class="w-full max-w-xs">
<label class="label" for="password">
<div class="label-text">
<div>
<span>{$LL.users.password()}</span>
<span class="text-error">*</span>
</div>
@@ -360,16 +362,16 @@
id="password"
type="password"
placeholder={$LL.users.password()}
class="input input-bordered w-full max-w-xs"
class="input w-full max-w-xs"
minlength="5"
maxlength="72"
required
bind:value={newUser.password}
/>
</div>
<div class="form-control w-full max-w-xs">
<div class="w-full max-w-xs">
<label class="label" for="passwordConfirm">
<div class="label-text">
<div>
<span>{$LL.users.password_confirm()}</span>
<span class="text-error">*</span>
</div>
@@ -378,7 +380,7 @@
id="passwordConfirm"
type="password"
placeholder={$LL.users.password_confirm()}
class="input input-bordered w-full max-w-xs"
class="input w-full max-w-xs"
minlength="5"
maxlength="72"
required

View File

@@ -98,20 +98,14 @@
<figure class="w-16"><img src="/gopher.svg" alt="Gopher" /></figure>
<h2 class="card-title">{$LL.welcome.step2_page_title()}</h2>
</div>
<form class="form-control w-full" on:submit|preventDefault={register}>
<form class="w-full" on:submit|preventDefault={register}>
<label class="label" for="email">
<span class="label-text">{$LL.welcome.step2_label_email()}</span>
<span>{$LL.welcome.step2_label_email()}</span>
</label>
<input
id="email"
type="email"
class="input input-bordered w-full"
required
bind:value={form.email}
/>
<input id="email" type="email" class="input w-full" required bind:value={form.email} />
<label class="label" for="password">
<span class="label-text">{$LL.welcome.step2_label_password()}</span>
<span class="label-text-alt">{$LL.welcome.step2_label_min_chars()}</span>
<span>{$LL.welcome.step2_label_password()}</span>
<span>{$LL.welcome.step2_label_min_chars()}</span>
</label>
<label class="relative block">
<div
@@ -125,7 +119,7 @@
<input
id="password"
type="password"
class="input input-bordered w-full"
class="input w-full"
minlength="10"
maxlength="72"
required
@@ -134,7 +128,7 @@
/>
</label>
<label class="label" for="passwordConfirm">
<span class="label-text">{$LL.welcome.step2_label_password_confirm()}</span>
<span>{$LL.welcome.step2_label_password_confirm()}</span>
</label>
<label class="relative block">
<div
@@ -148,7 +142,7 @@
<input
id="confirm"
type="password"
class="input input-bordered w-full"
class="input w-full"
minlength="10"
maxlength="72"
required