feat; Rename to payment request (instead of request payment)

This commit is contained in:
Emil Sawicki 2024-11-23 14:30:22 +01:00
parent 7b4fde45d9
commit 6556a356b7
13 changed files with 34 additions and 34 deletions

View File

@ -5,7 +5,7 @@ const DEFAULT_FLAG_DAPPS_ENABLED = true
const DEFAULT_FLAG_SWAP_ENABLED = true const DEFAULT_FLAG_SWAP_ENABLED = true
const DEFAULT_FLAG_CONNECTOR_ENABLED* = false const DEFAULT_FLAG_CONNECTOR_ENABLED* = false
const DEFAULT_FLAG_SEND_VIA_PERSONAL_CHAT_ENABLED = true 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 = proc boolToEnv*(defaultValue: bool): string =
return if defaultValue: "1" else: "0" return if defaultValue: "1" else: "0"
@ -16,7 +16,7 @@ QtObject:
swapEnabled: bool swapEnabled: bool
connectorEnabled: bool connectorEnabled: bool
sendViaPersonalChatEnabled: bool sendViaPersonalChatEnabled: bool
requestPaymentEnabled: bool paymentRequestEnabled: bool
proc setup(self: FeatureFlags) = proc setup(self: FeatureFlags) =
self.QObject.setup() self.QObject.setup()
@ -24,7 +24,7 @@ QtObject:
self.swapEnabled = getEnv("FLAG_SWAP_ENABLED", boolToEnv(DEFAULT_FLAG_SWAP_ENABLED)) != "0" 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.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.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) = proc delete*(self: FeatureFlags) =
self.QObject.delete() self.QObject.delete()
@ -57,8 +57,8 @@ QtObject:
QtProperty[bool] sendViaPersonalChatEnabled: QtProperty[bool] sendViaPersonalChatEnabled:
read = getSendViaPersonalChatEnabled read = getSendViaPersonalChatEnabled
proc getRequestPaymentEnabled*(self: FeatureFlags): bool {.slot.} = proc getPaymentRequestEnabled*(self: FeatureFlags): bool {.slot.} =
return self.requestPaymentEnabled return self.paymentRequestEnabled
QtProperty[bool] requestPaymentEnabled: QtProperty[bool] paymentRequestEnabled:
read = getRequestPaymentEnabled read = getPaymentRequestEnabled

View File

@ -33,7 +33,7 @@ SplitView {
readonly property var tokenBySymbolModel: TokensBySymbolModel {} readonly property var tokenBySymbolModel: TokensBySymbolModel {}
function launchPopup() { function launchPopup() {
requestPaymentModalComponent.createObject(root) paymentRequestModalComponent.createObject(root)
} }
readonly property var accounts: WalletAccountsModel {} readonly property var accounts: WalletAccountsModel {}
@ -69,7 +69,7 @@ SplitView {
id: reopenButton id: reopenButton
anchors.centerIn: parent anchors.centerIn: parent
text: "Reopen" text: "Reopen"
enabled: !requestPaymentModalComponent.visible enabled: !paymentRequestModalComponent.visible
onClicked: d.launchPopup() onClicked: d.launchPopup()
} }
@ -77,9 +77,9 @@ SplitView {
Component.onCompleted: Qt.callLater(d.launchPopup) Component.onCompleted: Qt.callLater(d.launchPopup)
Component { Component {
id: requestPaymentModalComponent id: paymentRequestModalComponent
RequestPaymentModal { PaymentRequestModal {
id: requestPaymentModal id: paymentRequestModal
visible: true visible: true
modal: false modal: false
closePolicy: Popup.CloseOnEscape closePolicy: Popup.CloseOnEscape
@ -93,17 +93,17 @@ SplitView {
Connections { Connections {
target: d target: d
function onSelectedNetworkChainIdChanged() { function onSelectedNetworkChainIdChanged() {
requestPaymentModal.selectedNetworkChainId = d.selectedNetworkChainId paymentRequestModal.selectedNetworkChainId = d.selectedNetworkChainId
} }
function onSelectedAccountAddressChanged() { function onSelectedAccountAddressChanged() {
requestPaymentModal.selectedAccountAddress = d.selectedAccountAddress paymentRequestModal.selectedAccountAddress = d.selectedAccountAddress
} }
} }
Component.onCompleted: { Component.onCompleted: {
if (d.selectedNetworkChainId > -1) if (d.selectedNetworkChainId > -1)
requestPaymentModal.selectedNetworkChainId = d.selectedNetworkChainId paymentRequestModal.selectedNetworkChainId = d.selectedNetworkChainId
if (!!d.selectedAccountAddress) if (!!d.selectedAccountAddress)
requestPaymentModal.selectedAccountAddress = d.selectedAccountAddress paymentRequestModal.selectedAccountAddress = d.selectedAccountAddress
} }
} }
} }

View File

@ -100,7 +100,7 @@ SplitView {
} }
} }
requestPaymentEnabled: true paymentRequestEnabled: true
onSendMessage: { onSendMessage: {
logs.logEvent("StatusChatInput::sendMessage", ["MessageWithPk"], [chatInput.getTextWithPublicKeys()]) logs.logEvent("StatusChatInput::sendMessage", ["MessageWithPk"], [chatInput.getTextWithPublicKeys()])

View File

@ -37,7 +37,7 @@ StackLayout {
required property WalletStore.WalletAssetsStore walletAssetsStore required property WalletStore.WalletAssetsStore walletAssetsStore
required property SharedStores.CurrenciesStore currencyStore required property SharedStores.CurrenciesStore currencyStore
property bool areTestNetworksEnabled property bool areTestNetworksEnabled
property bool requestPaymentEnabled property bool paymentRequestEnabled
property var sectionItemModel property var sectionItemModel
@ -176,7 +176,7 @@ StackLayout {
root.sectionItemModel.memberRole === Constants.memberRole.tokenMaster root.sectionItemModel.memberRole === Constants.memberRole.tokenMaster
hasViewOnlyPermissions: root.permissionsStore.viewOnlyPermissionsModel.count > 0 hasViewOnlyPermissions: root.permissionsStore.viewOnlyPermissionsModel.count > 0
sendViaPersonalChatEnabled: root.sendViaPersonalChatEnabled sendViaPersonalChatEnabled: root.sendViaPersonalChatEnabled
requestPaymentEnabled: root.requestPaymentEnabled paymentRequestEnabled: root.paymentRequestEnabled
hasUnrestrictedViewOnlyPermission: { hasUnrestrictedViewOnlyPermission: {
viewOnlyUnrestrictedPermissionHelper.revision viewOnlyUnrestrictedPermissionHelper.revision

View File

@ -39,7 +39,7 @@ StatusDialog {
return amountToSendInput.text return amountToSendInput.text
} }
objectName: "requestPaymentModal" objectName: "paymentRequestModal"
implicitWidth: 480 implicitWidth: 480
implicitHeight: 470 implicitHeight: 470

View File

@ -1,2 +1,2 @@
PinnedMessagesPopup 1.0 PinnedMessagesPopup.qml PinnedMessagesPopup 1.0 PinnedMessagesPopup.qml
RequestPaymentModal 1.0 RequestPaymentModal.qml PaymentRequestModal 1.0 PaymentRequestModal.qml

View File

@ -57,7 +57,7 @@ Item {
property var viewAndPostHoldingsModel property var viewAndPostHoldingsModel
property bool amISectionAdmin: false property bool amISectionAdmin: false
property bool sendViaPersonalChatEnabled property bool sendViaPersonalChatEnabled
property bool requestPaymentEnabled property bool paymentRequestEnabled
signal openStickerPackPopup(string stickerPackId) signal openStickerPackPopup(string stickerPackId)
@ -327,7 +327,7 @@ Item {
stickersPopup: root.stickersPopup stickersPopup: root.stickersPopup
chatType: root.activeChatType chatType: root.activeChatType
areTestNetworksEnabled: root.areTestNetworksEnabled areTestNetworksEnabled: root.areTestNetworksEnabled
requestPaymentEnabled: root.requestPaymentEnabled paymentRequestEnabled: root.paymentRequestEnabled
textInput.onTextChanged: { textInput.onTextChanged: {
if (!!d.activeChatContentModule && textInput.text !== d.activeChatContentModule.inputAreaModule.preservedProperties.text) { if (!!d.activeChatContentModule && textInput.text !== d.activeChatContentModule.inputAreaModule.preservedProperties.text) {

View File

@ -78,7 +78,7 @@ StatusSectionLayout {
property var collectiblesModel property var collectiblesModel
property bool sendViaPersonalChatEnabled property bool sendViaPersonalChatEnabled
property bool requestPaymentEnabled property bool paymentRequestEnabled
readonly property bool contentLocked: { readonly property bool contentLocked: {
if (!rootStore.chatCommunitySectionModule.isCommunity()) { if (!rootStore.chatCommunitySectionModule.isCommunity()) {
@ -282,7 +282,7 @@ StatusSectionLayout {
canPost: !root.rootStore.chatCommunitySectionModule.isCommunity() || root.canPost canPost: !root.rootStore.chatCommunitySectionModule.isCommunity() || root.canPost
amISectionAdmin: root.amISectionAdmin amISectionAdmin: root.amISectionAdmin
sendViaPersonalChatEnabled: root.sendViaPersonalChatEnabled sendViaPersonalChatEnabled: root.sendViaPersonalChatEnabled
requestPaymentEnabled: root.requestPaymentEnabled paymentRequestEnabled: root.paymentRequestEnabled
onOpenStickerPackPopup: { onOpenStickerPackPopup: {
Global.openPopup(statusStickerPackClickPopup, {packId: stickerPackId, store: root.stickersPopup.store} ) Global.openPopup(statusStickerPackClickPopup, {packId: stickerPackId, store: root.stickersPopup.store} )
} }

View File

@ -5,5 +5,5 @@ QtObject {
property bool dappsEnabled property bool dappsEnabled
property bool swapEnabled property bool swapEnabled
property bool sendViaPersonalChatEnabled property bool sendViaPersonalChatEnabled
property bool requestPaymentEnabled property bool paymentRequestEnabled
} }

View File

@ -97,7 +97,7 @@ Item {
dappsEnabled: featureFlags ? featureFlags.dappsEnabled : false dappsEnabled: featureFlags ? featureFlags.dappsEnabled : false
swapEnabled: featureFlags ? featureFlags.swapEnabled : false swapEnabled: featureFlags ? featureFlags.swapEnabled : false
sendViaPersonalChatEnabled: featureFlags ? featureFlags.sendViaPersonalChatEnabled : false sendViaPersonalChatEnabled: featureFlags ? featureFlags.sendViaPersonalChatEnabled : false
requestPaymentEnabled: featureFlags ? featureFlags.requestPaymentEnabled : false paymentRequestEnabled: featureFlags ? featureFlags.paymentRequestEnabled : false
} }
required property bool isCentralizedMetricsEnabled required property bool isCentralizedMetricsEnabled

View File

@ -105,7 +105,7 @@ QtObject {
Global.openSwapModalRequested.connect(openSwapModal) Global.openSwapModalRequested.connect(openSwapModal)
Global.openBuyCryptoModalRequested.connect(openBuyCryptoModal) Global.openBuyCryptoModalRequested.connect(openBuyCryptoModal)
Global.privacyPolicyRequested.connect(() => openPopup(privacyPolicyPopupComponent)) Global.privacyPolicyRequested.connect(() => openPopup(privacyPolicyPopupComponent))
Global.openPaymentRequestModalRequested.connect(() => openPopup(requestPaymentPopupComponent)) Global.openPaymentRequestModalRequested.connect(() => openPopup(paymentRequestPopupComponent))
} }
property var currentPopup property var currentPopup
@ -1277,8 +1277,8 @@ QtObject {
} }
}, },
Component { Component {
id: requestPaymentPopupComponent id: paymentRequestPopupComponent
RequestPaymentModal { PaymentRequestModal {
readonly property var tokenAdaptor: TokenSelectorViewAdaptor { readonly property var tokenAdaptor: TokenSelectorViewAdaptor {
assetsModel: WalletStores.RootStore.walletAssetsStore.groupedAccountAssetsModel assetsModel: WalletStores.RootStore.walletAssetsStore.groupedAccountAssetsModel
flatNetworksModel: WalletStores.RootStore.filteredFlatModel flatNetworksModel: WalletStores.RootStore.filteredFlatModel

View File

@ -34,7 +34,7 @@ Control {
required property bool showLinkPreviewSettings required property bool showLinkPreviewSettings
readonly property alias hoveredUrl: d.hoveredUrl 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 imageRemoved(int index)
signal imageClicked(var chatImage) signal imageClicked(var chatImage)

View File

@ -49,7 +49,7 @@ Rectangle {
// Use this to only enable the Connections only when this Input opens the Emoji popup // Use this to only enable the Connections only when this Input opens the Emoji popup
property bool closeGifPopupAfterSelection: true property bool closeGifPopupAfterSelection: true
property bool areTestNetworksEnabled property bool areTestNetworksEnabled
property bool requestPaymentEnabled: false property bool paymentRequestEnabled: false
property bool emojiEvent: false property bool emojiEvent: false
property bool isColonPressed: false property bool isColonPressed: false
@ -1019,8 +1019,8 @@ Rectangle {
StatusAction { StatusAction {
text: qsTr("Add payment request") text: qsTr("Add payment request")
icon.name: "wallet" icon.name: "wallet"
visibleOnDisabled: control.requestPaymentEnabled visibleOnDisabled: control.paymentRequestEnabled
enabled: control.requestPaymentEnabled && !root.areTestNetworksEnabled enabled: control.paymentRequestEnabled && !root.areTestNetworksEnabled
onTriggered: control.openPaymentRequestModal() onTriggered: control.openPaymentRequestModal()
} }