Skip to content

Commit 2b9af08

Browse files
committed
refactor: ♻️ minimize code
1 parent e278798 commit 2b9af08

File tree

144 files changed

+2171
-4644
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+2171
-4644
lines changed

.cspell.txt

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ brucesong
66
classname
77
commitlint
88
daterange
9-
DHTML
109
echarts
1110
emojione
1211
esbuild

@types/auto-imports.d.ts

+6-15
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ declare global {
1010
const AuthUtils: typeof import('@dolphin-admin/utils')['AuthUtils']
1111
const BasePageModel: typeof import('@/constants')['BasePageModel']
1212
const BrowserUtils: typeof import('@dolphin-admin/utils')['BrowserUtils']
13-
const DictionaryAPI: typeof import('../src/api/dictionaries')['DictionaryAPI']
1413
const EffectScope: typeof import('vue')['EffectScope']
1514
const ExcelUtils: typeof import('../src/utils/excel')['ExcelUtils']
1615
const GitHubAuthUtils: typeof import('../src/utils/github')['GitHubAuthUtils']
@@ -26,8 +25,6 @@ declare global {
2625
const NPopconfirm: typeof import('naive-ui')['NPopconfirm']
2726
const NTag: typeof import('naive-ui')['NTag']
2827
const NaiveUtils: typeof import('../src/utils/naive')['NaiveUtils']
29-
const NavigationUtils: typeof import('../src/utils/navigation')['NavigationUtils']
30-
const PermissionUtils: typeof import('../src/utils/permission')['PermissionUtils']
3128
const QRCodeUtils: typeof import('../src/utils/qrcode')['QRCodeUtils']
3229
const RenderUtils: typeof import('../src/utils/render')['RenderUtils']
3330
const RouterLink: typeof import('vue-router')['RouterLink']
@@ -36,8 +33,8 @@ declare global {
3633
const ThemeUtils: typeof import('@dolphin-admin/utils')['ThemeUtils']
3734
const TimeUtils: typeof import('@dolphin-admin/utils')['TimeUtils']
3835
const UploadAPI: typeof import('../src/api/upload')['UploadAPI']
39-
const UserAPI: typeof import('../src/api/users')['UserAPI']
40-
const UserTrafficAPI: typeof import('../src/api/user-traffics')['UserTrafficAPI']
36+
const UserAPI: typeof import('../src/api/user')['UserAPI']
37+
const UserTrafficAPI: typeof import('../src/api/user-traffic')['UserTrafficAPI']
4138
const UserTrafficUtils: typeof import('../src/utils/user-traffic')['UserTrafficUtils']
4239
const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
4340
const computed: typeof import('vue')['computed']
@@ -150,7 +147,6 @@ declare module 'vue' {
150147
readonly AuthUtils: UnwrapRef<typeof import('@dolphin-admin/utils')['AuthUtils']>
151148
readonly BasePageModel: UnwrapRef<typeof import('@/constants')['BasePageModel']>
152149
readonly BrowserUtils: UnwrapRef<typeof import('@dolphin-admin/utils')['BrowserUtils']>
153-
readonly DictionaryAPI: UnwrapRef<typeof import('../src/api/dictionaries')['DictionaryAPI']>
154150
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
155151
readonly ExcelUtils: UnwrapRef<typeof import('../src/utils/excel')['ExcelUtils']>
156152
readonly GitHubAuthUtils: UnwrapRef<typeof import('../src/utils/github')['GitHubAuthUtils']>
@@ -166,8 +162,6 @@ declare module 'vue' {
166162
readonly NPopconfirm: UnwrapRef<typeof import('naive-ui')['NPopconfirm']>
167163
readonly NTag: UnwrapRef<typeof import('naive-ui')['NTag']>
168164
readonly NaiveUtils: UnwrapRef<typeof import('../src/utils/naive')['NaiveUtils']>
169-
readonly NavigationUtils: UnwrapRef<typeof import('../src/utils/navigation')['NavigationUtils']>
170-
readonly PermissionUtils: UnwrapRef<typeof import('../src/utils/permission')['PermissionUtils']>
171165
readonly QRCodeUtils: UnwrapRef<typeof import('../src/utils/qrcode')['QRCodeUtils']>
172166
readonly RenderUtils: UnwrapRef<typeof import('../src/utils/render')['RenderUtils']>
173167
readonly RouterLink: UnwrapRef<typeof import('vue-router')['RouterLink']>
@@ -176,8 +170,8 @@ declare module 'vue' {
176170
readonly ThemeUtils: UnwrapRef<typeof import('@dolphin-admin/utils')['ThemeUtils']>
177171
readonly TimeUtils: UnwrapRef<typeof import('@dolphin-admin/utils')['TimeUtils']>
178172
readonly UploadAPI: UnwrapRef<typeof import('../src/api/upload')['UploadAPI']>
179-
readonly UserAPI: UnwrapRef<typeof import('../src/api/users')['UserAPI']>
180-
readonly UserTrafficAPI: UnwrapRef<typeof import('../src/api/user-traffics')['UserTrafficAPI']>
173+
readonly UserAPI: UnwrapRef<typeof import('../src/api/user')['UserAPI']>
174+
readonly UserTrafficAPI: UnwrapRef<typeof import('../src/api/user-traffic')['UserTrafficAPI']>
181175
readonly UserTrafficUtils: UnwrapRef<typeof import('../src/utils/user-traffic')['UserTrafficUtils']>
182176
readonly acceptHMRUpdate: UnwrapRef<typeof import('pinia')['acceptHMRUpdate']>
183177
readonly computed: UnwrapRef<typeof import('vue')['computed']>
@@ -282,7 +276,6 @@ declare module '@vue/runtime-core' {
282276
readonly AuthUtils: UnwrapRef<typeof import('@dolphin-admin/utils')['AuthUtils']>
283277
readonly BasePageModel: UnwrapRef<typeof import('@/constants')['BasePageModel']>
284278
readonly BrowserUtils: UnwrapRef<typeof import('@dolphin-admin/utils')['BrowserUtils']>
285-
readonly DictionaryAPI: UnwrapRef<typeof import('../src/api/dictionaries')['DictionaryAPI']>
286279
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
287280
readonly ExcelUtils: UnwrapRef<typeof import('../src/utils/excel')['ExcelUtils']>
288281
readonly GitHubAuthUtils: UnwrapRef<typeof import('../src/utils/github')['GitHubAuthUtils']>
@@ -298,8 +291,6 @@ declare module '@vue/runtime-core' {
298291
readonly NPopconfirm: UnwrapRef<typeof import('naive-ui')['NPopconfirm']>
299292
readonly NTag: UnwrapRef<typeof import('naive-ui')['NTag']>
300293
readonly NaiveUtils: UnwrapRef<typeof import('../src/utils/naive')['NaiveUtils']>
301-
readonly NavigationUtils: UnwrapRef<typeof import('../src/utils/navigation')['NavigationUtils']>
302-
readonly PermissionUtils: UnwrapRef<typeof import('../src/utils/permission')['PermissionUtils']>
303294
readonly QRCodeUtils: UnwrapRef<typeof import('../src/utils/qrcode')['QRCodeUtils']>
304295
readonly RenderUtils: UnwrapRef<typeof import('../src/utils/render')['RenderUtils']>
305296
readonly RouterLink: UnwrapRef<typeof import('vue-router')['RouterLink']>
@@ -308,8 +299,8 @@ declare module '@vue/runtime-core' {
308299
readonly ThemeUtils: UnwrapRef<typeof import('@dolphin-admin/utils')['ThemeUtils']>
309300
readonly TimeUtils: UnwrapRef<typeof import('@dolphin-admin/utils')['TimeUtils']>
310301
readonly UploadAPI: UnwrapRef<typeof import('../src/api/upload')['UploadAPI']>
311-
readonly UserAPI: UnwrapRef<typeof import('../src/api/users')['UserAPI']>
312-
readonly UserTrafficAPI: UnwrapRef<typeof import('../src/api/user-traffics')['UserTrafficAPI']>
302+
readonly UserAPI: UnwrapRef<typeof import('../src/api/user')['UserAPI']>
303+
readonly UserTrafficAPI: UnwrapRef<typeof import('../src/api/user-traffic')['UserTrafficAPI']>
313304
readonly UserTrafficUtils: UnwrapRef<typeof import('../src/utils/user-traffic')['UserTrafficUtils']>
314305
readonly acceptHMRUpdate: UnwrapRef<typeof import('pinia')['acceptHMRUpdate']>
315306
readonly computed: UnwrapRef<typeof import('vue')['computed']>

@types/components.d.ts

+7-17
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,17 @@ export {}
88
declare module 'vue' {
99
export interface GlobalComponents {
1010
AuthLayout: typeof import('./../src/layouts/AuthLayout/index.vue')['default']
11-
BarChart: typeof import('./../src/charts/BarChart/index.vue')['default']
12-
BaseBreadcrumb: typeof import('./../src/layouts/BaseLayout/components/BaseBreadcrumb/index.vue')['default']
13-
BaseContent: typeof import('./../src/layouts/BaseLayout/components/BaseContent/index.vue')['default']
14-
BaseFooter: typeof import('./../src/layouts/BaseLayout/components/BaseFooter/index.vue')['default']
15-
BaseHeader: typeof import('./../src/layouts/BaseLayout/components/BaseHeader/index.vue')['default']
1611
BaseLayout: typeof import('./../src/layouts/BaseLayout/index.vue')['default']
17-
BaseSidebar: typeof import('./../src/layouts/BaseLayout/components/BaseSidebar/index.vue')['default']
18-
BaseTabs: typeof import('./../src/layouts/BaseLayout/components/BaseTabs/index.vue')['default']
19-
BaseThemeSwitchDevTool: typeof import('./../src/components/BaseThemeSwitchDevTool/index.vue')['default']
2012
DataTableLayout: typeof import('./../src/layouts/DataTableLayout/index.vue')['default']
21-
DCountdown: typeof import('./../src/components/DCountdown/index.vue')['default']
22-
DHTMLPrinter: typeof import('./../src/components/DHTMLPrinter/index.vue')['default']
23-
DNumberAnimation: typeof import('./../src/components/DNumberAnimation/index.vue')['default']
13+
DpBarChart: typeof import('./../src/charts/DpBarChart/index.vue')['default']
14+
DpDevMenuFab: typeof import('./../src/components/DpDevMenuFab/index.vue')['default']
2415
DpGlobalLoading: typeof import('./../src/components/DpGlobalLoading/index.vue')['default']
16+
DpHTMLPrinter: typeof import('./../src/components/DpHTMLPrinter/index.vue')['default']
17+
DpLineChart: typeof import('./../src/charts/DpLineChart/index.vue')['default']
18+
DpNumberAnimation: typeof import('./../src/components/DpNumberAnimation/index.vue')['default']
19+
DpPieChart: typeof import('./../src/charts/DpPieChart/index.vue')['default']
2520
DpReportUserTrafficProvider: typeof import('./../src/components/DpReportUserTrafficProvider/index.vue')['default']
26-
DRightClick: typeof import('./../src/components/DRightClick/index.vue')['default']
27-
DTimeline: typeof import('./../src/components/DTimeline/index.vue')['default']
28-
DVirtualList: typeof import('./../src/components/DVirtualList/index.vue')['default']
29-
LineChart: typeof import('./../src/charts/LineChart/index.vue')['default']
21+
DpTimeline: typeof import('./../src/components/DpTimeline/index.vue')['default']
3022
NAvatar: typeof import('naive-ui')['NAvatar']
3123
NBlockquote: typeof import('naive-ui')['NBlockquote']
3224
NBreadcrumb: typeof import('naive-ui')['NBreadcrumb']
@@ -62,9 +54,7 @@ declare module 'vue' {
6254
NTimeline: typeof import('naive-ui')['NTimeline']
6355
NTimelineItem: typeof import('naive-ui')['NTimelineItem']
6456
NTooltip: typeof import('naive-ui')['NTooltip']
65-
NTreeSelect: typeof import('naive-ui')['NTreeSelect']
6657
NUpload: typeof import('naive-ui')['NUpload']
67-
PieChart: typeof import('./../src/charts/PieChart/index.vue')['default']
6858
RouterLink: typeof import('vue-router')['RouterLink']
6959
RouterView: typeof import('vue-router')['RouterView']
7060
}

CHANGELOG.md

-77
Original file line numberDiff line numberDiff line change
@@ -1,77 +0,0 @@
1-
# Dolphin Admin 更新日志
2-
3-
## [迭代 3] - 2023-07-24 ~ 2023-08-06
4-
5-
### 新增
6-
7-
- 用户流量统计
8-
9-
### 新增
10-
11-
- 文档站点
12-
- 站点分析:
13-
- 流量统计
14-
- 代码模板:
15-
- 列表模板
16-
- 隐私政策
17-
18-
### 修复
19-
20-
- 路由调整:初始化强制调整路由导致页面白屏
21-
22-
### 优化
23-
24-
- 架构调整:
25-
- 将前后端代码库合并,使用 monorepo 管理
26-
- 封装通用的 tsconfig.json
27-
- 封装通用的 .eslintrc.js
28-
29-
## [迭代 2] - 2023-07-10 ~ 2023-07-23
30-
31-
### 新增
32-
33-
- 用户管理:
34-
- 列表添加列【头像】
35-
- 列表底部添加【分页总数】
36-
- 支持按【日期】【ID】排序
37-
- 支持按【认证类型】筛选
38-
- 第三方登录:
39-
- 新增【Google OAuth2】登录
40-
- 面包屑菜单
41-
- 内置组件:
42-
- 数字动画
43-
- 时间线
44-
- 通用组件:Echarts 图表封装
45-
- 系统工具:
46-
- 打印
47-
- Excel
48-
- WebSocket
49-
- 错误页面:
50-
- 403
51-
- 404
52-
- 418
53-
- 500
54-
- 系统 Loading 动画:进入系统,加载接口数据时,添加 Loading 动画
55-
- 部署相关:使用云服务器、Nginx 部署前后端,添加 HTTPS 证书,并使用自定义域名
56-
57-
### 修复
58-
59-
- 标签页:切换、删除标签页时,无法改变标签页的状态
60-
- 侧边栏菜单:未使用渲染函数导致多语言切换无法正常显示
61-
- 侧边栏菜单:未使用渲染函数导致多语言切换无法正常显示
62-
- 用户管理、用户信息:上传的图片无法删除
63-
- 更新用户信息:涉及到数据库唯一字段如 `username``email` 时,无法返回用户友好的提示信息
64-
- WebSocket:无法在生产环境连接
65-
- 用户管理:手机端文字显示折行
66-
67-
### 优化
68-
69-
- 前端文件目录调整:将 `src/views` 目录下文件按一级菜单进行分类,去扁平化
70-
- 后端 API Controller:装饰器封装
71-
- 后端中间件:装饰器封装
72-
- 后端文件目录调整:将文件菜单调整为 `controllers``services``models`
73-
74-
### 其他
75-
76-
- 建立 WeChat 群组
77-
- 建立 [Discord 群组](https://discord.gg/NfPAGuz7Em)

package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
},
3535
"dependencies": {
3636
"@dolphin-admin/utils": "^0.0.18",
37-
"@tanstack/vue-query": "^5.10.0",
37+
"@tanstack/vue-query": "^5.12.1",
3838
"@tauri-apps/api": "^1.5.1",
3939
"@vueuse/core": "^10.6.1",
4040
"@vueuse/motion": "^2.0.0",
@@ -61,24 +61,24 @@
6161
"@iconify/json": "^2.2.150",
6262
"@iconify/vue": "^4.1.1",
6363
"@intlify/unplugin-vue-i18n": "^1.5.0",
64-
"@tauri-apps/cli": "^1.5.6",
64+
"@tauri-apps/cli": "^1.5.7",
6565
"@types/jsdom": "^21.1.6",
6666
"@types/lodash-es": "^4.17.12",
67-
"@types/node": "^20.10.1",
67+
"@types/node": "^20.10.2",
6868
"@types/nprogress": "^0.2.3",
6969
"@types/qrcode": "^1.5.5",
70-
"@vitejs/plugin-vue": "^4.5.0",
70+
"@vitejs/plugin-vue": "^4.5.1",
7171
"autoprefixer": "^10.4.16",
7272
"commitizen": "^4.3.0",
7373
"conventional-changelog-cli": "^4.1.0",
74-
"cspell": "^8.0.0",
74+
"cspell": "^8.1.0",
7575
"cz-conventional-changelog": "^3.3.0",
7676
"cz-git": "^1.7.1",
77-
"eslint": "^8.54.0",
77+
"eslint": "^8.55.0",
7878
"husky": "^8.0.3",
7979
"lint-staged": "^15.1.0",
8080
"naive-ui": "^2.35.0",
81-
"postcss": "^8.4.31",
81+
"postcss": "^8.4.32",
8282
"prettier": "3.1.0",
8383
"rollup-plugin-visualizer": "^5.9.3",
8484
"sass": "^1.69.5",

0 commit comments

Comments
 (0)