File tree Expand file tree Collapse file tree 2 files changed +24
-27
lines changed
Expand file tree Collapse file tree 2 files changed +24
-27
lines changed Original file line number Diff line number Diff line change @@ -15,21 +15,21 @@ export default {
1515 data () {
1616 const dataObj = {};
1717 const locales = {
18- " ar_AR" : " العربية" ,
19- " en_GB" : " English" ,
20- " es_AR" : " Español (Argentina)" ,
21- " es_CO" : " Español (Colombia)" ,
22- " es_ES" : " Español" ,
23- " es_MX" : " Español (Mexico)" ,
24- " fr_FR" : " Français" ,
25- " id_ID" : " Bahasa Indonesia" ,
26- " lt_LT" : " Lietuvių" ,
27- " pt_BR" : " Português (Brasil)" ,
28- " pt_PT" : " Português" ,
29- " ru_RU" : " Русский" ,
30- " tr_TR" : " Türkçe" ,
31- " uk_UA" : " Український" ,
32- " zh_CN" : " 中文 (简体)" ,
18+ ar_AR: " العربية" ,
19+ en_GB: " English" ,
20+ es_AR: " Español (Argentina)" ,
21+ es_CO: " Español (Colombia)" ,
22+ es_ES: " Español" ,
23+ es_MX: " Español (Mexico)" ,
24+ fr_FR: " Français" ,
25+ id_ID: " Bahasa Indonesia" ,
26+ lt_LT: " Lietuvių" ,
27+ pt_BR: " Português (Brasil)" ,
28+ pt_PT: " Português" ,
29+ ru_RU: " Русский" ,
30+ tr_TR: " Türkçe" ,
31+ uk_UA: " Український" ,
32+ zh_CN: " 中文 (简体)" ,
3333 };
3434
3535 // Vue3 reactivity breaks with this configuration
Original file line number Diff line number Diff line change @@ -124,27 +124,24 @@ export async function signup(username: string, password: string) {
124124export function logout ( reason ?: string ) {
125125 document . cookie = "auth=; Max-Age=0; Path=/; SameSite=Strict;" ;
126126
127- const authStore = useAuthStore ( ) ;
128- authStore . clearUser ( ) ;
129-
130- localStorage . setItem ( "jwt" , "" ) ;
131- if ( noAuth ) {
132- window . location . reload ( ) ;
133- } else if ( authMethod === "proxy" && authLogoutURL !== "" ) {
127+ if ( authMethod === "proxy" && authLogoutURL !== "" ) {
134128 // Hostinger specific
135129 fetch ( authLogoutURL , {
136130 method : "POST" ,
137131 headers : {
138132 "Content-Type" : "application/json" ,
139133 } ,
140- } )
141- . catch ( ( ) => {
134+ } ) . catch ( ( ) => {
142135 console . error ( "Failed to logout using proxy auth" ) ;
143136 } ) ;
137+ }
144138
145- router . push ( {
146- path : "/login" ,
147- } ) ;
139+ const authStore = useAuthStore ( ) ;
140+ authStore . clearUser ( ) ;
141+
142+ localStorage . setItem ( "jwt" , "" ) ;
143+ if ( noAuth ) {
144+ window . location . reload ( ) ;
148145 } else if ( logoutPage !== "/login" ) {
149146 document . location . href = `${ logoutPage } ` ;
150147 } else {
You can’t perform that action at this time.
0 commit comments