- {{.Account.Email.String}}
+ {{.User.Email.String}}
diff --git a/pkg/server/views/view.go b/pkg/server/views/view.go
index 3484dca8..438735a1 100644
--- a/pkg/server/views/view.go
+++ b/pkg/server/views/view.go
@@ -108,14 +108,13 @@ func (v *View) Render(w http.ResponseWriter, r *http.Request, data *Data, status
}
vd.User = context.User(r.Context())
- vd.Account = context.Account(r.Context())
// Put user data in Yield
if vd.Yield == nil {
vd.Yield = map[string]interface{}{}
}
- if vd.Account != nil {
- vd.Yield["Email"] = vd.Account.Email.String
+ if vd.User != nil {
+ vd.Yield["Email"] = vd.User.Email.String
}
vd.Yield["CurrentPath"] = r.URL.Path
vd.Yield["Standalone"] = buildinfo.Standalone
From e3380a4dfafe88e7e3197619b8d1093e466fdf45 Mon Sep 17 00:00:00 2001
From: Sung <8265228+sungwoncho@users.noreply.github.com>
Date: Sun, 19 Oct 2025 21:42:53 -0700
Subject: [PATCH 10/23] Remove unused templates (#702)
---
pkg/server/tmpl/app.go | 103 -------------
pkg/server/tmpl/app_test.go | 51 -------
pkg/server/tmpl/data.go | 141 ------------------
pkg/server/tmpl/data_test.go | 68 ---------
pkg/server/tmpl/tmpl.go | 29 ----
pkg/server/views/templates/books/index.gohtml | 20 ---
pkg/server/views/templates/books/show.gohtml | 4 -
pkg/server/views/templates/icons/book.gohtml | 17 ---
pkg/server/views/templates/icons/caret.gohtml | 26 ----
pkg/server/views/templates/notes/index.gohtml | 91 -----------
pkg/server/views/templates/notes/show.gohtml | 33 ----
.../templates/partials/page_toolbar.gohtml | 5 -
.../views/templates/partials/time.gohtml | 13 --
13 files changed, 601 deletions(-)
delete mode 100644 pkg/server/tmpl/app.go
delete mode 100644 pkg/server/tmpl/app_test.go
delete mode 100644 pkg/server/tmpl/data.go
delete mode 100644 pkg/server/tmpl/data_test.go
delete mode 100644 pkg/server/tmpl/tmpl.go
delete mode 100644 pkg/server/views/templates/books/index.gohtml
delete mode 100644 pkg/server/views/templates/books/show.gohtml
delete mode 100644 pkg/server/views/templates/icons/book.gohtml
delete mode 100644 pkg/server/views/templates/icons/caret.gohtml
delete mode 100644 pkg/server/views/templates/notes/index.gohtml
delete mode 100644 pkg/server/views/templates/notes/show.gohtml
delete mode 100644 pkg/server/views/templates/partials/page_toolbar.gohtml
delete mode 100644 pkg/server/views/templates/partials/time.gohtml
diff --git a/pkg/server/tmpl/app.go b/pkg/server/tmpl/app.go
deleted file mode 100644
index 7f084a85..00000000
--- a/pkg/server/tmpl/app.go
+++ /dev/null
@@ -1,103 +0,0 @@
-/* Copyright (C) 2019, 2020, 2021, 2022, 2023, 2024, 2025 Dnote contributors
- *
- * This file is part of Dnote.
- *
- * Dnote is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Dnote is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with Dnote. If not, see
-
Notes
-
- {{template "pageToolbar" dict "data" . "class" "toolbar"}}
-
-
- {{if eq (len .NoteGroups) 0 }}
-
No notes found.
- {{end}}
-
- {{range .NoteGroups}}
- {{template "noteGroup" .}}
- {{end}}
-
-
-{{end}}
-
-{{define "noteGroup"}}
-