Updates wifi.svelte
This commit is contained in:
@@ -452,17 +452,17 @@
|
|||||||
{/await}
|
{/await}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="bg-base-200 relative grid w-full max-w-2xl self-center overflow-hidden">
|
{#if !$page.data.features.security || $user.admin}
|
||||||
<div
|
<div class="bg-base-200 shadow-lg relative grid w-full max-w-2xl self-center overflow-hidden">
|
||||||
class="min-h-16 flex w-full items-center justify-between space-x-3 p-0 text-xl font-medium"
|
<div
|
||||||
>
|
class="min-h-16 flex w-full items-center justify-between space-x-3 p-0 text-xl font-medium"
|
||||||
Saved Networks
|
>
|
||||||
</div>
|
Saved Networks
|
||||||
{#await getWifiSettings()}
|
</div>
|
||||||
<Spinner />
|
{#await getWifiSettings()}
|
||||||
{:then nothing}
|
<Spinner />
|
||||||
<div class="relative w-full overflow-visible">
|
{:then nothing}
|
||||||
{#if !$page.data.features.security || $user.admin}
|
<div class="relative w-full overflow-visible">
|
||||||
<button
|
<button
|
||||||
class="btn btn-primary text-primary-content btn-md absolute -top-14 right-16"
|
class="btn btn-primary text-primary-content btn-md absolute -top-14 right-16"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
@@ -485,55 +485,53 @@
|
|||||||
>
|
>
|
||||||
<Scan class="h-6 w-6" /></button
|
<Scan class="h-6 w-6" /></button
|
||||||
>
|
>
|
||||||
{/if}
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="overflow-x-auto space-y-1"
|
class="overflow-x-auto space-y-1"
|
||||||
transition:slide|local={{ duration: 300, easing: cubicOut }}
|
transition:slide|local={{ duration: 300, easing: cubicOut }}
|
||||||
>
|
|
||||||
<DragDropList
|
|
||||||
id="networks"
|
|
||||||
type={VerticalDropZone}
|
|
||||||
itemSize={60}
|
|
||||||
itemCount={dndNetworkList.length}
|
|
||||||
on:drop={onDrop}
|
|
||||||
let:index
|
|
||||||
>
|
>
|
||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
<DragDropList
|
||||||
<div class="rounded-box bg-base-100 flex items-center space-x-3 px-4 py-2">
|
id="networks"
|
||||||
<div class="mask mask-hexagon bg-primary h-auto w-10 shrink-0">
|
type={VerticalDropZone}
|
||||||
<Router class="text-primary-content h-auto w-full scale-75" />
|
itemSize={60}
|
||||||
</div>
|
itemCount={dndNetworkList.length}
|
||||||
<div>
|
on:drop={onDrop}
|
||||||
<div class="font-bold">{dndNetworkList[index].ssid}</div>
|
let:index
|
||||||
</div>
|
>
|
||||||
{#if !$page.data.features.security || $user.admin}
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<div class="flex-grow" />
|
<div class="rounded-box bg-base-100 flex items-center space-x-3 px-4 py-2">
|
||||||
<div class="space-x-0 px-0 mx-0">
|
<div class="mask mask-hexagon bg-primary h-auto w-10 shrink-0">
|
||||||
<button
|
<Router class="text-primary-content h-auto w-full scale-75" />
|
||||||
class="btn btn-ghost btn-sm"
|
|
||||||
on:click={() => {
|
|
||||||
handleEdit(index);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Edit class="h-6 w-6" /></button
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
class="btn btn-ghost btn-sm"
|
|
||||||
on:click={() => {
|
|
||||||
confirmDelete(index);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Delete class="text-error h-6 w-6" />
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
<div>
|
||||||
</div>
|
<div class="font-bold">{dndNetworkList[index].ssid}</div>
|
||||||
</DragDropList>
|
</div>
|
||||||
|
{#if !$page.data.features.security || $user.admin}
|
||||||
|
<div class="flex-grow" />
|
||||||
|
<div class="space-x-0 px-0 mx-0">
|
||||||
|
<button
|
||||||
|
class="btn btn-ghost btn-sm"
|
||||||
|
on:click={() => {
|
||||||
|
handleEdit(index);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Edit class="h-6 w-6" /></button
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
class="btn btn-ghost btn-sm"
|
||||||
|
on:click={() => {
|
||||||
|
confirmDelete(index);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Delete class="text-error h-6 w-6" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</DragDropList>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
{#if !$page.data.features.security || $user.admin}
|
|
||||||
<div class="divider mb-0" />
|
<div class="divider mb-0" />
|
||||||
<div
|
<div
|
||||||
class="flex flex-col gap-2 p-0"
|
class="flex flex-col gap-2 p-0"
|
||||||
@@ -754,7 +752,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/await}
|
||||||
{/await}
|
</div>
|
||||||
</div>
|
{/if}
|
||||||
</SettingsCard>
|
</SettingsCard>
|
||||||
Reference in New Issue
Block a user