7474 size ='large'
7575 :show-arrow ='true'
7676 trigger ='click'
77- @select ='downloadIcs'
7877 )
7978 n-button.mt-2 (
8079 id ='agenda-quickaccess-addtocal-btn'
@@ -141,14 +140,26 @@ const route = useRoute()
141140
142141const downloadIcsOptions = [
143142 {
144- label: ' Subscribe... (webcal)' ,
145143 key: ' subscribe' ,
146- icon : () => h (' i' , { class: ' bi bi-calendar-week text-blue' })
144+ type: ' render' ,
145+ render : () => h (' a' , {
146+ class: ' agenda-quickaccess-callinks' ,
147+ href: ` webcal://${ window .location .host }${ icsLink .value } `
148+ }, [
149+ h (' i' , { class: ' bi bi-calendar-week text-blue' }),
150+ h (' span' , ' Subscribe... (webcal)' )
151+ ])
147152 },
148153 {
149- label: ' Download... (.ics)' ,
150154 key: ' download' ,
151- icon : () => h (' i' , { class: ' bi bi-arrow-down-square' })
155+ type: ' render' ,
156+ render : () => h (' a' , {
157+ class: ' agenda-quickaccess-callinks' ,
158+ href: icsLink .value
159+ }, [
160+ h (' i' , { class: ' bi bi-arrow-down-square' }),
161+ h (' span' , ' Download... (.ics)' )
162+ ])
152163 }
153164]
154165
@@ -158,6 +169,17 @@ const shortMode = computed(() => {
158169 return siteStore .viewport <= 1350
159170})
160171
172+ const icsLink = computed (() => {
173+ if (agendaStore .pickerMode ) {
174+ const sessionKeywords = agendaStore .scheduleAdjusted .map (s => s .sessionKeyword )
175+ return ` ${ getUrl (' meetingCalIcs' , { meetingNumber: agendaStore .meeting .number })} ?show=${ sessionKeywords .join (' ,' )} `
176+ } else if (agendaStore .selectedCatSubs .length > 0 ) {
177+ return ` ${ getUrl (' meetingCalIcs' , { meetingNumber: agendaStore .meeting .number })} ?show=${ agendaStore .selectedCatSubs .join (' ,' )} `
178+ } else {
179+ return ` ${ getUrl (' meetingCalIcs' , { meetingNumber: agendaStore .meeting .number })} `
180+ }
181+ })
182+
161183// METHODS
162184
163185function pickerStart () {
@@ -177,24 +199,6 @@ function pickerDiscard () {
177199 }
178200}
179201
180- function downloadIcs (key ) {
181- message .loading (' Generating calendar file... Download will begin shortly.' )
182- let icsUrl = ' '
183- if (agendaStore .pickerMode ) {
184- const sessionKeywords = agendaStore .scheduleAdjusted .map (s => s .sessionKeyword )
185- icsUrl = ` ${ getUrl (' meetingCalIcs' , { meetingNumber: agendaStore .meeting .number })} ?show=${ sessionKeywords .join (' ,' )} `
186- } else if (agendaStore .selectedCatSubs .length > 0 ) {
187- icsUrl = ` ${ getUrl (' meetingCalIcs' , { meetingNumber: agendaStore .meeting .number })} ?show=${ agendaStore .selectedCatSubs .join (' ,' )} `
188- } else {
189- icsUrl = ` ${ getUrl (' meetingCalIcs' , { meetingNumber: agendaStore .meeting .number })} `
190- }
191- if (key === ' subscribe' ) {
192- window .location .assign (` webcal://${ window .location .host }${ icsUrl} ` )
193- } else {
194- window .location .assign (icsUrl)
195- }
196- }
197-
198202function scrollToDay (dayId , ev ) {
199203 ev .preventDefault ()
200204 document .getElementById (` agenda-day-${ dayId} ` )? .scrollIntoView (true )
@@ -284,5 +288,24 @@ function scrollToNow (ev) {
284288 margin- top: 15px ;
285289 margin- bottom: 15px ;
286290 }
291+
292+ & - callinks {
293+ padding: 8px 16px ;
294+ display: flex;
295+ text- decoration: none;
296+ align- items: center;
297+
298+ & : hover, & : focus {
299+ text- decoration: underline;
300+ }
301+
302+ > i {
303+ font- size: var (-- n- font- size);
304+ }
305+
306+ > span {
307+ margin- left: 12px ;
308+ }
309+ }
287310}
288311< / style>
0 commit comments