Enhances super user experience with Castle wallet
Simplifies the user experience for super users by automatically using the Castle wallet for transactions, removing the need to configure a separate user wallet. This change streamlines the workflow for super users by: - Automatically assigning the Castle wallet to super users - Hiding the user wallet configuration options in the UI - Reloading user wallet settings to reflect the Castle wallet
This commit is contained in:
parent
f1ada5e290
commit
cb7e4ee555
3 changed files with 57 additions and 14 deletions
|
|
@ -17,7 +17,7 @@
|
|||
<p class="q-mb-none">Track expenses, receivables, and balances for the collective</p>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<q-btn flat round icon="account_balance_wallet" @click="showUserWalletDialog">
|
||||
<q-btn v-if="!isSuperUser" flat round icon="account_balance_wallet" @click="showUserWalletDialog">
|
||||
<q-tooltip>Configure Your Wallet</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn v-if="isSuperUser" flat round icon="settings" @click="showSettingsDialog">
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
</div>
|
||||
</q-banner>
|
||||
|
||||
<q-banner v-if="castleWalletConfigured && !userWalletConfigured" class="bg-orange text-white" rounded>
|
||||
<q-banner v-if="castleWalletConfigured && !userWalletConfigured && !isSuperUser" class="bg-orange text-white" rounded>
|
||||
<template v-slot:avatar>
|
||||
<q-icon name="account_balance_wallet" color="white"></q-icon>
|
||||
</template>
|
||||
|
|
@ -106,13 +106,13 @@
|
|||
<q-btn
|
||||
color="primary"
|
||||
@click="expenseDialog.show = true"
|
||||
:disable="!castleWalletConfigured || !userWalletConfigured"
|
||||
:disable="!castleWalletConfigured || (!userWalletConfigured && !isSuperUser)"
|
||||
>
|
||||
Add Expense
|
||||
<q-tooltip v-if="!castleWalletConfigured">
|
||||
Castle wallet must be configured first
|
||||
</q-tooltip>
|
||||
<q-tooltip v-if="castleWalletConfigured && !userWalletConfigured">
|
||||
<q-tooltip v-if="castleWalletConfigured && !userWalletConfigured && !isSuperUser">
|
||||
You must configure your wallet first
|
||||
</q-tooltip>
|
||||
</q-btn>
|
||||
|
|
@ -344,20 +344,27 @@
|
|||
<q-form @submit="submitUserWallet" class="q-gutter-md">
|
||||
<div class="text-h6 q-mb-md">Configure Your Wallet</div>
|
||||
|
||||
<q-input
|
||||
<q-select
|
||||
filled
|
||||
dense
|
||||
v-model.trim="userWalletDialog.userWalletId"
|
||||
label="Your Wallet ID *"
|
||||
placeholder="Enter your wallet ID"
|
||||
></q-input>
|
||||
emit-value
|
||||
v-model="userWalletDialog.userWalletId"
|
||||
:options="g.user.walletOptions"
|
||||
label="Your Wallet *"
|
||||
></q-select>
|
||||
|
||||
<div class="text-caption text-grey">
|
||||
This is the wallet you'll use for Castle transactions. You can find your wallet ID in the LNbits wallet settings.
|
||||
Select the wallet you'll use for Castle transactions.
|
||||
</div>
|
||||
|
||||
<div class="row q-mt-lg">
|
||||
<q-btn unelevated color="primary" type="submit" :loading="userWalletDialog.loading">
|
||||
<q-btn
|
||||
unelevated
|
||||
color="primary"
|
||||
type="submit"
|
||||
:loading="userWalletDialog.loading"
|
||||
:disable="!userWalletDialog.userWalletId"
|
||||
>
|
||||
Save Wallet
|
||||
</q-btn>
|
||||
<q-btn v-close-popup flat color="grey" class="q-ml-auto">Cancel</q-btn>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue