From a098d3056ce0694587394177e3b06b6ce6f59fe3 Mon Sep 17 00:00:00 2001 From: Sense T Date: Fri, 12 Apr 2024 20:03:34 +0800 Subject: [PATCH] web debug done --- web/src/stores/domains.ts | 2 +- web/src/stores/records.ts | 20 ++++++++++---------- web/src/views/RecordsView.tsx | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/web/src/stores/domains.ts b/web/src/stores/domains.ts index 37e92e7..f75c3e5 100644 --- a/web/src/stores/domains.ts +++ b/web/src/stores/domains.ts @@ -65,7 +65,7 @@ export const useDomainStore = defineStore('domains', () => { await api.put("/domains", domain) } - domains.value = domains.value.map(e => e.id === domain.id ? domain : e) + domains.value = domains.value.map(e => (e.id === domain.id || e.domain_name === domain.domain_name) ? domain : e) } async function removeDomain(domain: Domain) { diff --git a/web/src/stores/records.ts b/web/src/stores/records.ts index 8af35db..996863b 100644 --- a/web/src/stores/records.ts +++ b/web/src/stores/records.ts @@ -82,8 +82,8 @@ const recordDevData = new Map([ ttl: 3600, record_type: RecordTypes.RecordTypeSOA, content: { - ns: "ns1.example.com", - MBox: "admin@example.com", + ns: "ns1.example.com.", + MBox: "admin@example.com.", refresh: 86400, retry: 7200, expire: 3600000, @@ -97,7 +97,7 @@ const recordDevData = new Map([ ttl: 3600, record_type: RecordTypes.RecordTypeNS, content: { - host: "ns1.example.com" + host: "ns1.example.com." } }, { @@ -107,7 +107,7 @@ const recordDevData = new Map([ ttl: 3600, record_type: RecordTypes.RecordTypeNS, content: { - host: "ns2.example.com" + host: "ns2.example.com." } }, { @@ -127,7 +127,7 @@ const recordDevData = new Map([ ttl: 3600, record_type: RecordTypes.RecordTypeCNAME, content: { - host: "www.example.com" + host: "www.example.com." } } ] @@ -141,8 +141,8 @@ const recordDevData = new Map([ ttl: 3600, record_type: RecordTypes.RecordTypeSOA, content: { - ns: "ns1.example.org", - MBox: "admin@example.org", + ns: "ns1.example.org.", + MBox: "admin@example.org.", refresh: 86400, retry: 7200, expire: 3600000, @@ -156,7 +156,7 @@ const recordDevData = new Map([ ttl: 3600, record_type: RecordTypes.RecordTypeNS, content: { - host: "ns1.example.org" + host: "ns1.example.org." } }, { @@ -166,7 +166,7 @@ const recordDevData = new Map([ ttl: 3600, record_type: RecordTypes.RecordTypeNS, content: { - host: "ns2.example.org" + host: "ns2.example.org." } }, { @@ -186,7 +186,7 @@ const recordDevData = new Map([ ttl: 3600, record_type: RecordTypes.RecordTypeCNAME, content: { - host: "www.example.org" + host: "www.example.org." } } ] diff --git a/web/src/views/RecordsView.tsx b/web/src/views/RecordsView.tsx index 7de7b8a..66a2686 100644 --- a/web/src/views/RecordsView.tsx +++ b/web/src/views/RecordsView.tsx @@ -118,7 +118,7 @@ const generateColumns = (domain: string) => [ { key: '', render(row: Record) { - return + return } } ] as DataTableColumns @@ -238,7 +238,7 @@ function RecordsView({ domain }: Props) { } return (
- + editModalShow.value = v} /> { loading.value ? : }