fix: shortcut buttons

This commit is contained in:
Vlad Stan 2022-08-03 10:17:17 +03:00
parent d14fbd68aa
commit f11a51a4cc
7 changed files with 19 additions and 12 deletions

View file

@ -107,6 +107,9 @@ async function addressList(path) {
}, },
showAddressDetails: function (addressData) { showAddressDetails: function (addressData) {
this.$emit('show-address-details', addressData) this.$emit('show-address-details', addressData)
},
searchInTab: function (tab, value) {
this.$emit('search:tab', {tab, value})
} }
}, },

View file

@ -6,7 +6,7 @@
borderless borderless
dense dense
debounce="300" debounce="300"
v-model="historyTable.filter" v-model="filter"
placeholder="Search" placeholder="Search"
class="float-right" class="float-right"
> >
@ -38,7 +38,7 @@
virtual-scroll virtual-scroll
:columns="historyTable.columns" :columns="historyTable.columns"
:pagination.sync="historyTable.pagination" :pagination.sync="historyTable.pagination"
:filter="historyTable.filter" :filter="filter"
> >
<template v-slot:body="props"> <template v-slot:body="props">
<q-tr :props="props"> <q-tr :props="props">

View file

@ -4,7 +4,7 @@ async function history(path) {
name: 'history', name: 'history',
template, template,
props: ['history', 'mempool-endpoint', 'sats-denominated'], props: ['history', 'mempool-endpoint', 'sats-denominated', 'filter'],
data: function () { data: function () {
return { return {
historyTable: { historyTable: {
@ -65,8 +65,7 @@ async function history(path) {
], ],
pagination: { pagination: {
rowsPerPage: 0 rowsPerPage: 0
}, }
filter: ''
} }
} }
}, },

View file

@ -28,7 +28,7 @@
borderless borderless
dense dense
debounce="300" debounce="300"
v-model="utxosTable.filter" v-model="filter"
placeholder="Search" placeholder="Search"
> >
<template v-slot:append> <template v-slot:append>
@ -45,7 +45,7 @@
row-key="id" row-key="id"
:columns="columns" :columns="columns"
:pagination.sync="utxosTable.pagination" :pagination.sync="utxosTable.pagination"
:filter="utxosTable.filter" :filter="filter"
> >
<template v-slot:body="props"> <template v-slot:body="props">
<q-tr :props="props"> <q-tr :props="props">

View file

@ -10,7 +10,8 @@ async function utxoList(path) {
'selectable', 'selectable',
'payed-amount', 'payed-amount',
'sats-denominated', 'sats-denominated',
'mempool-endpoint' 'mempool-endpoint',
'filter'
], ],
data: function () { data: function () {
@ -65,8 +66,7 @@ async function utxoList(path) {
], ],
pagination: { pagination: {
rowsPerPage: 10 rowsPerPage: 10
}, }
filter: ''
}, },
utxoSelectionModes: [ utxoSelectionModes: [
'Manual', 'Manual',

View file

@ -43,11 +43,13 @@ const watchOnly = async () => {
walletAccounts: [], walletAccounts: [],
addresses: [], addresses: [],
history: [], history: [],
historyFilter: '',
showAddress: false, showAddress: false,
addressNote: '', addressNote: '',
showPayment: false, showPayment: false,
fetchedUtxos: false, fetchedUtxos: false,
utxosFilter: '',
network: null network: null
} }
}, },
@ -362,9 +364,9 @@ const watchOnly = async () => {
this.addressNote = addressData.note || '' this.addressNote = addressData.note || ''
this.showAddress = true this.showAddress = true
}, },
searchInTab: function (tab, value) { searchInTab: function ({tab, value}) {
this.tab = tab this.tab = tab
this[`${tab}Table`].filter = value this[`${tab}Filter`] = value
}, },
updateAccounts: async function (accounts) { updateAccounts: async function (accounts) {

View file

@ -98,6 +98,7 @@
@scan:address="scanAddress" @scan:address="scanAddress"
@show-address-details="showAddressDetails" @show-address-details="showAddressDetails"
@update:addresses="initUtxos" @update:addresses="initUtxos"
@search:tab="searchInTab"
:inkey="g.user.wallets[0].inkey" :inkey="g.user.wallets[0].inkey"
> >
</address-list> </address-list>
@ -107,6 +108,7 @@
:history="history" :history="history"
:mempool-endpoint="mempoolHostname" :mempool-endpoint="mempoolHostname"
:sats-denominated="config.sats_denominated" :sats-denominated="config.sats_denominated"
:filter="historyFilter"
></history> ></history>
</q-tab-panel> </q-tab-panel>
<q-tab-panel name="utxos"> <q-tab-panel name="utxos">
@ -115,6 +117,7 @@
:mempool-endpoint="mempoolHostname" :mempool-endpoint="mempoolHostname"
:accounts="walletAccounts" :accounts="walletAccounts"
:sats-denominated="config.sats_denominated" :sats-denominated="config.sats_denominated"
:filter="utxosFilter"
></utxo-list> ></utxo-list>
</q-tab-panel> </q-tab-panel>
</q-tab-panels> </q-tab-panels>