diff --git a/src/app/global/feature_flags.nim b/src/app/global/feature_flags.nim index 5cfd20cdf9..6212ac4b93 100644 --- a/src/app/global/feature_flags.nim +++ b/src/app/global/feature_flags.nim @@ -5,7 +5,7 @@ const DEFAULT_FLAG_DAPPS_ENABLED = true const DEFAULT_FLAG_SWAP_ENABLED = true const DEFAULT_FLAG_CONNECTOR_ENABLED* = false const DEFAULT_FLAG_SEND_VIA_PERSONAL_CHAT_ENABLED = true -const DEFAULT_FLAG_REQUEST_PAYMENT_ENABLED = true +const DEFAULT_FLAG_PAYMENT_REQUEST_ENABLED = true proc boolToEnv*(defaultValue: bool): string = return if defaultValue: "1" else: "0" @@ -16,7 +16,7 @@ QtObject: swapEnabled: bool connectorEnabled: bool sendViaPersonalChatEnabled: bool - requestPaymentEnabled: bool + paymentRequestEnabled: bool proc setup(self: FeatureFlags) = self.QObject.setup() @@ -24,7 +24,7 @@ QtObject: self.swapEnabled = getEnv("FLAG_SWAP_ENABLED", boolToEnv(DEFAULT_FLAG_SWAP_ENABLED)) != "0" self.connectorEnabled = getEnv("FLAG_CONNECTOR_ENABLED", boolToEnv(DEFAULT_FLAG_CONNECTOR_ENABLED)) != "0" self.sendViaPersonalChatEnabled = getEnv("FLAG_SEND_VIA_PERSONAL_CHAT_ENABLED", boolToEnv(DEFAULT_FLAG_SEND_VIA_PERSONAL_CHAT_ENABLED)) != "0" - self.requestPaymentEnabled = getEnv("FLAG_REQUEST_PAYMENT_ENABLED", boolToEnv(DEFAULT_FLAG_REQUEST_PAYMENT_ENABLED)) != "0" + self.paymentRequestEnabled = getEnv("FLAG_PAYMENT_REQUEST_ENABLED", boolToEnv(DEFAULT_FLAG_PAYMENT_REQUEST_ENABLED)) != "0" proc delete*(self: FeatureFlags) = self.QObject.delete() @@ -57,8 +57,8 @@ QtObject: QtProperty[bool] sendViaPersonalChatEnabled: read = getSendViaPersonalChatEnabled - proc getRequestPaymentEnabled*(self: FeatureFlags): bool {.slot.} = - return self.requestPaymentEnabled + proc getPaymentRequestEnabled*(self: FeatureFlags): bool {.slot.} = + return self.paymentRequestEnabled - QtProperty[bool] requestPaymentEnabled: - read = getRequestPaymentEnabled + QtProperty[bool] paymentRequestEnabled: + read = getPaymentRequestEnabled diff --git a/storybook/pages/RequestPaymentModalPage.qml b/storybook/pages/PaymentRequestModalPage.qml similarity index 90% rename from storybook/pages/RequestPaymentModalPage.qml rename to storybook/pages/PaymentRequestModalPage.qml index f0c1ee321a..0608707c1b 100644 --- a/storybook/pages/RequestPaymentModalPage.qml +++ b/storybook/pages/PaymentRequestModalPage.qml @@ -33,7 +33,7 @@ SplitView { readonly property var tokenBySymbolModel: TokensBySymbolModel {} function launchPopup() { - requestPaymentModalComponent.createObject(root) + paymentRequestModalComponent.createObject(root) } readonly property var accounts: WalletAccountsModel {} @@ -69,7 +69,7 @@ SplitView { id: reopenButton anchors.centerIn: parent text: "Reopen" - enabled: !requestPaymentModalComponent.visible + enabled: !paymentRequestModalComponent.visible onClicked: d.launchPopup() } @@ -77,9 +77,9 @@ SplitView { Component.onCompleted: Qt.callLater(d.launchPopup) Component { - id: requestPaymentModalComponent - RequestPaymentModal { - id: requestPaymentModal + id: paymentRequestModalComponent + PaymentRequestModal { + id: paymentRequestModal visible: true modal: false closePolicy: Popup.CloseOnEscape @@ -93,17 +93,17 @@ SplitView { Connections { target: d function onSelectedNetworkChainIdChanged() { - requestPaymentModal.selectedNetworkChainId = d.selectedNetworkChainId + paymentRequestModal.selectedNetworkChainId = d.selectedNetworkChainId } function onSelectedAccountAddressChanged() { - requestPaymentModal.selectedAccountAddress = d.selectedAccountAddress + paymentRequestModal.selectedAccountAddress = d.selectedAccountAddress } } Component.onCompleted: { if (d.selectedNetworkChainId > -1) - requestPaymentModal.selectedNetworkChainId = d.selectedNetworkChainId + paymentRequestModal.selectedNetworkChainId = d.selectedNetworkChainId if (!!d.selectedAccountAddress) - requestPaymentModal.selectedAccountAddress = d.selectedAccountAddress + paymentRequestModal.selectedAccountAddress = d.selectedAccountAddress } } } diff --git a/storybook/pages/StatusChatInputPage.qml b/storybook/pages/StatusChatInputPage.qml index a83a9b0497..c321e90c49 100644 --- a/storybook/pages/StatusChatInputPage.qml +++ b/storybook/pages/StatusChatInputPage.qml @@ -100,7 +100,7 @@ SplitView { } } - requestPaymentEnabled: true + paymentRequestEnabled: true onSendMessage: { logs.logEvent("StatusChatInput::sendMessage", ["MessageWithPk"], [chatInput.getTextWithPublicKeys()]) diff --git a/ui/app/AppLayouts/Chat/ChatLayout.qml b/ui/app/AppLayouts/Chat/ChatLayout.qml index 45bba8f1ba..d8c126acb8 100644 --- a/ui/app/AppLayouts/Chat/ChatLayout.qml +++ b/ui/app/AppLayouts/Chat/ChatLayout.qml @@ -37,7 +37,7 @@ StackLayout { required property WalletStore.WalletAssetsStore walletAssetsStore required property SharedStores.CurrenciesStore currencyStore property bool areTestNetworksEnabled - property bool requestPaymentEnabled + property bool paymentRequestEnabled property var sectionItemModel @@ -176,7 +176,7 @@ StackLayout { root.sectionItemModel.memberRole === Constants.memberRole.tokenMaster hasViewOnlyPermissions: root.permissionsStore.viewOnlyPermissionsModel.count > 0 sendViaPersonalChatEnabled: root.sendViaPersonalChatEnabled - requestPaymentEnabled: root.requestPaymentEnabled + paymentRequestEnabled: root.paymentRequestEnabled hasUnrestrictedViewOnlyPermission: { viewOnlyUnrestrictedPermissionHelper.revision diff --git a/ui/app/AppLayouts/Chat/popups/RequestPaymentModal.qml b/ui/app/AppLayouts/Chat/popups/PaymentRequestModal.qml similarity index 99% rename from ui/app/AppLayouts/Chat/popups/RequestPaymentModal.qml rename to ui/app/AppLayouts/Chat/popups/PaymentRequestModal.qml index 5b9b990abc..f66620a52b 100644 --- a/ui/app/AppLayouts/Chat/popups/RequestPaymentModal.qml +++ b/ui/app/AppLayouts/Chat/popups/PaymentRequestModal.qml @@ -39,7 +39,7 @@ StatusDialog { return amountToSendInput.text } - objectName: "requestPaymentModal" + objectName: "paymentRequestModal" implicitWidth: 480 implicitHeight: 470 diff --git a/ui/app/AppLayouts/Chat/popups/qmldir b/ui/app/AppLayouts/Chat/popups/qmldir index 0cebda8ea7..7a73d227cb 100644 --- a/ui/app/AppLayouts/Chat/popups/qmldir +++ b/ui/app/AppLayouts/Chat/popups/qmldir @@ -1,2 +1,2 @@ PinnedMessagesPopup 1.0 PinnedMessagesPopup.qml -RequestPaymentModal 1.0 RequestPaymentModal.qml +PaymentRequestModal 1.0 PaymentRequestModal.qml diff --git a/ui/app/AppLayouts/Chat/views/ChatColumnView.qml b/ui/app/AppLayouts/Chat/views/ChatColumnView.qml index a0a737eb2e..415d195d2d 100644 --- a/ui/app/AppLayouts/Chat/views/ChatColumnView.qml +++ b/ui/app/AppLayouts/Chat/views/ChatColumnView.qml @@ -57,7 +57,7 @@ Item { property var viewAndPostHoldingsModel property bool amISectionAdmin: false property bool sendViaPersonalChatEnabled - property bool requestPaymentEnabled + property bool paymentRequestEnabled signal openStickerPackPopup(string stickerPackId) @@ -327,7 +327,7 @@ Item { stickersPopup: root.stickersPopup chatType: root.activeChatType areTestNetworksEnabled: root.areTestNetworksEnabled - requestPaymentEnabled: root.requestPaymentEnabled + paymentRequestEnabled: root.paymentRequestEnabled textInput.onTextChanged: { if (!!d.activeChatContentModule && textInput.text !== d.activeChatContentModule.inputAreaModule.preservedProperties.text) { diff --git a/ui/app/AppLayouts/Chat/views/ChatView.qml b/ui/app/AppLayouts/Chat/views/ChatView.qml index c639e86f39..54442491eb 100644 --- a/ui/app/AppLayouts/Chat/views/ChatView.qml +++ b/ui/app/AppLayouts/Chat/views/ChatView.qml @@ -78,7 +78,7 @@ StatusSectionLayout { property var collectiblesModel property bool sendViaPersonalChatEnabled - property bool requestPaymentEnabled + property bool paymentRequestEnabled readonly property bool contentLocked: { if (!rootStore.chatCommunitySectionModule.isCommunity()) { @@ -282,7 +282,7 @@ StatusSectionLayout { canPost: !root.rootStore.chatCommunitySectionModule.isCommunity() || root.canPost amISectionAdmin: root.amISectionAdmin sendViaPersonalChatEnabled: root.sendViaPersonalChatEnabled - requestPaymentEnabled: root.requestPaymentEnabled + paymentRequestEnabled: root.paymentRequestEnabled onOpenStickerPackPopup: { Global.openPopup(statusStickerPackClickPopup, {packId: stickerPackId, store: root.stickersPopup.store} ) } diff --git a/ui/app/AppLayouts/stores/FeatureFlagsStore.qml b/ui/app/AppLayouts/stores/FeatureFlagsStore.qml index 303efe410b..af87bdcaa9 100644 --- a/ui/app/AppLayouts/stores/FeatureFlagsStore.qml +++ b/ui/app/AppLayouts/stores/FeatureFlagsStore.qml @@ -5,5 +5,5 @@ QtObject { property bool dappsEnabled property bool swapEnabled property bool sendViaPersonalChatEnabled - property bool requestPaymentEnabled + property bool paymentRequestEnabled } diff --git a/ui/app/mainui/AppMain.qml b/ui/app/mainui/AppMain.qml index 124ed00d18..38b967b914 100644 --- a/ui/app/mainui/AppMain.qml +++ b/ui/app/mainui/AppMain.qml @@ -97,7 +97,7 @@ Item { dappsEnabled: featureFlags ? featureFlags.dappsEnabled : false swapEnabled: featureFlags ? featureFlags.swapEnabled : false sendViaPersonalChatEnabled: featureFlags ? featureFlags.sendViaPersonalChatEnabled : false - requestPaymentEnabled: featureFlags ? featureFlags.requestPaymentEnabled : false + paymentRequestEnabled: featureFlags ? featureFlags.paymentRequestEnabled : false } required property bool isCentralizedMetricsEnabled diff --git a/ui/app/mainui/Popups.qml b/ui/app/mainui/Popups.qml index 741614bd2b..56bfc508c0 100644 --- a/ui/app/mainui/Popups.qml +++ b/ui/app/mainui/Popups.qml @@ -105,7 +105,7 @@ QtObject { Global.openSwapModalRequested.connect(openSwapModal) Global.openBuyCryptoModalRequested.connect(openBuyCryptoModal) Global.privacyPolicyRequested.connect(() => openPopup(privacyPolicyPopupComponent)) - Global.openPaymentRequestModalRequested.connect(() => openPopup(requestPaymentPopupComponent)) + Global.openPaymentRequestModalRequested.connect(() => openPopup(paymentRequestPopupComponent)) } property var currentPopup @@ -1277,8 +1277,8 @@ QtObject { } }, Component { - id: requestPaymentPopupComponent - RequestPaymentModal { + id: paymentRequestPopupComponent + PaymentRequestModal { readonly property var tokenAdaptor: TokenSelectorViewAdaptor { assetsModel: WalletStores.RootStore.walletAssetsStore.groupedAccountAssetsModel flatNetworksModel: WalletStores.RootStore.filteredFlatModel diff --git a/ui/imports/shared/controls/chat/ChatInputLinksPreviewArea.qml b/ui/imports/shared/controls/chat/ChatInputLinksPreviewArea.qml index af150cb7d8..3b776012fe 100644 --- a/ui/imports/shared/controls/chat/ChatInputLinksPreviewArea.qml +++ b/ui/imports/shared/controls/chat/ChatInputLinksPreviewArea.qml @@ -34,7 +34,7 @@ Control { required property bool showLinkPreviewSettings readonly property alias hoveredUrl: d.hoveredUrl - readonly property bool hasContent: imagePreviewArray.length > 0 || showLinkPreviewSettings || linkPreviewRepeater.count > 0 || requestPaymentRepeater.count > 0 + readonly property bool hasContent: imagePreviewArray.length > 0 || showLinkPreviewSettings || linkPreviewRepeater.count > 0 || paymentRequestRepeater.count > 0 signal imageRemoved(int index) signal imageClicked(var chatImage) diff --git a/ui/imports/shared/status/StatusChatInput.qml b/ui/imports/shared/status/StatusChatInput.qml index 32fa0ad515..0a609bb056 100644 --- a/ui/imports/shared/status/StatusChatInput.qml +++ b/ui/imports/shared/status/StatusChatInput.qml @@ -49,7 +49,7 @@ Rectangle { // Use this to only enable the Connections only when this Input opens the Emoji popup property bool closeGifPopupAfterSelection: true property bool areTestNetworksEnabled - property bool requestPaymentEnabled: false + property bool paymentRequestEnabled: false property bool emojiEvent: false property bool isColonPressed: false @@ -1019,8 +1019,8 @@ Rectangle { StatusAction { text: qsTr("Add payment request") icon.name: "wallet" - visibleOnDisabled: control.requestPaymentEnabled - enabled: control.requestPaymentEnabled && !root.areTestNetworksEnabled + visibleOnDisabled: control.paymentRequestEnabled + enabled: control.paymentRequestEnabled && !root.areTestNetworksEnabled onTriggered: control.openPaymentRequestModal() }