File tree 3 files changed +27
-2
lines changed
3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ export function setToken(token: string) {
25
25
export function removeToken ( ) {
26
26
return Cookies . remove ( TokenKey )
27
27
}
28
-
29
28
export const attachTokenFromQuery = ( ) => {
30
29
const token = new URLSearchParams ( window . location . search ) . get ( 'token' )
31
30
if ( token ) {
@@ -49,5 +48,29 @@ export const attachTokenFromQuery = () => {
49
48
query,
50
49
} )
51
50
} )
51
+ } else {
52
+ // hash mode
53
+
54
+ const hash = window . location . hash . slice ( 1 )
55
+
56
+ const parsedUrl = new URL ( hash , window . location . origin )
57
+ const token = parsedUrl . searchParams . get ( 'token' )
58
+ if ( token ) {
59
+ setToken ( token )
60
+ setTokenIsUpstream ( true )
61
+ parsedUrl . searchParams . delete ( 'token' )
62
+
63
+ router . isReady ( ) . then ( ( ) => {
64
+ const query = { } as any
65
+ for ( const [ key , value ] of parsedUrl . searchParams . entries ( ) ) {
66
+ query [ key ] = value
67
+ }
68
+
69
+ router . replace ( {
70
+ path : parsedUrl . pathname ,
71
+ query,
72
+ } )
73
+ } )
74
+ }
52
75
}
53
76
}
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ import { UpdatePanel } from './update-panel'
71
71
72
72
export const DashBoardView = defineComponent ( {
73
73
name : 'DashboardView' ,
74
+
74
75
setup ( ) {
75
76
const stat = ref (
76
77
new Proxy (
Original file line number Diff line number Diff line change 18
18
"skipDefaultLibCheck" : true ,
19
19
"lib" : [
20
20
" esnext" ,
21
- " dom"
21
+ " dom" ,
22
+ " dom.iterable"
22
23
],
23
24
"types" : [],
24
25
"paths" : {
You can’t perform that action at this time.
0 commit comments