From fb0cfef82bab06a1e3409ee65b7671b3f77261a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Thu, 6 Mar 2025 11:52:46 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=E2=9E=95=20Link=20to=20setlist=20on=20list?= =?UTF-8?q?=20export?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/SetlistShow.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/views/SetlistShow.vue b/frontend/src/views/SetlistShow.vue index 559b412..ae0d310 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}>` : window.location]); + + // Copy to clipboard navigator.clipboard.writeText(list.join('\n')); notify({ title: t('toast.copiedToClipboard'), From 63dfb5c3bebd18fb65a34b3f67acb3f5cbcb1dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Thu, 6 Mar 2025 12:09:50 +0100 Subject: [PATCH 2/2] =?UTF-8?q?=E2=9E=95=20Link=20to=20setlist=20on=20pdf?= =?UTF-8?q?=20list=20export?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/SetlistShow.vue | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/frontend/src/views/SetlistShow.vue b/frontend/src/views/SetlistShow.vue index ae0d310..d9a296a 100644 --- a/frontend/src/views/SetlistShow.vue +++ b/frontend/src/views/SetlistShow.vue @@ -800,7 +800,7 @@ const copyList = (format) => { } ); // Add link to list - list.push(...['', format === 'markdown' ? `<${window.location}>` : window.location]); + list.push(...['', format === 'markdown' ? `<${window.location.href}>` : window.location.href]); // Copy to clipboard navigator.clipboard.writeText(list.join('\n')); @@ -837,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, @@ -859,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'), @@ -893,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' }, ]; };