qml: add InfoTextArea about PressAndHold
This commit is contained in:
@@ -14,6 +14,13 @@ Pane {
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
InfoTextArea {
|
||||
Layout.fillWidth: true
|
||||
Layout.bottomMargin: constants.paddingLarge
|
||||
visible: !Daemon.currentWallet.userKnowsPressAndHold
|
||||
text: qsTr('To access this list from the main screen, press and hold the Send button')
|
||||
}
|
||||
|
||||
Heading {
|
||||
text: qsTr('Saved Invoices')
|
||||
}
|
||||
|
||||
@@ -17,6 +17,13 @@ Pane {
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
InfoTextArea {
|
||||
Layout.fillWidth: true
|
||||
Layout.bottomMargin: constants.paddingLarge
|
||||
visible: !Daemon.currentWallet.userKnowsPressAndHold
|
||||
text: qsTr('To access this list from the main screen, press and hold the Receive button')
|
||||
}
|
||||
|
||||
Heading {
|
||||
text: qsTr('Pending requests')
|
||||
}
|
||||
|
||||
@@ -192,6 +192,7 @@ Item {
|
||||
dialog.open()
|
||||
}
|
||||
onPressAndHold: {
|
||||
Daemon.currentWallet.userKnowsPressAndHold = true
|
||||
Daemon.currentWallet.delete_expired_requests()
|
||||
app.stack.push(Qt.resolvedUrl('ReceiveRequests.qml'))
|
||||
}
|
||||
@@ -204,6 +205,7 @@ Item {
|
||||
text: qsTr('Send')
|
||||
onClicked: openSendDialog()
|
||||
onPressAndHold: {
|
||||
Daemon.currentWallet.userKnowsPressAndHold = true
|
||||
app.stack.push(Qt.resolvedUrl('Invoices.qml'))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,9 +125,18 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
|
||||
|
||||
self.register_callbacks()
|
||||
self.destroyed.connect(lambda: self.on_destroy())
|
||||
|
||||
self._user_knows_press_and_hold = False # maybe save in config?
|
||||
self.synchronizing = not wallet.is_up_to_date()
|
||||
|
||||
userKnowsPressAndHoldChanged = pyqtSignal()
|
||||
@pyqtProperty(bool, notify=userKnowsPressAndHoldChanged)
|
||||
def userKnowsPressAndHold(self):
|
||||
return self._user_knows_press_and_hold
|
||||
|
||||
@userKnowsPressAndHold.setter
|
||||
def userKnowsPressAndHold(self, userKnowsPressAndHold):
|
||||
self._user_knows_press_and_hold = userKnowsPressAndHold
|
||||
|
||||
synchronizingChanged = pyqtSignal()
|
||||
@pyqtProperty(bool, notify=synchronizingChanged)
|
||||
def synchronizing(self):
|
||||
@@ -629,7 +638,6 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
|
||||
elif lightning_only:
|
||||
addr = None
|
||||
else:
|
||||
has_lightning = self.wallet.has_lightning()
|
||||
msg = [
|
||||
_('No address available.'),
|
||||
_('All your addresses are used in pending requests.'),
|
||||
|
||||
Reference in New Issue
Block a user