@icvdeveloper/common-module 2.3.8 → 2.4.0
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/CHANGELOG.md +2 -0
- package/dist/module.d.mts +2 -0
- package/dist/module.d.ts +2 -0
- package/dist/module.json +1 -1
- package/dist/runtime/components/agenda/components/PresentationLink.vue +4 -1
- package/dist/runtime/components/core/Navigation.vue +5 -4
- package/dist/runtime/composables/useLogin.mjs +4 -2
- package/dist/runtime/models/portal.d.ts +2 -0
- package/dist/runtime/plugin.mjs +1 -1
- package/dist/runtime/store/portal.mjs +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/module.d.mts
CHANGED
package/dist/module.d.ts
CHANGED
package/dist/module.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import { toRefs, computed, inject } from "vue";
|
|
3
|
+
import { storeToRefs } from "pinia";
|
|
3
4
|
import { useAgenda } from "../../../composables/useAgenda";
|
|
4
5
|
import { useConferenceHelpers } from "../../../composables/useConferenceHelpers";
|
|
5
6
|
import { usePresentation } from "../../../composables/usePresentation";
|
|
@@ -9,6 +10,7 @@ import type {
|
|
|
9
10
|
Track,
|
|
10
11
|
TrackGroup,
|
|
11
12
|
} from "../../../models/conference";
|
|
13
|
+
import { usePortalStore } from "../../../store";
|
|
12
14
|
import InfoLink from "./InfoLink.vue";
|
|
13
15
|
import PlayIcon from "./PlayIcon.vue";
|
|
14
16
|
import Favorite from "./Favorite.vue";
|
|
@@ -31,9 +33,10 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
31
33
|
});
|
|
32
34
|
|
|
33
35
|
const { conference, track, presentation } = toRefs(props);
|
|
36
|
+
const { data:portal } = storeToRefs(usePortalStore());
|
|
34
37
|
|
|
35
38
|
const isActiveAgenda: boolean = inject('isActiveAgenda', false);
|
|
36
|
-
const isVirtual
|
|
39
|
+
const isVirtual = portal.value?.is_virtual_template || false;
|
|
37
40
|
|
|
38
41
|
// Methods
|
|
39
42
|
const { conferenceIsLiveOrMixed, conferenceIsArchived } =
|
|
@@ -9,6 +9,7 @@ import { useClassBinding } from '../../composables/useClassBinding';
|
|
|
9
9
|
import {
|
|
10
10
|
useTemplateConfigsStore,
|
|
11
11
|
useNavigationConfigStore,
|
|
12
|
+
usePortalStore,
|
|
12
13
|
useConferencesStore,
|
|
13
14
|
useAuthStore
|
|
14
15
|
} from '../../store';
|
|
@@ -28,7 +29,6 @@ import type { ContentData } from '../../models/vButton';
|
|
|
28
29
|
|
|
29
30
|
type Props = {
|
|
30
31
|
classObject?: NavigationClassObj;
|
|
31
|
-
isVirtual?: boolean;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
const props = withDefaults(defineProps<Props>(), {
|
|
@@ -55,17 +55,18 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
55
55
|
profileImg: '',
|
|
56
56
|
loginListItem: '',
|
|
57
57
|
}
|
|
58
|
-
}
|
|
59
|
-
isVirtual: false
|
|
58
|
+
}
|
|
60
59
|
});
|
|
61
60
|
|
|
62
|
-
const { classObject
|
|
61
|
+
const { classObject } = toRefs(props);
|
|
63
62
|
const { user, isLoggedIn } = storeToRefs(useAuthStore());
|
|
63
|
+
const { data:portal } = storeToRefs(usePortalStore());
|
|
64
64
|
const { currentConference } = storeToRefs(useConferencesStore());
|
|
65
65
|
|
|
66
66
|
// data
|
|
67
67
|
const showMenu = ref<boolean>(false);
|
|
68
68
|
const profileImg = 'https://v3plus-production.s3.us-west-2.amazonaws.com/users/profile.png';
|
|
69
|
+
const isVirtual = portal.value?.is_virtual_template || false;
|
|
69
70
|
|
|
70
71
|
// methods
|
|
71
72
|
const { formatLink, isExternalLink } = useNavigation();
|
|
@@ -2,6 +2,7 @@ import { storeToRefs } from "pinia";
|
|
|
2
2
|
import { useRouter } from "vue-router";
|
|
3
3
|
import { ref } from "vue";
|
|
4
4
|
import {
|
|
5
|
+
usePortalStore,
|
|
5
6
|
useConferencesStore,
|
|
6
7
|
useAuthStore,
|
|
7
8
|
useTemplateConfigsStore
|
|
@@ -9,15 +10,16 @@ import {
|
|
|
9
10
|
import { useConferenceHelpers } from "./useConferenceHelpers.mjs";
|
|
10
11
|
export const useLogin = (conference) => {
|
|
11
12
|
const { login } = useAuthStore();
|
|
13
|
+
const { data: portal } = storeToRefs(usePortalStore());
|
|
12
14
|
const { currentConference } = storeToRefs(useConferencesStore());
|
|
13
|
-
const {
|
|
15
|
+
const { globalConfigValue } = storeToRefs(useTemplateConfigsStore());
|
|
14
16
|
const email = ref("");
|
|
15
17
|
const password = ref("");
|
|
16
18
|
const tooManySessions = ref(false);
|
|
17
19
|
const loginError = ref(false);
|
|
18
20
|
const router = useRouter();
|
|
19
21
|
const handleRedirect = () => {
|
|
20
|
-
if (
|
|
22
|
+
if (portal.value?.is_virtual_template) {
|
|
21
23
|
console.log("virtual template detected on login");
|
|
22
24
|
return;
|
|
23
25
|
}
|
package/dist/runtime/plugin.mjs
CHANGED
|
@@ -44,7 +44,7 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
44
44
|
NProgress.inc();
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
let isNEJM = portal.value.
|
|
47
|
+
let isNEJM = portal.value.is_nejm_template == true;
|
|
48
48
|
let skipCurrentConf = isNEJM && !isRedirectPage && !isStreamTest;
|
|
49
49
|
docTitle = portal.value.name;
|
|
50
50
|
if (!skipCurrentConf) {
|
|
@@ -20,6 +20,8 @@ export const usePortalStore = defineStore("portal", {
|
|
|
20
20
|
data: { navigation_config, template_config, ...data }
|
|
21
21
|
} = response;
|
|
22
22
|
this.data = data;
|
|
23
|
+
this.data.is_nejm_template = data.template_id == 7;
|
|
24
|
+
this.data.is_virtual_template = data.template_id == 5 || data.template_id == 8;
|
|
23
25
|
useTemplateConfigsStore().setPortalTemplateConfig(
|
|
24
26
|
template_config.config
|
|
25
27
|
);
|