mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 03:59:38 +00:00
Redesigned shared ringdb panel
This commit is contained in:
parent
72541b6d51
commit
c13b4cb7bd
4 changed files with 214 additions and 188 deletions
|
@ -129,7 +129,7 @@ Rectangle {
|
|||
}, State {
|
||||
name: "SharedRingDB"
|
||||
PropertyChanges { target: root; currentView: sharedringdbView }
|
||||
PropertyChanges { target: mainFlickable; contentHeight: minHeight }
|
||||
PropertyChanges { target: mainFlickable; contentHeight: sharedringdbView.panelHeight + 100 }
|
||||
}, State {
|
||||
name: "AddressBook"
|
||||
PropertyChanges { target: root; currentView: addressBookView }
|
||||
|
|
|
@ -32,7 +32,7 @@ import "../components" as MoneroComponents
|
|||
|
||||
Label {
|
||||
id: item
|
||||
fontSize: 17 * scaleRatio
|
||||
fontSize: 18 * scaleRatio
|
||||
|
||||
Rectangle {
|
||||
anchors.top: item.bottom
|
||||
|
|
|
@ -36,7 +36,7 @@ import "../components"
|
|||
import moneroComponents.Clipboard 1.0
|
||||
|
||||
Rectangle {
|
||||
|
||||
property alias panelHeight: mainLayout.height
|
||||
color: "transparent"
|
||||
|
||||
Clipboard { id: clipboard }
|
||||
|
@ -70,37 +70,44 @@ Rectangle {
|
|||
/* main layout */
|
||||
ColumnLayout {
|
||||
id: mainLayout
|
||||
anchors.margins: 40
|
||||
anchors.margins: (isMobile)? 17 : 20
|
||||
anchors.topMargin: 40 * scaleRatio
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
|
||||
spacing: 20
|
||||
spacing: 20 * scaleRatio
|
||||
property int labelWidth: 120
|
||||
property int editWidth: 400
|
||||
property int lineEditFontSize: 12
|
||||
property int lineEditFontSize: 14 * scaleRatio
|
||||
|
||||
MessageDialog {
|
||||
id: sharedRingDBDialog
|
||||
standardButtons: StandardButton.Ok
|
||||
}
|
||||
|
||||
Text {
|
||||
text: qsTr("This page allows you to interact with the shared ring database.<br>" +
|
||||
"This database is meant for use by Monero wallets as well as wallets from Monero clones which reuse the Monero keys.") + translationManager.emptyString
|
||||
wrapMode: Text.Wrap
|
||||
Layout.fillWidth: true;
|
||||
color: Style.defaultFontColor
|
||||
Label {
|
||||
id: signTitleLabel
|
||||
fontSize: 24 * scaleRatio
|
||||
text: qsTr("Shared RingDB") + translationManager.emptyString
|
||||
}
|
||||
|
||||
Text {
|
||||
text: qsTr("This page allows you to interact with the shared ring database. " +
|
||||
"This database is meant for use by Monero wallets as well as wallets from Monero clones which reuse the Monero keys.") + translationManager.emptyString
|
||||
wrapMode: Text.Wrap
|
||||
Layout.fillWidth: true
|
||||
font.family: Style.fontRegular.name
|
||||
font.pixelSize: 14 * scaleRatio
|
||||
color: Style.defaultFontColor
|
||||
}
|
||||
|
||||
LabelSubheader {
|
||||
Layout.fillWidth: true
|
||||
textFormat: Text.RichText
|
||||
text: "<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style>" +
|
||||
"<font size='+2'>" + qsTr("Blackballed outputs") + "</font>" + "<font size='2'> (</font><a href='#'>" + qsTr("help") + "</a><font size='2'>)</font><br>" +
|
||||
qsTr("This sets which outputs are known to be spent, and thus not to be used as privacy placeholders in ring signatures.<br>") +
|
||||
qsTr("You should only have to load a file when you want to refresh the list. Manual adding/removing is possible if needed.") + translationManager.emptyString
|
||||
wrapMode: Text.Wrap
|
||||
Layout.fillWidth: true;
|
||||
qsTr("Blackballed outputs") + " (<a href='#'>" + qsTr("help") + "</a>)" + translationManager.emptyString
|
||||
onLinkActivated: {
|
||||
sharedRingDBDialog.title = qsTr("Blackballed outputs") + translationManager.emptyString;
|
||||
sharedRingDBDialog.text = qsTr(
|
||||
|
@ -118,14 +125,22 @@ Rectangle {
|
|||
sharedRingDBDialog.icon = StandardIcon.Information
|
||||
sharedRingDBDialog.open()
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
textFormat: Text.RichText
|
||||
font.family: Style.fontRegular.name
|
||||
font.pixelSize: 14 * scaleRatio
|
||||
text: qsTr("This sets which outputs are known to be spent, and thus not to be used as privacy placeholders in ring signatures. ") +
|
||||
qsTr("You should only have to load a file when you want to refresh the list. Manual adding/removing is possible if needed.") + translationManager.emptyString
|
||||
wrapMode: Text.Wrap
|
||||
Layout.fillWidth: true;
|
||||
color: Style.defaultFontColor
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: loadBlackballFileRow
|
||||
anchors.topMargin: 17
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 12
|
||||
|
||||
FileDialog {
|
||||
id: loadBlackballFileDialog
|
||||
|
@ -138,10 +153,29 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
LineEdit {
|
||||
id: loadBlackballFileLine
|
||||
Layout.fillWidth: true
|
||||
fontSize: mainLayout.lineEditFontSize
|
||||
placeholderText: qsTr("Path to file") + "..." + translationManager.emptyString
|
||||
labelFontSize: 14 * scaleRatio
|
||||
labelText: qsTr("Filename with outputs to blackball") + ":" + translationManager.emptyString
|
||||
copyButton: true
|
||||
readOnly: false
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 18
|
||||
|
||||
StandardButton {
|
||||
id: selectBlackballFileButton
|
||||
anchors.rightMargin: 17 * scaleRatio
|
||||
text: qsTr("Select") + translationManager.emptyString
|
||||
text: qsTr("Browse") + translationManager.emptyString
|
||||
enabled: true
|
||||
small: true
|
||||
onClicked: {
|
||||
|
@ -149,58 +183,37 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
LineEdit {
|
||||
id: loadBlackballFileLine
|
||||
anchors.left: selectBlackballFileButton.right
|
||||
anchors.right: loadBlackballFileButton.left
|
||||
placeholderText: qsTr("Filename with outputs to blackball") + translationManager.emptyString;
|
||||
readOnly: false
|
||||
Layout.fillWidth: true
|
||||
|
||||
IconButton {
|
||||
imageSource: "../images/copyToClipboard.png"
|
||||
onClicked: {
|
||||
if (loadBlackballFileLine.text.length > 0) {
|
||||
clipboard.setText(loadBlackballFileLine.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StandardButton {
|
||||
id: loadBlackballFileButton
|
||||
anchors.right: parent.right
|
||||
text: qsTr("Load") + translationManager.emptyString
|
||||
small: true
|
||||
enabled: !!appWindow.currentWallet
|
||||
enabled: !!appWindow.currentWallet && loadBlackballFileLine.text !== ""
|
||||
onClicked: appWindow.currentWallet.blackballOutputs(walletManager.urlToLocalPath(loadBlackballFileDialog.fileUrl), true)
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
fontSize: 14
|
||||
text: qsTr("Or manually blackball or unblackball a single output:") + translationManager.emptyString
|
||||
width: mainLayout.labelWidth
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
Layout.topMargin: 12
|
||||
|
||||
RowLayout {
|
||||
LineEdit {
|
||||
id: blackballOutputLine
|
||||
fontSize: mainLayout.lineEditFontSize
|
||||
placeholderText: qsTr("Paste output public key") + translationManager.emptyString
|
||||
labelFontSize: 14 * scaleRatio
|
||||
labelText: qsTr("Or manually blackball/unblackball a single output:") + translationManager.emptyString
|
||||
placeholderText: qsTr("Paste output public key") + "..." + translationManager.emptyString
|
||||
readOnly: false
|
||||
copyButton: true
|
||||
width: mainLayout.editWidth
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
|
||||
IconButton {
|
||||
imageSource: "../images/copyToClipboard.png"
|
||||
onClicked: {
|
||||
if (blackballOutputLine.text.length > 0) {
|
||||
clipboard.setText(blackballOutputLine.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 18
|
||||
|
||||
StandardButton {
|
||||
id: blackballButton
|
||||
|
@ -219,14 +232,14 @@ Rectangle {
|
|||
onClicked: appWindow.currentWallet.unblackballOutput(blackballOutputLine.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
LabelSubheader {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 24 * scaleRatio
|
||||
textFormat: Text.RichText
|
||||
text: "<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style>" +
|
||||
"<font size='+2'>" + qsTr("Rings") + "</font>" + "<font size='2'> (</font><a href='#'>" + qsTr("help") + "</a><font size='2'>)</font><br>" +
|
||||
qsTr("This records rings used by outputs spent on Monero on a key reusing chain, so that the same ring may be reused to avoid privacy issues.") + translationManager.emptyString
|
||||
wrapMode: Text.Wrap
|
||||
Layout.fillWidth: true;
|
||||
qsTr("Rings") + " (<a href='#'>" + qsTr("help") + "</a>)" + translationManager.emptyString
|
||||
onLinkActivated: {
|
||||
sharedRingDBDialog.title = qsTr("Rings") + translationManager.emptyString;
|
||||
sharedRingDBDialog.text = qsTr(
|
||||
|
@ -245,6 +258,15 @@ Rectangle {
|
|||
sharedRingDBDialog.icon = StandardIcon.Information
|
||||
sharedRingDBDialog.open()
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
textFormat: Text.RichText
|
||||
font.family: Style.fontRegular.name
|
||||
font.pixelSize: 14 * scaleRatio
|
||||
text: qsTr("This records rings used by outputs spent on Monero on a key reusing chain, so that the same ring may be reused to avoid privacy issues.") + translationManager.emptyString
|
||||
wrapMode: Text.Wrap
|
||||
Layout.fillWidth: true;
|
||||
color: Style.defaultFontColor
|
||||
}
|
||||
|
||||
|
@ -252,23 +274,38 @@ Rectangle {
|
|||
LineEdit {
|
||||
id: keyImageLine
|
||||
fontSize: mainLayout.lineEditFontSize
|
||||
placeholderText: qsTr("Paste key image") + translationManager.emptyString
|
||||
labelFontSize: 14 * scaleRatio
|
||||
labelText: qsTr("Key image") + ":" + translationManager.emptyString
|
||||
placeholderText: qsTr("Paste key image") + "..." + translationManager.emptyString
|
||||
readOnly: false
|
||||
copyButton: true
|
||||
width: mainLayout.editWidth
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
|
||||
IconButton {
|
||||
imageSource: "../images/copyToClipboard.png"
|
||||
onClicked: {
|
||||
if (keyImageLine.text.length > 0) {
|
||||
clipboard.setText(keyImageLine.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
GridLayout{
|
||||
Layout.topMargin: 12 * scaleRatio
|
||||
columns: (isMobile) ? 1 : 2
|
||||
columnSpacing: 32 * scaleRatio
|
||||
|
||||
ColumnLayout {
|
||||
RowLayout {
|
||||
LineEdit {
|
||||
id: getRingLine
|
||||
Layout.fillWidth: true
|
||||
fontSize: mainLayout.lineEditFontSize
|
||||
labelFontSize: 14 * scaleRatio
|
||||
labelText: qsTr("Get ring") + ":" + translationManager.emptyString
|
||||
readOnly: true
|
||||
copyButton: true
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 18
|
||||
|
||||
StandardButton {
|
||||
id: getRingButton
|
||||
text: qsTr("Get Ring") + translationManager.emptyString
|
||||
|
@ -276,62 +313,38 @@ Rectangle {
|
|||
enabled: !!appWindow.currentWallet && validHex32(keyImageLine.text)
|
||||
onClicked: {
|
||||
var ring = appWindow.currentWallet.getRing(keyImageLine.text)
|
||||
if (ring === "")
|
||||
{
|
||||
if (ring === "") {
|
||||
getRingLine.text = qsTr("No ring found");
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
getRingLine.text = ring;
|
||||
}
|
||||
}
|
||||
}
|
||||
LineEdit {
|
||||
id: getRingLine
|
||||
fontSize: mainLayout.lineEditFontSize
|
||||
placeholderText: qsTr("") + translationManager.emptyString
|
||||
readOnly: true
|
||||
width: mainLayout.editWidth
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
|
||||
IconButton {
|
||||
imageSource: "../images/copyToClipboard.png"
|
||||
onClicked: {
|
||||
if (getRingLine.text.length > 0) {
|
||||
clipboard.setText(getRingLine.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
ColumnLayout {
|
||||
RowLayout {
|
||||
LineEdit {
|
||||
id: setRingLine
|
||||
Layout.fillWidth: true
|
||||
fontSize: mainLayout.lineEditFontSize
|
||||
labelFontSize: 14 * scaleRatio
|
||||
labelText: qsTr("Set ring") + ":" + translationManager.emptyString
|
||||
readOnly: false
|
||||
copyButton: true
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
CheckBox {
|
||||
id: setRingRelative
|
||||
checked: true
|
||||
text: qsTr("Relative") + translationManager.emptyString
|
||||
checkedIcon: "../images/checkedIcon-black.png"
|
||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
||||
}
|
||||
LineEdit {
|
||||
id: setRingLine
|
||||
fontSize: mainLayout.lineEditFontSize
|
||||
placeholderText: qsTr("") + translationManager.emptyString
|
||||
readOnly: false
|
||||
width: mainLayout.editWidth
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 18
|
||||
|
||||
IconButton {
|
||||
imageSource: "../images/copyToClipboard.png"
|
||||
onClicked: {
|
||||
if (getRingLine.text.length > 0) {
|
||||
clipboard.setText(getRingLine.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
StandardButton {
|
||||
id: setRingButton
|
||||
text: qsTr("Set Ring") + translationManager.emptyString
|
||||
small: true
|
||||
enabled: !!appWindow.currentWallet && validHex32(keyImageLine.text) && validRing(setRingLine.text.trim(), setRingRelative.checked)
|
||||
onClicked: {
|
||||
var outs = setRingLine.text.trim()
|
||||
|
@ -339,6 +352,11 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GridLayout {
|
||||
columns: (isMobile) ? 1 : 2
|
||||
|
||||
CheckBox {
|
||||
id: segregatePreForkOutputs
|
||||
|
@ -353,6 +371,7 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
CheckBox {
|
||||
id: keyReuseMitigation2
|
||||
checked: persistentSettings.keyReuseMitigation2
|
||||
|
@ -366,20 +385,27 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
CheckBox {
|
||||
id: setRingRelative
|
||||
checked: true
|
||||
text: qsTr("Relative") + translationManager.emptyString
|
||||
checkedIcon: "../images/checkedIcon-black.png"
|
||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: segregationHeightRow
|
||||
anchors.topMargin: 17
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
Label {
|
||||
id: segregationHeightLabel
|
||||
fontSize: 14
|
||||
text: qsTr("Segregation height:") + translationManager.emptyString
|
||||
}
|
||||
LineEdit {
|
||||
id: segregationHeightLine
|
||||
readOnly: false
|
||||
labelFontSize: 14 * scaleRatio
|
||||
labelText: qsTr("Segregation height:") + translationManager.emptyString
|
||||
Layout.fillWidth: true
|
||||
validator: IntValidator { bottom: 0 }
|
||||
onEditingFinished: {
|
||||
|
@ -390,7 +416,6 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function onPageCompleted() {
|
||||
|
@ -400,5 +425,4 @@ Rectangle {
|
|||
segregationHeightLine.text = persistentSettings.segregationHeight
|
||||
appWindow.currentWallet.keyReuseMitigation2(persistentSettings.keyReuseMitigation2)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -117,6 +117,7 @@ Rectangle {
|
|||
anchors.left: parent.left
|
||||
anchors.topMargin: 17 * scaleRatio
|
||||
width: 60 * scaleRatio
|
||||
small: true
|
||||
text: qsTr("Generate") + translationManager.emptyString
|
||||
enabled: TxUtils.checkTxID(getProofTxIdLine.text) && (getProofAddressLine.text.length == 0 || TxUtils.checkAddress(getProofAddressLine.text, appWindow.persistentSettings.nettype))
|
||||
onClicked: {
|
||||
|
@ -206,6 +207,7 @@ Rectangle {
|
|||
anchors.left: parent.left
|
||||
anchors.topMargin: 17 * scaleRatio
|
||||
width: 60
|
||||
small: true
|
||||
text: qsTr("Check") + translationManager.emptyString
|
||||
enabled: TxUtils.checkTxID(checkProofTxIdLine.text) && TxUtils.checkSignature(checkProofSignatureLine.text) && ((checkProofSignatureLine.text.indexOf("SpendProofV") === 0 && checkProofAddressLine.text.length == 0) || (checkProofSignatureLine.text.indexOf("SpendProofV") !== 0 && TxUtils.checkAddress(checkProofAddressLine.text, appWindow.persistentSettings.nettype)))
|
||||
onClicked: {
|
||||
|
|
Loading…
Reference in a new issue