feat; Rename to payment request (instead of request payment)
This commit is contained in:
parent
7b4fde45d9
commit
6556a356b7
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
|
@ -100,7 +100,7 @@ SplitView {
|
|||
}
|
||||
}
|
||||
|
||||
requestPaymentEnabled: true
|
||||
paymentRequestEnabled: true
|
||||
|
||||
onSendMessage: {
|
||||
logs.logEvent("StatusChatInput::sendMessage", ["MessageWithPk"], [chatInput.getTextWithPublicKeys()])
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -39,7 +39,7 @@ StatusDialog {
|
|||
return amountToSendInput.text
|
||||
}
|
||||
|
||||
objectName: "requestPaymentModal"
|
||||
objectName: "paymentRequestModal"
|
||||
|
||||
implicitWidth: 480
|
||||
implicitHeight: 470
|
|
@ -1,2 +1,2 @@
|
|||
PinnedMessagesPopup 1.0 PinnedMessagesPopup.qml
|
||||
RequestPaymentModal 1.0 RequestPaymentModal.qml
|
||||
PaymentRequestModal 1.0 PaymentRequestModal.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) {
|
||||
|
|
|
@ -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} )
|
||||
}
|
||||
|
|
|
@ -5,5 +5,5 @@ QtObject {
|
|||
property bool dappsEnabled
|
||||
property bool swapEnabled
|
||||
property bool sendViaPersonalChatEnabled
|
||||
property bool requestPaymentEnabled
|
||||
property bool paymentRequestEnabled
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue