Commit Graph
26 Commits
Author SHA1 Message Date
retoor 772d2ec2f4 fix: remove redundant encoding check from push notification body validation 2025-06-06 10:09:37 +00:00
retoor 251d05afc7 feat: add push notification service with webpush encryption and registration model 2025-06-06 09:25:09 +00:00
retoor ab690d7c4f fix: ensure message finalization waits for pending network operations before updating UI state 2025-06-06 09:20:17 +00:00
retoor a5b6328e63 feat: add CSS styles for spoiler message reveal on hover with fade-in animation 2025-06-05 23:32:07 +00:00
retoor 61cf025c8b fix: refactor chat input component to fix auto-complete desync and remove stale state tracking
Remove unused `previousValue`, `lastChange`, and `changed` properties from ChatInputComponent constructor that were causing state desynchronization. Refactor `resolveAutoComplete` method to return null on multiple matches instead of silently picking the last one, and add `expiryTimer` property for future timeout management. Clean up formatting inconsistencies across the component.
2025-06-01 20:07:51 +00:00
retoor 9728e3d05a fix: strip only width and height params from image URL on zoom instead of all query params 2025-06-01 10:05:35 +00:00
retoor a7d5cafeb7 feat: migrate synchronous database calls to async via run_in_executor in BaseMapper
Add asyncio import and loop property to BaseMapper, introduce run_in_executor helper method, and convert all blocking database operations (find_one, exists, count, upsert, find) to async wrappers that offload work to the default executor thread pool
2025-05-31 22:28:34 +00:00
retoor 2b6f8b9eaa feat: add URL embedding with metadata extraction and responsive CSS styling
Implement embed_url function that fetches remote pages, extracts Open Graph and Twitter Card metadata (title, description, image, video, site name), and renders embedded preview cards for links in chat messages. Add LRU-cached HTTP fetching via requests, parse head meta tags with BeautifulSoup, and append embed HTML after anchor elements. Include responsive CSS for embed containers with max-height 400px media, rounded top corners, and styled text elements for site name, page title, description, and link.
2025-05-30 17:53:22 +00:00
retoor bf75075bc1 fix: restructure layout to CSS grid and update viewport meta for mobile responsiveness
- Changed body layout from flexbox to CSS grid with explicit grid-template-areas for header, sidebar, and chat-area
- Added `height: 100%` to html element and changed body height from `100vh` to `100%` to prevent mobile browser chrome issues
- Updated viewport meta tag with `interactive-widget=resizes-content` to handle virtual keyboard resizing on mobile
- Moved main element after sidebar in DOM order and assigned grid-area to main and header
- Added `.chat-messages` flex container and fixed indentation inconsistencies across CSS selectors
- Changed umami analytics script from `defer` to `async defer` for non-blocking loading
2025-05-26 22:27:33 +00:00
retoor 6863276a64 fix: inline replaceMentionsWithAuthors call in updateMessageText to prevent missing letter bug 2025-05-26 22:25:56 +00:00
retoor 3c75e77a43 fix: prevent duplicate message sending on live typing submit
The fix addresses a race condition where pressing Enter to send a message while live typing was active would trigger both the submit handler and the live typing update, resulting in the same message being sent twice. The solution reorders the cleanup sequence in the submit handler to clear the input value before calling updateMessage, and conditionally assigns the messageUid only when live typing is enabled in the sendMessage callback.
2025-05-25 00:29:04 +00:00
retoor 6aa91eaf4e fix: replace last-child selector with :not(:has(+ .message)) for accurate last message time display 2025-05-24 16:46:43 +00:00
retoor 529b3f2173 fix: ensure datetime and reply visibility for long date gaps and force last message time opacity to 1
Add `.message:has(+ .message.long-time)` selector to show time display when a message is followed by one with a date gap exceeding 20 minutes. Set `.time` opacity to 1 for both this case and the last message to override any inherited lower opacity. In the JavaScript, track `previousDate` alongside `previousUser` and add/remove `long-time` class based on a 20-minute threshold between consecutive messages' `created_at` timestamps.
2025-05-23 23:48:07 +00:00
retoor b98f7741ad fix: correct string slicing bug in youtube timestamp parsing for start time
The bug caused incorrect extraction of the numeric value from timestamp strings ending with 's' (e.g., "30s"). Previously, the code sliced `start_time[:-1]` (the list) instead of `t[:-1]` (the individual string element), resulting in the entire list being sliced rather than removing the trailing 's' character from each timestamp. This fix ensures proper parsing of YouTube embed start times by applying the slice operation to the correct variable.
2025-05-23 16:13:50 +00:00
retoor 94ce590957 feat: hide avatar via max-height and fade time on non-hover messages
- Replace avatar opacity-only hiding with max-height:0 and overflow:hidden for collapsed state
- Remove .time from the display:none rule shared with .author
- Add CSS rule to fade .time to opacity:0 when message row is not hovered, focused, or active
- Restore max-height:unset on .avatar when message is hovered to ensure smooth reveal
2025-05-21 21:36:25 +00:00
retoor 37a011d2f9 fix: replace fragile YouTube URL parsing with urlparse and add missing file check in attachment view
- Refactor embed_youtube to use urlparse and parse_qs for robust YouTube link detection
  across multiple hostnames (youtu.be, youtube.com, youtube-nocookie.com) and path variants
- Add missing file existence check in ChannelAttachmentView to return 404 when attachment
  file is not found on disk
- Improve image saving in attachment view with quality=100, optimize=True, save_all=True
- Set Content-Type header from original format in attachment download response
2025-05-20 20:02:16 +00:00
retoor 1a1f3d5fac feat: add image conversion and resizing via query params in channel attachment view
Add Pillow and pillow-heif dependencies to pyproject.toml, implement image format conversion and dimension resizing in ChannelAttachmentView.get() using query parameters 'format', 'width', and 'height', and update markdown rendering to support strikethrough, spoiler, and URL plugins. Also fix uvloop import to gracefully fall back on Windows, clean up unused imports in sssh.py, and change upload markdown syntax from image to link format in web template.
2025-05-13 16:19:57 +00:00
retoor 6fc5706026 revert: restore unminified source formatting across snek package files
Revert commit 17c6124a57 which minified all Python source files, restoring original multi-line formatting, expanded variable names, and proper indentation in __main__.py, app.py, docs/app.py, dump.py, form/login.py, and form/register.py
2025-05-09 12:57:22 +00:00
retoor 256f741633 feat: add clipboard paste and drag-drop file upload support to web interface
Implement file upload via clipboard paste events in the web textarea input, reading non-text clipboard items as blobs and feeding them into the existing upload-button component. Also add drag-and-drop event listeners to handle dropped files, enabling direct file uploads without manual file selection.
2025-05-06 21:27:25 +00:00
retoor d21406bdc5 fix: replace web manifest icon references with correctly sized 192 and 512 png assets to resolve firefox android instability 2025-04-07 11:24:13 +00:00
retoor f1f118963f feat: add Promise.withResolvers polyfill and load it in app and base templates
Create a new polyfill script at src/snek/static/polyfills/Promise.withResolvers.js that provides a fallback implementation of Promise.withResolvers for environments lacking native support. Include the polyfill as a module script in both app.html and base.html templates, ensuring it is loaded before app.js to guarantee availability at runtime.
2025-03-17 21:09:55 +00:00
retoor c3a8b5da08 fix: extract EventHandler and Socket classes into separate modules for socket reconnection fix 2025-03-16 05:02:03 +00:00
retoor 66bae15d72 feat: convert frontend classes to ES modules and add type="module" to script tags
Convert all JavaScript classes in app.js and schedule.js to ES module exports, add import statements in inline scripts, and update all script tags across templates to use type="module" attribute. This enables proper module scoping and dependency management for the frontend codebase.
2025-03-16 01:40:06 +00:00
retoor 66b912ac39 feat: add shared input focus styles and import them across all pages
Create new shared.css with consistent input/textarea focus outline and placeholder transition effects. Import shared.css into both base.css and style.css to apply the unified input styling across all pages, replacing previously scattered per-page implementations.
2025-03-15 15:27:38 +00:00
retoor 2f1be0eb11 feat: preload form structure JSON into login and register templates and autofocus first input
Add `preloaded-structure` attribute to `<generic-form>` elements in both `login.html` and `register.html`, passing the serialized form JSON from the view. In `generic-form.js`, normalize CSS indentation from 10-space to 2-space tabs. This enables server-side form definition to be rendered immediately on page load without an initial JSON fetch, and the autofocus behavior targets the first input element in the preloaded structure.
2025-03-09 18:37:34 +00:00
retoor c7a062185c feat: add back-form layout and roundness to images, improve login/register templates
- Create back-form.css with grid layout for back button and form overlay
- Add border-radius: 20px to images, videos, iframes, and divs in message-content
- Add focus outline and placeholder transition to GenericField inputs
- Dispatch change event on Enter key in GenericField
- Add meta tags, title blocks, and head blocks to base.html, login.html, and register.html
- Wrap login/register forms in back-form div for consistent layout
2025-03-08 18:53:02 +00:00