Replaces the demo login page with a dedicated login and registration component.
This allows users to create accounts and log in, enabling authentication features.
Simplify Login, remove registration for now
Adds a login page with username and password fields.
Includes input validation, loading state, error handling,
and a success message after successful login.
Registration has been temporarily disabled.
Key changes:
- Add notification store with path-based wildcard support (chat/*, chat/{pubkey}, *)
- Remove UnreadMessageData interface and processedMessageIds Set tracking
- Implement timestamp-based "seen at" logic with wildcard matching
- Add markAllChatsAsRead() for batch operations
- Integrate ChatNotificationConfig for module configuration
- Create useNotifications composable for easy notification access
Benefits:
- Simpler architecture (removed processedMessageIds complexity)
- Flexible wildcard-based "mark as read" operations
- Future-proof for Primal-style backend sync
- User-scoped storage via StorageService
- Clean separation of concerns
refactor: enhance chat service with activity tracking and sorting
- Updated the ChatService to track lastSent, lastReceived, and lastChecked timestamps for peers, improving message handling and user experience.
- Implemented sorting of peers by last activity to prioritize recent conversations.
- Adjusted message handling to update peer activity based on message direction.
- Ensured updated peer data is saved to storage after modifications.
These changes streamline chat interactions and enhance the overall functionality of the chat service.
refactor: improve ChatService and notification store initialization
- Updated ChatService to ensure the notification store is initialized only after user authentication, preventing potential errors.
- Introduced a new method to safely access the notification store, enhancing error handling.
- Enhanced peer activity tracking by calculating last activity based on actual message timestamps, improving sorting and user experience.
- Added debounced saving of notification state to storage, optimizing performance and reducing unnecessary writes.
- Improved logging for better debugging and visibility into notification handling processes.
These changes enhance the reliability and efficiency of the chat service and notification management.
refactor: clean up logging in ChatService and notification store
- Removed unnecessary console logs from ChatService to streamline the code and improve performance.
- Simplified the initialization process of the notification store by eliminating redundant logging statements.
- Enhanced readability and maintainability of the code by focusing on essential operations without excessive debug output.
These changes contribute to a cleaner codebase and improved performance in chat service operations.
FIX BUILD ERRORS
refactor: update chat module notification configuration
- Refactored the notification settings in the chat module to use a nested structure, enhancing clarity and organization.
- Introduced `wildcardSupport` to the notification configuration, allowing for more flexible notification handling.
- Maintained existing functionality while improving the overall configuration structure.
These changes contribute to a more maintainable and extensible chat module configuration.
refactor: optimize ChatComponent and ChatService for improved performance
- Removed unnecessary sorting of peers in ChatComponent, leveraging the existing order provided by the chat service.
- Updated the useFuzzySearch composable to directly utilize the sorted peers, enhancing search efficiency.
- Cleaned up logging in ChatService by removing redundant console statements, streamlining the codebase.
- Added critical checks to prevent the current user from being included in peer interactions, improving user experience and functionality.
These changes contribute to a more efficient and maintainable chat module.
refactor: simplify message publishing in ChatService
- Removed unnecessary variable assignment in the message publishing process, directly awaiting the relayHub.publishEvent call.
- This change streamlines the code and enhances readability without altering functionality.
These modifications contribute to a cleaner and more efficient chat service implementation.
- Updated the quantity assignment in the useMarket composable to use nullish coalescing (??) instead of logical OR (||). This change ensures that a quantity of 0 is preserved, preventing unintended defaults when productData.quantity is explicitly set to 0.
These changes improve the accuracy of product quantity handling in the market module.
- Added a key to the ProgressiveImage component to ensure proper reactivity when the image source changes.
- Implemented a watcher in the ProgressiveImage component to reset loading state on source changes, improving user experience during image transitions.
These changes enhance the reliability and responsiveness of image handling in the application.
- Removed unused `closeOnBackdropClick` option from `useImageLightbox` for cleaner code.
- Simplified the product assignment in `ProductDetailPage` by creating a mutable copy of product data, ensuring proper handling of images and categories.
These changes enhance the maintainability and clarity of the image handling components in the application.
- Deleted the ImageDisplay component to streamline image handling.
- Updated the base module to export only the ImageUpload component, simplifying the component structure.
These changes enhance the clarity and maintainability of the image handling components in the application.
- Added ImageLightbox component to provide a modal view for images with navigation and keyboard support.
- Implemented ImageViewer component to display images with features like thumbnails, cycling controls, and lightbox integration.
- Updated ProgressiveImage component for improved loading and error handling.
- Refactored image imports in ProductCard, ProductDetailPage, and CheckoutPage to align with new component structure.
These changes significantly enhance the user experience for viewing and interacting with product images across the application.
- ProductDetailPage is being used in lieu of a modal becaues Lightbox
image gallery (modal) being embedded in another modal was causing too
much buggy behavior
- Added ImageViewer component to manage and display product images with
features like lightbox, thumbnails, and image cycling controls.
- Replaced ProgressiveImageGallery with ImageViewer in
ProductDetailDialog and ProductDetailPage for improved user experience
and maintainability.
- Implemented useImageLightbox composable to handle lightbox
functionality, including keyboard navigation and swipe gestures.
- Updated routing to include a dedicated product detail page for better
navigation and user flow.
These changes significantly enhance the image viewing experience in the
product detail context, providing a more dynamic and user-friendly
interface.
- Introduced ProductDetailDialog component for displaying detailed product information, including images, price, and availability.
- Implemented image cycling functionality in ProductCard for better user experience when viewing multiple product images.
- Enhanced CreateProductDialog to support image uploads with improved validation and navigation protection during form editing.
- Added logic to manage uploaded images and ensure proper handling of existing product images.
- Updated MarketPage to integrate the new ProductDetailDialog, allowing users to view product details seamlessly.
These changes significantly improve the product management experience, enhancing both the display and interaction with product images.
- Added ImageUpload and ImageDisplay components for handling image uploads and displaying images, respectively.
- Introduced ImageUploadService to manage image uploads, including validation, processing, and deletion.
- Updated app configuration to include image upload settings and integrated the service into the dependency injection container.
- Enhanced the .env.example file to include image upload configuration options.
- Provided a comprehensive README for the new components, detailing usage and integration examples.
These changes significantly enhance the application's capability to manage image uploads, improving user experience and flexibility in handling images.
- Introduced Alert, AlertDescription, and AlertTitle components to enhance user notification capabilities.
- Implemented alertVariants for customizable alert styles based on different variants.
- Added TypeScript support for props in each component, ensuring type safety and better integration.
These changes provide a structured approach to displaying alerts, improving user experience and flexibility in notifications.
- Updated recent searches logic to directly manipulate the recentSearches value, improving clarity and reducing complexity.
- Changed the filtering mechanism to use a more straightforward approach, enhancing maintainability.
These changes streamline the recent searches functionality, contributing to a cleaner and more efficient MarketSearchBar component.
- Replaced dynamic imports of SearchSuggestions and useSearchKeyboardShortcuts with static imports to optimize loading times.
- Simplified recent searches handling by directly assigning values instead of using nested references.
- Updated keyboard shortcut handling to remove unnecessary checks, streamlining the functionality.
These changes improve the performance and clarity of the MarketSearchBar component, enhancing the overall user experience.
- Updated the ProgressiveImage component to display a dynamic error message based on the image availability, including a specific message for no-image scenarios.
- Modified ProductCard, ProductDetailDialog, and CheckoutPage components to utilize the enhanced ProgressiveImage, ensuring a consistent user experience when images are unavailable.
- Improved visual feedback by adding a placeholder for missing images across various components.
These changes enhance the user experience by providing clearer messaging and visual cues when images fail to load or are not available.
refactor: update background colors and gradients for theme-aware semantic styling consistency across components
- Changed background colors in ProgressiveImage, ProductCard, ProductDetailDialog, and CheckoutPage components to utilize theme-aware colors instead of fixed values.
- Enhanced gradient backgrounds to ensure better visual integration with the overall theme, improving the user interface and experience.
These updates promote a more cohesive design and improve maintainability by leveraging theme variables.
- Added a new ProgressiveImage component to handle image loading with a blur effect and loading indicators.
- Updated ProductCard and ProductDetailDialog components to utilize ProgressiveImage, improving image loading performance and user experience.
- Configured properties such as blur radius, transition duration, and loading indicators for better customization.
These changes enhance the visual presentation of images and optimize loading behavior across market components.
- Implemented lazy loading for product images in CartItem, CartSummary, ProductCard, ProductDetailDialog, CheckoutPage, and StallView components.
- This enhancement improves performance by deferring the loading of off-screen images, resulting in faster initial page load times and a smoother user experience.
These changes optimize image handling across the market module, contributing to better resource management and user interaction.
- Introduced an internal query state to improve UI responsiveness during search input.
- Implemented a debounced search function to optimize performance and reduce unnecessary emissions.
- Updated conditions for displaying keyboard hints and clear button based on the new internal query.
- Ensured both internal and actual search queries are cleared appropriately.
These changes enhance the user experience by providing immediate feedback while typing and optimizing search operations.
- Bypassed the naddr requirement for market configuration, allowing for more flexible market loading.
- Implemented conditional loading of the market based on the availability of naddr, defaulting to a general market load if not provided.
- Removed temporary debug methods for simulating loading and error states to clean up the codebase.
These changes streamline the market loading process and enhance the overall clarity of the MarketPage component.
- Updated the LoadingErrorState component to correctly reflect error states based on market readiness.
- Enhanced the isMarketReady computed property to account for loading and error conditions more accurately.
- Introduced temporary debug methods for simulating loading and error states, aiding in testing and development.
- Made debug methods globally accessible for easier testing of loading states.
These changes enhance the reliability of the loading/error handling in the MarketPage component and facilitate better debugging during development.
- Removed unnecessary imports and streamlined the LoadingErrorState component by eliminating redundant props.
- Improved keyboard handling in MarketSearchBar to support basic Escape key functionality and enhanced keyboard shortcuts.
- Updated MerchantStore and MarketPage components to utilize the revised LoadingErrorState and MarketSearchBar, ensuring consistent loading/error handling and search capabilities.
- Enhanced StallView to provide better category filtering and product search experience.
These changes improve code clarity and maintainability while enhancing user interaction across the market module.
## Type Consolidation
- Add StallApiResponse interface matching LNbits backend structure
- Update domain Stall interface with cleaner, app-friendly properties
- Create mapApiResponseToStall() mapper function for API-to-domain conversion
- Remove duplicate Stall type definition from nostrmarketAPI.ts
- Update CheckoutPage to use standardized shipping property
- Verify types against LNbits reference implementation
## UI Components
- Create reusable CartButton.vue component with proper separation of concerns
- Remove duplicate cart button code from MarketPage and StallView
- Add consistent cart functionality across all market pages
- Fix missing cart button in StallView
- Improve code maintainability with DRY principles
## Bug Fixes
- Fix ProductDetailDialog add-to-cart functionality by using correct cart system
- Resolve cart system mismatch between legacy addToCart and stall-based totalCartItems
- Update ProductCard to emit events properly instead of direct store call
- Ensure consistent event flow: ProductCard → ProductGrid → MarketPage → Store
## Technical Improvements
- Follow established Product type consolidation pattern for consistency
- Maintain type safety between API responses and domain models
- Enable easier API evolution without breaking domain logic
- Optimize bundle splitting with component extraction
- Introduced a new CartButton component to encapsulate cart summary functionality, improving code reusability and maintainability.
- Updated MarketPage.vue and StallView.vue to utilize the CartButton component, enhancing user navigation to the cart.
- Removed redundant cart summary code from both views, streamlining the component structure.
These changes provide a unified and consistent user experience for accessing the cart across different market views.
- Introduced a cart summary button in StallView.vue that displays the total number of items in the cart.
- Implemented a click handler to navigate users to the cart page, enhancing the shopping experience.
- Imported the ShoppingCart icon from lucide-vue-next for visual representation.
These changes provide users with quick access to their cart, improving overall usability and navigation within the market interface.
- Removed direct store dependency from ProductCard.vue, replacing it with event emission for adding products to the cart.
- Enhanced ProductGrid.vue to manage product detail dialog internally, improving user interaction and state handling.
- Streamlined MarketPage.vue by removing redundant product detail dialog logic, focusing on cleaner component structure.
- Updated event handling for adding products to the cart with quantity support, enhancing flexibility in product management.
These changes improve the modularity and maintainability of the market components, providing a better user experience when interacting with products.
- Added CategoryFilterBar.vue to manage category filtering with AND/OR toggle options and clear all functionality.
- Implemented ProductGrid.vue to display products with loading and empty states, improving user experience.
- Refactored MarketPage.vue to utilize the new components, streamlining the layout and enhancing responsiveness.
- Updated StallView.vue to incorporate ProductGrid for consistent product display across views.
These changes enhance the overall usability and visual appeal of the market components, providing users with a more intuitive filtering and browsing experience.
- Replace dual Product interfaces with unified domain model in types/market.ts
- Rename API response type to ProductApiResponse for clarity
- Add mapApiResponseToProduct() function for clean API-to-domain conversion
- Update MerchantStore.vue to use mapping function instead of manual property assignment
- Fix CreateProductDialog.vue to properly handle type conversions for API calls
- Resolve TypeScript readonly type conflicts using type assertions instead of array spreading
- Add missing reactive references (searchQuery) and remove unused imports
- Prevent Vue 3 recursion issues by maintaining original reactive object references
This eliminates confusion between API response structure and application domain model,
following single source of truth principle for better maintainability and type safety.
- Updated the product enrichment logic in MerchantStore.vue to ensure all necessary properties match the Product interface, improving data consistency.
- Added optional properties for active status, pending state, and configuration in the Product interface within market.ts, enhancing flexibility for merchant store management.
- Improved type assertions in MarketPage.vue and StallView.vue to ensure proper type handling for product data, enhancing type safety and clarity.
These changes improve the robustness and reliability of product data handling across the market components, enhancing the overall user experience.
- Updated the searchInputRef initialization to remove the explicit type declaration, simplifying the code.
- Enhanced input focus and blur handling by ensuring the existence of the $el property before accessing the input element, improving robustness.
- Streamlined the focus management logic in the handleClear and handleKeydown functions for better user experience.
These changes enhance the reliability and clarity of the MarketFuzzySearch component, improving overall usability.
- Added a computed property to dynamically filter products based on search results, enhancing the user experience by displaying relevant products when available.
- Updated the `useCategoryFilter` integration to utilize the new computed property, streamlining the filtering logic and improving overall performance.
These changes provide users with a more responsive and relevant product display in the MarketPage, improving the effectiveness of category filtering.
- Redesigned the Stall Info Card to improve responsiveness and aesthetics, incorporating a more compact layout and enhanced logo display.
- Updated the styling of stall statistics and category badges for better alignment with the design system, improving user interaction.
- Enhanced the overall structure and clarity of stall information, making it more visually engaging and user-friendly.
These changes provide a more cohesive and appealing interface in the StallView component, improving the overall user experience.
- Adjusted padding, margins, and font sizes throughout the StallView component to enhance mobile responsiveness and overall user experience.
- Updated the styling of various elements, including buttons, statistics, and category badges, to ensure better alignment with the design system and improved accessibility.
- Enhanced the layout of the stall information and search/filter bar for a more cohesive appearance across different screen sizes.
These changes provide a more visually appealing and user-friendly interface in the StallView component.
- Updated the keyboard shortcuts hint to display only on desktop devices, improving usability for users on larger screens.
- Introduced responsive breakpoints to manage the visibility of the enhanced placeholder, ensuring a better user experience across different device sizes.
These changes refine the search component by tailoring the interface to the user's device, enhancing accessibility and interaction.
- Updated the active filters summary section to focus on product count when filters are active, enhancing clarity for users.
- Simplified the layout by removing unnecessary elements, improving the overall user experience and accessibility.
These changes streamline the display of active filters, making it easier for users to understand the number of products available based on their selected categories.
- Optimized the Market Header and Fuzzy Search components for better mobile display, enhancing usability on smaller screens.
- Adjusted spacing and font sizes for various elements to ensure a cohesive look across devices.
- Improved the active filters summary and category filters for better accessibility and visual clarity.
These changes enhance the overall user experience by providing a more responsive and visually appealing interface in the MarketPage.
- Added focus and blur event handlers to manage input focus state.
- Updated suggestion display to show both search suggestions and recent searches in a unified dropdown.
- Improved styling for suggestion buttons to enhance user interaction.
- Ensured input field is focused after clearing search, improving usability.
These changes enhance the search experience by providing clearer suggestions and better input management.
- Adjusted the typo tolerance threshold in the fuzzy search options from 0.6 to 0.4, allowing for more flexible matching of product names and descriptions.
- This change enhances the search experience by accommodating a wider range of user input variations, improving product discoverability.
- Updated background and text colors in StallView to align with the new design system, enhancing overall aesthetics and readability.
- Adjusted styles for logo and product statistics to ensure better integration with the updated theme.
- Improved accessibility by refining text colors for better contrast and visibility.
These changes enhance the user experience by providing a more cohesive and visually appealing interface in the StallView component.
- Added support for AND/OR filtering modes in the `useCategoryFilter` composable, allowing users to filter products based on all or any selected categories.
- Introduced reactive state management for filter mode and updated the filtering logic to accommodate the new functionality.
- Enhanced the MarketPage UI with a toggle for selecting filter modes, improving user experience and accessibility.
- Updated ARIA attributes for better screen reader support in the filter mode selection.
These changes significantly enhance the category filtering capabilities, providing users with more control over product visibility.
Refactor CreateProductDialog and MarketPage for improved category handling
- Updated CreateProductDialog to utilize `model-value` and `@update:model-value` for the CategoryInput component, enhancing reactivity in category selection.
- Enhanced MarketPage filtering logic to support AND/OR modes, allowing for more flexible product filtering based on selected categories.
- Improved category normalization and matching logic to ensure accurate filtering results.
These changes streamline the category management and filtering processes, providing users with a more intuitive experience when creating and finding products.