diff --git a/frontend/internal/handlers/tag_page.go b/frontend/internal/handlers/tag_page.go index 260836b..00ebe1f 100644 --- a/frontend/internal/handlers/tag_page.go +++ b/frontend/internal/handlers/tag_page.go @@ -12,6 +12,7 @@ import ( type publicData struct { UpdatedAt pgtype.Timestamptz + Preview bool ID int64 TagCode string Status string @@ -48,6 +49,7 @@ func (a *App) PublicTag(w http.ResponseWriter, r *http.Request) { } pd := publicData{ + Preview: r.URL.Query().Get("preview") == "1", UpdatedAt: tag.UpdatedAt, ID: tag.ID, TagCode: tag.TagCode, diff --git a/frontend/templates/tag-edit.html b/frontend/templates/tag-edit.html index efb2075..9360609 100644 --- a/frontend/templates/tag-edit.html +++ b/frontend/templates/tag-edit.html @@ -31,7 +31,7 @@

Choose a photo and press Save. If you choose nothing, the current photo is kept.

-

👁 View the live tag page

+

👁 Preview the tag page (no scan)

diff --git a/frontend/templates/tag-public.html b/frontend/templates/tag-public.html index ee7b6e1..f06ea11 100644 --- a/frontend/templates/tag-public.html +++ b/frontend/templates/tag-public.html @@ -29,7 +29,10 @@ {{else}}
-
+ {{if .Data.Preview}} +
👁 PREVIEW — this is how the page looks to a finder (scan functionality disabled)
+ {{end}} +

{{if .Data.ItemType.Valid}}{{.Data.ItemType.String | title}}{{else}}Item{{end}} — found!

@@ -71,12 +74,15 @@ {{end}} + {{if not .Data.Preview}}

Help the owner find it: sharing your location sends them a map link. No location? No problem — the page still works.

+ {{end}} + {{if not .Data.Preview}}
@@ -86,6 +92,7 @@

Enter a valid phone number (8–16 digits, e.g. 0423 274 487).

+ {{end}} {{if .Data.IsOwner}}

✏️ Edit this tag's details

@@ -93,6 +100,7 @@
+ {{if not .Data.Preview}} + {{end}} {{end}}
{{end}}