Commit graph

267 commits

Author SHA1 Message Date
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
59e0496ad9 feat: Add debug logging for LNBits API and configuration
- Introduce console logging for LNBits API requests, providing visibility into endpoint calls and full URLs.
- Add debug logging for configuration loading, displaying key configuration values while masking sensitive information.
- Enhance overall debugging capabilities to facilitate easier troubleshooting and monitoring of API interactions.
2025-08-10 17:59:59 +02:00
7d7bee8e77 feat: Integrate Relay Hub for centralized Nostr connection management
- Introduce a new composable, useRelayHub, to manage all Nostr WebSocket connections, enhancing connection stability and performance.
- Update existing components and composables to utilize the Relay Hub for connecting, publishing events, and subscribing to updates, streamlining the overall architecture.
- Add a RelayHubStatus component to display connection status and health metrics, improving user feedback on the connection state.
- Implement a RelayHubDemo page to showcase the functionality of the Relay Hub, including connection tests and subscription management.
- Ensure proper error handling and logging throughout the integration process to facilitate debugging and user experience.
2025-08-10 17:59:59 +02:00
df7e461c91 feat: Format event price and wallet balance in PurchaseTicketDialog and events page
- Implemented formatting functions for event ticket prices and wallet balances to enhance readability and user experience.
- Updated PurchaseTicketDialog.vue and events.vue to utilize the new formatting functions, ensuring consistent display of financial information.
2025-08-10 17:56:20 +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
9b280be1a1 refactor: Update Navbar to remove chat link and simplify navigation
- Remove the chat link from the Navbar, filtering out the '/chat' route from the navigation items.
- Simplify the rendering of navigation items by displaying only the item names without additional chat-related elements, enhancing clarity and user experience.
2025-08-10 10:50:14 +02:00
2d5c395d6c feat: Add mobile chat button to Navbar for authenticated users
- Introduce a mobile chat button in the Navbar that is only visible to authenticated users, enhancing accessibility to chat features on mobile devices.
- Include a notification badge to display the count of unread messages, improving user engagement and awareness of new messages.
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
93b0e28e34 feat: Enhance unread message tracking in Nostr chat
- Introduce a Set to track processed message IDs, preventing duplicate counting of unread messages.
- Update localStorage handling to serialize and deserialize processed message IDs correctly.
- Add methods to clear processed message IDs and debug unread data for specific peers, improving visibility and control over unread message state.
- Enhance logging for unread message processing to aid in debugging and understanding message flow.
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
aa3509d807 feat: Improve Nostr chat encryption with enhanced key validation and error handling
- Add validation for the hex format of private and public keys before encryption, ensuring they contain only valid characters.
- Implement error handling during the encryption process to log failures and provide clearer error messages.
- Refactor the encryption logic to improve reliability and security in the message encryption workflow.
2025-08-10 10:50:14 +02:00
dc053ad1be feat: Enhance Nostr chat encryption with key validation and logging
- Implement validation for private and public keys before encryption, ensuring they are present and in the correct hex format.
- Add detailed console logging for key lengths and encryption success, improving debugging and transparency in the message encryption process.
- Refactor the encryption call to use validated keys, enhancing security and reliability.
2025-08-10 10:50:14 +02:00
7241789c9e refactor: Update FuzzySearch component and composable for improved class handling and code clarity
- Modify the class prop in FuzzySearch.vue to accept both string and array types for greater flexibility.
- Adjust the template to correctly reference props.class for consistent styling.
- Remove unused variables in FuzzySearchDemo.vue to streamline the code.
- Update the updateData function in useFuzzySearch.ts for better parameter clarity.
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
74ae2538cb feat: implement vue-use integration of Fuse.js for fuzzy search
- Introduce a new FuzzySearch component for Vue 3, leveraging Fuse.js
for intelligent search capabilities.
- Implement a useFuzzySearch composable for flexible search
functionality, allowing configuration of search options.
- Create demo and README files to showcase usage and features of the
fuzzy search implementation.
- Update package.json and package-lock.json to include
@vueuse/integrations version 13.6.0 for enhanced performance.

- Introduce async-validator version 4.2.5 to package.json and
package-lock.json for enhanced validation capabilities.
- Update tmp package from version 0.2.3 to 0.2.4 in package-lock.json to
ensure compatibility and security improvements.
2025-08-10 10:50:14 +02:00
3d1bc94183 fix: Update private key field in chat integration documentation
- Change the private key field name from "prvkey" to "prvkey_hex" in the CHAT_INTEGRATION.md file for clarity and consistency with expected data formats.

feat: Add Fuzzy Search Component and Composable

- Introduce a new FuzzySearch component for Vue 3, leveraging Fuse.js for intelligent search capabilities.
- Implement a useFuzzySearch composable for flexible search functionality, allowing configuration of search options.
- Create demo and README files to showcase usage and features of the fuzzy search implementation.
- Update package.json and package-lock.json to include @vueuse/integrations version 13.6.0 for enhanced performance.
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
0e40b62466 feat: Prevent duplicate message processing in Nostr chat
- Add logic to track processed message IDs, ensuring that messages are not processed multiple times, which enhances the reliability of message handling in the chat component.
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
ce81b9d2bf feat: Enhance Nostr chat functionality with historical message loading
- Implement a new function to load historical messages for peers before subscribing to new messages, improving user experience by providing context.
- Add detailed console logging for both historical and live message events to aid in debugging and understanding message flow.
- Ensure consistent handling of conversation keys for both sent and received messages, enhancing message management.
2025-08-10 10:50:14 +02:00
55958a0822 style: Update ChatPage layout for improved height responsiveness
- Adjust the height of the chat container to use dynamic calculations based on viewport height, enhancing the layout for various screen sizes.
- Ensure the chat interface maintains a consistent appearance across different devices, improving overall user experience.
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
d5e6b54c78 fix: Require VITE_NOSTR_RELAYS for chat functionality
- Update getRelays function to throw an error if VITE_NOSTR_RELAYS is not configured, ensuring proper relay setup for chat.
- Remove fallback relays to enforce the use of configured relays only, improving reliability in chat connections.
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
37642ca48c feat: Integrate chat feature into main navigation
- Add a "Chat" link to the main navigation for both desktop and mobile views.
- Include a message icon for visual identification and support for multiple languages (English, Spanish, French).
- Update documentation to reflect navigation integration and usage instructions for the chat feature.
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
f4c3f3a0a3 update .env.example 2025-08-10 10:49:49 +02:00
c2f11f3d96 chore: update LNBits API configuration in environment and documentation
- Added VITE_LNBITS_API_URL to .env.example for LNBits API integration.
- Updated AUTHENTICATION.md to reflect changes in LNBits base URL configuration.
- Refactored ProfileDialog.vue and config files to use VITE_LNBITS_BASE_URL instead of VITE_API_BASE_URL for API calls.
2025-08-10 10:46:49 +02:00
7bee629e6b chore: update title translation fr,es 2025-08-07 06:18:03 +02:00
7bf05bc5ec refactor: Enhance stall and product loading logic in useMarket composable
- Update the loadStalls and loadProducts functions to filter events based on the active market's merchants instead of fetching from all authors.
- Improve logging to provide clearer insights into the loading process and the merchants involved.
- Add checks to handle cases where no active market or merchants are found, preventing unnecessary API calls.
2025-08-05 01:00:06 +02:00
ca3930296b refactor: Update event fetching logic in useMarket composable
- Modify the event fetching process to retrieve all stalls and products from all authors instead of filtering by market and stall pubkeys directly.
- Enhance logging to reflect the broader scope of data being loaded, improving clarity in the console output.
- Adjust comments to clarify the application logic for filtering events based on market and stall membership.
2025-08-05 00:57:31 +02:00
02371fe05d feat: Implement pending product processing in useMarket composable
- Introduce a queue for products that arrive before their corresponding stalls are loaded.
- Add a new function to process pending products and match them with available stalls.
- Enhance event handling to ensure pending products are processed when stalls are added, improving data integrity and user experience.
2025-08-05 00:37:14 +02:00
b453637867 feat: Add wallet opening functionality in ProfileDialog component
- Introduce a new button to open the user's wallet in a new tab.
- Implement error handling for cases where the user ID is not available.
- Retrieve the API base URL from environment variables for constructing the wallet URL.
2025-08-05 00:20:03 +02:00
7f05374dd5 refactor: Update fetchEvents function to use public endpoint
- Change fetchEvents to access the new public endpoint for retrieving events without authentication.
- Remove the allWallets parameter and the API key from the request headers for simplified access.
2025-08-05 00:06:29 +02:00
e56dcb9e60 fix: Format price display in ProductCard component
- Update the price formatting in ProductCard.vue to use `toLocaleString` to add thousand mark separators.
2025-08-04 09:59:35 +02:00
c91e35ac50 refactor: Update event handling in useMarket to use stall IDs from product data
- Modify product and stall event processing to find stalls using stall IDs instead of pubkeys, improving data accuracy.
- Enhance logging for better visibility into event processing and stall matching, including detailed warnings when stalls are not found.
2025-08-04 09:54:45 +02:00
d38978f446 feat: Prevent duplicate event processing in useMarket composable
- Introduce a Set to track processed event IDs, ensuring that each event is handled only once.
- Update event handling logic to skip already processed events, improving efficiency and data integrity.
2025-08-04 08:49:28 +02:00
f3c66915a1 update market name and description 2025-08-03 11:34:36 +02:00
b9ae4a7309 refactor: Simplify loading state check in Market.vue
- Update the loading state check in Market.vue to directly reference marketStore.isLoading, improving code clarity and reducing unnecessary null checks.
2025-08-03 11:20:58 +02:00
35d2eba4ac Squash merge market-preload into market 2025-08-03 11:20:58 +02:00
8643eecfe7 refactor: Simplify useMarket composable by removing unused client references and improving parameter naming
- Eliminate unnecessary Nostr client retrieval in publishProduct and publishStall functions.
- Update parameter names in event processing functions for clarity, using underscores for unused parameters.
- Clean up imports in useMarket.ts to streamline the codebase.
2025-08-03 11:20:58 +02:00