Commit graph

244 commits

Author SHA1 Message Date
53c14044ef Filters accounts by user permissions
Ensures that the account selector only displays accounts
that the user has permissions for.

This change modifies the `ExpensesAPI` to include a
`filterByUser` parameter when fetching accounts, which is
then passed to the backend to retrieve only authorized
accounts. A log statement was added to confirm proper
filtering.
2025-11-07 22:18:56 +01:00
0f795f9d18 Improves Add Expense dialog layout
Enhances the Add Expense dialog's layout for better usability.

Reduces the maximum height of the dialog, adjusts padding and margins,
and ensures scrollable content has a minimum height for a more consistent
user experience.
2025-11-07 22:06:58 +01:00
358c3056c7 Wraps expense form in Dialog component
Refactors the AddExpense component to utilize the Dialog component
from the UI library. This provides a more structured and accessible
modal for adding expenses, and includes a header with title and description.
It also improves the layout using flexbox for better content management
and scrollability.
2025-11-07 22:05:27 +01:00
f6ecbc8faf Fetches and sets default currency for expenses
Ensures the expense form defaults to the LNbits instance's configured currency.

This change retrieves the default currency from the LNbits API and sets it as the initial value in the expense form. If no default is configured, it falls back to the first available currency or EUR.
2025-11-07 21:51:10 +01:00
8dad92f0e5 Enables currency selection for expenses
Allows users to select a currency when adding an expense.

Fetches available currencies from the backend and displays them
in a dropdown menu, defaulting to EUR if the fetch fails.
The expense submission process now includes the selected currency.
2025-11-07 21:39:16 +01:00
9c8b696f06 Updates expense input to EUR
Updates the expense input fields to accept and display amounts in Euros instead of satoshis.

This change ensures that the amount field is configured to handle decimal values with a minimum value of €0.01.
2025-11-07 21:36:22 +01:00
6ecaafb633 Adds permission management components
Implements components for granting and revoking account permissions.

This introduces a `GrantPermissionDialog` for assigning access rights to users,
and a `PermissionManager` component to list and revoke existing permissions.
The UI provides options to view permissions grouped by user or by account.
2025-11-07 17:51:34 +01:00
e745caffaa Updates "account from equity" label
Changes the "Account from equity" label and description
to "Convert to equity contribution" for clarity.

The updated description explains that instead of cash
reimbursement, the expense will increase the user's
equity stake.
2025-11-07 16:36:56 +01:00
00a99995c9 Enhances expense submission with user wallet
Updates expense submission to require a user wallet.

Retrieves wallet information from the authentication context
and includes it in the expense submission request to the backend.
This ensures that expenses are correctly associated with the user's
wallet, enabling accurate tracking and management of expenses.
Also adds error handling and user feedback.
2025-11-07 16:29:50 +01:00
9ed674d0f3 Adds expense tracking module
Adds a new module for tracking user expenses.

The module includes:
- Configuration settings for the LNbits API endpoint and timeouts.
- An ExpensesAPI service for fetching accounts and submitting expense entries.
- A UI component for adding expenses, including account selection and form input.
- Dependency injection for the ExpensesAPI service.

This allows users to submit expense entries with account selection and reference data, which will be linked to their wallet.
2025-11-07 16:21:59 +01:00
678ccff694 Adds dynamic quick actions via modules
Introduces a dynamic quick action system, allowing modules to register actions that appear in a floating action button menu.

This provides a flexible way for modules to extend the application's functionality with common tasks like composing notes or initiating payments.
2025-11-07 16:00:07 +01:00
1a38c92db1 Improves task display and spacing
Refines the presentation of scheduled events by adjusting spacing and text displayed when there are no tasks. This enhances visual clarity and provides a more user-friendly experience.
2025-11-06 11:30:42 +01:00
2620c07a23 Removes redundant admin badge
Removes the admin badge from the scheduled event card.

The badge was deemed unnecessary as the information it conveyed
is already implicitly clear.
2025-11-06 11:30:42 +01:00
76b930469d FIX: Show events even if no posts
Moves the "no posts" message to only display when there are no posts and no scheduled events.

Also, ensures "end of feed" message is displayed only when there are posts to show.
2025-11-06 11:30:42 +01:00
0e42318036 Adds date navigation to scheduled events
Implements date navigation for scheduled events, allowing users to view events for different days.

This change replaces the static "Today's Events" section with a dynamic date selector.
It introduces buttons for navigating to the previous and next days, as well as a "Today" button to return to the current date.
A date display shows the selected date, and a message indicates when there are no scheduled events for a given day.
2025-11-06 11:30:42 +01:00
a27a8232f2 Filters one-time events to avoid duplicates
Ensures that one-time events exclude recurring events, preventing duplicate entries.

This resolves an issue where recurring events were incorrectly included in the list of one-time events, leading to events being displayed multiple times.
2025-11-06 11:30:42 +01:00
706ceea84b Enables recurring scheduled event completion
Extends scheduled event completion to support recurring events.

The changes introduce the concept of an "occurrence" for recurring events,
allowing users to mark individual instances of a recurring event as complete.
This involves:
- Adding recurrence information to the ScheduledEvent model.
- Modifying completion logic to handle recurring events with daily/weekly frequencies
- Updating UI to display recurrence information and mark individual occurrences as complete.
2025-11-06 11:30:42 +01:00
8381d43268 Filters and sorts scheduled events
Improves scheduled event retrieval by filtering events
based on user participation and sorting them by start time.

This ensures that users only see events they are participating
in or events that are open to the entire community.
2025-11-06 11:30:42 +01:00
098bff8acc Shows completer name on completed badge
Updates the completed badge to display the name of the user who marked the event as complete.

This provides better context and clarity regarding who triggered the completion status.
2025-11-06 11:30:42 +01:00
62c38185e8 Filters scheduled events by participation
Ensures users only see scheduled events they are participating in or events that are open to everyone.

This change filters the list of today's scheduled events based on the current user's participation.
It only displays events where the user is listed as a participant or events that do not have any participants specified.
2025-11-06 11:30:42 +01:00
9aa8c28bef Replaces custom expand/collapse with Collapsible
Migrates ScheduledEventCard to use the Collapsible component from the UI library.

This simplifies the component's structure and improves accessibility by leveraging the built-in features of the Collapsible component.
Removes custom logic for managing the expanded/collapsed state.
2025-11-06 11:30:42 +01:00
abaf7f2f5b Uses array for completions to improve reactivity
Changes the `allCompletions` computed property to return an array instead of a Map.
This improves reactivity in the component that uses it, as Vue can more efficiently track changes in an array.
Also simplifies the pubkey extraction process.
2025-11-06 11:30:42 +01:00
4bf1da7331 Adds expandable event card
Improves the Scheduled Event Card component by adding an expandable view.

This change introduces a collapsed view that shows the event time and title, and an expanded view which displays all event details. This allows users to quickly scan the scheduled events and expand those they are interested in.
2025-11-06 11:30:42 +01:00
661b700092 Adds support for completable task events
Enables marking scheduled events as complete based on a new "event-type" tag.

This change introduces the concept of "completable" events, specifically for events of type "task". It modifies the ScheduledEventCard component to:

- Display completion information only for completable events
- Show the "Mark Complete" button only for completable events that are not yet completed
- Adjust the opacity and strikethrough styling based on the event's completable and completed status.

The ScheduledEventService is updated to extract the event type from the "event-type" tag.
2025-11-06 11:30:42 +01:00
46418ef6fd Fetches profiles for event authors/completers
Ensures profiles are fetched for authors and completers of scheduled events,
improving user experience by displaying relevant user information.

This is achieved by watching for scheduled events and completions, then
fetching profiles for any new pubkeys encountered.
2025-11-06 11:30:42 +01:00
033113829f Adds confirmation dialog for marking events complete
Improves user experience by adding a confirmation dialog
before marking a scheduled event as complete. This helps
prevent accidental completion of events.
2025-11-06 11:30:42 +01:00
4050b33d0e Enables marking scheduled events as complete
Implements a feature to mark scheduled events as complete, replacing the checkbox with a button for improved UX.

This commit enhances the Scheduled Events functionality by allowing users to mark events as complete. It also includes:

- Replaces the checkbox with a "Mark Complete" button for better usability.
- Adds logging for debugging purposes during event completion toggling.
- Routes completion events (kind 31925) to the ScheduledEventService.
- Optimistically updates the local state after publishing completion events.
2025-11-06 11:30:42 +01:00
9b05bcc238 Adds scheduled events to the feed
Implements NIP-52 scheduled events, allowing users to view and interact with calendar events.

A new `ScheduledEventService` is introduced to manage fetching, storing, and completing scheduled events. A new `ScheduledEventCard` component is introduced for displaying the scheduled events.
2025-11-06 11:30:42 +01:00
875bf50765 Squash merge feature/publish-metadata into main 2025-10-30 16:19:08 +01:00
cc5e0dbef6 Squash merge nostrfeed-ui into main 2025-10-21 21:31:25 +02:00
92176bea83 add env variable for lightning domain leveraging redirect capability 2025-10-16 00:53:06 +02:00
c90def94a7 Squash merge rely-on-nostrmarket-to-publish into main 2025-10-08 09:19:07 +02:00
0da23e9332 Replace complex UnreadMessageData system with elegant path-based wildcard notification tracking inspired by Coracle's pattern. This simplifies the codebase while adding powerful batch "mark as read" capabilities.
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.
2025-10-04 10:29:22 +02:00
0447549fa5 FIX: CRITICAL use nullish coalescing for product quantity in useMarket composable
- 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.
2025-10-02 09:43:16 +02:00
98934ed61d refactor: streamline ImageLightbox and update ProductDetailPage for better image handling
- 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.
2025-09-28 12:58:11 +02:00
3742937aea refactor: remove ImageDisplay component and update base module exports
- 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.
2025-09-28 12:57:57 +02:00
ca0ac2b9ad feat: introduce ImageLightbox and ImageViewer components for enhanced image handling
- 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.
2025-09-28 12:48:02 +02:00
3aec5bbdb3 feat: add ProductDetailPage introduce ImageViewer and ImageLightbox components for enhanced image display
- 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.
2025-09-28 12:39:41 +02:00
bff158cb74 feat: enhance product management with new dialog and image handling features
- 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.
2025-09-28 12:39:41 +02:00
f7405bc26e feat: implement image upload functionality with new components and service
- 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.
2025-09-28 04:08:41 +02:00
e062dfe2b8 Merge branch 'marketplace' 2025-09-28 03:42:46 +02:00
bdc74f9c90 refactor: simplify recent searches handling in MarketSearchBar
- 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.
2025-09-27 21:23:40 +02:00
3d5f1230e7 refactor: enhance MarketSearchBar by statically importing features for improved performance
- 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.
2025-09-27 21:23:27 +02:00
fe9fbe201b feat: enhance ProgressiveImage component with dynamic error handling and improved no-image state
- 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.
2025-09-27 21:20:36 +02:00
fae19436b1 feat: introduce ProgressiveImage component for enhanced image loading
- 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.
2025-09-27 19:08:07 +02:00
43c368e4e4 feat: add lazy loading to product images 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.
2025-09-27 18:48:57 +02:00
b3428c2905 refactor: (4) enhance MarketSearchBar with internal query handling and debouncing
- 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.
2025-09-27 18:44:02 +02:00
1f321dce4a refactor: update market loading logic and remove debug methods in MarketPage
- 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.
2025-09-27 15:54:47 +02:00
957f3e3890 fix: improve loading state handling in MarketPage and add debug methods
- 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.
2025-09-27 14:20:46 +02:00
e68a7a9ed5 refactor: simplify LoadingErrorState and enhance MarketSearchBar functionality
- 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.
2025-09-27 09:51:00 +02:00