Fixes ui warnings
This commit is contained in:
@@ -15,7 +15,7 @@ export type WifiStatus = {
|
||||
export type WifiSettings = {
|
||||
hostname: string;
|
||||
priority_RSSI: boolean;
|
||||
wifi_networks: networkItem[];
|
||||
wifi_networks: KnownNetworkItem[];
|
||||
};
|
||||
|
||||
export type KnownNetworkItem = {
|
||||
|
||||
@@ -46,6 +46,8 @@
|
||||
dns_ip_2: undefined
|
||||
};
|
||||
|
||||
let static_ip_config = false
|
||||
|
||||
let newNetwork: boolean = true;
|
||||
let showNetworkEditor: boolean = false;
|
||||
|
||||
@@ -156,6 +158,8 @@
|
||||
formErrors.ssid = false;
|
||||
}
|
||||
|
||||
networkEditable.static_ip_config = static_ip_config;
|
||||
|
||||
if (networkEditable.static_ip_config) {
|
||||
// RegEx for IPv4
|
||||
const regexExp =
|
||||
@@ -613,13 +617,13 @@
|
||||
>
|
||||
<input
|
||||
type="checkbox"
|
||||
bind:checked={networkEditable.static_ip_config}
|
||||
bind:checked={static_ip_config}
|
||||
class="checkbox checkbox-primary sm:-mb-5"
|
||||
/>
|
||||
<span class="sm:-mb-5">Static IP Config?</span>
|
||||
</label>
|
||||
</div>
|
||||
{#if networkEditable.static_ip_config}
|
||||
{#if static_ip_config}
|
||||
<div
|
||||
class="grid w-full grid-cols-1 content-center gap-x-4 px-4 sm:grid-cols-2"
|
||||
transition:slide|local={{ duration: 300, easing: cubicOut }}
|
||||
@@ -660,7 +664,6 @@
|
||||
maxlength="15"
|
||||
size="15"
|
||||
bind:value={networkEditable.gateway_ip}
|
||||
id="gateway"
|
||||
required
|
||||
/>
|
||||
<label class="label" for="gateway">
|
||||
@@ -683,7 +686,6 @@
|
||||
maxlength="15"
|
||||
size="15"
|
||||
bind:value={networkEditable.subnet_mask}
|
||||
id="subnet"
|
||||
required
|
||||
/>
|
||||
<label class="label" for="subnet">
|
||||
@@ -706,7 +708,6 @@
|
||||
maxlength="15"
|
||||
size="15"
|
||||
bind:value={networkEditable.dns_ip_1}
|
||||
id="gateway"
|
||||
required
|
||||
/>
|
||||
<label class="label" for="gateway">
|
||||
@@ -728,7 +729,6 @@
|
||||
maxlength="15"
|
||||
size="15"
|
||||
bind:value={networkEditable.dns_ip_2}
|
||||
id="subnet"
|
||||
required
|
||||
/>
|
||||
<label class="label" for="subnet">
|
||||
|
||||
Reference in New Issue
Block a user