File tree Expand file tree Collapse file tree 2 files changed +3
-18
lines changed
Expand file tree Collapse file tree 2 files changed +3
-18
lines changed Original file line number Diff line number Diff line change 11import axios from "axios" ;
22import OauthClient from "@resonant/oauth-client" ;
33import S3FileFieldClient from 'django-s3-file-field' ;
4- import { useAppStore , useMapStore , useProjectStore } from "@/store" ;
4+ import { useAppStore } from "@/store" ;
55
66const OAUTH2_CLIENT_ID = 'cBmD6D6F2YAmMWHNQZFPUr4OpaXVpW5w4Thod6Kj' ;
77
@@ -73,11 +73,5 @@ apiClient.interceptors.response.use(
7373
7474export const logout = async ( ) => {
7575 await oauthClient . logout ( ) ;
76-
77- useAppStore ( ) . currentUser = undefined ;
78-
79- useProjectStore ( ) . currentProject = undefined ;
80- useProjectStore ( ) . clearState ( ) ;
81-
82- useMapStore ( ) . setMapCenter ( ) ;
76+ window . location . href = `${ import . meta. env . VITE_APP_API_ROOT } accounts/logout/`
8377} ;
Original file line number Diff line number Diff line change @@ -110,19 +110,10 @@ watch(darkMode, () => {
110110 <v-icon v-bind =" props" icon =" mdi-cog" class =" px-3" ></v-icon >
111111 </template >
112112 <v-list >
113- <v-list-item density =" compact" >
113+ <v-list-item density =" compact" @click = " logout " >
114114 Logout
115115 <template v-slot :append >
116116 <v-icon icon =" mdi-logout" ></v-icon >
117- <v-dialog activator =" parent" max-width =" 300" >
118- <template v-slot :default =" { isActive } " >
119- <v-card class =" pa-3" >
120- <v-card-title >Log out?</v-card-title >
121- <v-btn @click =" isActive.value = false" text =" Cancel" />
122- <v-btn @click =" logout" color =" red" text =" Confirm" />
123- </v-card >
124- </template >
125- </v-dialog >
126117 </template >
127118 </v-list-item >
128119 <v-list-item density =" compact" >
You can’t perform that action at this time.
0 commit comments