diff --git a/src/app.config.ts b/src/app.config.ts index bd7190d..0384841 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -64,6 +64,18 @@ export const appConfig: AppConfig = { ticketValidationEndpoint: '/api/tickets/validate', maxTicketsPerUser: 10 } + }, + wallet: { + name: 'wallet', + enabled: true, + lazy: false, + config: { + defaultReceiveAmount: 1000, // 1000 sats + maxReceiveAmount: 1000000, // 1M sats + apiConfig: { + baseUrl: import.meta.env.VITE_LNBITS_BASE_URL || 'http://localhost:5000' + } + } } }, diff --git a/src/app.ts b/src/app.ts index 7c3a7f9..5ee12b8 100644 --- a/src/app.ts +++ b/src/app.ts @@ -15,6 +15,7 @@ import nostrFeedModule from './modules/nostr-feed' import chatModule from './modules/chat' import eventsModule from './modules/events' import marketModule from './modules/market' +import walletModule from './modules/wallet' // Root component import App from './App.vue' @@ -41,7 +42,8 @@ export async function createAppInstance() { ...nostrFeedModule.routes || [], ...chatModule.routes || [], ...eventsModule.routes || [], - ...marketModule.routes || [] + ...marketModule.routes || [], + ...walletModule.routes || [] ].filter(Boolean) // Create router with all routes available immediately @@ -117,6 +119,13 @@ export async function createAppInstance() { ) } + // Register wallet module + if (appConfig.modules.wallet?.enabled) { + moduleRegistrations.push( + pluginManager.register(walletModule, appConfig.modules.wallet) + ) + } + // Wait for all modules to register await Promise.all(moduleRegistrations) diff --git a/src/components/layout/Navbar.vue b/src/components/layout/Navbar.vue index de2ddb5..08ded0c 100644 --- a/src/components/layout/Navbar.vue +++ b/src/components/layout/Navbar.vue @@ -6,7 +6,7 @@ import { useTheme } from '@/components/theme-provider' import { Button } from '@/components/ui/button' import { Badge } from '@/components/ui/badge' import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from '@/components/ui/dropdown-menu' -import { Sun, Moon, Menu, X, User, LogOut, Ticket, Wallet, MessageSquare, Activity, ShoppingCart, Store, Calendar, ShoppingBag } from 'lucide-vue-next' +import { Sun, Moon, Menu, X, User, LogOut, Ticket, Wallet, MessageSquare, Activity, ShoppingCart, Store, Calendar, ShoppingBag, ChevronRight } from 'lucide-vue-next' import LanguageSwitcher from '@/components/LanguageSwitcher.vue' import LoginDialog from '@/components/auth/LoginDialog.vue' import ProfileDialog from '@/components/auth/ProfileDialog.vue' @@ -155,10 +155,10 @@ const handleLogout = async () => { -
+ -
+ @@ -265,10 +265,16 @@ const handleLogout = async () => { -
- - -
+