Skip to content

Commit

Permalink
feat(ui): replace npprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
qianmoQ committed Dec 26, 2024
1 parent 009d71d commit 898a502
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 30 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ hs_err_pid*

# mac os #
.DS_Store
Library

# idea #
.idea
Expand Down
4 changes: 4 additions & 0 deletions configure/clean/clean-dependencie.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
HOME=$(pwd)

echo "Clean dependencies"
cd "$HOME/core/datacap-ui"

echo "Task: check dependencies"
depcheck --json > depcheck-output.json
Expand All @@ -20,4 +22,6 @@ done
echo "Task: install dependencies again"
pnpm install --fix


echo "Clean dependencies done"
cd "$HOME"
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ public boolean evaluate(RowDefinition row)
return false;
}
}
}
}
2 changes: 0 additions & 2 deletions core/datacap-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"clsx": "^2.1.0",
"lodash": "^4.17.21",
"md-editor-v3": "^4.12.1",
"nprogress": "^0.2.0",
"uuid": "^9.0.1",
"view-shadcn-ui": "2024.5.3-alpha.1734608572",
"vue": "^3.4.21",
Expand All @@ -43,7 +42,6 @@
"devDependencies": {
"@types/lodash": "^4.17.0",
"@types/node": "^20.11.26",
"@types/nprogress": "^0.2.3",
"@vitejs/plugin-vue": "^5.0.4",
"tippy.js": "^6.3.7",
"typescript": "^5.2.2",
Expand Down
16 changes: 0 additions & 16 deletions core/datacap-ui/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 5 additions & 11 deletions core/datacap-ui/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@ import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import { createAuthRoute } from '@/router/auth'
import { createDefaultRouter } from '@/router/default'
import { createHttpRoute } from '@/router/http'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
// @ts-ignore
import { LoadingBar } from 'view-shadcn-ui'

NProgress.configure({
easing: 'ease',
speed: 600,
showSpinner: true,
trickleSpeed: 200,
minimum: 0.3
})
LoadingBar.enabledNetwork()

const routes: Array<RouteRecordRaw> = []

Expand All @@ -25,7 +19,7 @@ createAuthRoute(router)
createDefaultRouter(router)

router.beforeEach((_to, _from, _next) => {
NProgress.start()
LoadingBar.start()
if (_to.matched.length === 0) {
_next('/common/404')
}
Expand All @@ -34,6 +28,6 @@ router.beforeEach((_to, _from, _next) => {
}
})

router.afterEach(() => NProgress.done())
router.afterEach(() => LoadingBar.done())

export default router

0 comments on commit 898a502

Please sign in to comment.