diff --git a/web/src/components/domains/DomainEditModal.vue b/web/src/components/domains/DomainEditModal.vue
index e69de29..eb13a4d 100644
--- a/web/src/components/domains/DomainEditModal.vue
+++ b/web/src/components/domains/DomainEditModal.vue
@@ -0,0 +1,176 @@
+
+
+
+ {{ t('common.new') }}{{ t('common.edit') }}{{
+ t('domains._') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('domains.form.unitForSecond') }}
+
+
+
+
+
+
+ {{ t('domains.form.unitForSecond') }}
+
+
+
+
+
+
+ {{ t('domains.form.unitForSecond') }}
+
+
+
+
+
+
+ {{ t('domains.form.unitForSecond') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('common.cancel') }}
+
+
+
+
+
+
+
+
+ {{ t('common.confirm') }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/web/src/components/domains/DomainRemoveModal.vue b/web/src/components/domains/DomainRemoveModal.vue
index 54ec209..7420fd3 100644
--- a/web/src/components/domains/DomainRemoveModal.vue
+++ b/web/src/components/domains/DomainRemoveModal.vue
@@ -25,7 +25,7 @@
{{ t('common.cancel') }}
-
@@ -57,7 +57,7 @@ const domainStore = useDomainStore()
const notification = useNotification()
const props = defineProps<{
- domain: Domain | undefined
+ domain: Domain
}>()
async function confirm() {
diff --git a/web/src/locale/en-US.ts b/web/src/locale/en-US.ts
index 4db4748..2a5cf25 100644
--- a/web/src/locale/en-US.ts
+++ b/web/src/locale/en-US.ts
@@ -9,6 +9,7 @@ export default {
new: 'New',
cancel: 'Cancel',
confirm: 'OK',
+ mandatory: 'This field is mandatory'
},
api: {
error400: {
@@ -37,13 +38,26 @@ export default {
}
},
domains: {
+ '_': 'Domain',
dnsRecord: 'DNS Record',
delete: 'Remove Domain',
deleteHint: 'All records of this domain will be WIPED!',
confirm1: 'Please input',
- confirm2: 'for comfirmation'
+ confirm2: 'for comfirmation',
+
+ form: {
+ adminMail: 'Admin Email',
+ mainDNS: 'Main DNS',
+ unitForSecond: 'Second(s)'
+ },
+
+ errors: {
+ domainName: 'Invalid domain name',
+ mail: 'Invalid email',
+ }
},
records: {
+ '_': 'Record',
name: 'Record Name',
recordType: 'Type',
content: 'Record',
diff --git a/web/src/locale/zh-CN.ts b/web/src/locale/zh-CN.ts
index ee4b651..a39970f 100644
--- a/web/src/locale/zh-CN.ts
+++ b/web/src/locale/zh-CN.ts
@@ -9,6 +9,7 @@ export default {
new: '新增',
cancel: '取消',
confirm: '确定',
+ mandatory: '此项必填'
},
api: {
error400: {
@@ -37,13 +38,26 @@ export default {
}
},
domains: {
+ '_': '域名',
dnsRecord: 'DNS 记录',
delete: '删除域名',
deleteHint: '该域名所有记录将被删除!',
confirm1: '请输入',
- confirm2: '以确认要删除的域名'
+ confirm2: '以确认要删除的域名',
+
+ form: {
+ adminMail: '管理员邮箱',
+ mainDNS: '主 DNS 服务器',
+ unitForSecond: '秒'
+ },
+
+ errors: {
+ domainName: '这不是一个有效的域名',
+ mail: '这不是一个有效的邮箱',
+ }
},
records: {
+ '_': '记录',
name: '记录名',
recordType: '类型',
content: '记录值',
diff --git a/web/src/views/DomainsView.vue b/web/src/views/DomainsView.vue
index 778813a..97ea7a6 100644
--- a/web/src/views/DomainsView.vue
+++ b/web/src/views/DomainsView.vue
@@ -7,13 +7,15 @@ import { getErrorInfo } from '@/apis/api'
import DomainInfo from '@/components/domains/DomainInfo.vue'
import DomainOps from '@/components/domains/DomainOps.vue'
import DomainRemoveModal from '@/components/domains/DomainRemoveModal.vue'
+import DomainEditModal from '@/components/domains/DomainEditModal.vue'
const domainStore = useDomainStore()
const notification = useNotification()
const loading = defineModel('loading', { default: true });
const removeModalShow = defineModel('removeModalShow', { default: false })
-const operationDomain = defineModel('operationDomain')
+const editModalShow = defineModel('editModalShow', { default: false })
+const operationDomain = defineModel('operationDomain', { default: {} as Domain })
onMounted(() => {
try {
@@ -29,6 +31,16 @@ function showRemoveModal(domain: Domain) {
operationDomain.value = domain
removeModalShow.value = true
}
+
+function showEditModal(domain: Domain) {
+ operationDomain.value = domain
+ editModalShow.value = true
+}
+
+function addDomain() {
+ const domain = {} as Domain
+ showEditModal(domain)
+}
@@ -40,18 +52,19 @@ function showRemoveModal(domain: Domain) {
size="large" hoverable>
-
+
-
+
-
+
+