Commit Graph

20 Commits (309e516480374df0d1d62fe4d0ff0ef8824a5e5a)

Author SHA1 Message Date
Joca 309e516480
Preferences: Add user preferences system with database table and settings page
- Add user_preferences table to store per-user settings (auto_save_drafts, markdown_preview_default)
- Create UserPreferences model with GetUserPreferences, CreateDefaultPreferences, and UpdateUserPreferences functions
- Add PreferencesHandler for GET/POST requests to display and save user preferences
- Create preferences.html template with checkbox for draft auto-save and radio buttons for markdown preview default
- Add "Preferences" link to navbar for logged-in users
- Register /preferences/ route with login requirement

This establishes the foundation for advanced features like draft auto-save and markdown preview toggle, allowing users to customize their experience.
2026-01-15 23:21:03 -03:00
Joca 935446280f
Chat: Add real-time connection status, typing indicators, smart scrolling, and message delivery status
Features added:
- Connection status indicator (green=connected, yellow=connecting, red=disconnected)
- Exponential backoff reconnection (1s → 2s → 4s → ... → 30s max)
- Typing indicators showing who is typing (up to 3 users, with overflow count)
- Message status (⋯ sending, ✓ sent, ✗ failed with retry option)
- Jump-to-bottom button with unread message count badge
- Smart scroll preservation (stays in place unless already at bottom)
- Optimistic UI for sent messages (appears immediately, updates with real status)
- Backend support for broadcasting typing events to other users
2026-01-15 23:00:31 -03:00
Joca f7b8055062
UI: Add navigation improvements with breadcrumbs, back buttons, scroll-to-top, and keyboard shortcuts
- Breadcrumb navigation on board and thread pages (Home › Boards › Board › Thread)
- Back buttons to return to parent page (with arrow icon and hover effects)
- Scroll-to-top button appears after scrolling 300px (smooth animation)
- Keyboard shortcuts: Ctrl+Enter submits forms from textarea, Esc clears focus and closes notifications
- Optimistic UI for like/dislike buttons (immediate visual feedback with checkmark)
- Updated thread handler to pass board data for breadcrumb context
2026-01-15 22:49:54 -03:00
Joca 69a62f0ad5
Handlers: Add password confirmation validation to signup
- Server-side validation for password confirmation field
- Display error message if passwords don't match
- Complements client-side validation added in previous commit
2026-01-15 22:39:58 -03:00
Joca ef06bf160a
All: Enhance session management and security features
Using proper auth + security on login.
2025-12-21 21:26:02 -03:00
Joca 7b934e00a6
Chat: Add Markdown support
Using RegEx because It's easier.
We will change to another solution if this proves to be a problem.
2025-09-05 22:09:17 -03:00
Joca e18d7ba193
Chat: Highlight a message if the current user is mentioned 2025-08-29 14:48:38 -03:00
Joca 3a82e2a0d1
All: Migrate boards from global to board specific
Massive commit. Rewrites some of the chat logic to work individually
rather than a global chat.
2025-08-22 00:07:13 -03:00
Joca d3db9723ec
chat: polish mention system
We now have a proper autocomplete. Next on the list is moving the chat page into it's proper place and add pop-ups for profiles.
2025-08-03 19:21:06 -03:00
Joca d2d64d69fc
handlers/app.go: Removed Strict IP and User-Agent Session Validation
So, turns out validating stuff with these parameters is not a good idea at all. FML honestly.
2025-06-29 21:24:28 -03:00
Joca 7b0528ef36
feat: Add file-based avatar system
- A new `files` table to store metadata about uploaded files, including original name and hash.
- The `users` table is updated to reference a `pfp_file_id` from the new `files` table, removing the insecure `pfp_url` field.
- A new `/file` endpoint and handler (`handlers/file.go`) are created to serve files securely based on their ID, preventing direct file system access.
- Profile editing (`handlers/profile_edit.go` and `templates/pages/profile_edit.html`) is updated to handle file uploads instead of URL inputs.
- The chat feature (`models/chat.go` and `templates/pages/chat.html`) is updated to work with the new file ID system, ensuring avatars are displayed correctly.
Should also fix #68.
2025-06-21 16:21:21 -03:00
Joca bdf81e7c68 Ask admin credentials on initialize instead of defining them on config.json 2025-06-15 02:48:43 +02:00
BodgeMaster 869d974f71 config: rename files to better hint at what they’re used for 2025-06-15 02:47:16 +02:00
Joca 3b56c7e831 Initial implementation of the chat feature. 2025-06-15 02:47:16 +02:00
Joca b1c3f80afb Implemented features for creating and deleting boards and threads, removed thread types, enhanced CSS for boards and comments 2025-06-15 02:44:03 +02:00
Joca 4eb97f27d8 Create admin user, admin can edit news blotter 2025-06-15 02:41:36 +02:00
Joca 6b6ca1d85d Fix cookie banner 2025-06-15 02:41:19 +02:00
Joca de1f442082 Refactor signup and login handlers, add auto table creation 2025-06-15 02:40:40 +02:00
Joca 484f435ff2 Fix up user register 2025-06-15 02:39:35 +02:00
Joca eee9540bdc Initial Commit 2025-06-15 02:37:02 +02:00