File tree 4 files changed +19
-3
lines changed
4 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ interface ImportMetaEnv {
9
9
readonly VITE_INTERMEDIATE_FHIR_SERVER_BASE : string
10
10
readonly VITE_SOF_CLIENT_ID : string
11
11
readonly VITE_SOF_ISS : string
12
+ readonly VITE_BACK_URL : string
13
+ readonly VITE_LOGOUT_URL : string
12
14
readonly DEV_SERVER_PORT : number
13
15
}
14
16
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ export const INTERMEDIATE_FHIR_SERVER_BASE = ( window.globalConfig?.VITE_INTERME
7
7
8
8
export const FHIR_R4_EXTERNAL_ID_SYSTEM = ( window . globalConfig ?. VITE_FHIR_R4_EXTERNAL_ID_SYSTEM ?? import . meta. env . VITE_FHIR_R4_EXTERNAL_ID_SYSTEM ) ;
9
9
10
+ export const LOGOUT_URL = ( window . globalConfig ?. VITE_LOGOUT_URL ?? import . meta. env . VITE_LOGOUT_URL ) ;
10
11
export const BACK_URL = ( window . globalConfig ?. VITE_BACK_URL ?? import . meta. env . VITE_BACK_URL ) ;
11
12
12
13
export const SOF_RESOURCES = [
Original file line number Diff line number Diff line change 18
18
} from ' sveltestrap' ;
19
19
import { SHLClient , type SHLAdminParams } from ' $lib/managementClient' ;
20
20
import { SOFClient } from ' $lib/sofClient' ;
21
- import { SOF_HOSTS , BACK_URL } from ' $lib/config' ;
21
+ import { SOF_HOSTS , BACK_URL , LOGOUT_URL } from ' $lib/config' ;
22
+ import { goto } from ' $app/navigation' ;
22
23
let shlStore = writable <SHLAdminParams >(undefined );
23
24
setContext (' shlStore' , shlStore );
24
25
44
45
function closeNav() {
45
46
isOpen = false ;
46
47
}
48
+
49
+ function logout() {
50
+ closeNav ();
51
+ let keyRaw = sessionStorage .getItem (' SMART_KEY' );
52
+ if (keyRaw != undefined ) {
53
+ let key = JSON .parse (keyRaw );
54
+ sessionStorage .removeItem (key );
55
+ }
56
+ sessionStorage .removeItem (' SMART_KEY' );
57
+ goto (LOGOUT_URL );
58
+ }
47
59
</script >
48
60
49
61
<Container class =" main" fluid >
74
86
<NavLink class ="text-white" href ={BACK_URL } on:click ={closeNav }><Icon name =" arrow-left" /> Back</NavLink >
75
87
</NavItem >
76
88
<NavItem >
77
- <NavLink class ="text-white" href = "https://letstalktech.uw.edu/help" on:click ={closeNav }>Log Out</NavLink >
89
+ <NavLink class ="text-white" on:click ={logout }>Log Out</NavLink >
78
90
</NavItem >
79
91
</Nav >
80
92
</Collapse >
Original file line number Diff line number Diff line change 1
1
window . globalConfig = {
2
- // VITE_SHOW_DEMO: "" ,
2
+ // VITE_SHOW_DEMO: false ,
3
3
// VITE_EPIC_CLIENT_ID: "",
4
4
// VITE_CERNER_CLIENT_ID: "",
5
5
// VITE_API_BASE: "",
@@ -8,5 +8,6 @@ window.globalConfig = {
8
8
// VITE_SOF_CLIENT_ID: "",
9
9
// VITE_SOF_ISS: "",
10
10
// VITE_BACK_URL: "",
11
+ // VITE_LOGOUT_URL: "",
11
12
// DEV_SERVER_PORT: "",
12
13
}
You can’t perform that action at this time.
0 commit comments