File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ export function setToken(token: string) {
2525export function removeToken ( ) {
2626 return Cookies . remove ( TokenKey )
2727}
28-
2928export const attachTokenFromQuery = ( ) => {
3029 const token = new URLSearchParams ( window . location . search ) . get ( 'token' )
3130 if ( token ) {
@@ -49,5 +48,29 @@ export const attachTokenFromQuery = () => {
4948 query,
5049 } )
5150 } )
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+ }
5275 }
5376}
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ import { UpdatePanel } from './update-panel'
7171
7272export const DashBoardView = defineComponent ( {
7373 name : 'DashboardView' ,
74+
7475 setup ( ) {
7576 const stat = ref (
7677 new Proxy (
Original file line number Diff line number Diff line change 1818 "skipDefaultLibCheck" : true ,
1919 "lib" : [
2020 " esnext" ,
21- " dom"
21+ " dom" ,
22+ " dom.iterable"
2223 ],
2324 "types" : [],
2425 "paths" : {
You can’t perform that action at this time.
0 commit comments