Compare commits

...

24 Commits

Author SHA1 Message Date
luigi1111
2f5c47e95f Merge pull request #2448
d2b9d56 ContextMenu: styling, implement ContextMenuItem component (xiphon)
2019-11-19 10:36:34 -06:00
luigi1111
34b216e6dc Merge pull request #2444
5a65d28 build: set submodule to v0.15.0.1 (selsta)
2019-11-19 10:35:25 -06:00
xiphon
d2b9d5690b ContextMenu: styling, implement ContextMenuItem component 2019-11-19 12:32:53 +00:00
luigi1111
d10f1b5d30 Merge pull request #2447
d92cc94 readme: add 'zeromq-devel' to Fedora deps (xiphon)
2019-11-18 13:00:54 -06:00
luigi1111
fea3bb503f Merge pull request #2446
f57b2d5 workflows: add basic ubuntu/macOS build script (selsta)
2019-11-18 12:58:46 -06:00
xiphon
d92cc944cb readme: add 'zeromq-devel' to Fedora deps 2019-11-17 19:32:13 +00:00
selsta
f57b2d57cd workflows: add basic ubuntu/macOS build script 2019-11-14 22:12:38 +01:00
luigi1111
cf0e5a811e Merge pull request #2440
e9cdaf4 Transfer: convert and display entered amount in fiat currency (xiphon)
2019-11-13 09:08:16 -06:00
luigi1111
ea8f51d168 Merge pull request #2439
17f032e fiat: fix invalid type, don't round conversion rate to whole number (xiphon)
2019-11-13 09:06:51 -06:00
luigi1111
e8befc4c67 Merge pull request #2438
92f9bec installer: automatically set app version information (xiphon)
2019-11-13 09:05:55 -06:00
luigi1111
5518771a8b Merge pull request #2437
ef565e5 build: embed version metadata into binary (xiphon)
2019-11-13 09:04:49 -06:00
luigi1111
47bc0f2a3c Merge pull request #2435
0e3f3c1 SettingsWallet: refactor list items into separate component (xiphon)
2019-11-13 09:03:51 -06:00
luigi1111
8bd820b909 Merge pull request #2429
74e12ce ContextMenu: implement 'paste' context menu for all text fields (xiphon)
2019-11-13 09:03:02 -06:00
luigi1111
f948d0e214 Merge pull request #2428
5fe6b48 Settings: fix 'Light theme' checkbox (xiphon)
2019-11-13 09:02:03 -06:00
luigi1111
3a7c9e6c8e Merge pull request #2417
212c8dd Warning added that balance reflects only incoming transactions for view-only wallets (peli-pro)
2019-11-13 09:00:44 -06:00
selsta
5a65d28d29 build: set submodule to v0.15.0.1 2019-11-13 15:45:42 +01:00
xiphon
e9cdaf4dbe Transfer: convert and display entered amount in fiat currency 2019-11-13 08:10:49 +00:00
xiphon
17f032ea11 fiat: fix invalid type, don't round conversion rate to whole number 2019-11-13 06:34:33 +00:00
xiphon
ef565e5fa3 build: embed version metadata into binary 2019-11-12 16:23:02 +00:00
xiphon
92f9bec1e7 installer: automatically set app version information 2019-11-12 02:25:29 +00:00
xiphon
0e3f3c13a1 SettingsWallet: refactor list items into separate component 2019-11-11 21:14:39 +00:00
xiphon
74e12ce71d ContextMenu: implement 'paste' context menu for all text fields 2019-11-08 12:41:32 +00:00
xiphon
5fe6b48517 Settings: fix 'Light theme' checkbox 2019-11-04 21:47:38 +00:00
peli-pro
212c8dd054 Warning added that balance reflects only incoming transactions for view-only wallets 2019-10-17 14:25:36 +02:00
26 changed files with 350 additions and 328 deletions

30
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: GUI build
on: [push, pull_request]
jobs:
build-macos:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- name: update brew and install dependencies
run: brew update && brew install boost hidapi zmq libpgm unbound libsodium miniupnpc ldns expat doxygen graphviz libunwind-headers protobuf qt5
- name: build
run: export PATH=$PATH:/usr/local/opt/qt/bin && ./build.sh
build-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: update apt
run: sudo apt update
- name: install monero dependencies
run: sudo apt -y install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev libnorm-dev libusb-1.0-0-dev libpgm-dev
- name: install monero gui dependencies
run: sudo apt -y install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-xmllistmodel qml-module-qt-labs-settings qml-module-qt-labs-folderlistmodel qttools5-dev-tools qml-module-qtquick-templates2 libqt5svg5-dev
- name: build
run: ./build.sh

View File

@@ -238,7 +238,7 @@ Rectangle {
font.pixelSize: 16 font.pixelSize: 16
text: { text: {
if (persistentSettings.fiatPriceEnabled && persistentSettings.fiatPriceToggle) { if (persistentSettings.fiatPriceEnabled && persistentSettings.fiatPriceToggle) {
return persistentSettings.fiatPriceCurrency == "xmrusd" ? "USD" : "EUR" return appWindow.fiatApiCurrencySymbol();
} else { } else {
return "XMR" return "XMR"
} }

View File

@@ -93,7 +93,7 @@ Packaging for your favorite distribution would be a welcome contribution!
- For Fedora - For Fedora
`sudo dnf install make automake cmake gcc-c++ boost-devel miniupnpc-devel graphviz doxygen unbound-devel libunwind-devel pkgconfig openssl-devel libcurl-devel hidapi-devel libusb-devel` `sudo dnf install make automake cmake gcc-c++ boost-devel miniupnpc-devel graphviz doxygen unbound-devel libunwind-devel pkgconfig openssl-devel libcurl-devel hidapi-devel libusb-devel zeromq-devel`
2. Install Qt: 2. Install Qt:

View File

@@ -40,6 +40,7 @@ Item {
property string uncheckedIcon property string uncheckedIcon
property int imgWidth: 13 property int imgWidth: 13
property int imgHeight: 13 property int imgHeight: 13
property bool toggleOnClick: true
property bool checked: false property bool checked: false
property alias background: backgroundRect.color property alias background: backgroundRect.color
property bool border: true property bool border: true
@@ -51,7 +52,9 @@ Item {
width: checkBoxLayout.width width: checkBoxLayout.width
function toggle(){ function toggle(){
if (checkBox.toggleOnClick) {
checkBox.checked = !checkBox.checked checkBox.checked = !checkBox.checked
}
checkBox.clicked() checkBox.clicked()
} }

View File

@@ -0,0 +1,40 @@
import QtQuick 2.9
import QtQuick.Controls 2.2
import FontAwesome 1.0
import "../components" as MoneroComponents
MouseArea {
signal paste()
id: root
acceptedButtons: Qt.RightButton
anchors.fill: parent
onClicked: {
if (mouse.button === Qt.RightButton)
contextMenu.open()
}
Menu {
id: contextMenu
background: Rectangle {
border.color: MoneroComponents.Style.buttonBackgroundColorDisabledHover
border.width: 1
radius: 2
color: MoneroComponents.Style.buttonBackgroundColorDisabled
}
padding: 1
width: 100
x: root.mouseX
y: root.mouseY
MoneroComponents.ContextMenuItem {
enabled: root.parent.canPaste === true
glyphIcon: FontAwesome.paste
onTriggered: root.paste()
text: qsTr("Paste") + translationManager.emptyString
}
}
}

View File

@@ -0,0 +1,52 @@
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.1
import FontAwesome 1.0
import "../components" as MoneroComponents
MenuItem {
id: menuItem
property bool glyphIconSolid: true
property alias glyphIcon: glyphIcon.text
background: Rectangle {
color: MoneroComponents.Style.buttonBackgroundColorDisabledHover
opacity: mouse.containsMouse ? 1 : 0
MouseArea {
id: mouse
anchors.fill: parent
hoverEnabled: true
onClicked: menuItem.triggered()
visible: menuItem.enabled
}
}
contentItem: RowLayout {
anchors.fill: parent
anchors.leftMargin: 10
anchors.rightMargin: 10
opacity: menuItem.enabled ? 1 : 0.4
spacing: 8
Text {
id: glyphIcon
color: MoneroComponents.Style.buttonTextColor
font.family: glyphIconSolid ? FontAwesome.fontFamilySolid : FontAwesome.fontFamily
font.pixelSize: 14
font.styleName: glyphIconSolid ? "Solid" : "Regular"
}
Text {
color: MoneroComponents.Style.buttonTextColor
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14
Layout.fillWidth: true
text: menuItem.text
}
}
}

View File

@@ -32,6 +32,7 @@ import QtQuick 2.9
import "../components" as MoneroComponents import "../components" as MoneroComponents
TextField { TextField {
id: textField
font.family: MoneroComponents.Style.fontRegular.name font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 18 font.pixelSize: 18
font.bold: true font.bold: true
@@ -44,4 +45,11 @@ TextField {
background: Rectangle { background: Rectangle {
color: "transparent" color: "transparent"
} }
MoneroComponents.ContextMenu {
onPaste: {
textField.clear();
textField.paste();
}
}
} }

View File

@@ -86,7 +86,7 @@ Item {
color: MoneroComponents.Style.defaultFontColor color: MoneroComponents.Style.defaultFontColor
} }
TextField { MoneroComponents.Input {
id : input id : input
focus: true focus: true
Layout.topMargin: 6 Layout.topMargin: 6

View File

@@ -57,6 +57,10 @@ TextArea {
onTextChanged: { onTextChanged: {
if(addressValidation){ if(addressValidation){
// js replacement for `RegExpValidator { regExp: /[0-9A-Fa-f]{95}/g }` // js replacement for `RegExpValidator { regExp: /[0-9A-Fa-f]{95}/g }`
if (textArea.text.startsWith("monero:")) {
error = false;
return;
}
textArea.text = textArea.text.replace(/[^a-z0-9.@\-]/gi,''); textArea.text = textArea.text.replace(/[^a-z0-9.@\-]/gi,'');
var address_ok = TxUtils.checkAddress(textArea.text, appWindow.persistentSettings.nettype) || TxUtils.isValidOpenAliasAddress(textArea.text); var address_ok = TxUtils.checkAddress(textArea.text, appWindow.persistentSettings.nettype) || TxUtils.isValidOpenAliasAddress(textArea.text);
if(!address_ok) error = true; if(!address_ok) error = true;
@@ -64,4 +68,11 @@ TextArea {
TextArea.cursorPosition = textArea.text.length; TextArea.cursorPosition = textArea.text.length;
} }
} }
MoneroComponents.ContextMenu {
onPaste: {
textArea.clear();
textArea.paste();
}
}
} }

View File

@@ -53,6 +53,8 @@ Item {
property alias inlineButtonText: inlineButtonId.text property alias inlineButtonText: inlineButtonId.text
property alias inlineIcon: inlineIcon.visible property alias inlineIcon: inlineIcon.visible
property bool copyButton: false property bool copyButton: false
property alias copyButtonText: copyButtonId.text
property alias copyButtonEnabled: copyButtonId.enabled
property bool borderDisabled: false property bool borderDisabled: false
property string borderColor: { property string borderColor: {

View File

@@ -80,9 +80,6 @@ ColumnLayout {
property alias readOnly: input.readOnly property alias readOnly: input.readOnly
property bool copyButton: false property bool copyButton: false
property bool pasteButton: false property bool pasteButton: false
property var onPaste: function(clipboardText) {
item.text = clipboardText;
}
property bool showingHeader: labelText != "" || copyButton || pasteButton property bool showingHeader: labelText != "" || copyButton || pasteButton
property var wrapMode: Text.NoWrap property var wrapMode: Text.NoWrap
property alias addressValidation: input.addressValidation property alias addressValidation: input.addressValidation
@@ -146,7 +143,10 @@ ColumnLayout {
MoneroComponents.LabelButton { MoneroComponents.LabelButton {
id: pasteButtonId id: pasteButtonId
onClicked: item.onPaste(clipboard.text()) onClicked: {
input.clear();
input.paste();
}
text: qsTr("Paste") + translationManager.emptyString text: qsTr("Paste") + translationManager.emptyString
visible: pasteButton visible: pasteButton
} }

View File

@@ -187,7 +187,7 @@ Item {
text: qsTr("CAPSLOCKS IS ON.") + translationManager.emptyString; text: qsTr("CAPSLOCKS IS ON.") + translationManager.emptyString;
} }
TextField { MoneroComponents.Input {
id: passwordInput1 id: passwordInput1
Layout.topMargin: 6 Layout.topMargin: 6
Layout.fillWidth: true Layout.fillWidth: true
@@ -296,7 +296,7 @@ Item {
color: MoneroComponents.Style.defaultFontColor color: MoneroComponents.Style.defaultFontColor
} }
TextField { MoneroComponents.Input {
id: passwordInput2 id: passwordInput2
visible: !passwordDialogMode visible: !passwordDialogMode
Layout.topMargin: 6 Layout.topMargin: 6

View File

@@ -0,0 +1,65 @@
import QtQuick 2.9
import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
ColumnLayout {
property alias buttonText: button.text
property alias description: description.text
property alias title: title.text
signal clicked()
id: settingsListItem
Layout.fillWidth: true
spacing: 0
Rectangle {
// divider
Layout.preferredHeight: 1
Layout.fillWidth: true
Layout.bottomMargin: 8
color: MoneroComponents.Style.dividerColor
opacity: MoneroComponents.Style.dividerOpacity
}
RowLayout {
Layout.fillWidth: true
spacing: 0
ColumnLayout {
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
spacing: 0
MoneroComponents.TextPlain {
id: title
Layout.fillWidth: true
Layout.preferredHeight: 20
Layout.topMargin: 8
color: MoneroComponents.Style.defaultFontColor
opacity: MoneroComponents.Style.blackTheme ? 1.0 : 0.8
font.bold: true
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 16
}
MoneroComponents.TextPlainArea {
id: description
color: MoneroComponents.Style.dimmedFontColor
colorBlackTheme: MoneroComponents.Style._b_dimmedFontColor
colorWhiteTheme: MoneroComponents.Style._w_dimmedFontColor
Layout.fillWidth: true
horizontalAlignment: TextInput.AlignLeft
}
}
MoneroComponents.StandardButton {
id: button
small: true
onClicked: {
settingsListItem.clicked()
}
width: 135
}
}
}

View File

@@ -17,7 +17,7 @@ if [ ! -d $MONERO_DIR/src ]; then
fi fi
git submodule update --remote git submodule update --remote
git -C $MONERO_DIR fetch git -C $MONERO_DIR fetch
git -C $MONERO_DIR checkout v0.15.0.0 git -C $MONERO_DIR checkout v0.15.0.1
# get monero core tag # get monero core tag
pushd $MONERO_DIR pushd $MONERO_DIR

View File

@@ -1,6 +1,7 @@
; Monero Carbon Chamaeleon GUI Wallet Installer for Windows ; Monero Carbon Chamaeleon GUI Wallet Installer for Windows
; Copyright (c) 2017-2019, The Monero Project ; Copyright (c) 2017-2019, The Monero Project
; See LICENSE ; See LICENSE
#define GuiVersion GetFileVersion("bin\monero-wallet-gui.exe")
[Setup] [Setup]
AppName=Monero GUI Wallet AppName=Monero GUI Wallet
@@ -8,7 +9,8 @@ AppName=Monero GUI Wallet
; Thus it's important to keep this stable over releases ; Thus it's important to keep this stable over releases
; With a different "AppName" InnoSetup would treat a mere update as a completely new application and thus mess up ; With a different "AppName" InnoSetup would treat a mere update as a completely new application and thus mess up
AppVersion=0.15.0.0 AppVersion={#GuiVersion}
VersionInfoVersion={#GuiVersion}
DefaultDirName={pf}\Monero GUI Wallet DefaultDirName={pf}\Monero GUI Wallet
DefaultGroupName=Monero GUI Wallet DefaultGroupName=Monero GUI Wallet
UninstallDisplayIcon={app}\monero-wallet-gui.exe UninstallDisplayIcon={app}\monero-wallet-gui.exe
@@ -39,6 +41,8 @@ UsedUserAreasWarning=no
; play a role in only in few cases as the first standard user in a Windows installation does have admin rights. ; play a role in only in few cases as the first standard user in a Windows installation does have admin rights.
; So, for the time being, this installer simply disregards this problem. ; So, for the time being, this installer simply disregards this problem.
[Messages]
SetupWindowTitle=%1 {#GuiVersion} Installer
[Languages] [Languages]
Name: "en"; MessagesFile: "compiler:Default.isl" Name: "en"; MessagesFile: "compiler:Default.isl"
@@ -65,7 +69,7 @@ Name: "en"; MessagesFile: "compiler:Default.isl"
; Note that it would be very dangerous to use "ignoreversion" on files that may be shared with other ; Note that it would be very dangerous to use "ignoreversion" on files that may be shared with other
; applications somehow. Luckily this is no issue here because ALL files are "private" to Monero. ; applications somehow. Luckily this is no issue here because ALL files are "private" to Monero.
Source: "ReadMe.htm"; DestDir: "{app}"; Flags: ignoreversion Source: {#file AddBackslash(SourcePath) + "ReadMe.htm"}; DestDir: "{app}"; DestName: "ReadMe.htm"; Flags: ignoreversion
Source: "FinishImage.bmp"; Flags: dontcopy Source: "FinishImage.bmp"; Flags: dontcopy
; Monero GUI wallet exe and guide ; Monero GUI wallet exe and guide

View File

@@ -6,8 +6,7 @@
<body style="font-family: Arial, Helvetica, sans-serif"> <body style="font-family: Arial, Helvetica, sans-serif">
<h1>Monero Carbon Chamaeleon GUI Wallet</h1> <h1>Monero Carbon Chamaeleon GUI Wallet</h1>
<p>Copyright (c) 2014-2019, The Monero Project<br> <p>Copyright (c) 2014-2019, The Monero Project</p>
Date: November 1, 2019</p>
<h2>Preface</h2> <h2>Preface</h2>
@@ -23,7 +22,7 @@
<h2>Content of the Package</h2> <h2>Content of the Package</h2>
<p>You just installed the <i>Monero GUI wallet</i> for Windows, release Carbon Chamaeleon, version 0.15.0.0. <p>You just installed the <i>Monero GUI wallet</i> for Windows, release Carbon Chamaeleon, version {#GuiVersion}.
The wallet enables you to send and receive Moneroj in a secure and very private way. The wallet enables you to send and receive Moneroj in a secure and very private way.
</p> </p>

View File

@@ -86,8 +86,8 @@ ApplicationWindow {
property bool themeTransition: false property bool themeTransition: false
// fiat price conversion // fiat price conversion
property int fiatPriceXMRUSD: 0 property real fiatPriceXMRUSD: 0
property int fiatPriceXMREUR: 0 property real fiatPriceXMREUR: 0
property var fiatPriceAPIs: { property var fiatPriceAPIs: {
return { return {
"kraken": { "kraken": {
@@ -1241,17 +1241,32 @@ ApplicationWindow {
Prices.getJSON(url); Prices.getJSON(url);
} }
function fiatApiUpdateBalance(balance){ function fiatApiCurrencySymbol() {
// update balance card switch (persistentSettings.fiatPriceCurrency) {
case "xmrusd":
return "USD";
case "xmreur":
return "EUR";
default:
console.error("unsupported currency", persistentSettings.fiatPriceCurrency);
return "UNSUPPORTED";
}
}
function fiatApiConvertToFiat(amount) {
var ticker = persistentSettings.fiatPriceCurrency === "xmrusd" ? appWindow.fiatPriceXMRUSD : appWindow.fiatPriceXMREUR; var ticker = persistentSettings.fiatPriceCurrency === "xmrusd" ? appWindow.fiatPriceXMRUSD : appWindow.fiatPriceXMREUR;
if(ticker <= 0){ if(ticker <= 0){
console.log(fiatApiError("Could not update balance card; invalid ticker value")); console.log(fiatApiError("Invalid ticker value: " + ticker));
leftPanel.balanceFiatString = "?.??"; return "?.??";
return;
} }
return (amount * ticker).toFixed(2);
}
function fiatApiUpdateBalance(balance){
// update balance card
var bFiat = "?.??" var bFiat = "?.??"
if (!hideBalanceForced && !persistentSettings.hideBalance) { if (!hideBalanceForced && !persistentSettings.hideBalance) {
bFiat = (balance * ticker).toFixed(2); bFiat = fiatApiConvertToFiat(balance);
} }
leftPanel.balanceFiatString = bFiat; leftPanel.balanceFiatString = bFiat;
} }

View File

@@ -504,6 +504,9 @@ DISTFILES += \
notes.txt \ notes.txt \
monero/src/wallet/CMakeLists.txt monero/src/wallet/CMakeLists.txt
VERSION = $$cat('version.js', lines)
VERSION = $$find(VERSION, 'GUI_VERSION')
VERSION = $$replace(VERSION, '.*(\d+\.\d+\.\d+\.\d+).*', '\1')
# windows application icon # windows application icon
RC_ICONS = images/appicon.ico RC_ICONS = images/appicon.ico

View File

@@ -325,8 +325,8 @@ Rectangle {
wrapMode: Text.WrapAnywhere wrapMode: Text.WrapAnywhere
addressValidation: true addressValidation: true
pasteButton: true pasteButton: true
onPaste: function(clipboardText) { onTextChanged: {
const parsed = walletManager.parse_uri_to_object(clipboardText); const parsed = walletManager.parse_uri_to_object(addressLine.text);
if (!parsed.error) { if (!parsed.error) {
addressLine.text = parsed.address; addressLine.text = parsed.address;
descriptionLine.text = parsed.tx_description; descriptionLine.text = parsed.tx_description;

View File

@@ -168,6 +168,10 @@ Rectangle {
labelText: qsTr("<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\ labelText: qsTr("<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\
Amount <font size='2'> ( </font> <a href='#'>Change account</a><font size='2'> )</font>") Amount <font size='2'> ( </font> <a href='#'>Change account</a><font size='2'> )</font>")
+ translationManager.emptyString + translationManager.emptyString
copyButton: persistentSettings.fiatPriceEnabled
copyButtonText: fiatApiCurrencySymbol() + " ~" + fiatApiConvertToFiat(amountLine.text)
copyButtonEnabled: false
onLabelLinkActivated: { onLabelLinkActivated: {
middlePanel.accountView.selectAndSend = true; middlePanel.accountView.selectAndSend = true;
appWindow.showPageRequest("Account") appWindow.showPageRequest("Account")
@@ -257,18 +261,14 @@ Rectangle {
appWindow.showPageRequest("AddressBook"); appWindow.showPageRequest("AddressBook");
} }
pasteButton: true pasteButton: true
onPaste: function(clipboardText) { onTextChanged: {
const parsed = walletManager.parse_uri_to_object(clipboardText); const parsed = walletManager.parse_uri_to_object(text);
if (!parsed.error) { if (!parsed.error) {
addressLine.text = parsed.address; addressLine.text = parsed.address;
setPaymentId(parsed.payment_id); setPaymentId(parsed.payment_id);
amountLine.text = parsed.amount; amountLine.text = parsed.amount;
setDescription(parsed.tx_description); setDescription(parsed.tx_description);
} else {
addressLine.text = clipboardText;
} }
}
onTextChanged: {
warningLongPidTransfer = isLongPidService(text); warningLongPidTransfer = isLongPidService(text);
} }
inlineButton.text: FontAwesome.qrcode inlineButton.text: FontAwesome.qrcode
@@ -756,7 +756,8 @@ Rectangle {
// Currently opened wallet is not view-only // Currently opened wallet is not view-only
if(appWindow.viewOnly){ if(appWindow.viewOnly){
root.sendButtonWarning = qsTr("Wallet is view-only and sends are not possible.") + translationManager.emptyString; root.sendButtonWarning = qsTr("Wallet is view-only and sends are not possible. Unless key images are imported, " +
"the balance reflects only incoming but not outgoing transactions.") + translationManager.emptyString;
return false; return false;
} }

View File

@@ -455,7 +455,7 @@ Item {
width: 220 width: 220
source: "qrc:///images/merchant/input_box.png" source: "qrc:///images/merchant/input_box.png"
TextField { MoneroComponents.Input {
id: amountToReceive id: amountToReceive
topPadding: 0 topPadding: 0
leftPadding: 10 leftPadding: 10

View File

@@ -72,6 +72,7 @@ Rectangle {
id: themeCheckbox id: themeCheckbox
checked: !MoneroComponents.Style.blackTheme checked: !MoneroComponents.Style.blackTheme
text: qsTr("Light theme") + translationManager.emptyString text: qsTr("Light theme") + translationManager.emptyString
toggleOnClick: false
onClicked: { onClicked: {
MoneroComponents.Style.blackTheme = !MoneroComponents.Style.blackTheme; MoneroComponents.Style.blackTheme = !MoneroComponents.Style.blackTheme;
persistentSettings.blackTheme = MoneroComponents.Style.blackTheme; persistentSettings.blackTheme = MoneroComponents.Style.blackTheme;

View File

@@ -47,110 +47,27 @@ Rectangle {
anchors.right: parent.right anchors.right: parent.right
anchors.margins: 20 anchors.margins: 20
anchors.topMargin: 0 anchors.topMargin: 0
spacing: 0 spacing: 8
Rectangle { MoneroComponents.SettingsListItem {
// divider buttonText: qsTr("Close wallet") + translationManager.emptyString
Layout.preferredHeight: 1 description: qsTr("Logs out of this wallet.") + translationManager.emptyString
Layout.fillWidth: true title: qsTr("Close this wallet") + translationManager.emptyString
Layout.bottomMargin: 8
color: MoneroComponents.Style.dividerColor
opacity: MoneroComponents.Style.dividerOpacity
}
GridLayout {
Layout.fillWidth: true
Layout.preferredHeight: childrenRect.height
columnSpacing: 0
ColumnLayout {
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
spacing: 0
MoneroComponents.TextPlain {
Layout.fillWidth: true
Layout.preferredHeight: 20
Layout.topMargin: 8
color: MoneroComponents.Style.defaultFontColor
opacity: MoneroComponents.Style.blackTheme ? 1.0 : 0.8
font.bold: true
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 16
text: qsTr("Close this wallet") + translationManager.emptyString
}
MoneroComponents.TextPlainArea {
color: MoneroComponents.Style.dimmedFontColor
colorBlackTheme: MoneroComponents.Style._b_dimmedFontColor
colorWhiteTheme: MoneroComponents.Style._w_dimmedFontColor
width: parent.width
Layout.fillWidth: true
horizontalAlignment: TextInput.AlignLeft
text: qsTr("Logs out of this wallet.") + translationManager.emptyString
}
}
MoneroComponents.StandardButton {
small: true
text: qsTr("Close wallet") + translationManager.emptyString
onClicked: { onClicked: {
middlePanel.addressBookView.clearFields(); middlePanel.addressBookView.clearFields();
middlePanel.transferView.clearFields(); middlePanel.transferView.clearFields();
middlePanel.receiveView.clearFields(); middlePanel.receiveView.clearFields();
appWindow.showWizard(); appWindow.showWizard();
} }
width: 135
}
} }
Rectangle { MoneroComponents.SettingsListItem {
// divider buttonText: qsTr("Create wallet") + translationManager.emptyString
Layout.preferredHeight: 1 description: qsTr("Creates a new wallet that can only view and initiate transactions, but requires a spendable wallet to sign transactions before sending.") + translationManager.emptyString
Layout.fillWidth: true title: qsTr("Create a view-only wallet") + translationManager.emptyString
Layout.topMargin: 8
Layout.bottomMargin: 8
color: MoneroComponents.Style.dividerColor
opacity: MoneroComponents.Style.dividerOpacity
}
GridLayout {
Layout.fillWidth: true
Layout.preferredHeight: childrenRect.height
columnSpacing: 0
visible: !appWindow.viewOnly visible: !appWindow.viewOnly
ColumnLayout {
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
spacing: 0
MoneroComponents.TextPlain {
Layout.fillWidth: true
Layout.preferredHeight: 20
Layout.topMargin: 8
color: MoneroComponents.Style.defaultFontColor
opacity: MoneroComponents.Style.blackTheme ? 1.0 : 0.8
font.bold: true
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 16
text: qsTr("Create a view-only wallet") + translationManager.emptyString
}
MoneroComponents.TextPlainArea {
color: MoneroComponents.Style.dimmedFontColor
colorBlackTheme: MoneroComponents.Style._b_dimmedFontColor
colorWhiteTheme: MoneroComponents.Style._w_dimmedFontColor
width: parent.width
Layout.fillWidth: true
horizontalAlignment: TextInput.AlignLeft
text: qsTr("Creates a new wallet that can only view and initiate transactions, but requires a spendable wallet to sign transactions before sending.") + translationManager.emptyString
}
}
MoneroComponents.StandardButton {
small: true
text: qsTr("Create wallet") + translationManager.emptyString
onClicked: { onClicked: {
var newPath = currentWallet.path + "_viewonly"; var newPath = currentWallet.path + "_viewonly";
if (currentWallet.createViewOnly(newPath, appWindow.walletPassword)) { if (currentWallet.createViewOnly(newPath, appWindow.walletPassword)) {
@@ -165,111 +82,24 @@ Rectangle {
informationPopup.open() informationPopup.open()
} }
} }
width: 135
}
} }
Rectangle { MoneroComponents.SettingsListItem {
// divider buttonText: qsTr("Show seed") + translationManager.emptyString
visible: !appWindow.viewOnly description: qsTr("Store this information safely to recover your wallet in the future.") + translationManager.emptyString
Layout.preferredHeight: 1 title: qsTr("Show seed & keys") + translationManager.emptyString
Layout.fillWidth: true
Layout.topMargin: 8
Layout.bottomMargin: 8
color: MoneroComponents.Style.dividerColor
opacity: MoneroComponents.Style.dividerOpacity
}
GridLayout {
Layout.fillWidth: true
Layout.preferredHeight: childrenRect.height
columnSpacing: 0
ColumnLayout {
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
spacing: 0
MoneroComponents.TextPlain {
Layout.fillWidth: true
Layout.preferredHeight: 20
Layout.topMargin: 8
color: MoneroComponents.Style.defaultFontColor
opacity: MoneroComponents.Style.blackTheme ? 1.0 : 0.8
font.bold: true
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 16
text: qsTr("Show seed & keys") + translationManager.emptyString
}
MoneroComponents.TextPlainArea {
color: MoneroComponents.Style.dimmedFontColor
colorBlackTheme: MoneroComponents.Style._b_dimmedFontColor
colorWhiteTheme: MoneroComponents.Style._w_dimmedFontColor
width: parent.width
Layout.fillWidth: true
horizontalAlignment: TextInput.AlignLeft
text: qsTr("Store this information safely to recover your wallet in the future.") + translationManager.emptyString
}
}
MoneroComponents.StandardButton {
small: true
text: qsTr("Show seed") + translationManager.emptyString
onClicked: { onClicked: {
Utils.showSeedPage(); Utils.showSeedPage();
} }
width: 135
}
} }
Rectangle { MoneroComponents.SettingsListItem {
// divider buttonText: qsTr("Rescan") + translationManager.emptyString
Layout.preferredHeight: 1 description: qsTr("Use this feature if you think the shown balance is not accurate.") + translationManager.emptyString
Layout.fillWidth: true title: qsTr("Rescan wallet balance") + translationManager.emptyString
Layout.topMargin: 8
Layout.bottomMargin: 8
color: MoneroComponents.Style.dividerColor
opacity: MoneroComponents.Style.dividerOpacity
}
GridLayout {
visible: appWindow.walletMode >= 2 visible: appWindow.walletMode >= 2
Layout.fillWidth: true
Layout.preferredHeight: childrenRect.height
columnSpacing: 0
ColumnLayout {
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
spacing: 0
MoneroComponents.TextPlain {
Layout.fillWidth: true
Layout.preferredHeight: 20
Layout.topMargin: 8
color: MoneroComponents.Style.defaultFontColor
opacity: MoneroComponents.Style.blackTheme ? 1.0 : 0.8
font.bold: true
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 16
text: qsTr("Rescan wallet balance") + translationManager.emptyString
}
MoneroComponents.TextPlainArea {
color: MoneroComponents.Style.dimmedFontColor
colorBlackTheme: MoneroComponents.Style._b_dimmedFontColor
colorWhiteTheme: MoneroComponents.Style._w_dimmedFontColor
width: parent.width
Layout.fillWidth: true
horizontalAlignment: TextInput.AlignLeft
text: qsTr("Use this feature if you think the shown balance is not accurate.") + translationManager.emptyString
}
}
MoneroComponents.StandardButton {
small: true
text: qsTr("Rescan") + translationManager.emptyString
onClicked: { onClicked: {
if (!currentWallet.rescanSpent()) { if (!currentWallet.rescanSpent()) {
console.error("Error: ", currentWallet.errorString); console.error("Error: ", currentWallet.errorString);
@@ -286,56 +116,13 @@ Rectangle {
informationPopup.open(); informationPopup.open();
} }
} }
width: 135
}
}
Rectangle {
// divider
visible: appWindow.walletMode >= 2
Layout.preferredHeight: 1
Layout.fillWidth: true
Layout.topMargin: 8
Layout.bottomMargin: 8
color: MoneroComponents.Style.dividerColor
opacity: MoneroComponents.Style.dividerOpacity
} }
GridLayout { MoneroComponents.SettingsListItem {
Layout.fillWidth: true buttonText: qsTr("Change password") + translationManager.emptyString
Layout.preferredHeight: childrenRect.height description: qsTr("Change the password of your wallet.") + translationManager.emptyString
columnSpacing: 0 title: qsTr("Change wallet password") + translationManager.emptyString
ColumnLayout {
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
spacing: 0
MoneroComponents.TextPlain {
Layout.fillWidth: true
Layout.preferredHeight: 20
Layout.topMargin: 8
color: MoneroComponents.Style.defaultFontColor
opacity: MoneroComponents.Style.blackTheme ? 1.0 : 0.8
font.bold: true
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 16
text: qsTr("Change wallet password") + translationManager.emptyString
}
MoneroComponents.TextPlainArea {
color: MoneroComponents.Style.dimmedFontColor
colorBlackTheme: MoneroComponents.Style._b_dimmedFontColor
colorWhiteTheme: MoneroComponents.Style._w_dimmedFontColor
width: parent.width
Layout.fillWidth: true
horizontalAlignment: TextInput.AlignLeft
text: qsTr("Change the password of your wallet.") + translationManager.emptyString
}
}
MoneroComponents.StandardButton {
small: true
text: qsTr("Change password") + translationManager.emptyString
onClicked: { onClicked: {
passwordDialog.onAcceptedCallback = function() { passwordDialog.onAcceptedCallback = function() {
if(appWindow.walletPassword === passwordDialog.password){ if(appWindow.walletPassword === passwordDialog.password){
@@ -352,8 +139,6 @@ Rectangle {
passwordDialog.onRejectedCallback = null; passwordDialog.onRejectedCallback = null;
passwordDialog.open() passwordDialog.open()
} }
width: 135
}
} }
} }

View File

@@ -12,6 +12,7 @@
<file>images/plus-white.png</file> <file>images/plus-white.png</file>
<file>images/plus-white@2x.png</file> <file>images/plus-white@2x.png</file>
<file>components/Label.qml</file> <file>components/Label.qml</file>
<file>components/SettingsListItem.qml</file>
<file>images/whatIsIcon.png</file> <file>images/whatIsIcon.png</file>
<file>images/whatIsIcon@2x.png</file> <file>images/whatIsIcon@2x.png</file>
<file>images/lockIcon.png</file> <file>images/lockIcon.png</file>
@@ -21,6 +22,8 @@
<file>pages/History.qml</file> <file>pages/History.qml</file>
<file>pages/AddressBook.qml</file> <file>pages/AddressBook.qml</file>
<file>pages/Mining.qml</file> <file>pages/Mining.qml</file>
<file>components/ContextMenu.qml</file>
<file>components/ContextMenuItem.qml</file>
<file>components/NetworkStatusItem.qml</file> <file>components/NetworkStatusItem.qml</file>
<file>components/Input.qml</file> <file>components/Input.qml</file>
<file>components/StandardButton.qml</file> <file>components/StandardButton.qml</file>

View File

@@ -150,7 +150,7 @@ ColumnLayout {
color: MoneroComponents.Style.defaultFontColor color: MoneroComponents.Style.defaultFontColor
} }
TextField { MoneroComponents.Input {
id: passwordInput id: passwordInput
Layout.topMargin: 6 Layout.topMargin: 6
@@ -207,7 +207,7 @@ ColumnLayout {
color: MoneroComponents.Style.defaultFontColor color: MoneroComponents.Style.defaultFontColor
} }
TextField { MoneroComponents.Input {
id : passwordInputConfirm id : passwordInputConfirm
Layout.topMargin: 6 Layout.topMargin: 6

View File

@@ -185,7 +185,7 @@ Rectangle {
} }
} }
TextArea { MoneroComponents.InputMulti {
id: seedInput id: seedInput
property bool error: false property bool error: false
width: parent.width width: parent.width