qml: add InfoTextArea about PressAndHold
This commit is contained in:
@@ -14,6 +14,13 @@ Pane {
|
|||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
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 {
|
Heading {
|
||||||
text: qsTr('Saved Invoices')
|
text: qsTr('Saved Invoices')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,13 @@ Pane {
|
|||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
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 {
|
Heading {
|
||||||
text: qsTr('Pending requests')
|
text: qsTr('Pending requests')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -192,6 +192,7 @@ Item {
|
|||||||
dialog.open()
|
dialog.open()
|
||||||
}
|
}
|
||||||
onPressAndHold: {
|
onPressAndHold: {
|
||||||
|
Daemon.currentWallet.userKnowsPressAndHold = true
|
||||||
Daemon.currentWallet.delete_expired_requests()
|
Daemon.currentWallet.delete_expired_requests()
|
||||||
app.stack.push(Qt.resolvedUrl('ReceiveRequests.qml'))
|
app.stack.push(Qt.resolvedUrl('ReceiveRequests.qml'))
|
||||||
}
|
}
|
||||||
@@ -204,6 +205,7 @@ Item {
|
|||||||
text: qsTr('Send')
|
text: qsTr('Send')
|
||||||
onClicked: openSendDialog()
|
onClicked: openSendDialog()
|
||||||
onPressAndHold: {
|
onPressAndHold: {
|
||||||
|
Daemon.currentWallet.userKnowsPressAndHold = true
|
||||||
app.stack.push(Qt.resolvedUrl('Invoices.qml'))
|
app.stack.push(Qt.resolvedUrl('Invoices.qml'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,9 +125,18 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
|
|||||||
|
|
||||||
self.register_callbacks()
|
self.register_callbacks()
|
||||||
self.destroyed.connect(lambda: self.on_destroy())
|
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()
|
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()
|
synchronizingChanged = pyqtSignal()
|
||||||
@pyqtProperty(bool, notify=synchronizingChanged)
|
@pyqtProperty(bool, notify=synchronizingChanged)
|
||||||
def synchronizing(self):
|
def synchronizing(self):
|
||||||
@@ -629,7 +638,6 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
|
|||||||
elif lightning_only:
|
elif lightning_only:
|
||||||
addr = None
|
addr = None
|
||||||
else:
|
else:
|
||||||
has_lightning = self.wallet.has_lightning()
|
|
||||||
msg = [
|
msg = [
|
||||||
_('No address available.'),
|
_('No address available.'),
|
||||||
_('All your addresses are used in pending requests.'),
|
_('All your addresses are used in pending requests.'),
|
||||||
|
|||||||
Reference in New Issue
Block a user