Skip to content

BillionMail gives you open-source MailServer, NewsLetter, Email Marketing — fully self-hosted, dev-friendly, and free from monthly fees. Join the discord: https://discord.gg/asfXzBUhZr

Added Mail Domain Page

zdm0e481321a88e
diff --git a/core/frontend/.env.development b/core/frontend/.env.development
new file mode 100644
index 00000000..7b714108
--- /dev/null
+++ b/core/frontend/.env.development
@@ -0,0 +1,4 @@
+NODE_ENV = 'development'
+
+# API Prefix
+API_URL_PREFIX = '/api'
diff --git a/core/frontend/.env.production b/core/frontend/.env.production
new file mode 100644
index 00000000..2c1a2cdc
--- /dev/null
+++ b/core/frontend/.env.production
@@ -0,0 +1,4 @@
+NODE_ENV = 'production'
+
+# API Prefix
+API_URL_PREFIX = ''
diff --git a/core/frontend/build/config.ts b/core/frontend/build/config.ts
new file mode 100644
index 00000000..976c069c
--- /dev/null
+++ b/core/frontend/build/config.ts
@@ -0,0 +1,11 @@
+import { ServerConfig } from './interface'
+
+const serverConfig: Record<string, ServerConfig> = {
+ '192.168.66.66': {
+ https: false,
+ ip: '192.168.66.66',
+ port: 64325,
+ },
+}
+
+export default serverConfig
diff --git a/core/frontend/build/interface.ts b/core/frontend/build/interface.ts
new file mode 100644
index 00000000..99ec81b6
--- /dev/null
+++ b/core/frontend/build/interface.ts
@@ -0,0 +1,5 @@
+export interface ServerConfig {
+ https: boolean
+ ip: string
+ port: number
+}
diff --git a/core/frontend/build/utils.ts b/core/frontend/build/utils.ts
new file mode 100644
index 00000000..28503855
--- /dev/null
+++ b/core/frontend/build/utils.ts
@@ -0,0 +1,39 @@
+import { loadEnv } from '@rsbuild/core'
+import serverConfig from './config'
+
+/**
+ * @description 获取环境变量
+ * @param key
+ * @returns
+ */
+export function getEnv(key: string) {
+ const { parsed } = loadEnv()
+ return parsed[key]
+}
+
+/**
+ * @description 获取服务器配置
+ * @returns
+ */
+export function getServer() {
+ const name = getEnv('SERVER_NAME')
+ return serverConfig[name]
+}
+
+/**
+ * @description 获取代理地址
+ * @returns
+ */
+export const getProxyAddress = () => {
+ const server = getServer()
+ return `http${server.https ? 's' : ''}://${server.ip}:${server.port}`
+}
+
+/**
+ * @description 获取是否使用 HTTPS
+ * @returns
+ */
+export function getHttps() {
+ const server = getServer()
+ return server.https === true
+}
diff --git a/core/frontend/eslint.config.mjs b/core/frontend/eslint.config.mjs
index 9ae86a3d..6020199e 100644
--- a/core/frontend/eslint.config.mjs
+++ b/core/frontend/eslint.config.mjs
@@ -65,6 +65,8 @@ export default [
rules: {
...tsPlugin.configs.recommended.rules,
'@typescript-eslint/no-unused-vars': 'warn', // Warn on unused variables
+ '@typescript-eslint/no-explicit-any': 'off', // Allow any type
+ '@typescript-eslint/no-unsafe-function-type': 'off', // Allow unsafe function types
},
},
// Prettier configuration (must be last)
diff --git a/core/frontend/package.json b/core/frontend/package.json
index f1557594..b0726ac1 100644
--- a/core/frontend/package.json
+++ b/core/frontend/package.json
@@ -14,11 +14,13 @@
"dependencies": {
"@unocss/reset": "66.1.0-beta.7",
"@vueuse/core": "^13.0.0",
+ "axios": "^1.8.4",
"date-fns": "^4.1.0",
"echarts": "^5.6.0",
"lodash-es": "^4.17.21",
"pinia": "^3.0.1",
"pinia-plugin-persistedstate": "^4.2.0",
+ "resize-observer-polyfill": "^1.5.1",
"vue": "^3.5.13",
"vue-i18n": "12.0.0-alpha.2",
"vue-router": "^4.5.0"
@@ -48,6 +50,7 @@
"globals": "^16.0.0",
"naive-ui": "^2.41.0",
"prettier": "^3.5.2",
+ "sass": "^1.86.1",
"typescript": "^5.8.2",
"typescript-eslint": "^8.25.0",
"unocss": "66.1.0-beta.7",
diff --git a/core/frontend/pnpm-lock.yaml b/core/frontend/pnpm-lock.yaml
index 9809a2c7..55c4fc80 100644
--- a/core/frontend/pnpm-lock.yaml
+++ b/core/frontend/pnpm-lock.yaml
@@ -14,6 +14,9 @@ importers:
'@vueuse/core':
specifier: ^13.0.0
+ axios:
+ specifier: ^1.8.4
+ version: 1.8.4
date-fns:
specifier: ^4.1.0
version: 4.1.0
@@ -29,6 +32,9 @@ importers:
pinia-plugin-persistedstate:
specifier: ^4.2.0
+ resize-observer-polyfill:
+ specifier: ^1.5.1
+ version: 1.5.1
vue:
specifier: ^3.5.13
version: 3.5.13([email protected])
@@ -111,6 +117,9 @@ importers:
prettier:
specifier: ^3.5.2
version: 3.5.3
+ sass:
+ specifier: ^1.86.1
+ version: 1.86.1
typescript:
specifier: ^5.8.2
version: 5.8.2
@@ -119,7 +128,7 @@ importers:
unocss:
specifier: 66.1.0-beta.7
unplugin-auto-import:
specifier: ^19.1.2
@@ -599,6 +608,94 @@ packages:
resolution: {integrity: sha512-Perby8hJGUeCWad5oTVXb/Ibvp18ZCUC5PxHHu+acMDmVfnxSo48yqk7qNd09VkTF3LEzoEjNZpmW2ZWN0ry7A==}
engines: {node: '>=18.12.0'}
+ '@parcel/[email protected]':
+ resolution: {integrity: sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [arm64]
+ os: [android]
+
+ '@parcel/[email protected]':
+ resolution: {integrity: sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [arm64]
+ os: [darwin]
+
+ '@parcel/[email protected]':
+ resolution: {integrity: sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [x64]
+ os: [darwin]
+
+ '@parcel/[email protected]':
+ resolution: {integrity: sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [x64]
+ os: [freebsd]
+
+ '@parcel/[email protected]':
+ resolution: {integrity: sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [arm]
+ os: [linux]
+ libc: [glibc]
+
+ '@parcel/[email protected]':
+ resolution: {integrity: sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [arm]
+ os: [linux]
+ libc: [musl]
+
+ '@parcel/[email protected]':
+ resolution: {integrity: sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [arm64]
+ os: [linux]
+ libc: [glibc]
+
+ '@parcel/[email protected]':
+ resolution: {integrity: sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [arm64]
+ os: [linux]
+ libc: [musl]
+
+ '@parcel/[email protected]':
+ resolution: {integrity: sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [x64]
+ os: [linux]
+ libc: [glibc]
+
+ '@parcel/[email protected]':
+ resolution: {integrity: sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [x64]
+ os: [linux]
+ libc: [musl]
+
+ '@parcel/[email protected]':
+ resolution: {integrity: sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [arm64]
+ os: [win32]
+
+ '@parcel/[email protected]':
+ resolution: {integrity: sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [ia32]
+ os: [win32]
+
+ '@parcel/[email protected]':
+ resolution: {integrity: sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [x64]
+ os: [win32]
+
+ '@parcel/[email protected]':
+ resolution: {integrity: sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==}
+ engines: {node: '>= 10.0.0'}
+
resolution: {integrity: sha512-vsJDAkYR6qCPu+ioGScGiMYR7LvZYIXh/dlQeviqoTWNCVfKTLYD/LkNWH4Mxsv2a5vpIRc77FN5DnmK1eBggQ==}
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
@@ -1209,6 +1306,12 @@ packages:
resolution: {integrity: sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==}
+ resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
+
+ resolution: {integrity: sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==}
+
resolution: {integrity: sha512-XRq+XTD4bub6HkavELMhihvLX2++JkSBAxRXlqQK32b+Tb0S9PEqxrDSMpOEZ1iGyOaJZj9Y0uU/FzICdyL9MA==}
@@ -1261,6 +1364,10 @@ packages:
resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==}
+ engines: {node: '>= 0.4'}
+
resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==}
engines: {node: '>=6'}
@@ -1304,6 +1411,10 @@ packages:
resolution: {integrity: sha512-twmVoizEW7ylZSN32OgKdXRmo1qg+wT5/6C3xu5b9QsWzSFAhHLn2xd8ro0diCsKfCj1RdaTP/nrcW+vAoQPIw==}
+ resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
+ engines: {node: '>= 0.8'}
+
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
@@ -1385,13 +1496,26 @@ packages:
resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==}
+ resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
+ engines: {node: '>=0.4.0'}
+
resolution: {integrity: sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==}
+ resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==}
+ engines: {node: '>=0.10'}
+ hasBin: true
+
resolution: {integrity: sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==}
engines: {node: '>=12'}
+ resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==}
+ engines: {node: '>= 0.4'}
+
resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==}
@@ -1416,9 +1540,25 @@ packages:
resolution: {integrity: sha512-fZmsRiDNv07K6s2KkKFTiD2aIvECa7++PKyD5NC32tpRw46qZA3sOz+aM+/V9V0GDHxVTKLziveV4JhzBHDp9Q==}
+ resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==}
+ engines: {node: '>= 0.4'}
+
+ resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}
+ engines: {node: '>= 0.4'}
+
resolution: {integrity: sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==}
+ resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==}
+ engines: {node: '>= 0.4'}
+
+ resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==}
+ engines: {node: '>= 0.4'}
+
resolution: {integrity: sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==}
engines: {node: '>=18'}
@@ -1584,15 +1724,39 @@ packages:
resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==}
+ resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==}
+ engines: {node: '>=4.0'}
+ peerDependencies:
+ debug: '*'
+ peerDependenciesMeta:
+ debug:
+ optional: true
+
+ resolution: {integrity: sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==}
+ engines: {node: '>= 6'}
+
resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
os: [darwin]
+ resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}
+
resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==}
engines: {node: '>=6.9.0'}
+ resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==}
+ engines: {node: '>= 0.4'}
+
+ resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==}
+ engines: {node: '>= 0.4'}
+
resolution: {integrity: sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA==}
hasBin: true
@@ -1628,6 +1792,10 @@ packages:
resolution: {integrity: sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==}
engines: {node: '>=18'}
+ resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==}
+ engines: {node: '>= 0.4'}
+
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
@@ -1642,9 +1810,21 @@ packages:
resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==}
+ engines: {node: '>= 0.4'}
+
+ resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==}
+ engines: {node: '>= 0.4'}
+
resolution: {integrity: sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==}
+ resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
+ engines: {node: '>= 0.4'}
+
resolution: {integrity: sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==}
engines: {node: '>=12.0.0'}
@@ -1797,6 +1977,10 @@ packages:
resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==}
+ resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}
+ engines: {node: '>= 0.4'}
+
resolution: {integrity: sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==}
@@ -1855,6 +2039,9 @@ packages:
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
+ resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==}
+
resolution: {integrity: sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==}
@@ -1978,6 +2165,9 @@ packages:
engines: {node: '>=14'}
hasBin: true
+ resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==}
+
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
engines: {node: '>=6'}
@@ -2009,6 +2199,9 @@ packages:
resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==}
engines: {node: '>=0.10.0'}
+ resolution: {integrity: sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==}
+
resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==}
engines: {node: '>=4'}
@@ -2159,6 +2352,11 @@ packages:
engines: {node: '>=16.0.0'}
hasBin: true
+ resolution: {integrity: sha512-Yaok4XELL1L9Im/ZUClKu//D2OP1rOljKj0Gf34a+GzLbMveOzL7CfqYo+JUa5Xt1nhTCW+OcKp/FtR7/iqj1w==}
+ engines: {node: '>=14.0.0'}
+ hasBin: true
+
resolution: {integrity: sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g==}
engines: {node: '>= 10.13.0'}
@@ -3049,6 +3247,67 @@ snapshots:
transitivePeerDependencies:
- magicast
+ '@parcel/[email protected]':
+ optional: true
+
+ '@parcel/[email protected]':
+ optional: true
+
+ '@parcel/[email protected]':
+ optional: true
+
+ '@parcel/[email protected]':
+ optional: true
+
+ '@parcel/[email protected]':
+ optional: true
+
+ '@parcel/[email protected]':
+ optional: true
+
+ '@parcel/[email protected]':
+ optional: true
+
+ '@parcel/[email protected]':
+ optional: true
+
+ '@parcel/[email protected]':
+ optional: true
+
+ '@parcel/[email protected]':
+ optional: true
+
+ '@parcel/[email protected]':
+ optional: true
+
+ '@parcel/[email protected]':
+ optional: true
+
+ '@parcel/[email protected]':
+ optional: true
+
+ '@parcel/[email protected]':
+ dependencies:
+ detect-libc: 1.0.3
+ is-glob: 4.0.3
+ micromatch: 4.0.8
+ node-addon-api: 7.1.1
+ optionalDependencies:
+ '@parcel/watcher-android-arm64': 2.5.1
+ '@parcel/watcher-darwin-arm64': 2.5.1
+ '@parcel/watcher-darwin-x64': 2.5.1
+ '@parcel/watcher-freebsd-x64': 2.5.1
+ '@parcel/watcher-linux-arm-glibc': 2.5.1
+ '@parcel/watcher-linux-arm-musl': 2.5.1
+ '@parcel/watcher-linux-arm64-glibc': 2.5.1
+ '@parcel/watcher-linux-arm64-musl': 2.5.1
+ '@parcel/watcher-linux-x64-glibc': 2.5.1
+ '@parcel/watcher-linux-x64-musl': 2.5.1
+ '@parcel/watcher-win32-arm64': 2.5.1
+ '@parcel/watcher-win32-ia32': 2.5.1
+ '@parcel/watcher-win32-x64': 2.5.1
+ optional: true
+
'@pkgr/[email protected]': {}
'@polka/[email protected]': {}
@@ -3398,13 +3657,13 @@ snapshots:
'@typescript-eslint/types': 8.28.0
eslint-visitor-keys: 4.2.0
dependencies:
'@unocss/core': 66.1.0-beta.7
'@unocss/reset': 66.1.0-beta.7
optionalDependencies:
transitivePeerDependencies:
- vue
@@ -3535,7 +3794,7 @@ snapshots:
dependencies:
'@unocss/core': 66.1.0-beta.7
dependencies:
'@ampproject/remapping': 2.3.0
'@unocss/config': 66.1.0-beta.7
@@ -3545,7 +3804,7 @@ snapshots:
magic-string: 0.30.17
tinyglobby: 0.2.12
unplugin-utils: 0.2.4
transitivePeerDependencies:
- vue
@@ -3800,6 +4059,16 @@ snapshots:
+
+ dependencies:
+ follow-redirects: 1.15.9
+ form-data: 4.0.2
+ proxy-from-env: 1.1.0
+ transitivePeerDependencies:
+ - debug
+
dependencies:
'@babel/core': 7.26.10
@@ -3858,6 +4127,11 @@ snapshots:
+ dependencies:
+ es-errors: 1.3.0
+ function-bind: 1.1.2
+
@@ -3901,6 +4175,10 @@ snapshots:
+ dependencies:
+ delayed-stream: 1.0.0
+
@@ -3961,10 +4239,21 @@ snapshots:
+
+ optional: true
+
+ dependencies:
+ call-bind-apply-helpers: 1.0.2
+ es-errors: 1.3.0
+ gopd: 1.2.0
+
@@ -3985,8 +4274,23 @@ snapshots:
+
+
+ dependencies:
+ es-errors: 1.3.0
+
+ dependencies:
+ es-errors: 1.3.0
+ get-intrinsic: 1.3.0
+ has-tostringtag: 1.0.2
+ hasown: 2.0.2
+
optionalDependencies:
'@esbuild/aix-ppc64': 0.25.1
@@ -4189,11 +4493,40 @@ snapshots:
+
+ dependencies:
+ asynckit: 0.4.0
+ combined-stream: 1.0.8
+ es-set-tostringtag: 2.1.0
+ mime-types: 2.1.35
+
optional: true
+
+ dependencies:
+ call-bind-apply-helpers: 1.0.2
+ es-define-property: 1.0.1
+ es-errors: 1.3.0
+ es-object-atoms: 1.1.1
+ function-bind: 1.1.2
+ get-proto: 1.0.1
+ gopd: 1.2.0
+ has-symbols: 1.1.0
+ hasown: 2.0.2
+ math-intrinsics: 1.1.0
+
+ dependencies:
+ dunder-proto: 1.0.1
+ es-object-atoms: 1.1.1
+
dependencies:
citty: 0.1.6
@@ -4230,6 +4563,8 @@ snapshots:
slash: 5.1.0
unicorn-magic: 0.3.0
+
@@ -4240,8 +4575,18 @@ snapshots:
+
+ dependencies:
+ has-symbols: 1.1.0
+
+ dependencies:
+ function-bind: 1.1.2
+
@@ -4370,6 +4715,8 @@ snapshots:
dependencies:
'@jridgewell/sourcemap-codec': 1.5.0
+
@@ -4437,6 +4784,9 @@ snapshots:
+ optional: true
+
@@ -4555,6 +4905,8 @@ snapshots:
+
@@ -4580,6 +4932,8 @@ snapshots:
+
@@ -4714,6 +5068,14 @@ snapshots:
sass-embedded-win32-ia32: 1.86.0
sass-embedded-win32-x64: 1.86.0
+ dependencies:
+ chokidar: 4.0.3
+ immutable: 5.1.1
+ source-map-js: 1.2.1
+ optionalDependencies:
+ '@parcel/watcher': 2.5.1
+
dependencies:
'@types/json-schema': 7.0.15
@@ -4888,9 +5250,9 @@ snapshots:
unplugin: 2.2.2
unplugin-utils: 0.2.4
dependencies:
'@unocss/cli': 66.1.0-beta.7
'@unocss/core': 66.1.0-beta.7
'@unocss/postcss': 66.1.0-beta.7([email protected])
@@ -4908,10 +5270,10 @@ snapshots:
'@unocss/transformer-compile-class': 66.1.0-beta.7
'@unocss/transformer-directives': 66.1.0-beta.7
'@unocss/transformer-variant-group': 66.1.0-beta.7
optionalDependencies:
'@unocss/webpack': 66.1.0-beta.7([email protected])
transitivePeerDependencies:
- postcss
- supports-color
@@ -4985,7 +5347,7 @@ snapshots:
evtd: 0.2.4
vue: 3.5.13([email protected])
dependencies:
esbuild: 0.25.1
postcss: 8.5.3
@@ -4994,6 +5356,7 @@ snapshots:
'@types/node': 22.13.13
fsevents: 2.3.3
jiti: 2.4.2
+ sass: 1.86.1
sass-embedded: 1.86.0
terser: 5.39.0
diff --git a/core/frontend/rsbuild.config.ts b/core/frontend/rsbuild.config.ts
index c8ed2a43..ed95fc6d 100644
--- a/core/frontend/rsbuild.config.ts
+++ b/core/frontend/rsbuild.config.ts
@@ -9,6 +9,7 @@ import { NaiveUiResolver } from 'unplugin-vue-components/resolvers'
import { pluginBasicSsl } from '@rsbuild/plugin-basic-ssl'
import Components from 'unplugin-vue-components/rspack'
import AutoImport from 'unplugin-auto-import/rspack'
+import { getHttps, getProxyAddress, getServer, getEnv } from './build/utils'
export default defineConfig({
plugins: [
@@ -18,7 +19,7 @@ export default defineConfig({
pluginVue(),
pluginVueJsx(),
pluginSass(),
- pluginBasicSsl(),
+ ...(getHttps() ? [pluginBasicSsl()] : []),
pluginEslint({
eslintPluginOptions: {
cwd: __dirname,
@@ -58,5 +59,21 @@ export default defineConfig({
'@': './src/',
'@images': './src/assets/images/',
},
+ define: {
+ 'import.meta.env': JSON.stringify({
+ SERVER: getServer(),
+ API_URL_PREFIX: getEnv('API_URL_PREFIX'),
+ }),
+ },
+ },
+ server: {
+ proxy: {
+ '/api': {
+ target: getProxyAddress(),
+ secure: false,
+ changeOrigin: true,
+ pathRewrite: { '^/api': '' },
+ },
+ },
},
})
diff --git a/core/frontend/src/App.vue b/core/frontend/src/App.vue
index 090138af..ed26f608 100644
--- a/core/frontend/src/App.vue
+++ b/core/frontend/src/App.vue
@@ -1,5 +1,5 @@
<template>
- <config-provider>
+ <bt-config-provider>
<router-view></router-view>
- </config-provider>
+ </bt-config-provider>
</template>
diff --git a/core/frontend/src/api/index.ts b/core/frontend/src/api/index.ts
new file mode 100644
index 00000000..5db69894
--- /dev/null
+++ b/core/frontend/src/api/index.ts
@@ -0,0 +1,68 @@
+import axios from 'axios'
+import router from '@/router'
+import { useUserStore } from '@/store'
+import { apiUrlPrefix, isObject } from '@/utils'
+import { Message } from '@/utils/message'
+
+interface FetchOptions {
+ prefix: string
+}
+
+const instance = axios.create({
+ baseURL: apiUrlPrefix,
+ timeout: 250000,
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ fetchOptions: {
+ prefix: '/api',
+ successMessage: false,
+ },
+})
+
+const whitePathList = ['/login']
+
+// 请求拦截器 增加token
+instance.interceptors.request.use(config => {
+ const { headers, url } = config
+ if (!whitePathList.includes(url || '')) {
+ const userStore = useUserStore()
+ headers.Authorization = `Bearer ${userStore.login.token}`
+ }
+ return config
+})
+
+// 请求拦截器 处理请求前缀
+instance.interceptors.request.use(config => {
+ const { fetchOptions } = config
+ if (isObject<FetchOptions>(fetchOptions)) {
+ config.url = `${fetchOptions.prefix}` + config.url
+ }
+ return config
+})
+
+// 成功、失败处理
+instance.interceptors.response.use(
+ response => {
+ const { fetchOptions } = response.config
+ const { code, data, msg, success } = response.data || {}
+ if (code === 0 && success) {
+ if (fetchOptions?.successMessage) {
+ Message.success(msg)
+ }
+ return Promise.resolve(data)
+ }
+ if (!success && msg) {
+ Message.error(msg)
+ }
+ if (code === 401) {
+ router.push('/login')
+ }
+ return Promise.reject(response.data)
+ },
+ error => {
+ return Promise.reject(error)
+ }
+)
+
+export { instance }
diff --git a/core/frontend/src/api/modules/domain.ts b/core/frontend/src/api/modules/domain.ts
new file mode 100644
index 00000000..0a340fc7
--- /dev/null
+++ b/core/frontend/src/api/modules/domain.ts
@@ -0,0 +1,35 @@
+import { instance } from '@/api'
+
+export const getDomainList = (params: { page: number; page_size: number; keyword: string }) => {
+ return instance.get('/domains/list', { params })
+}
+
+type DomainParams = {
+ domain: string
+ quota: number
+ mailboxes: number
+}
+
+export const createDomain = (params: DomainParams) => {
+ return instance.post('/domains/create', params, {
+ fetchOptions: {
+ successMessage: true,
+ },
+ })
+}
+
+export const updateDomain = (params: DomainParams) => {
+ return instance.post('/domains/update', params, {
+ fetchOptions: {
+ successMessage: true,
+ },
+ })
+}
+
+export const deleteDomain = (params: { domain: string }) => {
+ return instance.post('/domains/delete', params, {
+ fetchOptions: {
+ successMessage: true,
+ },
+ })
+}
diff --git a/core/frontend/src/api/modules/user.ts b/core/frontend/src/api/modules/user.ts
new file mode 100644
index 00000000..a766d135
--- /dev/null
+++ b/core/frontend/src/api/modules/user.ts
@@ -0,0 +1,14 @@
+import { instance } from '@/api'
+
+/**
+ * @description 登录
+ * @param params
+ * @returns
+ */
+export const login = (params: { username: string; password: string }) => {
+ return instance.post('/login', params, {
+ fetchOptions: {
+ successMessage: true,
+ },
+ })
+}
diff --git a/core/frontend/src/components/v-charts/index.vue b/core/frontend/src/components/bt-charts/index.vue
similarity index 100%
rename from core/frontend/src/components/v-charts/index.vue
rename to core/frontend/src/components/bt-charts/index.vue
diff --git a/core/frontend/src/components/bt-close-btn/index.vue b/core/frontend/src/components/bt-close-btn/index.vue
new file mode 100644
index 00000000..6f677b52
--- /dev/null
+++ b/core/frontend/src/components/bt-close-btn/index.vue
@@ -0,0 +1,40 @@
+<template>
+ <div class="bt-close-btn" @click="handleClose">
+ <div class="close-icon"></div>
+ </div>
+</template>
+
+<script lang="ts" setup>
+const emit = defineEmits<{
+ click: [value: Event]
+}>()
+
+const handleClose = (e: Event) => {
+ emit('click', e)
+}
+</script>
+
+<style lang="scss" scoped>
+.bt-close-btn {
+ position: absolute;
+ top: 15px;
+ right: 15px;
+ z-index: 1000;
+ .close-icon {
+ position: absolute;
+ top: -28px;
+ right: -28px;
+ width: 30px;
+ height: 30px;
+ border-radius: 50%;
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAKwwAACsMBNCkkqwAAABZ0RVh0Q3JlYXRpb24gVGltZQAwMy8xNC8xNxpI5/gAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAEN0lEQVRIiaWXTUhjVxTH/+diAmNMDGpCSCBNtWFEIQ0MFAYGZlNt6aKbUhpxYeAZxY0MlGy7K67LLIraYA26sd2UblrUEYp0oIKIgviBaaqNlYRIJgkulDm3i+Q9XvJenjoeCLxz7j3nd9595957QlJKqEJEsBJmfg7gGYAgAB+AtwAKRPQ3gE0i2rQMoBcppfZrMR5l5llmzstbhJn/ZeaXzDxw5wRMgEFmnrkNZpHEN8zsaRXfdG2llB9LKX8iIrfeXigUsLe3h1KphGq1CiKCw+FAV1cXIpEIurq6muP8ByAmhPjjVjAzjxHRj3rb7u4u1tbWkM/nLVfJ7/djeHgY/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5us3WE/neAAAAAASUVORK5CYII=');
+ background-position: center;
+ transition: all 0.4s ease-in-out;
+ cursor: pointer;
+ &:hover {
+ transform: rotate(180deg);
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAKwwAACsMBNCkkqwAAABZ0RVh0Q3JlYXRpb24gVGltZQAwMy8xNC8xNxpI5/gAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAEXUlEQVRIiaWXf2iVZRTHv8957t3d3ruSja0mA82NLTMl7gZzjJH0A0RLCKIiskDTzFhmhFrLqKDAMtHMGvvRVn8lSFFS2i/s19rWmC2DVlKbiRtzc2Ngce1u95ynP+7e1/e97/2x6fnvnOf5ns95fr3P8yrMw0RkFYB6AIsAlABgABeUUmcAdCqlOueTL6MZYx5g4QEWZpPFWDjOwqdYeN3VAGtZuDsbLEMRJ1h4abr8Kg10pxjZQ4o87dOjo+CeXtDkFGR4GABAlRUwxUUI1K1EIJzvySNGBMB2TfqtrGAWbiVFmzzArh7EWzsQ/6k37Qwpy0LgztsR2LwBwfKy5AJe0aRfSAtm4UZS9KrjT0witvtlxL//IS3QZ8EchDY+guATj4GCQTd8m3vkDpiFbwXwrT29M4NDiDVsh5w9N3eoywL1dQgd2AttWTY4TorKlFLnAIBcfffaUJ6YQOzxbVcMBYB4ZxemdzTCxOMAAFIUANBqtxMAGGPWk6IaOxjb8TxkZOSKobbNfPMdplva3aHVLHyHAxYjzsLPfPFVyk1ES2/MCFGWBVpY4otPt7ZDxsbdodccMCmqtKOxg2/7xMG71iD/o8Ow2puhQiF/UZUVCB//BPmfH4WaXVPbTCyGWFPL5b6KqgCAWHiXHeT+XyFnzvoS88/9kAsTCNTWIK/poAdO5WUItzeDiosQ7+2DiUZ9+vixL2H+i9muYuENBGCt06G7xycCABk9j+jGLT44lZch/H4bVGEBuLcPlxqeTqk3//4D+W3AHbqHANzgAP4aSikEABkc8sCttiYPNLqlASYWS6vn30+73QoiRdc6yScn0gqT4bo6MmcoAJipKbdbQJ5WlozilKb1/DUASIxcdJyiosydlyyGNbuR+GS/M3KrrSnlbnebKihwu1ME4G8ncfmSzND32hLQ3j5EN231TLvV1uQ7Ssl6l/1JAI7ZXqCuNrVoYYkXOrumyWued2g/QOTTq1AIurrKHfqYSNF+29ORW0ClpT6hXnZT4pz29Po2kgMfG0egOgKVm+vTB+5eA5XrLIXRpDsSl4LwRVJ0DQDMfHocl3Y2+kddXgYZTH/cVCgEtWABZHzc2xDMQfjoEejFixKFGvlFk47Y8/KM02/taugVy32JM0GBxKfRBwWQ8/CDDnTWngO897EzahkbR/S+hyATmc91NgusrIHVcgiYfRCIkR816XrAex8/KiZxjun665D3zptZj1cm01UR5O3b44YaAE/Z7Q5Ykz4C4A3HX74M1ocfQFdF5g0N3n8vwh3NUIWes7tbkz5pO3N67M18fQLTze+CvR96P/C2Vch5cit00t0tRg5o0p4bJOXzloVfBPASqaQv6vAIuKsbPPDH5QR5eaAVN0PX1kAXFiYDDSl6Vin1esaKk+DrWPjUVTzou40xqb9IcyxgMwsPsmT9gzHGGGHh08aY9dnyppzqDEXsQuLhUAyglBSJGBkFcB7AZ5r0vrnm+h+4JqLbk005nAAAAABJRU5ErkJggg==');
+ }
+ }
+}
+</style>
diff --git a/core/frontend/src/components/config-provider/index.vue b/core/frontend/src/components/bt-config-provider/index.vue
similarity index 69%
rename from core/frontend/src/components/config-provider/index.vue
rename to core/frontend/src/components/bt-config-provider/index.vue
index 562fb0a2..a9ddf1f0 100644
--- a/core/frontend/src/components/config-provider/index.vue
+++ b/core/frontend/src/components/bt-config-provider/index.vue
@@ -27,5 +27,15 @@ const themeOverrides = {
Menu: {
fontSize: '14px',
},
+ Form: {
+ feedbackHeightMedium: '20px',
+ feedbackHeightLarge: '22px',
+ feedbackFontSizeMedium: '12px',
+ feedbackFontSizeLarge: '12px',
+ feedbackPadding: '2px 0 0',
+ labelFontSizeLeftMedium: '12px',
+ labelPaddingHorizontal: '0 20px 0 0',
+ labelFontSizeTopMedium: '12px',
+ },
}
</script>
diff --git a/core/frontend/src/components/bt-form/index.vue b/core/frontend/src/components/bt-form/index.vue
new file mode 100644
index 00000000..56903838
--- /dev/null
+++ b/core/frontend/src/components/bt-form/index.vue
@@ -0,0 +1,39 @@
+<template>
+ <n-form
+ v-bind="$attrs"
+ ref="formRef"
+ :model="model"
+ :rules="rules"
+ :label-width="labelWidth"
+ :label-placement="labelPlacement"
+ :show-require-mark="false">
+ <slot></slot>
+ </n-form>
+</template>
+
+<script lang="ts" setup>
+import { FormInst, FormRules, LabelPlacement } from 'naive-ui/es/form/src/interface'
+
+interface Props {
+ model?: Record<string, unknown>
+ rules?: FormRules
+ labelWidth?: string | number
+ labelPlacement?: LabelPlacement
+}
+
+withDefaults(defineProps<Props>(), {
+ labelWidth: '130',
+ labelPlacement: 'left',
+})
+
+const formRef = ref<FormInst | null>(null)
+
+defineExpose({
+ validate: () => {
+ return formRef.value?.validate()
+ },
+ restoreValidation: () => {
+ return formRef.value?.restoreValidation()
+ },
+})
+</script>
diff --git a/core/frontend/src/components/bt-message/animation.scss b/core/frontend/src/components/bt-message/animation.scss
new file mode 100644
index 00000000..6ea1984d
--- /dev/null
+++ b/core/frontend/src/components/bt-message/animation.scss
@@ -0,0 +1,34 @@
+@keyframes bounce-in {
+ 0% {
+ opacity: 0;
+ transform: scale(0.5);
+ }
+ 100% {
+ opacity: 1;
+ transform: scale(1);
+ }
+}
+
+@keyframes bounce-out {
+ 0% {
+ transform: scale(1);
+ }
+ 30% {
+ transform: scale(1.05);
+ }
+ 100% {
+ opacity: 0;
+ transform: scale(0.7);
+ }
+}
+
+.bounce-enter-active {
+ animation: bounce-in 0.3s;
+ animation-fill-mode: both;
+}
+
+.bounce-leave-active {
+ animation-name: bounce-out;
+ animation-duration: 0.2s;
+ animation-fill-mode: both;
+}
diff --git a/core/frontend/src/components/bt-message/index.module.scss b/core/frontend/src/components/bt-message/index.module.scss
new file mode 100644
index 00000000..4543e595
--- /dev/null
+++ b/core/frontend/src/components/bt-message/index.module.scss
@@ -0,0 +1,15 @@
+.bt-message {
+ position: fixed;
+ left: 0;
+ top: 0;
+ display: flex;
+ align-items: center;
+ min-width: 180px;
+ max-width: 360px;
+ max-height: 700px;
+ padding: 16px;
+ border: 1px solid #d3d4d3;
+ border-radius: 4px;
+ background-color: #fff;
+ opacity: 0;
+}
diff --git a/core/frontend/src/components/bt-message/index.tsx b/core/frontend/src/components/bt-message/index.tsx
new file mode 100644
index 00000000..22a68bb7
--- /dev/null
+++ b/core/frontend/src/components/bt-message/index.tsx
@@ -0,0 +1,169 @@
+import ResizeObserver from 'resize-observer-polyfill'
+import { withDirectives } from 'vue'
+import { NIcon, zindexable } from 'naive-ui'
+import { formatLength, render } from 'naive-ui/es/_utils'
+import { NBaseLoading } from 'naive-ui/es/_internal'
+import { SuccessIcon, ErrorIcon, WarningIcon, InfoIcon } from 'naive-ui/es/_internal/icons'
+import type { MessageType, RenderContent } from './interface'
+import styles from './index.module.scss'
+
+import BtCloseBtn from '../bt-close-btn/index.vue'
+
+export default defineComponent({
+ name: 'BtMessage',
+ props: {
+ type: {
+ type: String as PropType<MessageType>,
+ default: 'info',
+ },
+ content: {
+ type: [String, Function] as PropType<RenderContent>,
+ default: '',
+ },
+ duration: {
+ type: Number,
+ default: 2500,
+ },
+ close: {
+ type: Boolean,
+ default: false,
+ },
+ isHtml: {
+ type: Boolean,
+ default: false,
+ },
+ maxWidth: {
+ type: [String, Number],
+ default: 360,
+ },
+ zIndex: Number,
+ },
+ emits: ['close'],
+ setup(props, { emit }) {
+ const messageRef = ref<HTMLElement | null>(null)
+
+ const typeMap = {
+ success: {
+ icon: () => <SuccessIcon></SuccessIcon>,
+ color: '#20a53a',
+ },
+ error: {
+ icon: () => <ErrorIcon></ErrorIcon>,
+ color: '#E85445',
+ },
+ warning: {
+ icon: () => <WarningIcon></WarningIcon>,
+ color: '#e6a23c',
+ },
+ info: {
+ icon: () => <InfoIcon></InfoIcon>,
+ color: '#2080F0',
+ },
+ loading: {
+ icon: () => <NBaseLoading clsPrefix="bt" strokeWidth={24} scale={0.85}></NBaseLoading>,
+ color: '#20a53a',
+ },
+ }
+
+ const iconInfo = computed(() => {
+ return typeMap[props.type]
+ })
+
+ let timer = 0
+
+ // 关闭消息框
+ const handleClose = () => {
+ emit('close')
+ }
+
+ const startTimer = () => {
+ const { duration } = props
+ if (duration > 0) {
+ timer = window.setTimeout(handleClose, duration)
+ }
+ }
+
+ const clearTimer = () => {
+ if (timer) {
+ window.clearTimeout(timer)
+ timer = 0
+ }
+ }
+
+ // 设置居中
+ const setMsgCenter = () => {
+ const dom = messageRef.value
+ if (!dom) return
+
+ const bodyDom = window.document.body
+ const left = (bodyDom.clientWidth - dom.clientWidth) / 2
+ const top = (bodyDom.clientHeight - dom.clientHeight) / 2
+ dom.style.left = left + 'px'
+ dom.style.top = top + 'px'
+ }
+
+ let first = true
+
+ // 添加窗口变化
+ const robserver = new ResizeObserver(() => {
+ if (first) {
+ first = false
+ return
+ }
+ setMsgCenter()
+ })
+
+ // 居中后显示消息
+ const showMsg = () => {
+ nextTick(() => {
+ const dom = messageRef.value
+ if (!dom) return
+ dom.style.opacity = '1'
+ })
+ }
+
+ onMounted(() => {
+ setMsgCenter()
+ showMsg()
+ startTimer()
+ robserver.observe(window.document.body)
+ })
+
+ onBeforeUnmount(() => {
+ clearTimer()
+ robserver.disconnect()
+ })
+
+ return {
+ iconInfo,
+ messageRef,
+ handleClose,
+ }
+ },
+ render() {
+ return withDirectives(
+ <div
+ ref="messageRef"
+ class={[styles['bt-message'], `bt-message-${this.type}`]}
+ style={{ maxWidth: formatLength(this.maxWidth) }}>
+ {this.close && (
+ <BtCloseBtn
+ onClick={() => {
+ this.handleClose()
+ }}
+ />
+ )}
+ <div class="flex-basis-30px">
+ <NIcon size={30} color={this.iconInfo.color}>
+ {this.iconInfo.icon()}
+ </NIcon>
+ </div>
+ <div class="flex-1 ml-10px max-h-600px leading-20px text-14px overflow-auto">
+ {!this.isHtml && <div>{render(this.content)}</div>}
+ {this.isHtml && <div v-html={this.content}></div>}
+ </div>
+ </div>,
+ [[zindexable, { zIndex: this.zIndex, enabled: true }]]
+ )
+ },
+})
diff --git a/core/frontend/src/components/bt-message/interface.ts b/core/frontend/src/components/bt-message/interface.ts
new file mode 100644
index 00000000..f6859fdd
--- /dev/null
+++ b/core/frontend/src/components/bt-message/interface.ts
@@ -0,0 +1,72 @@
+import { VNodeChild } from 'vue'
+
+export type RenderContent = string | (() => VNodeChild)
+
+export const MESSAGE_TYPES = ['info', 'success', 'warning', 'error', 'loading'] as const
+
+export const MESSAGE_POSITION = ['center'] as const
+
+export type MessageType = (typeof MESSAGE_TYPES)[number]
+
+export type MessagePosition = (typeof MESSAGE_POSITION)[number]
+
+export type MessageItem = {
+ id: number | string
+ content: RenderContent
+ type?: MessageType
+ mask?: boolean
+ close?: boolean
+ isHtml?: boolean
+ duration?: number
+ maxWidth?: number | string
+ onClose?: (id: number | string) => void
+}
+
+export type MessageMethod = {
+ // 显示信息提示
+ info: (content: RenderContent | MessageConfig, config?: Partial<MessageConfig>) => MessageReturn
+ // 显示成功提示
+ success: (
+ content: RenderContent | MessageConfig,
+ config?: Partial<MessageConfig>
+ ) => MessageReturn
+ // 显示警告提示
+ warning: (
+ content: RenderContent | MessageConfig,
+ config?: Partial<MessageConfig>
+ ) => MessageReturn
+ // 显示错误提示
+ error: (content: RenderContent | MessageConfig, config?: Partial<MessageConfig>) => MessageReturn
+ // 显示加载中提示
+ loading: (
+ content: RenderContent | MessageConfig,
+ config?: Partial<MessageConfig>
+ ) => MessageReturn
+ // 清空全部提示
+ clear: () => void
+}
+
+export type MessageReturn = {
+ // 关闭当前消息
+ close: () => void
+}
+
+export type MessageConfig = {
+ // 内容
+ content: RenderContent
+ // 唯一id
+ id?: string
+ // 是否有背景遮罩
+ mask?: boolean
+ // 是否关闭
+ close?: boolean
+ // 消息显示的持续时间
+ duration?: number
+ // 消息的位置
+ position?: MessagePosition
+ // 是否为html
+ isHtml?: boolean
+ maxWidth?: number | string
+ // 关闭时的回调函数
+ onClose?: (id: number | string) => void
+}
diff --git a/core/frontend/src/components/bt-message/message-list.tsx b/core/frontend/src/components/bt-message/message-list.tsx
new file mode 100644
index 00000000..00e6216d
--- /dev/null
+++ b/core/frontend/src/components/bt-message/message-list.tsx
@@ -0,0 +1,60 @@
+import { TransitionGroup, withDirectives } from 'vue'
+import { zindexable } from 'naive-ui'
+import type { MessageItem, MessagePosition, MessageType } from './interface'
+
+import Message from './index'
+import './animation.scss'
+
+export default defineComponent({
+ name: 'MessageList',
+ props: {
+ messages: {
+ type: Array as PropType<MessageItem[]>,
+ default: () => [],
+ },
+ type: {
+ type: String as PropType<MessageType>,
+ default: 'success',
+ },
+ position: {
+ type: String as PropType<MessagePosition>,
+ default: 'center',
+ },
+ },
+ emits: ['close', 'afterClose'],
+ setup() {},
+ render() {
+ return (
+ <>
+ {this.messages.map(item => {
+ if (!item.mask) return
+ return withDirectives(<div class="n-modal-mask"></div>, [
+ [zindexable, { zIndex: undefined, enabled: true }],
+ ])
+ })}
+ <TransitionGroup
+ name="bounce"
+ onAfterLeave={() => {
+ this.$emit('afterClose')
+ }}>
+ {this.messages.map(item => {
+ return (
+ <Message
+ key={item.id}
+ type={item.type}
+ close={item.close}
+ isHtml={item.isHtml}
+ content={item.content}
+ duration={item.duration}
+ maxWidth={item.maxWidth}
+ onClose={() => {
+ this.$emit('close', item.id)
+ }}
+ />
+ )
+ })}
+ </TransitionGroup>
+ </>
+ )
+ },
+})
diff --git a/core/frontend/src/components/bt-message/method.ts b/core/frontend/src/components/bt-message/method.ts
new file mode 100644
index 00000000..24578cbe
--- /dev/null
+++ b/core/frontend/src/components/bt-message/method.ts
@@ -0,0 +1,146 @@
+import { createVNode, render } from 'vue'
+import { isFunction, isString, isUndefined } from '@/utils'
+import {
+ MESSAGE_TYPES,
+ MessageType,
+ MessageItem,
+ MessageConfig,
+ MessageMethod,
+ MessagePosition,
+} from './interface'
+import MessageList from './message-list'
+
+type _MessageConfig = MessageConfig & {
+ type: MessageType
+}
+
+class MessageManger {
+ private readonly messageIds: Set<number | string>
+
+ private readonly messages: Ref<MessageItem[]>
+
+ private readonly position: MessagePosition
+
+ private container: HTMLElement | null
+
+ private messageCount = 0
+
+ constructor(config: _MessageConfig) {
+ const { position = 'center' } = config
+ const container = document.createElement('div')
+ container.classList.add('bt-message-container')
+
+ this.container = container
+ this.messages = ref([])
+ this.messageIds = new Set()
+ this.position = position
+
+ const vm = createVNode(MessageList, {
+ position,
+ messages: this.messages.value,
+ type: config.type,
+ onClose: this.remove,
+ onAfterClose: this.destroy,
+ })
+
+ render(vm, this.container)
+ document.body.appendChild(this.container)
+ }
+
+ add = (config: MessageConfig) => {
+ this.messageCount++
+ const id = config.id ?? `__bt_message_${this.messageCount}`
+ if (this.messageIds.has(id)) {
+ return this.update(id, config)
+ }
+ const message = reactive<MessageItem>({ id, ...config })
+ this.messages.value.push(message)
+ this.messageIds.add(id)
+ return {
+ close: () => this.remove(id),
+ }
+ }
+
+ update = (id: number | string, config: MessageConfig) => {
+ for (let i = 0; i < this.messages.value.length; i++) {
+ if (this.messages.value[i].id === id) {
+ const resetOnUpdate = !isUndefined(config.duration)
+ Object.assign(this.messages.value[i], { ...config, id, resetOnUpdate })
+ break
+ }
+ }
+ return {
+ close: () => this.remove(id),
+ }
+ }
+
+ remove = (id: number | string) => {
+ for (let i = 0; i < this.messages.value.length; i++) {
+ const item = this.messages.value[i]
+ if (item.id === id) {
+ if (isFunction(item.onClose)) {
+ item.onClose(id)
+ }
+
+ this.messages.value.splice(i, 1)
+ this.messageIds.delete(id)
+ break
+ }
+ }
+ }
+
+ clear = () => {
+ this.messages.value.splice(0)
+ }
+
+ destroy = () => {
+ if (this.messages.value.length === 0 && this.container) {
+ render(null, this.container)
+ document.body.removeChild(this.container)
+ this.container = null
+ messageInstance[this.position] = undefined
+ }
+ }
+}
+
+const messageInstance: { center?: MessageManger } = {}
+
+const message = MESSAGE_TYPES.reduce((pre, value) => {
+ pre[value] = (content, config) => {
+ if (isString(content) || isFunction(content)) {
+ if (config) {
+ config.content = content
+ } else {
+ config = { content }
+ }
+ } else {
+ config = { ...content }
+ }
+
+ if (value === 'loading') {
+ config.mask = config.mask !== undefined ? config.mask : true
+ config.duration = config.duration ? config.duration : 0
+ } else if (config.close) {
+ config.mask = config.mask !== undefined ? config.mask : true
+ config.duration = config.duration ? config.duration : 0
+ }
+
+ const _config = { type: value, ...config } as _MessageConfig
+ const { position = 'center' } = _config
+ if (!messageInstance[position]) {
+ messageInstance[position] = new MessageManger(_config)
+ }
+ return messageInstance[position].add(_config)
+ }
+ return pre
+}, {} as MessageMethod)
+
+message.clear = (position?: MessagePosition) => {
+ if (position) {
+ messageInstance[position]?.clear()
+ } else {
+ Object.values(messageInstance).forEach(item => item?.clear())
+ }
+}
+
+export default message
diff --git a/core/frontend/src/components/bt-modal/index.vue b/core/frontend/src/components/bt-modal/index.vue
new file mode 100644
index 00000000..2d649074
--- /dev/null
+++ b/core/frontend/src/components/bt-modal/index.vue
@@ -0,0 +1,94 @@
+<template>
+ <n-modal
+ v-model:show="show"
+ preset="dialog"
+ :z-index="zIndex"
+ :draggable="true"
+ :auto-focus="false"
+ :show-icon="false"
+ :mask-closable="false"
+ :internal-appear="true"
+ :internal-dialog="true"
+ :transform-origin="transformOrigin"
+ :style="{ width: formatLength(width) }">
+ <template #header>{{ title }}</template>
+ <div :style="{ maxHeight: maxScrollHeight, overflow: 'auto' }">
+ <slot></slot>
+ </div>
+ <template v-if="footer" #action>
+ <n-button class="cancel-btn" color="#cbcbcb" @click="onCancel">取消</n-button>
+ <n-button type="primary" @click="onConfirm">确定</n-button>
+ </template>
+ </n-modal>
+</template>
+
+<script lang="ts" setup>
+import { useWindowSize } from '@vueuse/core'
+import { formatLength } from 'naive-ui/es/_utils'
+
+const props = defineProps({
+ zIndex: Number,
+ title: {
+ type: String,
+ default: '',
+ },
+ width: {
+ type: [String, Number],
+ default: 'auto',
+ },
+ minHeight: {
+ type: [Number, String],
+ default: 'auto',
+ },
+ footer: {
+ type: Boolean,
+ default: true,
+ },
+ transformOrigin: {
+ type: String as PropType<'mouse' | 'center'>,
+ default: 'center',
+ },
+ onCancel: {
+ type: Function as PropType<() => boolean | void>,
+ default: () => true,
+ },
+ onConfirm: {
+ type: Function as PropType<() => void | Promise<unknown>>,
+ default: () => true,
+ },
+})
+
+const show = defineModel<boolean>('show')
+
+// 窗口高度
+const { height } = useWindowSize()
+
+// 最大滚动高度
+const maxScrollHeight = computed(() => {
+ if (height.value) return `${height.value - 32}px`
+ return 'auto'
+})
+
+const closeModal = () => {
+ show.value = false
+}
+
+const onCancel = () => {
+ const result = props.onCancel()
+ if (result === false) return
+ show.value = false
+}
+
+const onConfirm = () => {
+ void Promise.resolve(props.onConfirm()).then(value => {
+ if (value === false) return
+ closeModal()
+ })
+}
+</script>
+
+<style lang="scss" scoped>
+.cancel-btn {
+ --n-color-hover: #c9302c;
+}
+</style>
diff --git a/core/frontend/src/components/bt-table-layout/index.vue b/core/frontend/src/components/bt-table-layout/index.vue
new file mode 100644
index 00000000..c4aa259c
--- /dev/null
+++ b/core/frontend/src/components/bt-table-layout/index.vue
@@ -0,0 +1,31 @@
+<template>
+ <div>
+ <n-flex v-if="slotLeft || slotRight" class="items-center mb-16px" justify="space-between">
+ <n-flex class="items-center" :size="8">
+ <slot name="toolsLeft"></slot>
+ </n-flex>
+ <n-flex class="items-center" :size="8">
+ <slot name="toolsRight"></slot>
+ </n-flex>
+ </n-flex>
+ <slot name="table"></slot>
+ <n-flex v-if="slotPage" class="items-center mt-16px" justify="space-between">
+ <div>
+ <slot name="pageLeft"></slot>
+ </div>
+ <n-flex>
+ <slot name="pageRight"></slot>
+ </n-flex>
+ </n-flex>
+ <slot name="modal"></slot>
+ </div>
+</template>
+
+<script lang="ts" setup>
+// 判断<slot name="toolsLeft"/>是否有传值
+const slotLeft = !!useSlots().toolsLeft
+// 判断<slot name="toolsRight"/>是否有传值
+const slotRight = !!useSlots().toolsRight
+// 判断<slot name="pageRight"/>是否有传值
+const slotPage = !!useSlots().pageLeft || !!useSlots().pageRight
+</script>
diff --git a/core/frontend/src/components/bt-table-page/index.vue b/core/frontend/src/components/bt-table-page/index.vue
new file mode 100644
index 00000000..a9de5325
--- /dev/null
+++ b/core/frontend/src/components/bt-table-page/index.vue
@@ -0,0 +1,79 @@
+<template>
+ <n-pagination
+ v-bind="$attrs"
+ v-model:page="page"
+ v-model:page-size="pageSize"
+ :show-size-picker="showSizePicker"
+ :show-quick-jumper="showQuickJumper"
+ :page-sizes="pageSizes"
+ :display-order="['pages', 'size-picker', 'quick-jumper']"
+ @update:page="updatePage"
+ @update:page-size="updatePageSize">
+ <template v-if="showTotal" #suffix="{ itemCount }">
+ <span class="ml-8px text-14px"> Total {{ itemCount }} </span>
+ </template>
+ </n-pagination>
+</template>
+
+<script lang="ts" setup>
+import { getNumber, getLocalStorage, setLocalStorage } from '@/utils'
+
+interface Props {
+ storeKey?: string
+ pageSizes?: number[]
+ showTotal?: boolean
+ showSizePicker?: boolean
+ showQuickJumper?: boolean
+}
+
+const props = withDefaults(defineProps<Props>(), {
+ storeKey: '',
+ pageSizes: () => [10, 20, 50, 100],
+ showTotal: true,
+ showSizePicker: true,
+ showQuickJumper: true,
+})
+
+const emit = defineEmits<{
+ refresh: []
+}>()
+
+const key = computed(() => {
+ const { storeKey } = props
+ return storeKey ? `${storeKey}-page` : ''
+})
+
+const page = defineModel<number>('page')
+
+const pageSize = defineModel<number>('pageSize')
+
+const updatePage = (val: number) => {
+ page.value = val
+ emit('refresh')
+}
+
+// 切换分页数量
+const updatePageSize = (size: number) => {
+ page.value = 1
+ pageSize.value = size
+ setPageSize(size)
+ emit('refresh')
+}
+
+const setPageSize = (size: number) => {
+ if (key.value) {
+ setLocalStorage(key.value, String(size))
+ }
+}
+
+const initPageSize = () => {
+ if (key.value) {
+ const size = getLocalStorage(key.value)
+ if (size) {
+ pageSize.value = getNumber(size)
+ }
+ }
+}
+
+initPageSize()
+</script>
diff --git a/core/frontend/src/components/bt-tips/index.vue b/core/frontend/src/components/bt-tips/index.vue
new file mode 100644
index 00000000..747aa699
--- /dev/null
+++ b/core/frontend/src/components/bt-tips/index.vue
@@ -0,0 +1,14 @@
+<template>
+ <ul class="bt-tips flex flex-col gap-4px list-outside list-disc leading-20px text-[#777]">
+ <slot></slot>
+ </ul>
+</template>
+
+<style lang="scss" scoped>
+.bt-tips {
+ :deep(li) {
+ list-style: disc;
+ margin-left: 1.5em;
+ }
+}
+</style>
diff --git a/core/frontend/src/hooks/modal/interface.ts b/core/frontend/src/hooks/modal/interface.ts
new file mode 100644
index 00000000..4fc2444c
--- /dev/null
+++ b/core/frontend/src/hooks/modal/interface.ts
@@ -0,0 +1,39 @@
+export interface ModalApiOptions {
+ /**
+ * @description 共享状态数据
+ */
+ state?: Record<string, unknown>
+ /**
+ * @description 独立的弹窗组件
+ */
+ component?: Component
+ /**
+ * @description 弹窗状态变化回调
+ */
+ onChangeState?: (isOpen: boolean) => void
+ /**
+ * @description 点击取消按钮的回调
+ */
+ onCancel?: () => void
+ /**
+ * @description 点击确定按钮的回调
+ */
+ onConfirm?: () => void | Promise<unknown>
+ /**
+ * @description 弹窗关闭结束的回调
+ */
+ onClose?: () => void
+}
+
+export interface ModalApi {
+ open: () => void
+ close: () => void
+ setState: (state: Record<string, unknown>) => void
+ getState: <T = Record<string, unknown>>() => T
+}
+
+export interface ModalInjectData {
+ state: Record<string, unknown>
+ extendApi: (api: ModalApi) => void
+ setState: (state: Record<string, unknown>) => void
+}
diff --git a/core/frontend/src/hooks/modal/useModal.tsx b/core/frontend/src/hooks/modal/useModal.tsx
new file mode 100644
index 00000000..a121f535
--- /dev/null
+++ b/core/frontend/src/hooks/modal/useModal.tsx
@@ -0,0 +1,73 @@
+import { ModalApiOptions, ModalApi, ModalInjectData } from './interface'
+import BtModal from '@/components/bt-modal/index.vue'
+
+const MODAL_INJECT_KEY = Symbol('MODAL_INJECT')
+
+export const useModal = (options: ModalApiOptions = {}) => {
+ const { state = {}, component, onCancel, onConfirm } = options
+
+ const extendedApi = reactive<Partial<ModalApi>>({})
+
+ if (component) {
+ const Modal = defineComponent({
+ setup(props, { attrs, slots }) {
+ provide(MODAL_INJECT_KEY, {
+ state,
+ options,
+ extendApi: (api: ModalApi) => {
+ Object.setPrototypeOf(extendedApi, api)
+ },
+ setState: (val: Record<string, unknown>) => {
+ Object.assign(state, val)
+ },
+ })
+ return () => h(component, { ...props, ...attrs }, slots)
+ },
+ })
+ return [Modal, extendedApi as ModalApi] as const
+ }
+
+ const Modal = defineComponent({
+ setup(props, { attrs, slots }) {
+ const injectData = inject<ModalInjectData>(MODAL_INJECT_KEY)
+
+ const show = ref(false)
+
+ extendedApi.open = () => {
+ show.value = true
+ options.onChangeState?.(show.value)
+ }
+
+ extendedApi.close = () => {
+ show.value = false
+ }
+
+ extendedApi.setState = (val: Record<string, unknown>) => {
+ injectData?.setState(val)
+ options.onChangeState?.(show.value)
+ }
+
+ extendedApi.getState = <T = Record<string, unknown>,>() => {
+ return (injectData?.state ?? {}) as T
+ }
+
+ injectData?.extendApi(extendedApi as ModalApi)
+
+ return () => (
+ <BtModal
+ show={show.value}
+ {...props}
+ {...attrs}
+ onCancel={onCancel}
+ onConfirm={onConfirm}
+ onUpdate:show={val => {
+ show.value = val ?? false
+ }}>
+ {slots.default?.()}
+ </BtModal>
+ )
+ },
+ })
+
+ return [Modal, extendedApi as ModalApi] as const
+}
diff --git a/core/frontend/src/hooks/useTableData.ts b/core/frontend/src/hooks/useTableData.ts
new file mode 100644
index 00000000..8ab78a21
--- /dev/null
+++ b/core/frontend/src/hooks/useTableData.ts
@@ -0,0 +1,57 @@
+import { isObject } from '@/utils'
+
+interface TableParams {
+ [key: string]: unknown
+ page: number
+ page_size: number
+ keyword: string
+}
+
+interface UseTableDataOptions {
+ fetchFn: (params: TableParams) => Promise<unknown>
+ params?: TableParams
+ immediate?: boolean
+}
+
+export const useTableData = <T>(options: UseTableDataOptions) => {
+ const { fetchFn, immediate = false, params = { page: 1, page_size: 10, keyword: '' } } = options
+
+ const loading = ref(false)
+
+ const tableList = ref<T[]>([])
+
+ const tableTotal = ref(0)
+
+ const tableParams = ref(params)
+
+ // 获取表格数据
+ const getTableData = async (resetPage = false) => {
+ if (resetPage) {
+ params.page = 1
+ }
+
+ loading.value = true
+ try {
+ const res = await fetchFn(tableParams.value)
+ if (isObject<{ list: T[]; total: number }>(res)) {
+ tableList.value = res.list
+ tableTotal.value = res.total
+ }
+ } finally {
+ loading.value = false
+ }
+ }
+
+ // 如果设置了立即加载,则立即获取数据
+ if (immediate) {
+ getTableData()
+ }
+
+ return {
+ loading,
+ tableList,
+ tableTotal,
+ tableParams,
+ getTableData,
+ }
+}
diff --git a/core/frontend/src/layout/components/AppHeader.vue b/core/frontend/src/layout/components/AppHeader.vue
index d2c195e9..8c66c818 100644
--- a/core/frontend/src/layout/components/AppHeader.vue
+++ b/core/frontend/src/layout/components/AppHeader.vue
@@ -21,6 +21,8 @@
</template>
<script lang="ts" setup>
+import { useUserStore } from '@/store'
+
defineProps({
top: {
type: Number,
@@ -29,6 +31,8 @@ defineProps({
})
const route = useRoute()
+const router = useRouter()
+const userStore = useUserStore()
const routeTitle = computed(() => {
return `${route.meta.title}`
@@ -44,6 +48,8 @@ const userOptions = [
const handleUserAction = (key: string) => {
switch (key) {
case 'logout':
+ userStore.resetLoginInfo()
+ router.push('/login')
break
}
}
diff --git a/core/frontend/src/router/index.ts b/core/frontend/src/router/index.ts
index 5cd539b9..b6ac3e67 100644
--- a/core/frontend/src/router/index.ts
+++ b/core/frontend/src/router/index.ts
@@ -1,10 +1,29 @@
+import { useUserStore } from '@/store'
import router from '@/router/router'
import loadingBar from '@/config/loadingBar'
+// 路由白名单
+const whitePathList = ['/login']
+
router.beforeEach(async (to, from, next) => {
loadingBar.start()
- next()
+ const userStore = useUserStore()
+
+ // 用户已登录
+ if (userStore.isLogin) {
+ // 如果访问的是白名单中的路由,则跳转到主页
+ if (whitePathList.includes(to.path)) {
+ next('/')
+ } else {
+ next()
+ }
+ } else if (whitePathList.includes(to.path)) {
+ // 如果访问的是白名单中的路由,则直接跳转
+ next()
+ } else {
+ next('/login')
+ }
})
router.afterEach(() => {
diff --git a/core/frontend/src/store/index.ts b/core/frontend/src/store/index.ts
index 00501749..bcbc4395 100644
--- a/core/frontend/src/store/index.ts
+++ b/core/frontend/src/store/index.ts
@@ -1,10 +1,11 @@
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import useMenuStore from './modules/menu'
+import useUserStore from './modules/user'
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
-export { useMenuStore }
+export { useMenuStore, useUserStore }
export default pinia
diff --git a/core/frontend/src/store/modules/user.ts b/core/frontend/src/store/modules/user.ts
new file mode 100644
index 00000000..c4686b93
--- /dev/null
+++ b/core/frontend/src/store/modules/user.ts
@@ -0,0 +1,50 @@
+import { defineStore } from 'pinia'
+
+export default defineStore(
+ 'UserStore',
+ () => {
+ const login = ref({
+ token: '', // Token
+ refresh_token: '', // 刷新Token
+ ttl: 0, // Token有效时间/秒
+ expire: 0, // Token到期时间
+ })
+
+ /**
+ * @description 判断用户是否登录
+ */
+ const isLogin = computed(() => {
+ return login.value.token && login.value.expire > Date.now()
+ })
+
+ /**
+ * @description 设置用户登录信息
+ * @param userVal
+ */
+ const setLoginInfo = (userVal: { token: string; refresh_token: string; ttl: number }) => {
+ login.value.token = userVal.token
+ login.value.refresh_token = userVal.refresh_token
+ login.value.ttl = userVal.ttl
+ login.value.expire = userVal.ttl * 1000 + Date.now()
+ }
+
+ const resetLoginInfo = () => {
+ login.value.token = ''
+ login.value.refresh_token = ''
+ login.value.ttl = 0
+ login.value.expire = 0
+ }
+
+ return {
+ login,
+ isLogin,
+ setLoginInfo,
+ resetLoginInfo,
+ }
+ },
+ {
+ persist: {
+ pick: ['login'],
+ },
+ }
+)
diff --git a/core/frontend/src/styles/naive.scss b/core/frontend/src/styles/naive.scss
index 99d2251b..41c286a9 100644
--- a/core/frontend/src/styles/naive.scss
+++ b/core/frontend/src/styles/naive.scss
@@ -2,3 +2,22 @@ div.n-card {
--n-border-radius: 0px;
box-shadow: 0 1px 20px 0 rgba(69, 90, 100, 0.08);
}
+
+button.n-button {
+ line-height: 1.2;
+}
+
+.n-input {
+ &.password-input {
+ font-family:
+ v-sans,
+ system-ui,
+ -apple-system,
+ BlinkMacSystemFont,
+ 'Segoe UI',
+ sans-serif,
+ 'Apple Color Emoji',
+ 'Segoe UI Emoji',
+ 'Segoe UI Symbol';
+ }
+}
diff --git a/core/frontend/src/styles/reset.scss b/core/frontend/src/styles/reset.scss
index 50fcb8c9..805218a8 100644
--- a/core/frontend/src/styles/reset.scss
+++ b/core/frontend/src/styles/reset.scss
@@ -27,6 +27,7 @@ a {
text-decoration: none;
}
-p {
+p,
+ul {
margin: 0;
}
diff --git a/core/frontend/src/utils/base.ts b/core/frontend/src/utils/base.ts
new file mode 100644
index 00000000..b0038ccf
--- /dev/null
+++ b/core/frontend/src/utils/base.ts
@@ -0,0 +1,37 @@
+import { isNumber } from 'lodash-es'
+
+// 服务器前缀
+export const apiUrlPrefix: string = import.meta.env.API_URL_PREFIX
+
+/**
+ * @description 字节转换,到指定单位结束
+ * @param { number } bytes 字节数
+ * @param { boolean } isUnit 是否显示单位
+ * @param { number } fixed 小数点位置
+ * @param { string } endUnit 结束单位
+ * @returns { string }
+ */
+export const getByteUnit = (
+ bytes: number = 0,
+ isUnit: boolean = true,
+ fixed: number = 2,
+ endUnit: string = ''
+): string => {
+ let newBytes = isNumber(bytes) ? bytes : Number(bytes)
+ const c = 1024
+ const units = [' B', ' KB', ' MB', ' GB', ' TB', ' PB', ' EB', ' ZB', ' YB', ' BB', ' NB', ' DB']
+ for (let i = 0; i < units.length; i++) {
+ const unit = units[i]
+ const showValue = fixed === 0 ? Math.round(newBytes) : newBytes.toFixed(fixed)
+ const result = i === 0 ? newBytes.toFixed(fixed) : showValue
+ if (endUnit) {
+ if (unit.trim() === endUnit.trim()) {
+ return isUnit ? result + unit : `${result}`
+ }
+ } else if (newBytes < c) {
+ return isUnit ? result + unit : `${result}`
+ }
+ newBytes /= c
+ }
+ return ''
+}
diff --git a/core/frontend/src/utils/copy.ts b/core/frontend/src/utils/copy.ts
new file mode 100644
index 00000000..eab9409b
--- /dev/null
+++ b/core/frontend/src/utils/copy.ts
@@ -0,0 +1,16 @@
+import { useClipboard } from '@vueuse/core'
+import { Message } from '@/utils/message'
+
+/**
+ * @description 复制文本
+ * @param {string} value 复制的文本
+ */
+export const copyText = async (value: string) => {
+ const { copy, isSupported } = useClipboard({ legacy: true })
+ if (isSupported.value) {
+ copy(value)
+ Message.success('复制成功')
+ } else {
+ Message.error('复制失败')
+ }
+}
diff --git a/core/frontend/src/utils/data.ts b/core/frontend/src/utils/data.ts
new file mode 100644
index 00000000..2e8f5aeb
--- /dev/null
+++ b/core/frontend/src/utils/data.ts
@@ -0,0 +1,10 @@
+import { toNumber } from 'lodash-es'
+
+/**
+ * @description 转化数字,将非数字转化为0
+ * @param val 值
+ * @returns
+ */
+export const getNumber = (val: unknown) => {
+ return !Number.isNaN(toNumber(val)) ? toNumber(val) : 0
+}
diff --git a/core/frontend/src/utils/index.ts b/core/frontend/src/utils/index.ts
index 9e95a308..99874238 100644
--- a/core/frontend/src/utils/index.ts
+++ b/core/frontend/src/utils/index.ts
@@ -1 +1,4 @@
export * from './is'
+export * from './base'
+export * from './data'
+export * from './storage'
diff --git a/core/frontend/src/utils/is.ts b/core/frontend/src/utils/is.ts
index 6918f029..456f2503 100644
--- a/core/frontend/src/utils/is.ts
+++ b/core/frontend/src/utils/is.ts
@@ -2,7 +2,7 @@
* @description: 判断值是否未某个类型
*/
export function is<T>(val: unknown, type: string): val is T {
- return toString.call(val) === `[object ${type}]`
+ return Object.prototype.toString.call(val) === `[object ${type}]`
}
/**
@@ -11,5 +11,32 @@ export function is<T>(val: unknown, type: string): val is T {
* @returns { boolean }
*/
export function isObject<T>(val: unknown): val is T {
- return val !== null && is(val, 'object')
+ return val !== null && is(val, 'Object')
+}
+
+/**
+ * @description 是否为字符串
+ * @param { unknown } val 参数
+ * @returns { boolean }
+ */
+export const isString = (val: unknown): val is string => {
+ return is(val, 'String')
+}
+
+/**
+ * @description 是否为函数
+ * @param { unknown } val 参数
+ * @returns { boolean }
+ */
+export const isFunction = <T = Function>(val: unknown): val is T => {
+ return is(val, 'Function')
+}
+
+/**
+ * @description 是否未定义
+ * @param { unknown } val 参数
+ * @returns { boolean }
+ */
+export const isUndefined = (val: unknown): val is undefined => {
+ return typeof val === 'undefined'
}
diff --git a/core/frontend/src/utils/message.ts b/core/frontend/src/utils/message.ts
new file mode 100644
index 00000000..e717fa5c
--- /dev/null
+++ b/core/frontend/src/utils/message.ts
@@ -0,0 +1,3 @@
+import Message from '@/components/bt-message/method'
+
+export { Message }
diff --git a/core/frontend/src/utils/storage.ts b/core/frontend/src/utils/storage.ts
new file mode 100644
index 00000000..9bcaa6e6
--- /dev/null
+++ b/core/frontend/src/utils/storage.ts
@@ -0,0 +1,51 @@
+import { isObject } from './is'
+
+/**
+ * 获取数据
+ * @param { string } key 键名
+ * @return { string }
+ */
+export const getLocalStorage = <T = string>(key: string, defaultVal: T = '' as T): T => {
+ const val = localStorage.getItem(key)
+ if (isObject<T>(defaultVal)) {
+ return val != null ? JSON.parse(val) : defaultVal
+ } else {
+ return val != null ? (val as T) : defaultVal
+ }
+}
+
+/**
+ * 存储数据
+ * @param { string } key 字段名
+ * @param { string } value 字段值
+ * @return void
+ */
+export const setLocalStorage = (key: string, value?: string | number) => {
+ localStorage.setItem(key, `${value}`)
+}
+
+/**
+ * 删除数据或删除多个数据
+ * @param { string | string[] } key 键名
+ * @return void
+ */
+export const delLocalStorage = (key: string | string[]) => {
+ if (!Array.isArray(key)) key = [key]
+ const removeKeys = [...key]
+ removeKeys.forEach(dataKey => {
+ localStorage.removeItem(dataKey)
+ })
+}
+
+/**
+ * 设置cookie
+ * @param { string } key 键名
+ * @param { string } value 值
+ * @return void
+ */
+export const setCookie = (key: string, value: string) => {
+ const day = 30
+ const date = new Date()
+ date.setTime(date.getTime() + day * 24 * 60 * 60 * 1000)
+ document.cookie = key + '=' + escape(value) + ';expires=' + date.toUTCString()
+}
diff --git a/core/frontend/src/views/domain/components/DomainCatch.vue b/core/frontend/src/views/domain/components/DomainCatch.vue
new file mode 100644
index 00000000..9378d314
--- /dev/null
+++ b/core/frontend/src/views/domain/components/DomainCatch.vue
@@ -0,0 +1,26 @@
+<template>
+ <modal title="捕获邮件" :width="540">
+ <div class="py-20px">
+ <bt-form :model="form">
+ <n-form-item label="转发邮件" :show-feedback="false">
+ <div class="w-290px">
+ <n-input v-model:value="form.email" placeholder="捕获不存在的邮件,转发至此邮件">
+ </n-input>
+ </div>
+ </n-form-item>
+ </bt-form>
+ </div>
+ </modal>
+</template>
+
+<script lang="ts" setup>
+import { useModal } from '@/hooks/modal/useModal'
+
+const form = reactive({
+ email: '',
+})
+
+const [Modal] = useModal({
+ onConfirm: async () => {},
+})
+</script>
diff --git a/core/frontend/src/views/domain/components/DomainDns.vue b/core/frontend/src/views/domain/components/DomainDns.vue
new file mode 100644
index 00000000..6b9072a2
--- /dev/null
+++ b/core/frontend/src/views/domain/components/DomainDns.vue
@@ -0,0 +1,206 @@
+<template>
+ <modal title="DNS Record" :width="750" :footer="false">
+ <div class="pt-20px">
+ <n-data-table class="mb-20px" :data="statusData" :columns="statusColumns"></n-data-table>
+ <div class="record-title">步骤1:添加MX记录</div>
+ <div class="record-desc">
+ 登录到域名服务提供商,添加记录类型为MX的记录用于邮箱服务(请直接复制以下参数)
+ </div>
+ <n-table class="mb-30px">
+ <thead>
+ <tr>
+ <th>记录类型</th>
+ <th>主机记录</th>
+ <th>记录值</th>
+ <th>MX优先级</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>MX</td>
+ <td>@</td>
+ <td>{{ mxValue }}</td>
+ <td>10</td>
+ </tr>
+ </tbody>
+ </n-table>
+ <div class="record-title">步骤2:添加TXT记录</div>
+ <div class="record-desc">添加记录类型为TXT的记录用于邮箱反垃圾邮件(请直接复制以下参数)</div>
+ <n-table class="mb-30px">
+ <thead>
+ <tr>
+ <th>记录类型</th>
+ <th>主机记录</th>
+ <th>记录值</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>TXT</td>
+ <td>@</td>
+ <td>
+ <n-ellipsis class="mr-4px max-w-360px!">{{ command }}</n-ellipsis>
+ <n-button text type="primary" @click="onCopy(command)">(Copy)</n-button>
+ </td>
+ </tr>
+ <tr>
+ <td>TXT</td>
+ <td>default._domainkey</td>
+ <td>
+ <n-ellipsis class="mr-4px max-w-360px!">
+ {{ dkimValue || '--' }}
+ </n-ellipsis>
+ <n-button v-if="dkimValue" text type="primary" @click="onCopy(dkimValue)">
+ (Copy)
+ </n-button>
+ </td>
+ </tr>
+ <tr>
+ <td>TXT</td>
+ <td>_dmarc</td>
+ <td>
+ <n-ellipsis class="mr-4px max-w-360px!">
+ {{ mxValue }}
+ </n-ellipsis>
+ <n-button text type="primary" @click="onCopy(mxValue)"> (Copy) </n-button>
+ </td>
+ </tr>
+ </tbody>
+ </n-table>
+ <div class="record-title">步骤3:添加PTR记录</div>
+ <div class="record-desc">(可选)PTR记录用于反向 DNS 查找</div>
+ <div class="record-desc">联系您的IP提供商创建 PTR 记录</div>
+ </div>
+ </modal>
+</template>
+
+<script lang="tsx" setup>
+import { DataTableColumns, NIcon } from 'naive-ui'
+import { SuccessIcon, ErrorIcon } from 'naive-ui/es/_internal/icons'
+import { copyText } from '@/utils/copy'
+import { useModal } from '@/hooks/modal/useModal'
+import { MailDomain } from '../interface'
+
+const statusData = ref<MailDomain[]>([])
+
+const getRecordValue = (record: string) => {
+ if (statusData.value.length > 0) {
+ return statusData.value[0].dns_records[record].value
+ }
+ return ''
+}
+
+const dkimValue = computed(() => {
+ return getRecordValue('dkim')
+})
+
+const mxValue = computed(() => {
+ return getRecordValue('mx')
+})
+
+const command = computed(() => {
+ let ip = ''
+ // ip += row.value.ip_address.ipv4.map(item => `+ip4:${item}`).join(' ')
+ // ip += row.value.ip_address.ipv6.map(item => `+ip6:${item}`).join(' ')
+ return `v=spf1 +a +mx ${ip} -all`
+})
+
+const onCopy = (value: string) => {
+ copyText(value)
+}
+
+const StatusCol = ({ status }: { status: boolean }) => {
+ return (
+ <div class={['inline-flex items-center', status ? 'text-primary' : 'text-error']}>
+ <NIcon size="16">{status ? <SuccessIcon /> : <ErrorIcon />}</NIcon>
+ <span class="ml-4px">{status ? 'OK' : 'Not Set'}</span>
+ </div>
+ )
+}
+
+const statusColumns = ref<DataTableColumns<MailDomain>>([
+ {
+ key: 'domain',
+ title: '域名',
+ width: '20%',
+ ellipsis: {
+ tooltip: true,
+ },
+ },
+ {
+ key: 'mx',
+ title: 'MX',
+ render: row => {
+ const mx = row.dns_records.mx
+ return <StatusCol status={mx?.valid || false}></StatusCol>
+ },
+ },
+ {
+ key: 'a',
+ title: 'A record',
+ render: row => {
+ const a = row.dns_records.a
+ return <StatusCol status={a?.valid || false}></StatusCol>
+ },
+ },
+ {
+ key: 'spf',
+ title: 'SPF',
+ render: row => {
+ const spf = row.dns_records.spf
+ return <StatusCol status={spf?.valid || false}></StatusCol>
+ },
+ },
+ {
+ key: 'dkim',
+ title: 'DKIM',
+ render: row => {
+ const dkim = row.dns_records.dkim
+ return <StatusCol status={dkim?.valid || false}></StatusCol>
+ },
+ },
+ {
+ key: 'dmarc',
+ title: 'DMARC',
+ render: row => {
+ const dmarc = row.dns_records.dmarc
+ return <StatusCol status={dmarc?.valid || false}></StatusCol>
+ },
+ },
+ {
+ key: 'ptr',
+ title: 'PTR',
+ render: row => {
+ const ptr = row.dns_records.ptr
+ return <StatusCol status={ptr?.valid || false}></StatusCol>
+ },
+ },
+])
+
+const [Modal, modalApi] = useModal({
+ onChangeState: isOpen => {
+ if (isOpen) {
+ const state = modalApi.getState<{ row: MailDomain | null }>()
+ const { row } = state
+ if (row) {
+ statusData.value = [row]
+ }
+ }
+ },
+})
+</script>
+
+<style lang="scss" scoped>
+.record-title {
+ font-size: 16px;
+ color: #444;
+ font-weight: 600;
+ margin-bottom: 10px;
+}
+
+.record-desc {
+ font-size: 14px;
+ color: #666;
+ margin-bottom: 10px;
+}
+</style>
diff --git a/core/frontend/src/views/domain/components/DomainForm.vue b/core/frontend/src/views/domain/components/DomainForm.vue
new file mode 100644
index 00000000..3f7355f7
--- /dev/null
+++ b/core/frontend/src/views/domain/components/DomainForm.vue
@@ -0,0 +1,154 @@
+<template>
+ <modal :title="title" :width="580">
+ <div class="pt-20px">
+ <bt-form ref="formRef" :model="form" :rules="rules">
+ <n-form-item label="域名" path="domain">
+ <div class="w-320px">
+ <n-input
+ v-model:value="form.domain"
+ :disabled="isEdit"
+ placeholder="请输入域名,例如:aapanel.com">
+ </n-input>
+ </div>
+ </n-form-item>
+ <n-form-item label="A记录">
+ <div class="w-320px">
+ <n-input
+ v-model:value="form.a_record"
+ :disabled="isEdit"
+ placeholder="请输入A记录,例如:mail.aapanel.com">
+ </n-input>
+ </div>
+ </n-form-item>
+ <n-form-item label="域名配额">
+ <n-input-number v-model:value="form.quota" class="w-200px" :min="0" :show-button="false">
+ </n-input-number>
+ <div class="w-100px ml-20px">
+ <n-select v-model:value="form.quota_unit" :options="unitOptions"></n-select>
+ </div>
+ </n-form-item>
+ <n-form-item label="邮箱数量">
+ <n-input-number
+ v-model:value="form.mailboxes"
+ class="w-320px"
+ :min="0"
+ :show-button="false">
+ </n-input-number>
+ </n-form-item>
+ <n-form-item v-if="false" label="全局捕获">
+ <div class="w-320px">
+ <n-input v-model:value="form.email" placeholder="捕获不存在的邮件,转发至此邮件">
+ </n-input>
+ </div>
+ </n-form-item>
+ </bt-form>
+ <bt-tips>
+ <li class="text-error">提示A记录解析失败。请检查填写的A记录域名是否已解析到服务器 IP</li>
+ <li>需要在您的DNS服务提供商控制台添加A记录</li>
+ <li>如果使用CloudFlare,请在添加记录时选择【仅DNS】</li>
+ </bt-tips>
+ </div>
+ </modal>
+</template>
+
+<script lang="ts" setup>
+import { FormRules } from 'naive-ui'
+import { getByteUnit, getNumber } from '@/utils'
+import { useModal } from '@/hooks/modal/useModal'
+import { createDomain, updateDomain } from '@/api/modules/domain'
+import { MailDomain } from '../interface'
+
+const isEdit = ref(false)
+
+const title = computed(() => {
+ return isEdit.value ? '编辑域名' : '添加域名'
+})
+
+const formRef = useTemplateRef('formRef')
+
+const form = reactive({
+ domain: '',
+ a_record: '',
+ quota: 5,
+ quota_unit: 'GB',
+ mailboxes: 50,
+ email: '',
+})
+
+const unitOptions = [
+ { label: 'GB', value: 'GB' },
+ { label: 'MB', value: 'MB' },
+]
+
+const rules: FormRules = {
+ domain: {
+ trigger: ['blur', 'input'],
+ validator: () => {
+ if (form.domain.trim() === '') {
+ return new Error('邮箱域名不能为空!')
+ }
+ return true
+ },
+ },
+}
+
+/**
+ * @description 根据域名配额和单位,计算出字节数
+ * @param quota
+ * @param quota_unit
+ */
+const getQuotaByte = (quota: number, quota_unit: string) => {
+ switch (quota_unit) {
+ case 'GB':
+ return quota * 1024 * 1024 * 1024
+ case 'MB':
+ return quota * 1024 * 1024
+ default:
+ return quota
+ }
+}
+
+const [Modal, modalApi] = useModal({
+ onChangeState: isOpen => {
+ if (isOpen) {
+ const state = modalApi.getState<{ isEdit: boolean; row: MailDomain | null }>()
+ isEdit.value = state.isEdit
+ if (state.row) {
+ const { row } = state
+ form.domain = row.domain
+ form.a_record = row.a_record
+ const quota = getByteUnit(row.quota)
+ form.quota = getNumber(quota.split(' ')[0])
+ form.quota_unit = quota.split(' ')[1]
+ form.mailboxes = row.mailboxes
+ // form.email = row.email
+ }
+ } else {
+ form.domain = ''
+ form.a_record = ''
+ form.quota = 5
+ form.quota_unit = 'GB'
+ form.mailboxes = 50
+ // form.email = ''
+ }
+ },
+ onConfirm: async () => {
+ await formRef.value?.validate()
+ if (isEdit.value) {
+ await updateDomain({
+ domain: form.domain,
+ quota: getQuotaByte(form.quota, form.quota_unit),
+ mailboxes: form.mailboxes,
+ })
+ } else {
+ await createDomain({
+ domain: form.domain,
+ quota: getQuotaByte(form.quota, form.quota_unit),
+ mailboxes: form.mailboxes,
+ })
+ }
+ const state = modalApi.getState<{ refresh: Function }>()
+ state.refresh()
+ },
+})
+</script>
diff --git a/core/frontend/src/views/domain/components/DomainSsl.vue b/core/frontend/src/views/domain/components/DomainSsl.vue
new file mode 100644
index 00000000..e2ceeb0f
--- /dev/null
+++ b/core/frontend/src/views/domain/components/DomainSsl.vue
@@ -0,0 +1,22 @@
+<template>
+ <modal title="Domain SSL" :width="650" :footer="false">
+ <div>aaaaa</div>
+ </modal>
+</template>
+
+<script setup lang="ts">
+import { useModal } from '@/hooks/modal/useModal'
+import { MailDomain } from '../interface'
+
+const [Modal, modalApi] = useModal({
+ onChangeState: isOpen => {
+ if (isOpen) {
+ const state = modalApi.getState<{ row: MailDomain | null }>()
+ const { row } = state
+ if (row) {
+ // console.log(row)
+ }
+ }
+ },
+})
+</script>
diff --git a/core/frontend/src/views/domain/default.ts b/core/frontend/src/views/domain/default.ts
new file mode 100644
index 00000000..436f3190
--- /dev/null
+++ b/core/frontend/src/views/domain/default.ts
@@ -0,0 +1,156 @@
+import { MailDomain } from './interface'
+
+export const domainData: MailDomain[] = [
+ {
+ domain: 'lotkfc.cn',
+ a_record: 'mail.lotkfc.cn',
+ mailboxes: 50,
+ mailbox_quota: 5368709120,
+ quota: 10737418240,
+ created: '2025-03-31 18:41:32',
+ active: 1,
+ ssl_alarm: 0,
+ mx_status: 0,
+ spf_status: 0,
+ dkim_status: 1,
+ dmarc_status: 1,
+ a_status: 1,
+ ptr_status: 0,
+ dkim_value:
+ 'v=DKIM1;k=rsa;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8bG6Z0aEUIMS6Yab+3K48VbJ/+WLLaYduAjJ6yh8f4M3hu4rT7E+D6qhoL866SKunRAkhsBrNTEX6+9e4OlIW+ypsI7uD44em0sjNxHTNYLoxtShmIMxvLK6b1SfwbwtnFipkeGjahjuO/7PMaOWLXOGokSmcRzxg8R/EZ3RfQwIDAQAB',
+ dmarc_value: 'v=DMARC1;p=quarantine;rua=mailto:[email protected]',
+ mx_record: 'mail.lotkfc.cn',
+ ssl_status: true,
+ catch_all: false,
+ email: '',
+ ip_address: {
+ ipv4: [],
+ ipv6: [],
+ },
+ domain_check_log: '/www/server/panel/plugin/mail_sys/data/mail.lotkfc.cn_blcheck.txt',
+ ssl_info: {
+ issuer: 'R11',
+ notAfter: '2025-06-23',
+ notBefore: '2025-03-25',
+ dns: ['*.lotkfc.cn', 'lotkfc.cn'],
+ subject: '*.lotkfc.cn',
+ src: '-----BEGIN CERTIFICATE-----\nMIIFIzCCBAugAwIBAgISBj4WeW8epnNBaJLhTAumCeEJMA0GCSqGSIb3DQEBCwUA\nMDMxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQwwCgYDVQQD\nEwNSMTEwHhcNMjUwMzI1MDY1MjA4WhcNMjUwNjIzMDY1MjA3WjAWMRQwEgYDVQQD\nDAsqLmxvdGtmYy5jbjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALkP\ngvgopDEBjdY2p7b8ucfFPdJvxDtSUNAOc+2hFFHB1gamOe7rHtJpwVDHTHl9/y2P\nsMSCKIl2XoDOgiXBpmWMQVC+6s3Kv4QbF0QZ5m+10gBUglDtdvOq6kFzMHIL7oS5\nuLzUozm6Cp42XtT6gqhxiBGulZxhok0SwCxyQ+EyZ7khUNqVkfoiUGfbzJvhzfUN\nnrxdfwAW4v/Y7xjt4fIPzim0U2W63ZF1ne7ohUmVB4GmC4UF17mTYFybCVAsvoQH\nFyB9ZtTdztnVEmhZQjoLMti37bM5uEateUzKyPTkfiHWGjscjA77o/02y34eYjT/\nF5bNklBJKIWbioIlSZ0CAwEAAaOCAkwwggJIM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tcuUtMSPZM1mQT\nb0fbh2Nor+aaWwwZrm0Uv7JEC4q5Oe1mbcGOZlKWr3OjQJyWjKyOSthJAoGAC2LZ\nY4D8JNmxGEkP88PKBHPYl00rFib1Z6fFr94LxEH/A6SpjjFZuRqK0rcaCL/TEalQ\n1HLoFFo37C6A2SY7GyB9okQmKOwgdMa81kICIrVyQiZTqDAXOg5LkVtOpELjf3Id\nu2s83cZyrWedZ+7Sifd7iLYJkLwDATU5Vv5ahYkCgYEA0GCQmxHMNBXZzh0bBZlU\ndgRPPsQ1xVk68X+49hLjlPmj+ex3hLgZ+DIJu9G4uqc2KPsTBAN6lMAcqG1ECkGY\naK+EuagOXOVyeDzhB+SRQOvJPKqtfupu8leqW1Mudf8q/6XhhndX0+REVOzl/OE8\nxuOOKKSAbHa+6pwz+7r4tPA=\n-----END PRIVATE KEY-----\n',
+ endtime: 81,
+ },
+ },
+ {
+ domain: 'aaa.text',
+ a_record: '',
+ mailboxes: 50,
+ mailbox_quota: 5368709120,
+ quota: 5368709120,
+ created: '2025-03-31 15:53:04',
+ active: 1,
+ ssl_alarm: 0,
+ mx_status: 0,
+ spf_status: 0,
+ dkim_status: 0,
+ dmarc_status: 0,
+ a_status: 0,
+ ptr_status: 0,
+ dkim_value:
+ 'v=DKIM1;k=rsa;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3CVSeRrI3w43EBJi7WTyd+IRCcz9gvmp/cejjbVED4aEA+4ouGFhYS1iuMCpXykk6pSZBe97RGIqm1bDcj45qs4BraGGOkXWAn9eHpF4CFfoYu5WATSvWf7aHLzuDJrEgS3GjsH3cPpeAF3KJmdMK21sX3IX+aak0KCo5Q37hBwIDAQAB',
+ dmarc_value: 'v=DMARC1;p=quarantine;rua=mailto:[email protected]',
+ mx_record: '',
+ ssl_status: false,
+ catch_all: false,
+ email: '',
+ ip_address: {
+ ipv4: [],
+ ipv6: [],
+ },
+ domain_check_log: '/www/server/panel/plugin/mail_sys/data/_blcheck.txt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jlPmj+ex3hLgZ+DIJu9G4uqc2KPsTBAN6lMAcqG1ECkGY\naK+EuagOXOVyeDzhB+SRQOvJPKqtfupu8leqW1Mudf8q/6XhhndX0+REVOzl/OE8\nxuOOKKSAbHa+6pwz+7r4tPA=\n-----END PRIVATE KEY-----\n',
+ endtime: 81,
+ },
+ },
+ {
+ domain: 'aapanel.store',
+ a_record: 'mail.aapanel.store',
+ mailboxes: 50000,
+ mailbox_quota: 5368709120,
+ quota: 5368709120,
+ created: '2025-03-20 15:12:13',
+ active: 1,
+ ssl_alarm: 0,
+ mx_status: 1,
+ spf_status: 1,
+ dkim_status: 1,
+ dmarc_status: 1,
+ a_status: 1,
+ ptr_status: 1,
+ dkim_value:
+ 'v=DKIM1;k=rsa;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDtqjHX86V74t7XqOqF1crSlEQDuFps51Gk/yC+A8pYJaL+7ogWQO0s1zxlFXl+dVBFRLl2KPN2s9eBkMPBtghx46e/epZzTIxQulRvd7FOfNLTp333EMcMmj4zZQSjzMXYTAJ2P5f9QPrhtDvIk7XOH5jaVPb5KVSF4aCXrhfDlQIDAQAB',
+ dmarc_value: 'v=DMARC1;p=quarantine;rua=mailto:[email protected]',
+ mx_record: 'mail.aapanel.store',
+ ssl_status: false,
+ catch_all: false,
+ email: '',
+ ip_address: {
+ ipv4: [],
+ ipv6: [],
+ },
+ domain_check_log: '/www/server/panel/plugin/mail_sys/data/mail.aapanel.store_blcheck.txt',
+ ssl_info: {
+ issuer: 'R11',
+ notAfter: '2025-06-23',
+ notBefore: '2025-03-25',
+ dns: ['*.lotkfc.cn', 'lotkfc.cn'],
+ subject: '*.lotkfc.cn',
+ src: '-----BEGIN CERTIFICATE-----\nMIIFIzCCBAugAwIBAgISBj4WeW8epnNBaJLhTAumCeEJMA0GCSqGSIb3DQEBCwUA\nMDMxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQwwCgYDVQQD\nEwN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O1gqKmmLAjslkNhapGD6yK3ggQkn0SwPtQKBgQDdMSW1/mmL1p3bNWSF\n9GgfoRE083aS2CWBhYicYUbYlSDkIxSFv6XcJH5SDsO+JUlPZet5Rt2dq1MhoPyG\nT46ZOqJWuIb64gGQSzYUP5oz6s2yyg8AaTL//URkuNQyc999DBxTY5SZH8voFP1M\nJ2m0/5q2sSQ2i7audhfquF0IUwKBgQDWLsoXsAd7lEavVPV61mUf4TcxgcrAXubq\nVjc6w202NbujZJtlnT0FT1oHyIFPyZzEEdFlrNxhv6cevtOX4uvR02F9C352UmXC\nznJn9gkp/8bzZ5dB0YS2ohEFgHDU6CzYu+X0UI290Zg8twWNGJOadDTrP1vnuI85\n6wZ7a/poTwKBgGBZ/Fdez5M+ldzbUUKYyJKekuRB+bDVvuDAzlVwem/15jH6pgHt\nDc7rhqswC0xU6a5Qc1aM7BS2gKvxeI75MODGjdjA4OuAb7XvTUtcuUtMSPZM1mQT\nb0fbh2Nor+aaWwwZrm0Uv7JEC4q5Oe1mbcGOZlKWr3OjQJyWjKyOSthJAoGAC2LZ\nY4D8JNmxGEkP88PKBHPYl00rFib1Z6fFr94LxEH/A6SpjjFZuRqK0rcaCL/TEalQ\n1HLoFFo37C6A2SY7GyB9okQmKOwgdMa81kICIrVyQiZTqDAXOg5LkVtOpELjf3Id\nu2s83cZyrWedZ+7Sifd7iLYJkLwDATU5Vv5ahYkCgYEA0GCQmxHMNBXZzh0bBZlU\ndgRPPsQ1xVk68X+49hLjlPmj+ex3hLgZ+DIJu9G4uqc2KPsTBAN6lMAcqG1ECkGY\naK+EuagOXOVyeDzhB+SRQOvJPKqtfupu8leqW1Mudf8q/6XhhndX0+REVOzl/OE8\nxuOOKKSAbHa+6pwz+7r4tPA=\n-----END PRIVATE KEY-----\n',
+ endtime: 81,
+ },
+ },
+ {
+ domain: 'lootk.cn',
+ a_record: 'mail.lootk.cn',
+ mailboxes: 50000,
+ mailbox_quota: 5368709120,
+ quota: 20971520,
+ created: '2025-03-20 15:05:25',
+ active: 1,
+ ssl_alarm: 0,
+ mx_status: 1,
+ spf_status: 1,
+ dkim_status: 1,
+ dmarc_status: 1,
+ a_status: 1,
+ ptr_status: 0,
+ dkim_value:
+ 'v=DKIM1;k=rsa;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC26UOoqfD66TFohULpdyT7vyMLuZorHSf7Bh4kR+YtopXbWupGRqNsdKwxoFxtWNzXU10mdab2cb4Luz9fWHp8zD0ONNrD3RSRlWJbr9OJFrpYN8RouXazqi8iDJBm2F3d/k+WL44BJQrLKXmp5vskudVVfWLf6Yq/FOzpBybhYwIDAQAB',
+ dmarc_value: 'v=DMARC1;p=quarantine;rua=mailto:[email protected]',
+ mx_record: 'mail.lootk.cn',
+ ssl_status: true,
+ catch_all: false,
+ email: '',
+ ip_address: {
+ ipv4: [],
+ ipv6: [],
+ },
+ domain_check_log: '/www/server/panel/plugin/mail_sys/data/mail.lootk.cn_blcheck.txt',
+ ssl_info: {
+ issuer: 'R11',
+ notAfter: '2025-06-23',
+ notBefore: '2025-03-25',
+ dns: ['*.lotkfc.cn', 'lotkfc.cn'],
+ subject: '*.lotkfc.cn',
+ src: '-----BEGIN CERTIFICATE-----\nMIIFIzCCBAugAwIBAgISBj4WeW8epnNBaJLhTAumCeEJMA0GCSqGSIb3DQEBCwUA\nMDMxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQwwCgYDVQQD\nEwNSMTEwHhcNMjUwMzI1MDY1MjA4WhcNMjUwNjIzMDY1MjA3WjAWMRQwEgYDVQQD\nDAsqLmxvdGtmYy5jbjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALkP\ngvgopDEBjdY2p7b8ucfFPdJvxDtSUNAOc+2hFFHB1gamOe7rHtJpwVDHTHl9/y2P\nsMSCKIl2XoDOgiXBpmWMQVC+6s3Kv4QbF0QZ5m+10gBUglDtdvOq6kFzMHIL7oS5\nuLzUozm6Cp42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FPyZzEEdFlrNxhv6cevtOX4uvR02F9C352UmXC\nznJn9gkp/8bzZ5dB0YS2ohEFgHDU6CzYu+X0UI290Zg8twWNGJOadDTrP1vnuI85\n6wZ7a/poTwKBgGBZ/Fdez5M+ldzbUUKYyJKekuRB+bDVvuDAzlVwem/15jH6pgHt\nDc7rhqswC0xU6a5Qc1aM7BS2gKvxeI75MODGjdjA4OuAb7XvTUtcuUtMSPZM1mQT\nb0fbh2Nor+aaWwwZrm0Uv7JEC4q5Oe1mbcGOZlKWr3OjQJyWjKyOSthJAoGAC2LZ\nY4D8JNmxGEkP88PKBHPYl00rFib1Z6fFr94LxEH/A6SpjjFZuRqK0rcaCL/TEalQ\n1HLoFFo37C6A2SY7GyB9okQmKOwgdMa81kICIrVyQiZTqDAXOg5LkVtOpELjf3Id\nu2s83cZyrWedZ+7Sifd7iLYJkLwDATU5Vv5ahYkCgYEA0GCQmxHMNBXZzh0bBZlU\ndgRPPsQ1xVk68X+49hLjlPmj+ex3hLgZ+DIJu9G4uqc2KPsTBAN6lMAcqG1ECkGY\naK+EuagOXOVyeDzhB+SRQOvJPKqtfupu8leqW1Mudf8q/6XhhndX0+REVOzl/OE8\nxuOOKKSAbHa+6pwz+7r4tPA=\n-----END PRIVATE KEY-----\n',
+ endtime: 81,
+ },
+ },
+]
diff --git a/core/frontend/src/views/domain/index.vue b/core/frontend/src/views/domain/index.vue
index 6f69fbd2..a3d44dee 100644
--- a/core/frontend/src/views/domain/index.vue
+++ b/core/frontend/src/views/domain/index.vue
@@ -1,100 +1,136 @@
<template>
<div class="py-16px px-24px">
<n-card :bordered="false">
- <n-flex class="mb-16px" justify="space-between">
- <div>
+ <bt-table-layout>
+ <template #toolsLeft>
<n-button type="primary" @click="handleAddDomain">添加域名</n-button>
- </div>
- <div>
- <n-button class="refresh-btn" @click="refreshDomainRecord">刷新域名记录</n-button>
- </div>
- </n-flex>
- <n-data-table :columns="columns" :data="domainData"> </n-data-table>
+ </template>
+ <template #table>
+ <n-data-table :loading="loading" :columns="columns" :data="tableList"> </n-data-table>
+ </template>
+ <template #pageRight>
+ <bt-table-page
+ v-model:page="tableParams.page"
+ v-model:page-size="tableParams.page_size"
+ :item-count="tableTotal"
+ @refresh="getTableData">
+ </bt-table-page>
+ </template>
+ <template #modal>
+ <form-modal />
+ <catch-modal />
+ <ssl-modal />
+ <dns-modal />
+ </template>
+ </bt-table-layout>
</n-card>
</div>
</template>
<script lang="tsx" setup>
-import { DataTableColumns, NFlex, NButton, NSwitch } from 'naive-ui'
+import { DataTableColumns, NFlex, NButton } from 'naive-ui'
+import { getByteUnit } from '@/utils'
+import { useModal } from '@/hooks/modal/useModal'
+import { useTableData } from '@/hooks/useTableData'
+import { deleteDomain, getDomainList } from '@/api/modules/domain'
+import type { MailDomain } from './interface'
-// 域名数据
-const domainData = ref([
- {
- name: 'lotkfc.cn',
- quota: '10.00 GB',
- mailboxes: 50,
- defaultSize: '5.00 GB',
- catchAll: false,
- ssl: { status: '过期于82天', type: 'warning' },
- id: 1,
- },
- {
- name: 'aaa.text',
- quota: '5.00 GB',
- mailboxes: 50,
- defaultSize: '5.00 GB',
- catchAll: false,
- ssl: { status: '未设置', type: 'error' },
- id: 2,
- },
- {
- name: 'aapanel.store',
- quota: '5.00 GB',
- mailboxes: 50000,
- defaultSize: '5.00 GB',
- catchAll: false,
- ssl: { status: '未设置', type: 'error' },
- id: 3,
- },
- {
- name: 'lootk.cn',
- quota: '20.00 MB',
- mailboxes: 50000,
- defaultSize: '5.00 GB',
- catchAll: false,
- ssl: { status: '过期于82天', type: 'warning' },
- id: 4,
+import DomainForm from './components/DomainForm.vue'
+import DomainCatch from './components/DomainCatch.vue'
+import DomainSsl from './components/DomainSsl.vue'
+import DomainDns from './components/DomainDns.vue'
+
+const { tableParams, tableList, loading, tableTotal, getTableData } = useTableData<MailDomain>({
+ immediate: true,
+ params: {
+ page: 1,
+ page_size: 10,
+ keyword: '',
},
-])
+ fetchFn: getDomainList,
+})
-// 表格列定义
-const columns = ref<DataTableColumns>([
+// Table columns
+const columns = ref<DataTableColumns<MailDomain>>([
{
- key: 'name',
+ key: 'domain',
title: '域名',
+ minWidth: 130,
+ ellipsis: {
+ tooltip: true,
+ },
},
{
- title: '配额',
+ title: 'quota',
key: 'quota',
+ render: row => getByteUnit(row.quota),
},
{
- title: '邮箱数',
key: 'mailboxes',
+ title: 'Mailboxes',
},
{
- title: '默认邮箱大小',
- key: 'defaultSize',
- },
- {
- title: 'Catch All',
- key: 'catchAll',
- render: () => <NSwitch size="small"></NSwitch>,
- },
- {
- key: 'ssl',
- title: 'SSL',
+ key: 'mailbox_quota',
+ title: 'Default mailbox size',
+ render: row => getByteUnit(row.mailbox_quota),
},
+ // {
+ // key: 'catch_all',
+ // title: 'Catch All',
+ // render: row => (
+ // <NSwitch
+ // value={row.catch_all}
+ // size="small"
+ // onUpdateValue={(val: boolean) => {
+ // if (val) {
+ // handleOpenCatch(row)
+ // } else {
+ // handleCloseCatch(row)
+ // }
+ // }}
+ // />
+ // ),
+ // },
+ // {
+ // key: 'ssl',
+ // title: 'SSL',
+ // render: row => {
+ // if (row.ssl_status) {
+ // const ssl = row.ssl_info
+ // return (
+ // <NButton
+ // type={ssl.endtime < 0 ? 'error' : 'primary'}
+ // text
+ // onClick={() => {
+ // handleShowSsl(row)
+ // }}>
+ // {ssl.endtime < 0 ? '已过期' : `剩余${ssl.endtime}天`}
+ // </NButton>
+ // )
+ // }
+ // return (
+ // <NButton
+ // type="warning"
+ // text
+ // onClick={() => {
+ // handleShowSsl(row)
+ // }}>
+ // 未设置
+ // </NButton>
+ // )
+ // },
+ // },
{
title: '操作',
key: 'actions',
align: 'right',
- render: () => (
+ render: row => (
<NFlex inline={true}>
<NButton
type="primary"
text={true}
onClick={() => {
- handleDNSRecord()
+ handleDNSRecord(row)
}}>
DNS记录
</NButton>
@@ -102,7 +138,7 @@ const columns = ref<DataTableColumns>([
type="primary"
text={true}
onClick={() => {
- handleEdit()
+ handleEdit(row)
}}>
编辑
</NButton>
@@ -110,7 +146,7 @@ const columns = ref<DataTableColumns>([
type="error"
text={true}
onClick={() => {
- handleDelete()
+ handleDelete(row)
}}>
删除
</NButton>
@@ -119,20 +155,73 @@ const columns = ref<DataTableColumns>([
},
])
-// 处理添加域名
-const handleAddDomain = () => {}
+const [FormModal, formModalApi] = useModal({
+ component: DomainForm,
+ state: {
+ isEdit: false,
+ refresh: getTableData,
+ },
+})
+
+// Handle add domain
+const handleAddDomain = () => {
+ formModalApi.setState({
+ row: null,
+ isEdit: false,
+ })
+ formModalApi.open()
+}
+
+const [CatchModal] = useModal({
+ component: DomainCatch,
+})
+
+// Handle open catch all
+// const handleOpenCatch = (row: MailDomain) => {
+// catchModalApi.setState({ row })
+// catchModalApi.open()
+// }
-// 刷新域名记录
-const refreshDomainRecord = () => {}
+// Handle close catch all
+// const handleCloseCatch = (row: MailDomain) => {
+// console.log(row)
+// }
-// 处理DNS记录
-const handleDNSRecord = () => {}
+const [SslModal] = useModal({
+ component: DomainSsl,
+})
-// 处理编辑
-const handleEdit = () => {}
+// Handle show ssl
+// const handleShowSsl = (row: MailDomain) => {
+// sslModalApi.setState({ row })
+// sslModalApi.open()
+// }
-// 处理删除
-const handleDelete = () => {}
+const [DnsModal, dnsModalApi] = useModal({
+ component: DomainDns,
+ state: {},
+})
+
+// Handle DNS records
+const handleDNSRecord = (row: MailDomain) => {
+ dnsModalApi.setState({ row })
+ dnsModalApi.open()
+}
+
+// Handle edit
+const handleEdit = (row: MailDomain) => {
+ formModalApi.setState({
+ row,
+ isEdit: true,
+ })
+ formModalApi.open()
+}
+
+// Handle delete
+const handleDelete = async (row: MailDomain) => {
+ await deleteDomain({ domain: row.domain })
+ getTableData()
+}
</script>
<style lang="scss" scoped>
diff --git a/core/frontend/src/views/domain/interface.ts b/core/frontend/src/views/domain/interface.ts
new file mode 100644
index 00000000..68911c95
--- /dev/null
+++ b/core/frontend/src/views/domain/interface.ts
@@ -0,0 +1,20 @@
+export interface MailDomain {
+ domain: string
+ a_record: string
+ mailboxes: number
+ mailbox_quota: number
+ quota: number
+ rate_limit: number
+ create_time: number
+ active: number
+ dns_records: DomainDnsRecords
+}
+
+export type DomainDnsRecords = {
+ [key: string]: {
+ type: string
+ host: string
+ value: string
+ valid: boolean
+ }
+}
diff --git a/core/frontend/src/views/login/index.vue b/core/frontend/src/views/login/index.vue
index e813b56f..0a092c9b 100644
--- a/core/frontend/src/views/login/index.vue
+++ b/core/frontend/src/views/login/index.vue
@@ -13,32 +13,94 @@
<h2 class="login-title">Billion Mail</h2>
- <n-form size="large">
- <n-form-item :show-label="false">
+ <n-form ref="formRef" size="large" :model="form" :rules="rules">
+ <n-form-item :show-label="false" path="username">
<n-input v-model:value="form.username" placeholder="Username"></n-input>
</n-form-item>
- <n-form-item :show-label="false">
+ <n-form-item :show-label="false" path="password">
<n-input
v-model:value="form.password"
+ class="password-input"
type="password"
+ show-password-on="click"
placeholder="Password"
- show-password-on="click">
+ @keyup.enter="handleLogin">
</n-input>
</n-form-item>
-
- <n-button type="primary" size="large" block @click="handleLogin">Login</n-button>
+ <n-form-item :show-label="false" :show-feedback="false">
+ <n-button
+ type="primary"
+ size="large"
+ class="font-bold"
+ :loading="loading"
+ :disabled="loading"
+ :block="true"
+ @click="handleLogin">
+ Login
+ </n-button>
+ </n-form-item>
</n-form>
</div>
</div>
</template>
-<script setup>
+<script lang="ts" setup>
+import { useUserStore } from '@/store'
+import { isObject } from '@/utils'
+import { login } from '@/api/modules/user'
+
+const router = useRouter()
+
+const userStore = useUserStore()
+
+const formRef = useTemplateRef('formRef')
+
const form = reactive({
username: '',
password: '',
})
-const handleLogin = () => {}
+const rules = {
+ username: {
+ required: true,
+ message: 'Username cannot be empty!',
+ trigger: ['blur', 'input'],
+ },
+ password: {
+ required: true,
+ message: 'Password cannot be empty!',
+ trigger: ['blur', 'input'],
+ },
+}
+
+const loading = ref(false)
+
+// 添加类型定义
+interface LoginResponse {
+ token: string
+ refresh_token: string
+ ttl: number
+}
+
+const handleLogin = async () => {
+ try {
+ await formRef.value?.validate()
+ loading.value = true
+ const res = await login(toRaw(form))
+ if (isObject<LoginResponse>(res)) {
+ userStore.setLoginInfo({
+ token: res.token,
+ refresh_token: res.refresh_token,
+ ttl: res.ttl,
+ })
+ setTimeout(() => {
+ router.push('/')
+ }, 1000)
+ }
+ } finally {
+ loading.value = false
+ }
+}
</script>
<style lang="scss" scoped>
@@ -54,43 +116,43 @@ const handleLogin = () => {}
.login-container {
display: flex;
+ position: relative;
justify-content: center;
align-items: center;
- min-height: 100vh;
+ min-height: 100%;
background: linear-gradient(135deg, #f0f3ff 0%, #e5f8f7 100%);
- position: relative;
overflow: hidden;
&::before {
content: '';
position: absolute;
+ top: -15%;
+ right: -15%;
width: 40vw;
height: 40vw;
border-radius: 50%;
background-color: var(--accent-green);
- top: -15vh;
- right: -15vw;
z-index: 0;
}
&::after {
content: '';
position: absolute;
+ left: -15%;
+ bottom: -15%;
width: 40vw;
height: 40vw;
border-radius: 50%;
background-color: var(--accent-purple);
- bottom: -15vh;
- left: -15vw;
z-index: 0;
}
}
.login-card {
- background-color: white;
+ width: 100%;
+ max-width: 400px;
+ background-color: #fff;
padding: 52px 32px 62px;
border-radius: 8px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
- width: 100%;
- max-width: 400px;
z-index: 1;
}
diff --git a/core/frontend/src/views/overview/components/BarChart.vue b/core/frontend/src/views/overview/components/BarChart.vue
index fb966316..e888033b 100644
--- a/core/frontend/src/views/overview/components/BarChart.vue
+++ b/core/frontend/src/views/overview/components/BarChart.vue
@@ -1,5 +1,5 @@
<template>
- <v-charts :options="chartOptions" />
+ <bt-charts :options="chartOptions" />
</template>
<script setup lang="ts">
diff --git a/core/frontend/src/views/overview/components/LineChart.vue b/core/frontend/src/views/overview/components/LineChart.vue
index cd353dc3..d167733c 100644
--- a/core/frontend/src/views/overview/components/LineChart.vue
+++ b/core/frontend/src/views/overview/components/LineChart.vue
@@ -1,6 +1,6 @@
<template>
<div class="h-180px">
- <v-charts :options="chartOptions" />
+ <bt-charts :options="chartOptions" />
</div>
</template>
diff --git a/core/frontend/types/components.d.ts b/core/frontend/types/components.d.ts
index 074ebd43..b7962526 100644
--- a/core/frontend/types/components.d.ts
+++ b/core/frontend/types/components.d.ts
@@ -8,26 +8,39 @@ export {}
/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
- ConfigProvider: typeof import('./../src/components/config-provider/index.vue')['default']
+ BtCharts: typeof import('./../src/components/bt-charts/index.vue')['default']
+ BtCloseBtn: typeof import('./../src/components/bt-close-btn/index.vue')['default']
+ BtConfigProvider: typeof import('./../src/components/bt-config-provider/index.vue')['default']
+ BtForm: typeof import('./../src/components/bt-form/index.vue')['default']
+ BtMessage: typeof import('./../src/components/bt-message/index.tsx')['default']
+ BtModal: typeof import('./../src/components/bt-modal/index.vue')['default']
+ BtTableLayout: typeof import('./../src/components/bt-table-layout/index.vue')['default']
+ BtTablePage: typeof import('./../src/components/bt-table-page/index.vue')['default']
+ BtTips: typeof import('./../src/components/bt-tips/index.vue')['default']
+ MessageList: typeof import('./../src/components/bt-message/message-list.tsx')['default']
NButton: typeof import('naive-ui')['NButton']
NCard: typeof import('naive-ui')['NCard']
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
NDataTable: typeof import('naive-ui')['NDataTable']
NDatePicker: typeof import('naive-ui')['NDatePicker']
NDropdown: typeof import('naive-ui')['NDropdown']
+ NEllipsis: typeof import('naive-ui')['NEllipsis']
NFlex: typeof import('naive-ui')['NFlex']
NForm: typeof import('naive-ui')['NForm']
NFormItem: typeof import('naive-ui')['NFormItem']
NInput: typeof import('naive-ui')['NInput']
+ NInputNumber: typeof import('naive-ui')['NInputNumber']
NLayout: typeof import('naive-ui')['NLayout']
NLayoutHeader: typeof import('naive-ui')['NLayoutHeader']
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
NMenu: typeof import('naive-ui')['NMenu']
+ NModal: typeof import('naive-ui')['NModal']
+ NPagination: typeof import('naive-ui')['NPagination']
NRadioButton: typeof import('naive-ui')['NRadioButton']
NRadioGroup: typeof import('naive-ui')['NRadioGroup']
NSelect: typeof import('naive-ui')['NSelect']
+ NTable: typeof import('naive-ui')['NTable']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
- VCharts: typeof import('./../src/components/v-charts/index.vue')['default']
}
}