11<template lang="pug">
22.agenda-mobile-bar ( v-if ='siteStore.viewport < 990' )
3+ n-dropdown(
4+ :options ='jumpToDayOptions'
5+ size ='huge'
6+ :show-arrow ='true'
7+ trigger ='click'
8+ @select ='jumpToDay'
9+ )
10+ button
11+ i.bi.bi-arrow-down-circle
312 button( @click ='agendaStore.$patch({ filterShown: true })' )
4- i.bi.bi-filter-square-fill.me-2
5- span Filters
13+ i.bi.bi-funnel
614 n-badge.ms-2 ( :value ='agendaStore.selectedCatSubs.length' , processing )
715 button( @click ='agendaStore.$patch({ calendarShown: true })' )
8- i.bi.bi-calendar3.me-2
9- span Cal
16+ i.bi.bi-calendar3
1017 n-dropdown(
1118 :options ='downloadIcsOptions'
1219 size ='huge'
1522 @select ='downloadIcs'
1623 )
1724 button
18- i.bi.bi-calendar-check.me-2
19- span .ics
25+ i.bi.bi-download
2026 button( @click ='agendaStore.$patch({ settingsShown: !agendaStore.settingsShown })' )
2127 i.bi.bi-gear
2228</template >
2329
2430<script setup>
25- import { h } from ' vue'
31+ import { computed , h } from ' vue'
2632
2733import {
2834 NBadge ,
@@ -43,13 +49,34 @@ const message = useMessage()
4349const agendaStore = useAgendaStore ()
4450const siteStore = useSiteStore ()
4551
52+ // Meeting Days
53+
54+ const jumpToDayOptions = computed (() => {
55+ const days = []
56+ if (agendaStore .isMeetingLive ) {
57+ days .push ({
58+ label: ' Jump to Now' ,
59+ key: ' now' ,
60+ icon : () => h (' i' , { class: ' bi bi-arrow-down-right-square text-red' })
61+ })
62+ }
63+ for (const day of agendaStore .meetingDays ) {
64+ days .push ({
65+ label: ` Jump to ${ day .label } ` ,
66+ key: day .slug ,
67+ icon : () => h (' i' , { class: ' bi bi-arrow-down-right-square' })
68+ })
69+ }
70+ return days
71+ })
72+
4673// Download Ics Options
4774
4875const downloadIcsOptions = [
4976 {
5077 label: ' Subscribe... (webcal)' ,
5178 key: ' subscribe' ,
52- icon : () => h (' i' , { class: ' bi bi-calendar-week text-blue ' })
79+ icon : () => h (' i' , { class: ' bi bi-calendar-week' })
5380 },
5481 {
5582 label: ' Download... (.ics)' ,
@@ -60,6 +87,20 @@ const downloadIcsOptions = [
6087
6188// METHODS
6289
90+ function jumpToDay (dayId ) {
91+ if (dayId === ' now' ) {
92+ const lastEventId = agendaStore .findCurrentEventId ()
93+
94+ if (lastEventId) {
95+ document .getElementById (` agenda-rowid-${ lastEventId} ` )? .scrollIntoView (true )
96+ } else {
97+ message .warning (' There is no event happening right now.' )
98+ }
99+ } else {
100+ document .getElementById (` agenda-day-${ dayId} ` )? .scrollIntoView (true )
101+ }
102+ }
103+
63104function downloadIcs (key ) {
64105 message .loading (' Generating calendar file... Download will begin shortly.' )
65106 let icsUrl = ' '
@@ -102,6 +143,8 @@ function downloadIcs (key) {
102143 color: #FFF ;
103144 padding: 0 15px ;
104145 transition: all .4s ease;
146+ text- align: center;
147+ flex: 1 1 ;
105148
106149 & + button {
107150 margin- left: 1px ;
0 commit comments