Skip to content

Commit

Permalink
ui: add support section in general settings
Browse files Browse the repository at this point in the history
  • Loading branch information
borgbyte committed Jul 15, 2022
1 parent 7ecef2b commit 5b5ed51
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- Enable list addresses and coins on Singlesig wallets
- Support section in general settings to copy Support ID

### Changed
- Enable watch-only login for multisig shield liquid wallets
Expand Down
3 changes: 2 additions & 1 deletion qml/AccountIdBadge.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import QtQuick.Layouts 1.13
Button {
id: self
required property Account account
property bool amp: true
leftInset: 0
rightInset: 0
topInset: 0
Expand All @@ -25,7 +26,7 @@ Button {
spacing: 8
Label {
Layout.fillWidth: true
text: qsTrId('id_amp_id')
text: self.amp ? qsTrId('id_amp_id') : qsTrId('Support ID')
font.styleName: 'Regular'
}
Label {
Expand Down
9 changes: 5 additions & 4 deletions qml/CopyableLabel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ import QtQuick.Controls 2.13
Label {
property real delay: 500
property string copyText: text
function copy() {
Clipboard.copy(self.copyText)
ToolTip.show(qsTrId('id_copied_to_clipboard'), 1000)
}
id: self
background: MouseArea {
id: mouse_area
hoverEnabled: true
onClicked: {
Clipboard.copy(self.copyText)
ToolTip.show(qsTrId('id_copied_to_clipboard'), 1000)
}
onClicked: copy()
Rectangle {
anchors.fill: parent
anchors.margins: -4
Expand Down
13 changes: 13 additions & 0 deletions qml/WalletGeneralSettingsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,17 @@ ColumnLayout {
}
}
}

Loader {
Layout.fillWidth: true
active: !wallet.network.electrum
visible: active
sourceComponent: SettingsBox {
title: qsTrId('id_support')
contentItem: AccountIdBadge {
amp: false
account: wallet.accounts[0]
}
}
}
}

0 comments on commit 5b5ed51

Please sign in to comment.