diff --git a/frontend/src/views/SetlistShow.vue b/frontend/src/views/SetlistShow.vue index 559b412..d9a296a 100644 --- a/frontend/src/views/SetlistShow.vue +++ b/frontend/src/views/SetlistShow.vue @@ -799,6 +799,10 @@ const copyList = (format) => { } } ); + // Add link to list + list.push(...['', format === 'markdown' ? `<${window.location.href}>` : window.location.href]); + + // Copy to clipboard navigator.clipboard.writeText(list.join('\n')); notify({ title: t('toast.copiedToClipboard'), @@ -833,6 +837,13 @@ const exportPdf = (mode) => { lineHeight: 1.4, margin: [ 0, 30, 0, 5 ] }, + link: { + font: 'FiraSans', + fontSize: 11, + lineHeight: 1.4, + color: '#759B3B', + margin: [ 0, 20, 0, 0 ], + }, partnumber: { font: 'FiraSans', fontSize: 24, @@ -855,12 +866,11 @@ const exportPdf = (mode) => { } } }; - pdfMake.createPdf(doc).download( - route.params.id - + '-' - + (mode == 'sheets' ? t('text.songsheets') : t('text.list')).toLowerCase() - + '.pdf' - ); + + // Trigger download + const type = (mode == 'sheets' ? t('text.songsheets') : t('text.list')).toLowerCase(); + pdfMake.createPdf(doc).download(`${route.params.id}-${type}.pdf`); + // toast success message notify({ title: t('toast.exportedPdf'), @@ -889,7 +899,8 @@ const getPdfSetlist = () => { style: 'subtitle', margin: [ 0, 6, 0, 0 ] }, - { ol: songs, style: 'list'} + { ol: songs, style: 'list'}, + { text: window.location.href, link: window.location.href, style: 'link' }, ]; };