Adds user settings for the Castle extension
Adds functionality to configure the Castle extension, including a wallet ID. This allows administrators to customize the extension's behavior by specifying a dedicated wallet for castle operations.
This commit is contained in:
parent
ceabf96f79
commit
29983cedb7
7 changed files with 199 additions and 2 deletions
|
|
@ -11,8 +11,17 @@
|
|||
<div class="col-12 col-md-8 col-lg-7 q-gutter-y-md">
|
||||
<q-card>
|
||||
<q-card-section>
|
||||
<h5 class="q-my-none">🏰 Castle Accounting</h5>
|
||||
<p>Track expenses, receivables, and balances for the collective</p>
|
||||
<div class="row items-center no-wrap">
|
||||
<div class="col">
|
||||
<h5 class="q-my-none">🏰 Castle Accounting</h5>
|
||||
<p class="q-mb-none">Track expenses, receivables, and balances for the collective</p>
|
||||
</div>
|
||||
<div class="col-auto" v-if="isAdmin">
|
||||
<q-btn flat round icon="settings" @click="showSettingsDialog">
|
||||
<q-tooltip>Settings</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
||||
|
|
@ -233,4 +242,32 @@
|
|||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<!-- Settings Dialog -->
|
||||
<q-dialog v-model="settingsDialog.show" position="top">
|
||||
<q-card v-if="settingsDialog.show" class="q-pa-lg q-pt-xl lnbits__dialog-card">
|
||||
<q-form @submit="submitSettings" class="q-gutter-md">
|
||||
<div class="text-h6 q-mb-md">Castle Settings</div>
|
||||
|
||||
<q-input
|
||||
filled
|
||||
dense
|
||||
v-model.trim="settingsDialog.castleWalletId"
|
||||
label="Castle Wallet ID *"
|
||||
placeholder="The wallet ID that represents the Castle"
|
||||
></q-input>
|
||||
|
||||
<div class="text-caption text-grey">
|
||||
This wallet will be used for Castle operations and transactions.
|
||||
</div>
|
||||
|
||||
<div class="row q-mt-lg">
|
||||
<q-btn unelevated color="primary" type="submit" :loading="settingsDialog.loading">
|
||||
Save Settings
|
||||
</q-btn>
|
||||
<q-btn v-close-popup flat color="grey" class="q-ml-auto">Cancel</q-btn>
|
||||
</div>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue