@data-fair/lib-vue 1.23.2 → 1.23.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-fair/lib-vue",
3
- "version": "1.23.2",
3
+ "version": "1.23.4",
4
4
  "description": "Composables and other utilities for Vue applications in the data-fair stack.",
5
5
  "main": "index.js",
6
6
  "files": [
package/session.d.ts CHANGED
@@ -58,6 +58,8 @@ interface FullSiteInfo {
58
58
  export interface SiteInfo {
59
59
  main?: boolean;
60
60
  isAccountMain?: boolean;
61
+ authMode: string;
62
+ authOnlyOtherSite?: string;
61
63
  logo?: string;
62
64
  dark?: boolean;
63
65
  colors: Colors;
package/session.js CHANGED
@@ -231,6 +231,12 @@ export async function getSession(initOptions) {
231
231
  const params = { adminMode: 'true' };
232
232
  if (state.user != null)
233
233
  params.email = state.user.email;
234
+ // preserve current active org/dep
235
+ if (state.organization) {
236
+ params.org = state.organization.id;
237
+ if (state.organization.department)
238
+ params.dep = state.organization.department;
239
+ }
234
240
  const url = loginUrl(redirect, params, true);
235
241
  goTo(url);
236
242
  }
@@ -291,7 +297,9 @@ export async function getSession(initOptions) {
291
297
  main: siteInfo.main,
292
298
  isAccountMain: siteInfo.isAccountMain,
293
299
  logo: siteInfo.theme.logo,
294
- colors: siteInfo.theme.colors
300
+ colors: siteInfo.theme.colors,
301
+ authMode: siteInfo.authMode,
302
+ authOnlyOtherSite: siteInfo.authOnlyOtherSite
295
303
  };
296
304
  if (theme.value == null)
297
305
  theme.value = getDefaultTheme(siteInfo);