Handle no alarm in nojs page
Some checks are pending
continuous-integration/drone/push Build is pending
continuous-integration/drone/tag Build is passing

This commit is contained in:
nemunaire 2023-08-01 09:14:32 +02:00
commit 425571d76e
2 changed files with 17 additions and 0 deletions

View file

@ -1,5 +1,8 @@
<h1 style="margin-bottom: 0">
Prochain réveil le&nbsp;:
{{ if .noAlarm}}
aucun défini
{{ else }}
{{ if .sameDay }}
aujourd'hui
{{ else if lt .nCycles 16 }}
@ -8,18 +11,23 @@
{{ .nextAlarmDate }}
{{ end }}
à {{ .nextAlarmTime }}
{{ end }}
</h1>
{{ if not .noAlarm }}
<h2 style="color: gray; margin-top: 0; margin-left: 5em">
{{ if gt .nDays 2 }}(dans {{ .nDays }} jours){{ else }}(dans {{ .nCycles }} cycles + {{ .nMinutes }} min){{ end }}
</h2>
{{ end }}
<div style="display: flex; gap: 10px;">
{{ if not .noAlarm }}
<form method="post" action="/nojs.html">
<input type="hidden" name="action" value="cancel">
<button type="submit">
Annuler la prochaine alarme
</button>
</form>
{{ end }}
{{ if .isPlaying }}
<form method="post" action="/nojs.html">