Commit graph

326 commits

Author SHA1 Message Date
7245123e49 Improve merchant creation with automatic keypair generation
Enhance the merchant creation process by automatically generating Nostr keypairs
for users who don't have them, and streamline the API interface.

Changes:
- Add CreateMerchantRequest model to simplify merchant creation API
- Auto-generate Nostr keypairs for users without existing keys
- Update merchant creation endpoint to use user account keypairs
- Improve error handling and validation in merchant creation flow
- Clean up frontend JavaScript for merchant creation

This ensures all merchants have proper Nostr keypairs for marketplace
functionality without requiring manual key management from users.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-31 12:04:22 +01:00
arcbtc
7771201c32 moved to orders tab 2025-12-30 11:46:45 +00:00
arcbtc
1777b5df6d Merge branch 'main' into feature/merchant-keys-panel-146 2025-12-30 11:40:14 +00:00
Ben Weeks
7aec14854c feat: multi-profile support and UI improvements
- Remove backend restriction on one merchant per user
- Add "Generate New Key" dialog with npub/nsec display
- Add "Import Existing Key" option with duplicate check
- Change "Save" to "Save & Publish" in edit profile dialog
- Remove standalone Publish button (now part of Save)
- Add trash icon to saved profile for removal
- Show display_name in saved profiles dropdown
- Hide nsec by default with eye toggle in generate dialog

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 14:05:18 +00:00
Ben Weeks
f466559b51 feat: add Switch dropdown options for profile management
- Add "Import Existing Key" option with vpn_key icon
- Add "Generate New Key" option to create fresh nsec
- Add "Remove <name>" option to delete merchant from DB
- Wire up generate-key event to existing generateKeys function

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 13:18:51 +00:00
Ben Weeks
a21b5289c1 feat: add merchant profile edit, keys dialog, and publish to Nostr
- Add PATCH endpoint for updating merchant profile config
- Add website field to MerchantProfile model
- Fix to_nostr_event to include all profile fields (display_name, banner, website, nip05, lud16)
- Always publish merchant profile (kind 0) when publishing to Nostr
- Extract edit-profile-dialog and nostr-keys-dialog into separate components
- Fix profile avatar alignment to match original design
- Simplify keys dialog to show only npub QR code (no nsec QR)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 12:42:03 +00:00
Ben Weeks
c3dea9f01d feat: add merchant profile panel to Merchant tab
Display merchant profile information with:
- Banner image or grey placeholder
- Profile avatar with shadow
- Display name (or name fallback)
- About description
- NIP-05 verified identity indicator
- Lightning address (LUD16)

Extends MerchantProfile model with new fields:
display_name, banner, nip05, lud16

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 11:10:39 +00:00
Arc
a2931d675a fixup: ui 2025-12-24 05:32:27 +00:00
Arc
05a23fae0b Merge remote-tracking branch 'origin/main' into feature/nostrclient-status-indicator 2025-12-24 03:57:27 +00:00
Arc
3d503cefff Merge branch 'main' into feature/tab-navigation-119 2025-12-24 03:51:38 +00:00
Arc
9b95ae22a9
Merge branch 'main' into fix/currency-config-116 2025-12-24 03:34:15 +00:00
Arc
9bdc54e57a
Merge branch 'main' into feature/update-icon 2025-12-24 03:31:02 +00:00
Ben Weeks
0b8ed70350 fix: country list fixes for shipping-zones-list component (#153)
- Remove asterisks from United Kingdom and United States
- Move China to alphabetical position
- Remove "Flat rate" option
- Alphabetize country list

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 13:46:57 +00:00
Ben Weeks
7bfc687a87 revert: remove country list fixes, keep only search/sort (#157)
Country list fixes will come from PR #156 instead.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 13:44:21 +00:00
Ben Weeks
e568d55760 style: move Currency column after Cost column
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 13:40:00 +00:00
Ben Weeks
0e2cad101d feat: add search and sorting to shipping zones table (#157)
- Add search filter input to zones table
- Make all columns sortable with default sort by name
- Fix country list: alphabetize, remove asterisks from UK/US, remove "Flat rate"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 13:34:43 +00:00
Ben Weeks
dbd64f7faf feat: improve shipping zone UX
- Remove asterisks from UK/US country names (#153)
- Remove unclear "Flat rate" option (#153)
- Alphabetize country list, move China to correct position (#153)
- Rename "Unit" to "Currency" (#154)
- Rename cost label to "Default shipping cost" (#154)
- Add currency suffix to cost field (#154)
- Add hint about per-product shipping costs (#154)
- Add validation for whole number sats (#155)
- Disable submit button when sats validation fails (#155)
- Show error message for invalid sats values (#155)

Closes #153, #154, #155

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 12:53:21 +00:00
Ben Weeks
bd010ece6b style: fix prettier formatting
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 12:21:59 +00:00
Ben Weeks
99b3ca6db7 feat: update extension icon with shop storefront design
- Add generate_logo.py script to create icon programmatically
- New shop icon with striped awning and display windows
- Consistent purple color scheme with Nostr Proxy extension
- Update config.json to reference new icon

Closes #150

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 02:24:58 +00:00
Ben Weeks
b8c2c99175 chore: remove unused status endpoint and debug logging
- Remove api_get_nostr_status() - frontend calls nostrclient directly
- Remove unused httpx and settings imports
- Remove console.log debug statement

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 14:46:30 +00:00
Ben Weeks
d2755d7232 fix: improve nostrclient status detection and display
- Call nostrclient /relays API directly from frontend for accurate status
- Show correct error messages from API response (body.detail)
- Add orange warning state for no relays configured
- Show relay count when connected (X of Y connected)
- Simplify status logic: 200 = green, no relays = orange, error = red

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 12:49:33 +00:00
Ben Weeks
9911a03575 feat: add nostrclient status indicator and connection button
- Add /api/v1/status endpoint to check nostrclient availability
- Add color-coded "Connect" button (red/orange/green) based on status
- Show dropdown with connection details (relays count, websocket status)
- Add warning banner when nostrclient extension is not available
- Update info card with description of extension functionality

Closes #132

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 10:15:11 +00:00
Ben Weeks
71f458b9b9 feat: restructure UI with tab-based navigation (#119)
Reorganizes the merchant dashboard into a tab-based layout:
- Tabs: Merchant | Shipping | Stalls | Products | Messages | Orders
- Publish dropdown with NIP-15 options (NIP-99 disabled/coming soon)
- Consistent UI patterns across all tabs:
  - Search/filter/buttons aligned right
  - Actions column on right side of tables
  - Equal-width tabs
- Stalls tab: popup edit dialog, navigation to Products/Orders
- Products tab: filter icon dropdown for stall filtering
- Modular component structure for each tab section
- Fixed product API calls to use correct endpoints

Closes #119

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 19:06:28 +00:00
Ben Weeks
697fc1260d fix: respect admin-configured allowed currencies in dropdowns
Use window.g.allowedCurrencies instead of fetching all currencies from
the API, so currency dropdowns only show currencies configured by the
admin in LNbits settings.

Closes #116

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 17:47:48 +00:00
PatMulligan
499b1f81f1
CHORE: Improve UI (#112)
* Refactor merchant details layout for improved responsiveness and styling in index.html

* Revamp key pair component layout with improved styling and functionality. Added a header with a toggle for showing the private key, enhanced QR code display for both public and private keys, and included copy buttons for better user interaction.

Update key pair component styling and functionality: adjust QR code dimensions, improve key display format with truncation, and refine button margins for enhanced user experience.

Add 'show-buttons' prop to QR code components in key pair template for improved functionality

Update key pair component layout to use 'col-sm-6' for responsive design of QR code sections, enhancing display on smaller screens.

* Enhance direct messages component layout with improved styling and responsiveness. Updated class names for better alignment, added ellipsis for long customer labels, and modified button styles for consistency. Improved select options display with custom templates for better user experience.

* Refactor customer label generation in direct messages component for improved readability. Added checks for undefined customer data, enhanced label formatting with truncation for long descriptions, and adjusted unread message display format.

* make format
2025-09-15 09:48:13 +03:00
Vlad Stan
de7fe059b8
V1 (#106) 2024-11-06 11:50:21 +02:00
rleed
2020bd9838
Changes to deactivate/reactivate products (#89) 2024-11-04 10:59:04 +02:00
PatMulligan
7a3b144a94
pass showKeys as prop to merchant-details child and use emit to toggle (#105)
previously, index and its child compoment merchant-details had their own
booleans and their values were not synched. Using a prop avoids this
problem
2024-10-25 15:19:13 +03:00
benarc
7c77f3576a Added advanced description 2024-05-15 11:23:49 +01:00
Vlad Stan
1fd9da8214
fix: colours (#92) 2023-11-08 15:33:31 +02:00
Vlad Stan
cef709155e fix: long product name in order details 2023-11-06 12:41:53 +02:00
Vlad Stan
db24e93039 chore: update market binaries 2023-09-21 17:37:17 +03:00
Vlad Stan
f29e77db7e
Custom shipping cost (#86)
* feat: simple UI for shipping zone per product

* feat: add empty cost

* fix: backwards compatible zones

* feat: finish UI for product shipping cost

* fix: some ui issues

* feat: add per product shipping cost

* feat: show receipt for product

* fix: publish per product shipping cost
2023-09-21 17:29:13 +03:00
Vlad Stan
1a840ac007
feat: refresh merchant from nostr (#85) 2023-09-20 12:06:36 +03:00
Vlad Stan
1de0113ee6 chore: market UI update 2023-09-20 09:17:40 +03:00
Vlad Stan
926bbfa00d chore: update mrket app 2023-09-15 18:30:48 +03:00
Vlad Stan
bbbf1357aa chore: update market binaries 2023-09-15 17:51:54 +03:00
Vlad Stan
e07b48eea1 chore: update market binaries 2023-09-15 15:25:02 +03:00
Vlad Stan
2891474312
feat: add auto-reply on payment (#82) 2023-09-15 10:21:03 +03:00
Vlad Stan
f2773e0b44
Fix subscription errors (#81)
* pref: merge filters in one

* chore: load nit

* feat: restore individual order
2023-09-12 15:03:37 +03:00
Vlad Stan
c06f9a20a7
Extract market place (#78)
* chore: remove marketplace components

* feat: add static marketplace

* feat: add entry point for static marketplace

* doc: add comment

* chore: include nostr-bundle.js
2023-07-31 11:35:50 +03:00
Vlad Stan
fca8fa2bc6 chore: code clean-up 2023-07-24 11:11:31 +02:00
Vlad Stan
4c12a93f9f refactor: stuff 2023-07-24 11:11:31 +02:00
Vlad Stan
b9c163f353 fix: update product list when product deleted 2023-07-24 11:11:31 +02:00
Vlad Stan
780e6e8b1a feat: add readNotes and clearAllData option 2023-07-24 11:11:31 +02:00
Vlad Stan
096d14735b fix: why even optimize 2023-07-24 11:11:31 +02:00
Vlad Stan
b6e149a1b0 chore: code clean-up 2023-07-18 16:40:43 +02:00
Vlad Stan
93d183aacd feat: user logout and data clear 2023-07-18 16:40:43 +02:00
Vlad Stan
a965a02303 feat: ui loading update 2023-07-18 16:40:43 +02:00
Vlad Stan
21185fce34 chore: code clean-up 2023-07-18 16:40:43 +02:00