From ba346cdac724dbad7b7837fcd52ab4b521a2fd54 Mon Sep 17 00:00:00 2001 From: Lukas Werner Date: Mon, 1 Dec 2025 12:25:26 -0800 Subject: [PATCH] feat: localize share closing timezone --- pages/share_list.templ | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/pages/share_list.templ b/pages/share_list.templ index 690e9a0..6b9b595 100644 --- a/pages/share_list.templ +++ b/pages/share_list.templ @@ -15,6 +15,15 @@ type File struct { Key string } +func isPhoto(filename string) bool { + switch path.Ext(filename) { + case ".jpg", ".jpeg", ".png", ".heic", ".webp", ".avif", ".gif", ".tiff": + return true + default: + return false + } +} + templ filetypeIcon(filename string) { switch path.Ext(filename) { case ".jpg",".jpeg", ".png",".heic", ".webp", ".avif", ".gif", ".tiff": @@ -52,7 +61,17 @@ templ ListShareContents(expires time.Time, shareid string, files []File) { Class: "flex gap-2 items-center dark:text-white", }) { @icon.Timer() - { expires.Format("03:04PM Jan 2") } + Expires: { expires.Format("Jan 2, 03:04PM") } + } @@ -97,8 +116,8 @@ templ ListShareContents(expires time.Time, shareid string, files []File) {