@icvdeveloper/common-module 2.5.0 → 2.6.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 CHANGED
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## 2.6.0 - 2025-08-07
11
+
12
+ ## 2.5.1 - 2025-07-31
13
+
10
14
  ## 2.5.0 - 2025-07-17
11
15
 
12
16
  ## 2.4.1 - 2025-07-02
package/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "v3plus-common-module",
3
3
  "configKey": "v3plusCommonModule",
4
- "version": "2.5.0"
4
+ "version": "2.6.0"
5
5
  }
@@ -10,7 +10,9 @@ import type {
10
10
  Track,
11
11
  TrackGroup,
12
12
  } from "../../../models/conference";
13
+ import { useAuthStore } from "../../../store/auth";
13
14
  import { usePortalStore } from "../../../store";
15
+ import { useTemplateConfigsStore } from "../../../store/templateConfigs";
14
16
  import InfoLink from "./InfoLink.vue";
15
17
  import PlayIcon from "./PlayIcon.vue";
16
18
  import Favorite from "./Favorite.vue";
@@ -22,18 +24,19 @@ type Props = {
22
24
  showInfoLink?: boolean;
23
25
  simpleLayout?: boolean;
24
26
  isAgenda?: boolean;
25
- allowFavorites?: boolean;
26
27
  };
27
28
 
28
29
  const props = withDefaults(defineProps<Props>(), {
29
30
  showInfoLink: true,
30
31
  simpleLayout: false,
31
32
  isAgenda: false,
32
- allowFavorites: false,
33
33
  });
34
34
 
35
35
  const { conference, track, presentation } = toRefs(props);
36
36
  const { data:portal } = storeToRefs(usePortalStore());
37
+ const { isLoggedIn } = storeToRefs(useAuthStore());
38
+ const { globalConfigValue } = storeToRefs(useTemplateConfigsStore());
39
+
37
40
 
38
41
  const isActiveAgenda: boolean = inject('isActiveAgenda', false);
39
42
  const isVirtual = portal.value?.is_virtual_template || false;
@@ -55,6 +58,9 @@ const {
55
58
  const presentationNameClass = computed(() => {
56
59
  return isSmallGroupedTrack(track.value) ? "text-base" : "text-lg";
57
60
  });
61
+ const allowFavorites = computed(() => {
62
+ return globalConfigValue.value("allow_favorites");
63
+ });
58
64
  </script>
59
65
 
60
66
  <template>
@@ -140,7 +146,7 @@ const presentationNameClass = computed(() => {
140
146
 
141
147
  <!-- favorites -->
142
148
  <Favorite
143
- v-if="allowFavorites && currentUser.token"
149
+ v-if="allowFavorites && isLoggedIn"
144
150
  class="ml-1"
145
151
  :presentation="presentation"
146
152
  @click="handleFavoriteClick"
@@ -8,15 +8,17 @@ import { usePortalStore } from "../../store";
8
8
 
9
9
  interface Props {
10
10
  title?: string | null;
11
+ message?: string | null;
11
12
  conference?: Conference | null;
12
13
  }
13
14
 
14
15
  const props = withDefaults(defineProps<Props>(), {
15
16
  title: null,
17
+ message: null,
16
18
  conference: null,
17
19
  });
18
20
 
19
- const { title, conference } = toRefs<Props>(props);
21
+ const { title, message, conference } = toRefs<Props>(props);
20
22
 
21
23
  const { data:portal } = storeToRefs(usePortalStore());
22
24
  const { globalConfigValue } = storeToRefs(useTemplateConfigsStore());
@@ -49,6 +51,14 @@ const showResetRequest = () => {
49
51
  <h1 class="mb-3 heading-color-3">
50
52
  Log In
51
53
  </h1>
54
+ <!-- message -->
55
+ <CommonMessage
56
+ v-if="message && !loginError"
57
+ :success="true"
58
+ class="w-full max-w-xs mx-auto"
59
+ >
60
+ {{ message }}
61
+ </CommonMessage>
52
62
  <!-- error messages -->
53
63
  <CommonMessage
54
64
  v-if="loginError"
@@ -22,8 +22,14 @@ const props = withDefaults(defineProps<Props>(), {
22
22
  },
23
23
  });
24
24
 
25
+ // emits
26
+ const emit = defineEmits<{
27
+ (event: 'showLogin', value: string): void
28
+ }>();
29
+
25
30
  // data
26
31
  const route = useRoute();
32
+ const { passwordReset } = useAuthStore();
27
33
 
28
34
  const { isCentered } = toRefs(props);
29
35
  const { classBinding } = useClassBinding();
@@ -36,9 +42,7 @@ const password_confirmation = ref<string>("");
36
42
  const message = ref<null | string>(null);
37
43
  const errors = ref<Array<any>>([]);
38
44
 
39
-
40
45
  // methods
41
- const { passwordReset } = useAuthStore();
42
46
  const submitPasswordReset = () => {
43
47
  loading.value = true;
44
48
  message.value = null;
@@ -47,6 +51,7 @@ const submitPasswordReset = () => {
47
51
  passwordReset(email.value, password.value, password_confirmation.value, token.value)
48
52
  .then((response) => {
49
53
  message.value = response.message;
54
+ emit("showLogin", message.value);
50
55
  })
51
56
  .catch((error) => {
52
57
  if (error.response?._data?.errors) {
@@ -50,6 +50,7 @@ const submitPasswordResetRequest = () => {
50
50
  loading.value = false;
51
51
  });
52
52
  };
53
+
53
54
  </script>
54
55
 
55
56
  <template>
@@ -81,7 +82,7 @@ const submitPasswordResetRequest = () => {
81
82
  classBinding(
82
83
  classObject,
83
84
  'container',
84
- 'form-input contrast-border mb-2'
85
+ 'contrast-border mb-2'
85
86
  )
86
87
  "
87
88
  />
@@ -7,7 +7,6 @@ import { PAGE_LENGTH } from "../../models/pagination";
7
7
  import { useAttendeeListStore } from "../../store/attendeeList";
8
8
  import { useAuthStore } from "../../store/auth";
9
9
  import { useConversationStore } from "../../store/conversations";
10
- import { useUserStore } from "../../store/user";
11
10
  import { usePusher } from "../../composables/usePusher";
12
11
  import { useClassBinding } from "../../composables/useClassBinding";
13
12
  import type {
@@ -33,7 +32,7 @@ const props = withDefaults(defineProps<Props>(), {
33
32
  const { getAttendeeList, clearAttendeeList } = useAttendeeListStore();
34
33
  const { toggleChat, createConversation } = useConversationStore();
35
34
 
36
- const { currentUser } = storeToRefs(useUserStore());
35
+ const { user:currentUser } = storeToRefs(useAuthStore());
37
36
  const { isLoggedIn } = storeToRefs(useAuthStore());
38
37
  const { chatOpen } = storeToRefs(useConversationStore());
39
38
 
@@ -331,7 +330,7 @@ watch(isLoggedIn, () => {
331
330
  "
332
331
  >
333
332
  <button
334
- v-if="isLoggedIn && user.id !== currentUser.id"
333
+ v-if="isLoggedIn && user.id !== currentUser.uid"
335
334
  :class="
336
335
  classBinding(
337
336
  classObject,
@@ -346,7 +345,7 @@ watch(isLoggedIn, () => {
346
345
  <button
347
346
  v-if="
348
347
  isLoggedIn &&
349
- user.id !== currentUser.id &&
348
+ user.id !== currentUser.uid &&
350
349
  user.online &&
351
350
  user.video_chat
352
351
  "
@@ -134,6 +134,18 @@ const icons: Icons = {
134
134
  () => import("../../assets/svg/icon-play.svg")
135
135
  ),
136
136
  },
137
+ favorite: {
138
+ color: "#333",
139
+ component: defineAsyncComponent(
140
+ () => import("../../assets/svg/icon-star.svg")
141
+ ),
142
+ },
143
+ favoriteFilled: {
144
+ color: "#333",
145
+ component: defineAsyncComponent(
146
+ () => import("../../assets/svg/icon-star-filled.svg")
147
+ ),
148
+ },
137
149
  twitter: {
138
150
  color: "#1CB7EB",
139
151
  component: defineAsyncComponent(
@@ -33,7 +33,7 @@ const { classObject } = toRefs(props);
33
33
 
34
34
  <template>
35
35
  <input
36
- :class="classBinding(classObject, 'container', 'form-input px-2 py-1')"
36
+ :class="classBinding(classObject, 'container', 'form-input')"
37
37
  :type="type"
38
38
  :value="props.modelValue"
39
39
  :placeholder="placeholder"
@@ -225,7 +225,7 @@ const handleForm = () => {
225
225
  <div :class="classBinding(classObject, 'fieldElement', 'mb-4')">
226
226
  <CommonSwitchInput
227
227
  :class-object="classObject.components?.switchInput"
228
- :is-enabled="formData.video_chat"
228
+ :is-enabled="!!formData.video_chat"
229
229
  @toggle="toggleChat"
230
230
  >
231
231
  Enable Video Chat
@@ -2,7 +2,7 @@
2
2
  import { toRefs } from 'vue';
3
3
  import { storeToRefs } from 'pinia';
4
4
  import { DateTime } from 'luxon';
5
- import { useUserStore } from '../../store/user';
5
+ import { useAuthStore } from "../../store/auth";
6
6
  import { useConferencesStore } from '../../store';
7
7
  import { useEvents } from '../../composables/useEvents';
8
8
  import type { Conference } from '../../models/conference';
@@ -20,7 +20,7 @@ const props = withDefaults(defineProps<Props>(), {
20
20
 
21
21
  const { conference, group, show } = toRefs(props);
22
22
 
23
- const { currentUser } = storeToRefs(useUserStore());
23
+ const { user:currentUser } = storeToRefs(useAuthStore());
24
24
 
25
25
  const { getConferenceStatusLabel } = useConferenceHelpers(conference);
26
26
 
@@ -2,7 +2,7 @@
2
2
  import { toRefs } from 'vue';
3
3
  import { storeToRefs } from 'pinia';
4
4
  import { get } from 'lodash-es';
5
- import { useUserStore } from '../../store/user';
5
+ import { useAuthStore } from '../../store/auth';
6
6
  import { useTemplateConfigsStore } from '../../store/templateConfigs';
7
7
  import type { Group } from '../../models/group';
8
8
 
@@ -15,7 +15,7 @@ const props = defineProps<Props>();
15
15
  const { content } = toRefs(props);
16
16
 
17
17
  const { globalConfigValue } = useTemplateConfigsStore();
18
- const { currentUser } = storeToRefs(useUserStore());
18
+ const { user:currentUser } = storeToRefs(useAuthStore());
19
19
 
20
20
  const emit = defineEmits<{
21
21
  (event: "setRegForm", value: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icvdeveloper/common-module",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,7 +0,0 @@
1
- import type { User } from "../models/user";
2
- export interface UserState {
3
- currentUser: User;
4
- }
5
- export declare const useUserStore: import("pinia").StoreDefinition<"user", UserState, {}, {
6
- getUser(): Promise<User>;
7
- }>;
@@ -1,22 +0,0 @@
1
- import { defineStore } from "pinia";
2
- import { useApi } from "../composables/useApi.mjs";
3
- export const useUserStore = defineStore("user", {
4
- state: () => ({
5
- currentUser: {}
6
- }),
7
- getters: {},
8
- // TODO try and combine this with store/auth user handling
9
- actions: {
10
- getUser() {
11
- return new Promise((resolve, reject) => {
12
- const request = useApi();
13
- request(`user`, {}).then((response) => {
14
- this.currentUser = response.data;
15
- resolve(this.currentUser);
16
- }).catch((error) => {
17
- reject(error);
18
- });
19
- });
20
- }
21
- }
22
- });