Protect timer operations with session

This commit is contained in:
2024-04-15 23:59:00 +02:00
parent 3d507d36ea
commit 9da246e91e
6 changed files with 86 additions and 54 deletions

View File

@ -35,14 +35,16 @@ templ TimerCreateForm(timerName string, err string) {
</form>
}
templ TimersList(timers []model.Timer) {
templ TimersList(timers []model.Timer, isSignedIn bool) {
<div class="timers-list">
<h1>Timers</h1>
for _, t := range timers {
@timer(t)
}
<h4>Create timer</h4>
@TimerCreateForm("", "")
if isSignedIn {
<h4>Create timer</h4>
@TimerCreateForm("", "")
}
</div>
}