@icvdeveloper/common-module 0.0.61 → 0.0.63

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.
Files changed (75) hide show
  1. package/README.md +6 -6
  2. package/dist/module.json +1 -1
  3. package/dist/runtime/assets/svg/answer.svg +14 -14
  4. package/dist/runtime/assets/svg/avatar.svg +1 -1
  5. package/dist/runtime/assets/svg/bell-icon.svg +3 -3
  6. package/dist/runtime/assets/svg/checkmark-icon.svg +1 -1
  7. package/dist/runtime/assets/svg/close-icon.svg +1 -1
  8. package/dist/runtime/assets/svg/icon-avatar.svg +1 -1
  9. package/dist/runtime/assets/svg/icon-chevron.svg +4 -4
  10. package/dist/runtime/assets/svg/icon-circle-plus.svg +1 -0
  11. package/dist/runtime/assets/svg/icon-close.svg +1 -1
  12. package/dist/runtime/assets/svg/icon-info.svg +2 -2
  13. package/dist/runtime/assets/svg/icon-new-window.svg +11 -11
  14. package/dist/runtime/assets/svg/icon-offline.svg +3 -3
  15. package/dist/runtime/assets/svg/icon-online.svg +3 -3
  16. package/dist/runtime/assets/svg/icon-person.svg +2 -2
  17. package/dist/runtime/assets/svg/icon-play.svg +2 -2
  18. package/dist/runtime/assets/svg/icon-star-filled.svg +29 -29
  19. package/dist/runtime/assets/svg/icon-star.svg +24 -24
  20. package/dist/runtime/assets/svg/icon-video-chat.svg +14 -14
  21. package/dist/runtime/assets/svg/icon-website.svg +2 -2
  22. package/dist/runtime/assets/svg/icon-zoom.svg +10 -10
  23. package/dist/runtime/assets/svg/notification-icon.svg +32 -32
  24. package/dist/runtime/assets/svg/offline-icon.svg +1 -1
  25. package/dist/runtime/assets/svg/online-icon.svg +3 -3
  26. package/dist/runtime/assets/svg/peer2peer.svg +3 -3
  27. package/dist/runtime/assets/svg/phone.svg +1 -1
  28. package/dist/runtime/assets/svg/plus-icon.svg +1 -1
  29. package/dist/runtime/assets/svg/red-icon.svg +3 -3
  30. package/dist/runtime/assets/svg/reject.svg +14 -14
  31. package/dist/runtime/assets/svg/search-icon.svg +3 -3
  32. package/dist/runtime/components/affiliates/AffiliatePage.vue +17 -17
  33. package/dist/runtime/components/agenda/AgendaList.vue +108 -0
  34. package/dist/runtime/components/agenda/AgendaTabbed.vue +300 -300
  35. package/dist/runtime/components/agenda/components/AgendaListAccordion.vue +26 -0
  36. package/dist/runtime/components/agenda/components/InfoLink.vue +56 -56
  37. package/dist/runtime/components/agenda/components/PlayIcon.vue +49 -49
  38. package/dist/runtime/components/agenda/components/PresentationLink.vue +137 -137
  39. package/dist/runtime/components/agenda/components/Sponsor.vue +132 -132
  40. package/dist/runtime/components/auth/LoginFullWidth.vue +78 -78
  41. package/dist/runtime/components/auth/PasswordReset.vue +60 -60
  42. package/dist/runtime/components/auth/Registration.vue +27 -27
  43. package/dist/runtime/components/auth/Ucc.vue +52 -52
  44. package/dist/runtime/components/core/Accordion.vue +97 -97
  45. package/dist/runtime/components/core/CountdownTimer.vue +308 -308
  46. package/dist/runtime/components/core/DynamicHtml.vue +1 -1
  47. package/dist/runtime/components/core/Modal.vue +111 -111
  48. package/dist/runtime/components/core/Navbar.vue +154 -154
  49. package/dist/runtime/components/core/SvgIcon.vue +151 -145
  50. package/dist/runtime/components/core/ZoomModal.vue +37 -37
  51. package/dist/runtime/components/events/EventHeader.vue +133 -133
  52. package/dist/runtime/components/events/ListEvents.vue +480 -480
  53. package/dist/runtime/components/forms/AlertBox.vue +21 -21
  54. package/dist/runtime/components/forms/ErrorField.vue +17 -17
  55. package/dist/runtime/components/forms/Message.vue +27 -27
  56. package/dist/runtime/components/forms/SearchInput.vue +38 -38
  57. package/dist/runtime/components/forms/SupportForm.vue +112 -112
  58. package/dist/runtime/components/forms/SwitchInput.vue +42 -42
  59. package/dist/runtime/components/forms/TextArea.vue +26 -26
  60. package/dist/runtime/components/forms/TextInput.vue +28 -28
  61. package/dist/runtime/components/layouts/Accordion.vue +78 -78
  62. package/dist/runtime/components/presenters/PresenterListing.vue +164 -164
  63. package/dist/runtime/components/presenters/PresenterModal.vue +223 -223
  64. package/dist/runtime/components/profile/Profile.vue +149 -149
  65. package/dist/runtime/components/profile/components/Sidebar.vue +27 -27
  66. package/dist/runtime/components/profile/components/SidebarNavItem.vue +39 -39
  67. package/dist/runtime/components/profile/tabs/Favorites.vue +21 -21
  68. package/dist/runtime/components/profile/tabs/GeneralInformation.vue +122 -122
  69. package/dist/runtime/components/profile/tabs/ProfileImage.vue +75 -75
  70. package/dist/runtime/components/support/FAQAccordion.vue +137 -137
  71. package/dist/runtime/composables/usePresenter.d.ts +1 -1
  72. package/dist/runtime/composables/usePresenter.mjs +4 -1
  73. package/dist/runtime/models/icons.d.ts +1 -0
  74. package/dist/runtime/plugin.mjs +2 -0
  75. package/package.json +59 -59
@@ -1,482 +1,482 @@
1
- <script lang="ts" setup>
2
- import { ref, toRefs, computed } from "vue";
3
- import { storeToRefs } from "pinia";
4
- import { useConferencesStore } from "../../store/conferences";
5
- import { useTemplateConfigsStore } from "../../store/templateConfigs";
6
- import { useDateFormat } from "../../composables/useDateFormat";
7
- import { useConferenceHelpers } from "../../composables/useConferenceHelpers";
8
- import { useEvents } from "../../composables/useEvents";
9
- import { useClassBinding } from "../../composables/useClassBinding";
10
- import CommonSponsor from "../agenda/components/Sponsor.vue";
11
- import { Conference } from "../../models/conference";
12
- import { Position } from "../../enums/general";
13
- import {
14
- listEventsClassObj,
15
- listEventsCompObj,
16
- countdownTimerClassObj,
17
- sponsorClassObj,
18
- } from "../../@types/components";
19
-
20
- interface Props {
21
- showSponsors?: boolean;
22
- showBrand?: boolean;
23
- showCountdown?: boolean;
24
- mediaButton?: boolean;
25
- registerButton?: boolean;
26
- registerPathPrefix?: string;
27
- loginButton?: boolean;
28
- viewInfoButton?: boolean;
29
- isUpcoming?: boolean;
30
- showEventImage?: boolean;
31
- sponsorPosition?: Position;
32
- borderPosition?: Position;
33
- countdownPosition?: Position;
34
- classObject?: listEventsClassObj;
35
- }
36
-
37
- const props = withDefaults(defineProps<Props>(), {
38
- showSponsors: true,
39
- showBrand: true,
40
- showCountdown: true,
41
- mediaButton: true,
42
- registerButton: true,
43
- registerPathPrefix: "",
44
- loginButton: true,
45
- viewInfoButton: true,
46
- isUpcoming: true,
47
- showEventImage: true,
48
- sponsorPosition: Position.RIGHT,
49
- borderPosition: Position.MIDDLE,
50
- countdownPosition: Position.BOTTOM,
51
- classObject: () => {
52
- return {
53
- components: ref<listEventsCompObj>({
54
- countdownTimer: ref<countdownTimerClassObj>({}),
55
- sponsor: ref<sponsorClassObj>({}),
56
- }),
57
- };
58
- },
59
- });
60
-
61
- const {
62
- showSponsors,
63
- showBrand,
64
- showCountdown,
65
- mediaButton,
66
- registerButton,
67
- registerPathPrefix,
68
- loginButton,
69
- viewInfoButton,
70
- isUpcoming,
71
- showEventImage,
72
- sponsorPosition,
73
- borderPosition,
74
- countdownPosition,
75
- classObject,
76
- } = toRefs(props);
77
-
78
- // data
79
- const { pastEvents, upcomingEvents } = storeToRefs(useConferencesStore());
80
-
81
- // methods
82
- const { globalConfigValue, pagesConfigValue } = storeToRefs(
83
- useTemplateConfigsStore()
84
- );
85
- const { formatDate } = useDateFormat();
86
- const {
87
- isSingleDayEvent,
88
- showConferenceViewButton,
89
- getConferenceWebcastUrl,
90
- getConferenceWebcastButtonText,
91
- showViewArchiveButton,
92
- getViewArchiveUrl,
93
- getViewArchiveButtonText,
94
- getConferenceRegUrl,
95
- getConferenceRegText,
96
- showConferenceRegButton,
97
- } = useConferenceHelpers();
98
-
99
- const {
100
- isLoggedIn,
101
- loginModalVisible,
102
- conferenceToLoginTo,
103
- goEventPage,
104
- setConferenceToLoginTo,
105
- buttonClass,
106
- orderAffiliates,
107
- getBrand,
108
- isHomePage,
109
- } = useEvents();
110
-
111
- const { classBinding } = useClassBinding();
112
-
113
- const showViewButton = (_conference: Conference): boolean => {
114
- return isUpcoming.value
115
- ? showConferenceViewButton(_conference)
116
- : showViewArchiveButton(_conference);
117
- };
118
-
119
- const getVideoUrl = (_conference: Conference): string => {
120
- return isUpcoming.value
121
- ? getConferenceWebcastUrl(_conference)
122
- : getViewArchiveUrl(_conference);
123
- };
124
-
125
- const getVideoButtonText = (_conference: Conference): string => {
126
- return isUpcoming.value
127
- ? getConferenceWebcastButtonText(_conference)
128
- : getViewArchiveButtonText(_conference);
129
- };
130
-
131
- // computed
132
- const eventType = computed((): Conference[] => {
133
- return isUpcoming.value ? upcomingEvents.value : pastEvents.value;
134
- });
135
-
136
- const showLoginButton = computed((): boolean => {
137
- const archivedHomepage: boolean =
138
- isUpcoming.value || (!isUpcoming.value && isHomePage.value);
139
- return (
140
- archivedHomepage &&
141
- loginButton.value &&
142
- !isLoggedIn.value &&
143
- !globalConfigValue.value("townhall_registration_enabled")
144
- );
145
- });
146
- </script>
147
-
148
- <template>
149
- <!-- list container -->
150
- <div class="flex w-full flex-col">
151
- <!-- list container -->
152
- <div
153
- :class="
154
- classBinding(classObject, 'listContainer', 'container flex-1 mx-auto')
155
- "
156
- >
157
- <!-- individual event container -->
158
- <div
159
- v-for="conference in eventType"
160
- :key="conference.id"
161
- :class="[
162
- {
163
- 'border-1 border-t border-color-accent-2':
164
- borderPosition === Position.TOP,
165
- },
166
- classBinding(
167
- classObject,
168
- 'eventContainer',
169
- 'flex flex-col items-center md:flex-row py-4'
170
- ),
171
- ]"
172
- >
173
- <!-- event image -->
174
- <div
175
- v-if="showEventImage"
176
- :class="
177
- classBinding(
178
- classObject,
179
- 'eventImageContainer',
180
- 'flex w-full md:w-1/3 pb-3 px-3 md:px-6 overflow-hidden'
181
- )
182
- "
183
- >
184
- <img
185
- :class="
186
- classBinding(
187
- classObject,
188
- 'eventImage',
189
- 'flex-1 self-center mx-auto w-full'
190
- )
191
- "
192
- :src="conference.photo"
193
- />
194
- </div>
195
- <!-- event details container -->
196
- <div
197
- :class="[
198
- { 'md:w-2/3': showEventImage },
199
- classBinding(
200
- classObject,
201
- 'eventContentContainer',
202
- 'flex flex-col justify-center text-center w-full md:pr-6 md:text-left md:justify-start md:items-start'
203
- ),
204
- ]"
205
- >
206
- <!-- event brand, name, date and countdown container -->
207
- <div
208
- :class="[
209
- {
210
- 'border-1 border-b border-color-accent-2 mb-6':
211
- borderPosition === Position.MIDDLE,
212
- },
213
- classBinding(
214
- classObject,
215
- 'eventDetailsContainer',
216
- 'w-full flex flex-col lg:flex-row'
217
- ),
218
- ]"
219
- >
220
- <!-- event details -->
221
- <div
222
- :class="classBinding(classObject, 'eventDetails', 'flex-grow')"
223
- >
224
- <h3
225
- v-if="showBrand && getBrand(conference.affiliates).length"
226
- :class="
227
- classBinding(
228
- classObject,
229
- 'eventBrand',
230
- 'text-base font-bold leading-tight tracking-wide mb-3'
231
- )
232
- "
233
- >
234
- {{ getBrand(conference.affiliates) }}
235
- </h3>
236
- <nuxt-link
237
- :to="`/${isUpcoming ? 'upcoming-events' : 'past-events'}/${
238
- conference.id
239
- }`"
240
- class="no-underline"
241
- >
242
- <h2
243
- :class="
244
- classBinding(
245
- classObject,
246
- 'eventName',
247
- 'text-2xl lg:text-3xl font-medium mb-2 conf-name-alignment'
248
- )
249
- "
250
- >
251
- {{ conference.name }}
252
- </h2>
253
- </nuxt-link>
254
- <p
255
- :class="
256
- classBinding(
257
- classObject,
258
- 'eventDate',
259
- 'text-base leading-normal tracking-wide font-light uppercase md:text-md lg:text-lg'
260
- )
261
- "
262
- >
263
- {{ formatDate(conference.start_date) }}
264
- <span v-if="!isSingleDayEvent(conference)">
265
- - {{ formatDate(conference.end_date) }}</span
266
- >
267
- </p>
268
- </div>
269
- <!-- countdown timer - top-aligned -->
270
- <div
271
- v-if="
272
- isUpcoming &&
273
- showCountdown &&
274
- countdownPosition === Position.TOP &&
275
- pagesConfigValue('main.countdown_timer')
276
- "
277
- :class="
278
- classBinding(
279
- classObject,
280
- 'countdownContainerTop',
281
- 'flex-auto flex items-center self-center mb-4 lg:mb-0'
282
- )
283
- "
284
- >
285
- <CommonCountdownTimer
286
- :date="conference.start_date"
287
- :is-compact="true"
288
- :class-object="classObject.components.countdownTimer"
289
- ></CommonCountdownTimer>
290
- </div>
291
- </div>
292
- <!-- event button, countdown timer, and sponsors container -->
293
- <div
294
- :class="
295
- classBinding(
296
- classObject,
297
- 'buttonCountdownSponsorsContainer',
298
- 'flex flex-col w-full'
299
- )
300
- "
301
- >
302
- <div
303
- :class="
304
- classBinding(
305
- classObject,
306
- 'buttonCountdownContainer',
307
- 'flex-1 flex flex-col justify-between xl:flex-row w-full'
308
- )
309
- "
310
- >
311
- <div
312
- :class="
313
- classBinding(
314
- classObject,
315
- 'buttonContainer',
316
- 'flex-auto mr-0 xl:mr-4'
317
- )
318
- "
319
- >
320
- <!-- view info button -->
321
- <button
322
- v-if="viewInfoButton"
323
- :class="classBinding(classObject, 'buttonItem', buttonClass)"
324
- @click="goEventPage(conference)"
325
- >
326
- View Info
327
- </button>
328
- <!-- view live/preview archive button -->
329
- <a
330
- v-if="mediaButton && showViewButton(conference)"
331
- :href="getVideoUrl(conference)"
332
- :target="
333
- /^http/.test(!isUpcoming && getVideoUrl(conference))
334
- ? '_blank'
335
- : '_self'
336
- "
337
- >
338
- <button
339
- :class="
340
- classBinding(classObject, 'buttonItem', buttonClass)
341
- "
342
- >
343
- {{ getVideoButtonText(conference) }}
344
- </button>
345
- </a>
346
-
347
- <!-- login button -->
348
- <button
349
- v-if="showLoginButton"
350
- :class="classBinding(classObject, 'buttonItem', buttonClass)"
351
- @click="setConferenceToLoginTo(conference)"
352
- >
353
- Log In
354
- </button>
355
-
356
- <!-- register button -->
357
- <a
358
- v-if="registerButton && showConferenceRegButton(conference)"
359
- :href="getConferenceRegUrl(conference, registerPathPrefix)"
360
- :target="
361
- /^http/.test(getConferenceRegUrl(conference))
362
- ? '_blank'
363
- : '_self'
364
- "
365
- >
366
- <button
367
- :class="
368
- classBinding(classObject, 'buttonItem', buttonClass)
369
- "
370
- >
371
- {{ getConferenceRegText(conference) }}
372
- </button>
373
- </a>
374
- </div>
375
- <!-- countdown timer - right-aligned -->
376
- <div
377
- v-if="
378
- isUpcoming &&
379
- showCountdown &&
380
- countdownPosition === Position.RIGHT &&
381
- pagesConfigValue('main.countdown_timer')
382
- "
383
- class="flex-auto md:flex mt-3 md:mt-2"
384
- :class="
385
- classBinding(
386
- classObject,
387
- 'countdownContainerRight',
388
- 'flex-auto flex items-center self-center mb-4 lg:mb-0'
389
- )
390
- "
391
- >
392
- <CommonCountdownTimer
393
- :date="conference.start_date"
394
- :is-compact="true"
395
- :class-object="classObject.components.countdownTimer"
396
- ></CommonCountdownTimer>
397
- </div>
398
- </div>
399
- <!-- countdown timer - bottom-aligned -->
400
- <div
401
- v-if="
402
- isUpcoming &&
403
- showCountdown &&
404
- countdownPosition === Position.BOTTOM &&
405
- pagesConfigValue('main.countdown_timer')
406
- "
407
- :class="
408
- classBinding(
409
- classObject,
410
- 'countdownContainerBottom',
411
- 'flex-auto md:flex my-3 md:my-2'
412
- )
413
- "
414
- >
415
- <CommonCountdownTimer
416
- :date="conference.start_date"
417
- :is-compact="true"
418
- :class-object="classObject.components.countdownTimer"
419
- ></CommonCountdownTimer>
420
- </div>
421
- <!-- sponsors container - bottom-aligned -->
422
- <div
423
- v-if="showSponsors && sponsorPosition === Position.BOTTOM"
424
- class=""
425
- :class="
426
- classBinding(
427
- classObject,
428
- 'sponsorsContainer',
429
- 'grid grid-cols-1 md:grid-cols-3 lg:grid-cols-5 gap-y-1.5 gap-x-3'
430
- )
431
- "
432
- >
433
- <!-- individual sponsor -->
434
- <template
435
- v-for="affiliate in orderAffiliates(conference.affiliates)"
436
- >
437
- <CommonSponsor
438
- v-if="affiliate.role == 'sponsor'"
439
- :key="affiliate.id"
440
- :sponsor="affiliate"
441
- :class-object="classObject.components.sponsor"
442
- ></CommonSponsor>
443
- </template>
444
- </div>
445
- </div>
446
- </div>
447
- <!-- sponsors container - right-aligned -->
448
- <div
449
- v-if="showSponsors && sponsorPosition === Position.RIGHT"
450
- class="flex flex-col"
451
- >
452
- <!-- individual sponsor -->
453
- <template v-for="affiliate in orderAffiliates(conference.affiliates)">
454
- <CommonSponsor
455
- v-if="affiliate.role == 'sponsor'"
456
- :key="affiliate.id"
457
- :sponsor="affiliate"
458
- :class-object="classObject.components.sponsor"
459
- ></CommonSponsor>
460
- </template>
461
- </div>
462
- </div>
463
- </div>
464
- <!-- login modal -->
465
- <CommonModal
466
- :visible="loginModalVisible"
467
- :class="classObject.components.modal"
468
- @trigger="loginModalVisible = false"
469
- >
470
- <template #modal-body>
471
- <CommonLoginFullWidth
472
- :conference="conferenceToLoginTo"
473
- :class="classObject.components.login"
474
- />
475
- </template>
476
- </CommonModal>
477
- </div>
478
- </template>
479
-
1
+ <script lang="ts" setup>
2
+ import { ref, toRefs, computed } from "vue";
3
+ import { storeToRefs } from "pinia";
4
+ import { useConferencesStore } from "../../store/conferences";
5
+ import { useTemplateConfigsStore } from "../../store/templateConfigs";
6
+ import { useDateFormat } from "../../composables/useDateFormat";
7
+ import { useConferenceHelpers } from "../../composables/useConferenceHelpers";
8
+ import { useEvents } from "../../composables/useEvents";
9
+ import { useClassBinding } from "../../composables/useClassBinding";
10
+ import CommonSponsor from "../agenda/components/Sponsor.vue";
11
+ import { Conference } from "../../models/conference";
12
+ import { Position } from "../../enums/general";
13
+ import {
14
+ listEventsClassObj,
15
+ listEventsCompObj,
16
+ countdownTimerClassObj,
17
+ sponsorClassObj,
18
+ } from "../../@types/components";
19
+
20
+ interface Props {
21
+ showSponsors?: boolean;
22
+ showBrand?: boolean;
23
+ showCountdown?: boolean;
24
+ mediaButton?: boolean;
25
+ registerButton?: boolean;
26
+ registerPathPrefix?: string;
27
+ loginButton?: boolean;
28
+ viewInfoButton?: boolean;
29
+ isUpcoming?: boolean;
30
+ showEventImage?: boolean;
31
+ sponsorPosition?: Position;
32
+ borderPosition?: Position;
33
+ countdownPosition?: Position;
34
+ classObject?: listEventsClassObj;
35
+ }
36
+
37
+ const props = withDefaults(defineProps<Props>(), {
38
+ showSponsors: true,
39
+ showBrand: true,
40
+ showCountdown: true,
41
+ mediaButton: true,
42
+ registerButton: true,
43
+ registerPathPrefix: "",
44
+ loginButton: true,
45
+ viewInfoButton: true,
46
+ isUpcoming: true,
47
+ showEventImage: true,
48
+ sponsorPosition: Position.RIGHT,
49
+ borderPosition: Position.MIDDLE,
50
+ countdownPosition: Position.BOTTOM,
51
+ classObject: () => {
52
+ return {
53
+ components: ref<listEventsCompObj>({
54
+ countdownTimer: ref<countdownTimerClassObj>({}),
55
+ sponsor: ref<sponsorClassObj>({}),
56
+ }),
57
+ };
58
+ },
59
+ });
60
+
61
+ const {
62
+ showSponsors,
63
+ showBrand,
64
+ showCountdown,
65
+ mediaButton,
66
+ registerButton,
67
+ registerPathPrefix,
68
+ loginButton,
69
+ viewInfoButton,
70
+ isUpcoming,
71
+ showEventImage,
72
+ sponsorPosition,
73
+ borderPosition,
74
+ countdownPosition,
75
+ classObject,
76
+ } = toRefs(props);
77
+
78
+ // data
79
+ const { pastEvents, upcomingEvents } = storeToRefs(useConferencesStore());
80
+
81
+ // methods
82
+ const { globalConfigValue, pagesConfigValue } = storeToRefs(
83
+ useTemplateConfigsStore()
84
+ );
85
+ const { formatDate } = useDateFormat();
86
+ const {
87
+ isSingleDayEvent,
88
+ showConferenceViewButton,
89
+ getConferenceWebcastUrl,
90
+ getConferenceWebcastButtonText,
91
+ showViewArchiveButton,
92
+ getViewArchiveUrl,
93
+ getViewArchiveButtonText,
94
+ getConferenceRegUrl,
95
+ getConferenceRegText,
96
+ showConferenceRegButton,
97
+ } = useConferenceHelpers();
98
+
99
+ const {
100
+ isLoggedIn,
101
+ loginModalVisible,
102
+ conferenceToLoginTo,
103
+ goEventPage,
104
+ setConferenceToLoginTo,
105
+ buttonClass,
106
+ orderAffiliates,
107
+ getBrand,
108
+ isHomePage,
109
+ } = useEvents();
110
+
111
+ const { classBinding } = useClassBinding();
112
+
113
+ const showViewButton = (_conference: Conference): boolean => {
114
+ return isUpcoming.value
115
+ ? showConferenceViewButton(_conference)
116
+ : showViewArchiveButton(_conference);
117
+ };
118
+
119
+ const getVideoUrl = (_conference: Conference): string => {
120
+ return isUpcoming.value
121
+ ? getConferenceWebcastUrl(_conference)
122
+ : getViewArchiveUrl(_conference);
123
+ };
124
+
125
+ const getVideoButtonText = (_conference: Conference): string => {
126
+ return isUpcoming.value
127
+ ? getConferenceWebcastButtonText(_conference)
128
+ : getViewArchiveButtonText(_conference);
129
+ };
130
+
131
+ // computed
132
+ const eventType = computed((): Conference[] => {
133
+ return isUpcoming.value ? upcomingEvents.value : pastEvents.value;
134
+ });
135
+
136
+ const showLoginButton = computed((): boolean => {
137
+ const archivedHomepage: boolean =
138
+ isUpcoming.value || (!isUpcoming.value && isHomePage.value);
139
+ return (
140
+ archivedHomepage &&
141
+ loginButton.value &&
142
+ !isLoggedIn.value &&
143
+ !globalConfigValue.value("townhall_registration_enabled")
144
+ );
145
+ });
146
+ </script>
147
+
148
+ <template>
149
+ <!-- list container -->
150
+ <div class="flex w-full flex-col">
151
+ <!-- list container -->
152
+ <div
153
+ :class="
154
+ classBinding(classObject, 'listContainer', 'container flex-1 mx-auto')
155
+ "
156
+ >
157
+ <!-- individual event container -->
158
+ <div
159
+ v-for="conference in eventType"
160
+ :key="conference.id"
161
+ :class="[
162
+ {
163
+ 'border-1 border-t border-color-accent-2':
164
+ borderPosition === Position.TOP,
165
+ },
166
+ classBinding(
167
+ classObject,
168
+ 'eventContainer',
169
+ 'flex flex-col items-center md:flex-row py-4'
170
+ ),
171
+ ]"
172
+ >
173
+ <!-- event image -->
174
+ <div
175
+ v-if="showEventImage"
176
+ :class="
177
+ classBinding(
178
+ classObject,
179
+ 'eventImageContainer',
180
+ 'flex w-full md:w-1/3 pb-3 px-3 md:px-6 overflow-hidden'
181
+ )
182
+ "
183
+ >
184
+ <img
185
+ :class="
186
+ classBinding(
187
+ classObject,
188
+ 'eventImage',
189
+ 'flex-1 self-center mx-auto w-full'
190
+ )
191
+ "
192
+ :src="conference.photo"
193
+ />
194
+ </div>
195
+ <!-- event details container -->
196
+ <div
197
+ :class="[
198
+ { 'md:w-2/3': showEventImage },
199
+ classBinding(
200
+ classObject,
201
+ 'eventContentContainer',
202
+ 'flex flex-col justify-center text-center w-full md:pr-6 md:text-left md:justify-start md:items-start'
203
+ ),
204
+ ]"
205
+ >
206
+ <!-- event brand, name, date and countdown container -->
207
+ <div
208
+ :class="[
209
+ {
210
+ 'border-1 border-b border-color-accent-2 mb-6':
211
+ borderPosition === Position.MIDDLE,
212
+ },
213
+ classBinding(
214
+ classObject,
215
+ 'eventDetailsContainer',
216
+ 'w-full flex flex-col lg:flex-row'
217
+ ),
218
+ ]"
219
+ >
220
+ <!-- event details -->
221
+ <div
222
+ :class="classBinding(classObject, 'eventDetails', 'flex-grow')"
223
+ >
224
+ <h3
225
+ v-if="showBrand && getBrand(conference.affiliates).length"
226
+ :class="
227
+ classBinding(
228
+ classObject,
229
+ 'eventBrand',
230
+ 'text-base font-bold leading-tight tracking-wide mb-3'
231
+ )
232
+ "
233
+ >
234
+ {{ getBrand(conference.affiliates) }}
235
+ </h3>
236
+ <nuxt-link
237
+ :to="`/${isUpcoming ? 'upcoming-events' : 'past-events'}/${
238
+ conference.id
239
+ }`"
240
+ class="no-underline"
241
+ >
242
+ <h2
243
+ :class="
244
+ classBinding(
245
+ classObject,
246
+ 'eventName',
247
+ 'text-2xl lg:text-3xl font-medium mb-2 conf-name-alignment'
248
+ )
249
+ "
250
+ >
251
+ {{ conference.name }}
252
+ </h2>
253
+ </nuxt-link>
254
+ <p
255
+ :class="
256
+ classBinding(
257
+ classObject,
258
+ 'eventDate',
259
+ 'text-base leading-normal tracking-wide font-light uppercase md:text-md lg:text-lg'
260
+ )
261
+ "
262
+ >
263
+ {{ formatDate(conference.start_date) }}
264
+ <span v-if="!isSingleDayEvent(conference)">
265
+ - {{ formatDate(conference.end_date) }}</span
266
+ >
267
+ </p>
268
+ </div>
269
+ <!-- countdown timer - top-aligned -->
270
+ <div
271
+ v-if="
272
+ isUpcoming &&
273
+ showCountdown &&
274
+ countdownPosition === Position.TOP &&
275
+ pagesConfigValue('main.countdown_timer')
276
+ "
277
+ :class="
278
+ classBinding(
279
+ classObject,
280
+ 'countdownContainerTop',
281
+ 'flex-auto flex items-center self-center mb-4 lg:mb-0'
282
+ )
283
+ "
284
+ >
285
+ <CommonCountdownTimer
286
+ :date="conference.start_date"
287
+ :is-compact="true"
288
+ :class-object="classObject.components.countdownTimer"
289
+ ></CommonCountdownTimer>
290
+ </div>
291
+ </div>
292
+ <!-- event button, countdown timer, and sponsors container -->
293
+ <div
294
+ :class="
295
+ classBinding(
296
+ classObject,
297
+ 'buttonCountdownSponsorsContainer',
298
+ 'flex flex-col w-full'
299
+ )
300
+ "
301
+ >
302
+ <div
303
+ :class="
304
+ classBinding(
305
+ classObject,
306
+ 'buttonCountdownContainer',
307
+ 'flex-1 flex flex-col justify-between xl:flex-row w-full'
308
+ )
309
+ "
310
+ >
311
+ <div
312
+ :class="
313
+ classBinding(
314
+ classObject,
315
+ 'buttonContainer',
316
+ 'flex-auto mr-0 xl:mr-4'
317
+ )
318
+ "
319
+ >
320
+ <!-- view info button -->
321
+ <button
322
+ v-if="viewInfoButton"
323
+ :class="classBinding(classObject, 'buttonItem', buttonClass)"
324
+ @click="goEventPage(conference)"
325
+ >
326
+ View Info
327
+ </button>
328
+ <!-- view live/preview archive button -->
329
+ <a
330
+ v-if="mediaButton && showViewButton(conference)"
331
+ :href="getVideoUrl(conference)"
332
+ :target="
333
+ /^http/.test(!isUpcoming && getVideoUrl(conference))
334
+ ? '_blank'
335
+ : '_self'
336
+ "
337
+ >
338
+ <button
339
+ :class="
340
+ classBinding(classObject, 'buttonItem', buttonClass)
341
+ "
342
+ >
343
+ {{ getVideoButtonText(conference) }}
344
+ </button>
345
+ </a>
346
+
347
+ <!-- login button -->
348
+ <button
349
+ v-if="showLoginButton"
350
+ :class="classBinding(classObject, 'buttonItem', buttonClass)"
351
+ @click="setConferenceToLoginTo(conference)"
352
+ >
353
+ Log In
354
+ </button>
355
+
356
+ <!-- register button -->
357
+ <a
358
+ v-if="registerButton && showConferenceRegButton(conference)"
359
+ :href="getConferenceRegUrl(conference, registerPathPrefix)"
360
+ :target="
361
+ /^http/.test(getConferenceRegUrl(conference))
362
+ ? '_blank'
363
+ : '_self'
364
+ "
365
+ >
366
+ <button
367
+ :class="
368
+ classBinding(classObject, 'buttonItem', buttonClass)
369
+ "
370
+ >
371
+ {{ getConferenceRegText(conference) }}
372
+ </button>
373
+ </a>
374
+ </div>
375
+ <!-- countdown timer - right-aligned -->
376
+ <div
377
+ v-if="
378
+ isUpcoming &&
379
+ showCountdown &&
380
+ countdownPosition === Position.RIGHT &&
381
+ pagesConfigValue('main.countdown_timer')
382
+ "
383
+ class="flex-auto md:flex mt-3 md:mt-2"
384
+ :class="
385
+ classBinding(
386
+ classObject,
387
+ 'countdownContainerRight',
388
+ 'flex-auto flex items-center self-center mb-4 lg:mb-0'
389
+ )
390
+ "
391
+ >
392
+ <CommonCountdownTimer
393
+ :date="conference.start_date"
394
+ :is-compact="true"
395
+ :class-object="classObject.components.countdownTimer"
396
+ ></CommonCountdownTimer>
397
+ </div>
398
+ </div>
399
+ <!-- countdown timer - bottom-aligned -->
400
+ <div
401
+ v-if="
402
+ isUpcoming &&
403
+ showCountdown &&
404
+ countdownPosition === Position.BOTTOM &&
405
+ pagesConfigValue('main.countdown_timer')
406
+ "
407
+ :class="
408
+ classBinding(
409
+ classObject,
410
+ 'countdownContainerBottom',
411
+ 'flex-auto md:flex my-3 md:my-2'
412
+ )
413
+ "
414
+ >
415
+ <CommonCountdownTimer
416
+ :date="conference.start_date"
417
+ :is-compact="true"
418
+ :class-object="classObject.components.countdownTimer"
419
+ ></CommonCountdownTimer>
420
+ </div>
421
+ <!-- sponsors container - bottom-aligned -->
422
+ <div
423
+ v-if="showSponsors && sponsorPosition === Position.BOTTOM"
424
+ class=""
425
+ :class="
426
+ classBinding(
427
+ classObject,
428
+ 'sponsorsContainer',
429
+ 'grid grid-cols-1 md:grid-cols-3 lg:grid-cols-5 gap-y-1.5 gap-x-3'
430
+ )
431
+ "
432
+ >
433
+ <!-- individual sponsor -->
434
+ <template
435
+ v-for="affiliate in orderAffiliates(conference.affiliates)"
436
+ >
437
+ <CommonSponsor
438
+ v-if="affiliate.role == 'sponsor'"
439
+ :key="affiliate.id"
440
+ :sponsor="affiliate"
441
+ :class-object="classObject.components.sponsor"
442
+ ></CommonSponsor>
443
+ </template>
444
+ </div>
445
+ </div>
446
+ </div>
447
+ <!-- sponsors container - right-aligned -->
448
+ <div
449
+ v-if="showSponsors && sponsorPosition === Position.RIGHT"
450
+ class="flex flex-col"
451
+ >
452
+ <!-- individual sponsor -->
453
+ <template v-for="affiliate in orderAffiliates(conference.affiliates)">
454
+ <CommonSponsor
455
+ v-if="affiliate.role == 'sponsor'"
456
+ :key="affiliate.id"
457
+ :sponsor="affiliate"
458
+ :class-object="classObject.components.sponsor"
459
+ ></CommonSponsor>
460
+ </template>
461
+ </div>
462
+ </div>
463
+ </div>
464
+ <!-- login modal -->
465
+ <CommonModal
466
+ :visible="loginModalVisible"
467
+ :class="classObject.components.modal"
468
+ @trigger="loginModalVisible = false"
469
+ >
470
+ <template #modal-body>
471
+ <CommonLoginFullWidth
472
+ :conference="conferenceToLoginTo"
473
+ :class="classObject.components.login"
474
+ />
475
+ </template>
476
+ </CommonModal>
477
+ </div>
478
+ </template>
479
+
480
480
  <style scoped>
481
481
  .leading-tight {
482
482
  line-height: 1.25rem;
@@ -485,4 +485,4 @@ const showLoginButton = computed((): boolean => {
485
485
  .mr-4 {
486
486
  margin-right: 1rem;
487
487
  }
488
- </style>
488
+ </style>