Handle no alarm in nojs page
This commit is contained in:
parent
791b577c17
commit
425571d76e
2 changed files with 17 additions and 0 deletions
|
|
@ -1,5 +1,8 @@
|
|||
<h1 style="margin-bottom: 0">
|
||||
Prochain réveil le :
|
||||
{{ 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">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue