diff --git a/src/api/group.js b/src/api/group.js index a794c0f8..6188987d 100644 --- a/src/api/group.js +++ b/src/api/group.js @@ -697,6 +697,36 @@ const groupReq = { }; return args; }); + }, + + getGroupCalendar(groupId) { + return request(`calendar/${groupId}`, { + method: 'GET' + }); + }, + + /** + * @type {import('../types/api/group').GetCalendars} + */ + getGroupCalendars(date) { + return request(`calendar?date=${date}`, { + method: 'GET' + }); + }, + + /** + * @type {import('../types/api/group').GetFollowingCalendars} + */ + getFollowingGroupCalendars(date) { + return request(`calendar/following?date=${date}`, { + method: 'GET' + }); + }, + + getFeaturedGroupCalendars(date) { + return request(`calendar/featured?date=${date}`, { + method: 'GET' + }); } // getRequestedGroups() { diff --git a/src/assets/scss/themes/theme.amoled.scss b/src/assets/scss/themes/theme.amoled.scss index c385c0ca..ee77c64d 100644 --- a/src/assets/scss/themes/theme.amoled.scss +++ b/src/assets/scss/themes/theme.amoled.scss @@ -13,22 +13,22 @@ $--theme-saturation: 0%; // AMOLED background tones // #0f0f0f -$--theme-bg-1: hsl($--theme-hue, $--theme-saturation, 6%); -$--theme-bg-2: hsl($--theme-hue, $--theme-saturation, 6%); -$--theme-bg-3: hsl($--theme-hue, $--theme-saturation, 6%); -$--theme-bg-4: hsl($--theme-hue, $--theme-saturation, 7%); +$--theme-bg-1: hsl($--theme-hue, $--theme-saturation, 6%); +$--theme-bg-2: hsl($--theme-hue, $--theme-saturation, 6%); +$--theme-bg-3: hsl($--theme-hue, $--theme-saturation, 6%); +$--theme-bg-4: hsl($--theme-hue, $--theme-saturation, 7%); $--theme-bg-5: hsl($--theme-hue, $--theme-saturation, 9%); -$--theme-border-1: hsl($--theme-hue, $--theme-saturation, 8%); -$--theme-border-2: hsla($--theme-hue, $--theme-saturation, 6%, 0.5); -$--theme-border-3: hsl($--theme-hue, $--theme-saturation, 12%); +$--theme-border-1: hsl($--theme-hue, $--theme-saturation, 8%); +$--theme-border-2: hsla($--theme-hue, $--theme-saturation, 6%, 0.5); +$--theme-border-3: hsl($--theme-hue, $--theme-saturation, 12%); -$--theme-text-1: hsl($--theme-hue, $--theme-saturation, 85%); -$--theme-text-2: hsl($--theme-hue, $--theme-saturation, 70%); -$--theme-text-3: hsl($--theme-hue, $--theme-saturation, 68%); -$--theme-text-4: hsl($--theme-hue, $--theme-saturation, 38%); +$--theme-text-1: hsl($--theme-hue, $--theme-saturation, 85%); +$--theme-text-2: hsl($--theme-hue, $--theme-saturation, 70%); +$--theme-text-3: hsl($--theme-hue, $--theme-saturation, 68%); +$--theme-text-4: hsl($--theme-hue, $--theme-saturation, 38%); -$--theme-primary: #B18FFF; +$--theme-primary: #b18fff; $--theme-success: #67c23a; $--theme-warning: #e6a23c; $--theme-danger: #f56c6c; @@ -128,12 +128,20 @@ $--message-danger-font-color: #ff4d4f; $--pagination-hover-color: $--theme-text-4; +$--calendar-selected-background-color: rgba($--theme-primary, 0.1); +$--card-background-color: $--theme-bg-4; + $--font-path: '~element-ui/lib/theme-chalk/fonts'; @import '~element-ui/packages/theme-chalk/src/index'; -@import '_theme.dark_styles'; +:root { + --group-calendar-event-bg: #{$--calendar-selected-background-color}; + --group-calendar-badge-following: #{darken($--theme-primary, 20%)}; + --group-calendar-badge-normal: #{$--theme-info}; +} +@import '_theme.dark_styles'; .el-table tr, .el-table td.el-table__cell, @@ -146,7 +154,7 @@ $--font-path: '~element-ui/lib/theme-chalk/fonts'; border: 1px solid hsl($--theme-hue, $--theme-saturation, 12%); } -.el-tree{ +.el-tree { background: hsl($--theme-hue, $--theme-saturation, 9%); } @@ -170,7 +178,6 @@ $--font-path: '~element-ui/lib/theme-chalk/fonts'; color: $--color-primary; } - .x-friend-item:hover, .x-change-image-item:hover { color: $--color-primary; @@ -178,7 +185,74 @@ $--font-path: '~element-ui/lib/theme-chalk/fonts'; // Tag background variants @each $type in success, warning, danger { - .el-tag--plain.el-tag--#{$type} { - background-color: hsl($--theme-hue, $--theme-saturation, 9%); - } -} \ No newline at end of file + .el-tag--plain.el-tag--#{$type} { + background-color: hsl($--theme-hue, $--theme-saturation, 9%); + } +} + +.el-calendar { + background-color: $--theme-bg-4 !important; +} + +.el-calendar__title { + color: $--theme-text-1 !important; +} + +.el-card { + background-color: $--theme-bg-5 !important; + border-color: $--theme-border-1 !important; +} + +.el-descriptions__body { + background-color: $--theme-bg-4 !important; + color: $--theme-text-1 !important; +} + +.el-timeline-item__tail { + border-left-color: #{darken($--theme-primary, 20%)} !important; +} + +.el-timeline-item__node { + background-color: #{darken($--theme-primary, 20%)} !important; +} + +.el-popper[x-placement^='top'] .popper__arrow { + border-top-color: $--theme-bg-4 !important; +} + +.el-popper[x-placement^='top'] .popper__arrow::after { + border-top-color: $--theme-bg-4 !important; +} + +.el-popper[x-placement^='bottom'] .popper__arrow { + border-bottom-color: $--theme-bg-4 !important; +} + +.el-popper[x-placement^='bottom'] .popper__arrow::after { + border-bottom-color: $--theme-bg-4 !important; +} + +.el-popper[x-placement^='left'] .popper__arrow { + border-left-color: $--theme-bg-4 !important; +} + +.el-popper[x-placement^='left'] .popper__arrow::after { + border-left-color: $--theme-bg-4 !important; +} + +.el-popper[x-placement^='right'] .popper__arrow { + border-right-color: $--theme-bg-4 !important; +} + +.el-popper[x-placement^='right'] .popper__arrow::after { + border-right-color: $--theme-bg-4 !important; +} + +// Group Calendar Dialog borders +.search-container { + border-bottom-color: $--border-color-light !important; +} + +.group-header { + border-bottom-color: $--border-color-light !important; +} diff --git a/src/assets/scss/themes/theme.dark.scss b/src/assets/scss/themes/theme.dark.scss index 4595f39d..7d9010b1 100644 --- a/src/assets/scss/themes/theme.dark.scss +++ b/src/assets/scss/themes/theme.dark.scss @@ -126,8 +126,84 @@ $--message-danger-font-color: #ff4d4f; $--pagination-hover-color: $--theme-text-4; +$--calendar-selected-background-color: rgba($--theme-primary, 0.1); +$--card-background-color: $--theme-bg-4; + $--font-path: '~element-ui/lib/theme-chalk/fonts'; @import '~element-ui/packages/theme-chalk/src/index'; -@import '_theme.dark_styles'; \ No newline at end of file +:root { + --group-calendar-event-bg: #{$--calendar-selected-background-color}; + --group-calendar-badge-following: #{$--color-success}; + --group-calendar-badge-normal: #{$--color-primary}; +} + +@import '_theme.dark_styles'; + +.el-calendar { + background-color: $--theme-bg-4 !important; +} + +.el-calendar__title { + color: $--theme-text-1 !important; +} + +.el-card { + background-color: $--theme-bg-5 !important; + border-color: $--theme-border-1 !important; +} + +.el-descriptions__body { + background-color: $--theme-bg-4 !important; + color: $--theme-text-1 !important; +} + +.el-timeline-item__tail { + border-left-color: $--theme-border-2 !important; +} + +.el-timeline-item__node { + background-color: $--theme-border-2 !important; +} + +.el-popper[x-placement^='top'] .popper__arrow { + border-top-color: $--theme-bg-4 !important; +} + +.el-popper[x-placement^='top'] .popper__arrow::after { + border-top-color: $--theme-bg-4 !important; +} + +.el-popper[x-placement^='bottom'] .popper__arrow { + border-bottom-color: $--theme-bg-4 !important; +} + +.el-popper[x-placement^='bottom'] .popper__arrow::after { + border-bottom-color: $--theme-bg-4 !important; +} + +.el-popper[x-placement^='left'] .popper__arrow { + border-left-color: $--theme-bg-4 !important; +} + +.el-popper[x-placement^='left'] .popper__arrow::after { + border-left-color: $--theme-bg-4 !important; +} + +.el-popper[x-placement^='right'] .popper__arrow { + border-right-color: $--theme-bg-4 !important; +} + +.el-popper[x-placement^='right'] .popper__arrow::after { + border-right-color: $--theme-bg-4 !important; +} + +// Group Calendar Dialog borders +.search-container { + border-bottom-color: $--border-color-light !important; +} + +.group-header { + border-bottom-color: $--border-color-light !important; +} diff --git a/src/assets/scss/themes/theme.darkblue.scss b/src/assets/scss/themes/theme.darkblue.scss index 640347a6..600cc865 100644 --- a/src/assets/scss/themes/theme.darkblue.scss +++ b/src/assets/scss/themes/theme.darkblue.scss @@ -126,8 +126,84 @@ $--message-danger-font-color: #ff4d4f; $--pagination-hover-color: $--theme-text-4; +$--calendar-selected-background-color: rgba($--theme-primary, 0.1); +$--card-background-color: $--theme-bg-4; + $--font-path: '~element-ui/lib/theme-chalk/fonts'; @import '~element-ui/packages/theme-chalk/src/index'; +:root { + --group-calendar-event-bg: #{$--calendar-selected-background-color}; + --group-calendar-badge-following: #{$--color-success}; + --group-calendar-badge-normal: #{$--color-primary}; +} + @import '_theme.dark_styles'; + +.el-calendar { + background-color: $--theme-bg-4 !important; +} + +.el-calendar__title { + color: $--theme-text-1 !important; +} + +.el-card { + background-color: $--theme-bg-5 !important; + border-color: $--theme-border-1 !important; +} + +.el-descriptions__body { + background-color: $--theme-bg-4 !important; + color: $--theme-text-1 !important; +} + +.el-timeline-item__tail { + border-left-color: $--theme-border-2 !important; +} + +.el-timeline-item__node { + background-color: $--theme-border-2 !important; +} + +.el-popper[x-placement^='top'] .popper__arrow { + border-top-color: $--theme-bg-4 !important; +} + +.el-popper[x-placement^='top'] .popper__arrow::after { + border-top-color: $--theme-bg-4 !important; +} + +.el-popper[x-placement^='bottom'] .popper__arrow { + border-bottom-color: $--theme-bg-4 !important; +} + +.el-popper[x-placement^='bottom'] .popper__arrow::after { + border-bottom-color: $--theme-bg-4 !important; +} + +.el-popper[x-placement^='left'] .popper__arrow { + border-left-color: $--theme-bg-4 !important; +} + +.el-popper[x-placement^='left'] .popper__arrow::after { + border-left-color: $--theme-bg-4 !important; +} + +.el-popper[x-placement^='right'] .popper__arrow { + border-right-color: $--theme-bg-4 !important; +} + +.el-popper[x-placement^='right'] .popper__arrow::after { + border-right-color: $--theme-bg-4 !important; +} + +// Group Calendar Dialog borders +.search-container { + border-bottom-color: $--border-color-light !important; +} + +.group-header { + border-bottom-color: $--border-color-light !important; +} diff --git a/src/assets/scss/themes/theme.darkvanilla.scss b/src/assets/scss/themes/theme.darkvanilla.scss index 2ff25497..2c21247c 100644 --- a/src/assets/scss/themes/theme.darkvanilla.scss +++ b/src/assets/scss/themes/theme.darkvanilla.scss @@ -556,11 +556,41 @@ div.options-container[style='margin-top: 45px; border-top: 1px solid rgb(238, 23 color: #ddd; } -.el-popper[x-placement^='top'] .popper__arrow, -.el-popper[x-placement^='left'] .popper__arrow, -.el-popper[x-placement^='right'] .popper__arrow, +.el-popover { + background-color: var(--dv_bg-top) !important; + border-color: var(--dv_bg-mid) !important; +} + +.el-popper[x-placement^='top'] .popper__arrow { + border-top-color: var(--dv_bg-top) !important; +} + +.el-popper[x-placement^='top'] .popper__arrow::after { + border-top-color: var(--dv_bg-top) !important; +} + .el-popper[x-placement^='bottom'] .popper__arrow { - display: none; + border-bottom-color: var(--dv_bg-top) !important; +} + +.el-popper[x-placement^='bottom'] .popper__arrow::after { + border-bottom-color: var(--dv_bg-top) !important; +} + +.el-popper[x-placement^='left'] .popper__arrow { + border-left-color: var(--dv_bg-top) !important; +} + +.el-popper[x-placement^='left'] .popper__arrow::after { + border-left-color: var(--dv_bg-top) !important; +} + +.el-popper[x-placement^='right'] .popper__arrow { + border-right-color: var(--dv_bg-top) !important; +} + +.el-popper[x-placement^='right'] .popper__arrow::after { + border-right-color: var(--dv_bg-top) !important; } img.x-link, @@ -760,3 +790,44 @@ div.x-friend-list > span.el-input__count { background-color: var(--mid) !important; } + +:root { + --group-calendar-event-bg: rgba(var(--dv_bright-rgb), 0.1); + --group-calendar-badge-following: var(--dv_muted); + --group-calendar-badge-normal: var(--dv_bright); +} + +.el-calendar { + background-color: var(--dv_bg-top) !important; +} + +.el-calendar__title { + color: var(--dv_bright) !important; +} + +.el-card { + background-color: var(--dv_bg-mid) !important; + border-color: var(--dv_bg-bot) !important; +} + +.el-descriptions__body { + background-color: var(--dv_bg-top) !important; + color: var(--dv_bright) !important; +} + +.el-timeline-item__tail { + border-left-color: var(--dv_muted) !important; +} + +.el-timeline-item__node { + background-color: var(--dv_muted) !important; +} + +// Group Calendar Dialog borders +.search-container { + border-bottom: 1px solid var(--dv_muted) !important; +} + +.group-header { + border-bottom: 2px solid var(--dv_muted) !important; +} diff --git a/src/assets/scss/themes/theme.darkvanillaold.scss b/src/assets/scss/themes/theme.darkvanillaold.scss index 53f76a63..c0d16cb2 100644 --- a/src/assets/scss/themes/theme.darkvanillaold.scss +++ b/src/assets/scss/themes/theme.darkvanillaold.scss @@ -18,6 +18,10 @@ --theme-text-muted: #906d92; --theme-text-rgb: 238, 204, 224; --theme-text-muted-rgb: 144, 109, 146; + + --group-calendar-event-bg: rgba(var(--theme-text-muted-rgb), 0.1); + --group-calendar-badge-following: var(--theme-text-muted); + --group-calendar-badge-normal: var(--theme-text); } div.options-container[style='margin-top: 45px; border-top: 1px solid rgb(238, 238, 238); padding-top: 30px;']:after { @@ -372,3 +376,29 @@ div.x-friend-list > span.el-input__count { background-color: var(--mid) !important; } + +.el-calendar { + background-color: var(--mid) !important; +} + +.el-calendar__title { + color: var(--theme-text) !important; +} + +.el-card { + background-color: var(--top) !important; + border-color: var(--top-border) !important; +} + +.el-descriptions__body { + background-color: var(--top) !important; + color: var(--theme-text) !important; +} + +.el-timeline-item__tail { + border-left-color: var(--theme-text-muted) !important; +} + +.el-timeline-item__node { + background-color: var(--theme-text-muted) !important; +} diff --git a/src/assets/scss/themes/theme.material3.scss b/src/assets/scss/themes/theme.material3.scss index 4b689979..457e9188 100644 --- a/src/assets/scss/themes/theme.material3.scss +++ b/src/assets/scss/themes/theme.material3.scss @@ -117,6 +117,12 @@ body { user-select: none; font-family: var(--md-sys-typescale-body-small-font); font-variant-numeric: tabular-nums; + + --group-calendar-event-bg: rgba(var(--md-sys-color-primary), 0.05); + --group-calendar-badge-following: rgb( + var(--md-sys-color-primary-container) + ); + --group-calendar-badge-normal: rgb(var(--md-sys-color-secondary)); } ::selection { @@ -1639,8 +1645,42 @@ img.x-link.el-popover__reference { border-top: 1px solid rgb(var(--md-sys-color-outline-variant)); margin-top: 8px; } -.el-popper .popper__arrow { - display: none; + +.el-popover { + background: var(--md-sys-color-surface-3) !important; + border-color: rgb(var(--md-sys-color-outline-variant)) !important; +} + +.el-popper[x-placement^='top'] .popper__arrow { + border-top-color: var(--md-sys-color-surface-3) !important; +} + +.el-popper[x-placement^='top'] .popper__arrow::after { + border-top-color: var(--md-sys-color-surface-3) !important; +} + +.el-popper[x-placement^='bottom'] .popper__arrow { + border-bottom-color: var(--md-sys-color-surface-3) !important; +} + +.el-popper[x-placement^='bottom'] .popper__arrow::after { + border-bottom-color: var(--md-sys-color-surface-3) !important; +} + +.el-popper[x-placement^='left'] .popper__arrow { + border-left-color: var(--md-sys-color-surface-3) !important; +} + +.el-popper[x-placement^='left'] .popper__arrow::after { + border-left-color: var(--md-sys-color-surface-3) !important; +} + +.el-popper[x-placement^='right'] .popper__arrow { + border-right-color: var(--md-sys-color-surface-3) !important; +} + +.el-popper[x-placement^='right'] .popper__arrow::after { + border-right-color: var(--md-sys-color-surface-3) !important; } /* Status icon */ @@ -2113,3 +2153,42 @@ div.x-friend-list > span.el-input__count { background-color: var(--md-sys-color-surface-3) !important; } + +.el-calendar { + background: var(--md-sys-color-surface-3) !important; +} + +.el-calendar__title { + color: rgb(var(--md-sys-color-on-surface)) !important; +} + +.el-card { + background: var(--md-sys-color-surface-2) !important; + border-color: rgb(var(--md-sys-color-outline-variant)) !important; +} + +.el-descriptions__body { + background: var(--md-sys-color-surface-3) !important; + color: rgb(var(--md-sys-color-on-surface)) !important; +} + +.el-timeline-item__tail { + border-left-color: rgb(var(--md-sys-color-outline-variant)) !important; +} + +.el-timeline-item__node { + background-color: rgb(var(--md-sys-color-outline)) !important; +} + +.x-dialog .top-content { + height: 640px !important ; +} + +// Group Calendar Dialog borders +.search-container { + border-bottom: 1px solid rgba(var(--md-sys-color-outline), 0.5) !important; +} + +.group-header { + border-bottom: 2px solid rgba(var(--md-sys-color-outline), 0.5) !important; +} diff --git a/src/assets/scss/themes/theme.pink.scss b/src/assets/scss/themes/theme.pink.scss index 36038cc2..71cecb2d 100644 --- a/src/assets/scss/themes/theme.pink.scss +++ b/src/assets/scss/themes/theme.pink.scss @@ -16,6 +16,10 @@ --font: 'Poppins', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans TC', 'Noto Sans SC', sans-serif; + + --group-calendar-event-bg: rgba(223, 162, 162, 0.1); + --group-calendar-badge-following: var(--theme); + --group-calendar-badge-normal: var(--lighter-border); } body, button, @@ -430,3 +434,75 @@ input[type='checkbox']:checked + .el-switch__core { background-size: 400% 100%; animation: el-skeleton-loading 1.4s ease infinite; } + +.el-calendar { + background-color: var(--lighter-bg) !important; +} + +.el-calendar__title { + color: var(--theme) !important; +} + +.el-card { + background-color: var(--light-bg) !important; + border-color: var(--lighter-bg) !important; +} + +.el-descriptions__body { + background-color: var(--bg) !important; + color: var(--theme) !important; +} + +.el-timeline-item__tail { + border-left-color: var(--lighter-border) !important; +} + +.el-timeline-item__node { + background-color: var(--lighter-border) !important; +} + +.el-popover { + background-color: var(--bg) !important; + border-color: var(--lighter-bg) !important; +} + +.el-popper[x-placement^='top'] .popper__arrow { + border-top-color: var(--bg) !important; +} + +.el-popper[x-placement^='top'] .popper__arrow::after { + border-top-color: var(--bg) !important; +} + +.el-popper[x-placement^='bottom'] .popper__arrow { + border-bottom-color: var(--bg) !important; +} + +.el-popper[x-placement^='bottom'] .popper__arrow::after { + border-bottom-color: var(--bg) !important; +} + +.el-popper[x-placement^='left'] .popper__arrow { + border-left-color: var(--bg) !important; +} + +.el-popper[x-placement^='left'] .popper__arrow::after { + border-left-color: var(--bg) !important; +} + +.el-popper[x-placement^='right'] .popper__arrow { + border-right-color: var(--bg) !important; +} + +.el-popper[x-placement^='right'] .popper__arrow::after { + border-right-color: var(--bg) !important; +} + +// Group Calendar Dialog borders +.search-container { + border-bottom: 1px solid var(--lighter-bg) !important; +} + +.group-header { + border-bottom: 2px solid var(--lighter-bg) !important; +} diff --git a/src/components/dialogs/GroupDialog/GroupCalendarDialog.vue b/src/components/dialogs/GroupDialog/GroupCalendarDialog.vue new file mode 100644 index 00000000..1317a0cc --- /dev/null +++ b/src/components/dialogs/GroupDialog/GroupCalendarDialog.vue @@ -0,0 +1,493 @@ + + + + + {{ t('dialog.group_calendar.header') }} + + {{ viewMode === 'timeline' ? 'List View' : 'Calendar View' }} + + + + + + + + + + + + + + + No events found + + + + + + + + {{ dayjs(date).format('D') }} + + {{ filteredCalendar[formatDateKey(date)]?.length }} + + + + + + + + + + + + + + + + + {{ group.groupName }} + + + + + + + + {{ searchQuery ? 'No matching events found' : 'No events this month' }} + + + + + + + + + + + diff --git a/src/components/dialogs/GroupDialog/GroupCalendarEventCard.vue b/src/components/dialogs/GroupDialog/GroupCalendarEventCard.vue new file mode 100644 index 00000000..c908d998 --- /dev/null +++ b/src/components/dialogs/GroupDialog/GroupCalendarEventCard.vue @@ -0,0 +1,220 @@ + + + + + + + {{ groupName }} + + + + + + {{ formatTimeRange(event.startsAt, event.endsAt) }} + + + + {{ + capitalizeFirst(event.category) + }} + + {{ event.interestedUserCount }} + + + {{ event.closeInstanceAfterEndMinutes + ' min' }} + + {{ + dayjs(event.createdAt).format('YYYY-MM-DD HH:mm') + }} + {{ event.description }} + + + {{ event.title }} + + + + + + {{ formattedTime }} + + + {{ capitalizeFirst(event.accessType) }} + + + + + + + + + + + + diff --git a/src/components/dialogs/SafeDialog.vue b/src/components/dialogs/SafeDialog.vue index 5b7ed904..6ad10ddb 100644 --- a/src/components/dialogs/SafeDialog.vue +++ b/src/components/dialogs/SafeDialog.vue @@ -42,9 +42,17 @@ nextTick(() => { addWrapperListeners(); + removeTitleAttribute(); }); }; + const removeTitleAttribute = () => { + const wrapper = elDialogRef.value?.$el; + if (wrapper && wrapper.nodeType === Node.ELEMENT_NODE) { + wrapper.removeAttribute('title'); + } + }; + const handleClose = () => { emit('close'); removeWrapperListeners(); diff --git a/src/localization/en/en.json b/src/localization/en/en.json index 7d62329b..c8635e1d 100644 --- a/src/localization/en/en.json +++ b/src/localization/en/en.json @@ -1632,6 +1632,9 @@ "header": "Allowed Video Player Domains", "add_domain": "Add Domain", "save": "Save" + }, + "group_calendar": { + "header": "Group Calendar" } }, "confirm": { diff --git a/src/types/api/group.d.ts b/src/types/api/group.d.ts index 610d7a42..bc3c04cb 100644 --- a/src/types/api/group.d.ts +++ b/src/types/api/group.d.ts @@ -7,6 +7,10 @@ export type GetGroup = (params: { params: { groupId: string; includeRoles?: boolean }; }>; +export type GetCalendars = (date: string) => Promise; + +export type GetFollowingCalendars = (date: string) => Promise; + // API response types interface GetGroupResponse { badges: any[]; @@ -28,9 +32,51 @@ interface GetGroupResponse { membershipStatus: string; name: string; onlineMemberCount: number; + // groupId ownerId: string; privacy: string; rules: string; shortCode: string; tags: string[]; -} \ No newline at end of file +} + +// Exported interfaces + +/** + * Group calendar event object + */ +export interface GroupCalendarEvent { + accessType: 'public' | 'group' | string; + category: 'hangout' | 'education' | 'roleplaying' | string; + closeInstanceAfterEndMinutes: number; + createdAt: string; + deletedAt: string | null; + description: string; + endsAt: string; + featured: boolean; + guestEarlyJoinMinutes: number; + hostEarlyJoinMinutes: number; + id: string; + imageId: string | null; + imageUrl?: string; + interestedUserCount: number; + isDraft: boolean; + languages: string[]; + ownerId: string; + platforms: string[]; + roleIds: string[] | null; + startsAt: string; + tags: string[]; + title: string; + type: 'event' | string; + updatedAt: string; + userInterest?: GroupCalendarUserInterest; + usesInstanceOverflow: boolean; +} + +// Internal response types +interface CalendarResponse { + hasNext: boolean; + results: GroupCalendarEvent[]; + totalCount: number; +} diff --git a/src/views/Sidebar/Sidebar.vue b/src/views/Sidebar/Sidebar.vue index 34be4d97..4369806d 100644 --- a/src/views/Sidebar/Sidebar.vue +++ b/src/views/Sidebar/Sidebar.vue @@ -78,13 +78,16 @@ ({{ groupInstances.length }}) + + + +