mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-02-24 02:30:33 +02:00
Replacing the optional ring size slider in favor of static ring size 11
This commit is contained in:
parent
b4e0dd107c
commit
e21f8903ee
@ -26,6 +26,8 @@
|
|||||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
// @TODO: Remove component after wizard redesign
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
// @TODO: Remove component after wizard redesign
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
3
main.qml
3
main.qml
@ -635,9 +635,6 @@ ApplicationWindow {
|
|||||||
transactionConfirmationPopup.text += qsTr("\n\nAmount: ") + walletManager.displayAmount(transaction.amount);
|
transactionConfirmationPopup.text += qsTr("\n\nAmount: ") + walletManager.displayAmount(transaction.amount);
|
||||||
transactionConfirmationPopup.text += qsTr("\nFee: ") + walletManager.displayAmount(transaction.fee);
|
transactionConfirmationPopup.text += qsTr("\nFee: ") + walletManager.displayAmount(transaction.fee);
|
||||||
transactionConfirmationPopup.text += qsTr("\nRingsize: ") + (mixinCount + 1);
|
transactionConfirmationPopup.text += qsTr("\nRingsize: ") + (mixinCount + 1);
|
||||||
if(mixinCount !== 6){
|
|
||||||
transactionConfirmationPopup.text += qsTr("\n\nWARNING: non default ring size, which may harm your privacy. Default of 7 is recommended.");
|
|
||||||
}
|
|
||||||
transactionConfirmationPopup.text += qsTr("\n\nNumber of transactions: ") + transaction.txCount
|
transactionConfirmationPopup.text += qsTr("\n\nNumber of transactions: ") + transaction.txCount
|
||||||
transactionConfirmationPopup.text += (transactionDescription === "" ? "" : (qsTr("\nDescription: ") + transactionDescription))
|
transactionConfirmationPopup.text += (transactionDescription === "" ? "" : (qsTr("\nDescription: ") + transactionDescription))
|
||||||
for (var i = 0; i < transaction.subaddrIndices.length; ++i){
|
for (var i = 0; i < transaction.subaddrIndices.length; ++i){
|
||||||
|
@ -44,21 +44,13 @@ Rectangle {
|
|||||||
signal sweepUnmixableClicked()
|
signal sweepUnmixableClicked()
|
||||||
|
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
property int mixin: 10 // (ring size 11)
|
||||||
property string warningContent: ""
|
property string warningContent: ""
|
||||||
property string startLinkText: qsTr("<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style><font size='2'> (</font><a href='#'>Start daemon</a><font size='2'>)</font>") + translationManager.emptyString
|
property string startLinkText: qsTr("<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style><font size='2'> (</font><a href='#'>Start daemon</a><font size='2'>)</font>") + translationManager.emptyString
|
||||||
property bool showAdvanced: false
|
property bool showAdvanced: false
|
||||||
|
|
||||||
Clipboard { id: clipboard }
|
Clipboard { id: clipboard }
|
||||||
|
|
||||||
function scaleValueToMixinCount(scaleValue) {
|
|
||||||
var scaleToMixinCount = [6,7,8,9,10,11,12,13,14,16,18,20,22,25];
|
|
||||||
if (scaleValue < scaleToMixinCount.length) {
|
|
||||||
return scaleToMixinCount[scaleValue];
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function isValidOpenAliasAddress(address) {
|
function isValidOpenAliasAddress(address) {
|
||||||
address = address.trim()
|
address = address.trim()
|
||||||
var dot = address.indexOf('.')
|
var dot = address.indexOf('.')
|
||||||
@ -76,14 +68,6 @@ Rectangle {
|
|||||||
oaPopup.open()
|
oaPopup.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateMixin() {
|
|
||||||
var fillLevel = (isMobile) ? privacyLevelItemSmall.fillLevel : privacyLevelItem.fillLevel
|
|
||||||
var mixin = scaleValueToMixinCount(fillLevel)
|
|
||||||
console.log("PrivacyLevel changed:" + fillLevel)
|
|
||||||
console.log("mixin count: " + mixin)
|
|
||||||
privacyLabel.text = qsTr("Ring size: %1").arg(mixin+1) + translationManager.emptyString
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateFromQrCode(address, payment_id, amount, tx_description, recipient_name) {
|
function updateFromQrCode(address, payment_id, amount, tx_description, recipient_name) {
|
||||||
console.log("updateFromQrCode")
|
console.log("updateFromQrCode")
|
||||||
addressLine.text = address
|
addressLine.text = address
|
||||||
@ -352,9 +336,7 @@ Rectangle {
|
|||||||
console.log("amount: " + amountLine.text)
|
console.log("amount: " + amountLine.text)
|
||||||
addressLine.text = addressLine.text.trim()
|
addressLine.text = addressLine.text.trim()
|
||||||
paymentIdLine.text = paymentIdLine.text.trim()
|
paymentIdLine.text = paymentIdLine.text.trim()
|
||||||
root.paymentClicked(addressLine.text, paymentIdLine.text, amountLine.text, scaleValueToMixinCount(privacyLevelItem.fillLevel),
|
root.paymentClicked(addressLine.text, paymentIdLine.text, amountLine.text, root.mixin, priority, descriptionLine.text)
|
||||||
priority, descriptionLine.text)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -407,57 +389,8 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
visible: persistentSettings.transferShowAdvanced
|
|
||||||
Layout.fillWidth: true
|
|
||||||
height: 1
|
|
||||||
color: Style.dividerColor
|
|
||||||
opacity: Style.dividerOpacity
|
|
||||||
Layout.bottomMargin: 30 * scaleRatio
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
visible: persistentSettings.transferShowAdvanced
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Label {
|
|
||||||
id: privacyLabel
|
|
||||||
fontSize: 15
|
|
||||||
text: ""
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
id: costLabel
|
|
||||||
fontSize: 14
|
|
||||||
text: qsTr("Transaction cost") + translationManager.emptyString
|
|
||||||
anchors.right: parent.right
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
PrivacyLevel {
|
|
||||||
visible: persistentSettings.transferShowAdvanced && !isMobile
|
|
||||||
id: privacyLevelItem
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.rightMargin: 17 * scaleRatio
|
|
||||||
onFillLevelChanged: updateMixin()
|
|
||||||
}
|
|
||||||
|
|
||||||
PrivacyLevelSmall {
|
|
||||||
visible: persistentSettings.transferShowAdvanced && isMobile
|
|
||||||
id: privacyLevelItemSmall
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.rightMargin: 17 * scaleRatio
|
|
||||||
onFillLevelChanged: updateMixin()
|
|
||||||
}
|
|
||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
visible: persistentSettings.transferShowAdvanced
|
visible: persistentSettings.transferShowAdvanced
|
||||||
Layout.topMargin: 50 * scaleRatio
|
|
||||||
|
|
||||||
|
|
||||||
columns: (isMobile) ? 2 : 6
|
columns: (isMobile) ? 2 : 6
|
||||||
|
|
||||||
StandardButton {
|
StandardButton {
|
||||||
@ -484,8 +417,7 @@ Rectangle {
|
|||||||
console.log("amount: " + amountLine.text)
|
console.log("amount: " + amountLine.text)
|
||||||
addressLine.text = addressLine.text.trim()
|
addressLine.text = addressLine.text.trim()
|
||||||
paymentIdLine.text = paymentIdLine.text.trim()
|
paymentIdLine.text = paymentIdLine.text.trim()
|
||||||
root.paymentClicked(addressLine.text, paymentIdLine.text, amountLine.text, scaleValueToMixinCount(privacyLevelItem.fillLevel),
|
root.paymentClicked(addressLine.text, paymentIdLine.text, amountLine.text, root.mixin, priority, descriptionLine.text)
|
||||||
priority, descriptionLine.text)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -668,7 +600,6 @@ Rectangle {
|
|||||||
function onPageCompleted() {
|
function onPageCompleted() {
|
||||||
console.log("transfer page loaded")
|
console.log("transfer page loaded")
|
||||||
updateStatus();
|
updateStatus();
|
||||||
updateMixin();
|
|
||||||
updatePriorityDropdown()
|
updatePriorityDropdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user