Commit graph

24 commits

Author SHA1 Message Date
7829635de8 chore: remove nostrchat debug logs 2025-08-12 08:54:38 +02:00
4f2cf7885d feat: Add debug logging for message sorting in Nostr chat
- Enhance the computed property in ChatComponent to include detailed debug logging for message sorting by timestamp. This addition aids in development by providing insights into the message order and content, improving troubleshooting capabilities.
2025-08-10 17:59:59 +02:00
22b3c430fa feat: Sort Nostr chat messages by timestamp for chronological display
- Update the computed property in ChatComponent to sort messages by their creation timestamp, ensuring they are displayed in chronological order for better user experience.
2025-08-10 17:59:59 +02:00
de918419fa feat: Enhance Nostr chat debugging and unread message management
- Introduce debug functions in ChatComponent for resetting unread counts and displaying unread message details for specific peers, improving troubleshooting capabilities.
- Update unread count management in useNostrChat to ensure accurate tracking and storage of unread messages, including recalculating counts based on message timestamps.
- Implement logic to prevent duplicate message processing and enhance overall message handling efficiency.
2025-08-10 17:59:59 +02:00
390f77539e feat: Enhance Nostr chat functionality and debugging
- Improve console logging in ChatComponent and useNostrChat for better tracking of message sending, user authentication, and key management.
- Update user authentication checks to ensure valid Nostr keypairs are available before sending messages.
- Refactor message handling logic to streamline subscription and processing of incoming messages, enhancing overall chat experience.
2025-08-10 17:59:59 +02:00
8e94216c02 feat: Enhance debugging and authentication in Nostr chat
- Add detailed console logging in ChatComponent to track message sending attempts, selected peers, and authentication status.
- Integrate authentication checks in useNostrChat, ensuring users have valid Nostr keypairs before sending messages.
- Implement logic to generate and store new Nostr keys if none are found, improving user experience and key management.
2025-08-10 17:59:59 +02:00
147cf31f0f style: Update Badge colors in Navbar and ChatComponent for better visibility
- Change Badge background color from red to blue in both Navbar and ChatComponent to enhance visual consistency and improve user experience.
- Ensure that unread message indicators are more visually appealing and aligned with the overall design theme.
2025-08-10 10:50:14 +02:00
2dec184c42 refactor: Replace Nostr chat preloader with a singleton pattern for improved state management
- Remove the useNostrChatPreloader composable and integrate its functionality into the useNostrChat composable, streamlining chat data handling.
- Update App.vue and ChatComponent to utilize the new singleton instance for managing chat connections and peer subscriptions.
- Enhance Navbar and ChatComponent to reflect changes in unread message tracking and peer management, improving user experience.
- Ensure proper error handling and logging during chat connection and peer loading processes.
2025-08-10 10:50:14 +02:00
855a003962 feat: Integrate Nostr chat preloader for improved chat data handling
- Introduce a new composable, useNostrChatPreloader, to manage chat data preloading, including peer loading and subscription for notifications.
- Update ChatComponent to utilize the preloader, ensuring chat data is ready before connecting.
- Enhance Navbar to display unread message counts with notification badges for better user experience.
- Refactor App.vue to trigger both market and chat preloading upon successful login, streamlining the user experience.
2025-08-10 10:50:14 +02:00
b0101915c7 feat: Implement sorting of peers by latest message timestamp and unread status in Nostr chat
- Introduce a computed property to sort peers based on the latest message timestamp and unread message count, enhancing the user experience by prioritizing relevant conversations.
- Add methods to track and retrieve the latest message timestamp for each peer, ensuring accurate sorting.
- Update the ChatComponent to utilize the new sorting logic, improving the display of peers in the chat interface.

refactor: Reorganize fuzzy search and mobile detection logic in ChatComponent

- Move fuzzy search implementation and mobile detection methods to improve code clarity and maintainability.
- Ensure consistent functionality for searching peers by username or pubkey with typo tolerance.
- Maintain mobile navigation logic for better user experience on smaller devices.
2025-08-10 10:50:14 +02:00
91e9756bf0 fix: build errors 2025-08-10 10:50:14 +02:00
a0ae70670d feat: Enhance peer subscription and logging in Nostr chat
- Improve the subscription process for peers by adding detailed logging for subscription attempts and results.
- Update the ChatComponent to provide a summary of successful and failed subscriptions.
- Enhance the useNostrChat composable with additional logging for subscription filters and incoming message handling.
- Ensure better visibility into connection state changes and subscription readiness.
2025-08-10 10:50:14 +02:00
d48cbbeec0 feat: Add peer notification subscriptions in Nostr chat
- Implement a new method to subscribe to peers for notifications without loading full message history.
- Enhance the ChatComponent to automatically subscribe to peers when the connection is established.
- Update the useNostrChat composable to include the new subscription method and handle notification events.
- Improve logging for subscription status and errors to aid in debugging.
2025-08-10 10:50:14 +02:00
5fa3fcf60f feat: Add unread message notifications and tracking in Nostr chat
- Implement unread message indicators in the ChatComponent for both total unread messages and per-peer unread counts.
- Enhance the useNostrChat composable to manage unread message data, including saving and loading unread counts from localStorage.
- Introduce methods to mark messages as read and update unread counts dynamically as new messages are received.
- Refactor the message handling logic to ensure accurate tracking of unread messages based on the last read timestamp.
2025-08-10 10:50:14 +02:00
fd795df8ac refactor: Enhance layout structure in ChatComponent for improved responsiveness
- Update the layout of the peer list and scrolling area to utilize flex properties, ensuring better responsiveness and clarity.
- Adjust the structure of the ChatComponent to maintain consistent spacing and alignment across different screen sizes.
2025-08-10 10:50:14 +02:00
11fb45e527 feat: Add fuzzy search functionality to peer list in ChatComponent
- Implement a search input for filtering peers by name or pubkey, enhancing user experience.
- Display search results count and a message when no peers match the search query.
- Update peer list rendering to utilize filtered results, improving performance and usability.
- Refactor layout for better responsiveness and clarity in the chat interface.
2025-08-10 10:50:14 +02:00
37a539bc2d Fix Build Errors (Clean up ChatComponent and useNostrChat)
- Remove unused ChatMessage interface from ChatComponent to streamline
the code.
- Update getPeerAvatar function parameter for clarity by renaming it to
_peer.
- Remove unnecessary useNostrStore import in useNostrChat, simplifying
the composable's structure.
2025-08-10 10:50:14 +02:00
55e051146e feat: Implement message addition callback and enhance scrolling behavior
- Introduce a callback for when new messages are added, allowing for automatic scrolling to the bottom of the chat when relevant peers are selected.
- Update the ChatComponent to reference the scrolling area correctly and improve the logic for scrolling to the latest messages.
- Enhance console logging for better debugging and tracking of message flow and scrolling actions.
2025-08-10 10:50:14 +02:00
7bef56f630 refactor: Update chat component for improved scrolling behavior
- Change the reference for the scrolling target to a hidden element at the bottom of the chat, enhancing the user experience during message loading.
- Adjust scrolling logic to automatically scroll to the bottom when a peer is selected, ensuring users see the latest messages immediately.
2025-08-10 10:50:14 +02:00
dd7d13f41b refactor: Improve chat component layout and message handling
- Ensure the chat header is always present to maintain layout consistency, even when no peer is selected.
- Update message display logic to only scroll to the bottom when new messages arrive, enhancing user experience.
- Refactor message input and display sections for better responsiveness and usability across devices.
2025-08-10 10:50:14 +02:00
c30e4ba6c5 feat: Enhance Nostr chat functionality with improved authentication and error handling
- Integrate authentication token retrieval for loading peers and current user data.
- Update API endpoints to use a configurable base URL for better flexibility.
- Implement enhanced error handling for API responses, including JSON parsing and logging.
- Refactor relay connection logic to utilize a SimplePool for managing multiple relays efficiently.
- Improve user feedback with console logs for connection status and error details.
2025-08-10 10:50:14 +02:00
3bd87ee712 fix: Refine mobile chat layout and peer selection logic
- Adjust mobile chat component to ensure proper display of peer list and chat view based on selection.
- Enhance avatar and username rendering for selected peers, ensuring fallback options are in place.
- Improve responsiveness and usability of the chat interface, particularly for mobile users.
- Update message display logic to maintain consistency across different screen sizes.

refactor: Update desktop chat layout for improved structure

- Change the layout of the desktop chat component to use a full-height column flexbox, enhancing the overall structure and responsiveness.
- Ensure better alignment and spacing within the chat interface for a more organized appearance.
2025-08-10 10:50:14 +02:00
87663d1d87 feat: Enhance mobile chat experience with responsive design and navigation
- Implement mobile-first design for the chat interface, optimizing touch interactions and navigation.
- Introduce a peer list view that displays only peers until a selection is made, followed by a full-width chat view.
- Add a back button for easy navigation and ensure touch-friendly elements for better usability.
- Optimize message bubbles and avatars for mobile readability and visibility.
- Update documentation to reflect new mobile-responsive features and navigation improvements.
2025-08-10 10:50:14 +02:00
0b62418310 feat: Add Nostr chat integration for LNBits users
- Introduce a new chat system that allows LNBits users to communicate via Nostr relays.
- Implement ChatComponent for real-time messaging, peer selection, and message display.
- Create useNostrChat composable to manage Nostr relay connections, message encryption, and user authentication.
- Develop ChatPage to serve as the main interface for the chat feature.
- Add API endpoints for retrieving current user and public keys for peer messaging.
- Ensure secure communication with encryption and admin-only access to private keys.
2025-08-10 10:50:14 +02:00