Add PNG download for the participant QR code in the admin
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:
1 parent
a9b14af8bf
commit
945fc94e77
4 files changed
+57
-3
No files matched your search
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user