🚸 修复域名列表错误
This commit is contained in:
parent
410dc1ac58
commit
cb8ced830c
@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
const domainStore = useDomainStore();
|
||||
|
||||
const domainStore = useDomainListStore();
|
||||
const SupportedTLDs = new Set(Object.keys(domainStore.SupportedTLDs));
|
||||
const isOpen = ref(false)
|
||||
const {t} = useI18n()
|
||||
@ -7,24 +8,24 @@ const {t} = useI18n()
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div title="Change Color">
|
||||
<div
|
||||
class="cursor-pointer flex h-10 w-10 items-center justify-center rounded-lg bg-gray-100 dark:bg-gray-700"
|
||||
@click="isOpen = true"
|
||||
>
|
||||
<Icon name="mdi:about-circle-outline" class=" text-lg dark:text-white" />
|
||||
</div>
|
||||
<div title="Change Color">
|
||||
<div
|
||||
class="cursor-pointer flex h-10 w-10 items-center justify-center rounded-lg bg-gray-100 dark:bg-gray-700"
|
||||
@click="isOpen = true"
|
||||
>
|
||||
<Icon name="mdi:about-circle-outline" class=" text-lg dark:text-white"/>
|
||||
</div>
|
||||
</div>
|
||||
<NDrawer
|
||||
v-model:show="isOpen"
|
||||
placement="left"
|
||||
:default-width="502"
|
||||
resizable
|
||||
>
|
||||
<NDrawerContent
|
||||
:title="t('index.support')"
|
||||
closable
|
||||
>
|
||||
<NDrawerContent
|
||||
:title="t('index.support')"
|
||||
closable
|
||||
>
|
||||
<div class="flex flex-wrap mt-2 ">
|
||||
<span
|
||||
v-for="item in SupportedTLDs"
|
||||
|
@ -9,14 +9,15 @@ export default defineI18nLocale(async locale => {
|
||||
reset: 'Reset',
|
||||
confirm: 'Confirm',
|
||||
add: 'Add',
|
||||
cancel: 'Cancel',
|
||||
}
|
||||
},
|
||||
whois:{
|
||||
whois: {
|
||||
title: 'Whois Query',
|
||||
description: 'Query the Whois information of {domain}, including registrant contact information, domain status, DNS records and other detailed information. Quickly and accurately obtain domain ownership and registration information.',
|
||||
keywords: 'Whois query, {domain}, domain information, domain owner, domain registration information'
|
||||
},
|
||||
dns:{
|
||||
dns: {
|
||||
title: 'DNS Query',
|
||||
description: 'Query the DNS records of {domain}, including A records, AAAA records, CNAME records, MX records, NS records, TXT records, etc.',
|
||||
keywords: 'DNS query, {domain}, domain resolution, domain resolution record',
|
||||
@ -29,7 +30,7 @@ export default defineI18nLocale(async locale => {
|
||||
//SOA record
|
||||
soaRecord: 'SOA record',
|
||||
},
|
||||
history:{
|
||||
history: {
|
||||
//Query history
|
||||
title: 'Query History',
|
||||
//Only keep the last 30/{{ styleStore.getHistory.length }} records
|
||||
@ -54,7 +55,7 @@ export default defineI18nLocale(async locale => {
|
||||
keywords: 'Domain whois query, whois query, whois information query, whois query tool, whois query website, whois query api, whois query interface',
|
||||
support: 'Currently only the following suffixes are supported',
|
||||
},
|
||||
error:{
|
||||
error: {
|
||||
formatDomain: 'Error formatting domain name',
|
||||
validDomain: 'Domain must contain a valid top-level domain',
|
||||
notFound: 'Domain not found',
|
||||
|
@ -12,6 +12,7 @@ export default defineI18nLocale(async locale => {
|
||||
confirm: '確定',
|
||||
//新增
|
||||
add: '新增',
|
||||
cancel: '取消',
|
||||
}
|
||||
},
|
||||
whois: {
|
||||
@ -32,7 +33,7 @@ export default defineI18nLocale(async locale => {
|
||||
//SOA記錄
|
||||
soaRecord: 'SOA記錄',
|
||||
},
|
||||
history:{
|
||||
history: {
|
||||
//查詢歷史
|
||||
title: '查詢歷史',
|
||||
//只保留最近 30/{{ styleStore.getHistory.length }} 條記錄
|
||||
|
34
lang/zh.ts
34
lang/zh.ts
@ -4,23 +4,25 @@ export default defineI18nLocale(async locale => {
|
||||
title: 'Nuxt Whois',
|
||||
},
|
||||
common: {
|
||||
actions: {
|
||||
//删除
|
||||
actions: {
|
||||
//删除
|
||||
delete: '删除',
|
||||
//重置
|
||||
//重置
|
||||
reset: '重置',
|
||||
//确定
|
||||
//确定
|
||||
confirm: '确定',
|
||||
//添加
|
||||
add: '添加',
|
||||
}
|
||||
//添加
|
||||
add: '添加',
|
||||
cancel: '取消',
|
||||
|
||||
}
|
||||
},
|
||||
whois:{
|
||||
whois: {
|
||||
title: "Whois查询",
|
||||
description: "查询{domain}的Whois信息,包括注册者联系方式、域名状态、DNS记录等详细信息。快速、准确地获取域名所有权和注册信息。",
|
||||
keywords: "Whois查询, {domain}, 域名信息, 域名所有者, 域名注册信息"
|
||||
},
|
||||
dns:{
|
||||
dns: {
|
||||
title: 'DNS查询',
|
||||
description: '查询{domain}的DNS记录,包括A记录、AAAA记录、CNAME记录、MX记录、NS记录、TXT记录等。',
|
||||
keywords: 'DNS查询, {domain}, 域名解析, 域名解析记录',
|
||||
@ -33,7 +35,7 @@ export default defineI18nLocale(async locale => {
|
||||
//SOA记录
|
||||
soaRecord: 'SOA记录',
|
||||
},
|
||||
history:{
|
||||
history: {
|
||||
//查询历史
|
||||
title: '查询历史',
|
||||
//只保留最近 30/{{ styleStore.getHistory.length }} 条记录
|
||||
@ -59,7 +61,7 @@ export default defineI18nLocale(async locale => {
|
||||
//目前仅支持以下后缀
|
||||
support: '目前仅支持以下后缀',
|
||||
},
|
||||
error:{
|
||||
error: {
|
||||
formatDomain: '域名格式错误',
|
||||
//域名必须包含有效的顶级域
|
||||
validDomain: '域名必须包含有效的顶级域',
|
||||
@ -161,19 +163,19 @@ export default defineI18nLocale(async locale => {
|
||||
currentWindow: '当前窗口',
|
||||
// 新窗口
|
||||
newWindow: '新窗口',
|
||||
// 后缀设置
|
||||
// 后缀设置
|
||||
suffixSetting: '后缀设置',
|
||||
// 后缀管理
|
||||
// 后缀管理
|
||||
suffixManage: '后缀管理',
|
||||
// 自定义后缀
|
||||
customSuffix: '自定义后缀',
|
||||
// 自定义编辑管理添加后缀
|
||||
// 自定义编辑管理添加后缀
|
||||
suffixDesc: '自定义编辑管理添加后缀',
|
||||
// 管理
|
||||
// 管理
|
||||
manage: '管理',
|
||||
suffixPlaceholder: '域名后缀,如 .cn',
|
||||
whoisPlaceholder: 'Whois服务器,如 whois.cnnic.net.cn',
|
||||
// 后缀已存在
|
||||
// 后缀已存在
|
||||
suffixExist: '后缀已存在',
|
||||
}
|
||||
}
|
||||
|
@ -62,8 +62,8 @@ const handleReset = async () => {
|
||||
</div>
|
||||
<n-popconfirm
|
||||
@positive-click="handleReset"
|
||||
:negative-text="t('settings.cancel')"
|
||||
:positive-text="t('settings.confirm')"
|
||||
:negative-text="t('common.actions.cancel')"
|
||||
:positive-text="t('common.actions.confirm')"
|
||||
>
|
||||
<template #trigger>
|
||||
<n-button type="warning"> {{ t('common.actions.reset') }}</n-button>
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import {defineStore} from 'pinia';
|
||||
import serversData from '~/server/whois/json/whois-servers.json';
|
||||
|
||||
// 定义接口来描述state的结构
|
||||
@ -6,10 +6,10 @@ interface DomainState {
|
||||
SupportedTLDs: Record<string, string>;
|
||||
}
|
||||
|
||||
export const useDomainStore = defineStore('domain', {
|
||||
export const useDomainListStore = defineStore('useDomainListStore', {
|
||||
// 使用箭头函数和类型注解定义state
|
||||
state: (): DomainState => ({
|
||||
SupportedTLDs: { ...serversData },
|
||||
SupportedTLDs: {...serversData},
|
||||
}),
|
||||
actions: {
|
||||
async addSuffix(suffix: string, server: string) {
|
||||
@ -43,7 +43,7 @@ export const useDomainStore = defineStore('domain', {
|
||||
}
|
||||
}
|
||||
},
|
||||
persist:{
|
||||
persist: {
|
||||
storage: persistedState.localStorage,
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user