From 4fda818e6e819681eeec0fd5af34a6e86ddc908e Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Sat, 23 Aug 2025 22:18:36 +0100 Subject: [PATCH] Further work on note ownership and sharing --- internal/conf/templates/edit.tmpl.html | 20 +++++++++ internal/conf/templates/view.tmpl.html | 20 +++++++++ internal/notes/notes.go | 59 +++++++++++++++++++------ internal/notes/views/views.go | 60 +++++++++++++++++--------- 4 files changed, 125 insertions(+), 34 deletions(-) diff --git a/internal/conf/templates/edit.tmpl.html b/internal/conf/templates/edit.tmpl.html index a84b5d1..b8e9aff 100644 --- a/internal/conf/templates/edit.tmpl.html +++ b/internal/conf/templates/edit.tmpl.html @@ -24,10 +24,30 @@ href="/static/css/tiny-mde.min.css" /> {{end}} diff --git a/internal/conf/templates/view.tmpl.html b/internal/conf/templates/view.tmpl.html index 48de3fd..932e5fc 100644 --- a/internal/conf/templates/view.tmpl.html +++ b/internal/conf/templates/view.tmpl.html @@ -7,6 +7,26 @@ Edit Delete +
+

Ownership

+ {{if .note.Viewers}} +

This note is owned by {{.note.Owner}} and is further visible to

+ + {{else}} +

This note is owned by {{.note.Owner}}.

+ {{end}} + +
+
+ +
Share with other user
+
+ +