fix: we don't want spinner behind login errors

Massimo Melina committed Jan 11, 2022 at 18:35 UTC 7246767d170fe5d2668f89bd3433639805923dfa
1 file changed +2
frontend/src/login.ts
+2
@@ -27,6 +27,7 @@ export async function login(username:string, password:string) {
27 }
28 catch(e){
29 console.debug(String(e))
30 + stopWorking()
31 await alertDialog("Server identity cannot be trusted. Login aborted.", 'error')
32 return
33 }
@@ -36,6 +37,7 @@ export async function login(username:string, password:string) {
37 state.username = username
38 }
39 catch(err) {
40 + stopWorking()
41 if (err instanceof ApiError)
42 if (err.code === 401)
43 err = 'Invalid credentials'