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

Add layout and menus

zdme4580e001fe2
diff --git a/core/frontend/eslint.config.mjs b/core/frontend/eslint.config.mjs
index e33d34fb..9ae86a3d 100644
--- a/core/frontend/eslint.config.mjs
+++ b/core/frontend/eslint.config.mjs
@@ -73,7 +73,7 @@ export default [
prettier,
},
rules: {
- 'prettier/prettier': 'error',
+ // 'prettier/prettier': 'error',
},
},
]
diff --git a/core/frontend/package.json b/core/frontend/package.json
index 1159f1c4..57678c0f 100644
--- a/core/frontend/package.json
+++ b/core/frontend/package.json
@@ -12,12 +12,19 @@
"lint:fix": "eslint . --ext .vue,.ts,.tsx --fix"
},
"dependencies": {
+ "@unocss/reset": "66.1.0-beta.7",
+ "@vueuse/core": "^13.0.0",
+ "date-fns": "^4.1.0",
+ "lodash-es": "^4.17.21",
+ "pinia": "^3.0.1",
+ "pinia-plugin-persistedstate": "^4.2.0",
"vue": "^3.5.13",
"vue-i18n": "12.0.0-alpha.2",
"vue-router": "^4.5.0"
},
"devDependencies": {
"@eslint/js": "^9.23.0",
+ "@iconify-json/mdi": "^1.2.3",
"@rsbuild/core": "^1.2.16",
"@rsbuild/plugin-babel": "^1.0.4",
"@rsbuild/plugin-basic-ssl": "^1.1.1",
@@ -25,8 +32,13 @@
"@rsbuild/plugin-sass": "^1.2.2",
"@rsbuild/plugin-vue": "^1.0.7",
"@rsbuild/plugin-vue-jsx": "^1.1.0",
+ "@types/lodash-es": "^4.17.12",
"@typescript-eslint/eslint-plugin": "^8.28.0",
"@typescript-eslint/parser": "^8.28.0",
+ "@unocss/preset-attributify": "66.1.0-beta.7",
+ "@unocss/preset-icons": "66.1.0-beta.7",
+ "@unocss/preset-uno": "66.1.0-beta.7",
+ "@unocss/transformer-directives": "66.1.0-beta.7",
"@unocss/webpack": "66.1.0-beta.7",
"eslint": "^9.21.0",
"eslint-config-prettier": "^10.1.1",
diff --git a/core/frontend/pnpm-lock.yaml b/core/frontend/pnpm-lock.yaml
index b5a8624b..db28fdd9 100644
--- a/core/frontend/pnpm-lock.yaml
+++ b/core/frontend/pnpm-lock.yaml
@@ -8,6 +8,24 @@ importers:
.:
dependencies:
+ '@unocss/reset':
+ specifier: 66.1.0-beta.7
+ version: 66.1.0-beta.7
+ '@vueuse/core':
+ specifier: ^13.0.0
+ date-fns:
+ specifier: ^4.1.0
+ version: 4.1.0
+ lodash-es:
+ specifier: ^4.17.21
+ version: 4.17.21
+ pinia:
+ specifier: ^3.0.1
+ pinia-plugin-persistedstate:
+ specifier: ^4.2.0
vue:
specifier: ^3.5.13
version: 3.5.13([email protected])
@@ -21,6 +39,9 @@ importers:
'@eslint/js':
specifier: ^9.23.0
version: 9.23.0
+ '@iconify-json/mdi':
+ specifier: ^1.2.3
+ version: 1.2.3
'@rsbuild/core':
specifier: ^1.2.16
version: 1.2.19
@@ -42,12 +63,27 @@ importers:
'@rsbuild/plugin-vue-jsx':
specifier: ^1.1.0
version: 1.1.0(@babel/[email protected])(@rsbuild/[email protected])
+ '@types/lodash-es':
+ specifier: ^4.17.12
+ version: 4.17.12
'@typescript-eslint/eslint-plugin':
specifier: ^8.28.0
'@typescript-eslint/parser':
specifier: ^8.28.0
+ '@unocss/preset-attributify':
+ specifier: 66.1.0-beta.7
+ version: 66.1.0-beta.7
+ '@unocss/preset-icons':
+ specifier: 66.1.0-beta.7
+ version: 66.1.0-beta.7
+ '@unocss/preset-uno':
+ specifier: 66.1.0-beta.7
+ version: 66.1.0-beta.7
+ '@unocss/transformer-directives':
+ specifier: 66.1.0-beta.7
+ version: 66.1.0-beta.7
'@unocss/webpack':
specifier: 66.1.0-beta.7
version: 66.1.0-beta.7([email protected])
@@ -83,10 +119,10 @@ importers:
unplugin-auto-import:
specifier: ^19.1.2
- version: 19.1.2
unplugin-vue-components:
specifier: ^28.4.1
vue-eslint-parser:
specifier: ^10.1.1
@@ -470,6 +506,9 @@ packages:
resolution: {integrity: sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==}
engines: {node: '>=18.18'}
+ '@iconify-json/[email protected]':
+ resolution: {integrity: sha512-O3cLwbDOK7NNDf2ihaQOH5F9JglnulNDFV7WprU2dSoZu3h3cWH//h74uQAB87brHmvFVxIOkuBX2sZSzYhScg==}
+
'@iconify/[email protected]':
resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==}
@@ -553,6 +592,10 @@ packages:
resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==}
engines: {node: '>= 8'}
+ resolution: {integrity: sha512-Perby8hJGUeCWad5oTVXb/Ibvp18ZCUC5PxHHu+acMDmVfnxSo48yqk7qNd09VkTF3LEzoEjNZpmW2ZWN0ry7A==}
+ engines: {node: '>=18.12.0'}
+
resolution: {integrity: sha512-vsJDAkYR6qCPu+ioGScGiMYR7LvZYIXh/dlQeviqoTWNCVfKTLYD/LkNWH4Mxsv2a5vpIRc77FN5DnmK1eBggQ==}
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
@@ -791,6 +834,10 @@ packages:
'@sinclair/[email protected]':
resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==}
+ '@sindresorhus/[email protected]':
+ resolution: {integrity: sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==}
+ engines: {node: '>=18'}
+
resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==}
@@ -848,6 +895,9 @@ packages:
resolution: {integrity: sha512-ClsL5nMwKaBRwPcCvH8E7+nU4GxHVx1axNvMZTFHMEfNI7oahimt26P5zjVCRrjiIWj6YFXfE1v3dEp94wLcGQ==}
+ '@types/[email protected]':
+ resolution: {integrity: sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==}
+
resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==}
@@ -1023,6 +1073,15 @@ packages:
resolution: {integrity: sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==}
+ resolution: {integrity: sha512-1syn558KhyN+chO5SjlZIwJ8bV/bQ1nOVTG66t2RbG66ZGekyiYNmRO7X9BJCXQqPsFHlnksqvPhce2qpzxFnA==}
+
+ resolution: {integrity: sha512-CY0I1JH3Z8PECbn6k3TqM1Bk9ASWxeMtTCvZr7vb+CHi+X/QwQm5F1/fPagraamKMAHVfuuCbdcnNg1A4CYVWQ==}
+
+ resolution: {integrity: sha512-uBFxnp8gwW2vD6FrJB8JZLUzVb6PNRG0B0jBnHsOH8uKyva2qINY8PTF5Te4QlTbMDqU5K6qtJDr6cNsKWhbOA==}
+
resolution: {integrity: sha512-NaCwtw8o48B9I6L1zl2p41OHo/2Z4wqYGGIK1Khu5T7yxrn+ATOixn/Udn2m+6kZKB/J7cuT9DbWWhRxqixACg==}
@@ -1040,6 +1099,19 @@ packages:
resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==}
+ '@vueuse/[email protected]':
+ resolution: {integrity: sha512-rkgb4a8/0b234lMGCT29WkCjPfsX0oxrIRR7FDndRoW3FsaC9NBzefXg/9TLhAgwM11f49XnutshM4LzJBrQ5g==}
+ peerDependencies:
+ vue: ^3.5.0
+
+ '@vueuse/[email protected]':
+ resolution: {integrity: sha512-TRNksqmvtvqsuHf7bbgH9OSXEV2b6+M3BSN4LR5oxWKykOFT9gV78+C2/0++Pq9KCp9KQ1OQDPvGlWNQpOb2Mw==}
+
+ '@vueuse/[email protected]':
+ resolution: {integrity: sha512-9MiHhAPw+sqCF/RLo8V6HsjRqEdNEWVpDLm2WBRW2G/kSQjb8X901sozXpSCaeLG0f7TEfMrT4XNaA5m1ez7Dg==}
+ peerDependencies:
+ vue: ^3.5.0
+
'@webassemblyjs/[email protected]':
resolution: {integrity: sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==}
@@ -1147,6 +1219,9 @@ packages:
resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-5WeXXAvTmitV1RqJFppT5QtUiz2p1mRSYU000Jkft5ZUCLJIk4uQriYNO50HknxKwM6jd8utNc66K1qGIwwWBQ==}
+
resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==}
@@ -1171,6 +1246,14 @@ packages:
resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==}
+ resolution: {integrity: sha512-6Tzk1/TNeI3WBPpK0j/Ss4+gPj3PUJYbWl/MWDJBThFvwNGNkXtd7Cz8BJtD4aRwoGHtzQD0SnxamgUiBH0/Nw==}
+ peerDependencies:
+ magicast: ^0.3.5
+ peerDependenciesMeta:
+ magicast:
+ optional: true
+
resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==}
engines: {node: '>=8'}
@@ -1190,6 +1273,10 @@ packages:
resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==}
engines: {node: '>= 8.10.0'}
+ resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==}
+ engines: {node: '>= 14.16.0'}
+
resolution: {integrity: sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==}
engines: {node: '>=6.0'}
@@ -1198,6 +1285,9 @@ packages:
resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==}
+
resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
engines: {node: '>=7.0.0'}
@@ -1230,6 +1320,10 @@ packages:
resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==}
+ resolution: {integrity: sha512-yCEafptTtb4bk7GLEQoM8KVJpxAfdBJYaXyzQEgQQQgYrZiDp8SJmGKlYza6CYjEDNstAdNdKA3UuoULlEbS6w==}
+ engines: {node: '>=12.13'}
+
resolution: {integrity: sha512-SJ4/EHwS36QMJd6h/Rg+GyR4A5xE0FSI3eZ+iBVpfqf1x0eTSg1smWLHrA+2jQThZSh97fmSgFSU8B61nxosxA==}
@@ -1263,6 +1357,9 @@ packages:
resolution: {integrity: sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==}
+ resolution: {integrity: sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==}
+
resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==}
engines: {node: '>=6.0'}
@@ -1275,6 +1372,9 @@ packages:
resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
+ resolution: {integrity: sha512-2J6Kc/m3irCeqVG42T+SaUMesaK7oGWaedGnQQK/+O0gYc+2SP5bKh/KKTE7d7SJ+GCA9UUE1GRzh6oDe0EnGw==}
+
resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==}
engines: {node: '>=0.10.0'}
@@ -1285,6 +1385,10 @@ packages:
resolution: {integrity: sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==}
+ resolution: {integrity: sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==}
+ engines: {node: '>=12'}
+
resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==}
@@ -1303,6 +1407,9 @@ packages:
resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
engines: {node: '>=0.12'}
+ resolution: {integrity: sha512-fZmsRiDNv07K6s2KkKFTiD2aIvECa7++PKyD5NC32tpRw46qZA3sOz+aM+/V9V0GDHxVTKLziveV4JhzBHDp9Q==}
+
resolution: {integrity: sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==}
@@ -1480,6 +1587,10 @@ packages:
resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==}
engines: {node: '>=6.9.0'}
+ resolution: {integrity: sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA==}
+ hasBin: true
+
resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}
engines: {node: '>= 6'}
@@ -1507,6 +1618,10 @@ packages:
resolution: {integrity: sha512-iInW14XItCXET01CQFqudPOWP2jYMl7T+QRQT+UNcR/iQncN/F0UNpgd76iFkBPgNQb4+X3LV9tLJYzwh+Gl3A==}
engines: {node: '>=18'}
+ resolution: {integrity: sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==}
+ engines: {node: '>=18'}
+
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
@@ -1528,10 +1643,17 @@ packages:
resolution: {integrity: sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==}
engines: {node: '>=12.0.0'}
+ resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==}
+
resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==}
engines: {node: '>= 4'}
+ resolution: {integrity: sha512-bAH5jbK/F3T3Jls4I0SO1hmPR0dKU0a7+SY6n1yzRtG54FLO8d6w/nxLFX2Nb7dBu6cCWXPaAME6cYqFUMmuCA==}
+ engines: {node: '>= 4'}
+
resolution: {integrity: sha512-3jatXi9ObIsPGr3N5hGw/vWWcTkq6hUYhpQz4k0wLC+owqWi/LiugIw9x0EdNZ2yGedKN/HzePiBvaJRXa0Ujg==}
@@ -1559,6 +1681,10 @@ packages:
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
engines: {node: '>=0.12.0'}
+ resolution: {integrity: sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==}
+ engines: {node: '>=12.13'}
+
resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
@@ -1620,6 +1746,13 @@ packages:
resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}
+ resolution: {integrity: sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==}
+ engines: {node: '>= 8'}
+
+ resolution: {integrity: sha512-xYSH7AvuQ6nXkq42x0v5S8/Iry+cfulBz/DJQzhIyESdLD7425jXsPy4vn5cCXU+HhRN2kVw51Vd1K6/By4BQg==}
+
resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==}
@@ -1687,6 +1820,9 @@ packages:
resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==}
engines: {node: '>=16 || 14 >=14.17'}
+ resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==}
+
resolution: {integrity: sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==}
@@ -1730,9 +1866,17 @@ packages:
resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==}
+ resolution: {integrity: sha512-mn8wBFV9G9+UFHIrq+pZ2r2zL4aPau/by3kJb3cM7+5tQHMt6HGQB8FDIeKFYp8o0D2pnH6nVsO88N4AmUxIWg==}
+ engines: {node: ^14.16.0 || >=16.10.0}
+ hasBin: true
+
resolution: {integrity: sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw==}
+ resolution: {integrity: sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==}
+
resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==}
engines: {node: '>= 0.8.0'}
@@ -1760,6 +1904,10 @@ packages:
resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-Vj7sf++t5pBD637NSfkxpHSMfWaeig5+DKWLhcqIYx6mWQz5hdJTGDVMQiJcw1ZYkhs7AazKDGpRVji1LJCZUQ==}
+ engines: {node: '>=18'}
+
resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==}
@@ -1777,6 +1925,26 @@ packages:
resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==}
engines: {node: '>=12'}
+ resolution: {integrity: sha512-3buhA7ac+ssbOIx3VRCC8oHkoFwhDM9oHRCjo7nj+O8WUqnW+jRqh7eYT5eS/DNa3H28zp3dYf/nd/Vc8zj8eQ==}
+ peerDependencies:
+ '@pinia/nuxt': '>=0.9.0'
+ pinia: '>=2.3.0'
+ peerDependenciesMeta:
+ '@pinia/nuxt':
+ optional: true
+ pinia:
+ optional: true
+
+ resolution: {integrity: sha512-WXglsDzztOTH6IfcJ99ltYZin2mY8XZCXujkYWVIJlBjqsP6ST7zw+Aarh63E1cDVYeyUcPCxPHzJpEOmzB6Wg==}
+ peerDependencies:
+ typescript: '>=4.4.4'
+ vue: ^2.7.0 || ^3.5.11
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+
resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==}
@@ -1817,10 +1985,17 @@ packages:
resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==}
+ resolution: {integrity: sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==}
+
resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==}
engines: {node: '>=8.10.0'}
+ resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==}
+ engines: {node: '>= 14.18.0'}
+
resolution: {integrity: sha512-DQxy6liNadHfrLahZR7lMdc227NYVaQZhY5FMsxLEjX8X0SCuH+ESHSLCoz2yDZFq1/CLMDOAHdsEHwOEXKtvg==}
@@ -1836,6 +2011,9 @@ packages:
resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==}
engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
+ resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==}
+
resolution: {integrity: sha512-iAtQy/L4QFU+rTJ1YUjXqJOJzuwEghqWzCEYD2FEghT7Gsy1VdABntrO4CLopA5IkflTyqNiLNwPcOJ3S7UKLg==}
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
@@ -2013,6 +2191,10 @@ packages:
resolution: {integrity: sha512-FoqMu0NCGBLCcAkS1qA+XJIQTR6/JHfQXl+uGteNCQ76T91DMUjPa9xfmeqMY3z80nLSg9yQmNjK0Px6RWsH/A==}
engines: {node: '>=18'}
+ resolution: {integrity: sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==}
+ engines: {node: '>=14.16'}
+
resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}
engines: {node: '>=0.10.0'}
@@ -2024,6 +2206,13 @@ packages:
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
engines: {node: '>=0.10.0'}
+ resolution: {integrity: sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==}
+ engines: {node: '>=0.10.0'}
+
+ resolution: {integrity: sha512-vj5lIj3Mwf9D79hBkltk5qmkFI+biIKWS2IBxEyEU3AX1tUf7AoL8nSazCOiiqQsGKIq01SClsKEzweu34uwvA==}
+
resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==}
engines: {node: '>=8'}
@@ -2031,6 +2220,10 @@ packages:
resolution: {integrity: sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==}
+ resolution: {integrity: sha512-5JRxVqC8I8NuOUjzBbvVJAKNM8qoVuH0O77h4WInc/qC2q5IreqKxYwgkga3PfA22OayK2ikceb/B26dztPl+Q==}
+ engines: {node: '>=16'}
+
resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
engines: {node: '>=8'}
@@ -2125,9 +2318,16 @@ packages:
resolution: {integrity: sha512-LH5WL+un92tGAzWS87k7LkAfwpMdm7V0IXG2FxEjZz/QxiIW5J5LkcrKQThj0aRz6+h/lFmKI9EUXmK/T0bcrw==}
+ resolution: {integrity: sha512-AbaYw0Nm4mK4qjhns67C+kgxR2YWiwlDBPzxrN8h8C6VtAdCgditAY5Dezu3IJy4XVqAnbrXt9oQJvsn3fyozg==}
+
resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==}
+ resolution: {integrity: sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==}
+ engines: {node: '>=18'}
+
resolution: {integrity: sha512-oVUL7PSlyVV3QRhsdcyYEMaDX8HJyS/CnUonEJTYA3//bWO+o/4gG8F7auGWWWkrrxBQBYOO8DKe+C53ktpRXw==}
engines: {node: '>=18.12.0'}
@@ -2177,6 +2377,10 @@ packages:
resolution: {integrity: sha512-Qp+iiD+qCRnUek+nDoYvtWX7tfnYyXsrOnJ452FRTgOyKmTM7TUJ3l+PLPJOOWPTUyKISKp4isC5JJPSXUjGgw==}
engines: {node: '>=18.12.0'}
+ resolution: {integrity: sha512-nwNCjxJTjNuLCgFr42fEak5OcLuB3ecca+9ksPFNvtfYSLpjf+iJqSIaSnIile6ZPbKYxI5k2AfXqeopGudK/g==}
+ hasBin: true
+
resolution: {integrity: sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==}
engines: {node: '>=4'}
@@ -2698,6 +2902,10 @@ snapshots:
'@humanwhocodes/[email protected]': {}
+ '@iconify-json/[email protected]':
+ dependencies:
+ '@iconify/types': 2.0.0
+
'@iconify/[email protected]': {}
'@iconify/[email protected]':
@@ -2802,6 +3010,33 @@ snapshots:
'@nodelib/fs.scandir': 2.1.5
fastq: 1.19.1
+ dependencies:
+ c12: 3.0.2
+ consola: 3.4.2
+ defu: 6.1.4
+ destr: 2.0.3
+ errx: 0.1.0
+ exsolve: 1.0.4
+ globby: 14.1.0
+ ignore: 7.0.3
+ jiti: 2.4.2
+ klona: 2.0.6
+ knitwork: 1.2.0
+ mlly: 1.7.4
+ ohash: 2.0.11
+ pathe: 2.0.3
+ pkg-types: 2.1.0
+ scule: 1.3.0
+ semver: 7.7.1
+ std-env: 3.8.1
+ ufo: 1.5.4
+ unctx: 2.4.1
+ unimport: 4.1.2
+ untyped: 2.0.0
+ transitivePeerDependencies:
+ - magicast
+
'@pkgr/[email protected]': {}
'@polka/[email protected]': {}
@@ -2992,6 +3227,8 @@ snapshots:
'@sinclair/[email protected]': {}
+ '@sindresorhus/[email protected]': {}
+
dependencies:
tslib: 2.8.1
@@ -3064,6 +3301,8 @@ snapshots:
dependencies:
undici-types: 6.20.0
+ '@types/[email protected]': {}
+
'@types/[email protected]': {}
@@ -3372,6 +3611,24 @@ snapshots:
'@vue/[email protected]': {}
+ dependencies:
+ '@vue/devtools-kit': 7.7.2
+
+ dependencies:
+ '@vue/devtools-shared': 7.7.2
+ birpc: 0.2.19
+ hookable: 5.5.3
+ mitt: 3.0.1
+ perfect-debounce: 1.0.0
+ speakingurl: 14.0.1
+ superjson: 2.2.2
+
+ dependencies:
+ rfdc: 1.4.1
+
dependencies:
'@vue/shared': 3.5.13
@@ -3396,6 +3653,19 @@ snapshots:
'@vue/[email protected]': {}
+ dependencies:
+ '@types/web-bluetooth': 0.0.21
+ '@vueuse/metadata': 13.0.0
+ '@vueuse/shared': 13.0.0([email protected]([email protected]))
+ vue: 3.5.13([email protected])
+
+ '@vueuse/[email protected]': {}
+
+ dependencies:
+ vue: 3.5.13([email protected])
+
'@webassemblyjs/[email protected]':
dependencies:
'@webassemblyjs/helper-numbers': 1.13.2
@@ -3531,6 +3801,8 @@ snapshots:
+
@@ -3557,6 +3829,21 @@ snapshots:
+ dependencies:
+ chokidar: 4.0.3
+ confbox: 0.1.8
+ defu: 6.1.4
+ dotenv: 16.4.7
+ exsolve: 1.0.4
+ giget: 2.0.0
+ jiti: 2.4.2
+ ohash: 2.0.11
+ pathe: 2.0.3
+ perfect-debounce: 1.0.0
+ pkg-types: 2.1.0
+ rc9: 2.1.2
+
@@ -3580,10 +3867,18 @@ snapshots:
optionalDependencies:
fsevents: 2.3.3
+ dependencies:
+ readdirp: 4.1.2
+
+ dependencies:
+ consola: 3.4.2
+
dependencies:
color-name: 1.1.4
@@ -3606,6 +3901,10 @@ snapshots:
+ dependencies:
+ is-what: 4.1.16
+
@@ -3636,18 +3935,24 @@ snapshots:
+
dependencies:
ms: 2.1.3
+
+
@@ -3661,6 +3966,8 @@ snapshots:
+
@@ -3870,6 +4177,15 @@ snapshots:
+ dependencies:
+ citty: 0.1.6
+ consola: 3.4.2
+ defu: 6.1.4
+ node-fetch-native: 1.6.6
+ nypm: 0.6.0
+ pathe: 2.0.3
+
dependencies:
is-glob: 4.0.3
@@ -3888,6 +4204,15 @@ snapshots:
+ dependencies:
+ '@sindresorhus/merge-streams': 2.3.0
+ fast-glob: 3.3.3
+ ignore: 7.0.3
+ path-type: 6.0.0
+ slash: 5.1.0
+ unicorn-magic: 0.3.0
+
@@ -3902,8 +4227,12 @@ snapshots:
+
+
@@ -3925,6 +4254,8 @@ snapshots:
+
@@ -3979,6 +4310,10 @@ snapshots:
dependencies:
json-buffer: 3.0.1
+
+
@@ -4043,6 +4378,8 @@ snapshots:
dependencies:
brace-expansion: 2.0.1
+
dependencies:
acorn: 8.14.1
@@ -4095,12 +4432,22 @@ snapshots:
dependencies:
boolbase: 1.0.0
+ dependencies:
+ citty: 0.1.6
+ consola: 3.4.2
+ pathe: 2.0.3
+ pkg-types: 2.1.0
+ tinyexec: 0.3.2
+
dependencies:
destr: 2.0.3
node-fetch-native: 1.6.6
ufo: 1.5.4
+
dependencies:
deep-is: 0.1.4
@@ -4130,6 +4477,8 @@ snapshots:
+
@@ -4140,6 +4489,24 @@ snapshots:
+ dependencies:
+ '@nuxt/kit': 3.16.1
+ deep-pick-omit: 1.2.1
+ defu: 6.1.4
+ destr: 2.0.3
+ optionalDependencies:
+ transitivePeerDependencies:
+ - magicast
+
+ dependencies:
+ '@vue/devtools-api': 7.7.2
+ vue: 3.5.13([email protected])
+ optionalDependencies:
+ typescript: 5.8.2
+
dependencies:
confbox: 0.1.8
@@ -4181,10 +4548,17 @@ snapshots:
dependencies:
safe-buffer: 5.2.1
+ dependencies:
+ defu: 6.1.4
+ destr: 2.0.3
+
dependencies:
picomatch: 2.3.1
+
@@ -4193,6 +4567,8 @@ snapshots:
+
dependencies:
'@types/estree': 1.0.6
@@ -4357,6 +4733,8 @@ snapshots:
mrmime: 2.0.1
totalist: 3.0.1
+
@@ -4366,12 +4744,20 @@ snapshots:
+
+
dependencies:
js-tokens: 9.0.1
+ dependencies:
+ copy-anything: 3.0.5
+
dependencies:
has-flag: 4.0.0
@@ -4455,8 +4841,17 @@ snapshots:
jiti: 2.4.2
quansync: 0.2.10
+ dependencies:
+ acorn: 8.14.1
+ estree-walker: 3.0.3
+ magic-string: 0.30.17
+ unplugin: 2.2.2
+
+
dependencies:
acorn: 8.14.1
@@ -4503,7 +4898,7 @@ snapshots:
- supports-color
- vue
dependencies:
local-pkg: 1.1.1
magic-string: 0.30.17
@@ -4511,13 +4906,16 @@ snapshots:
unimport: 4.1.2
unplugin: 2.2.2
unplugin-utils: 0.2.4
+ optionalDependencies:
+ '@nuxt/kit': 3.16.1
+ '@vueuse/core': 13.0.0([email protected]([email protected]))
dependencies:
pathe: 2.0.3
picomatch: 4.0.2
dependencies:
chokidar: 3.6.0
debug: 4.4.0
@@ -4530,6 +4928,7 @@ snapshots:
vue: 3.5.13([email protected])
optionalDependencies:
'@babel/parser': 7.27.0
+ '@nuxt/kit': 3.16.1
transitivePeerDependencies:
- supports-color
@@ -4538,6 +4937,14 @@ snapshots:
acorn: 8.14.1
webpack-virtual-modules: 0.6.2
+ dependencies:
+ citty: 0.1.6
+ defu: 6.1.4
+ jiti: 2.4.2
+ knitwork: 1.2.0
+ scule: 1.3.0
+
diff --git a/core/frontend/rsbuild.config.ts b/core/frontend/rsbuild.config.ts
index 5eb84773..c8ed2a43 100644
--- a/core/frontend/rsbuild.config.ts
+++ b/core/frontend/rsbuild.config.ts
@@ -43,7 +43,7 @@ export default defineConfig({
}),
Components({
dts: 'types/components.d.ts',
- dirs: ['src/components'],
+ dirs: ['src/components/**/*'],
extensions: ['vue', 'tsx'],
resolvers: [NaiveUiResolver()],
}),
diff --git a/core/frontend/src/App.vue b/core/frontend/src/App.vue
index 999af8a8..497d4700 100644
--- a/core/frontend/src/App.vue
+++ b/core/frontend/src/App.vue
@@ -1,11 +1,3 @@
<template>
- <div>
- <div class="p-20px flex-center">
- <n-button>{{ aaa }}</n-button>
- </div>
- </div>
+ <router-view></router-view>
</template>
-
-<script lang="ts" setup>
-const aaa = ref(1)
-</script>
diff --git a/core/frontend/src/assets/images/logo.png b/core/frontend/src/assets/images/logo.png
new file mode 100644
index 00000000..9dd27fd4
Binary files /dev/null and b/core/frontend/src/assets/images/logo.png differ
diff --git a/core/frontend/src/components/config-provider/index.vue b/core/frontend/src/components/config-provider/index.vue
new file mode 100644
index 00000000..1ee70c9d
--- /dev/null
+++ b/core/frontend/src/components/config-provider/index.vue
@@ -0,0 +1,5 @@
+<template>
+ <n-config-provider abstract inline-theme-disabled>
+ <slot></slot>
+ </n-config-provider>
+</template>
diff --git a/core/frontend/src/config/loadingBar.ts b/core/frontend/src/config/loadingBar.ts
new file mode 100644
index 00000000..844fb0fd
--- /dev/null
+++ b/core/frontend/src/config/loadingBar.ts
@@ -0,0 +1,14 @@
+import { createDiscreteApi } from 'naive-ui'
+
+const { loadingBar } = createDiscreteApi(['loadingBar'], {
+ configProviderProps: {
+ themeOverrides: {
+ LoadingBar: {
+ colorLoading: '#20a53a',
+ colorError: '#ef0808',
+ },
+ },
+ },
+})
+
+export default loadingBar
diff --git a/core/frontend/src/index.ts b/core/frontend/src/index.ts
index 5ffdbd37..8db53b6b 100644
--- a/core/frontend/src/index.ts
+++ b/core/frontend/src/index.ts
@@ -1,6 +1,13 @@
import { createApp } from 'vue'
-import App from './App.vue'
+import router from '@/router'
+import pinia from '@/store'
+import App from '@/App.vue'
+
+import '@unocss/reset/normalize.css'
import 'uno.css'
-import './styles/index.scss'
+import '@/styles/index.scss'
-createApp(App).mount('#root')
+const app = createApp(App)
+app.use(router)
+app.use(pinia)
+app.mount('#root')
diff --git a/core/frontend/src/layout/components/AppMain.vue b/core/frontend/src/layout/components/AppMain.vue
new file mode 100644
index 00000000..aa2e4a1f
--- /dev/null
+++ b/core/frontend/src/layout/components/AppMain.vue
@@ -0,0 +1,13 @@
+<template>
+ <div>
+ <router-view :key="key" v-slot="{ Component, route }">
+ <component :is="Component" :key="route.path" />
+ </router-view>
+ </div>
+</template>
+
+<script lang="ts" setup>
+const key = computed(() => {
+ return Math.random()
+})
+</script>
diff --git a/core/frontend/src/layout/components/Header/index.vue b/core/frontend/src/layout/components/Header/index.vue
new file mode 100644
index 00000000..42f9375d
--- /dev/null
+++ b/core/frontend/src/layout/components/Header/index.vue
@@ -0,0 +1,5 @@
+<template>
+ <div>aaaa</div>
+</template>
+
+<script lang="ts" setup></script>
diff --git a/core/frontend/src/layout/components/Sidebar.vue b/core/frontend/src/layout/components/Sidebar.vue
new file mode 100644
index 00000000..05e4a311
--- /dev/null
+++ b/core/frontend/src/layout/components/Sidebar.vue
@@ -0,0 +1,135 @@
+<template>
+ <n-layout-sider
+ :width="264"
+ :content-style="{
+ display: 'flex',
+ flexDirection: 'column',
+ height: '100%',
+ overflow: 'hidden',
+ }">
+ <!-- 应用标志和名称 -->
+ <div class="app-logo">
+ <a href="#">
+ <img class="icon" src="@images/logo.png" alt="" />
+ <span class="app-name">Billion Mail</span>
+ </a>
+ </div>
+
+ <!-- 导航菜单 -->
+ <div class="nav-section">
+ <n-menu :value="activeMenuKey" :options="menuOptions" :root-indent="20"> </n-menu>
+ </div>
+ </n-layout-sider>
+</template>
+
+<script lang="tsx" setup>
+import { RouterLink, RouteRecordRaw } from 'vue-router'
+import { useMenuStore } from '@/store'
+import { menuList } from '@/router/router'
+
+const route = useRoute()
+
+const menuStore = useMenuStore()
+
+// 当前菜单名称
+const activeMenuKey = computed(() => {
+ return String(route.meta?.key || '')
+})
+
+// 路由菜单
+const routerMenus = computed(() => {
+ return menuStore.menuList.filter(route => route.meta && !route.meta.hidden)
+})
+
+// 导航菜单选项
+const menuOptions = computed(() => {
+ return routerMenus.value.map(route => ({
+ key: `${route.meta?.key}`,
+ label: () => renderLabel(route),
+ }))
+})
+
+const renderLabel = (route: RouteRecordRaw) => {
+ const name = route.children?.[0]?.name || ''
+ return (
+ <RouterLink class="flex items-center" to={{ name }}>
+ <span class={`i-mdi-${route.meta?.icon || ''} text-22px`}></span>
+ <span class="ml-16px">{route.meta?.title || ''}</span>
+ </RouterLink>
+ )
+}
+
+onMounted(() => {
+ menuStore.setMenuList(menuList)
+})
+</script>
+
+<style scoped>
+.n-layout-sider {
+ --n-color: #3f4d67;
+ --n-text-color: #fff;
+ box-shadow: 1px 0 20px 0 #3f4d67;
+}
+
+.app-logo {
+ display: flex;
+ padding: 16px 24px;
+ a {
+ display: flex;
+ align-items: center;
+ }
+ .icon {
+ height: 36px;
+ }
+ .app-name {
+ margin-left: 10px;
+ font-size: 18px;
+ font-weight: 500;
+ color: #e8edf7;
+ }
+}
+
+.nav-section {
+ flex: 1;
+ overflow: auto;
+ padding-top: 10px;
+}
+
+.n-menu {
+ --n-item-height: 44px;
+ --n-item-text-color: #b7c0cd;
+ --n-item-color-active: rgba(0, 0, 0, 0.1);
+ --n-item-text-color-active: #ffffff;
+ --n-item-color-hover: rgba(0, 0, 0, 0.1);
+ --n-item-text-color-hover: #ffffff;
+ --n-item-color-active-hover: rgba(0, 0, 0, 0.1);
+ --n-item-text-color-active-hover: #ffffff;
+ :deep(.n-menu-item) {
+ margin-top: 0;
+ .n-menu-item-content {
+ padding-right: 20px;
+ line-height: 1;
+ &::before {
+ left: 0;
+ right: 0;
+ }
+ &::after {
+ content: '';
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ width: 3px;
+ transition: background-color 0.3s var(--n-bezier);
+ }
+ &:hover,
+ &.n-menu-item-content--selected {
+ font-weight: 500;
+ &::after {
+ background-color: #04a9f5;
+ }
+ }
+ }
+ }
+}
+</style>
diff --git a/core/frontend/src/layout/components/index.ts b/core/frontend/src/layout/components/index.ts
new file mode 100644
index 00000000..68a1b814
--- /dev/null
+++ b/core/frontend/src/layout/components/index.ts
@@ -0,0 +1,3 @@
+export { default as Sidebar } from './Sidebar.vue'
+export { default as AppMain } from './AppMain.vue'
+export { default as AppHeader } from './Header/index.vue'
diff --git a/core/frontend/src/layout/index.vue b/core/frontend/src/layout/index.vue
new file mode 100644
index 00000000..c185673c
--- /dev/null
+++ b/core/frontend/src/layout/index.vue
@@ -0,0 +1,15 @@
+<template>
+ <config-provider>
+ <n-layout class="w-full h-full" has-sider>
+ <sidebar></sidebar>
+ <n-layout>
+ <app-header></app-header>
+ <app-main></app-main>
+ </n-layout>
+ </n-layout>
+ </config-provider>
+</template>
+
+<script lang="ts" setup>
+import { Sidebar, AppHeader, AppMain } from './components'
+</script>
diff --git a/core/frontend/src/router/constant.ts b/core/frontend/src/router/constant.ts
new file mode 100644
index 00000000..4a1dd16d
--- /dev/null
+++ b/core/frontend/src/router/constant.ts
@@ -0,0 +1,4 @@
+/**
+ * @description Default layout
+ */
+export const Layout = () => import('@/layout/index.vue')
diff --git a/core/frontend/src/router/index.ts b/core/frontend/src/router/index.ts
new file mode 100644
index 00000000..5cd539b9
--- /dev/null
+++ b/core/frontend/src/router/index.ts
@@ -0,0 +1,14 @@
+import router from '@/router/router'
+import loadingBar from '@/config/loadingBar'
+
+router.beforeEach(async (to, from, next) => {
+ loadingBar.start()
+
+ next()
+})
+
+router.afterEach(() => {
+ loadingBar.finish()
+})
+
+export default router
diff --git a/core/frontend/src/router/modules/automation.ts b/core/frontend/src/router/modules/automation.ts
new file mode 100644
index 00000000..f660404d
--- /dev/null
+++ b/core/frontend/src/router/modules/automation.ts
@@ -0,0 +1,17 @@
+import { RouteRecordRaw } from 'vue-router'
+import { Layout } from '@/router/constant'
+
+const route: RouteRecordRaw = {
+ path: '/automation',
+ component: Layout,
+ meta: { sort: 3, key: 'automation', title: 'Automation', icon: 'refresh-auto', hidden: true },
+ children: [
+ {
+ path: '/automation',
+ name: 'Automation',
+ component: () => import('@/views/automation/index.vue'),
+ },
+ ],
+}
+
+export default route
diff --git a/core/frontend/src/router/modules/contacts.ts b/core/frontend/src/router/modules/contacts.ts
new file mode 100644
index 00000000..94ccf903
--- /dev/null
+++ b/core/frontend/src/router/modules/contacts.ts
@@ -0,0 +1,17 @@
+import { RouteRecordRaw } from 'vue-router'
+import { Layout } from '@/router/constant'
+
+const route: RouteRecordRaw = {
+ path: '/contacts',
+ component: Layout,
+ meta: { sort: 4, key: 'contacts', title: 'Contacts', icon: 'user-multiple-outline' },
+ children: [
+ {
+ path: '/contacts',
+ name: 'Contacts',
+ component: () => import('@/views/contacts/index.vue'),
+ },
+ ],
+}
+
+export default route
diff --git a/core/frontend/src/router/modules/domain.ts b/core/frontend/src/router/modules/domain.ts
new file mode 100644
index 00000000..d3b5af69
--- /dev/null
+++ b/core/frontend/src/router/modules/domain.ts
@@ -0,0 +1,17 @@
+import { RouteRecordRaw } from 'vue-router'
+import { Layout } from '@/router/constant'
+
+const route: RouteRecordRaw = {
+ path: '/domain',
+ component: Layout,
+ meta: { sort: 5, key: 'domain', title: 'MailDomain', icon: 'web' },
+ children: [
+ {
+ path: '/domain',
+ name: 'Domain',
+ component: () => import('@/views/domain/index.vue'),
+ },
+ ],
+}
+
+export default route
diff --git a/core/frontend/src/router/modules/mailbox.ts b/core/frontend/src/router/modules/mailbox.ts
new file mode 100644
index 00000000..92c48d73
--- /dev/null
+++ b/core/frontend/src/router/modules/mailbox.ts
@@ -0,0 +1,17 @@
+import { RouteRecordRaw } from 'vue-router'
+import { Layout } from '@/router/constant'
+
+const route: RouteRecordRaw = {
+ path: '/mailbox',
+ component: Layout,
+ meta: { sort: 6, key: 'mailbox', title: 'MailBoxes', icon: 'at' },
+ children: [
+ {
+ path: '/mailbox',
+ name: 'Mailbox',
+ component: () => import('@/views/mailbox/index.vue'),
+ },
+ ],
+}
+
+export default route
diff --git a/core/frontend/src/router/modules/market.ts b/core/frontend/src/router/modules/market.ts
new file mode 100644
index 00000000..ec0e5546
--- /dev/null
+++ b/core/frontend/src/router/modules/market.ts
@@ -0,0 +1,23 @@
+import { RouteRecordRaw } from 'vue-router'
+import { Layout } from '@/router/constant'
+
+const route: RouteRecordRaw = {
+ path: '/email_marketing',
+ component: Layout,
+ meta: {
+ sort: 2,
+ key: 'market',
+ title: 'Email Marketing',
+ icon: 'email-fast-outline',
+ hidden: true,
+ },
+ children: [
+ {
+ path: '/email_marketing',
+ name: 'Market',
+ component: () => import('@/views/market/index.vue'),
+ },
+ ],
+}
+
+export default route
diff --git a/core/frontend/src/router/modules/settings.ts b/core/frontend/src/router/modules/settings.ts
new file mode 100644
index 00000000..00f2b0ca
--- /dev/null
+++ b/core/frontend/src/router/modules/settings.ts
@@ -0,0 +1,17 @@
+import { RouteRecordRaw } from 'vue-router'
+import { Layout } from '@/router/constant'
+
+const route: RouteRecordRaw = {
+ path: '/settings',
+ component: Layout,
+ meta: { sort: 7, key: 'settings', title: 'Settings', icon: 'settings-outline' },
+ children: [
+ {
+ path: '/settings',
+ name: 'Settings',
+ component: () => import('@/views/settings/index.vue'),
+ },
+ ],
+}
+
+export default route
diff --git a/core/frontend/src/router/router.ts b/core/frontend/src/router/router.ts
new file mode 100644
index 00000000..8b61ddf5
--- /dev/null
+++ b/core/frontend/src/router/router.ts
@@ -0,0 +1,61 @@
+import { get } from 'lodash-es'
+import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
+import { is } from '@/utils/is'
+import { Layout } from '@/router/constant'
+
+// 从模块中导入路由
+const modules = import.meta.webpackContext('./modules', {
+ // 是否搜索子目录
+ recursive: false,
+ regExp: /\.ts$/,
+})
+
+// 模块路由
+export const menuList: RouteRecordRaw[] = []
+
+// 遍历模块列表生成模块路由
+for (const path of modules.keys()) {
+ const mod = modules(path)
+ if (is<{ default: RouteRecordRaw }>(mod, 'Module')) {
+ menuList.push(mod.default)
+ }
+}
+
+// 模块路由排序
+menuList.sort((a, b) => {
+ const aSort = get(a, 'meta.sort', 0) as number
+ const bSort = get(b, 'meta.sort', 0) as number
+ return aSort - bSort
+})
+
+const dashboardRouter: RouteRecordRaw = {
+ path: '/',
+ component: Layout,
+ redirect: '/overview',
+ meta: {
+ keepAlive: true,
+ key: 'overview',
+ title: 'Overview',
+ icon: 'home-outline',
+ },
+ children: [
+ {
+ path: 'overview',
+ name: 'Overview',
+ component: () => import('@/views/overview/index.vue'),
+ },
+ ],
+}
+
+menuList.unshift(dashboardRouter)
+
+export const routes: RouteRecordRaw[] = [...menuList]
+
+const router = createRouter({
+ history: createWebHistory('/'),
+ routes,
+ strict: false,
+ scrollBehavior: () => ({ left: 0, top: 0 }),
+})
+
+export default router
diff --git a/core/frontend/src/store/index.ts b/core/frontend/src/store/index.ts
new file mode 100644
index 00000000..00501749
--- /dev/null
+++ b/core/frontend/src/store/index.ts
@@ -0,0 +1,10 @@
+import { createPinia } from 'pinia'
+import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
+import useMenuStore from './modules/menu'
+
+const pinia = createPinia()
+pinia.use(piniaPluginPersistedstate)
+
+export { useMenuStore }
+
+export default pinia
diff --git a/core/frontend/src/store/modules/menu.ts b/core/frontend/src/store/modules/menu.ts
new file mode 100644
index 00000000..d7e4d1ea
--- /dev/null
+++ b/core/frontend/src/store/modules/menu.ts
@@ -0,0 +1,27 @@
+import { defineStore } from 'pinia'
+import { RouteRecordRaw } from 'vue-router'
+
+export default defineStore('MenuStore', () => {
+ const isCollapse = ref(false)
+ const menuList = ref<RouteRecordRaw[]>([])
+
+ const setCollapse = () => {
+ isCollapse.value = !isCollapse.value
+ }
+
+ const setMenuList = (menus: RouteRecordRaw[]) => {
+ menuList.value = menus
+ }
+
+ const closeSidebar = () => {
+ isCollapse.value = false
+ }
+
+ return {
+ isCollapse,
+ menuList,
+ setCollapse,
+ setMenuList,
+ closeSidebar,
+ }
+})
diff --git a/core/frontend/src/styles/index.scss b/core/frontend/src/styles/index.scss
index 447e5694..052f41b2 100644
--- a/core/frontend/src/styles/index.scss
+++ b/core/frontend/src/styles/index.scss
@@ -1 +1,2 @@
@import './reset.scss';
+@import './public.scss';
diff --git a/core/frontend/src/styles/public.scss b/core/frontend/src/styles/public.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/core/frontend/src/styles/reset.scss b/core/frontend/src/styles/reset.scss
index ad82986d..310ae976 100644
--- a/core/frontend/src/styles/reset.scss
+++ b/core/frontend/src/styles/reset.scss
@@ -12,9 +12,11 @@ body,
body {
min-width: 1100px;
+ margin: 0;
line-height: 1.4;
font-size: 12px;
color: #333;
+ font-family: 'Open Sans', sans-serif;
}
input[type='password']::-ms-reveal {
diff --git a/core/frontend/src/utils/is.ts b/core/frontend/src/utils/is.ts
new file mode 100644
index 00000000..6918f029
--- /dev/null
+++ b/core/frontend/src/utils/is.ts
@@ -0,0 +1,15 @@
+/**
+ * @description: 判断值是否未某个类型
+ */
+export function is<T>(val: unknown, type: string): val is T {
+ return toString.call(val) === `[object ${type}]`
+}
+
+/**
+ * @description: 是否为对象
+ * @param { unknown } val 参数
+ * @returns { boolean }
+ */
+export function isObject<T>(val: unknown): val is T {
+ return val !== null && is(val, 'object')
+}
diff --git a/core/frontend/src/views/automation/index.vue b/core/frontend/src/views/automation/index.vue
new file mode 100644
index 00000000..575c2aa5
--- /dev/null
+++ b/core/frontend/src/views/automation/index.vue
@@ -0,0 +1,5 @@
+<template>
+ <div>aaaaa</div>
+</template>
+
+<script lang="ts" setup></script>
diff --git a/core/frontend/src/views/contacts/index.vue b/core/frontend/src/views/contacts/index.vue
new file mode 100644
index 00000000..575c2aa5
--- /dev/null
+++ b/core/frontend/src/views/contacts/index.vue
@@ -0,0 +1,5 @@
+<template>
+ <div>aaaaa</div>
+</template>
+
+<script lang="ts" setup></script>
diff --git a/core/frontend/src/views/domain/index.vue b/core/frontend/src/views/domain/index.vue
new file mode 100644
index 00000000..575c2aa5
--- /dev/null
+++ b/core/frontend/src/views/domain/index.vue
@@ -0,0 +1,5 @@
+<template>
+ <div>aaaaa</div>
+</template>
+
+<script lang="ts" setup></script>
diff --git a/core/frontend/src/views/mailbox/index.vue b/core/frontend/src/views/mailbox/index.vue
new file mode 100644
index 00000000..575c2aa5
--- /dev/null
+++ b/core/frontend/src/views/mailbox/index.vue
@@ -0,0 +1,5 @@
+<template>
+ <div>aaaaa</div>
+</template>
+
+<script lang="ts" setup></script>
diff --git a/core/frontend/src/views/market/index.vue b/core/frontend/src/views/market/index.vue
new file mode 100644
index 00000000..575c2aa5
--- /dev/null
+++ b/core/frontend/src/views/market/index.vue
@@ -0,0 +1,5 @@
+<template>
+ <div>aaaaa</div>
+</template>
+
+<script lang="ts" setup></script>
diff --git a/core/frontend/src/views/overview/index.vue b/core/frontend/src/views/overview/index.vue
new file mode 100644
index 00000000..18e097c8
--- /dev/null
+++ b/core/frontend/src/views/overview/index.vue
@@ -0,0 +1,7 @@
+<template>
+ <div>
+ <div class="i-mdi-email-fast-outline"></div>
+ </div>
+</template>
+
+<script lang="ts" setup></script>
diff --git a/core/frontend/src/views/settings/index.vue b/core/frontend/src/views/settings/index.vue
new file mode 100644
index 00000000..575c2aa5
--- /dev/null
+++ b/core/frontend/src/views/settings/index.vue
@@ -0,0 +1,5 @@
+<template>
+ <div>aaaaa</div>
+</template>
+
+<script lang="ts" setup></script>
diff --git a/core/frontend/types/components.d.ts b/core/frontend/types/components.d.ts
index 09c6b478..66f3bdcb 100644
--- a/core/frontend/types/components.d.ts
+++ b/core/frontend/types/components.d.ts
@@ -8,6 +8,12 @@ export {}
/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
- NButton: typeof import('naive-ui')['NButton']
+ ConfigProvider: typeof import('./../src/components/config-provider/index.vue')['default']
+ NConfigProvider: typeof import('naive-ui')['NConfigProvider']
+ NLayout: typeof import('naive-ui')['NLayout']
+ NLayoutSider: typeof import('naive-ui')['NLayoutSider']
+ NMenu: typeof import('naive-ui')['NMenu']
+ RouterLink: typeof import('vue-router')['RouterLink']
+ RouterView: typeof import('vue-router')['RouterView']
}
}
diff --git a/core/frontend/types/env.d.ts b/core/frontend/types/env.d.ts
index b0ac762b..9f51341b 100644
--- a/core/frontend/types/env.d.ts
+++ b/core/frontend/types/env.d.ts
@@ -1 +1,7 @@
/// <reference types="@rsbuild/core/types" />
+
+declare module '*.vue' {
+ import type { DefineComponent } from 'vue'
+ const component: DefineComponent<object, object, unknown>
+ export default component
+}
diff --git a/core/frontend/uno.config.ts b/core/frontend/uno.config.ts
index 4fdd9a66..76dfc78d 100644
--- a/core/frontend/uno.config.ts
+++ b/core/frontend/uno.config.ts
@@ -1,7 +1,20 @@
-import { defineConfig, presetUno, presetAttributify, transformerDirectives } from 'unocss'
+import { defineConfig } from 'unocss'
+import presetUno from '@unocss/preset-uno'
+import presetIcons from '@unocss/preset-icons'
+import presetAttributify from '@unocss/preset-attributify'
+import transformerDirectives from '@unocss/transformer-directives'
export default defineConfig({
- presets: [presetUno({ preflight: false }), presetAttributify()],
+ presets: [
+ presetUno({ preflight: false }),
+ presetAttributify(),
+ presetIcons({
+ prefix: 'i-',
+ extraProperties: {
+ display: 'inline-flex',
+ },
+ }),
+ ],
transformers: [transformerDirectives({ enforce: 'pre' })],
theme: {
colors: {