Commit graph

19 commits

Author SHA1 Message Date
06bcc4b91e refactor: Remove console logging for error handling in useMarket and useMarketPreloader
- Eliminate console.log and console.warn statements to enhance code clarity and maintainability.
- Replace error logging with comments to silently handle errors during market, stall, and product loading processes.
- Streamline the preloading process by removing unnecessary logging, improving overall code readability.
2025-08-12 08:54:38 +02:00
4f97ca7b6b refactor: Remove console logging and improve code clarity in useMarket composable
- Replace console.log statements with comments to enhance code readability and maintainability.
- Streamline the loading and processing of market, stall, and product events by removing unnecessary logging.
- Ensure that the code remains functional while improving overall clarity for future development.
2025-08-12 08:54:38 +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
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
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
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
1fcc3706be refactor: Enhance useMarket composable to group and process recent stall and product events
- Implement grouping of stall and product events by their unique IDs to retain only the most recent versions.
- Update event processing logic to sort events by creation timestamp, ensuring the latest data is used for stalls and products.
- Improve logging for better visibility into the processing of events and the creation of market entities.
2025-08-03 11:20:58 +02:00
670270ca91 fix: Update useMarket composable to use unique IDs for stalls and products
- Modify the useMarket composable to utilize unique IDs from parsed stall and product data instead of Nostr event IDs for better data integrity.
- Implement logging for unsigned event creation, indicating that signing with the user's private key is required for publishing products and stalls.
2025-08-03 11:20:58 +02:00
1ed8759162 feat: Add MarketTest page and enhance error handling in market components
- Introduce MarketTest.vue for testing market loading and state management.
- Update error handling in Market.vue and useMarket composable to utilize marketStore for consistent error reporting.
- Enhance logging throughout market loading processes for better debugging and user feedback.
2025-08-03 11:20:58 +02:00
1a3510becb fix: Improve loading state management in useMarket and Market.vue
- Update useMarket composable to set loading state in marketStore during market loading.
- Refine loading condition in Market.vue to only check marketStore.isLoading, enhancing clarity and performance.
2025-08-03 11:20:58 +02:00
e66d976ee8 chore: Update logging and configuration in market-related files
- Enhance logging in useMarket and NostrClient to provide better insights during event fetching and market loading.
- Add local relay support in configuration for improved development and testing.
- Adjust delay in event fetching to ensure more reliable data collection from relays.
2025-08-03 11:20:58 +02:00
54044f165c feat: Enhance useMarket composable with improved error handling and sample data loading
- Add detailed logging for market loading, configuration, stalls, and products to aid in debugging.
- Implement graceful error handling by creating default markets and stalls when data loading fails.
- Introduce a method to add sample products for testing when no products are found, improving development experience.
- Update market data fetching logic to ensure consistent handling of identifiers and event processing.
2025-08-03 11:20:58 +02:00
e6607509c5 refactor: Update useMarket composable to utilize fetchEvents method and improve subscription handling
- Replace direct calls to fetchNotes with the new fetchEvents method in useMarket.ts for better event retrieval.
- Simplify event fetching logic by removing unnecessary filters and enhancing clarity.
- Implement individual relay subscriptions for market updates, allowing for more efficient event handling and cleanup.
2025-08-03 11:20:58 +02:00
4d3d69f527 feat: Implement market functionality with ProductCard, useMarket composable, and market store
- Add ProductCard.vue component for displaying product details, including image, name, description, price, and stock status.
- Create useMarket.ts composable to manage market loading, data fetching, and real-time updates from Nostr.
- Introduce market.ts store to handle market, stall, product, and order states, along with filtering and sorting capabilities.
- Develop Market.vue page to present market content, including loading states, error handling, and product grid.
- Update router to include a new market route for user navigation.
2025-08-03 11:20:58 +02:00