Web-Push mit VAPID und Erinnerungs-Endpoint
This commit is contained in:
parent
67a1614081
commit
b50267e4f0
24 changed files with 1703 additions and 50 deletions
|
|
@ -3,6 +3,8 @@
|
|||
/** @var array $values */
|
||||
/** @var array $errors */
|
||||
/** @var array $employees */
|
||||
/** @var int $pushCount */
|
||||
/** @var bool $pushAvailable */
|
||||
$isSelf = $editing !== null && (int) $editing['id'] === (int) auth_user()['id'];
|
||||
$fieldError = static fn (string $key): string => (string) ($errors[$key] ?? '');
|
||||
?>
|
||||
|
|
@ -130,6 +132,17 @@ $fieldError = static fn (string $key): string => (string) ($errors[$key] ?? '');
|
|||
<div><dt>Nachname</dt><dd><?= e($values['last_name'] ?: '–') ?></dd></div>
|
||||
<div><dt>Rolle</dt><dd><?= $values['role'] === 'admin' ? 'Administrator' : 'Mitarbeiter' ?></dd></div>
|
||||
<div><dt>Status</dt><dd><?= $values['status'] === 'active' ? 'aktiv' : 'deaktiviert' ?></dd></div>
|
||||
<?php if ($editing): ?>
|
||||
<div><dt>App-Erinnerungen</dt><dd>
|
||||
<?php if ($pushCount > 0): ?>
|
||||
<span class="pill pill--green"><svg class="ico" aria-hidden="true"><use href="#i-bell"/></svg> <?= (int) $pushCount ?> Gerät<?= $pushCount === 1 ? '' : 'e' ?></span>
|
||||
<?php elseif ($pushAvailable): ?>
|
||||
<span class="muted small">nicht aktiviert</span>
|
||||
<?php else: ?>
|
||||
<span class="muted small">Push nicht konfiguriert</span>
|
||||
<?php endif; ?>
|
||||
</dd></div>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
<div class="form-actions">
|
||||
<button class="btn primary btn--block" type="submit"><svg class="ico" aria-hidden="true"><use href="#i-check"/></svg> Speichern</button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue