Add PNG download for the participant QR code in the admin
CI / Deploy / PHP 8.5 (push) Successful in 1m33s
CI / Deploy / PHP 8.4 (push) Successful in 1m13s
CI / Deploy / test (push) Successful in 2s
CI / Deploy / deploy (push) Skipped

A button appears on hover/focus over the QR code (always visible on
touch devices) and saves it as a 1024px PNG, rendered client-side from
the SVG via canvas. No new dependency or server image library needed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Sonnet 5.5 committed 2026-11-18 08:19:58 +01:00
1 parent a9b14af8bf
commit 945fc94e77
4 files changed
+57 -3

No files matched your search

+5 -1
View File
@@ -230,7 +230,11 @@ $hasInternal = array_filter($slides, fn($slide) => !$slide->is_hidden && $slide-
<details class="card collapsible" open>
<summary><h2><?= __('Teilnahme') ?></h2></summary>
<p class="join-code"><?= h($poll->formattedJoinCode()) ?></p>
<img class="qr" src="<?= $this->Url->build($url('admin:qr')) ?>" alt="<?= __('QR-Code zur Teilnahme') ?>" width="160" height="160">
<div class="qr-wrap">
<img class="qr" src="<?= $this->Url->build($url('admin:qr')) ?>" alt="<?= __('QR-Code zur Teilnahme') ?>" width="160" height="160">
<button type="button" class="button button--small qr-wrap__download" data-qr-download
data-filename="plenario-qr-<?= h($poll->join_code) ?>.png" hidden><?= __('Als PNG speichern') ?></button>
</div>
<div class="copy-field">
<input type="text" readonly value="<?= h($joinUrl) ?>" aria-label="<?= __('Teilnahme-Link') ?>" data-copy-source>
<button type="button" class="button button--small" data-copy><?= __('Kopieren') ?></button>