From 60660849c73f61b5b7b6f14bf430a6e785d3cb73 Mon Sep 17 00:00:00 2001 From: Esa Kataja Date: Sun, 2 Aug 2026 20:57:34 +0300 Subject: [PATCH] Make the invite copyable and widen what feedback invites MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three fixes from using the admin panel and the site: - The invite link was an anchor, but an invite is something to send, not to follow — clicking it opened the join form in the admin's own browser. It is now the URL beside a Kopioi button. The handler reads the text out of the sibling element rather than interpolating the URL into JS, so there is nothing to escape, and where the clipboard API is missing (it needs a secure context, which the documented SSH tunnel to localhost provides) it selects the text instead of leaving a button that does nothing. - "Ilmoita ongelmasta" framed the feedback form as a bug tracker when it is meant to take ideas and general feedback too. The footer now asks "Ongelmia? Ideoita? Palautetta?", and the page it leads to answers all three: the ingress covers ideas explicitly and the placeholder suggests a feature rather than a fault. - "Kuuntele YouTubessa" opens in a new tab. Leaving the page mid-review would lose whatever is already typed into the review form. --- static/style.css | 4 ++++ templates/admin.html | 32 ++++++++++++++++++++++++++++++-- templates/layout.html | 2 +- templates/report.html | 6 +++--- templates/song.html | 3 ++- 5 files changed, 40 insertions(+), 7 deletions(-) diff --git a/static/style.css b/static/style.css index 108e4fc..b3a9b03 100644 --- a/static/style.css +++ b/static/style.css @@ -743,6 +743,10 @@ td.break { word-break: break-all; font-size: 0.8rem; } code { background: var(--surface-raised); padding: 0.1rem var(--space-1); border-radius: var(--radius); font-size: 0.85rem; } +/* The link is long and the button must stay reachable next to it on a narrow admin window. */ +.invitecell { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; } +.invitecell code { word-break: break-all; } + /* --- toasts --- */ .toasts { position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: 1000; diff --git a/templates/admin.html b/templates/admin.html index 47da7ec..d7eee55 100644 --- a/templates/admin.html +++ b/templates/admin.html @@ -13,8 +13,11 @@ {{range .Data.Invites}} - - {{.Link}} + + + {{.Link}} + käyttämätön {{fidate .CreatedAt}} @@ -87,4 +90,29 @@ + {{end}} diff --git a/templates/layout.html b/templates/layout.html index 4d3220f..9a21ebf 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -62,7 +62,7 @@