Commit Graph

25 Commits

Author SHA1 Message Date
053ccf3845 **Untested! ** Add restore functionality for archived messages
- Added `RestoreMessageHandler` and route at `/account/messages/restore`
- Updated `users_messages` table to support `archived_at` reset
- Added restore button to archived messages template
- Ensures archived messages can be moved back into inbox
2025-04-02 23:53:29 +01:00
db5352bc9c Add restore functionality for archived messages
- Added `RestoreMessageHandler` and route at `/account/messages/restore`
- Updated `users_messages` table to support `archived_at` reset
- Added restore button to archived messages template
- Ensures archived messages can be moved back into inbox
2025-04-02 22:18:02 +01:00
dd83081271 Added full message handling system with archive view, pagination, and send support
- Implemented message inbox and archived messages view
- Added pagination logic to both inbox and archive handlers
- Integrated message sending functionality with CSRF protection
- Updated schema to include `archived_at` timestamp
- Included archive button and logic with feedback flash messaging
- Fixed message dropdown routing and rendering in topbar
- Cleaned up template load paths and error handling
2025-04-02 21:29:54 +01:00
e3428911b9 Messages: Add archive (soft-delete) support + dropdown UI polish
- Implemented `/account/messages/archive` route for soft-archiving messages
- Added `is_archived` flag to `users_messages` schema and model
- Topbar dropdown now reflects accurate unread message count
- Fixed missing route registration for archive handler
- Improved message visibility checks to prevent access violations
- Placeholder for rate-limit (429) error page rendering identified
2025-04-02 17:15:57 +01:00
b630296b8c 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
2025-04-02 11:56:11 +01:00
ab1d9abc72 Refactor: Recover middleware now uses RenderError + add full notifications view
- Replaced http.Error with helpers.RenderError in Recover middleware
- Custom 500.html now rendered with layout and topbar on panic
- RenderError gracefully checks template existence and falls back to plain response
- Added /account/notifications full view page (index)
- Linked "Back to notifications" from notification read view
- Fixed typo in template path for notifications/index.html
- Improved layout consistency across error and account pages
2025-04-02 09:54:20 +01:00
06e647d00f Feature: Add account-protected route to mark notifications as read
- Created /account/notifications/read endpoint secured by session middleware
- Ensured users can only mark their own notifications as read
- Updated dropdown links to point to /account/notifications/read?id={id}
- Improved notification security by matching user_id in DB update
- Added redirect flow to full notifications page after marking read
- Logged DB errors to assist debugging
2025-04-01 22:12:41 +01:00
03b1e095ce Refactor: Centralize template context using unified TemplateData struct
- Introduced models.TemplateData for shared user/context state
- Moved context construction logic into handlers/template_context.go
- Simplified helpers.TemplateContext to accept structured data
- Restored and organized template helper functions
- Updated affected handlers (main.go, draw_handler.go, notifications.go)
- Improved scalability and separation of concerns in template rendering
2025-04-01 21:08:00 +01:00
0e20cc023c more changes but unsure of state had to trash last set fof changes and try repair. 2025-04-01 15:50:15 +01:00
aaf90b55da Lots of UI and admin changes, need to clean up the three audit log tables and a few other niggles. 2025-04-01 00:05:48 +01:00
7eefb9ced0 Additional security and hardening. 2025-03-31 15:14:16 +01:00
c3a7480c65 expand on admin functionality, hardening still needs to be implemented. 2025-03-31 10:52:12 +01:00
23e0208317 Lots of changes around viewing tickets from css perspective logic changes nwe handlers and service triggers... just lots of stuff... 2025-03-28 10:05:54 +00:00
e13b375af7 Lots of changes, still more to do 2025-03-27 15:03:43 +00:00
66abdbdd4d Add tickets to db. 2025-03-26 13:26:43 +00:00
41ce9a3dd0 Move around endpoints. 2025-03-26 09:41:01 +00:00
e55508661c start reworking urls. 2025-03-26 08:34:28 +00:00
11f031ff54 AuThEnTiCaTiOn and clean up.... 2025-03-25 21:39:48 +00:00
1a531af4f8 implement rate limiting 2025-03-25 15:12:56 +00:00
0b93fd75dd add and refine thunderball results page 2025-03-25 14:47:41 +00:00
f1ad9757ba added authentication among other things. considered working at this point. 2025-03-25 11:27:21 +00:00
3598cb5fd9 Update 2025-03-25 09:11:23 +00:00
d2013ec5c5 Lots of changes and fixes 2025-03-24 23:23:29 +00:00
b1518b0e09 ad better function handling 2025-03-24 22:00:51 +00:00
cf8cd691dc init 2025-03-24 19:17:39 +00:00