From 33628331f4330712781e2b3170236b16b24d9bc2 Mon Sep 17 00:00:00 2001 From: tapiron Date: Mon, 15 Sep 2025 06:51:16 +0200 Subject: [PATCH] feat: set default expiration in select (#28) No default value in select could be interpreted as ever lasting note. Default value in the select makes that clearer. Co-authored-by: Thibault Piron Reviewed-on: https://git.riou.xyz/jriou/coller/pulls/28 Reviewed-by: Julien Riou Co-authored-by: tapiron Co-committed-by: tapiron --- src/server/server.go | 2 ++ src/server/templates/index.html | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/server/server.go b/src/server/server.go index 28bd435..92dc217 100644 --- a/src/server/server.go +++ b/src/server/server.go @@ -189,6 +189,7 @@ type PageData struct { Title string Version string Expirations []int + Expiration int Languages []string Err error URL string @@ -423,6 +424,7 @@ func (s *Server) Start() error { p := PageData{ Title: s.config.Title, Expirations: s.config.Expirations, + Expiration: s.config.Expiration, Languages: s.config.Languages, } diff --git a/src/server/templates/index.html b/src/server/templates/index.html index 42faef1..0cf1d6d 100644 --- a/src/server/templates/index.html +++ b/src/server/templates/index.html @@ -36,9 +36,9 @@