refactored view package

This commit is contained in:
2026-02-09 19:30:47 +11:00
parent fa3b8e3982
commit 0b3301f921
47 changed files with 653 additions and 490 deletions

View File

@@ -5,7 +5,7 @@ import (
"git.haelnorr.com/h/golib/hws"
"git.haelnorr.com/h/oslstats/internal/notify"
"git.haelnorr.com/h/oslstats/internal/view/page"
baseview "git.haelnorr.com/h/oslstats/internal/view/baseview"
)
func ErrorPage(hwsError hws.HWSError) (hws.ErrorPage, error) {
@@ -27,7 +27,7 @@ func ErrorPage(hwsError hws.HWSError) (hws.ErrorPage, error) {
// Render appropriate template
if details != "" {
return page.ErrorWithDetails(
return baseview.ErrorPageWithDetails(
hwsError.StatusCode,
http.StatusText(hwsError.StatusCode),
message,
@@ -35,7 +35,7 @@ func ErrorPage(hwsError hws.HWSError) (hws.ErrorPage, error) {
), nil
}
return page.Error(
return baseview.ErrorPage(
hwsError.StatusCode,
http.StatusText(hwsError.StatusCode),
message,