瀏覽代碼

:recycle: helpful env rename in frontent

jwt
j 3 年之前
父節點
當前提交
da46d517d2
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2
    3
      frontend/src/main.js

+ 2
- 3
frontend/src/main.js 查看文件

@@ -8,8 +8,7 @@ import components from './wave'
8 8
 import App from './App.vue'
9 9
 import MainNav from './components/MainNav.vue'
10 10
 
11
-// const DEV = import.meta.env.VITE_DEV == 'true'
12
-const DEV = false
11
+const AUTO_LOGIN = import.meta.env.VITE_DEV == 'true'
13 12
 
14 13
 /**
15 14
  * Check between route changes for login/timeout
@@ -20,7 +19,7 @@ router.beforeEach((to, from, next) => {
20 19
      * Use the loginService to deal with login details
21 20
      * NOTE: Activate with `npm run nodev`
22 21
      */
23
-    if (DEV) {
22
+    if (AUTO_LOGIN) {
24 23
         next()
25 24
     } else {
26 25
         checkLoginStatus(to, next)

Loading…
取消
儲存