Skip to content

Commit

Permalink
1,423rd Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Shyam-Chen committed Apr 11, 2024
1 parent 67bf5c1 commit c172546
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"echarts": "^5.5.0",
"exceljs": "^4.4.0",
"lodash": "^4.17.21",
"nprogress": "^0.2.0",
"ofetch": "^1.3.4",
"valibot": "^0.30.0",
"vue": "^3.4.21",
Expand All @@ -31,6 +32,7 @@
"devDependencies": {
"@iconify/json": "^2.2.196",
"@types/lodash": "^4.17.0",
"@types/nprogress": "^0.2.3",
"@vitejs/plugin-vue": "^5.0.4",
"@vitest/coverage-v8": "^1.4.0",
"@vue/test-utils": "^2.4.5",
Expand Down
17 changes: 17 additions & 0 deletions app/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,20 @@ watch(
<RouterView />
<XNotification />
</template>

<style lang="scss">
html.dark {
color-scheme: dark;
}
</style>

<style lang="scss">
#nprogress {
@apply pointer-events-none;
}
#nprogress .bar {
@apply fixed top-0 left-0 z-1000 w-full h-0.5;
@apply bg-primary-500/75;
}
</style>
9 changes: 9 additions & 0 deletions app/src/plugins/router.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createRouter, createWebHistory } from 'vue-router';
import nprogress from 'nprogress';

import routes from 'virtual:vue-routes';

Expand All @@ -21,4 +22,12 @@ const router = createRouter({
},
});

router.beforeEach((to, from) => {
if (to.path !== from.path) nprogress.start();
});

router.afterEach(() => {
nprogress.done();
});

export default router;
14 changes: 14 additions & 0 deletions pnpm-lock.yaml

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

0 comments on commit c172546

Please sign in to comment.