diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-04-15 23:59:00 +0200 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-04-15 23:59:00 +0200 |
commit | 9da246e91e7143536973bd9cfd1f11f4a6578f3b (patch) | |
tree | 88a269dc1c7583729ec3cd9269f9a83b3da22b35 /view/timers_list.templ | |
parent | 3d507d36ea2c7955d98a16b85cb7bc02c8923caa (diff) |
Protect timer operations with session
Diffstat (limited to 'view/timers_list.templ')
-rw-r--r-- | view/timers_list.templ | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/view/timers_list.templ b/view/timers_list.templ index 92d7013..c68979c 100644 --- a/view/timers_list.templ +++ b/view/timers_list.templ @@ -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>
}
|