refactor: Revamp PurchaseTicketDialog and introduce useTicketPurchase composable
- Update PurchaseTicketDialog.vue to integrate authentication checks and enhance ticket purchasing flow with wallet support. - Implement useTicketPurchase composable for managing ticket purchase logic, including payment handling and QR code generation. - Improve user experience by displaying user information and wallet status during the ticket purchase process. - Refactor API interactions in events.ts to streamline ticket purchasing and payment status checks.
This commit is contained in:
parent
ed51c95799
commit
f7450627bc
5 changed files with 555 additions and 113 deletions
|
|
@ -17,13 +17,47 @@ interface AuthResponse {
|
|||
email?: string
|
||||
}
|
||||
|
||||
interface Wallet {
|
||||
id: string
|
||||
user: string
|
||||
name: string
|
||||
adminkey: string
|
||||
inkey: string
|
||||
deleted: boolean
|
||||
created_at: string
|
||||
updated_at: string
|
||||
currency?: string
|
||||
balance_msat: number
|
||||
extra?: {
|
||||
icon: string
|
||||
color: string
|
||||
pinned: boolean
|
||||
}
|
||||
}
|
||||
|
||||
interface User {
|
||||
id: string
|
||||
username?: string
|
||||
email?: string
|
||||
pubkey?: string
|
||||
external_id?: string
|
||||
extensions: string[]
|
||||
wallets: Wallet[]
|
||||
admin: boolean
|
||||
super_user: boolean
|
||||
fiat_providers: string[]
|
||||
has_password: boolean
|
||||
created_at: string
|
||||
updated_at: string
|
||||
extra?: {
|
||||
email_verified?: boolean
|
||||
first_name?: string
|
||||
last_name?: string
|
||||
display_name?: string
|
||||
picture?: string
|
||||
provider?: string
|
||||
visible_wallet_count?: number
|
||||
}
|
||||
}
|
||||
|
||||
import { getApiUrl, getAuthToken, setAuthToken, removeAuthToken } from '@/lib/config/lnbits'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue