Add admin menu drawer and poll cloning, drop participant screen tools
CI / Deploy / PHP 8.5 (push) Successful in 1m51s
CI / Deploy / PHP 8.4 (push) Successful in 1m51s
CI / Deploy / test (push) Successful in 2s
CI / Deploy / deploy (push) Skipped

- Remove fullscreen and wake lock buttons from the participant view.
- Turn the admin sidebar into a drawer below 900px, opened from a header
  menu button next to the theme switch (progressive enhancement).
- Add "Umfrage kopieren": clone a poll with all slides, options and images
  but without responses, with its own join code and admin link.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Sonnet 5.5 committed 2026-11-20 10:57:33 +01:00
1 parent 0f91377de3
commit bd57f23be6
15 files changed
+374 -138

No files matched your search

+10 -5
View File
@@ -119,19 +119,24 @@ class ImageService
/**
* Copies a stored image (duplicated slides get their own file, so deleting one never affects the other).
*
* @param int $pollId Poll id
* @param int $pollId Poll id that receives the copy
* @param string $name Source file name
* @return string|null Name of the copy, null if the source file is gone
* @param int|null $sourcePollId Poll id of the source file (default: the same poll)
* @return string|null Name of the copy, null if the source file is gone or the copy failed
*/
public function copy(int $pollId, string $name): ?string
public function copy(int $pollId, string $name, ?int $sourcePollId = null): ?string
{
$source = $this->path($pollId, $name);
$source = $this->path($sourcePollId ?? $pollId, $name);
if ($source === null) {
return null;
}
$directory = $this->directory($pollId);
if (!is_dir($directory) && !@mkdir($directory, 0775, true) && !is_dir($directory)) {
return null;
}
$copy = bin2hex(random_bytes(12)) . '.webp';
return @copy($source, $this->directory($pollId) . DS . $copy) ? $copy : null;
return @copy($source, $directory . DS . $copy) ? $copy : null;
}
/**