mirror of
https://github.com/1f349/admin.1f349.com.git
synced 2025-02-22 13:34:57 +00:00
Show errored A/AAAA input
This commit is contained in:
parent
88f2158115
commit
1616ea8be2
@ -19,7 +19,6 @@
|
|||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
editItem.type = 0;
|
editItem.type = 0;
|
||||||
console.error("Invalid IP address:", value);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -37,4 +36,6 @@
|
|||||||
<div>IP address is IPv4</div>
|
<div>IP address is IPv4</div>
|
||||||
{:else if editItem.type === DnsTypeAAAA}
|
{:else if editItem.type === DnsTypeAAAA}
|
||||||
<div>IP address is IPv6</div>
|
<div>IP address is IPv6</div>
|
||||||
|
{:else}
|
||||||
|
<div>Invalid IP address</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -8,7 +8,6 @@ export function dnsFqdn(domain: string): string {
|
|||||||
|
|
||||||
export function dnsSubdomain(value: string): string {
|
export function dnsSubdomain(value: string): string {
|
||||||
let baseDomain = dnsFqdn(get(domainOption));
|
let baseDomain = dnsFqdn(get(domainOption));
|
||||||
console.log(value, baseDomain, value == baseDomain);
|
|
||||||
|
|
||||||
if (value == baseDomain) value = "";
|
if (value == baseDomain) value = "";
|
||||||
else if (value.endsWith("." + baseDomain)) value = value.substring(0, value.length - baseDomain.length - 1);
|
else if (value.endsWith("." + baseDomain)) value = value.substring(0, value.length - baseDomain.length - 1);
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<PromiseTable value={$table}>
|
<PromiseTable value={table}>
|
||||||
<slot name="headers" slot="headers" />
|
<slot name="headers" slot="headers" />
|
||||||
|
|
||||||
<svelte:fragment slot="rows" let:value>
|
<svelte:fragment slot="rows" let:value>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user