mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-18 09:37:59 +00:00
fix(@desktop/wallet): Handle errors in ENS and stickers views. Disbale action and show tooltip.
fixes #8597, #10034
This commit is contained in:
parent
34c04f0af6
commit
2501520dda
@ -10,6 +10,8 @@ QtObject {
|
|||||||
|
|
||||||
property var contactsStore
|
property var contactsStore
|
||||||
|
|
||||||
|
property var networkConnectionStore
|
||||||
|
|
||||||
readonly property PermissionsStore permissionsStore: PermissionsStore {
|
readonly property PermissionsStore permissionsStore: PermissionsStore {
|
||||||
activeSectionId: mainModuleInst.activeSection.id
|
activeSectionId: mainModuleInst.activeSection.id
|
||||||
chatCommunitySectionModuleInst: chatCommunitySectionModule
|
chatCommunitySectionModuleInst: chatCommunitySectionModule
|
||||||
|
@ -21,6 +21,7 @@ StatusSectionLayout {
|
|||||||
property var globalStore
|
property var globalStore
|
||||||
property var systemPalette
|
property var systemPalette
|
||||||
property var emojiPopup
|
property var emojiPopup
|
||||||
|
property var networkConnectionStore
|
||||||
|
|
||||||
backButtonName: root.store.backButtonName
|
backButtonName: root.store.backButtonName
|
||||||
notificationCount: activityCenterStore.unreadNotificationsCount
|
notificationCount: activityCenterStore.unreadNotificationsCount
|
||||||
@ -139,7 +140,7 @@ StatusSectionLayout {
|
|||||||
ensUsernamesStore: root.store.ensUsernamesStore
|
ensUsernamesStore: root.store.ensUsernamesStore
|
||||||
contactsStore: root.store.contactsStore
|
contactsStore: root.store.contactsStore
|
||||||
stickersStore: root.store.stickersStore
|
stickersStore: root.store.stickersStore
|
||||||
|
networkConnectionStore: root.networkConnectionStore
|
||||||
profileContentWidth: d.contentWidth
|
profileContentWidth: d.contentWidth
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ Item {
|
|||||||
|
|
||||||
property var contactsStore
|
property var contactsStore
|
||||||
property var stickersStore
|
property var stickersStore
|
||||||
|
property var networkConnectionStore
|
||||||
|
|
||||||
property int profileContentWidth
|
property int profileContentWidth
|
||||||
property bool showSearchScreen: false
|
property bool showSearchScreen: false
|
||||||
@ -218,6 +219,8 @@ Item {
|
|||||||
username: ensView.ensUsernamesStore.username
|
username: ensView.ensUsernamesStore.username
|
||||||
onStartBtnClicked: next(null)
|
onStartBtnClicked: next(null)
|
||||||
profileContentWidth: ensView.profileContentWidth
|
profileContentWidth: ensView.profileContentWidth
|
||||||
|
startButtonEnabled: ensView.networkConnectionStore.ensNetworkAvailable
|
||||||
|
tooltipText: ensView.networkConnectionStore.ensNetworkUnavailableText
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ import StatusQ.Core.Theme 0.1
|
|||||||
import StatusQ.Controls 0.1
|
import StatusQ.Controls 0.1
|
||||||
|
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
|
import shared.controls 1.0
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
@ -15,6 +16,8 @@ Item {
|
|||||||
|
|
||||||
property string username: ""
|
property string username: ""
|
||||||
property int profileContentWidth
|
property int profileContentWidth
|
||||||
|
property bool startButtonEnabled: true
|
||||||
|
property string tooltipText
|
||||||
|
|
||||||
StatusScrollView {
|
StatusScrollView {
|
||||||
id: sview
|
id: sview
|
||||||
@ -278,15 +281,16 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusButton {
|
DisabledTooltipButton {
|
||||||
id: startBtn
|
id: startBtn
|
||||||
objectName: "ensStartButton"
|
interactive: startButtonEnabled
|
||||||
|
buttonType: DisabledTooltipButton.Normal
|
||||||
|
aliasedObjectName: "ensStartButton"
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.bottomMargin: Style.current.padding
|
anchors.bottomMargin: Style.current.padding
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
text: enabled ?
|
text: qsTr("Start")
|
||||||
qsTr("Start") :
|
tooltipText: root.tooltipText
|
||||||
qsTr("Only available on Mainnet")
|
|
||||||
onClicked: startBtnClicked()
|
onClicked: startBtnClicked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ Item {
|
|||||||
property var contactsStore
|
property var contactsStore
|
||||||
property var emojiPopup: null
|
property var emojiPopup: null
|
||||||
property var sendModalPopup
|
property var sendModalPopup
|
||||||
|
property var networkConnectionStore
|
||||||
|
|
||||||
function showSigningPhrasePopup(){
|
function showSigningPhrasePopup(){
|
||||||
if(!hideSignPhraseModal && !RootStore.hideSignPhraseModal){
|
if(!hideSignPhraseModal && !RootStore.hideSignPhraseModal){
|
||||||
@ -56,6 +57,7 @@ Item {
|
|||||||
store: root.store
|
store: root.store
|
||||||
contactsStore: root.contactsStore
|
contactsStore: root.contactsStore
|
||||||
sendModal: root.sendModalPopup
|
sendModal: root.sendModalPopup
|
||||||
|
networkConnectionStore: root.networkConnectionStore
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,6 +98,7 @@ Item {
|
|||||||
rightPanelStackView.replace(walletContainer)
|
rightPanelStackView.replace(walletContainer)
|
||||||
}
|
}
|
||||||
emojiPopup: root.emojiPopup
|
emojiPopup: root.emojiPopup
|
||||||
|
networkConnectionStore: root.networkConnectionStore
|
||||||
}
|
}
|
||||||
|
|
||||||
centerPanel: StackView {
|
centerPanel: StackView {
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
import QtQuick 2.14
|
|
||||||
|
|
||||||
import StatusQ.Controls 0.1
|
|
||||||
|
|
||||||
Item {
|
|
||||||
property alias button: button
|
|
||||||
property alias text: button.text
|
|
||||||
property alias icon: button.icon.name
|
|
||||||
property alias tooltipText: tooltip.text
|
|
||||||
|
|
||||||
implicitWidth: button.width
|
|
||||||
implicitHeight: button.height
|
|
||||||
|
|
||||||
StatusFlatButton {
|
|
||||||
id: button
|
|
||||||
anchors.centerIn: parent
|
|
||||||
}
|
|
||||||
MouseArea {
|
|
||||||
id: mouseArea
|
|
||||||
anchors.fill: button
|
|
||||||
hoverEnabled: !button.enabled
|
|
||||||
enabled: !button.enabled
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
}
|
|
||||||
StatusToolTip {
|
|
||||||
id: tooltip
|
|
||||||
visible: mouseArea.containsMouse
|
|
||||||
}
|
|
||||||
}
|
|
@ -7,6 +7,7 @@ import StatusQ.Controls 0.1
|
|||||||
import StatusQ.Core.Theme 0.1
|
import StatusQ.Core.Theme 0.1
|
||||||
|
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
|
import shared.controls 1.0
|
||||||
|
|
||||||
import "../popups"
|
import "../popups"
|
||||||
import "../controls"
|
import "../controls"
|
||||||
@ -31,12 +32,13 @@ Rectangle {
|
|||||||
height: parent.height
|
height: parent.height
|
||||||
spacing: Style.current.padding
|
spacing: Style.current.padding
|
||||||
|
|
||||||
FooterTooltipButton {
|
DisabledTooltipButton {
|
||||||
button.objectName: "walletFooterSendButton"
|
buttonType: DisabledTooltipButton.Flat
|
||||||
button.icon.name: "send"
|
aliasedObjectName: "walletFooterSendButton"
|
||||||
button.text: qsTr("Send")
|
icon: "send"
|
||||||
button.enabled: networkConnectionStore.sendBuyBridgeEnabled
|
text: qsTr("Send")
|
||||||
button.onClicked: function() {
|
interactive: networkConnectionStore.sendBuyBridgeEnabled
|
||||||
|
onClicked: function() {
|
||||||
sendModal.open()
|
sendModal.open()
|
||||||
}
|
}
|
||||||
tooltipText: networkConnectionStore.sendBuyBridgeToolTipText
|
tooltipText: networkConnectionStore.sendBuyBridgeToolTipText
|
||||||
@ -50,11 +52,12 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FooterTooltipButton {
|
DisabledTooltipButton {
|
||||||
button.icon.name: "bridge"
|
icon: "bridge"
|
||||||
button.text: qsTr("Bridge")
|
buttonType: DisabledTooltipButton.Flat
|
||||||
button.enabled: networkConnectionStore.sendBuyBridgeEnabled
|
text: qsTr("Bridge")
|
||||||
button.onClicked: function() {
|
interactive: networkConnectionStore.sendBuyBridgeEnabled
|
||||||
|
onClicked: function() {
|
||||||
sendModal.isBridgeTx = true
|
sendModal.isBridgeTx = true
|
||||||
sendModal.open()
|
sendModal.open()
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ import "../addaccount"
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property NetworkConnectionStore networkConnectionStore: NetworkConnectionStore {}
|
property var networkConnectionStore
|
||||||
property var changeSelectedAccount: function(){}
|
property var changeSelectedAccount: function(){}
|
||||||
property bool showSavedAddresses: false
|
property bool showSavedAddresses: false
|
||||||
onShowSavedAddressesChanged: {
|
onShowSavedAddressesChanged: {
|
||||||
|
@ -20,7 +20,7 @@ Item {
|
|||||||
property var store
|
property var store
|
||||||
property var contactsStore
|
property var contactsStore
|
||||||
property var sendModal
|
property var sendModal
|
||||||
readonly property NetworkConnectionStore networkConnectionStore: NetworkConnectionStore {}
|
property var networkConnectionStore
|
||||||
|
|
||||||
function resetStack() {
|
function resetStack() {
|
||||||
stack.currentIndex = 0;
|
stack.currentIndex = 0;
|
||||||
|
@ -51,6 +51,7 @@ Item {
|
|||||||
contactsStore: appMain.rootStore.contactStore
|
contactsStore: appMain.rootStore.contactStore
|
||||||
emojiReactionsModel: appMain.rootStore.emojiReactionsModel
|
emojiReactionsModel: appMain.rootStore.emojiReactionsModel
|
||||||
openCreateChat: createChatView.opened
|
openCreateChat: createChatView.opened
|
||||||
|
networkConnectionStore: appMain.networkConnectionStore
|
||||||
}
|
}
|
||||||
property ActivityCenterStore activityCenterStore: ActivityCenterStore {}
|
property ActivityCenterStore activityCenterStore: ActivityCenterStore {}
|
||||||
property NetworkConnectionStore networkConnectionStore: NetworkConnectionStore {}
|
property NetworkConnectionStore networkConnectionStore: NetworkConnectionStore {}
|
||||||
@ -878,6 +879,7 @@ Item {
|
|||||||
emojiReactionsModel: appMain.rootStore.emojiReactionsModel
|
emojiReactionsModel: appMain.rootStore.emojiReactionsModel
|
||||||
openCreateChat: createChatView.opened
|
openCreateChat: createChatView.opened
|
||||||
chatCommunitySectionModule: appMain.rootStore.mainModuleInst.getChatSectionModule()
|
chatCommunitySectionModule: appMain.rootStore.mainModuleInst.getChatSectionModule()
|
||||||
|
networkConnectionStore: appMain.networkConnectionStore
|
||||||
}
|
}
|
||||||
emojiPopup: statusEmojiPopup
|
emojiPopup: statusEmojiPopup
|
||||||
stickersPopup: statusStickersPopupLoader.item
|
stickersPopup: statusStickersPopupLoader.item
|
||||||
@ -920,6 +922,7 @@ Item {
|
|||||||
contactsStore: appMain.rootStore.profileSectionStore.contactsStore
|
contactsStore: appMain.rootStore.profileSectionStore.contactsStore
|
||||||
emojiPopup: statusEmojiPopup
|
emojiPopup: statusEmojiPopup
|
||||||
sendModalPopup: sendModal
|
sendModalPopup: sendModal
|
||||||
|
networkConnectionStore: appMain.networkConnectionStore
|
||||||
}
|
}
|
||||||
onLoaded: item.showSigningPhrasePopup()
|
onLoaded: item.showSigningPhrasePopup()
|
||||||
}
|
}
|
||||||
@ -951,6 +954,7 @@ Item {
|
|||||||
globalStore: appMain.rootStore
|
globalStore: appMain.rootStore
|
||||||
systemPalette: appMain.sysPalette
|
systemPalette: appMain.sysPalette
|
||||||
emojiPopup: statusEmojiPopup
|
emojiPopup: statusEmojiPopup
|
||||||
|
networkConnectionStore: appMain.networkConnectionStore
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
59
ui/imports/shared/controls/DisabledTooltipButton.qml
Normal file
59
ui/imports/shared/controls/DisabledTooltipButton.qml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
import QtQuick 2.15
|
||||||
|
|
||||||
|
import StatusQ.Controls 0.1
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: root
|
||||||
|
property string aliasedObjectName
|
||||||
|
property string text
|
||||||
|
property string icon
|
||||||
|
property alias tooltipText: tooltip.text
|
||||||
|
property int buttonType: DisabledTooltipButton.Normal
|
||||||
|
property bool interactive: true
|
||||||
|
signal clicked()
|
||||||
|
|
||||||
|
enum Type {
|
||||||
|
Normal, // 0
|
||||||
|
Flat // 1
|
||||||
|
}
|
||||||
|
|
||||||
|
implicitWidth: buttonLoader.item.width
|
||||||
|
implicitHeight: buttonLoader.item.height
|
||||||
|
|
||||||
|
Loader {
|
||||||
|
id: buttonLoader
|
||||||
|
anchors.centerIn: parent
|
||||||
|
sourceComponent: buttonType === DisabledTooltipButton.Normal ? normalButton : flatButton
|
||||||
|
active: root.visible
|
||||||
|
}
|
||||||
|
HoverHandler {
|
||||||
|
id: hoverHandler
|
||||||
|
enabled: !root.interactive
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
}
|
||||||
|
StatusToolTip {
|
||||||
|
id: tooltip
|
||||||
|
visible: hoverHandler.hovered
|
||||||
|
}
|
||||||
|
|
||||||
|
Component{
|
||||||
|
id: flatButton
|
||||||
|
StatusFlatButton {
|
||||||
|
objectName: root.aliasedObjectName
|
||||||
|
icon.name: root.icon
|
||||||
|
text: root.text
|
||||||
|
enabled: root.interactive
|
||||||
|
onClicked: root.clicked()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component{
|
||||||
|
id: normalButton
|
||||||
|
StatusButton {
|
||||||
|
objectName: root.aliasedObjectName
|
||||||
|
icon.name: root.icon
|
||||||
|
text: root.text
|
||||||
|
enabled: root.interactive
|
||||||
|
onClicked: root.clicked()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -38,3 +38,4 @@ GetSyncCodeMobileInstructions 1.0 GetSyncCodeMobileInstructions.qml
|
|||||||
GetSyncCodeDesktopInstructions 1.0 GetSyncCodeDesktopInstructions.qml
|
GetSyncCodeDesktopInstructions 1.0 GetSyncCodeDesktopInstructions.qml
|
||||||
ErrorDetails 1.0 ErrorDetails.qml
|
ErrorDetails 1.0 ErrorDetails.qml
|
||||||
CopyButton 1.0 CopyButton.qml
|
CopyButton 1.0 CopyButton.qml
|
||||||
|
DisabledTooltipButton 1.0 DisabledTooltipButton.qml
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
import QtQuick 2.13
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.13
|
import QtQuick.Controls 2.13
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
|
|
||||||
|
import StatusQ.Core.Theme 0.1
|
||||||
|
import StatusQ.Controls 0.1
|
||||||
|
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
import shared 1.0
|
import shared 1.0
|
||||||
import shared.panels 1.0
|
import shared.panels 1.0
|
||||||
@ -13,6 +16,7 @@ Item {
|
|||||||
Default,
|
Default,
|
||||||
LargeNoIcon
|
LargeNoIcon
|
||||||
}
|
}
|
||||||
|
property alias tooltip: tooltip
|
||||||
property int style: StatusStickerButton.StyleType.Default
|
property int style: StatusStickerButton.StyleType.Default
|
||||||
property int packPrice: 0
|
property int packPrice: 0
|
||||||
property bool isBought: false
|
property bool isBought: false
|
||||||
@ -22,14 +26,15 @@ Item {
|
|||||||
property bool isTimedOut: false
|
property bool isTimedOut: false
|
||||||
property bool hasInsufficientFunds: false
|
property bool hasInsufficientFunds: false
|
||||||
property bool enabled: true
|
property bool enabled: true
|
||||||
|
property bool greyedOut: false
|
||||||
property var icon: new Object({
|
property var icon: new Object({
|
||||||
path: Style.svg("status-logo-no-bg"),
|
path: Style.svg("status-logo-no-bg"),
|
||||||
rotation: 0,
|
rotation: 0,
|
||||||
runAnimation: false
|
runAnimation: false
|
||||||
})
|
})
|
||||||
property string text: root.style === StatusStickerButton.StyleType.Default ? packPrice : qsTr("Buy for %1 SNT").arg(packPrice )
|
property string text: root.style === StatusStickerButton.StyleType.Default ? packPrice : qsTr("Buy for %1 SNT").arg(packPrice )
|
||||||
property color textColor: style === StatusStickerButton.StyleType.Default ? Style.current.roundedButtonSecondaryForegroundColor : Style.current.buttonForegroundColor
|
property color textColor: root.greyedOut ? Theme.palette.baseColor1 : style === StatusStickerButton.StyleType.Default ? Style.current.roundedButtonSecondaryForegroundColor : Style.current.buttonForegroundColor
|
||||||
property color bgColor: style === StatusStickerButton.StyleType.Default ? Style.current.blue : Style.current.secondaryBackground
|
property color bgColor: root.greyedOut ? Theme.palette.baseColor2 : style === StatusStickerButton.StyleType.Default ? Style.current.blue : Style.current.secondaryBackground
|
||||||
signal uninstallClicked()
|
signal uninstallClicked()
|
||||||
signal installClicked()
|
signal installClicked()
|
||||||
signal cancelClicked()
|
signal cancelClicked()
|
||||||
@ -44,8 +49,8 @@ Item {
|
|||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: root;
|
target: root;
|
||||||
text: root.style === StatusStickerButton.StyleType.Default ? "" : qsTr("Uninstall");
|
text: root.style === StatusStickerButton.StyleType.Default ? "" : qsTr("Uninstall");
|
||||||
textColor: root.style === StatusStickerButton.StyleType.Default ? Style.current.roundedButtonSecondaryForegroundColor : Style.current.red;
|
textColor: root.style === StatusStickerButton.StyleType.Default ? Style.current.roundedButtonSecondaryForegroundColor : root.greyedOut ? Theme.palette.baseColor1 : Style.current.red;
|
||||||
bgColor: root.style === StatusStickerButton.StyleType.Default ? Style.current.green : Style.current.lightRed;
|
bgColor: root.style === StatusStickerButton.StyleType.Default ? Style.current.green : root.greyedOut ? Theme.palette.baseColor2 : Style.current.lightRed;
|
||||||
icon: new Object({
|
icon: new Object({
|
||||||
path: Style.svg("check"),
|
path: Style.svg("check"),
|
||||||
rotation: 0,
|
rotation: 0,
|
||||||
@ -182,7 +187,7 @@ Item {
|
|||||||
ColorOverlay {
|
ColorOverlay {
|
||||||
anchors.fill: roundedIconImage
|
anchors.fill: roundedIconImage
|
||||||
source: roundedIconImage
|
source: roundedIconImage
|
||||||
color: Style.current.roundedButtonSecondaryForegroundColor
|
color: root.greyedOut && !root.isInstalled ? Theme.palette.baseColor1 : Style.current.roundedButtonSecondaryForegroundColor
|
||||||
antialiasing: true
|
antialiasing: true
|
||||||
}
|
}
|
||||||
states: [
|
states: [
|
||||||
@ -239,11 +244,23 @@ Item {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Tooltip only in case we are browsing an item to be installed/downloaded/bought
|
||||||
|
HoverHandler {
|
||||||
|
id: hoverHandler
|
||||||
|
enabled: root.greyedOut && !root.isInstalled
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
}
|
||||||
|
StatusToolTip {
|
||||||
|
id: tooltip
|
||||||
|
visible: hoverHandler.hovered
|
||||||
|
maxWidth: 300
|
||||||
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: mouseArea
|
id: mouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||||
enabled: !root.isPending
|
enabled: !root.isPending && !root.greyedOut
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (root.isPending) return;
|
if (root.isPending) return;
|
||||||
|
@ -137,6 +137,8 @@ Item {
|
|||||||
isInstalled: installed
|
isInstalled: installed
|
||||||
isBought: bought
|
isBought: bought
|
||||||
isPending: pending
|
isPending: pending
|
||||||
|
greyedOut: !root.store.networkConnectionStore.stickersNetworkAvailable
|
||||||
|
tooltip.text: root.store.networkConnectionStore.stickersNetworkUnavailableText
|
||||||
onInstallClicked: root.installClicked(stickers, packId, index)
|
onInstallClicked: root.installClicked(stickers, packId, index)
|
||||||
onUninstallClicked: root.uninstallClicked(packId)
|
onUninstallClicked: root.uninstallClicked(packId)
|
||||||
onCancelClicked: root.cancelClicked(packId)
|
onCancelClicked: root.cancelClicked(packId)
|
||||||
@ -235,6 +237,8 @@ Item {
|
|||||||
isInstalled: installed
|
isInstalled: installed
|
||||||
isBought: bought
|
isBought: bought
|
||||||
isPending: pending
|
isPending: pending
|
||||||
|
greyedOut: !root.store.networkConnectionStore.stickersNetworkAvailable
|
||||||
|
tooltip.text: root.store.networkConnectionStore.stickersNetworkUnavailableText
|
||||||
onInstallClicked: root.installClicked(stickers, packId, index)
|
onInstallClicked: root.installClicked(stickers, packId, index)
|
||||||
onUninstallClicked: root.uninstallClicked(packId)
|
onUninstallClicked: root.uninstallClicked(packId)
|
||||||
onCancelClicked: root.cancelClicked(packId)
|
onCancelClicked: root.cancelClicked(packId)
|
||||||
|
@ -140,6 +140,8 @@ ModalPopup {
|
|||||||
isInstalled: installed
|
isInstalled: installed
|
||||||
isBought: bought
|
isBought: bought
|
||||||
isPending: pending
|
isPending: pending
|
||||||
|
greyedOut: store.networkConnectionStore.stickersNetworkAvailable
|
||||||
|
tooltip.text: root.store.networkConnectionStore.stickersNetworkUnavailableText
|
||||||
onInstallClicked: {
|
onInstallClicked: {
|
||||||
stickersModule.install(packId);
|
stickersModule.install(packId);
|
||||||
stickerPackDetailsPopup.close();
|
stickerPackDetailsPopup.close();
|
||||||
|
@ -21,16 +21,15 @@ QtObject {
|
|||||||
readonly property bool sendBuyBridgeEnabled: localAppSettings.testEnvironment || (isOnline &&
|
readonly property bool sendBuyBridgeEnabled: localAppSettings.testEnvironment || (isOnline &&
|
||||||
(!networkConnectionModule.blockchainNetworkConnection.completelyDown && atleastOneBlockchainNetworkAvailable) &&
|
(!networkConnectionModule.blockchainNetworkConnection.completelyDown && atleastOneBlockchainNetworkAvailable) &&
|
||||||
!networkConnectionModule.marketValuesNetworkConnection.completelyDown)
|
!networkConnectionModule.marketValuesNetworkConnection.completelyDown)
|
||||||
readonly property string sendBuyBridgeToolTipText: !isOnline ?
|
readonly property string sendBuyBridgeToolTipText: !isOnline ? qsTr("Requires internet connection") :
|
||||||
qsTr("Requires internet connection") :
|
noBlockchainAndMarketConnectionAndNoCache ?
|
||||||
networkConnectionModule.blockchainNetworkConnection.completelyDown ||
|
qsTr("Requires POKT/Infura and CryptoCompare/CoinGecko, which are all currently unavailable") :
|
||||||
(!networkConnectionModule.blockchainNetworkConnection.completelyDown &&
|
networkConnectionModule.blockchainNetworkConnection.completelyDown ||
|
||||||
!atleastOneBlockchainNetworkAvailable) ?
|
(!networkConnectionModule.blockchainNetworkConnection.completelyDown &&
|
||||||
qsTr("Requires Pocket Network(POKT) or Infura, both of which are currently unavailable") :
|
!atleastOneBlockchainNetworkAvailable) ?
|
||||||
networkConnectionModule.marketValuesNetworkConnection.completelyDown ?
|
qsTr("Requires Pocket Network(POKT) or Infura, both of which are currently unavailable") :
|
||||||
qsTr("Requires CryptoCompare or CoinGecko, both of which are currently unavailable"):
|
networkConnectionModule.marketValuesNetworkConnection.completelyDown ?
|
||||||
qsTr("Requires POKT/ Infura and CryptoCompare/CoinGecko, which are all currently unavailable")
|
qsTr("Requires CryptoCompare or CoinGecko, both of which are currently unavailable"): ""
|
||||||
|
|
||||||
|
|
||||||
readonly property bool notOnlineWithNoCache: !isOnline && !walletSectionCurrent.hasBalanceCache && !walletSectionCurrent.hasMarketValuesCache
|
readonly property bool notOnlineWithNoCache: !isOnline && !walletSectionCurrent.hasBalanceCache && !walletSectionCurrent.hasMarketValuesCache
|
||||||
readonly property string notOnlineWithNoCacheText: qsTr("Internet connection lost. Data could not be retrieved.")
|
readonly property string notOnlineWithNoCacheText: qsTr("Internet connection lost. Data could not be retrieved.")
|
||||||
@ -50,7 +49,12 @@ QtObject {
|
|||||||
networkConnectionModule.blockchainNetworkConnection.completelyDown ? noBlockchainConnectionAndNoCacheText :
|
networkConnectionModule.blockchainNetworkConnection.completelyDown ? noBlockchainConnectionAndNoCacheText :
|
||||||
networkConnectionModule.marketValuesNetworkConnection.completelyDown ? noBlockchainAndMarketConnectionAndNoCacheText : ""
|
networkConnectionModule.marketValuesNetworkConnection.completelyDown ? noBlockchainAndMarketConnectionAndNoCacheText : ""
|
||||||
|
|
||||||
property bool noTokenBalanceAvailable: networkConnectionStore.notOnlineWithNoCache || networkConnectionStore.noBlockchainConnectionAndNoCache
|
readonly property bool noTokenBalanceAvailable: networkConnectionStore.notOnlineWithNoCache || networkConnectionStore.noBlockchainConnectionAndNoCache
|
||||||
|
|
||||||
|
readonly property bool ensNetworkAvailable: !blockchainNetworksDown.includes(profileSectionModule.ensUsernamesModule.chainId.toString())
|
||||||
|
readonly property string ensNetworkUnavailableText: qsTr("Requires POKT/Infura for %1, which is currently unavailable").arg( networksModule.all.getNetworkFullName(profileSectionModule.ensUsernamesModule.chainId))
|
||||||
|
readonly property bool stickersNetworkAvailable: false//!blockchainNetworksDown.includes(stickersModule.getChainIdForStickers().toString())
|
||||||
|
readonly property string stickersNetworkUnavailableText: qsTr("Requires POKT/Infura for %1, which is currently unavailable").arg( networksModule.all.getNetworkFullName(stickersModule.getChainIdForStickers()))
|
||||||
|
|
||||||
function getBlockchainNetworkDownTextForToken(balances) {
|
function getBlockchainNetworkDownTextForToken(balances) {
|
||||||
if(!!balances && !networkConnectionModule.blockchainNetworkConnection.completelyDown && !networkConnectionStore.notOnlineWithNoCache) {
|
if(!!balances && !networkConnectionModule.blockchainNetworkConnection.completelyDown && !networkConnectionStore.notOnlineWithNoCache) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user