Started adding ability to forward by tag

This commit is contained in:
ben 2022-12-09 14:10:10 +00:00
parent 922549b0b7
commit 4e6466cd95
2 changed files with 19 additions and 3 deletions

View file

@ -56,7 +56,7 @@ new Vue({
this.selectedWallet = wallet
this.getTargets()
},
targetChanged(isPercent, index) {
percentageChanged(isPercent, index) {
// fix percent min and max range
if (isPercent) {
if (this.targets[index].percent > 100) this.targets[index].percent = 100

View file

@ -31,6 +31,13 @@
style="flex-wrap: nowrap"
v-for="(target, t) in targets"
>
<q-toggle
:false-value="'split'"
:label="`${target.method}`"
:true-value="'tag'"
color="primary"
v-model="target.method"
></q-toggle>
<q-select
dense
:options="g.user.wallets.filter(w => w.id !== selectedWallet.id).map(o => ({name: o.name, value: o.id}))"
@ -53,15 +60,24 @@
:hint="t === targets.length - 1 ? 'A name to identify this target wallet locally.' : undefined"
@input="targetChanged(false)"
></q-input>
<q-input
v-if="target.method == 'split'"
dense
outlined
v-model.number="target.percent"
label="Split Share"
:hint="t === targets.length - 1 ? 'How much of the incoming payments will go to the target wallet.' : undefined"
suffix="%"
@input="targetChanged(true, t)"
@input="percentageChanged(true, t)"
></q-input>
<q-input
v-else
dense
outlined
v-model.number="target.tag"
label="Forward by tag"
suffix="#"
></q-input>
</div>
<div class="row justify-evenly q-pa-lg">