diff --git a/appview/pages/pages.go b/appview/pages/pages.go index 25d9f225..d1e72e5d 100644 --- a/appview/pages/pages.go +++ b/appview/pages/pages.go @@ -296,6 +296,35 @@ func (p *Pages) UserProfileSettings(w io.Writer, params UserProfileSettingsParam return p.execute("user/settings/profile", w, params) } +type NotificationsParams struct { + LoggedInUser *oauth.User + Notifications []*models.NotificationWithEntity + UnreadCount int + HasMore bool + NextOffset int + Limit int +} + +func (p *Pages) Notifications(w io.Writer, params NotificationsParams) error { + return p.execute("notifications/list", w, params) +} + +type NotificationItemParams struct { + Notification *models.Notification +} + +func (p *Pages) NotificationItem(w io.Writer, params NotificationItemParams) error { + return p.executePlain("notifications/fragments/item", w, params) +} + +type NotificationCountParams struct { + Count int +} + +func (p *Pages) NotificationCount(w io.Writer, params NotificationCountParams) error { + return p.executePlain("notifications/fragments/count", w, params) +} + type UserKeysSettingsParams struct { LoggedInUser *oauth.User PubKeys []models.PublicKey @@ -318,6 +347,17 @@ func (p *Pages) UserEmailsSettings(w io.Writer, params UserEmailsSettingsParams) return p.execute("user/settings/emails", w, params) } +type UserNotificationSettingsParams struct { + LoggedInUser *oauth.User + Preferences *models.NotificationPreferences + Tabs []map[string]any + Tab string +} + +func (p *Pages) UserNotificationSettings(w io.Writer, params UserNotificationSettingsParams) error { + return p.execute("user/settings/notifications", w, params) +} + type UpgradeBannerParams struct { Registrations []models.Registration Spindles []models.Spindle diff --git a/appview/pages/templates/errors/500.html b/appview/pages/templates/errors/500.html index 34b52da0..529e2d59 100644 --- a/appview/pages/templates/errors/500.html +++ b/appview/pages/templates/errors/500.html @@ -5,7 +5,7 @@
- {{ i "alert-triangle" "w-8 h-8 text-red-500 dark:text-red-400" }} + {{ i "triangle-alert" "w-8 h-8 text-red-500 dark:text-red-400" }}
@@ -14,22 +14,15 @@ 500 — internal server error

- Something went wrong on our end. We've been notified and are working to fix the issue. -

-
-
- {{ i "info" "w-4 h-4" }} - we're on it! -
-

Our team has been automatically notified about this error.

-
+ We encountered an error while processing your request. Please try again later. +

- {{ i "home" "w-4 h-4" }} + {{ i "arrow-left" "w-4 h-4" }} back to home
diff --git a/appview/pages/templates/layouts/fragments/topbar.html b/appview/pages/templates/layouts/fragments/topbar.html index b98458d1..a997000d 100644 --- a/appview/pages/templates/layouts/fragments/topbar.html +++ b/appview/pages/templates/layouts/fragments/topbar.html @@ -10,6 +10,7 @@
{{ with .LoggedInUser }} {{ block "newButton" . }} {{ end }} + {{ template "notifications/fragments/bell" }} {{ block "dropDown" . }} {{ end }} {{ else }} login @@ -44,7 +45,7 @@ {{ define "dropDown" }}