Add message system (inbox, read view, dropdown) and truncate helper

Implemented message retrieval and read logic in storage layer

Added handlers for inbox and individual message view

Integrated messages into topbar dropdown with unread badge

Added truncate helper to template functions

Created new templates: messages/index.html and messages/read.html

Fixed missing template function error in topbar rendering
This commit is contained in:
2025-04-02 11:56:11 +01:00
parent ab1d9abc72
commit b630296b8c
9 changed files with 186 additions and 38 deletions

View File

@@ -23,12 +23,13 @@ type Notification struct {
}
type Message struct {
ID int
Sender string
Subject string
Message string
IsRead bool
CreatedAt time.Time
ID int
SenderId int
RecipientId int
Subject string
Message string
IsRead bool
CreatedAt time.Time
}
var db *sql.DB