Compare commits
388 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e2ae5c88f | ||
|
|
2021d61d91 | ||
|
|
46d0b6b0ff | ||
|
|
8ae8019f5a | ||
|
|
1a6ea3302c | ||
|
|
4de4e82ee6 | ||
|
|
5da0d5768a | ||
|
|
58586ce2dc | ||
|
|
1cc9e8af49 | ||
|
|
37a5bdc331 | ||
|
|
cc4815a3db | ||
|
|
46eba838f5 | ||
|
|
b31cc36de2 | ||
|
|
76dd4fee2f | ||
|
|
55a4b67880 | ||
|
|
97fb3d4982 | ||
|
|
28f0645d9e | ||
|
|
85dff323c8 | ||
|
|
0468e0e43a | ||
|
|
2cc3ebd315 | ||
|
|
377a1a9680 | ||
|
|
877f822de0 | ||
|
|
0feef2268d | ||
|
|
002fe8eefa | ||
|
|
1dba06a7ff | ||
|
|
838b0179e5 | ||
|
|
b12ad939ad | ||
|
|
74fbf77f62 | ||
|
|
211ef24d18 | ||
|
|
a2e0ea4faf | ||
|
|
6ab104ead7 | ||
|
|
62748b6121 | ||
|
|
8bbf2bfcbb | ||
|
|
de81af0e8d | ||
|
|
346913f3db | ||
|
|
fd8983a7ff | ||
|
|
4ef5ca5721 | ||
|
|
119deb4e82 | ||
|
|
ea92f3f272 | ||
|
|
9c383bcc24 | ||
|
|
4fba8e654d | ||
|
|
14383a1922 | ||
|
|
1610b93975 | ||
|
|
8ece450f18 | ||
|
|
ced654707d | ||
|
|
da63ab2e05 | ||
|
|
ddd95f73b4 | ||
|
|
08e386f63f | ||
|
|
bf324ec2d9 | ||
|
|
e9afaa9cc8 | ||
|
|
78e3b947d1 | ||
|
|
05b4a3dd6b | ||
|
|
c2f706a28a | ||
|
|
4df925e8a8 | ||
|
|
adf88c63ec | ||
|
|
c2545e226b | ||
|
|
5c7c4dde14 | ||
|
|
2bbb6adb4f | ||
|
|
493105b457 | ||
|
|
2bf0dd840f | ||
|
|
0f67580e8f | ||
|
|
599033815a | ||
|
|
de49ddcf5b | ||
|
|
d752117ed3 | ||
|
|
fa9285a108 | ||
|
|
9194522b56 | ||
|
|
11a16952c5 | ||
|
|
a959919b8a | ||
|
|
6f88ad0a13 | ||
|
|
cb169f11d4 | ||
|
|
98b81fa1ee | ||
|
|
a6fadd2140 | ||
|
|
09bf4a1e71 | ||
|
|
f44fcb4459 | ||
|
|
c5d598f401 | ||
|
|
9476a9880c | ||
|
|
487f2ceecb | ||
|
|
d0950499da | ||
|
|
56df20ba27 | ||
|
|
41b827b65d | ||
|
|
0b6ceab25b | ||
|
|
2566f445b2 | ||
|
|
9199f95af5 | ||
|
|
f2b4e1ea3e | ||
|
|
621c11925b | ||
|
|
a4cc91cca2 | ||
|
|
db4123ccb5 | ||
|
|
98f8f194cd | ||
|
|
f8a3a26e0d | ||
|
|
f7792b72bf | ||
|
|
d160828cda | ||
|
|
e85b51e1c2 | ||
|
|
6b926b3199 | ||
|
|
008a38aae2 | ||
|
|
70e3c2d3ad | ||
|
|
817b015335 | ||
|
|
bddb9b0050 | ||
|
|
78f7b05ecb | ||
|
|
999bc21d6b | ||
|
|
901b4b0f77 | ||
|
|
69dc0b3570 | ||
|
|
0bebf412fd | ||
|
|
ce1c5aebf7 | ||
|
|
7eef4f3364 | ||
|
|
ecadd44a16 | ||
|
|
4bd7d43588 | ||
|
|
50c8f30d0b | ||
|
|
e2203a871c | ||
|
|
3e159e0ed6 | ||
|
|
d922c91071 | ||
|
|
fa35410851 | ||
|
|
23b74a3412 | ||
|
|
6e24930026 | ||
|
|
b8b96ee719 | ||
|
|
22450cb68d | ||
|
|
a4b907a668 | ||
|
|
843536c7a1 | ||
|
|
31ae9b3947 | ||
|
|
c72729fa5d | ||
|
|
a07299f64d | ||
|
|
d55a001875 | ||
|
|
917d6d4243 | ||
|
|
05e629c0eb | ||
|
|
9c901b33f0 | ||
|
|
a0ff56fbef | ||
|
|
fc8c1114b2 | ||
|
|
93e5ef883c | ||
|
|
10a36f96f6 | ||
|
|
80cd2e08a4 | ||
|
|
97755e1b34 | ||
|
|
8a8a3847d7 | ||
|
|
00a95c11a0 | ||
|
|
8f12e97b79 | ||
|
|
9961305867 | ||
|
|
9e83942920 | ||
|
|
e390b43bdc | ||
|
|
cc8ddde01b | ||
|
|
98b2727857 | ||
|
|
4d2186fb75 | ||
|
|
419a1975eb | ||
|
|
9846bff226 | ||
|
|
a37c3756b7 | ||
|
|
c844e3d179 | ||
|
|
61d8b5efb6 | ||
|
|
ecf5c501d6 | ||
|
|
db639b96a3 | ||
|
|
e65956e910 | ||
|
|
09ce233f4b | ||
|
|
34893e169e | ||
|
|
dd171c8b49 | ||
|
|
985406e70f | ||
|
|
8bf457c864 | ||
|
|
96dab92f33 | ||
|
|
d348324f50 | ||
|
|
4f5903e7fd | ||
|
|
bdadd98622 | ||
|
|
bdad630d51 | ||
|
|
987bf920c7 | ||
|
|
f8e1b9bdb6 | ||
|
|
06fe68b56c | ||
|
|
b811d6a84f | ||
|
|
f91e1791fe | ||
|
|
49ade0d689 | ||
|
|
c970588c55 | ||
|
|
4aab43a127 | ||
|
|
c0aface962 | ||
|
|
bd7bd43504 | ||
|
|
b44d359f9e | ||
|
|
2f109d3333 | ||
|
|
7cc225039c | ||
|
|
cef9be3d02 | ||
|
|
1c31f2e481 | ||
|
|
1173dd2826 | ||
|
|
6239f949fe | ||
|
|
4ec78b35f8 | ||
|
|
87b1518023 | ||
|
|
02c55e3fd1 | ||
|
|
96762ebf09 | ||
|
|
702d3b8ec1 | ||
|
|
a3069e4a58 | ||
|
|
bd9a2d7bbb | ||
|
|
1ef9a5c2d7 | ||
|
|
3f48e3ef1c | ||
|
|
d9f7482ae8 | ||
|
|
facec65dfc | ||
|
|
dc331f0e64 | ||
|
|
67eb486e63 | ||
|
|
edb0358916 | ||
|
|
569ba16df8 | ||
|
|
d48438aeef | ||
|
|
92b3f5a2ee | ||
|
|
f430d49304 | ||
|
|
76c3b3cd1d | ||
|
|
35aee155d7 | ||
|
|
d93af5a469 | ||
|
|
051282931a | ||
|
|
d3780abe33 | ||
|
|
f327d20deb | ||
|
|
dcc16a44be | ||
|
|
36940f07c9 | ||
|
|
b99b333b71 | ||
|
|
5fa310c961 | ||
|
|
e36b166edd | ||
|
|
27525b37e0 | ||
|
|
d3d78416d7 | ||
|
|
f30570d54b | ||
|
|
20579049fa | ||
|
|
544cff7dc1 | ||
|
|
165817ec02 | ||
|
|
95c07e1a62 | ||
|
|
2f8f7c2054 | ||
|
|
99ad8ef1ba | ||
|
|
18a76299f2 | ||
|
|
113efbfdf0 | ||
|
|
0e1c6ae60f | ||
|
|
b461373b8a | ||
|
|
046124cd9b | ||
|
|
0ca7e4ec76 | ||
|
|
376eaecf08 | ||
|
|
316f8b1762 | ||
|
|
cbed1ed6f7 | ||
|
|
3507e848cf | ||
|
|
60967d3930 | ||
|
|
55a262b892 | ||
|
|
3719f00953 | ||
|
|
09003dd140 | ||
|
|
ac432fe947 | ||
|
|
5234570afa | ||
|
|
946fa538b9 | ||
|
|
52c8d68240 | ||
|
|
4fec3a4d6f | ||
|
|
02e0ac1309 | ||
|
|
51828babbb | ||
|
|
a13e4b622c | ||
|
|
56a17e0a85 | ||
|
|
e74ef368df | ||
|
|
857d034f18 | ||
|
|
3f4cedea54 | ||
|
|
4376880b46 | ||
|
|
98057487f6 | ||
|
|
06025352ce | ||
|
|
57f9cf9d85 | ||
|
|
d8fb9ec081 | ||
|
|
faf9ec3027 | ||
|
|
22291b1df1 | ||
|
|
7805430f4f | ||
|
|
b30be48a24 | ||
|
|
284caf83f6 | ||
|
|
d20c589e42 | ||
|
|
ea9ed3e0be | ||
|
|
c4c549e57a | ||
|
|
b6682330a6 | ||
|
|
b54ee598d8 | ||
|
|
7da11b050c | ||
|
|
94b6a5bbf5 | ||
|
|
5a88d4a669 | ||
|
|
3d6e9ce571 | ||
|
|
987e716374 | ||
|
|
f81bfa1865 | ||
|
|
e4a3e282b5 | ||
|
|
c017522a3c | ||
|
|
6739b51a5b | ||
|
|
3631482419 | ||
|
|
1c61ec2511 | ||
|
|
d0707d78a1 | ||
|
|
083b0fb7a8 | ||
|
|
24d113377b | ||
|
|
5e076325cd | ||
|
|
5aef186c8a | ||
|
|
81f0209006 | ||
|
|
b4e6f20b53 | ||
|
|
a278781abf | ||
|
|
2d82439b56 | ||
|
|
0b0bc87184 | ||
|
|
59fcda43c6 | ||
|
|
6e87e2cb5b | ||
|
|
8730743207 | ||
|
|
4c67007e5b | ||
|
|
0ae1c721ef | ||
|
|
21cce4cfb4 | ||
|
|
d595957405 | ||
|
|
0ce3e4b1e7 | ||
|
|
8419fce062 | ||
|
|
15dbbaf691 | ||
|
|
d8f9d2f160 | ||
|
|
dbda233b94 | ||
|
|
f82336ce8c | ||
|
|
dbc8c7d473 | ||
|
|
2c0cf0d652 | ||
|
|
2db8f77a0a | ||
|
|
0fd0fc5ceb | ||
|
|
0de95e3071 | ||
|
|
b58bff39a0 | ||
|
|
bea763d7f8 | ||
|
|
59a0184ebd | ||
|
|
1a8e3111e4 | ||
|
|
614a7a086a | ||
|
|
b9a1fa8563 | ||
|
|
51ac3ca981 | ||
|
|
192b36f74f | ||
|
|
54e183a7f5 | ||
|
|
453388f744 | ||
|
|
afc2b35ed0 | ||
|
|
9114887866 | ||
|
|
2afb346563 | ||
|
|
bc8f39c311 | ||
|
|
286a3d140d | ||
|
|
5f2b5d940c | ||
|
|
64dd55a9a6 | ||
|
|
eacc57fb44 | ||
|
|
4e2b1cec95 | ||
|
|
08dd89de58 | ||
|
|
57c205206c | ||
|
|
c15c5b5227 | ||
|
|
ffd31c50da | ||
|
|
b970cad48b | ||
|
|
752f1faa93 | ||
|
|
60b33d3a91 | ||
|
|
5de306ab7a | ||
|
|
dfe8146f5c | ||
|
|
6610f6f2da | ||
|
|
b319dbb1b2 | ||
|
|
3eae630cfe | ||
|
|
52aef114fa | ||
|
|
7c379e2cda | ||
|
|
244459e606 | ||
|
|
0e561de0a9 | ||
|
|
ceac6c8a47 | ||
|
|
b542f15531 | ||
|
|
3621ab3344 | ||
|
|
4850e13895 | ||
|
|
950e20d400 | ||
|
|
124a8b5f4e | ||
|
|
0bd4d731d2 | ||
|
|
e3a17a66ff | ||
|
|
4f385b9a04 | ||
|
|
2c54787644 | ||
|
|
7770621a2f | ||
|
|
b22fc4266c | ||
|
|
2290e7e762 | ||
|
|
f8344ce7c6 | ||
|
|
1be9ea4828 | ||
|
|
b07016b7cd | ||
|
|
179b74e570 | ||
|
|
0a6f6cb9ac | ||
|
|
417eaeae28 | ||
|
|
8ac1b4ef58 | ||
|
|
979e0da9e0 | ||
|
|
1f8aa0dff0 | ||
|
|
f75a2447a7 | ||
|
|
f6a66b6779 | ||
|
|
c5bad8ec49 | ||
|
|
2f1092de55 | ||
|
|
b825f6e1bd | ||
|
|
ad38f155bc | ||
|
|
5a418499d4 | ||
|
|
cea712e51d | ||
|
|
39d561d9f2 | ||
|
|
23301da51b | ||
|
|
9ab104b38a | ||
|
|
2c517623a1 | ||
|
|
f06d6e067f | ||
|
|
1512908751 | ||
|
|
ed1bc2eece | ||
|
|
0775b529c4 | ||
|
|
aca6174ef4 | ||
|
|
20106b29ba | ||
|
|
c9ee4bf286 | ||
|
|
10a01fa5b4 | ||
|
|
2946127ed7 | ||
|
|
416979cdbd | ||
|
|
1442215ce5 | ||
|
|
ba3bdcd6a1 | ||
|
|
877fb9ea87 | ||
|
|
9d3864b7f0 | ||
|
|
8411ec0787 | ||
|
|
76be4b8c0a | ||
|
|
8236277906 | ||
|
|
b2255cfd24 | ||
|
|
aa8c1a5421 | ||
|
|
7997e6aaf4 | ||
|
|
fa45b8f96e | ||
|
|
b2fbe51659 | ||
|
|
afb88ff511 | ||
|
|
75746a8153 | ||
|
|
66d29a4d40 | ||
|
|
6dd7445938 | ||
|
|
3907dac198 |
107
.github/qt_helper.py
vendored
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import defusedxml.ElementTree
|
||||||
|
import hashlib
|
||||||
|
import mmap
|
||||||
|
import pathlib
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
import urllib.parse
|
||||||
|
import urllib.request
|
||||||
|
import xml.etree.ElementTree as ET
|
||||||
|
|
||||||
|
MAX_TRIES = 32
|
||||||
|
|
||||||
|
def fetch_links_to_archives(os, target, major, minor, patch, toolchain):
|
||||||
|
MAX_XML_SIZE = 1024 * 1024 * 1024
|
||||||
|
MIRROR = 'download.qt.io'
|
||||||
|
base_url = f'https://{MIRROR}/online/qtsdkrepository/{os}/{target}/qt{major}_{major}{minor}{patch}'
|
||||||
|
url = f'{base_url}/Updates.xml'
|
||||||
|
for _ in range(MAX_TRIES):
|
||||||
|
try:
|
||||||
|
resp = urllib.request.urlopen(url).read(MAX_XML_SIZE)
|
||||||
|
update_xml = defusedxml.ElementTree.fromstring(resp)
|
||||||
|
break
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
raise
|
||||||
|
except BaseException as e:
|
||||||
|
print('error', e, flush=True)
|
||||||
|
else:
|
||||||
|
return
|
||||||
|
for pkg in update_xml.findall('./PackageUpdate'):
|
||||||
|
name = pkg.find('.//Name')
|
||||||
|
if name == None:
|
||||||
|
continue
|
||||||
|
if name.text != f'qt.qt{major}.{major}{minor}{patch}.{toolchain}':
|
||||||
|
continue
|
||||||
|
version = pkg.find('.//Version')
|
||||||
|
if version == None:
|
||||||
|
continue
|
||||||
|
archives = pkg.find('.//DownloadableArchives')
|
||||||
|
if archives == None or archives.text == None:
|
||||||
|
continue
|
||||||
|
for archive in archives.text.split(', '):
|
||||||
|
url = f'{base_url}/{name.text}/{version.text}{archive}'
|
||||||
|
file_name = pathlib.Path(urllib.parse.urlparse(url).path).name
|
||||||
|
yield {'name': file_name, 'url': url}
|
||||||
|
|
||||||
|
def download(links):
|
||||||
|
metalink = ET.Element('metalink', xmlns = "urn:ietf:params:xml:ns:metalink")
|
||||||
|
for link in links:
|
||||||
|
file = ET.SubElement(metalink, 'file', name = link['name'])
|
||||||
|
ET.SubElement(file, 'url').text = link['url']
|
||||||
|
data = ET.tostring(metalink, encoding='UTF-8', xml_declaration=True)
|
||||||
|
for _ in range(MAX_TRIES):
|
||||||
|
with subprocess.Popen([
|
||||||
|
'aria2c',
|
||||||
|
'--connect-timeout=8',
|
||||||
|
'--console-log-level=warn',
|
||||||
|
'--continue',
|
||||||
|
'--follow-metalink=mem',
|
||||||
|
'--max-concurrent-downloads=100',
|
||||||
|
'--max-connection-per-server=16',
|
||||||
|
'--max-file-not-found=100',
|
||||||
|
'--max-tries=100',
|
||||||
|
'--min-split-size=1MB',
|
||||||
|
'--retry-wait=1',
|
||||||
|
'--split=100',
|
||||||
|
'--summary-interval=0',
|
||||||
|
'--timeout=8',
|
||||||
|
'--user-agent=',
|
||||||
|
'--metalink-file=-',
|
||||||
|
], stdin=subprocess.PIPE) as aria:
|
||||||
|
aria.communicate(data)
|
||||||
|
if aria.wait() == 0:
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
def calc_hash_sum(files):
|
||||||
|
obj = hashlib.new('sha256')
|
||||||
|
for path in files:
|
||||||
|
with open(path, 'rb') as f:
|
||||||
|
with mmap.mmap(f.fileno(), 0, mmap.MAP_SHARED, mmap.PROT_READ) as m:
|
||||||
|
file_hash = hashlib.new('sha256', m).digest()
|
||||||
|
obj.update(file_hash)
|
||||||
|
return obj.digest().hex()
|
||||||
|
|
||||||
|
def extract_archives(files, out='.', targets=[]):
|
||||||
|
for path in files:
|
||||||
|
if subprocess.Popen(['7z', 'x', '-bd', '-y', '-aoa', f'-o{out}', path] + targets,
|
||||||
|
stdout=subprocess.DEVNULL,
|
||||||
|
).wait() != 0:
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
|
def main():
|
||||||
|
os, target, version, toolchain, expect = sys.argv[1:]
|
||||||
|
major, minor, patch = version.split('.')
|
||||||
|
links = [*fetch_links_to_archives(os, target, major, minor, patch, toolchain)]
|
||||||
|
print(*[l['url'].encode() for l in links], sep='\n', flush=True)
|
||||||
|
assert download(links)
|
||||||
|
result = calc_hash_sum([l['name'] for l in links])
|
||||||
|
print('result', result, 'expect', expect, flush=True)
|
||||||
|
assert result == expect
|
||||||
|
assert extract_archives([l['name'] for l in links], '.', ['{}.{}.{}'.format(major, minor, patch)])
|
||||||
|
[pathlib.Path(l['name']).unlink() for l in links]
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
28
.github/workflows/build.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi zmq libpgm libsodium miniupnpc ldns expat libunwind-headers protobuf qt5 pkg-config
|
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi openssl zmq libpgm libsodium miniupnpc ldns expat libunwind-headers protobuf qt5 pkg-config
|
||||||
- name: build
|
- name: build
|
||||||
run: DEV_MODE=ON make release -j3
|
run: DEV_MODE=ON make release -j3
|
||||||
- name: test qml
|
- name: test qml
|
||||||
@@ -52,9 +52,12 @@ jobs:
|
|||||||
- uses: eine/setup-msys2@v2
|
- uses: eine/setup-msys2@v2
|
||||||
with:
|
with:
|
||||||
update: true
|
update: true
|
||||||
install: mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-hidapi mingw-w64-x86_64-protobuf-c mingw-w64-x86_64-libusb git mingw-w64-x86_64-qt5 mingw-w64-x86_64-libgcrypt
|
install: mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-hidapi mingw-w64-x86_64-protobuf-c mingw-w64-x86_64-libusb mingw-w64-x86_64-unbound git mingw-w64-x86_64-qt5 mingw-w64-x86_64-libgcrypt
|
||||||
- name: build
|
- name: build
|
||||||
run: DEV_MODE=ON make release-win64 -j2
|
run: DEV_MODE=ON make release-win64 -j2
|
||||||
|
- name: deploy
|
||||||
|
run: make deploy
|
||||||
|
working-directory: build/release
|
||||||
- name: test qml
|
- name: test qml
|
||||||
run: build/release/bin/monero-wallet-gui --test-qml
|
run: build/release/bin/monero-wallet-gui --test-qml
|
||||||
|
|
||||||
@@ -65,14 +68,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi zmq libpgm miniupnpc ldns expat libunwind-headers protobuf pkg-config python3 p7zip
|
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi openssl zmq libpgm miniupnpc ldns expat libunwind-headers protobuf pkg-config python3 p7zip aria2
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: pip3 install requests semantic_version lxml py7zr
|
run: pip3 install defusedxml
|
||||||
- name: download qt
|
- name: download qt
|
||||||
run: |
|
run: python3 monero-gui/.github/qt_helper.py mac_x64 desktop 5.15.2 clang_64 c384008156fe63cc183bade0316828c598ff3e5074397c0c9ccc588d6cdc5aca
|
||||||
curl -O https://raw.githubusercontent.com/engnr/qt-downloader/master/qt-downloader
|
|
||||||
chmod +x qt-downloader
|
|
||||||
./qt-downloader macos desktop 5.15.2 clang_64
|
|
||||||
working-directory: ../
|
working-directory: ../
|
||||||
- name: build
|
- name: build
|
||||||
run: CMAKE_PREFIX_PATH=/Users/runner/work/monero-gui/5.15.2/clang_64 make release -j3
|
run: CMAKE_PREFIX_PATH=/Users/runner/work/monero-gui/5.15.2/clang_64 make release -j3
|
||||||
@@ -95,7 +95,8 @@ jobs:
|
|||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: satackey/action-docker-layer-caching@v0.0.10
|
- uses: satackey/action-docker-layer-caching@v0.0.11
|
||||||
|
if: "!startsWith(github.ref, 'refs/tags/v')"
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
key: docker-linux-static-{hash}
|
key: docker-linux-static-{hash}
|
||||||
@@ -103,7 +104,7 @@ jobs:
|
|||||||
docker-linux-static-
|
docker-linux-static-
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: sudo apt -y install xvfb libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xkb1 libxkbcommon-x11-0
|
run: sudo apt -y install xvfb libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xkb1 libxkbcommon-x11-0
|
||||||
- name: preprare build enviroment
|
- name: prepare build environment
|
||||||
run: docker build --tag monero:build-env-linux --build-arg THREADS=3 --file Dockerfile.linux .
|
run: docker build --tag monero:build-env-linux --build-arg THREADS=3 --file Dockerfile.linux .
|
||||||
- name: build
|
- name: build
|
||||||
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -w /monero-gui monero:build-env-linux sh -c 'make release-static -j3'
|
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -w /monero-gui monero:build-env-linux sh -c 'make release-static -j3'
|
||||||
@@ -124,13 +125,14 @@ jobs:
|
|||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: satackey/action-docker-layer-caching@v0.0.10
|
- uses: satackey/action-docker-layer-caching@v0.0.11
|
||||||
|
if: "!startsWith(github.ref, 'refs/tags/v')"
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
key: docker-windows-static-{hash}
|
key: docker-windows-static-{hash}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
docker-windows-static-
|
docker-windows-static-
|
||||||
- name: preprare build enviroment
|
- name: prepare build environment
|
||||||
run: docker build --tag monero:build-env-windows --build-arg THREADS=3 --file Dockerfile.windows .
|
run: docker build --tag monero:build-env-windows --build-arg THREADS=3 --file Dockerfile.windows .
|
||||||
- name: build
|
- name: build
|
||||||
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -w /monero-gui monero:build-env-windows sh -c 'make depends root=/depends target=x86_64-w64-mingw32 tag=win-x64 -j3'
|
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -w /monero-gui monero:build-env-windows sh -c 'make depends root=/depends target=x86_64-w64-mingw32 tag=win-x64 -j3'
|
||||||
@@ -149,7 +151,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: preprare build enviroment
|
- name: prepare build environment
|
||||||
run: docker build --tag monero:build-env-android --build-arg THREADS=3 --file Dockerfile.android .
|
run: docker build --tag monero:build-env-android --build-arg THREADS=3 --file Dockerfile.android .
|
||||||
- name: build
|
- name: build
|
||||||
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -e THREADS=3 monero:build-env-android
|
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -e THREADS=3 monero:build-env-android
|
||||||
|
|||||||
105
CMakeLists.txt
@@ -4,29 +4,23 @@ project(monero-gui)
|
|||||||
message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
|
message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
|
||||||
|
|
||||||
set(VERSION_MAJOR "17")
|
set(VERSION_MAJOR "17")
|
||||||
set(VERSION_MINOR "2")
|
set(VERSION_MINOR "3")
|
||||||
set(VERSION_REVISION "2")
|
set(VERSION_REVISION "2")
|
||||||
set(VERSION "0.${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")
|
set(VERSION "0.${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")
|
||||||
|
|
||||||
option(STATIC "Link libraries statically, requires static Qt")
|
option(STATIC "Link libraries statically, requires static Qt")
|
||||||
|
|
||||||
option(USE_DEVICE_TREZOR "Trezor support compilation" ON)
|
option(USE_DEVICE_TREZOR "Trezor support compilation" ON)
|
||||||
option(ENABLE_PASS_STRENGTH_METER "Enable zxcvbn library for password strength" OFF)
|
|
||||||
option(WITH_SCANNER "Enable webcam QR scanner" OFF)
|
option(WITH_SCANNER "Enable webcam QR scanner" OFF)
|
||||||
|
option(WITH_DESKTOP_ENTRY "Ask to install desktop entry on first startup" ON)
|
||||||
option(DEV_MODE "Checkout latest monero master on build" OFF)
|
option(DEV_MODE "Checkout latest monero master on build" OFF)
|
||||||
|
|
||||||
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake")
|
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake")
|
||||||
include(CheckCCompilerFlag)
|
include(CheckCCompilerFlag)
|
||||||
include(CheckCXXCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
include(CheckLinkerFlag)
|
include(CheckLinkerFlag)
|
||||||
include(FindCcache)
|
|
||||||
|
|
||||||
if(DEBUG)
|
|
||||||
set(CMAKE_VERBOSE_MAKEFILE ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(BUILD_GUI_DEPS ON)
|
set(BUILD_GUI_DEPS ON)
|
||||||
set(ARCH "x86-64" CACHE STRING "Target architecture")
|
|
||||||
set(BUILD_64 ON CACHE BOOL "Build 64-bit binaries")
|
set(BUILD_64 ON CACHE BOOL "Build 64-bit binaries")
|
||||||
|
|
||||||
if(NOT MANUAL_SUBMODULES)
|
if(NOT MANUAL_SUBMODULES)
|
||||||
@@ -72,92 +66,31 @@ endif()
|
|||||||
|
|
||||||
if(STATIC)
|
if(STATIC)
|
||||||
message(STATUS "Initiating static build")
|
message(STATUS "Initiating static build")
|
||||||
set(Boost_USE_STATIC_LIBS ON)
|
|
||||||
set(Boost_USE_STATIC_RUNTIME ON)
|
|
||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||||
add_definitions(-DMONERO_GUI_STATIC)
|
add_definitions(-DMONERO_GUI_STATIC)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Include password strength library
|
|
||||||
if(ENABLE_PASS_STRENGTH_METER)
|
|
||||||
message(STATUS "Building with pass strength meter support.")
|
|
||||||
else()
|
|
||||||
add_definitions(-DDISABLE_PASS_STRENGTH_METER)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
|
|
||||||
# force version update
|
|
||||||
function (monero_gui_add_library_with_deps)
|
|
||||||
cmake_parse_arguments(MONERO_ADD_LIBRARY "" "NAME" "DEPENDS;SOURCES" ${ARGN})
|
|
||||||
source_group("${MONERO_ADD_LIBRARY_NAME}" FILES ${MONERO_ADD_LIBRARY_SOURCES})
|
|
||||||
|
|
||||||
# Define a ("virtual") object library and an actual library that links those
|
|
||||||
# objects together. The virtual libraries can be arbitrarily combined to link
|
|
||||||
# any subset of objects into one library archive. This is used for releasing
|
|
||||||
# libwallet, which combines multiple components.
|
|
||||||
set(objlib obj_${MONERO_ADD_LIBRARY_NAME})
|
|
||||||
add_library(${objlib} OBJECT ${MONERO_ADD_LIBRARY_SOURCES})
|
|
||||||
add_library("${MONERO_ADD_LIBRARY_NAME}" $<TARGET_OBJECTS:${objlib}>)
|
|
||||||
if (MONERO_ADD_LIBRARY_DEPENDS)
|
|
||||||
add_dependencies(${objlib} ${MONERO_ADD_LIBRARY_DEPENDS})
|
|
||||||
endif()
|
|
||||||
set_property(TARGET "${MONERO_ADD_LIBRARY_NAME}" PROPERTY FOLDER "libs")
|
|
||||||
target_compile_definitions(${objlib}
|
|
||||||
PRIVATE $<TARGET_PROPERTY:${MONERO_ADD_LIBRARY_NAME},INTERFACE_COMPILE_DEFINITIONS>)
|
|
||||||
endfunction ()
|
|
||||||
|
|
||||||
function (monero_gui_add_library name)
|
|
||||||
monero_gui_add_library_with_deps(NAME "${name}" SOURCES ${ARGN})
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
include_directories(${EASYLOGGING_INCLUDE})
|
include_directories(${EASYLOGGING_INCLUDE})
|
||||||
link_directories(${EASYLOGGING_LIBRARY_DIRS})
|
link_directories(${EASYLOGGING_LIBRARY_DIRS})
|
||||||
|
|
||||||
|
|
||||||
include(VersionGui)
|
include(VersionGui)
|
||||||
monero_gui_add_library(gui_version SOURCES version.js DEPENDS genversiongui)
|
|
||||||
|
|
||||||
message(STATUS "${CMAKE_MODULE_PATH}")
|
message(STATUS "${CMAKE_MODULE_PATH}")
|
||||||
|
|
||||||
# OpenSSL
|
|
||||||
if(APPLE AND NOT OPENSSL_ROOT_DIR)
|
|
||||||
execute_process(COMMAND brew --prefix openssl OUTPUT_VARIABLE OPENSSL_ROOT_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
||||||
endif()
|
|
||||||
find_package(OpenSSL REQUIRED)
|
|
||||||
message(STATUS "OpenSSL: Version ${OPENSSL_VERSION}")
|
|
||||||
message(STATUS "OpenSSL: include dir at ${OPENSSL_INCLUDE_DIR}")
|
|
||||||
message(STATUS "OpenSSL: libraries at ${OPENSSL_LIBRARIES} ${OPENSSL_SSL_LIBRARIES}")
|
|
||||||
|
|
||||||
if(WITH_SCANNER)
|
if(WITH_SCANNER)
|
||||||
add_definitions(-DWITH_SCANNER)
|
add_definitions(-DWITH_SCANNER)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(WITH_DESKTOP_ENTRY)
|
||||||
|
add_definitions(-DWITH_DESKTOP_ENTRY)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Sodium
|
# Sodium
|
||||||
find_library(SODIUM_LIBRARY sodium)
|
find_library(SODIUM_LIBRARY sodium)
|
||||||
message(STATUS "libsodium: libraries at ${SODIUM_LIBRARY}")
|
message(STATUS "libsodium: libraries at ${SODIUM_LIBRARY}")
|
||||||
|
|
||||||
# Boost
|
|
||||||
if(DEBUG)
|
|
||||||
set(Boost_DEBUG ON)
|
|
||||||
endif()
|
|
||||||
if(APPLE AND NOT BOOST_ROOT)
|
|
||||||
execute_process(COMMAND brew --prefix boost OUTPUT_VARIABLE BOOST_ROOT OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
||||||
endif()
|
|
||||||
if(MINGW)
|
|
||||||
set(Boost_THREADAPI win32)
|
|
||||||
endif()
|
|
||||||
find_package(Boost 1.58 REQUIRED COMPONENTS
|
|
||||||
system
|
|
||||||
filesystem
|
|
||||||
thread
|
|
||||||
date_time
|
|
||||||
chrono
|
|
||||||
regex
|
|
||||||
serialization
|
|
||||||
program_options
|
|
||||||
locale)
|
|
||||||
|
|
||||||
if(UNIX AND NOT APPLE AND NOT ANDROID)
|
if(UNIX AND NOT APPLE AND NOT ANDROID)
|
||||||
set(CMAKE_SKIP_RPATH ON)
|
set(CMAKE_SKIP_RPATH ON)
|
||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES_PREV ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
set(CMAKE_FIND_LIBRARY_SUFFIXES_PREV ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||||
@@ -175,19 +108,6 @@ if(UNIX AND NOT APPLE AND NOT ANDROID)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MINGW)
|
|
||||||
string(REGEX MATCH "^[^/]:/[^/]*" msys2_install_path "${CMAKE_C_COMPILER}")
|
|
||||||
message(STATUS "MSYS location: ${msys2_install_path}")
|
|
||||||
set(CMAKE_INCLUDE_PATH "${msys2_install_path}/mingw${ARCH_WIDTH}/include")
|
|
||||||
# This is necessary because otherwise CMake will make Boost libraries -lfoo
|
|
||||||
# rather than a full path. Unfortunately, this makes the shared libraries get
|
|
||||||
# linked due to a bug in CMake which misses putting -static flags around the
|
|
||||||
# -lfoo arguments.
|
|
||||||
set(DEFLIB ${msys2_install_path}/mingw${ARCH_WIDTH}/lib)
|
|
||||||
list(REMOVE_ITEM CMAKE_C_IMPLICIT_LINK_DIRECTORIES ${DEFLIB})
|
|
||||||
list(REMOVE_ITEM CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES ${DEFLIB})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(QT5_LIBRARIES
|
set(QT5_LIBRARIES
|
||||||
Qt5Core
|
Qt5Core
|
||||||
Qt5Quick
|
Qt5Quick
|
||||||
@@ -400,10 +320,6 @@ if(ANDROID)
|
|||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
message(STATUS "Using Boost include dir at ${Boost_INCLUDE_DIRS}")
|
|
||||||
message(STATUS "Using Boost libraries at ${Boost_LIBRARIES}")
|
|
||||||
|
|
||||||
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
|
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wa,-mbig-obj")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wa,-mbig-obj")
|
||||||
set(EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi;crypt32;bcrypt)
|
set(EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi;crypt32;bcrypt)
|
||||||
@@ -431,14 +347,11 @@ endif()
|
|||||||
list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS})
|
list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS})
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
include_directories(SYSTEM /usr/include/malloc)
|
cmake_policy(SET CMP0042 NEW)
|
||||||
if(POLICY CMP0042)
|
|
||||||
cmake_policy(SET CMP0042 NEW)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (APPLE AND NOT IOS)
|
if (APPLE AND NOT IOS)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=x86-64 -fvisibility=default -std=c++11")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=default -std=c++11")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
@@ -446,8 +359,6 @@ if(APPLE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# warnings
|
# warnings
|
||||||
add_c_flag_if_supported(-Werror C_SECURITY_FLAGS)
|
|
||||||
add_cxx_flag_if_supported(-Werror CXX_SECURITY_FLAGS)
|
|
||||||
add_c_flag_if_supported(-Wformat C_SECURITY_FLAGS)
|
add_c_flag_if_supported(-Wformat C_SECURITY_FLAGS)
|
||||||
add_cxx_flag_if_supported(-Wformat CXX_SECURITY_FLAGS)
|
add_cxx_flag_if_supported(-Wformat CXX_SECURITY_FLAGS)
|
||||||
add_c_flag_if_supported(-Wformat-security C_SECURITY_FLAGS)
|
add_c_flag_if_supported(-Wformat-security C_SECURITY_FLAGS)
|
||||||
|
|||||||
11
DEPLOY.md
@@ -8,11 +8,16 @@ Use macOS 10.12 - 10.13 for better backwards compability.
|
|||||||
|
|
||||||
3. `git clone --recursive -b v0.X.Y.Z --depth 1 https://github.com/monero-project/monero-gui`
|
3. `git clone --recursive -b v0.X.Y.Z --depth 1 https://github.com/monero-project/monero-gui`
|
||||||
|
|
||||||
4. `CMAKE_PREFIX_PATH=~/Qt5.12.8/5.12.8/clang_64 make release`
|
4. Compile `monero-wallet-gui.app`
|
||||||
|
|
||||||
5. `cd build/release && make deploy`
|
```
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake -D CMAKE_BUILD_TYPE=Release -D ARCH=default -D CMAKE_PREFIX_PATH=~/Qt5.12.8/5.12.8/clang_64 ..
|
||||||
|
make
|
||||||
|
make deploy
|
||||||
|
```
|
||||||
|
|
||||||
6. Replace the `monerod` binary inside `monero-wallet-gui.app/Contents/MacOS/` with one built using deterministic builds / gitian.
|
5. Replace the `monerod` binary inside `monero-wallet-gui.app/Contents/MacOS/` with one built using deterministic builds / gitian.
|
||||||
|
|
||||||
## Codesigning and notarizing
|
## Codesigning and notarizing
|
||||||
|
|
||||||
|
|||||||
@@ -40,9 +40,10 @@ RUN cp -r ${WORKDIR}/platforms ${WORKDIR}/platform-tools ${ANDROID_SDK_ROOT}
|
|||||||
ENV HOST_PATH=${PATH}
|
ENV HOST_PATH=${PATH}
|
||||||
ENV PATH=${TOOLCHAIN_DIR}/aarch64-linux-android/bin:${TOOLCHAIN_DIR}/bin:${PATH}
|
ENV PATH=${TOOLCHAIN_DIR}/aarch64-linux-android/bin:${TOOLCHAIN_DIR}/bin:${PATH}
|
||||||
|
|
||||||
ARG ZLIB_VERSION=1.2.11
|
ARG ZLIB_VERSION=1.2.12
|
||||||
ARG ZLIB_HASH=c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
|
ARG ZLIB_HASH=91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9
|
||||||
RUN wget -q https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz \
|
RUN wget -q https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz \
|
||||||
|
&& echo "${ZLIB_HASH} zlib-${ZLIB_VERSION}.tar.gz" | sha256sum -c \
|
||||||
&& tar -xzf zlib-${ZLIB_VERSION}.tar.gz \
|
&& tar -xzf zlib-${ZLIB_VERSION}.tar.gz \
|
||||||
&& rm zlib-${ZLIB_VERSION}.tar.gz \
|
&& rm zlib-${ZLIB_VERSION}.tar.gz \
|
||||||
&& cd zlib-${ZLIB_VERSION} \
|
&& cd zlib-${ZLIB_VERSION} \
|
||||||
@@ -117,6 +118,7 @@ RUN wget -q https://downloads.sourceforge.net/project/boost/boost/${BOOST_VERSIO
|
|||||||
ARG OPENSSL_VERSION=1.1.1g
|
ARG OPENSSL_VERSION=1.1.1g
|
||||||
ARG OPENSSL_HASH=ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46
|
ARG OPENSSL_HASH=ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46
|
||||||
RUN wget -q https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
|
RUN wget -q https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
|
||||||
|
&& echo "${OPENSSL_HASH} openssl-${OPENSSL_VERSION}.tar.gz" | sha256sum -c \
|
||||||
&& tar -xzf openssl-${OPENSSL_VERSION}.tar.gz \
|
&& tar -xzf openssl-${OPENSSL_VERSION}.tar.gz \
|
||||||
&& rm openssl-${OPENSSL_VERSION}.tar.gz \
|
&& rm openssl-${OPENSSL_VERSION}.tar.gz \
|
||||||
&& cd openssl-${OPENSSL_VERSION} \
|
&& cd openssl-${OPENSSL_VERSION} \
|
||||||
@@ -129,6 +131,30 @@ RUN wget -q https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
|
|||||||
&& make -j${THREADS} install \
|
&& make -j${THREADS} install \
|
||||||
&& rm -rf $(pwd)
|
&& rm -rf $(pwd)
|
||||||
|
|
||||||
|
ARG EXPAT_VERSION=2.4.1
|
||||||
|
ARG EXPAT_HASH=2f9b6a580b94577b150a7d5617ad4643a4301a6616ff459307df3e225bcfbf40
|
||||||
|
RUN wget https://github.com/libexpat/libexpat/releases/download/R_2_4_1/expat-${EXPAT_VERSION}.tar.bz2 && \
|
||||||
|
echo "${EXPAT_HASH} expat-${EXPAT_VERSION}.tar.bz2" | sha256sum -c && \
|
||||||
|
tar -xf expat-${EXPAT_VERSION}.tar.bz2 && \
|
||||||
|
rm expat-${EXPAT_VERSION}.tar.bz2 && \
|
||||||
|
cd expat-${EXPAT_VERSION} && \
|
||||||
|
CC=${ANDROID_CLANG} CXX=${ANDROID_CLANGPP} ./configure --enable-static --disable-shared --prefix=${PREFIX} --host=aarch64-linux-android && \
|
||||||
|
make -j$THREADS && \
|
||||||
|
make -j$THREADS install && \
|
||||||
|
rm -rf $(pwd)
|
||||||
|
|
||||||
|
ARG UNBOUND_VERSION=1.13.2
|
||||||
|
ARG UNBOUND_HASH=0a13b547f3b92a026b5ebd0423f54c991e5718037fd9f72445817f6a040e1a83
|
||||||
|
RUN wget https://www.nlnetlabs.nl/downloads/unbound/unbound-${UNBOUND_VERSION}.tar.gz && \
|
||||||
|
echo "${UNBOUND_HASH} unbound-${UNBOUND_VERSION}.tar.gz" | sha256sum -c && \
|
||||||
|
tar -xzf unbound-${UNBOUND_VERSION}.tar.gz && \
|
||||||
|
rm unbound-${UNBOUND_VERSION}.tar.gz && \
|
||||||
|
cd unbound-${UNBOUND_VERSION} && \
|
||||||
|
CC=${ANDROID_CLANG} CXX=${ANDROID_CLANGPP} ./configure --disable-shared --enable-static --without-pyunbound --with-libexpat=${PREFIX} --with-ssl=${PREFIX} --with-libevent=no --without-pythonmodule --disable-flto --with-pthreads --with-libunbound-only --host=aarch64-linux-android --with-pic --prefix=${PREFIX} && \
|
||||||
|
make -j$THREADS && \
|
||||||
|
make -j$THREADS install && \
|
||||||
|
rm -rf $(pwd)
|
||||||
|
|
||||||
ARG ZMQ_VERSION=v4.3.3
|
ARG ZMQ_VERSION=v4.3.3
|
||||||
ARG ZMQ_HASH=04f5bbedee58c538934374dc45182d8fc5926fa3
|
ARG ZMQ_HASH=04f5bbedee58c538934374dc45182d8fc5926fa3
|
||||||
RUN git clone https://github.com/zeromq/libzmq.git -b ${ZMQ_VERSION} --depth 1 \
|
RUN git clone https://github.com/zeromq/libzmq.git -b ${ZMQ_VERSION} --depth 1 \
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
FROM ubuntu:16.04
|
FROM ubuntu:16.04
|
||||||
|
|
||||||
ARG THREADS=1
|
ARG THREADS=1
|
||||||
ARG QT_VERSION=5.15.2
|
ARG QT_VERSION=v5.15.3-lts-lgpl
|
||||||
|
|
||||||
ENV CFLAGS="-fPIC"
|
ENV CFLAGS="-fPIC"
|
||||||
ENV CPPFLAGS="-fPIC"
|
ENV CPPFLAGS="-fPIC"
|
||||||
@@ -169,7 +169,27 @@ RUN wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz && \
|
|||||||
tar -xzf openssl-1.1.1g.tar.gz && \
|
tar -xzf openssl-1.1.1g.tar.gz && \
|
||||||
rm openssl-1.1.1g.tar.gz && \
|
rm openssl-1.1.1g.tar.gz && \
|
||||||
cd openssl-1.1.1g && \
|
cd openssl-1.1.1g && \
|
||||||
./config no-asm no-shared no-zlib-dynamic --openssldir=/usr && \
|
./config no-asm no-shared no-zlib-dynamic --prefix=/usr --openssldir=/usr && \
|
||||||
|
make -j$THREADS && \
|
||||||
|
make -j$THREADS install && \
|
||||||
|
rm -rf $(pwd)
|
||||||
|
|
||||||
|
RUN wget https://github.com/libexpat/libexpat/releases/download/R_2_4_1/expat-2.4.1.tar.bz2 && \
|
||||||
|
echo "2f9b6a580b94577b150a7d5617ad4643a4301a6616ff459307df3e225bcfbf40 expat-2.4.1.tar.bz2" | sha256sum -c && \
|
||||||
|
tar -xf expat-2.4.1.tar.bz2 && \
|
||||||
|
rm expat-2.4.1.tar.bz2 && \
|
||||||
|
cd expat-2.4.1 && \
|
||||||
|
./configure --enable-static --disable-shared --prefix=/usr && \
|
||||||
|
make -j$THREADS && \
|
||||||
|
make -j$THREADS install && \
|
||||||
|
rm -rf $(pwd)
|
||||||
|
|
||||||
|
RUN wget https://www.nlnetlabs.nl/downloads/unbound/unbound-1.13.2.tar.gz && \
|
||||||
|
echo "0a13b547f3b92a026b5ebd0423f54c991e5718037fd9f72445817f6a040e1a83 unbound-1.13.2.tar.gz" | sha256sum -c && \
|
||||||
|
tar -xzf unbound-1.13.2.tar.gz && \
|
||||||
|
rm unbound-1.13.2.tar.gz && \
|
||||||
|
cd unbound-1.13.2 && \
|
||||||
|
./configure --disable-shared --enable-static --without-pyunbound --with-libexpat=/usr --with-ssl=/usr --with-libevent=no --without-pythonmodule --disable-flto --with-pthreads --with-libunbound-only --with-pic && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
@@ -222,9 +242,9 @@ RUN git clone -b v1.0.23 --depth 1 https://github.com/libusb/libusb && \
|
|||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN git clone -b hidapi-0.9.0 --depth 1 https://github.com/libusb/hidapi && \
|
RUN git clone -b hidapi-0.11.0 --depth 1 https://github.com/libusb/hidapi && \
|
||||||
cd hidapi && \
|
cd hidapi && \
|
||||||
git reset --hard 7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f && \
|
git reset --hard 0ec60c03cbe87cdbfb9fb199c7536fdcbc0a94b8 && \
|
||||||
./bootstrap && \
|
./bootstrap && \
|
||||||
./configure --disable-shared --enable-static && \
|
./configure --disable-shared --enable-static && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
FROM ubuntu:20.04
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
ARG THREADS=1
|
ARG THREADS=1
|
||||||
ARG QT_VERSION=5.15.2
|
ARG QT_VERSION=v5.15.3-lts-lgpl
|
||||||
ENV SOURCE_DATE_EPOCH=1397818193
|
ENV SOURCE_DATE_EPOCH=1397818193
|
||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
@@ -12,9 +12,9 @@ RUN apt update && \
|
|||||||
RUN update-alternatives --set x86_64-w64-mingw32-g++ $(which x86_64-w64-mingw32-g++-posix) && \
|
RUN update-alternatives --set x86_64-w64-mingw32-g++ $(which x86_64-w64-mingw32-g++-posix) && \
|
||||||
update-alternatives --set x86_64-w64-mingw32-gcc $(which x86_64-w64-mingw32-gcc-posix)
|
update-alternatives --set x86_64-w64-mingw32-gcc $(which x86_64-w64-mingw32-gcc-posix)
|
||||||
|
|
||||||
RUN git clone -b v0.17.0.0 --depth 1 https://github.com/monero-project/monero && \
|
RUN git clone -b v0.17.3.0 --depth 1 https://github.com/monero-project/monero && \
|
||||||
cd monero && \
|
cd monero && \
|
||||||
git reset --hard d27d4526fe89b7cdeb4b296280c4a6cf7efe21f8 && \
|
git reset --hard ab18fea3500841fc312630d49ed6840b3aedb34d && \
|
||||||
cp -a contrib/depends / && \
|
cp -a contrib/depends / && \
|
||||||
cd .. && \
|
cd .. && \
|
||||||
rm -rf monero
|
rm -rf monero
|
||||||
|
|||||||
@@ -360,7 +360,8 @@ Rectangle {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
text: qsTr("Account") + translationManager.emptyString
|
text: qsTr("Account") + translationManager.emptyString
|
||||||
symbol: qsTr("T") + translationManager.emptyString
|
symbol: (isMac ? "⌃" : qsTr("Ctrl+")) + "T" + translationManager.emptyString
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
parent.previousButton.checked = false
|
parent.previousButton.checked = false
|
||||||
parent.previousButton = accountButton
|
parent.previousButton = accountButton
|
||||||
@@ -381,7 +382,7 @@ Rectangle {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
text: qsTr("Send") + translationManager.emptyString
|
text: qsTr("Send") + translationManager.emptyString
|
||||||
symbol: qsTr("S") + translationManager.emptyString
|
symbol: (isMac ? "⌃" : qsTr("Ctrl+")) + "S" + translationManager.emptyString
|
||||||
onClicked: {
|
onClicked: {
|
||||||
parent.previousButton.checked = false
|
parent.previousButton.checked = false
|
||||||
parent.previousButton = transferButton
|
parent.previousButton = transferButton
|
||||||
@@ -403,7 +404,7 @@ Rectangle {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
text: qsTr("Address book") + translationManager.emptyString
|
text: qsTr("Address book") + translationManager.emptyString
|
||||||
symbol: qsTr("B") + translationManager.emptyString
|
symbol: (isMac ? "⌃" : qsTr("Ctrl+")) + "B" + translationManager.emptyString
|
||||||
under: transferButton
|
under: transferButton
|
||||||
onClicked: {
|
onClicked: {
|
||||||
parent.previousButton.checked = false
|
parent.previousButton.checked = false
|
||||||
@@ -425,7 +426,7 @@ Rectangle {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
text: qsTr("Receive") + translationManager.emptyString
|
text: qsTr("Receive") + translationManager.emptyString
|
||||||
symbol: qsTr("R") + translationManager.emptyString
|
symbol: (isMac ? "⌃" : qsTr("Ctrl+")) + "R" + translationManager.emptyString
|
||||||
onClicked: {
|
onClicked: {
|
||||||
parent.previousButton.checked = false
|
parent.previousButton.checked = false
|
||||||
parent.previousButton = receiveButton
|
parent.previousButton = receiveButton
|
||||||
@@ -447,7 +448,7 @@ Rectangle {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
text: qsTr("Transactions") + translationManager.emptyString
|
text: qsTr("Transactions") + translationManager.emptyString
|
||||||
symbol: qsTr("H") + translationManager.emptyString
|
symbol: (isMac ? "⌃" : qsTr("Ctrl+")) + "H" + translationManager.emptyString
|
||||||
onClicked: {
|
onClicked: {
|
||||||
parent.previousButton.checked = false
|
parent.previousButton.checked = false
|
||||||
parent.previousButton = historyButton
|
parent.previousButton = historyButton
|
||||||
@@ -469,7 +470,7 @@ Rectangle {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
text: qsTr("Advanced") + translationManager.emptyString
|
text: qsTr("Advanced") + translationManager.emptyString
|
||||||
symbol: qsTr("D") + translationManager.emptyString
|
symbol: (isMac ? "⌃" : qsTr("Ctrl+")) + "D" + translationManager.emptyString
|
||||||
onClicked: {
|
onClicked: {
|
||||||
parent.previousButton.checked = false
|
parent.previousButton.checked = false
|
||||||
parent.previousButton = advancedButton
|
parent.previousButton = advancedButton
|
||||||
@@ -490,7 +491,7 @@ Rectangle {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
text: qsTr("Settings") + translationManager.emptyString
|
text: qsTr("Settings") + translationManager.emptyString
|
||||||
symbol: qsTr("E") + translationManager.emptyString
|
symbol: (isMac ? "⌃" : qsTr("Ctrl+")) + "E" + translationManager.emptyString
|
||||||
onClicked: {
|
onClicked: {
|
||||||
parent.previousButton.checked = false
|
parent.previousButton.checked = false
|
||||||
parent.previousButton = settingsButton
|
parent.previousButton = settingsButton
|
||||||
|
|||||||
15
Makefile
@@ -29,7 +29,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
mkdir -p build && cd build && cmake -D ARCH="x86-64" -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
mkdir -p build && cd build && cmake -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
||||||
debug:
|
debug:
|
||||||
mkdir -p build && cd build && cmake -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D CMAKE_BUILD_TYPE=Debug .. && $(MAKE) VERBOSE=1
|
mkdir -p build && cd build && cmake -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D CMAKE_BUILD_TYPE=Debug .. && $(MAKE) VERBOSE=1
|
||||||
|
|
||||||
@@ -38,19 +38,20 @@ depends:
|
|||||||
cd build/$(target)/release && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D BUILD_TAG=$(tag) -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$(root)/$(target)/share/toolchain.cmake ../../.. && $(MAKE)
|
cd build/$(target)/release && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D BUILD_TAG=$(tag) -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$(root)/$(target)/share/toolchain.cmake ../../.. && $(MAKE)
|
||||||
|
|
||||||
devmode:
|
devmode:
|
||||||
mkdir -p build && cd build && cmake -D ARCH="x86-64" -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
mkdir -p build && cd build && cmake -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
||||||
clean:
|
clean:
|
||||||
mkdir -p build && cd build && rm -rf *
|
mkdir -p build && cd build && rm -rf *
|
||||||
scanner:
|
scanner:
|
||||||
mkdir -p build && cd build && cmake -D ARCH="x86-64" -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D WITH_SCANNER=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
mkdir -p build && cd build && cmake -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D WITH_SCANNER=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
||||||
|
|
||||||
release:
|
release:
|
||||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
|
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
|
||||||
|
|
||||||
release-linux-armv8:
|
release-linux-armv8:
|
||||||
mkdir -p $(builddir)/release
|
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D DEV_MODE=$(or ${DEV_MODE},OFF) -D ARCH="armv8-a" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-armv8" $(topdir) && $(MAKE)
|
||||||
cd $(builddir)/release
|
|
||||||
cmake -D DEV_MODE=$(or ${DEV_MODE},OFF) -D ARCH="armv8-a" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-armv8" $(topdir) && $(MAKE)
|
release-linux-ppc64le:
|
||||||
|
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="ppc64le" -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
|
||||||
|
|
||||||
release-static:
|
release-static:
|
||||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
|
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ Rectangle {
|
|||||||
signal paymentClicked(var recipients, string paymentId, int mixinCount, int priority, string description)
|
signal paymentClicked(var recipients, string paymentId, int mixinCount, int priority, string description)
|
||||||
signal sweepUnmixableClicked()
|
signal sweepUnmixableClicked()
|
||||||
signal generatePaymentIdInvoked()
|
signal generatePaymentIdInvoked()
|
||||||
signal getProofClicked(string txid, string address, string message);
|
signal getProofClicked(string txid, string address, string message, string amount);
|
||||||
signal checkProofClicked(string txid, string address, string message, string signature);
|
signal checkProofClicked(string txid, string address, string message, string signature);
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|||||||
53
README.md
@@ -2,12 +2,29 @@
|
|||||||
|
|
||||||
Copyright (c) 2014-2019, The Monero Project
|
Copyright (c) 2014-2019, The Monero Project
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
* [Development resources](#development-resources)
|
||||||
|
* [Vulnerability response](#vulnerability-response)
|
||||||
|
* [Introduction](#introduction)
|
||||||
|
* [About this project](#about-this-project)
|
||||||
|
* [Supporting the project](#supporting-the-project)
|
||||||
|
* [License](#license)
|
||||||
|
* [Translations](#translations)
|
||||||
|
* [Installing the Monero GUI from a package](#installing-the-monero-gui-from-a-package)
|
||||||
|
* [Compiling the Monero GUI from source](#compiling-the-monero-gui-from-source)
|
||||||
|
+ [Building Reproducible Windows static binaries with Docker (any OS)](#building-reproducible-windows-static-binaries-with-docker-any-os)
|
||||||
|
+ [Building Reproducible Linux static binaries with Docker (any OS)](#building-reproducible-linux-static-binaries-with-docker-any-os)
|
||||||
|
+ [Building Android APK with Docker (any OS) *Experimental*](#building-android-apk-with-docker-any-os-experimental)
|
||||||
|
+ [Building on Linux](#building-on-linux)
|
||||||
|
+ [Building on OS X](#building-on-os-x)
|
||||||
|
+ [Building on Windows](#building-on-windows)
|
||||||
|
|
||||||
## Development resources
|
## Development resources
|
||||||
|
|
||||||
- Web: [getmonero.org](https://getmonero.org)
|
- Web: [getmonero.org](https://getmonero.org)
|
||||||
- Mail: [dev@getmonero.org](mailto:dev@getmonero.org)
|
- Mail: [dev@getmonero.org](mailto:dev@getmonero.org)
|
||||||
- Github: [https://github.com/monero-project/monero-gui](https://github.com/monero-project/monero-gui)
|
- Github: [https://github.com/monero-project/monero-gui](https://github.com/monero-project/monero-gui)
|
||||||
- IRC: [#monero-dev on Freenode](irc://chat.freenode.net/#monero-dev)
|
- IRC: [#monero-gui on Libera](irc://irc.libera.chat/#monero-gui)
|
||||||
- Translation platform (Weblate): [translate.getmonero.org](https://translate.getmonero.org)
|
- Translation platform (Weblate): [translate.getmonero.org](https://translate.getmonero.org)
|
||||||
- UI Design: [Monero-GUI on Figma](https://www.figma.com/file/DplJ2DDQfIKiuRvolHX2hN/Monero-GUI)
|
- UI Design: [Monero-GUI on Figma](https://www.figma.com/file/DplJ2DDQfIKiuRvolHX2hN/Monero-GUI)
|
||||||
|
|
||||||
@@ -58,9 +75,10 @@ See [LICENSE](LICENSE).
|
|||||||
|
|
||||||
Do you speak a second language and would like to help translate the Monero GUI? Check out Weblate, our localization platform, at [translate.getmonero.org](https://translate.getmonero.org/). Choose the language and suggest a translation for a string or review an existing one. The Localization Workgroup made [a guide with step-by-step instructions](https://github.com/monero-ecosystem/monero-translations/blob/master/weblate.md) for Weblate.
|
Do you speak a second language and would like to help translate the Monero GUI? Check out Weblate, our localization platform, at [translate.getmonero.org](https://translate.getmonero.org/). Choose the language and suggest a translation for a string or review an existing one. The Localization Workgroup made [a guide with step-by-step instructions](https://github.com/monero-ecosystem/monero-translations/blob/master/weblate.md) for Weblate.
|
||||||
|
|
||||||
If you need help/support or any info you can contact the localization workgroup on the IRC channel #monero-translations (relayed on matrix/riot and MatterMost) or by email at translate[at]getmonero[dot]org. For more info about the Localization workgroup: [github.com/monero-ecosystem/monero-translations](https://github.com/monero-ecosystem/monero-translations)
|
If you need help/support or any info you can contact the localization workgroup on the IRC channel #monero-translations (relayed on [Matrix](https://matrix.to/#/!BKMbQLMDzHKzmtrBfg:matrix.org?via=monero.social&via=matrix.org&via=libera.chat)) or by email at translate[at]getmonero[dot]org. For more info about the Localization workgroup: [github.com/monero-ecosystem/monero-translations](https://github.com/monero-ecosystem/monero-translations)
|
||||||
|
|
||||||
Status of the translations:
|
Status of the translations:
|
||||||
|
|
||||||
<a href="https://translate.getmonero.org/engage/monero/?utm_source=widget">
|
<a href="https://translate.getmonero.org/engage/monero/?utm_source=widget">
|
||||||
<img src="https://translate.getmonero.org/widgets/monero/-/gui-wallet/horizontal-auto.svg" alt="Translation status" />
|
<img src="https://translate.getmonero.org/widgets/monero/-/gui-wallet/horizontal-auto.svg" alt="Translation status" />
|
||||||
</a>
|
</a>
|
||||||
@@ -71,6 +89,7 @@ Packages are available for
|
|||||||
* Arch Linux: [monero-gui](https://www.archlinux.org/packages/community/x86_64/monero-gui/)
|
* Arch Linux: [monero-gui](https://www.archlinux.org/packages/community/x86_64/monero-gui/)
|
||||||
* Debian: See the [whonix/monero-gui repository](https://gitlab.com/whonix/monero-gui#how-to-install-monero-using-apt-get)
|
* Debian: See the [whonix/monero-gui repository](https://gitlab.com/whonix/monero-gui#how-to-install-monero-using-apt-get)
|
||||||
* Void Linux: `xbps-install -S monero-gui`
|
* Void Linux: `xbps-install -S monero-gui`
|
||||||
|
* Flatpak: [Monero GUI](https://flathub.org/apps/details/org.getmonero.Monero)
|
||||||
* GuixSD: `guix package -i monero-gui`
|
* GuixSD: `guix package -i monero-gui`
|
||||||
* macOS (homebrew): `brew install --cask monero-wallet`
|
* macOS (homebrew): `brew install --cask monero-wallet`
|
||||||
|
|
||||||
@@ -80,6 +99,8 @@ Packaging for your favorite distribution would be a welcome contribution!
|
|||||||
|
|
||||||
*Note*: Qt 5.9.7 is the minimum version required to build the GUI.
|
*Note*: Qt 5.9.7 is the minimum version required to build the GUI.
|
||||||
|
|
||||||
|
*Note*: Official GUI releases use monero-wallet-gui from this process alongside the supporting binaries (monerod, etc) from the [CLI deterministic builds](https://github.com/monero-project/monero/blob/master/contrib/gitian/README.md).
|
||||||
|
|
||||||
### Building Reproducible Windows static binaries with Docker (any OS)
|
### Building Reproducible Windows static binaries with Docker (any OS)
|
||||||
|
|
||||||
1. Install Docker [https://docs.docker.com/engine/install/](https://docs.docker.com/engine/install/)
|
1. Install Docker [https://docs.docker.com/engine/install/](https://docs.docker.com/engine/install/)
|
||||||
@@ -180,7 +201,7 @@ Packaging for your favorite distribution would be a welcome contribution!
|
|||||||
http://<your.local.ip>:8080/QtApp-debug.apk
|
http://<your.local.ip>:8080/QtApp-debug.apk
|
||||||
```
|
```
|
||||||
|
|
||||||
### On Linux:
|
### Building on Linux
|
||||||
|
|
||||||
(Tested on Ubuntu 17.10 x64, Ubuntu 18.04 x64 and Gentoo x64)
|
(Tested on Ubuntu 17.10 x64, Ubuntu 18.04 x64 and Gentoo x64)
|
||||||
|
|
||||||
@@ -188,7 +209,7 @@ Packaging for your favorite distribution would be a welcome contribution!
|
|||||||
|
|
||||||
- For Debian distributions (Debian, Ubuntu, Mint, Tails...)
|
- For Debian distributions (Debian, Ubuntu, Mint, Tails...)
|
||||||
|
|
||||||
`sudo apt 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 libprotobuf-dev protobuf-compiler libgcrypt20-dev`
|
`sudo apt install build-essential cmake 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 libprotobuf-dev protobuf-compiler libgcrypt20-dev libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev libboost-locale-dev libboost-program-options-dev libboost-regex-dev libboost-serialization-dev libboost-system-dev libboost-thread-dev`
|
||||||
|
|
||||||
- For Gentoo
|
- For Gentoo
|
||||||
|
|
||||||
@@ -212,6 +233,9 @@ The following instructions will fetch Qt from your distribution's repositories i
|
|||||||
|
|
||||||
- For Gentoo
|
- For Gentoo
|
||||||
|
|
||||||
|
|
||||||
|
The *qml* USE flag must be enabled.
|
||||||
|
|
||||||
`sudo emerge dev-qt/qtcore:5 dev-qt/qtdeclarative:5 dev-qt/qtquickcontrols:5 dev-qt/qtquickcontrols2:5 dev-qt/qtgraphicaleffects:5`
|
`sudo emerge dev-qt/qtcore:5 dev-qt/qtdeclarative:5 dev-qt/qtquickcontrols:5 dev-qt/qtquickcontrols2:5 dev-qt/qtgraphicaleffects:5`
|
||||||
|
|
||||||
- Optional : To build the flag `WITH_SCANNER`
|
- Optional : To build the flag `WITH_SCANNER`
|
||||||
@@ -222,8 +246,6 @@ The following instructions will fetch Qt from your distribution's repositories i
|
|||||||
|
|
||||||
- For Gentoo
|
- For Gentoo
|
||||||
|
|
||||||
The *qml* USE flag must be enabled.
|
|
||||||
|
|
||||||
`emerge dev-qt/qtmultimedia:5`
|
`emerge dev-qt/qtmultimedia:5`
|
||||||
|
|
||||||
|
|
||||||
@@ -236,15 +258,24 @@ The following instructions will fetch Qt from your distribution's repositories i
|
|||||||
|
|
||||||
4. Build
|
4. Build
|
||||||
|
|
||||||
|
If on x86-64:
|
||||||
|
|
||||||
```
|
```
|
||||||
make release -j4
|
make release -j4
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If on ppc64le:
|
||||||
|
|
||||||
|
```
|
||||||
|
make release-linux-ppc64le -j4
|
||||||
|
```
|
||||||
|
|
||||||
\* `4` - number of CPU threads to use
|
\* `4` - number of CPU threads to use
|
||||||
\* Add `CMAKE_PREFIX_PATH` enviroment variable to set a custom Qt install directory, e.g. `CMAKE_PREFIX_PATH=$HOME/Qt/5.9.7/gcc_64 make release -j4`
|
\* Add `CMAKE_PREFIX_PATH` environment variable to set a custom Qt install directory, e.g. `CMAKE_PREFIX_PATH=$HOME/Qt/5.9.7/gcc_64 make release -j4`
|
||||||
|
|
||||||
The executable can be found in the build/release/bin folder.
|
The executable can be found in the build/release/bin folder.
|
||||||
|
|
||||||
### On OS X:
|
### Building on OS X
|
||||||
|
|
||||||
1. Install Xcode from AppStore
|
1. Install Xcode from AppStore
|
||||||
|
|
||||||
@@ -252,7 +283,7 @@ The executable can be found in the build/release/bin folder.
|
|||||||
|
|
||||||
3. Install [monero](https://github.com/monero-project/monero) dependencies:
|
3. Install [monero](https://github.com/monero-project/monero) dependencies:
|
||||||
|
|
||||||
`brew install boost hidapi zmq libpgm libsodium miniupnpc ldns expat libunwind-headers protobuf libgcrypt`
|
`brew install cmake pkg-config openssl boost unbound hidapi zmq libpgm libsodium miniupnpc ldns expat libunwind-headers protobuf libgcrypt`
|
||||||
|
|
||||||
4. Install Qt:
|
4. Install Qt:
|
||||||
|
|
||||||
@@ -271,13 +302,13 @@ The executable can be found in the build/release/bin folder.
|
|||||||
make release -j4
|
make release -j4
|
||||||
```
|
```
|
||||||
\* `4` - number of CPU threads to use
|
\* `4` - number of CPU threads to use
|
||||||
\* Add `CMAKE_PREFIX_PATH` enviroment variable to set a custom Qt install directory, e.g. `CMAKE_PREFIX_PATH=$HOME/Qt/5.9.7/clang_64 make release -j4`
|
\* Add `CMAKE_PREFIX_PATH` environment variable to set a custom Qt install directory, e.g. `CMAKE_PREFIX_PATH=$HOME/Qt/5.9.7/clang_64 make release -j4`
|
||||||
|
|
||||||
The executable can be found in the `build/release/bin` folder.
|
The executable can be found in the `build/release/bin` folder.
|
||||||
|
|
||||||
For building an application bundle see `DEPLOY.md`.
|
For building an application bundle see `DEPLOY.md`.
|
||||||
|
|
||||||
### On Windows:
|
### Building on Windows
|
||||||
|
|
||||||
The Monero GUI on Windows is 64 bits only; 32-bit Windows GUI builds are not officially supported anymore.
|
The Monero GUI on Windows is 64 bits only; 32-bit Windows GUI builds are not officially supported anymore.
|
||||||
|
|
||||||
|
|||||||
@@ -17,11 +17,7 @@ if(APPLE OR (WIN32 AND NOT STATIC))
|
|||||||
add_custom_command(TARGET deploy
|
add_custom_command(TARGET deploy
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${_qt_svg_dylib} $<TARGET_FILE_DIR:monero-wallet-gui>/../PlugIns/imageformats/
|
COMMAND ${CMAKE_COMMAND} -E copy ${_qt_svg_dylib} $<TARGET_FILE_DIR:monero-wallet-gui>/../PlugIns/imageformats/
|
||||||
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtGui.framework/Versions/5/QtGui" "@executable_path/../Frameworks/QtGui.fr amework/Versions/5/QtGui" $<TARGET_FILE_DIR:monero-wallet-gui>/../PlugIns/imageformats/libqsvg.dylib
|
COMMENT "Copying libqsvg.dylib"
|
||||||
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtWidgets.framework/Versions/5/QtWidgets" "@executable_path/../Frameworks/ QtGui.framework/Versions/5/QtGui" $<TARGET_FILE_DIR:monero-wallet-gui>/../PlugIns/imageformats/libqsvg.dylib
|
|
||||||
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtSvg.framework/Versions/5/QtSvg" "@executable_path/../Frameworks/QtGui.fr amework/Versions/5/QtGui" $<TARGET_FILE_DIR:monero-wallet-gui>/../PlugIns/imageformats/libqsvg.dylib
|
|
||||||
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtCore.framework/Versions/5/QtCore" "@executable_path/../Frameworks/QtGui. framework/Versions/5/QtGui" $<TARGET_FILE_DIR:monero-wallet-gui>/../PlugIns/imageformats/libqsvg.dylib
|
|
||||||
COMMENT "Copying libqsvg.dylib, running install_name_tool"
|
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -78,19 +74,19 @@ if(APPLE OR (WIN32 AND NOT STATIC))
|
|||||||
)
|
)
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
list(APPEND WIN_DEPLOY_DLLS
|
list(APPEND WIN_DEPLOY_DLLS
|
||||||
libicudtd68.dll
|
libicudtd69.dll
|
||||||
libicuind68.dll
|
libicuind69.dll
|
||||||
libicuiod68.dll
|
libicuiod69.dll
|
||||||
libicutud68.dll
|
libicutud69.dll
|
||||||
libicuucd68.dll
|
libicuucd69.dll
|
||||||
)
|
)
|
||||||
else() # assume release
|
else() # assume release
|
||||||
list(APPEND WIN_DEPLOY_DLLS
|
list(APPEND WIN_DEPLOY_DLLS
|
||||||
libicudt68.dll
|
libicudt69.dll
|
||||||
libicuin68.dll
|
libicuin69.dll
|
||||||
libicuio68.dll
|
libicuio69.dll
|
||||||
libicutu68.dll
|
libicutu69.dll
|
||||||
libicuuc68.dll
|
libicuuc69.dll
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
list(TRANSFORM WIN_DEPLOY_DLLS PREPEND "$ENV{MSYSTEM_PREFIX}/bin/")
|
list(TRANSFORM WIN_DEPLOY_DLLS PREPEND "$ENV{MSYSTEM_PREFIX}/bin/")
|
||||||
|
|||||||
@@ -1,56 +0,0 @@
|
|||||||
# Copyright (c) 2014-2020, The Monero Project
|
|
||||||
#
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are
|
|
||||||
# permitted provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# 1. Redistributions of source code must retain the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer.
|
|
||||||
#
|
|
||||||
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
|
||||||
# of conditions and the following disclaimer in the documentation and/or other
|
|
||||||
# materials provided with the distribution.
|
|
||||||
#
|
|
||||||
# 3. Neither the name of the copyright holder nor the names of its contributors may be
|
|
||||||
# used to endorse or promote products derived from this software without specific
|
|
||||||
# prior written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
|
||||||
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
|
||||||
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
# 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.
|
|
||||||
# - Try to find readline include dirs and libraries
|
|
||||||
#
|
|
||||||
# Automatically finds ccache build accelerator, if it's found in PATH.
|
|
||||||
#
|
|
||||||
# Usage of this module as follows:
|
|
||||||
#
|
|
||||||
# project(monero)
|
|
||||||
# include(FindCcache) # Include AFTER the project() macro to be able to reach the CMAKE_CXX_COMPILER variable
|
|
||||||
#
|
|
||||||
# Properties modified by this module:
|
|
||||||
#
|
|
||||||
# GLOBAL PROPERTY RULE_LAUNCH_COMPILE set to ccache, when ccache found
|
|
||||||
# GLOBAL PROPERTY RULE_LAUNCH_LINK set to ccache, when ccache found
|
|
||||||
|
|
||||||
find_program(CCACHE_FOUND ccache)
|
|
||||||
if (CCACHE_FOUND)
|
|
||||||
set(TEMP_CPP_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test-program.cpp")
|
|
||||||
file(WRITE "${TEMP_CPP_FILE}" "int main() { return 0; }")
|
|
||||||
execute_process(COMMAND "${CCACHE_FOUND}" "${CMAKE_CXX_COMPILER}" "${TEMP_CPP_FILE}" RESULT_VARIABLE RET)
|
|
||||||
if (${RET} EQUAL 0)
|
|
||||||
message("found usable ccache: ${CCACHE_FOUND}")
|
|
||||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_FOUND}")
|
|
||||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CCACHE_FOUND}")
|
|
||||||
else()
|
|
||||||
message("found ccache ${CCACHE_FOUND}, but is UNUSABLE! Return code: ${RET}")
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
message("ccache NOT found!")
|
|
||||||
endif()
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
# Copyright (c) 2014-2019, The Monero Project
|
|
||||||
#
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are
|
|
||||||
# permitted provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# 1. Redistributions of source code must retain the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer.
|
|
||||||
#
|
|
||||||
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
|
||||||
# of conditions and the following disclaimer in the documentation and/or other
|
|
||||||
# materials provided with the distribution.
|
|
||||||
#
|
|
||||||
# 3. Neither the name of the copyright holder nor the names of its contributors may be
|
|
||||||
# used to endorse or promote products derived from this software without specific
|
|
||||||
# prior written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
|
||||||
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
|
||||||
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
# Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
|
|
||||||
|
|
||||||
function (git_get_version_tag git directory result_var)
|
|
||||||
execute_process(COMMAND "${git}" rev-parse --short HEAD
|
|
||||||
WORKING_DIRECTORY ${directory}
|
|
||||||
OUTPUT_VARIABLE COMMIT
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
||||||
)
|
|
||||||
if(NOT COMMIT)
|
|
||||||
message(WARNING "${directory}: cannot determine current commit. Make sure that you are building from a Git working tree")
|
|
||||||
set(${result_var} "unknown" PARENT_SCOPE)
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
execute_process(COMMAND "${git}" describe --tags --exact-match
|
|
||||||
WORKING_DIRECTORY ${directory}
|
|
||||||
OUTPUT_VARIABLE TAG
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
||||||
)
|
|
||||||
if(TAG)
|
|
||||||
message(STATUS "${directory}: building tagged release ${TAG}-${COMMIT}")
|
|
||||||
set(${result_var} "${TAG}-${COMMIT}" PARENT_SCOPE)
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
execute_process(COMMAND "${git}" describe --tags --long
|
|
||||||
WORKING_DIRECTORY ${directory}
|
|
||||||
OUTPUT_VARIABLE MOST_RECENT_TAG
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
||||||
)
|
|
||||||
if(MOST_RECENT_TAG)
|
|
||||||
message(STATUS "${directory}: ahead of or behind a tagged release, building ${MOST_RECENT_TAG}")
|
|
||||||
set(${result_var} "${MOST_RECENT_TAG}" PARENT_SCOPE)
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
message(STATUS "${directory}: building ${COMMIT} commit")
|
|
||||||
set(${result_var} "${COMMIT}" PARENT_SCOPE)
|
|
||||||
endfunction()
|
|
||||||
@@ -26,7 +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.
|
||||||
|
|
||||||
function (write_static_version_header VERSION_TAG_GUI)
|
function (write_static_version_header tag)
|
||||||
|
set(VERSION_TAG_GUI "${tag}" CACHE STRING "The tag portion of the Monero GUI software version" FORCE)
|
||||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/version.js.in" "${CMAKE_CURRENT_SOURCE_DIR}/version.js")
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/version.js.in" "${CMAKE_CURRENT_SOURCE_DIR}/version.js")
|
||||||
endfunction ()
|
endfunction ()
|
||||||
|
|
||||||
@@ -36,11 +37,8 @@ if ("$Format:$" STREQUAL "")
|
|||||||
write_static_version_header("release")
|
write_static_version_header("release")
|
||||||
elseif (GIT_FOUND OR Git_FOUND)
|
elseif (GIT_FOUND OR Git_FOUND)
|
||||||
message(STATUS "Found Git: ${GIT_EXECUTABLE}")
|
message(STATUS "Found Git: ${GIT_EXECUTABLE}")
|
||||||
|
get_version_tag_from_git("${GIT_EXECUTABLE}")
|
||||||
include(GitGetVersionTag)
|
write_static_version_header(${VERSIONTAG})
|
||||||
git_get_version_tag(${GIT_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR} VERSION_TAG_GUI)
|
|
||||||
STRING(REGEX REPLACE "^v([0-9])" "\\1" VERSION_TAG_GUI ${VERSION_TAG_GUI})
|
|
||||||
write_static_version_header(${VERSION_TAG_GUI})
|
|
||||||
else()
|
else()
|
||||||
message(STATUS "WARNING: Git was not found!")
|
message(STATUS "WARNING: Git was not found!")
|
||||||
write_static_version_header("unknown")
|
write_static_version_header("unknown")
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ RowLayout {
|
|||||||
MoneroComponents.Label {
|
MoneroComponents.Label {
|
||||||
id: title
|
id: title
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
|
tooltipIconVisible: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@@ -45,18 +46,21 @@ RowLayout {
|
|||||||
StandardButton {
|
StandardButton {
|
||||||
id: button1
|
id: button1
|
||||||
small: true
|
small: true
|
||||||
|
primary: false
|
||||||
visible: button1.text
|
visible: button1.text
|
||||||
}
|
}
|
||||||
|
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: button2
|
id: button2
|
||||||
small: true
|
small: true
|
||||||
|
primary: false
|
||||||
visible: button2.text
|
visible: button2.text
|
||||||
}
|
}
|
||||||
|
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: button3
|
id: button3
|
||||||
small: true
|
small: true
|
||||||
|
primary: false
|
||||||
visible: button3.text
|
visible: button3.text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ Item {
|
|||||||
property int fontSize: 14
|
property int fontSize: 14
|
||||||
property alias fontColor: label.color
|
property alias fontColor: label.color
|
||||||
property bool iconOnTheLeft: true
|
property bool iconOnTheLeft: true
|
||||||
|
property alias tooltipIconVisible: label.tooltipIconVisible
|
||||||
|
property alias tooltip: label.tooltip
|
||||||
signal clicked()
|
signal clicked()
|
||||||
|
|
||||||
height: 25
|
height: 25
|
||||||
@@ -121,7 +123,10 @@ Item {
|
|||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onEntered: !label.tooltipIconVisible && label.tooltip ? label.tooltipPopup.open() : ""
|
||||||
|
onExited: !label.tooltipIconVisible && label.tooltip ? label.tooltipPopup.close() : ""
|
||||||
onClicked: {
|
onClicked: {
|
||||||
toggle()
|
toggle()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,14 +5,21 @@ import FontAwesome 1.0
|
|||||||
import "../components" as MoneroComponents
|
import "../components" as MoneroComponents
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
signal cut()
|
||||||
|
signal copy()
|
||||||
signal paste()
|
signal paste()
|
||||||
|
signal remove()
|
||||||
|
signal selectAll()
|
||||||
|
|
||||||
id: root
|
id: root
|
||||||
acceptedButtons: Qt.RightButton
|
acceptedButtons: Qt.RightButton
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (mouse.button === Qt.RightButton)
|
if (mouse.button === Qt.RightButton) {
|
||||||
|
root.parent.persistentSelection = true;
|
||||||
contextMenu.open()
|
contextMenu.open()
|
||||||
|
root.parent.cursorVisible = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Menu {
|
Menu {
|
||||||
@@ -22,19 +29,50 @@ MouseArea {
|
|||||||
border.color: MoneroComponents.Style.buttonBackgroundColorDisabledHover
|
border.color: MoneroComponents.Style.buttonBackgroundColorDisabledHover
|
||||||
border.width: 1
|
border.width: 1
|
||||||
radius: 2
|
radius: 2
|
||||||
color: MoneroComponents.Style.buttonBackgroundColorDisabled
|
color: MoneroComponents.Style.blackTheme ? MoneroComponents.Style.buttonBackgroundColorDisabled : "#E5E5E5"
|
||||||
}
|
}
|
||||||
|
|
||||||
padding: 1
|
padding: 1
|
||||||
width: 100
|
width: 110
|
||||||
x: root.mouseX
|
x: root.mouseX
|
||||||
y: root.mouseY
|
y: root.mouseY
|
||||||
|
|
||||||
|
onClosed: {
|
||||||
|
if (!root.parent.activeFocus) {
|
||||||
|
root.parent.cursorVisible = false;
|
||||||
|
}
|
||||||
|
root.parent.persistentSelection = false;
|
||||||
|
root.parent.forceActiveFocus()
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.ContextMenuItem {
|
||||||
|
enabled: root.parent.selectedText != "" && !root.parent.readOnly
|
||||||
|
onTriggered: root.cut()
|
||||||
|
text: qsTr("Cut") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.ContextMenuItem {
|
||||||
|
enabled: root.parent.selectedText != ""
|
||||||
|
onTriggered: root.copy()
|
||||||
|
text: qsTr("Copy") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
|
||||||
MoneroComponents.ContextMenuItem {
|
MoneroComponents.ContextMenuItem {
|
||||||
enabled: root.parent.canPaste === true
|
enabled: root.parent.canPaste === true
|
||||||
glyphIcon: FontAwesome.paste
|
|
||||||
onTriggered: root.paste()
|
onTriggered: root.paste()
|
||||||
text: qsTr("Paste") + translationManager.emptyString
|
text: qsTr("Paste") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MoneroComponents.ContextMenuItem {
|
||||||
|
enabled: root.parent.selectedText != "" && !root.parent.readOnly
|
||||||
|
onTriggered: root.remove()
|
||||||
|
text: qsTr("Delete") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.ContextMenuItem {
|
||||||
|
enabled: root.parent.text != ""
|
||||||
|
onTriggered: root.selectAll()
|
||||||
|
text: qsTr("Select All") + translationManager.emptyString
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,21 +13,31 @@ MenuItem {
|
|||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: MoneroComponents.Style.buttonBackgroundColorDisabledHover
|
color: MoneroComponents.Style.buttonBackgroundColorDisabledHover
|
||||||
opacity: mouse.containsMouse ? 1 : 0
|
opacity: 0
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: mouse
|
id: mouse
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onClicked: menuItem.triggered()
|
onEntered: {
|
||||||
visible: menuItem.enabled
|
parent.opacity = 1;
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
parent.opacity = 0;
|
||||||
|
}
|
||||||
|
onClicked: {
|
||||||
|
if (menuItem.enabled) {
|
||||||
|
menuItem.triggered();
|
||||||
|
parent.opacity = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.leftMargin: 10
|
anchors.leftMargin: 20
|
||||||
anchors.rightMargin: 10
|
anchors.rightMargin: 10
|
||||||
opacity: menuItem.enabled ? 1 : 0.4
|
opacity: menuItem.enabled ? 1 : 0.4
|
||||||
spacing: 8
|
spacing: 8
|
||||||
@@ -42,7 +52,7 @@ MenuItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
color: MoneroComponents.Style.buttonTextColor
|
color: MoneroComponents.Style.blackTheme ? MoneroComponents.Style.buttonTextColor : MoneroComponents.Style.defaultFontColor
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
font.pixelSize: 14
|
font.pixelSize: 14
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import QtQuick.Controls 2.2 as QtQuickControls2
|
|||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import QtQuick.Controls.Styles 1.2
|
import QtQuick.Controls.Styles 1.2
|
||||||
|
import FontAwesome 1.0
|
||||||
|
|
||||||
import "." as MoneroComponents
|
import "." as MoneroComponents
|
||||||
import "effects/" as MoneroEffects
|
import "effects/" as MoneroEffects
|
||||||
@@ -91,8 +92,8 @@ Item {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
height: parent.height - 1
|
height: parent.height - 1
|
||||||
anchors.leftMargin: datePicker.expanded ? 1 : 0
|
anchors.leftMargin: 0
|
||||||
anchors.rightMargin: datePicker.expanded ? 1 : 0
|
anchors.rightMargin: 0
|
||||||
radius: 4
|
radius: 4
|
||||||
y: 1
|
y: 1
|
||||||
color: datePicker.backgroundColor
|
color: datePicker.backgroundColor
|
||||||
@@ -221,21 +222,18 @@ Item {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
Image {
|
MoneroEffects.ImageMask {
|
||||||
id: button
|
id: button
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 10
|
anchors.rightMargin: 10
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
source: "qrc:///images/whiteDropIndicator.png"
|
image: "qrc:///images/whiteDropIndicator.png"
|
||||||
visible: false
|
height: 8
|
||||||
}
|
width: 12
|
||||||
|
fontAwesomeFallbackIcon: FontAwesome.arrowDown
|
||||||
ColorOverlay {
|
fontAwesomeFallbackSize: 14
|
||||||
source: button
|
|
||||||
anchors.fill: button
|
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
rotation: datePicker.expanded ? 180 : 0
|
rotation: datePicker.expanded ? 180 : 0
|
||||||
opacity: 1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
@@ -252,12 +250,16 @@ Item {
|
|||||||
id: popup
|
id: popup
|
||||||
padding: 0
|
padding: 0
|
||||||
closePolicy: QtQuickControls2.Popup.CloseOnEscape | QtQuickControls2.Popup.CloseOnPressOutsideParent
|
closePolicy: QtQuickControls2.Popup.CloseOnEscape | QtQuickControls2.Popup.CloseOnPressOutsideParent
|
||||||
|
onOpened: {
|
||||||
|
calendar.visibleMonth = currentDate.getMonth();
|
||||||
|
calendar.visibleYear = currentDate.getFullYear();
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: calendarRect
|
id: calendarRect
|
||||||
width: head.width
|
width: head.width
|
||||||
x: head.x
|
x: head.x
|
||||||
y: head.y + head.height + 10
|
y: head.y + head.height - 2
|
||||||
|
|
||||||
color: MoneroComponents.Style.middlePanelBackgroundColor
|
color: MoneroComponents.Style.middlePanelBackgroundColor
|
||||||
border.width: 1
|
border.width: 1
|
||||||
@@ -266,11 +268,16 @@ Item {
|
|||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
|
NumberAnimation { duration: 150; easing.type: Easing.InQuad }
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
scrollGestureEnabled: false
|
||||||
|
onWheel: {
|
||||||
|
if (wheel.angleDelta.y > 0) return calendar.showPreviousMonth();
|
||||||
|
if (wheel.angleDelta.y < 0) return calendar.showNextMonth();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@@ -305,11 +312,6 @@ Item {
|
|||||||
id: dayRect
|
id: dayRect
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: parent.implicitHeight / 2
|
radius: parent.implicitHeight / 2
|
||||||
color: {
|
|
||||||
if(dayArea.pressed && styleData.visibleMonth)
|
|
||||||
return MoneroComponents.Style.blackTheme ? "#20FFFFFF" : "#10000000"
|
|
||||||
return "transparent";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
@@ -327,19 +329,32 @@ Item {
|
|||||||
text: styleData.date.getDate()
|
text: styleData.date.getDate()
|
||||||
themeTransition: false
|
themeTransition: false
|
||||||
color: {
|
color: {
|
||||||
if(!styleData.visibleMonth) return MoneroComponents.Style.lightGreyFontColor
|
if (currentDate.toDateString() === styleData.date.toDateString()) {
|
||||||
if(dayArea.pressed) return MoneroComponents.Style.defaultFontColor
|
if (dayArea.containsMouse) {
|
||||||
if(styleData.today) return MoneroComponents.Style.orange
|
dayRect.color = MoneroComponents.Style.buttonBackgroundColorHover;
|
||||||
return MoneroComponents.Style.defaultFontColor
|
} else {
|
||||||
|
dayRect.color = MoneroComponents.Style.buttonBackgroundColor;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (dayArea.containsMouse) {
|
||||||
|
dayRect.color = MoneroComponents.Style.blackTheme ? "#20FFFFFF" : "#10000000"
|
||||||
|
} else {
|
||||||
|
dayRect.color = "transparent";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!styleData.valid) return "transparent"
|
||||||
|
if(styleData.date.toDateString() === (new Date()).toDateString()) return "#FFFF00"
|
||||||
|
if(!styleData.visibleMonth) return MoneroComponents.Style.lightGreyFontColor
|
||||||
|
if(dayArea.pressed) return MoneroComponents.Style.defaultFontColor
|
||||||
|
return MoneroComponents.Style.defaultFontColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: dayArea
|
id: dayArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
visible: styleData.valid
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onEntered: dayRect.color = MoneroComponents.Style.blackTheme ? "#20FFFFFF" : "#10000000"
|
|
||||||
onExited: dayRect.color = "transparent"
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if(styleData.visibleMonth) {
|
if(styleData.visibleMonth) {
|
||||||
@@ -397,18 +412,15 @@ Item {
|
|||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
width: height
|
width: height
|
||||||
|
|
||||||
Image {
|
MoneroEffects.ImageMask {
|
||||||
id: prevMonthIcon
|
id: prevMonthIcon
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
source: "qrc:///images/prevMonth.png"
|
image: "qrc:///images/prevMonth.png"
|
||||||
visible: false
|
height: 8
|
||||||
}
|
width: 12
|
||||||
|
fontAwesomeFallbackIcon: FontAwesome.arrowLeft
|
||||||
ColorOverlay {
|
fontAwesomeFallbackSize: 14
|
||||||
source: prevMonthIcon
|
|
||||||
anchors.fill: prevMonthIcon
|
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
opacity: 0.5
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
@@ -426,19 +438,16 @@ Item {
|
|||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
width: height
|
width: height
|
||||||
|
|
||||||
Image {
|
MoneroEffects.ImageMask {
|
||||||
id: nextMonthIcon
|
id: nextMonthIcon
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
source: "qrc:///images/prevMonth.png"
|
image: "qrc:///images/prevMonth.png"
|
||||||
visible: false
|
height: 8
|
||||||
}
|
width: 12
|
||||||
|
|
||||||
ColorOverlay {
|
|
||||||
source: nextMonthIcon
|
|
||||||
anchors.fill: nextMonthIcon
|
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
|
||||||
opacity: 0.5
|
|
||||||
rotation: 180
|
rotation: 180
|
||||||
|
fontAwesomeFallbackIcon: FontAwesome.arrowLeft
|
||||||
|
fontAwesomeFallbackSize: 14
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
|||||||
@@ -36,19 +36,28 @@ MoneroEffects.ImageMask {
|
|||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
image: ""
|
image: ""
|
||||||
|
|
||||||
|
property alias tooltip: tooltip.text
|
||||||
signal clicked(var mouse)
|
signal clicked(var mouse)
|
||||||
|
|
||||||
|
MoneroComponents.Tooltip {
|
||||||
|
id: tooltip
|
||||||
|
anchors.fill: parent
|
||||||
|
tooltipLeft: true
|
||||||
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
|
||||||
onEntered: {
|
onEntered: {
|
||||||
|
tooltip.text ? tooltip.tooltipPopup.open() : ""
|
||||||
button.width = button.width + 2
|
button.width = button.width + 2
|
||||||
button.height = button.height + 2
|
button.height = button.height + 2
|
||||||
}
|
}
|
||||||
|
|
||||||
onExited: {
|
onExited: {
|
||||||
|
tooltip.text ? tooltip.tooltipPopup.close() : ""
|
||||||
button.width = button.width - 2
|
button.width = button.width - 2
|
||||||
button.height = button.height - 2
|
button.height = button.height - 2
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,9 @@ Item {
|
|||||||
property alias fontStyleName: inlineText.font.styleName
|
property alias fontStyleName: inlineText.font.styleName
|
||||||
property bool isFontAwesomeIcon: fontFamily == FontAwesome.fontFamily || fontFamily == FontAwesome.fontFamilySolid
|
property bool isFontAwesomeIcon: fontFamily == FontAwesome.fontFamily || fontFamily == FontAwesome.fontFamilySolid
|
||||||
property alias buttonColor: rect.color
|
property alias buttonColor: rect.color
|
||||||
|
property alias tooltip: tooltip.text
|
||||||
|
property alias tooltipLeft: tooltip.tooltipLeft
|
||||||
|
property alias tooltipBottom: tooltip.tooltipBottom
|
||||||
|
|
||||||
height: isFontAwesomeIcon ? 30 : 24
|
height: isFontAwesomeIcon ? 30 : 24
|
||||||
width: isFontAwesomeIcon ? height : inlineText.width + 16
|
width: isFontAwesomeIcon ? height : inlineText.width + 16
|
||||||
@@ -61,7 +64,7 @@ Item {
|
|||||||
Rectangle{
|
Rectangle{
|
||||||
id: rect
|
id: rect
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: MoneroComponents.Style.buttonInlineBackgroundColor
|
color: buttonArea.containsMouse ? MoneroComponents.Style.buttonInlineBackgroundColorHover : MoneroComponents.Style.buttonInlineBackgroundColor
|
||||||
radius: 4
|
radius: 4
|
||||||
|
|
||||||
|
|
||||||
@@ -82,19 +85,25 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Tooltip {
|
||||||
|
id: tooltip
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: buttonArea
|
id: buttonArea
|
||||||
cursorShape: rect.enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
|
cursorShape: rect.enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: doClick()
|
onClicked: {
|
||||||
|
tooltip.text ? tooltip.tooltipPopup.close() : ""
|
||||||
|
doClick()
|
||||||
|
}
|
||||||
onEntered: {
|
onEntered: {
|
||||||
rect.color = buttonColor ? buttonColor : "#707070";
|
tooltip.text ? tooltip.tooltipPopup.open() : ""
|
||||||
rect.opacity = 0.8;
|
|
||||||
}
|
}
|
||||||
onExited: {
|
onExited: {
|
||||||
rect.opacity = 1.0;
|
tooltip.text ? tooltip.tooltipPopup.close() : ""
|
||||||
rect.color = buttonColor ? buttonColor : "#808080";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,9 +48,16 @@ TextField {
|
|||||||
|
|
||||||
MoneroComponents.ContextMenu {
|
MoneroComponents.ContextMenu {
|
||||||
cursorShape: Qt.IBeamCursor
|
cursorShape: Qt.IBeamCursor
|
||||||
|
onCut: textField.cut();
|
||||||
|
onCopy: textField.copy();
|
||||||
onPaste: {
|
onPaste: {
|
||||||
textField.clear();
|
var previoustextFieldLength = textField.length
|
||||||
|
var previousCursorPosition = textField.cursorPosition;
|
||||||
textField.paste();
|
textField.paste();
|
||||||
|
textField.forceActiveFocus()
|
||||||
|
textField.cursorPosition = previousCursorPosition + (textField.length - previoustextFieldLength);
|
||||||
}
|
}
|
||||||
|
onRemove: textField.remove(selectionStart, selectionEnd);
|
||||||
|
onSelectAll: textField.selectAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ Item {
|
|||||||
|
|
||||||
MoneroComponents.StandardButton {
|
MoneroComponents.StandardButton {
|
||||||
id: cancelButton
|
id: cancelButton
|
||||||
|
primary: false
|
||||||
small: true
|
small: true
|
||||||
width: 120
|
width: 120
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
|
|||||||
@@ -71,9 +71,16 @@ TextArea {
|
|||||||
|
|
||||||
MoneroComponents.ContextMenu {
|
MoneroComponents.ContextMenu {
|
||||||
cursorShape: Qt.IBeamCursor
|
cursorShape: Qt.IBeamCursor
|
||||||
|
onCut: textArea.cut();
|
||||||
|
onCopy: textArea.copy();
|
||||||
onPaste: {
|
onPaste: {
|
||||||
textArea.clear();
|
var previoustextFieldLength = textArea.length
|
||||||
|
var previousCursorPosition = textArea.cursorPosition;
|
||||||
textArea.paste();
|
textArea.paste();
|
||||||
|
textArea.forceActiveFocus()
|
||||||
|
textArea.cursorPosition = previousCursorPosition + (textArea.length - previoustextFieldLength);
|
||||||
}
|
}
|
||||||
|
onRemove: textArea.remove(selectionStart, selectionEnd);
|
||||||
|
onSelectAll: textArea.selectAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,9 @@ Item {
|
|||||||
id: item
|
id: item
|
||||||
property alias text: label.text
|
property alias text: label.text
|
||||||
property alias tooltip: label.tooltip
|
property alias tooltip: label.tooltip
|
||||||
|
property alias tooltipIconVisible: label.tooltipIconVisible
|
||||||
property alias color: label.color
|
property alias color: label.color
|
||||||
|
property alias labelMouseArea: labelMouseArea
|
||||||
property int textFormat: Text.PlainText
|
property int textFormat: Text.PlainText
|
||||||
property string tipText: ""
|
property string tipText: ""
|
||||||
property int fontSize: 16
|
property int fontSize: 16
|
||||||
@@ -71,9 +73,13 @@ Item {
|
|||||||
onLinkActivated: item.linkActivated()
|
onLinkActivated: item.linkActivated()
|
||||||
textFormat: parent.textFormat
|
textFormat: parent.textFormat
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
id: labelMouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
acceptedButtons: Qt.NoButton
|
acceptedButtons: Qt.NoButton
|
||||||
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
cursorShape: parent.hoveredLink || (tooltip && !tooltipIconVisible) ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
|
onEntered: tooltip && !tooltipIconVisible ? parent.tooltipPopup.open() : undefined
|
||||||
|
onExited: tooltip && !tooltipIconVisible ? parent.tooltipPopup.close() : undefined
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import "../components/effects/" as MoneroEffects
|
|||||||
Label {
|
Label {
|
||||||
id: item
|
id: item
|
||||||
fontSize: 18
|
fontSize: 18
|
||||||
|
tooltipIconVisible: true
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.top: item.bottom
|
anchors.top: item.bottom
|
||||||
|
|||||||
@@ -53,26 +53,64 @@ Drawer {
|
|||||||
color: "red"
|
color: "red"
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
|
id: languagesListView
|
||||||
clip: true
|
clip: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
boundsBehavior: Flickable.StopAtBounds
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
width: sideBar.width
|
width: sideBar.width
|
||||||
height: sideBar.height
|
height: sideBar.height
|
||||||
|
focus: true
|
||||||
|
|
||||||
model: langModel
|
model: langModel
|
||||||
|
|
||||||
|
Keys.onUpPressed: currentIndex !== 0 ? currentIndex = currentIndex - 1 : ""
|
||||||
|
Keys.onBacktabPressed: currentIndex !== 0 ? currentIndex = currentIndex - 1 : ""
|
||||||
|
Keys.onDownPressed: currentIndex + 1 !== count ? currentIndex = currentIndex + 1 : ""
|
||||||
|
Keys.onTabPressed: currentIndex + 1 !== count ? currentIndex = currentIndex + 1 : ""
|
||||||
|
|
||||||
delegate: Rectangle {
|
delegate: Rectangle {
|
||||||
id: item
|
id: item
|
||||||
color: "transparent"
|
color: index == languagesListView.currentIndex ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
|
||||||
width: sideBar.width
|
width: sideBar.width
|
||||||
height: 32
|
height: 32
|
||||||
|
|
||||||
|
Accessible.role: Accessible.ListItem
|
||||||
|
Accessible.name: display_name
|
||||||
|
Keys.onEnterPressed: setSelectedItemAsLanguage();
|
||||||
|
Keys.onReturnPressed: setSelectedItemAsLanguage();
|
||||||
|
Keys.onSpacePressed: setSelectedItemAsLanguage();
|
||||||
|
|
||||||
|
function setSelectedItemAsLanguage() {
|
||||||
|
var locale_spl = locale.split("_");
|
||||||
|
|
||||||
|
// reload active translations
|
||||||
|
console.log(locale_spl[0]);
|
||||||
|
translationManager.setLanguage(locale_spl[0]);
|
||||||
|
|
||||||
|
// set wizard language settings
|
||||||
|
persistentSettings.locale = locale;
|
||||||
|
persistentSettings.language = display_name;
|
||||||
|
persistentSettings.language_wallet = wallet_language;
|
||||||
|
|
||||||
|
appWindow.showStatusMessage(qsTr("Language changed."), 3);
|
||||||
|
appWindow.toggleLanguageView();
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: selectedIndicator
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 0
|
||||||
|
height: parent.height
|
||||||
|
width: 2
|
||||||
|
color: index == languagesListView.currentIndex ? MoneroComponents.Style.buttonBackgroundColor : "transparent"
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: flagRect
|
id: flagRect
|
||||||
height: 24
|
height: 24
|
||||||
width: 24
|
width: 24
|
||||||
anchors.left: parent.left
|
anchors.left: selectedIndicator.right
|
||||||
anchors.leftMargin: 4
|
anchors.leftMargin: 4
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
@@ -85,8 +123,8 @@ Drawer {
|
|||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 30
|
anchors.leftMargin: 32
|
||||||
font.bold: true
|
font.bold: languagesListView.currentIndex == index ? true : false
|
||||||
font.pixelSize: 14
|
font.pixelSize: 14
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
text: display_name
|
text: display_name
|
||||||
@@ -112,21 +150,7 @@ Drawer {
|
|||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
onClicked: {
|
onClicked: setSelectedItemAsLanguage();
|
||||||
var locale_spl = locale.split("_");
|
|
||||||
|
|
||||||
// reload active translations
|
|
||||||
console.log(locale_spl[0]);
|
|
||||||
translationManager.setLanguage(locale_spl[0]);
|
|
||||||
|
|
||||||
// set wizard language settings
|
|
||||||
persistentSettings.locale = locale;
|
|
||||||
persistentSettings.language = display_name;
|
|
||||||
persistentSettings.language_wallet = wallet_language;
|
|
||||||
|
|
||||||
appWindow.showStatusMessage(qsTr("Language changed."), 3);
|
|
||||||
appWindow.toggleLanguageView();
|
|
||||||
}
|
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onEntered: {
|
onEntered: {
|
||||||
// item.color = "#26FFFFFF"
|
// item.color = "#26FFFFFF"
|
||||||
@@ -166,4 +190,12 @@ Drawer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function selectCurrentLanguage() {
|
||||||
|
for (var i = 0; i < langModel.count; ++i) {
|
||||||
|
if (langModel.get(i).display_name === persistentSettings.language) {
|
||||||
|
languagesListView.currentIndex = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,14 +33,21 @@ import QtQuick.Layouts 1.1
|
|||||||
|
|
||||||
import "../components" as MoneroComponents
|
import "../components" as MoneroComponents
|
||||||
|
|
||||||
Item {
|
ColumnLayout {
|
||||||
id: item
|
id: item
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
default property alias content: inlineButtons.children
|
default property alias content: inlineButtons.children
|
||||||
|
|
||||||
property alias input: input
|
property alias input: input
|
||||||
property alias text: input.text
|
property alias text: input.text
|
||||||
|
|
||||||
|
property int inputPaddingLeft: 10
|
||||||
|
property int inputPaddingRight: 10
|
||||||
|
property int inputPaddingTop: 10
|
||||||
|
property int inputPaddingBottom: 10
|
||||||
|
property int inputRadius: 4
|
||||||
|
|
||||||
property bool password: false
|
property bool password: false
|
||||||
property bool passwordHidden: true
|
property bool passwordHidden: true
|
||||||
property var passwordLinked: null
|
property var passwordLinked: null
|
||||||
@@ -55,10 +62,8 @@ Item {
|
|||||||
property real placeholderLeftMargin: {
|
property real placeholderLeftMargin: {
|
||||||
if (placeholderCenter) {
|
if (placeholderCenter) {
|
||||||
return undefined;
|
return undefined;
|
||||||
} else if (inlineIcon.visible) {
|
|
||||||
return inlineIcon.width + inlineIcon.anchors.leftMargin + inputPadding;
|
|
||||||
} else {
|
} else {
|
||||||
return inputPadding;
|
return inputPaddingLeft;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,16 +71,16 @@ Item {
|
|||||||
property alias validator: input.validator
|
property alias validator: input.validator
|
||||||
property alias readOnly : input.readOnly
|
property alias readOnly : input.readOnly
|
||||||
property alias cursorPosition: input.cursorPosition
|
property alias cursorPosition: input.cursorPosition
|
||||||
property alias inlineIcon: inlineIcon.visible
|
|
||||||
property bool copyButton: false
|
property bool copyButton: false
|
||||||
|
property bool pasteButton: false
|
||||||
property alias copyButtonText: copyButtonId.text
|
property alias copyButtonText: copyButtonId.text
|
||||||
property alias copyButtonEnabled: copyButtonId.enabled
|
property alias copyButtonEnabled: copyButtonId.enabled
|
||||||
|
|
||||||
property bool borderDisabled: false
|
property bool borderDisabled: false
|
||||||
property string borderColor: {
|
property string borderColor: {
|
||||||
if(error && input.text !== ""){
|
if ((error && input.text !== "") || (errorWhenEmpty && input.text == "")) {
|
||||||
return MoneroComponents.Style.inputBorderColorInvalid;
|
return MoneroComponents.Style.inputBorderColorInvalid;
|
||||||
} else if(input.activeFocus){
|
} else if (input.activeFocus) {
|
||||||
return MoneroComponents.Style.inputBorderColorActive;
|
return MoneroComponents.Style.inputBorderColorActive;
|
||||||
} else {
|
} else {
|
||||||
return MoneroComponents.Style.inputBorderColorInActive;
|
return MoneroComponents.Style.inputBorderColorInActive;
|
||||||
@@ -87,6 +92,7 @@ Item {
|
|||||||
property bool fontBold: false
|
property bool fontBold: false
|
||||||
property alias fontColor: input.color
|
property alias fontColor: input.color
|
||||||
property bool error: false
|
property bool error: false
|
||||||
|
property bool errorWhenEmpty: false
|
||||||
property alias labelText: inputLabel.text
|
property alias labelText: inputLabel.text
|
||||||
property alias labelColor: inputLabel.color
|
property alias labelColor: inputLabel.color
|
||||||
property alias labelTextFormat: inputLabel.textFormat
|
property alias labelTextFormat: inputLabel.textFormat
|
||||||
@@ -97,16 +103,13 @@ Item {
|
|||||||
property alias labelWrapMode: inputLabel.wrapMode
|
property alias labelWrapMode: inputLabel.wrapMode
|
||||||
property alias labelHorizontalAlignment: inputLabel.horizontalAlignment
|
property alias labelHorizontalAlignment: inputLabel.horizontalAlignment
|
||||||
property bool showingHeader: inputLabel.text !== "" || copyButton
|
property bool showingHeader: inputLabel.text !== "" || copyButton
|
||||||
property int inputHeight: 42
|
property int inputHeight: 39
|
||||||
property int inputPadding: 10
|
|
||||||
|
|
||||||
signal labelLinkActivated(); // input label, rich text <a> signal
|
signal labelLinkActivated(); // input label, rich text <a> signal
|
||||||
signal editingFinished();
|
signal editingFinished();
|
||||||
signal accepted();
|
signal accepted();
|
||||||
signal textUpdated();
|
signal textUpdated();
|
||||||
|
|
||||||
height: showingHeader ? (inputLabel.height + inputItem.height + 2) : inputHeight
|
|
||||||
|
|
||||||
onActiveFocusChanged: activeFocus && input.forceActiveFocus()
|
onActiveFocusChanged: activeFocus && input.forceActiveFocus()
|
||||||
onTextUpdated: {
|
onTextUpdated: {
|
||||||
// check to remove placeholder text when there is content
|
// check to remove placeholder text when there is content
|
||||||
@@ -152,45 +155,100 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
spacing: 0
|
||||||
id: inputLabel
|
Rectangle {
|
||||||
anchors.top: parent.top
|
id: inputLabelRect
|
||||||
anchors.left: parent.left
|
color: "transparent"
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
Layout.fillWidth: true
|
||||||
font.pixelSize: labelFontSize
|
height: (inputLabel.height + 10)
|
||||||
font.bold: labelFontBold
|
visible: showingHeader ? true : false
|
||||||
textFormat: Text.RichText
|
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
|
||||||
onLinkActivated: item.labelLinkActivated()
|
|
||||||
|
|
||||||
MouseArea {
|
MoneroComponents.TextPlain {
|
||||||
anchors.fill: parent
|
id: inputLabel
|
||||||
acceptedButtons: Qt.NoButton
|
anchors.top: parent.top
|
||||||
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
anchors.left: parent.left
|
||||||
}
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
}
|
font.pixelSize: labelFontSize
|
||||||
|
font.bold: labelFontBold
|
||||||
|
textFormat: Text.RichText
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
onLinkActivated: item.labelLinkActivated()
|
||||||
|
|
||||||
MoneroComponents.LabelButton {
|
MouseArea {
|
||||||
id: copyButtonId
|
anchors.fill: parent
|
||||||
text: qsTr("Copy") + translationManager.emptyString
|
acceptedButtons: Qt.NoButton
|
||||||
anchors.right: parent.right
|
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
onClicked: {
|
}
|
||||||
if (input.text.length > 0) {
|
}
|
||||||
console.log("Copied to clipboard");
|
|
||||||
clipboard.setText(input.text);
|
RowLayout {
|
||||||
appWindow.showStatusMessage(qsTr("Copied to clipboard"), 3);
|
anchors.right: parent.right
|
||||||
|
spacing: 16
|
||||||
|
|
||||||
|
MoneroComponents.LabelButton {
|
||||||
|
id: copyButtonId
|
||||||
|
text: qsTr("Copy") + translationManager.emptyString
|
||||||
|
onClicked: {
|
||||||
|
if (input.text.length > 0) {
|
||||||
|
console.log("Copied to clipboard");
|
||||||
|
clipboard.setText(input.text);
|
||||||
|
appWindow.showStatusMessage(qsTr("Copied to clipboard"), 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
visible: copyButton && input.text !== ""
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.LabelButton {
|
||||||
|
id: pasteButtonId
|
||||||
|
onClicked: {
|
||||||
|
input.clear();
|
||||||
|
input.paste();
|
||||||
|
}
|
||||||
|
text: qsTr("Paste") + translationManager.emptyString
|
||||||
|
visible: pasteButton
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
visible: copyButton && input.text !== ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Item{
|
MoneroComponents.Input {
|
||||||
id: inputItem
|
id: input
|
||||||
height: inputHeight
|
KeyNavigation.backtab: item.KeyNavigation.backtab
|
||||||
anchors.top: showingHeader ? inputLabel.bottom : parent.top
|
KeyNavigation.tab: item.KeyNavigation.tab
|
||||||
anchors.topMargin: showingHeader ? 12 : 0
|
Layout.fillWidth: true
|
||||||
width: parent.width
|
Layout.preferredHeight: inputHeight
|
||||||
clip: true
|
|
||||||
|
leftPadding: item.inputPaddingLeft
|
||||||
|
rightPadding: (inlineButtons.width > 0 ? inlineButtons.width + inlineButtons.spacing : 0) + inputPaddingRight + (password || passwordLinked ? 45 : 0)
|
||||||
|
topPadding: item.inputPaddingTop
|
||||||
|
bottomPadding: item.inputPaddingBottom
|
||||||
|
|
||||||
|
font.family: item.fontFamily
|
||||||
|
font.pixelSize: item.fontSize
|
||||||
|
font.bold: item.fontBold
|
||||||
|
onEditingFinished: item.editingFinished()
|
||||||
|
onAccepted: item.accepted();
|
||||||
|
onTextChanged: item.textUpdated()
|
||||||
|
echoMode: isPasswordHidden() ? TextInput.Password : TextInput.Normal
|
||||||
|
|
||||||
|
MoneroComponents.Label {
|
||||||
|
visible: password || passwordLinked
|
||||||
|
fontSize: 20
|
||||||
|
text: isPasswordHidden() ? FontAwesome.eye : FontAwesome.eyeSlash
|
||||||
|
opacity: eyeMouseArea.containsMouse ? 0.9 : 0.7
|
||||||
|
fontFamily: FontAwesome.fontFamily
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 15
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.verticalCenterOffset: 1
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: eyeMouseArea
|
||||||
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
hoverEnabled: true
|
||||||
|
onClicked: passwordToggle()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
id: placeholderLabel
|
id: placeholderLabel
|
||||||
@@ -221,69 +279,15 @@ Item {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
border.width: borderDisabled ? 0 : 1
|
border.width: borderDisabled ? 0 : 1
|
||||||
border.color: borderColor
|
border.color: borderColor
|
||||||
radius: 4
|
radius: item.inputRadius
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
RowLayout {
|
||||||
id: inlineIcon
|
id: inlineButtons
|
||||||
width: 26
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
height: 26
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.rightMargin: inputPaddingRight
|
||||||
anchors.topMargin: 8
|
spacing: 4
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 12
|
|
||||||
source: "qrc:///images/moneroIcon-28x28.png"
|
|
||||||
visible: false
|
|
||||||
}
|
|
||||||
|
|
||||||
MoneroComponents.Input {
|
|
||||||
id: input
|
|
||||||
anchors.fill: parent
|
|
||||||
anchors.leftMargin: inlineIcon.visible ? 44 : 0
|
|
||||||
font.family: item.fontFamily
|
|
||||||
font.pixelSize: item.fontSize
|
|
||||||
font.bold: item.fontBold
|
|
||||||
KeyNavigation.backtab: item.KeyNavigation.backtab
|
|
||||||
KeyNavigation.tab: item.KeyNavigation.tab
|
|
||||||
onEditingFinished: item.editingFinished()
|
|
||||||
onAccepted: item.accepted();
|
|
||||||
onTextChanged: item.textUpdated()
|
|
||||||
leftPadding: inputPadding
|
|
||||||
rightPadding: (inlineButtons.width > 0 ? inlineButtons.width + inlineButtons.spacing : 0) + inputPadding
|
|
||||||
topPadding: inputPadding
|
|
||||||
bottomPadding: inputPadding
|
|
||||||
echoMode: isPasswordHidden() ? TextInput.Password : TextInput.Normal
|
|
||||||
|
|
||||||
MoneroComponents.Label {
|
|
||||||
visible: password || passwordLinked
|
|
||||||
fontSize: 20
|
|
||||||
text: isPasswordHidden() ? FontAwesome.eye : FontAwesome.eyeSlash
|
|
||||||
opacity: eyeMouseArea.containsMouse ? 0.9 : 0.7
|
|
||||||
fontFamily: FontAwesome.fontFamily
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.rightMargin: 15
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.verticalCenterOffset: 1
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
id: eyeMouseArea
|
|
||||||
anchors.fill: parent
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
hoverEnabled: true
|
|
||||||
onClicked: passwordToggle()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
id: inlineButtons
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.topMargin: inputPadding
|
|
||||||
anchors.bottomMargin: inputPadding
|
|
||||||
anchors.rightMargin: inputPadding
|
|
||||||
spacing: 4
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ ColumnLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
property alias error: input.error
|
property alias error: input.error
|
||||||
|
property alias cursorPosition: input.cursorPosition
|
||||||
|
|
||||||
property string labelFontColor: MoneroComponents.Style.defaultFontColor
|
property string labelFontColor: MoneroComponents.Style.defaultFontColor
|
||||||
property bool labelFontBold: false
|
property bool labelFontBold: false
|
||||||
@@ -91,6 +92,8 @@ ColumnLayout {
|
|||||||
signal labelButtonClicked();
|
signal labelButtonClicked();
|
||||||
signal inputLabelLinkActivated();
|
signal inputLabelLinkActivated();
|
||||||
signal editingFinished();
|
signal editingFinished();
|
||||||
|
signal returnPressed();
|
||||||
|
signal enterPressed();
|
||||||
|
|
||||||
onActiveFocusChanged: activeFocus && input.forceActiveFocus()
|
onActiveFocusChanged: activeFocus && input.forceActiveFocus()
|
||||||
|
|
||||||
@@ -176,6 +179,8 @@ ColumnLayout {
|
|||||||
fontColor: item.fontColor
|
fontColor: item.fontColor
|
||||||
mouseSelection: item.mouseSelection
|
mouseSelection: item.mouseSelection
|
||||||
onEditingFinished: item.editingFinished()
|
onEditingFinished: item.editingFinished()
|
||||||
|
Keys.onReturnPressed: item.returnPressed()
|
||||||
|
Keys.onEnterPressed: item.enterPressed()
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
id: placeholderLabel
|
id: placeholderLabel
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ import "." as MoneroComponents
|
|||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
default property list<MoneroComponents.NavbarItem> items
|
default property list<MoneroComponents.NavbarItem> items
|
||||||
|
property alias currentIndex: repeater.currentIndex
|
||||||
|
property alias previousIndex: repeater.previousIndex
|
||||||
|
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
height: grid.height
|
height: grid.height
|
||||||
@@ -100,7 +102,10 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
|
id: repeater
|
||||||
model: items.length
|
model: items.length
|
||||||
|
property int currentIndex: 0
|
||||||
|
property int previousIndex: 0
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: 0
|
spacing: 0
|
||||||
@@ -149,7 +154,11 @@ Rectangle {
|
|||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
|
||||||
onClicked: items[index].selected()
|
onClicked: {
|
||||||
|
repeater.previousIndex = repeater.currentIndex;
|
||||||
|
repeater.currentIndex = index;
|
||||||
|
items[index].selected()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ Rectangle {
|
|||||||
case Wallet.ConnectionStatus_Connected:
|
case Wallet.ConnectionStatus_Connected:
|
||||||
if (!appWindow.daemonSynced)
|
if (!appWindow.daemonSynced)
|
||||||
return qsTr("Synchronizing");
|
return qsTr("Synchronizing");
|
||||||
|
if (persistentSettings.useRemoteNode && persistentSettings.allowRemoteNodeMining && appWindow.isMining)
|
||||||
|
return qsTr("Remote node") + " + " + qsTr("Mining");
|
||||||
if (persistentSettings.useRemoteNode)
|
if (persistentSettings.useRemoteNode)
|
||||||
return qsTr("Remote node");
|
return qsTr("Remote node");
|
||||||
return appWindow.isMining ? qsTr("Connected") + " + " + qsTr("Mining"): qsTr("Connected");
|
return appWindow.isMining ? qsTr("Connected") + " + " + qsTr("Mining"): qsTr("Connected");
|
||||||
@@ -80,7 +82,7 @@ Rectangle {
|
|||||||
if(item.connected == Wallet.ConnectionStatus_Connected){
|
if(item.connected == Wallet.ConnectionStatus_Connected){
|
||||||
return 1
|
return 1
|
||||||
} else {
|
} else {
|
||||||
return 0.5
|
MoneroComponents.Style.blackTheme ? 0.5 : 0.3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,7 +94,7 @@ Rectangle {
|
|||||||
source: {
|
source: {
|
||||||
if(appWindow.isMining) {
|
if(appWindow.isMining) {
|
||||||
return "qrc:///images/miningxmr.png"
|
return "qrc:///images/miningxmr.png"
|
||||||
} else if(item.connected == Wallet.ConnectionStatus_Connected) {
|
} else if(item.connected == Wallet.ConnectionStatus_Connected || !MoneroComponents.Style.blackTheme) {
|
||||||
return "qrc:///images/lightning.png"
|
return "qrc:///images/lightning.png"
|
||||||
} else {
|
} else {
|
||||||
return "qrc:///images/lightning-white.png"
|
return "qrc:///images/lightning-white.png"
|
||||||
@@ -126,8 +128,8 @@ Rectangle {
|
|||||||
font.family: MoneroComponents.Style.fontMedium.name
|
font.family: MoneroComponents.Style.fontMedium.name
|
||||||
font.bold: true
|
font.bold: true
|
||||||
font.pixelSize: 13
|
font.pixelSize: 13
|
||||||
color: MoneroComponents.Style.dimmedFontColor
|
color: MoneroComponents.Style.blackTheme ? MoneroComponents.Style.dimmedFontColor : MoneroComponents.Style.defaultFontColor
|
||||||
opacity: MoneroComponents.Style.blackTheme ? 0.65 : 0.5
|
opacity: MoneroComponents.Style.blackTheme ? 0.65 : 0.75
|
||||||
text: qsTr("Network status") + translationManager.emptyString
|
text: qsTr("Network status") + translationManager.emptyString
|
||||||
themeTransition: false
|
themeTransition: false
|
||||||
}
|
}
|
||||||
@@ -159,16 +161,18 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
MoneroComponents.TextPlain {
|
||||||
anchors.left: statusTextVal.right
|
anchors.left: statusTextVal.right
|
||||||
anchors.leftMargin: 16
|
anchors.leftMargin: 16
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
color: refreshMouseArea.containsMouse ? MoneroComponents.Style.dimmedFontColor : MoneroComponents.Style.defaultFontColor
|
color: refreshMouseArea.containsMouse ? MoneroComponents.Style.defaultFontColor : MoneroComponents.Style.dimmedFontColor
|
||||||
font.family: FontAwesome.fontFamilySolid
|
font.family: FontAwesome.fontFamilySolid
|
||||||
font.pixelSize: 24
|
font.pixelSize: 24
|
||||||
font.styleName: "Solid"
|
font.styleName: "Solid"
|
||||||
opacity: iconItem.opacity * (refreshMouseArea.visible ? 1 : 0.5)
|
opacity: 0.85
|
||||||
text: FontAwesome.random
|
text: FontAwesome.random
|
||||||
|
themeTransition: false
|
||||||
|
tooltip: qsTr("Switch to another public remote node") + translationManager.emptyString;
|
||||||
visible: (
|
visible: (
|
||||||
!appWindow.disconnected &&
|
!appWindow.disconnected &&
|
||||||
!persistentSettings.useRemoteNode &&
|
!persistentSettings.useRemoteNode &&
|
||||||
@@ -181,6 +185,8 @@ Rectangle {
|
|||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
visible: true
|
visible: true
|
||||||
|
onEntered: parent.tooltipPopup.open()
|
||||||
|
onExited: parent.tooltipPopup.close()
|
||||||
onClicked: {
|
onClicked: {
|
||||||
const callback = function(result) {
|
const callback = function(result) {
|
||||||
refreshMouseArea.visible = true;
|
refreshMouseArea.visible = true;
|
||||||
|
|||||||
@@ -108,7 +108,11 @@ Item {
|
|||||||
leftPanel.enabled = true
|
leftPanel.enabled = true
|
||||||
middlePanel.enabled = true
|
middlePanel.enabled = true
|
||||||
wizard.enabled = true
|
wizard.enabled = true
|
||||||
titleBar.state = "default"
|
if (rootItem.state == "wizard") {
|
||||||
|
titleBar.state = "essentials"
|
||||||
|
} else {
|
||||||
|
titleBar.state = "default"
|
||||||
|
}
|
||||||
|
|
||||||
root.visible = false;
|
root.visible = false;
|
||||||
appWindow.hideBalanceForced = false;
|
appWindow.hideBalanceForced = false;
|
||||||
|
|||||||
@@ -90,6 +90,9 @@ Rectangle {
|
|||||||
if (!parsed.error) {
|
if (!parsed.error) {
|
||||||
root.qrcode_decoded(parsed.address, parsed.payment_id, parsed.amount, parsed.tx_description, parsed.recipient_name, parsed.extra_parameters);
|
root.qrcode_decoded(parsed.address, parsed.payment_id, parsed.amount, parsed.tx_description, parsed.recipient_name, parsed.extra_parameters);
|
||||||
root.state = "Stopped";
|
root.state = "Stopped";
|
||||||
|
} else if (walletManager.addressValid(data, appWindow.persistentSettings.nettype)) {
|
||||||
|
root.qrcode_decoded(data, "", "", "", "", null);
|
||||||
|
root.state = "Stopped";
|
||||||
} else {
|
} else {
|
||||||
onNotifyError(parsed.error);
|
onNotifyError(parsed.error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,6 +42,13 @@ MoneroComponents.Dialog {
|
|||||||
|
|
||||||
onActiveFocusChanged: activeFocus && remoteNodeAddress.forceActiveFocus()
|
onActiveFocusChanged: activeFocus && remoteNodeAddress.forceActiveFocus()
|
||||||
|
|
||||||
|
function onOk() {
|
||||||
|
root.success = true;
|
||||||
|
root.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
function onCancel() { root.close(); }
|
||||||
|
|
||||||
function add(callbackOnSuccess) {
|
function add(callbackOnSuccess) {
|
||||||
root.editMode = false;
|
root.editMode = false;
|
||||||
root.callbackOnSuccess = callbackOnSuccess;
|
root.callbackOnSuccess = callbackOnSuccess;
|
||||||
@@ -89,6 +96,11 @@ MoneroComponents.Dialog {
|
|||||||
|
|
||||||
daemonAddrLabelText: qsTr("Address") + translationManager.emptyString
|
daemonAddrLabelText: qsTr("Address") + translationManager.emptyString
|
||||||
daemonPortLabelText: qsTr("Port") + translationManager.emptyString
|
daemonPortLabelText: qsTr("Port") + translationManager.emptyString
|
||||||
|
|
||||||
|
Keys.enabled: root.visible
|
||||||
|
Keys.onEnterPressed: root.onOk()
|
||||||
|
Keys.onReturnPressed: root.onOk()
|
||||||
|
Keys.onEscapePressed: root.onCancel()
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
@@ -116,6 +128,11 @@ MoneroComponents.Dialog {
|
|||||||
placeholderFontSize: 15
|
placeholderFontSize: 15
|
||||||
labelFontSize: 14
|
labelFontSize: 14
|
||||||
fontSize: 15
|
fontSize: 15
|
||||||
|
|
||||||
|
Keys.enabled: root.visible
|
||||||
|
Keys.onEnterPressed: root.onOk()
|
||||||
|
Keys.onReturnPressed: root.onOk()
|
||||||
|
Keys.onEscapePressed: root.onCancel()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -82,9 +82,9 @@ GridLayout {
|
|||||||
return addr + ":" + port;
|
return addr + ":" + port;
|
||||||
}
|
}
|
||||||
|
|
||||||
LineEdit {
|
MoneroComponents.LineEdit {
|
||||||
id: daemonAddr
|
id: daemonAddr
|
||||||
Layout.fillWidth: true
|
Layout.preferredWidth: root.width/3
|
||||||
placeholderText: qsTr("Remote Node Hostname / IP") + translationManager.emptyString
|
placeholderText: qsTr("Remote Node Hostname / IP") + translationManager.emptyString
|
||||||
placeholderFontFamily: root.placeholderFontFamily
|
placeholderFontFamily: root.placeholderFontFamily
|
||||||
placeholderFontBold: root.placeholderFontBold
|
placeholderFontBold: root.placeholderFontBold
|
||||||
@@ -104,9 +104,9 @@ GridLayout {
|
|||||||
text: initialHostPort[1]
|
text: initialHostPort[1]
|
||||||
}
|
}
|
||||||
|
|
||||||
LineEdit {
|
MoneroComponents.LineEdit {
|
||||||
id: daemonPort
|
id: daemonPort
|
||||||
Layout.fillWidth: true
|
Layout.preferredWidth: root.width/3
|
||||||
placeholderText: qsTr("Port") + translationManager.emptyString
|
placeholderText: qsTr("Port") + translationManager.emptyString
|
||||||
placeholderFontFamily: root.placeholderFontFamily
|
placeholderFontFamily: root.placeholderFontFamily
|
||||||
placeholderFontBold: root.placeholderFontBold
|
placeholderFontBold: root.placeholderFontBold
|
||||||
|
|||||||
@@ -59,7 +59,16 @@ ColumnLayout {
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
height: 30
|
height: 30
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
color: itemMouseArea.containsMouse || index === remoteNodesModel.selected ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
|
color: itemMouseArea.containsMouse || trustedDaemonCheckMark.labelMouseArea.containsMouse || index === remoteNodesModel.selected ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
visible: index === remoteNodesModel.selected
|
||||||
|
Layout.fillHeight: true
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
color: "darkgrey"
|
||||||
|
width: 2
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: MoneroComponents.Style.appWindowBorderColor
|
color: MoneroComponents.Style.appWindowBorderColor
|
||||||
@@ -80,8 +89,11 @@ ColumnLayout {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.rightMargin: 80
|
anchors.rightMargin: 80
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
property var trusted: remoteNodesModel.get(index) ? remoteNodesModel.get(index).trusted : false
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
|
id: addressText
|
||||||
|
width: parent.width - trustedDaemonCheckMark.width
|
||||||
color: index === remoteNodesModel.selected ? MoneroComponents.Style.defaultFontColor : MoneroComponents.Style.dimmedFontColor
|
color: index === remoteNodesModel.selected ? MoneroComponents.Style.defaultFontColor : MoneroComponents.Style.dimmedFontColor
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
@@ -89,6 +101,24 @@ ColumnLayout {
|
|||||||
font.pixelSize: 16
|
font.pixelSize: 16
|
||||||
text: address
|
text: address
|
||||||
themeTransition: false
|
themeTransition: false
|
||||||
|
elide: Text.ElideMiddle
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Label {
|
||||||
|
id: trustedDaemonCheckMark
|
||||||
|
anchors.left: addressText.right
|
||||||
|
anchors.leftMargin: 3
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.verticalCenterOffset: 2
|
||||||
|
z: itemMouseArea.z + 1
|
||||||
|
fontSize: 16
|
||||||
|
fontFamily: FontAwesome.fontFamilySolid
|
||||||
|
fontColor: index === remoteNodesModel.selected ? MoneroComponents.Style.defaultFontColor : MoneroComponents.Style.dimmedFontColor
|
||||||
|
styleName: "Solid"
|
||||||
|
visible: trusted
|
||||||
|
text: FontAwesome.shieldAlt
|
||||||
|
tooltip: qsTr("Trusted daemon") + translationManager.emptyString
|
||||||
|
themeTransition: false
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
@@ -103,17 +133,21 @@ ColumnLayout {
|
|||||||
RowLayout {
|
RowLayout {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 6
|
|
||||||
height: 30
|
height: 30
|
||||||
spacing: 10
|
spacing: 2
|
||||||
|
|
||||||
MoneroComponents.InlineButton {
|
MoneroComponents.InlineButton {
|
||||||
buttonColor: "transparent"
|
buttonColor: "transparent"
|
||||||
fontFamily: FontAwesome.fontFamily
|
fontFamily: FontAwesome.fontFamily
|
||||||
fontPixelSize: 18
|
fontPixelSize: 18
|
||||||
text: FontAwesome.edit
|
text: FontAwesome.edit
|
||||||
|
tooltip: qsTr("Edit remote node") + translationManager.emptyString
|
||||||
|
tooltipLeft: true
|
||||||
onClicked: remoteNodeDialog.edit(remoteNodesModel.get(index), function (remoteNode) {
|
onClicked: remoteNodeDialog.edit(remoteNodesModel.get(index), function (remoteNode) {
|
||||||
remoteNodesModel.set(index, remoteNode)
|
remoteNodesModel.set(index, remoteNode)
|
||||||
|
if (index === remoteNodesModel.selected) {
|
||||||
|
remoteNodesModel.applyRemoteNode(index)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,6 +156,8 @@ ColumnLayout {
|
|||||||
fontFamily: FontAwesome.fontFamily
|
fontFamily: FontAwesome.fontFamily
|
||||||
text: FontAwesome.times
|
text: FontAwesome.times
|
||||||
visible: remoteNodesModel.count > 1
|
visible: remoteNodesModel.count > 1
|
||||||
|
tooltip: qsTr("Remove remote node") + translationManager.emptyString
|
||||||
|
tooltipLeft: true
|
||||||
onClicked: remoteNodesModel.removeSelectNextIfNeeded(index)
|
onClicked: remoteNodesModel.removeSelectNextIfNeeded(index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,9 +7,11 @@ import "../components" as MoneroComponents
|
|||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: settingsListItem
|
id: settingsListItem
|
||||||
property alias iconText: iconLabel.text
|
property alias iconText: iconLabel.text
|
||||||
|
property alias symbol: symbolText.text
|
||||||
property alias description: area.text
|
property alias description: area.text
|
||||||
property alias title: header.text
|
property alias title: header.text
|
||||||
property bool isLast: false
|
property bool isLast: false
|
||||||
|
property bool enabled: true
|
||||||
signal clicked()
|
signal clicked()
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@@ -37,6 +39,7 @@ ColumnLayout {
|
|||||||
width: parent.width
|
width: parent.width
|
||||||
height: header.height + area.contentHeight
|
height: header.height + area.contentHeight
|
||||||
color: "transparent";
|
color: "transparent";
|
||||||
|
opacity: settingsListItem.enabled ? 1 : 0.25
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.bottomMargin: 4
|
anchors.bottomMargin: 4
|
||||||
anchors.topMargin: 4
|
anchors.topMargin: 4
|
||||||
@@ -102,6 +105,7 @@ ColumnLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
visible: settingsListItem.enabled
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
@@ -111,5 +115,17 @@ ColumnLayout {
|
|||||||
settingsListItem.clicked()
|
settingsListItem.clicked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MoneroComponents.TextPlain {
|
||||||
|
id: symbolText
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 44
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
font.pixelSize: 12
|
||||||
|
font.bold: true
|
||||||
|
color: MoneroComponents.Style.menuButtonTextColor
|
||||||
|
visible: appWindow.ctrlPressed
|
||||||
|
themeTransition: false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ ColumnLayout {
|
|||||||
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
Text {
|
MoneroComponents.TextPlain {
|
||||||
id: label
|
id: label
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
font.pixelSize: 14
|
font.pixelSize: 14
|
||||||
Layout.fillWidth: true
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
}
|
}
|
||||||
|
|
||||||
QtQuickControls.Slider {
|
QtQuickControls.Slider {
|
||||||
|
|||||||
@@ -39,19 +39,18 @@ Item {
|
|||||||
property bool primary: true
|
property bool primary: true
|
||||||
property string rightIcon: ""
|
property string rightIcon: ""
|
||||||
property string rightIconInactive: ""
|
property string rightIconInactive: ""
|
||||||
property color textColor: !button.enabled
|
property color textColor: primary ? MoneroComponents.Style.buttonTextColor : MoneroComponents.Style.buttonSecondaryTextColor;
|
||||||
? MoneroComponents.Style.buttonTextColorDisabled
|
|
||||||
: primary
|
|
||||||
? MoneroComponents.Style.buttonTextColor
|
|
||||||
: MoneroComponents.Style.buttonSecondaryTextColor;
|
|
||||||
property bool small: false
|
property bool small: false
|
||||||
property alias text: label.text
|
property alias text: label.text
|
||||||
property alias fontBold: label.font.bold
|
property alias fontBold: label.font.bold
|
||||||
property int fontSize: {
|
property int fontSize: {
|
||||||
if(small) return 14;
|
if(small) return 13.5;
|
||||||
else return 16;
|
else return 16;
|
||||||
}
|
}
|
||||||
property alias label: label
|
property alias label: label
|
||||||
|
property alias tooltip: tooltip.text
|
||||||
|
property alias tooltipLeft: tooltip.tooltipLeft
|
||||||
|
property alias tooltipPopup: tooltip.tooltipPopup
|
||||||
signal clicked()
|
signal clicked()
|
||||||
|
|
||||||
height: small ? 30 : 36
|
height: small ? 30 : 36
|
||||||
@@ -69,6 +68,7 @@ Item {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: 3
|
radius: 3
|
||||||
border.width: parent.focus && parent.enabled ? 1 : 0
|
border.width: parent.focus && parent.enabled ? 1 : 0
|
||||||
|
opacity: 1
|
||||||
|
|
||||||
state: button.enabled ? "active" : "disabled"
|
state: button.enabled ? "active" : "disabled"
|
||||||
Component.onCompleted: state = state
|
Component.onCompleted: state = state
|
||||||
@@ -99,7 +99,14 @@ Item {
|
|||||||
when: !button.enabled
|
when: !button.enabled
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: buttonRect
|
target: buttonRect
|
||||||
color: MoneroComponents.Style.buttonBackgroundColorDisabled
|
opacity: 0.5
|
||||||
|
color: primary
|
||||||
|
? MoneroComponents.Style.buttonBackgroundColor
|
||||||
|
: MoneroComponents.Style.buttonSecondaryBackgroundColor
|
||||||
|
}
|
||||||
|
PropertyChanges {
|
||||||
|
target: label
|
||||||
|
opacity: 0.5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -119,7 +126,7 @@ Item {
|
|||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
id: label
|
id: label
|
||||||
font.family: MoneroComponents.Style.fontBold.name
|
font.family: MoneroComponents.Style.fontBold.name
|
||||||
font.bold: true
|
font.bold: button.primary ? true : false
|
||||||
font.pixelSize: button.fontSize
|
font.pixelSize: button.fontSize
|
||||||
color: !buttonArea.pressed ? button.textColor : "transparent"
|
color: !buttonArea.pressed ? button.textColor : "transparent"
|
||||||
visible: text !== ""
|
visible: text !== ""
|
||||||
@@ -142,7 +149,9 @@ Item {
|
|||||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||||
width: button.small ? 16 : 20
|
width: button.small ? 16 : 20
|
||||||
height: button.small ? 16 : 20
|
height: button.small ? 16 : 20
|
||||||
|
opacity: buttonRect.opacity
|
||||||
source: {
|
source: {
|
||||||
|
if (fontAwesomeIcon) return "";
|
||||||
if(button.rightIconInactive !== "" && !button.enabled) {
|
if(button.rightIconInactive !== "" && !button.enabled) {
|
||||||
return button.rightIconInactive;
|
return button.rightIconInactive;
|
||||||
}
|
}
|
||||||
@@ -161,11 +170,18 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Tooltip {
|
||||||
|
id: tooltip
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: buttonArea
|
id: buttonArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onClicked: doClick()
|
onClicked: doClick()
|
||||||
|
onEntered: tooltip.text ? tooltip.tooltipPopup.open() : ""
|
||||||
|
onExited: tooltip.text ? tooltip.tooltipPopup.close() : ""
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -171,6 +171,7 @@ Rectangle {
|
|||||||
|
|
||||||
MoneroComponents.StandardButton {
|
MoneroComponents.StandardButton {
|
||||||
id: cancelButton
|
id: cancelButton
|
||||||
|
primary: false
|
||||||
text: qsTr("Cancel") + translationManager.emptyString
|
text: qsTr("Cancel") + translationManager.emptyString
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.close()
|
root.close()
|
||||||
|
|||||||
@@ -29,12 +29,16 @@
|
|||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.2
|
import QtQuick.Controls 2.2
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
|
import FontAwesome 1.0
|
||||||
|
import QtQuick.Layouts 1.1
|
||||||
|
|
||||||
import "../components" as MoneroComponents
|
import "../components" as MoneroComponents
|
||||||
import "../components/effects/" as MoneroEffects
|
import "../components/effects/" as MoneroEffects
|
||||||
|
|
||||||
Item {
|
ColumnLayout {
|
||||||
id: dropdown
|
id: dropdown
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
property int itemTopMargin: 0
|
property int itemTopMargin: 0
|
||||||
property alias dataModel: repeater.model
|
property alias dataModel: repeater.model
|
||||||
property string shadowPressedColor
|
property string shadowPressedColor
|
||||||
@@ -44,46 +48,66 @@ Item {
|
|||||||
property string textColor: MoneroComponents.Style.defaultFontColor
|
property string textColor: MoneroComponents.Style.defaultFontColor
|
||||||
property alias currentIndex: columnid.currentIndex
|
property alias currentIndex: columnid.currentIndex
|
||||||
readonly property alias expanded: popup.visible
|
readonly property alias expanded: popup.visible
|
||||||
property int dropdownHeight: 42
|
property alias labelText: dropdownLabel.text
|
||||||
property int fontHeaderSize: 16
|
property alias labelColor: dropdownLabel.color
|
||||||
|
property alias labelTextFormat: dropdownLabel.textFormat
|
||||||
|
property alias labelWrapMode: dropdownLabel.wrapMode
|
||||||
|
property alias labelHorizontalAlignment: dropdownLabel.horizontalAlignment
|
||||||
|
property bool showingHeader: dropdownLabel.text !== ""
|
||||||
|
property int labelFontSize: 14
|
||||||
|
property bool labelFontBold: false
|
||||||
|
property int dropdownHeight: 39
|
||||||
|
property int fontSize: 14
|
||||||
property int fontItemSize: 14
|
property int fontItemSize: 14
|
||||||
property string colorBorder: MoneroComponents.Style.inputBorderColorInActive
|
property string colorBorder: MoneroComponents.Style.inputBorderColorInActive
|
||||||
property string colorHeaderBackground: "transparent"
|
property string colorHeaderBackground: "transparent"
|
||||||
property bool headerBorder: true
|
property bool headerBorder: true
|
||||||
property bool headerFontBold: false
|
property bool headerFontBold: false
|
||||||
|
|
||||||
height: dropdownHeight
|
|
||||||
|
|
||||||
signal changed();
|
signal changed();
|
||||||
|
|
||||||
onExpandedChanged: if(expanded) appWindow.currentItem = dropdown
|
onExpandedChanged: if(expanded) appWindow.currentItem = dropdown
|
||||||
|
|
||||||
Item {
|
spacing: 0
|
||||||
id: head
|
Rectangle {
|
||||||
anchors.left: parent.left
|
id: dropdownLabelRect
|
||||||
anchors.right: parent.right
|
color: "transparent"
|
||||||
anchors.top: parent.top
|
Layout.fillWidth: true
|
||||||
anchors.topMargin: parent.itemTopMargin
|
height: (dropdownLabel.height + 10)
|
||||||
height: dropdown.dropdownHeight
|
visible: showingHeader ? true : false
|
||||||
|
|
||||||
Rectangle {
|
MoneroComponents.TextPlain {
|
||||||
color: "transparent"
|
id: dropdownLabel
|
||||||
border.width: dropdown.headerBorder ? 1 : 0
|
anchors.top: parent.top
|
||||||
border.color: dropdown.colorBorder
|
anchors.left: parent.left
|
||||||
radius: 4
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
anchors.fill: parent
|
font.pixelSize: labelFontSize
|
||||||
|
font.bold: labelFontBold
|
||||||
|
textFormat: Text.RichText
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: head
|
||||||
|
color: dropArea.containsMouse ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
|
||||||
|
border.width: dropdown.headerBorder ? 1 : 0
|
||||||
|
border.color: dropdown.colorBorder
|
||||||
|
radius: 4
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: dropdownHeight
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 12
|
anchors.leftMargin: 10
|
||||||
anchors.right: dropIndicator.left
|
anchors.right: dropIndicator.left
|
||||||
anchors.rightMargin: 12
|
anchors.rightMargin: 12
|
||||||
|
width: droplist.width
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
font.bold: dropdown.headerFontBold
|
font.bold: dropdown.headerFontBold
|
||||||
font.pixelSize: dropdown.fontHeaderSize
|
font.pixelSize: dropdown.fontSize
|
||||||
color: dropdown.textColor
|
color: dropdown.textColor
|
||||||
text: columnid.currentIndex < repeater.model.count ? qsTr(repeater.model.get(columnid.currentIndex).column1) + translationManager.emptyString : ""
|
text: columnid.currentIndex < repeater.model.count ? qsTr(repeater.model.get(columnid.currentIndex).column1) + translationManager.emptyString : ""
|
||||||
}
|
}
|
||||||
@@ -96,19 +120,15 @@ Item {
|
|||||||
anchors.rightMargin: 12
|
anchors.rightMargin: 12
|
||||||
width: dropdownIcon.width
|
width: dropdownIcon.width
|
||||||
|
|
||||||
Image {
|
MoneroEffects.ImageMask {
|
||||||
id: dropdownIcon
|
id: dropdownIcon
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
source: "qrc:///images/whiteDropIndicator.png"
|
image: "qrc:///images/whiteDropIndicator.png"
|
||||||
visible: false
|
height: 8
|
||||||
}
|
width: 12
|
||||||
|
fontAwesomeFallbackIcon: FontAwesome.arrowDown
|
||||||
ColorOverlay {
|
fontAwesomeFallbackSize: 14
|
||||||
source: dropdownIcon
|
|
||||||
anchors.fill: dropdownIcon
|
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
rotation: dropdown.expanded ? 180 : 0
|
|
||||||
opacity: 1
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,7 +137,7 @@ Item {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: dropdown.expanded ? popup.close() : popup.open()
|
onClicked: dropdown.expanded ? popup.close() : popup.open()
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.ArrowCursor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,7 +148,7 @@ Item {
|
|||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: droplist
|
id: droplist
|
||||||
x: dropdown.x
|
anchors.left: parent.left
|
||||||
width: dropdown.width
|
width: dropdown.width
|
||||||
y: head.y + head.height
|
y: head.y + head.height
|
||||||
clip: true
|
clip: true
|
||||||
@@ -171,7 +191,7 @@ Item {
|
|||||||
anchors.leftMargin: 12
|
anchors.leftMargin: 12
|
||||||
anchors.rightMargin: 0
|
anchors.rightMargin: 0
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
font.bold: true
|
font.bold: false
|
||||||
font.pixelSize: fontItemSize
|
font.pixelSize: fontItemSize
|
||||||
color: itemArea.containsMouse || index === columnid.currentIndex || itemArea.containsMouse ? "#FA6800" : "#FFFFFF"
|
color: itemArea.containsMouse || index === columnid.currentIndex || itemArea.containsMouse ? "#FA6800" : "#FFFFFF"
|
||||||
text: qsTr(column1) + translationManager.emptyString
|
text: qsTr(column1) + translationManager.emptyString
|
||||||
@@ -188,25 +208,11 @@ Item {
|
|||||||
text: ""
|
text: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.top: parent.top
|
|
||||||
width: 3; height: 3
|
|
||||||
color: parent.color
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.top: parent.top
|
|
||||||
width: 3; height: 3
|
|
||||||
color: parent.color
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: itemArea
|
id: itemArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.ArrowCursor
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
popup.close()
|
popup.close()
|
||||||
|
|||||||
@@ -42,11 +42,12 @@ QtObject {
|
|||||||
property string buttonBackgroundColorDisabled: blackTheme ? _b_buttonBackgroundColorDisabled : _w_buttonBackgroundColorDisabled
|
property string buttonBackgroundColorDisabled: blackTheme ? _b_buttonBackgroundColorDisabled : _w_buttonBackgroundColorDisabled
|
||||||
property string buttonBackgroundColorDisabledHover: blackTheme ? _b_buttonBackgroundColorDisabledHover : _w_buttonBackgroundColorDisabledHover
|
property string buttonBackgroundColorDisabledHover: blackTheme ? _b_buttonBackgroundColorDisabledHover : _w_buttonBackgroundColorDisabledHover
|
||||||
property string buttonInlineBackgroundColor: blackTheme ? _b_buttonInlineBackgroundColor : _w_buttonInlineBackgroundColor
|
property string buttonInlineBackgroundColor: blackTheme ? _b_buttonInlineBackgroundColor : _w_buttonInlineBackgroundColor
|
||||||
|
property string buttonInlineBackgroundColorHover: blackTheme ? _b_buttonInlineBackgroundColorHover : _w_buttonInlineBackgroundColorHover
|
||||||
property string buttonTextColor: blackTheme ? _b_buttonTextColor : _w_buttonTextColor
|
property string buttonTextColor: blackTheme ? _b_buttonTextColor : _w_buttonTextColor
|
||||||
property string buttonTextColorDisabled: blackTheme ? _b_buttonTextColorDisabled : _w_buttonTextColorDisabled
|
property string buttonTextColorDisabled: blackTheme ? _b_buttonTextColorDisabled : _w_buttonTextColorDisabled
|
||||||
property string buttonSecondaryBackgroundColor: "#d9d9d9"
|
property string buttonSecondaryBackgroundColor: blackTheme ? _b_buttonSecondaryBackgroundColor : _w_buttonSecondaryBackgroundColor
|
||||||
property string buttonSecondaryBackgroundColorHover: "#a6a6a6"
|
property string buttonSecondaryBackgroundColorHover: blackTheme ? _b_buttonSecondaryBackgroundColorHover : _w_buttonSecondaryBackgroundColorHover
|
||||||
property string buttonSecondaryTextColor: "#4d4d4d"
|
property string buttonSecondaryTextColor: blackTheme ? _b_buttonSecondaryTextColor : _w_buttonSecondaryTextColor
|
||||||
property string dividerColor: blackTheme ? _b_dividerColor : _w_dividerColor
|
property string dividerColor: blackTheme ? _b_dividerColor : _w_dividerColor
|
||||||
property real dividerOpacity: blackTheme ? _b_dividerOpacity : _w_dividerOpacity
|
property real dividerOpacity: blackTheme ? _b_dividerOpacity : _w_dividerOpacity
|
||||||
|
|
||||||
@@ -102,8 +103,12 @@ QtObject {
|
|||||||
property string _b_buttonBackgroundColorDisabled: "#707070"
|
property string _b_buttonBackgroundColorDisabled: "#707070"
|
||||||
property string _b_buttonBackgroundColorDisabledHover: "#808080"
|
property string _b_buttonBackgroundColorDisabledHover: "#808080"
|
||||||
property string _b_buttonInlineBackgroundColor: "#707070"
|
property string _b_buttonInlineBackgroundColor: "#707070"
|
||||||
|
property string _b_buttonInlineBackgroundColorHover: "#808080"
|
||||||
property string _b_buttonTextColor: "white"
|
property string _b_buttonTextColor: "white"
|
||||||
property string _b_buttonTextColorDisabled: "black"
|
property string _b_buttonTextColorDisabled: "black"
|
||||||
|
property string _b_buttonSecondaryBackgroundColor: "#707070"
|
||||||
|
property string _b_buttonSecondaryBackgroundColorHover: "#808080"
|
||||||
|
property string _b_buttonSecondaryTextColor: "white"
|
||||||
property string _b_dividerColor: "white"
|
property string _b_dividerColor: "white"
|
||||||
property real _b_dividerOpacity: 0.20
|
property real _b_dividerOpacity: 0.20
|
||||||
|
|
||||||
@@ -158,9 +163,13 @@ QtObject {
|
|||||||
property string _w_buttonBackgroundColorHover: "#E65E00"
|
property string _w_buttonBackgroundColorHover: "#E65E00"
|
||||||
property string _w_buttonBackgroundColorDisabled: "#bbbbbb"
|
property string _w_buttonBackgroundColorDisabled: "#bbbbbb"
|
||||||
property string _w_buttonBackgroundColorDisabledHover: "#D1D1D1"
|
property string _w_buttonBackgroundColorDisabledHover: "#D1D1D1"
|
||||||
property string _w_buttonInlineBackgroundColor: "#bbbbbb"
|
property string _w_buttonInlineBackgroundColor: "#d9d9d9"
|
||||||
|
property string _w_buttonInlineBackgroundColorHover: "#C8C8C8"
|
||||||
property string _w_buttonTextColor: "white"
|
property string _w_buttonTextColor: "white"
|
||||||
property string _w_buttonTextColorDisabled: "black"
|
property string _w_buttonTextColorDisabled: "black"
|
||||||
|
property string _w_buttonSecondaryBackgroundColor: "#d9d9d9"
|
||||||
|
property string _w_buttonSecondaryBackgroundColorHover: "#C8C8C8"
|
||||||
|
property string _w_buttonSecondaryTextColor: "#4d4d4d"
|
||||||
property string _w_dividerColor: "black"
|
property string _w_dividerColor: "black"
|
||||||
property real _w_dividerOpacity: 0.20
|
property real _w_dividerOpacity: 0.20
|
||||||
|
|
||||||
@@ -185,7 +194,7 @@ QtObject {
|
|||||||
property string _w_menuButtonImageRightColorActive: "#FA6800"
|
property string _w_menuButtonImageRightColorActive: "#FA6800"
|
||||||
property string _w_menuButtonImageRightColor: "#808080"
|
property string _w_menuButtonImageRightColor: "#808080"
|
||||||
property string _w_menuButtonImageDotArrowSource: "qrc:///images/arrow-right-medium-white.png"
|
property string _w_menuButtonImageDotArrowSource: "qrc:///images/arrow-right-medium-white.png"
|
||||||
property string _w_inlineButtonTextColor: "black"
|
property string _w_inlineButtonTextColor: "#4d4d4d"
|
||||||
property string _w_inlineButtonBorderColor: "transparent"
|
property string _w_inlineButtonBorderColor: "transparent"
|
||||||
property string _w_appWindowBackgroundColor: "black"
|
property string _w_appWindowBackgroundColor: "black"
|
||||||
property string _w_appWindowBorderColor: "#dedede"
|
property string _w_appWindowBorderColor: "#dedede"
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ Text {
|
|||||||
property string themeTransitionBlackColor: ""
|
property string themeTransitionBlackColor: ""
|
||||||
property string themeTransitionWhiteColor: ""
|
property string themeTransitionWhiteColor: ""
|
||||||
property alias tooltip: tooltip.text
|
property alias tooltip: tooltip.text
|
||||||
|
property alias tooltipLeft: tooltip.tooltipLeft
|
||||||
|
property alias tooltipIconVisible: tooltip.tooltipIconVisible
|
||||||
|
property alias tooltipPopup: tooltip.tooltipPopup
|
||||||
font.family: MoneroComponents.Style.fontMedium.name
|
font.family: MoneroComponents.Style.fontMedium.name
|
||||||
font.bold: false
|
font.bold: false
|
||||||
font.pixelSize: 14
|
font.pixelSize: 14
|
||||||
@@ -30,6 +33,6 @@ Text {
|
|||||||
MoneroComponents.Tooltip {
|
MoneroComponents.Tooltip {
|
||||||
id: tooltip
|
id: tooltip
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.right
|
anchors.left: tooltipIconVisible ? parent.right : parent.left
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,17 +57,20 @@ Rectangle {
|
|||||||
signal minimizeClicked
|
signal minimizeClicked
|
||||||
signal languageClicked
|
signal languageClicked
|
||||||
signal closeWalletClicked
|
signal closeWalletClicked
|
||||||
|
signal lockWalletClicked
|
||||||
|
|
||||||
state: "default"
|
state: "default"
|
||||||
states: [
|
states: [
|
||||||
State {
|
State {
|
||||||
name: "default";
|
name: "default";
|
||||||
PropertyChanges { target: btnCloseWallet; visible: true}
|
PropertyChanges { target: btnCloseWallet; visible: true}
|
||||||
|
PropertyChanges { target: btnLockWallet; visible: true}
|
||||||
PropertyChanges { target: btnLanguageToggle; visible: true}
|
PropertyChanges { target: btnLanguageToggle; visible: true}
|
||||||
}, State {
|
}, State {
|
||||||
// show only theme switcher and window controls
|
// show only theme switcher and window controls
|
||||||
name: "essentials";
|
name: "essentials";
|
||||||
PropertyChanges { target: btnCloseWallet; visible: false}
|
PropertyChanges { target: btnCloseWallet; visible: false}
|
||||||
|
PropertyChanges { target: btnLockWallet; visible: false}
|
||||||
PropertyChanges { target: btnLanguageToggle; visible: false}
|
PropertyChanges { target: btnLanguageToggle; visible: false}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -91,6 +94,46 @@ Rectangle {
|
|||||||
spacing: 0
|
spacing: 0
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
|
// lock wallet
|
||||||
|
Rectangle {
|
||||||
|
id: btnLockWallet
|
||||||
|
color: "transparent"
|
||||||
|
Layout.preferredWidth: parent.height
|
||||||
|
Layout.preferredHeight: parent.height
|
||||||
|
|
||||||
|
Text {
|
||||||
|
text: FontAwesome.lock
|
||||||
|
font.family: FontAwesome.fontFamilySolid
|
||||||
|
font.pixelSize: 16
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
font.styleName: "Solid"
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
opacity: 0.75
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Tooltip {
|
||||||
|
id: btnLockWalletTooltip
|
||||||
|
anchors.fill: parent
|
||||||
|
text: qsTr("Lock this wallet") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onEntered: {
|
||||||
|
parent.color = MoneroComponents.Style.titleBarButtonHoverColor
|
||||||
|
btnLockWalletTooltip.tooltipPopup.open()
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
parent.color = "transparent"
|
||||||
|
btnLockWalletTooltip.tooltipPopup.close()
|
||||||
|
}
|
||||||
|
onClicked: root.lockWalletClicked(leftPanel.visible)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// collapse sidebar
|
// collapse sidebar
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: btnCloseWallet
|
id: btnCloseWallet
|
||||||
@@ -110,12 +153,24 @@ Rectangle {
|
|||||||
opacity: 0.75
|
opacity: 0.75
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Tooltip {
|
||||||
|
id: btnCloseWalletTooltip
|
||||||
|
anchors.fill: parent
|
||||||
|
text: qsTr("Close this wallet and return to main menu") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
onEntered: parent.color = MoneroComponents.Style.titleBarButtonHoverColor
|
onEntered: {
|
||||||
onExited: parent.color = "transparent"
|
parent.color = MoneroComponents.Style.titleBarButtonHoverColor
|
||||||
|
btnCloseWalletTooltip.tooltipPopup.open()
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
parent.color = "transparent"
|
||||||
|
btnCloseWalletTooltip.tooltipPopup.close()
|
||||||
|
}
|
||||||
onClicked: root.closeWalletClicked(leftPanel.visible)
|
onClicked: root.closeWalletClicked(leftPanel.visible)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -138,12 +193,24 @@ Rectangle {
|
|||||||
opacity: 0.75
|
opacity: 0.75
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Tooltip {
|
||||||
|
id: btnLanguageToggleTooltip
|
||||||
|
anchors.fill: parent
|
||||||
|
text: qsTr("Change language") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
onEntered: parent.color = MoneroComponents.Style.titleBarButtonHoverColor
|
onEntered: {
|
||||||
onExited: parent.color = "transparent"
|
parent.color = MoneroComponents.Style.titleBarButtonHoverColor
|
||||||
|
btnLanguageToggleTooltip.tooltipPopup.open()
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
parent.color = "transparent"
|
||||||
|
btnLanguageToggleTooltip.tooltipPopup.close()
|
||||||
|
}
|
||||||
onClicked: root.languageClicked()
|
onClicked: root.languageClicked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -165,12 +232,24 @@ Rectangle {
|
|||||||
opacity: 0.75
|
opacity: 0.75
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Tooltip {
|
||||||
|
id: btnSwitchThemeTooltip
|
||||||
|
anchors.fill: parent
|
||||||
|
text: MoneroComponents.Style.blackTheme ? qsTr("Switch to light theme") : qsTr("Switch to dark theme") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
onEntered: parent.color = MoneroComponents.Style.titleBarButtonHoverColor
|
onEntered: {
|
||||||
onExited: parent.color = "transparent"
|
parent.color = MoneroComponents.Style.titleBarButtonHoverColor
|
||||||
|
btnSwitchThemeTooltip.tooltipPopup.open()
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
parent.color = "transparent"
|
||||||
|
btnSwitchThemeTooltip.tooltipPopup.close()
|
||||||
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MoneroComponents.Style.blackTheme = !MoneroComponents.Style.blackTheme;
|
MoneroComponents.Style.blackTheme = !MoneroComponents.Style.blackTheme;
|
||||||
}
|
}
|
||||||
@@ -346,6 +425,7 @@ Rectangle {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
propagateComposedEvents: true
|
propagateComposedEvents: true
|
||||||
onPressed: previousPosition = globalCursor.getPosition()
|
onPressed: previousPosition = globalCursor.getPosition()
|
||||||
|
onDoubleClicked: root.maximizeClicked()
|
||||||
onPositionChanged: {
|
onPositionChanged: {
|
||||||
if (pressedButtons == Qt.LeftButton) {
|
if (pressedButtons == Qt.LeftButton) {
|
||||||
var pos = globalCursor.getPosition()
|
var pos = globalCursor.getPosition()
|
||||||
|
|||||||
@@ -35,15 +35,20 @@ import "." as MoneroComponents
|
|||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
property alias text: tooltip.text
|
property alias text: tooltip.text
|
||||||
|
property alias tooltipPopup: popup
|
||||||
|
property bool tooltipIconVisible: false
|
||||||
|
property bool tooltipLeft: false
|
||||||
|
property bool tooltipBottom: tooltipIconVisible ? false : true
|
||||||
|
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
height: icon.height
|
height: tooltipIconVisible ? icon.height : parent.height
|
||||||
width: icon.width
|
width: tooltipIconVisible ? icon.width : parent.width
|
||||||
visible: text != ""
|
visible: text != ""
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: icon
|
id: icon
|
||||||
color: MoneroComponents.Style.orange
|
visible: tooltipIconVisible
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
font.family: FontAwesome.fontFamily
|
font.family: FontAwesome.fontFamily
|
||||||
font.pixelSize: 10
|
font.pixelSize: 10
|
||||||
font.styleName: "Regular"
|
font.styleName: "Regular"
|
||||||
@@ -62,8 +67,9 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Popup {
|
ToolTip {
|
||||||
id: popup
|
id: popup
|
||||||
|
height: tooltip.height + 20
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
border.color: MoneroComponents.Style.buttonInlineBackgroundColor
|
border.color: MoneroComponents.Style.buttonInlineBackgroundColor
|
||||||
@@ -73,14 +79,28 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
closePolicy: Popup.NoAutoClose
|
closePolicy: Popup.NoAutoClose
|
||||||
padding: 10
|
padding: 10
|
||||||
x: icon.x + icon.width
|
x: tooltipLeft
|
||||||
y: icon.y - height
|
? (tooltipIconVisible ? icon.x - icon.width : parent.x - tooltip.width - 20 + parent.width/2)
|
||||||
|
: (tooltipIconVisible ? icon.x + icon.width : parent.x + parent.width/2)
|
||||||
|
y: tooltipBottom
|
||||||
|
? (tooltipIconVisible ? icon.y + height : parent.y + parent.height + 2)
|
||||||
|
: (tooltipIconVisible ? icon.y - height : parent.y - tooltip.height - 20)
|
||||||
|
enter: Transition {
|
||||||
|
NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; duration: 150 }
|
||||||
|
}
|
||||||
|
|
||||||
|
exit: Transition {
|
||||||
|
NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; duration: 150 }
|
||||||
|
}
|
||||||
|
delay: 200
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
Layout.maximumWidth: 370
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: tooltip
|
id: tooltip
|
||||||
Layout.maximumWidth: 350
|
width: contentWidth
|
||||||
width: contentWidth > Layout.maximumWidth ? Layout.maximumWidth : contentWidth
|
Layout.maximumWidth: 370
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
font.pixelSize: 12
|
font.pixelSize: 12
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ Rectangle {
|
|||||||
|
|
||||||
function showFiatConversion(valueXMR) {
|
function showFiatConversion(valueXMR) {
|
||||||
const fiatFee = fiatApiConvertToFiat(valueXMR);
|
const fiatFee = fiatApiConvertToFiat(valueXMR);
|
||||||
return "%1 %2".arg(fiatFee < 0.01 ? "<0.01" : "~" + fiatFee).arg(fiatApiCurrencySymbol());
|
return "%1 %2".arg(fiatFee < 0.01 ? "<0.01" : "~" + fiatFee).arg(fiatApiCurrencySymbol());
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
@@ -338,8 +338,9 @@ Rectangle {
|
|||||||
spacing: 16
|
spacing: 16
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
property bool maliciousTxFee: parseFloat(root.transactionFee) > 0.01
|
||||||
font.pixelSize: 15
|
color: maliciousTxFee ? "red" : MoneroComponents.Style.defaultFontColor
|
||||||
|
font.pixelSize: maliciousTxFee ? 20 : 15
|
||||||
text: {
|
text: {
|
||||||
if (currentWallet) {
|
if (currentWallet) {
|
||||||
if (!root.transactionFee) {
|
if (!root.transactionFee) {
|
||||||
@@ -349,7 +350,7 @@ Rectangle {
|
|||||||
return qsTr("Calculating fee") + "..." + translationManager.emptyString;
|
return qsTr("Calculating fee") + "..." + translationManager.emptyString;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return root.transactionFee + " XMR"
|
return root.transactionFee + " XMR" + (maliciousTxFee ? " (HIGH FEE)" : "")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
|
|||||||
1
external/CMakeLists.txt
vendored
@@ -4,4 +4,5 @@ add_library(quirc STATIC
|
|||||||
quirc/lib/quirc.c
|
quirc/lib/quirc.c
|
||||||
quirc/lib/version_db.c
|
quirc/lib/version_db.c
|
||||||
)
|
)
|
||||||
|
set_target_properties(quirc PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||||
target_include_directories(quirc PUBLIC quirc/lib)
|
target_include_directories(quirc PUBLIC quirc/lib)
|
||||||
|
|||||||
@@ -3,812 +3,73 @@ import QtQuick 2.9
|
|||||||
|
|
||||||
Object {
|
Object {
|
||||||
|
|
||||||
|
//Font Awesome version 5.15.3
|
||||||
FontLoader {
|
FontLoader {
|
||||||
id: regular
|
id: regular
|
||||||
source: "./fa-regular-400.ttf"
|
source: "./fa-regular-400.otf"
|
||||||
}
|
}
|
||||||
|
|
||||||
FontLoader {
|
FontLoader {
|
||||||
id: brands
|
id: brands
|
||||||
source: "./fa-brands-400.ttf"
|
source: "./fa-brands-400.otf"
|
||||||
}
|
}
|
||||||
|
|
||||||
FontLoader {
|
FontLoader {
|
||||||
id: solid
|
id: solid
|
||||||
source: "./fa-solid-900.ttf"
|
source: "./fa-solid-900.otf"
|
||||||
}
|
}
|
||||||
|
|
||||||
property string fontFamily: regular.name
|
property string fontFamily: regular.name
|
||||||
property string fontFamilyBrands: brands.name
|
property string fontFamilyBrands: brands.name
|
||||||
property string fontFamilySolid: solid.name
|
property string fontFamilySolid: solid.name
|
||||||
|
|
||||||
// Icons
|
// Icons used in Monero GUI (Font Awesome version 5.15.3)
|
||||||
|
// To add new icons, check unicodes in Font Awesome Free's Cheatsheet:
|
||||||
|
// https://fontawesome.com/v5/cheatsheet/free/solid
|
||||||
|
// https://fontawesome.com/v5/cheatsheet/free/regular
|
||||||
|
// https://fontawesome.com/v5/cheatsheet/free/brands
|
||||||
|
|
||||||
property string addressBook : "\uf2b9"
|
property string addressBook : "\uf2b9"
|
||||||
property string addressBookO : "\uf2ba"
|
|
||||||
property string addressCard : "\uf2bb"
|
|
||||||
property string addressCardO : "\uf2bc"
|
|
||||||
property string adjust : "\uf042"
|
|
||||||
property string adn : "\uf170"
|
|
||||||
property string alignCenter : "\uf037"
|
|
||||||
property string alignJustify : "\uf039"
|
|
||||||
property string alignLeft : "\uf036"
|
|
||||||
property string alignRight : "\uf038"
|
|
||||||
property string amazon : "\uf270"
|
|
||||||
property string ambulance : "\uf0f9"
|
|
||||||
property string americanSignLanguageInterpreting : "\uf2a3"
|
|
||||||
property string anchor : "\uf13d"
|
|
||||||
property string android : "\uf17b"
|
|
||||||
property string angellist : "\uf209"
|
|
||||||
property string angleDoubleDown : "\uf103"
|
|
||||||
property string angleDoubleLeft : "\uf100"
|
|
||||||
property string angleDoubleRight : "\uf101"
|
|
||||||
property string angleDoubleUp : "\uf102"
|
|
||||||
property string angleDown : "\uf107"
|
|
||||||
property string angleLeft : "\uf104"
|
|
||||||
property string angleRight : "\uf105"
|
|
||||||
property string angleUp : "\uf106"
|
|
||||||
property string apple : "\uf179"
|
|
||||||
property string archive : "\uf187"
|
|
||||||
property string areaChart : "\uf1fe"
|
|
||||||
property string arrowCircleDown : "\uf0ab"
|
|
||||||
property string arrowCircleLeft : "\uf0a8"
|
|
||||||
property string arrowCircleODown : "\uf01a"
|
|
||||||
property string arrowCircleOLeft : "\uf190"
|
|
||||||
property string arrowCircleORight : "\uf18e"
|
|
||||||
property string arrowCircleOUp : "\uf01b"
|
|
||||||
property string arrowCircleRight : "\uf0a9"
|
property string arrowCircleRight : "\uf0a9"
|
||||||
property string arrowCircleUp : "\uf0aa"
|
|
||||||
property string arrowDown : "\uf063"
|
property string arrowDown : "\uf063"
|
||||||
property string arrowLeft : "\uf060"
|
property string arrowLeft : "\uf060"
|
||||||
property string arrowRight : "\uf061"
|
property string arrowRight : "\uf061"
|
||||||
property string arrowUp : "\uf062"
|
|
||||||
property string arrows : "\uf047"
|
|
||||||
property string arrowsAlt : "\uf0b2"
|
|
||||||
property string arrowsH : "\uf07e"
|
|
||||||
property string arrowsV : "\uf07d"
|
|
||||||
property string aslInterpreting : "\uf2a3"
|
|
||||||
property string assistiveListeningSystems : "\uf2a2"
|
|
||||||
property string asterisk : "\uf069"
|
|
||||||
property string at : "\uf1fa"
|
|
||||||
property string audioDescription : "\uf29e"
|
|
||||||
property string automobile : "\uf1b9"
|
|
||||||
property string backward : "\uf04a"
|
|
||||||
property string balanceScale : "\uf24e"
|
|
||||||
property string ban : "\uf05e"
|
|
||||||
property string bandcamp : "\uf2d5"
|
|
||||||
property string bank : "\uf19c"
|
|
||||||
property string barChart : "\uf080"
|
|
||||||
property string barChartO : "\uf080"
|
|
||||||
property string barcode : "\uf02a"
|
|
||||||
property string bars : "\uf0c9"
|
|
||||||
property string bath : "\uf2cd"
|
|
||||||
property string bathtub : "\uf2cd"
|
|
||||||
property string battery : "\uf240"
|
|
||||||
property string battery0 : "\uf244"
|
|
||||||
property string battery1 : "\uf243"
|
|
||||||
property string battery2 : "\uf242"
|
|
||||||
property string battery3 : "\uf241"
|
|
||||||
property string battery4 : "\uf240"
|
|
||||||
property string batteryEmpty : "\uf244"
|
|
||||||
property string batteryFull : "\uf240"
|
|
||||||
property string batteryHalf : "\uf242"
|
|
||||||
property string batteryQuarter : "\uf243"
|
|
||||||
property string batteryThreeQuarters : "\uf241"
|
|
||||||
property string bed : "\uf236"
|
|
||||||
property string beer : "\uf0fc"
|
|
||||||
property string behance : "\uf1b4"
|
|
||||||
property string behanceSquare : "\uf1b5"
|
|
||||||
property string bell : "\uf0f3"
|
|
||||||
property string bellO : "\uf0a2"
|
|
||||||
property string bellSlash : "\uf1f6"
|
|
||||||
property string bellSlashO : "\uf1f7"
|
|
||||||
property string bicycle : "\uf206"
|
|
||||||
property string binoculars : "\uf1e5"
|
|
||||||
property string birthdayCake : "\uf1fd"
|
|
||||||
property string bitbucket : "\uf171"
|
|
||||||
property string bitbucketSquare : "\uf172"
|
|
||||||
property string bitcoin : "\uf15a"
|
|
||||||
property string blackTie : "\uf27e"
|
|
||||||
property string blind : "\uf29d"
|
|
||||||
property string bluetooth : "\uf293"
|
|
||||||
property string bluetoothB : "\uf294"
|
|
||||||
property string bold : "\uf032"
|
|
||||||
property string bolt : "\uf0e7"
|
|
||||||
property string bomb : "\uf1e2"
|
|
||||||
property string book : "\uf02d"
|
|
||||||
property string bookmark : "\uf02e"
|
|
||||||
property string bookmarkO : "\uf097"
|
|
||||||
property string braille : "\uf2a1"
|
|
||||||
property string briefcase : "\uf0b1"
|
|
||||||
property string btc : "\uf15a"
|
|
||||||
property string bug : "\uf188"
|
|
||||||
property string building : "\uf1ad"
|
|
||||||
property string buildingO : "\uf0f7"
|
|
||||||
property string bullhorn : "\uf0a1"
|
|
||||||
property string bullseye : "\uf140"
|
|
||||||
property string bus : "\uf207"
|
|
||||||
property string buysellads : "\uf20d"
|
|
||||||
property string cab : "\uf1ba"
|
|
||||||
property string calculator : "\uf1ec"
|
|
||||||
property string calendar : "\uf073"
|
|
||||||
property string calendarCheckO : "\uf274"
|
|
||||||
property string calendarMinusO : "\uf272"
|
|
||||||
property string calendarO : "\uf133"
|
|
||||||
property string calendarPlusO : "\uf271"
|
|
||||||
property string calendarTimesO : "\uf273"
|
|
||||||
property string camera : "\uf030"
|
|
||||||
property string cameraRetro : "\uf083"
|
|
||||||
property string car : "\uf1b9"
|
|
||||||
property string caretDown : "\uf0d7"
|
|
||||||
property string caretLeft : "\uf0d9"
|
|
||||||
property string caretRight : "\uf0da"
|
|
||||||
property string caretSquareODown : "\uf150"
|
|
||||||
property string caretSquareOLeft : "\uf191"
|
|
||||||
property string caretSquareORight : "\uf152"
|
|
||||||
property string caretSquareOUp : "\uf151"
|
|
||||||
property string caretUp : "\uf0d8"
|
|
||||||
property string cartArrowDown : "\uf218"
|
|
||||||
property string cartPlus : "\uf217"
|
|
||||||
property string cashRegister: "\uf788"
|
property string cashRegister: "\uf788"
|
||||||
property string cc : "\uf20a"
|
property string checkCircle: "\uf058"
|
||||||
property string ccAmex : "\uf1f3"
|
|
||||||
property string ccDinersClub : "\uf24c"
|
|
||||||
property string ccDiscover : "\uf1f2"
|
|
||||||
property string ccJcb : "\uf24b"
|
|
||||||
property string ccMastercard : "\uf1f1"
|
|
||||||
property string ccPaypal : "\uf1f4"
|
|
||||||
property string ccStripe : "\uf1f5"
|
|
||||||
property string ccVisa : "\uf1f0"
|
|
||||||
property string certificate : "\uf0a3"
|
|
||||||
property string chain : "\uf0c1"
|
|
||||||
property string chainBroken : "\uf127"
|
|
||||||
property string check : "\uf00c"
|
|
||||||
property string checkCircle : "\uf058"
|
|
||||||
property string checkCircleO : "\uf05d"
|
|
||||||
property string checkSquare : "\uf14a"
|
|
||||||
property string checkSquareO : "\uf046"
|
|
||||||
property string chevronCircleDown : "\uf13a"
|
|
||||||
property string chevronCircleLeft : "\uf137"
|
|
||||||
property string chevronCircleRight : "\uf138"
|
|
||||||
property string chevronCircleUp : "\uf139"
|
|
||||||
property string chevronDown : "\uf078"
|
|
||||||
property string chevronLeft : "\uf053"
|
|
||||||
property string chevronRight : "\uf054"
|
|
||||||
property string chevronUp : "\uf077"
|
|
||||||
property string child : "\uf1ae"
|
|
||||||
property string chrome : "\uf268"
|
|
||||||
property string circle : "\uf111"
|
|
||||||
property string circleO : "\uf10c"
|
|
||||||
property string circleONotch : "\uf1ce"
|
|
||||||
property string circleThin : "\uf1db"
|
|
||||||
property string clipboard : "\uf0ea"
|
property string clipboard : "\uf0ea"
|
||||||
property string clockO : "\uf017"
|
property string clockO : "\uf017"
|
||||||
property string clone : "\uf24d"
|
|
||||||
property string close : "\uf00d"
|
|
||||||
property string cloud : "\uf0c2"
|
property string cloud : "\uf0c2"
|
||||||
property string cloudDownload : "\uf0ed"
|
|
||||||
property string cloudUpload : "\uf0ee"
|
|
||||||
property string cny : "\uf157"
|
|
||||||
property string code : "\uf121"
|
|
||||||
property string codeFork : "\uf126"
|
|
||||||
property string codepen : "\uf1cb"
|
|
||||||
property string codiepie : "\uf284"
|
|
||||||
property string coffee : "\uf0f4"
|
|
||||||
property string cog : "\uf013"
|
|
||||||
property string cogs : "\uf085"
|
|
||||||
property string columns : "\uf0db"
|
|
||||||
property string comment : "\uf075"
|
|
||||||
property string commentO : "\uf0e5"
|
|
||||||
property string commenting : "\uf27a"
|
|
||||||
property string commentingO : "\uf27b"
|
|
||||||
property string comments : "\uf086"
|
|
||||||
property string commentsO : "\uf0e6"
|
|
||||||
property string compass : "\uf14e"
|
|
||||||
property string compress : "\uf066"
|
|
||||||
property string connectdevelop : "\uf20e"
|
|
||||||
property string contao : "\uf26d"
|
|
||||||
property string copy : "\uf0c5"
|
|
||||||
property string copyright : "\uf1f9"
|
|
||||||
property string creativeCommons : "\uf25e"
|
|
||||||
property string creditCard : "\uf09d"
|
|
||||||
property string creditCardAlt : "\uf283"
|
|
||||||
property string crop : "\uf125"
|
|
||||||
property string crosshairs : "\uf05b"
|
|
||||||
property string css3 : "\uf13c"
|
|
||||||
property string cube : "\uf1b2"
|
|
||||||
property string cubes : "\uf1b3"
|
|
||||||
property string cut : "\uf0c4"
|
|
||||||
property string cutlery : "\uf0f5"
|
|
||||||
property string dashboard : "\uf0e4"
|
|
||||||
property string dashcube : "\uf210"
|
|
||||||
property string database : "\uf1c0"
|
|
||||||
property string deaf : "\uf2a4"
|
|
||||||
property string deafness : "\uf2a4"
|
|
||||||
property string dedent : "\uf03b"
|
|
||||||
property string delicious : "\uf1a5"
|
|
||||||
property string desktop : "\uf108"
|
property string desktop : "\uf108"
|
||||||
property string deviantart : "\uf1bd"
|
|
||||||
property string diamond : "\uf219"
|
|
||||||
property string digg : "\uf1a6"
|
|
||||||
property string dollar : "\uf155"
|
|
||||||
property string dotCircleO : "\uf192"
|
|
||||||
property string download : "\uf019"
|
|
||||||
property string dribbble : "\uf17d"
|
|
||||||
property string driversLicense : "\uf2c2"
|
|
||||||
property string driversLicenseO : "\uf2c3"
|
|
||||||
property string dropbox : "\uf16b"
|
|
||||||
property string drupal : "\uf1a9"
|
|
||||||
property string edge : "\uf282"
|
|
||||||
property string edit : "\uf044"
|
property string edit : "\uf044"
|
||||||
property string eercast : "\uf2da"
|
|
||||||
property string eject : "\uf052"
|
|
||||||
property string ellipsisH : "\uf141"
|
property string ellipsisH : "\uf141"
|
||||||
property string ellipsisV : "\uf142"
|
|
||||||
property string empire : "\uf1d1"
|
|
||||||
property string envelope : "\uf0e0"
|
|
||||||
property string envelopeO : "\uf003"
|
|
||||||
property string envelopeOpen : "\uf2b6"
|
|
||||||
property string envelopeOpenO : "\uf2b7"
|
|
||||||
property string envelopeSquare : "\uf199"
|
|
||||||
property string envira : "\uf299"
|
|
||||||
property string eraser : "\uf12d"
|
|
||||||
property string etsy : "\uf2d7"
|
|
||||||
property string eur : "\uf153"
|
|
||||||
property string euro : "\uf153"
|
|
||||||
property string exchange : "\uf0ec"
|
|
||||||
property string exclamation : "\uf12a"
|
|
||||||
property string exclamationCircle : "\uf06a"
|
property string exclamationCircle : "\uf06a"
|
||||||
property string exclamationTriangle : "\uf071"
|
|
||||||
property string expand : "\uf065"
|
|
||||||
property string expeditedssl : "\uf23e"
|
|
||||||
property string externalLink : "\uf08e"
|
|
||||||
property string externalLinkSquare : "\uf14c"
|
|
||||||
property string eye : "\uf06e"
|
property string eye : "\uf06e"
|
||||||
property string eyeSlash : "\uf070"
|
property string eyeSlash : "\uf070"
|
||||||
property string eyedropper : "\uf1fb"
|
|
||||||
property string fa : "\uf2b4"
|
|
||||||
property string facebook : "\uf09a"
|
|
||||||
property string facebookF : "\uf09a"
|
|
||||||
property string facebookOfficial : "\uf230"
|
|
||||||
property string facebookSquare : "\uf082"
|
|
||||||
property string fastBackward : "\uf049"
|
|
||||||
property string fastForward : "\uf050"
|
|
||||||
property string fax : "\uf1ac"
|
|
||||||
property string feed : "\uf09e"
|
|
||||||
property string female : "\uf182"
|
|
||||||
property string fighterJet : "\uf0fb"
|
|
||||||
property string file : "\uf15b"
|
|
||||||
property string fileArchiveO : "\uf1c6"
|
|
||||||
property string fileAudioO : "\uf1c7"
|
|
||||||
property string fileCodeO : "\uf1c9"
|
|
||||||
property string fileExcelO : "\uf1c3"
|
|
||||||
property string fileImageO : "\uf1c5"
|
|
||||||
property string fileMovieO : "\uf1c8"
|
|
||||||
property string fileO : "\uf016"
|
|
||||||
property string filePdfO : "\uf1c1"
|
|
||||||
property string filePhotoO : "\uf1c5"
|
|
||||||
property string filePictureO : "\uf1c5"
|
|
||||||
property string filePowerpointO : "\uf1c4"
|
|
||||||
property string fileSoundO : "\uf1c7"
|
|
||||||
property string fileText : "\uf15c"
|
|
||||||
property string fileTextO : "\uf0f6"
|
|
||||||
property string fileVideoO : "\uf1c8"
|
|
||||||
property string fileWordO : "\uf1c2"
|
|
||||||
property string fileZipO : "\uf1c6"
|
|
||||||
property string filesO : "\uf0c5"
|
|
||||||
property string film : "\uf008"
|
|
||||||
property string filter : "\uf0b0"
|
|
||||||
property string fire : "\uf06d"
|
|
||||||
property string fireExtinguisher : "\uf134"
|
|
||||||
property string firefox : "\uf269"
|
|
||||||
property string firstOrder : "\uf2b0"
|
|
||||||
property string flag : "\uf024"
|
|
||||||
property string flagCheckered : "\uf11e"
|
|
||||||
property string flagO : "\uf11d"
|
|
||||||
property string flash : "\uf0e7"
|
|
||||||
property string flask : "\uf0c3"
|
|
||||||
property string flickr : "\uf16e"
|
|
||||||
property string floppyO : "\uf0c7"
|
|
||||||
property string folder : "\uf07b"
|
|
||||||
property string folderO : "\uf114"
|
|
||||||
property string folderOpen : "\uf07c"
|
property string folderOpen : "\uf07c"
|
||||||
property string folderOpenO : "\uf115"
|
|
||||||
property string font : "\uf031"
|
|
||||||
property string fontAwesome : "\uf2b4"
|
|
||||||
property string fonticons : "\uf280"
|
|
||||||
property string fortAwesome : "\uf286"
|
|
||||||
property string forumbee : "\uf211"
|
|
||||||
property string forward : "\uf04e"
|
|
||||||
property string foursquare : "\uf180"
|
|
||||||
property string freeCodeCamp : "\uf2c5"
|
|
||||||
property string frownO : "\uf119"
|
|
||||||
property string futbolO : "\uf1e3"
|
|
||||||
property string gamepad : "\uf11b"
|
|
||||||
property string gavel : "\uf0e3"
|
|
||||||
property string gbp : "\uf154"
|
|
||||||
property string ge : "\uf1d1"
|
|
||||||
property string gear : "\uf013"
|
|
||||||
property string gears : "\uf085"
|
|
||||||
property string genderless : "\uf22d"
|
|
||||||
property string getPocket : "\uf265"
|
|
||||||
property string gg : "\uf260"
|
|
||||||
property string ggCircle : "\uf261"
|
|
||||||
property string gift : "\uf06b"
|
|
||||||
property string git : "\uf1d3"
|
|
||||||
property string gitSquare : "\uf1d2"
|
|
||||||
property string github : "\uf09b"
|
|
||||||
property string githubAlt : "\uf113"
|
|
||||||
property string githubSquare : "\uf092"
|
|
||||||
property string gitlab : "\uf296"
|
|
||||||
property string gittip : "\uf184"
|
|
||||||
property string glass : "\uf000"
|
|
||||||
property string glide : "\uf2a5"
|
|
||||||
property string glideG : "\uf2a6"
|
|
||||||
property string globe : "\uf0ac"
|
property string globe : "\uf0ac"
|
||||||
property string google : "\uf1a0"
|
|
||||||
property string googlePlus : "\uf0d5"
|
|
||||||
property string googlePlusCircle : "\uf2b3"
|
|
||||||
property string googlePlusOfficial : "\uf2b3"
|
|
||||||
property string googlePlusSquare : "\uf0d4"
|
|
||||||
property string googleWallet : "\uf1ee"
|
|
||||||
property string graduationCap : "\uf19d"
|
|
||||||
property string gratipay : "\uf184"
|
|
||||||
property string grav : "\uf2d6"
|
|
||||||
property string group : "\uf0c0"
|
|
||||||
property string hSquare : "\uf0fd"
|
|
||||||
property string hackerNews : "\uf1d4"
|
|
||||||
property string handGrabO : "\uf255"
|
|
||||||
property string handLizardO : "\uf258"
|
|
||||||
property string handODown : "\uf0a7"
|
|
||||||
property string handOLeft : "\uf0a5"
|
|
||||||
property string handORight : "\uf0a4"
|
|
||||||
property string handOUp : "\uf0a6"
|
|
||||||
property string handPaperO : "\uf256"
|
|
||||||
property string handPeaceO : "\uf25b"
|
|
||||||
property string handPointerO : "\uf25a"
|
|
||||||
property string handRockO : "\uf255"
|
|
||||||
property string handScissorsO : "\uf257"
|
|
||||||
property string handSpockO : "\uf259"
|
|
||||||
property string handStopO : "\uf256"
|
|
||||||
property string handshakeO : "\uf2b5"
|
|
||||||
property string hardOfHearing : "\uf2a4"
|
|
||||||
property string hashtag : "\uf292"
|
|
||||||
property string hddO : "\uf0a0"
|
|
||||||
property string header : "\uf1dc"
|
|
||||||
property string headphones : "\uf025"
|
|
||||||
property string heart : "\uf004"
|
|
||||||
property string heartO : "\uf08a"
|
|
||||||
property string heartbeat : "\uf21e"
|
|
||||||
property string history : "\uf1da"
|
|
||||||
property string home : "\uf015"
|
property string home : "\uf015"
|
||||||
property string hospitalO : "\uf0f8"
|
property string houseUser : "\ue065"
|
||||||
property string hotel : "\uf236"
|
|
||||||
property string hourglass : "\uf254"
|
|
||||||
property string hourglass1 : "\uf251"
|
|
||||||
property string hourglass2 : "\uf252"
|
|
||||||
property string hourglass3 : "\uf253"
|
|
||||||
property string hourglassEnd : "\uf253"
|
|
||||||
property string hourglassHalf : "\uf252"
|
|
||||||
property string hourglassO : "\uf250"
|
|
||||||
property string hourglassStart : "\uf251"
|
|
||||||
property string houzz : "\uf27c"
|
|
||||||
property string html5 : "\uf13b"
|
|
||||||
property string iCursor : "\uf246"
|
|
||||||
property string idBadge : "\uf2c1"
|
|
||||||
property string idCard : "\uf2c2"
|
|
||||||
property string idCardO : "\uf2c3"
|
|
||||||
property string ils : "\uf20b"
|
|
||||||
property string image : "\uf03e"
|
|
||||||
property string imdb : "\uf2d8"
|
|
||||||
property string inbox : "\uf01c"
|
|
||||||
property string indent : "\uf03c"
|
|
||||||
property string industry : "\uf275"
|
|
||||||
property string infinity : "\uf534"
|
property string infinity : "\uf534"
|
||||||
property string info : "\uf129"
|
property string info : "\uf129"
|
||||||
property string infoCircle : "\uf05a"
|
|
||||||
property string inr : "\uf156"
|
|
||||||
property string instagram : "\uf16d"
|
|
||||||
property string institution : "\uf19c"
|
|
||||||
property string internetExplorer : "\uf26b"
|
|
||||||
property string intersex : "\uf224"
|
|
||||||
property string ioxhost : "\uf208"
|
|
||||||
property string italic : "\uf033"
|
|
||||||
property string joomla : "\uf1aa"
|
|
||||||
property string jpy : "\uf157"
|
|
||||||
property string jsfiddle : "\uf1cc"
|
|
||||||
property string key : "\uf084"
|
property string key : "\uf084"
|
||||||
property string keyboardO : "\uf11c"
|
|
||||||
property string krw : "\uf159"
|
|
||||||
property string language : "\uf1ab"
|
property string language : "\uf1ab"
|
||||||
property string laptop : "\uf109"
|
|
||||||
property string lastfm : "\uf202"
|
|
||||||
property string lastfmSquare : "\uf203"
|
|
||||||
property string leaf : "\uf06c"
|
|
||||||
property string leanpub : "\uf212"
|
|
||||||
property string legal : "\uf0e3"
|
|
||||||
property string lemonO : "\uf094"
|
|
||||||
property string levelDown : "\uf149"
|
|
||||||
property string levelUp : "\uf148"
|
|
||||||
property string lifeBouy : "\uf1cd"
|
|
||||||
property string lifeBuoy : "\uf1cd"
|
|
||||||
property string lifeRing : "\uf1cd"
|
|
||||||
property string lifeSaver : "\uf1cd"
|
|
||||||
property string lightbulbO : "\uf0eb"
|
|
||||||
property string lineChart : "\uf201"
|
|
||||||
property string link : "\uf0c1"
|
|
||||||
property string linkedin : "\uf0e1"
|
|
||||||
property string linkedinSquare : "\uf08c"
|
|
||||||
property string linode : "\uf2b8"
|
|
||||||
property string linux : "\uf17c"
|
|
||||||
property string list : "\uf03a"
|
|
||||||
property string listAlt : "\uf022"
|
|
||||||
property string listOl : "\uf0cb"
|
|
||||||
property string listUl : "\uf0ca"
|
|
||||||
property string locationArrow : "\uf124"
|
|
||||||
property string lock : "\uf023"
|
property string lock : "\uf023"
|
||||||
property string longArrowDown : "\uf175"
|
|
||||||
property string longArrowLeft : "\uf177"
|
|
||||||
property string longArrowRight : "\uf178"
|
|
||||||
property string longArrowUp : "\uf176"
|
|
||||||
property string lowVision : "\uf2a8"
|
|
||||||
property string magic : "\uf0d0"
|
|
||||||
property string magnet : "\uf076"
|
|
||||||
property string mailForward : "\uf064"
|
|
||||||
property string mailReply : "\uf112"
|
|
||||||
property string mailReplyAll : "\uf122"
|
|
||||||
property string male : "\uf183"
|
|
||||||
property string map : "\uf279"
|
|
||||||
property string mapMarker : "\uf041"
|
|
||||||
property string mapO : "\uf278"
|
|
||||||
property string mapPin : "\uf276"
|
|
||||||
property string mapSigns : "\uf277"
|
|
||||||
property string mars : "\uf222"
|
|
||||||
property string marsDouble : "\uf227"
|
|
||||||
property string marsStroke : "\uf229"
|
|
||||||
property string marsStrokeH : "\uf22b"
|
|
||||||
property string marsStrokeV : "\uf22a"
|
|
||||||
property string maxcdn : "\uf136"
|
|
||||||
property string meanpath : "\uf20c"
|
|
||||||
property string medium : "\uf23a"
|
|
||||||
property string medkit : "\uf0fa"
|
|
||||||
property string meetup : "\uf2e0"
|
|
||||||
property string mehO : "\uf11a"
|
|
||||||
property string mercury : "\uf223"
|
|
||||||
property string microchip : "\uf2db"
|
|
||||||
property string microphone : "\uf130"
|
|
||||||
property string microphoneSlash : "\uf131"
|
|
||||||
property string minus : "\uf068"
|
property string minus : "\uf068"
|
||||||
property string minusCircle : "\uf056"
|
property string minusCircle : "\uf056"
|
||||||
property string minusSquare : "\uf146"
|
|
||||||
property string minusSquareO : "\uf147"
|
|
||||||
property string mixcloud : "\uf289"
|
|
||||||
property string mobile : "\uf10b"
|
|
||||||
property string mobilePhone : "\uf10b"
|
|
||||||
property string modx : "\uf285"
|
|
||||||
property string money : "\uf0d6"
|
|
||||||
property string moonO : "\uf186"
|
property string moonO : "\uf186"
|
||||||
property string mortarBoard : "\uf19d"
|
property string monero : "\uf3d0"
|
||||||
property string motorcycle : "\uf21c"
|
|
||||||
property string mousePointer : "\uf245"
|
|
||||||
property string music : "\uf001"
|
|
||||||
property string navicon : "\uf0c9"
|
|
||||||
property string neuter : "\uf22c"
|
|
||||||
property string newspaperO : "\uf1ea"
|
|
||||||
property string objectGroup : "\uf247"
|
|
||||||
property string objectUngroup : "\uf248"
|
|
||||||
property string odnoklassniki : "\uf263"
|
|
||||||
property string odnoklassnikiSquare : "\uf264"
|
|
||||||
property string opencart : "\uf23d"
|
|
||||||
property string openid : "\uf19b"
|
|
||||||
property string opera : "\uf26a"
|
|
||||||
property string optinMonster : "\uf23c"
|
|
||||||
property string outdent : "\uf03b"
|
|
||||||
property string pagelines : "\uf18c"
|
|
||||||
property string paintBrush : "\uf1fc"
|
|
||||||
property string paperPlane : "\uf1d8"
|
|
||||||
property string paperPlaneO : "\uf1d9"
|
|
||||||
property string paperclip : "\uf0c6"
|
|
||||||
property string paragraph : "\uf1dd"
|
|
||||||
property string paste : "\uf0ea"
|
property string paste : "\uf0ea"
|
||||||
property string pause : "\uf04c"
|
|
||||||
property string pauseCircle : "\uf28b"
|
|
||||||
property string pauseCircleO : "\uf28c"
|
|
||||||
property string paw : "\uf1b0"
|
|
||||||
property string paypal : "\uf1ed"
|
|
||||||
property string pencil : "\uf040"
|
|
||||||
property string pencilSquare : "\uf14b"
|
property string pencilSquare : "\uf14b"
|
||||||
property string pencilSquareO : "\uf044"
|
|
||||||
property string percent : "\uf295"
|
|
||||||
property string phone : "\uf095"
|
|
||||||
property string phoneSquare : "\uf098"
|
|
||||||
property string photo : "\uf03e"
|
|
||||||
property string pictureO : "\uf03e"
|
|
||||||
property string pieChart : "\uf200"
|
|
||||||
property string piedPiper : "\uf2ae"
|
|
||||||
property string piedPiperAlt : "\uf1a8"
|
|
||||||
property string piedPiperPp : "\uf1a7"
|
|
||||||
property string pinterest : "\uf0d2"
|
|
||||||
property string pinterestP : "\uf231"
|
|
||||||
property string pinterestSquare : "\uf0d3"
|
|
||||||
property string plane : "\uf072"
|
|
||||||
property string play : "\uf04b"
|
|
||||||
property string playCircle : "\uf144"
|
|
||||||
property string playCircleO : "\uf01d"
|
|
||||||
property string plug : "\uf1e6"
|
|
||||||
property string plus : "\uf067"
|
property string plus : "\uf067"
|
||||||
property string plusCircle : "\uf055"
|
property string plusCircle : "\uf055"
|
||||||
property string plusSquare : "\uf0fe"
|
|
||||||
property string plusSquareO : "\uf196"
|
|
||||||
property string podcast : "\uf2ce"
|
|
||||||
property string powerOff : "\uf011"
|
|
||||||
property string printIcon : "\uf02f"
|
|
||||||
property string productHunt : "\uf288"
|
property string productHunt : "\uf288"
|
||||||
property string puzzlePiece : "\uf12e"
|
|
||||||
property string qq : "\uf1d6"
|
|
||||||
property string qrcode : "\uf029"
|
property string qrcode : "\uf029"
|
||||||
property string question : "\uf128"
|
|
||||||
property string questionCircle : "\uf059"
|
property string questionCircle : "\uf059"
|
||||||
property string questionCircleO : "\uf29c"
|
|
||||||
property string quora : "\uf2c4"
|
|
||||||
property string quoteLeft : "\uf10d"
|
|
||||||
property string quoteRight : "\uf10e"
|
|
||||||
property string ra : "\uf1d0"
|
|
||||||
property string random : "\uf074"
|
property string random : "\uf074"
|
||||||
property string ravelry : "\uf2d9"
|
|
||||||
property string rebel : "\uf1d0"
|
|
||||||
property string recycle : "\uf1b8"
|
|
||||||
property string reddit : "\uf1a1"
|
|
||||||
property string redditAlien : "\uf281"
|
|
||||||
property string redditSquare : "\uf1a2"
|
|
||||||
property string refresh : "\uf021"
|
|
||||||
property string registered : "\uf25d"
|
|
||||||
property string remove : "\uf00d"
|
|
||||||
property string renren : "\uf18b"
|
|
||||||
property string reorder : "\uf0c9"
|
|
||||||
property string repeat : "\uf01e"
|
property string repeat : "\uf01e"
|
||||||
property string reply : "\uf112"
|
|
||||||
property string replyAll : "\uf122"
|
|
||||||
property string resistance : "\uf1d0"
|
|
||||||
property string retweet : "\uf079"
|
|
||||||
property string rmb : "\uf157"
|
|
||||||
property string road : "\uf018"
|
|
||||||
property string rocket : "\uf135"
|
|
||||||
property string rotateLeft : "\uf0e2"
|
|
||||||
property string rotateRight : "\uf01e"
|
|
||||||
property string rouble : "\uf158"
|
|
||||||
property string rss : "\uf09e"
|
|
||||||
property string rssSquare : "\uf143"
|
|
||||||
property string rub : "\uf158"
|
|
||||||
property string ruble : "\uf158"
|
|
||||||
property string rupee : "\uf156"
|
|
||||||
property string s15 : "\uf2cd"
|
|
||||||
property string safari : "\uf267"
|
|
||||||
property string save : "\uf0c7"
|
|
||||||
property string scissors : "\uf0c4"
|
|
||||||
property string scribd : "\uf28a"
|
|
||||||
property string search : "\uf002"
|
|
||||||
property string searchMinus : "\uf010"
|
|
||||||
property string searchPlus : "\uf00e"
|
property string searchPlus : "\uf00e"
|
||||||
property string sellsy : "\uf213"
|
|
||||||
property string send : "\uf1d8"
|
|
||||||
property string sendO : "\uf1d9"
|
|
||||||
property string server : "\uf233"
|
property string server : "\uf233"
|
||||||
property string share : "\uf064"
|
property string shieldAlt : "\uf3ed"
|
||||||
property string shareAlt : "\uf1e0"
|
|
||||||
property string shareAltSquare : "\uf1e1"
|
|
||||||
property string shareSquare : "\uf14d"
|
|
||||||
property string shareSquareO : "\uf045"
|
|
||||||
property string shekel : "\uf20b"
|
|
||||||
property string sheqel : "\uf20b"
|
|
||||||
property string shield : "\uf132"
|
|
||||||
property string ship : "\uf21a"
|
|
||||||
property string shirtsinbulk : "\uf214"
|
|
||||||
property string shoppingBag : "\uf290"
|
|
||||||
property string shoppingBasket : "\uf291"
|
|
||||||
property string shoppingCart : "\uf07a"
|
|
||||||
property string shower : "\uf2cc"
|
|
||||||
property string signIn : "\uf090"
|
|
||||||
property string signLanguage : "\uf2a7"
|
|
||||||
property string signOutAlt : "\uf2f5"
|
property string signOutAlt : "\uf2f5"
|
||||||
property string signOut : "\uf08b"
|
|
||||||
property string signal : "\uf012"
|
|
||||||
property string signing : "\uf2a7"
|
|
||||||
property string simplybuilt : "\uf215"
|
|
||||||
property string sitemap : "\uf0e8"
|
|
||||||
property string skyatlas : "\uf216"
|
|
||||||
property string skype : "\uf17e"
|
|
||||||
property string slack : "\uf198"
|
|
||||||
property string sliders : "\uf1de"
|
|
||||||
property string slideshare : "\uf1e7"
|
|
||||||
property string smileO : "\uf118"
|
|
||||||
property string snapchat : "\uf2ab"
|
|
||||||
property string snapchatGhost : "\uf2ac"
|
|
||||||
property string snapchatSquare : "\uf2ad"
|
|
||||||
property string snowflakeO : "\uf2dc"
|
|
||||||
property string soccerBallO : "\uf1e3"
|
|
||||||
property string sort : "\uf0dc"
|
|
||||||
property string sortAlphaAsc : "\uf15d"
|
|
||||||
property string sortAlphaDesc : "\uf15e"
|
|
||||||
property string sortAmountAsc : "\uf160"
|
|
||||||
property string sortAmountDesc : "\uf161"
|
|
||||||
property string sortAsc : "\uf0de"
|
|
||||||
property string sortDesc : "\uf0dd"
|
|
||||||
property string sortDown : "\uf0dd"
|
|
||||||
property string sortNumericAsc : "\uf162"
|
|
||||||
property string sortNumericDesc : "\uf163"
|
|
||||||
property string sortUp : "\uf0de"
|
|
||||||
property string soundcloud : "\uf1be"
|
|
||||||
property string spaceShuttle : "\uf197"
|
|
||||||
property string spinner : "\uf110"
|
|
||||||
property string spoon : "\uf1b1"
|
|
||||||
property string spotify : "\uf1bc"
|
|
||||||
property string square : "\uf0c8"
|
|
||||||
property string squareO : "\uf096"
|
|
||||||
property string stackExchange : "\uf18d"
|
|
||||||
property string stackOverflow : "\uf16c"
|
|
||||||
property string star : "\uf005"
|
|
||||||
property string starHalf : "\uf089"
|
|
||||||
property string starHalfEmpty : "\uf123"
|
|
||||||
property string starHalfFull : "\uf123"
|
|
||||||
property string starHalfO : "\uf123"
|
|
||||||
property string starO : "\uf006"
|
|
||||||
property string steam : "\uf1b6"
|
|
||||||
property string steamSquare : "\uf1b7"
|
|
||||||
property string stepBackward : "\uf048"
|
|
||||||
property string stepForward : "\uf051"
|
|
||||||
property string stethoscope : "\uf0f1"
|
|
||||||
property string stickyNote : "\uf249"
|
|
||||||
property string stickyNoteO : "\uf24a"
|
|
||||||
property string stop : "\uf04d"
|
|
||||||
property string stopCircle : "\uf28d"
|
|
||||||
property string stopCircleO : "\uf28e"
|
|
||||||
property string streetView : "\uf21d"
|
|
||||||
property string strikethrough : "\uf0cc"
|
|
||||||
property string stumbleupon : "\uf1a4"
|
|
||||||
property string stumbleuponCircle : "\uf1a3"
|
|
||||||
property string subscript : "\uf12c"
|
|
||||||
property string subway : "\uf239"
|
|
||||||
property string suitcase : "\uf0f2"
|
|
||||||
property string sunO : "\uf185"
|
|
||||||
property string superpowers : "\uf2dd"
|
|
||||||
property string superscript : "\uf12b"
|
|
||||||
property string support : "\uf1cd"
|
|
||||||
property string table : "\uf0ce"
|
|
||||||
property string tablet : "\uf10a"
|
|
||||||
property string tachometer : "\uf0e4"
|
|
||||||
property string tag : "\uf02b"
|
|
||||||
property string tags : "\uf02c"
|
|
||||||
property string tasks : "\uf0ae"
|
|
||||||
property string taxi : "\uf1ba"
|
|
||||||
property string telegram : "\uf2c6"
|
|
||||||
property string television : "\uf26c"
|
|
||||||
property string tencentWeibo : "\uf1d5"
|
|
||||||
property string terminal : "\uf120"
|
|
||||||
property string textHeight : "\uf034"
|
|
||||||
property string textWidth : "\uf035"
|
|
||||||
property string th : "\uf00a"
|
|
||||||
property string thLarge : "\uf009"
|
|
||||||
property string thList : "\uf00b"
|
|
||||||
property string themeisle : "\uf2b2"
|
|
||||||
property string thermometer : "\uf2c7"
|
|
||||||
property string thermometer0 : "\uf2cb"
|
|
||||||
property string thermometer1 : "\uf2ca"
|
|
||||||
property string thermometer2 : "\uf2c9"
|
|
||||||
property string thermometer3 : "\uf2c8"
|
|
||||||
property string thermometer4 : "\uf2c7"
|
|
||||||
property string thermometerEmpty : "\uf2cb"
|
|
||||||
property string thermometerFull : "\uf2c7"
|
|
||||||
property string thermometerHalf : "\uf2c9"
|
|
||||||
property string thermometerQuarter : "\uf2ca"
|
|
||||||
property string thermometerThreeQuarters : "\uf2c8"
|
|
||||||
property string thumbTack : "\uf08d"
|
|
||||||
property string thumbsDown : "\uf165"
|
|
||||||
property string thumbsODown : "\uf088"
|
|
||||||
property string thumbsOUp : "\uf087"
|
|
||||||
property string thumbsUp : "\uf164"
|
|
||||||
property string ticket : "\uf145"
|
|
||||||
property string times : "\uf00d"
|
property string times : "\uf00d"
|
||||||
property string timesCircle : "\uf057"
|
|
||||||
property string timesCircleO : "\uf05c"
|
|
||||||
property string timesRectangle : "\uf2d3"
|
|
||||||
property string timesRectangleO : "\uf2d4"
|
|
||||||
property string tint : "\uf043"
|
|
||||||
property string toggleDown : "\uf150"
|
|
||||||
property string toggleLeft : "\uf191"
|
|
||||||
property string toggleOff : "\uf204"
|
|
||||||
property string toggleOn : "\uf205"
|
|
||||||
property string toggleRight : "\uf152"
|
|
||||||
property string toggleUp : "\uf151"
|
|
||||||
property string trademark : "\uf25c"
|
|
||||||
property string train : "\uf238"
|
|
||||||
property string transgender : "\uf224"
|
|
||||||
property string transgenderAlt : "\uf225"
|
|
||||||
property string trash : "\uf1f8"
|
|
||||||
property string trashO : "\uf014"
|
|
||||||
property string tree : "\uf1bb"
|
|
||||||
property string trello : "\uf181"
|
|
||||||
property string tripadvisor : "\uf262"
|
|
||||||
property string trophy : "\uf091"
|
|
||||||
property string truck : "\uf0d1"
|
|
||||||
property string tryIcon : "\uf195"
|
|
||||||
property string tty : "\uf1e4"
|
|
||||||
property string tumblr : "\uf173"
|
|
||||||
property string tumblrSquare : "\uf174"
|
|
||||||
property string turkishLira : "\uf195"
|
|
||||||
property string tv : "\uf26c"
|
|
||||||
property string twitch : "\uf1e8"
|
|
||||||
property string twitter : "\uf099"
|
|
||||||
property string twitterSquare : "\uf081"
|
|
||||||
property string umbrella : "\uf0e9"
|
|
||||||
property string underline : "\uf0cd"
|
|
||||||
property string undo : "\uf0e2"
|
|
||||||
property string universalAccess : "\uf29a"
|
|
||||||
property string university : "\uf19c"
|
|
||||||
property string unlink : "\uf127"
|
|
||||||
property string unlock : "\uf09c"
|
|
||||||
property string unlockAlt : "\uf13e"
|
|
||||||
property string unsorted : "\uf0dc"
|
|
||||||
property string upload : "\uf093"
|
|
||||||
property string usb : "\uf287"
|
|
||||||
property string usd : "\uf155"
|
|
||||||
property string user : "\uf007"
|
|
||||||
property string userCircle : "\uf2bd"
|
|
||||||
property string userCircleO : "\uf2be"
|
|
||||||
property string userMd : "\uf0f0"
|
|
||||||
property string userO : "\uf2c0"
|
|
||||||
property string userPlus : "\uf234"
|
|
||||||
property string userSecret : "\uf21b"
|
|
||||||
property string userTimes : "\uf235"
|
|
||||||
property string users : "\uf0c0"
|
|
||||||
property string vcard : "\uf2bb"
|
|
||||||
property string vcardO : "\uf2bc"
|
|
||||||
property string venus : "\uf221"
|
|
||||||
property string venusDouble : "\uf226"
|
|
||||||
property string venusMars : "\uf228"
|
|
||||||
property string viacoin : "\uf237"
|
|
||||||
property string viadeo : "\uf2a9"
|
|
||||||
property string viadeoSquare : "\uf2aa"
|
|
||||||
property string videoCamera : "\uf03d"
|
|
||||||
property string vimeo : "\uf27d"
|
|
||||||
property string vimeoSquare : "\uf194"
|
|
||||||
property string vine : "\uf1ca"
|
|
||||||
property string vk : "\uf189"
|
|
||||||
property string volumeControlPhone : "\uf2a0"
|
|
||||||
property string volumeDown : "\uf027"
|
|
||||||
property string volumeOff : "\uf026"
|
|
||||||
property string volumeUp : "\uf028"
|
|
||||||
property string warning : "\uf071"
|
|
||||||
property string wechat : "\uf1d7"
|
|
||||||
property string weibo : "\uf18a"
|
|
||||||
property string weixin : "\uf1d7"
|
|
||||||
property string whatsapp : "\uf232"
|
|
||||||
property string wheelchair : "\uf193"
|
|
||||||
property string wheelchairAlt : "\uf29b"
|
|
||||||
property string wifi : "\uf1eb"
|
|
||||||
property string wikipediaW : "\uf266"
|
|
||||||
property string windowClose : "\uf2d3"
|
|
||||||
property string windowCloseO : "\uf2d4"
|
|
||||||
property string windowMaximize : "\uf2d0"
|
|
||||||
property string windowMinimize : "\uf2d1"
|
|
||||||
property string windowRestore : "\uf2d2"
|
|
||||||
property string windows : "\uf17a"
|
|
||||||
property string won : "\uf159"
|
|
||||||
property string wordpress : "\uf19a"
|
|
||||||
property string wpbeginner : "\uf297"
|
|
||||||
property string wpexplorer : "\uf2de"
|
|
||||||
property string wpforms : "\uf298"
|
|
||||||
property string wrench : "\uf0ad"
|
|
||||||
property string xing : "\uf168"
|
|
||||||
property string xingSquare : "\uf169"
|
|
||||||
property string yCombinator : "\uf23b"
|
|
||||||
property string yCombinatorSquare : "\uf1d4"
|
|
||||||
property string yahoo : "\uf19e"
|
|
||||||
property string yc : "\uf23b"
|
|
||||||
property string ycSquare : "\uf1d4"
|
|
||||||
property string yelp : "\uf1e9"
|
|
||||||
property string yen : "\uf157"
|
|
||||||
property string yoast : "\uf2b1"
|
|
||||||
property string youtube : "\uf167"
|
|
||||||
property string youtubePlay : "\uf16a"
|
|
||||||
property string youtubeSquare : "\uf166"
|
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
fonts/FontAwesome/fa-brands-400.otf
Normal file
BIN
fonts/FontAwesome/fa-regular-400.otf
Normal file
BIN
fonts/FontAwesome/fa-solid-900.otf
Normal file
BIN
images/ledgerNanoS.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
images/ledgerNanoX.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
images/open-wallet-from-file-mainnet.png
Normal file
|
After Width: | Height: | Size: 640 B |
BIN
images/open-wallet-from-file-mainnet@2x.png
Normal file
|
After Width: | Height: | Size: 937 B |
BIN
images/open-wallet-from-file-stagenet.png
Normal file
|
After Width: | Height: | Size: 569 B |
BIN
images/open-wallet-from-file-stagenet@2x.png
Normal file
|
After Width: | Height: | Size: 717 B |
BIN
images/open-wallet-from-file-testnet.png
Normal file
|
After Width: | Height: | Size: 608 B |
BIN
images/open-wallet-from-file-testnet@2x.png
Normal file
|
After Width: | Height: | Size: 779 B |
BIN
images/open-wallet-from-file-trezor.png
Normal file
|
After Width: | Height: | Size: 969 B |
BIN
images/open-wallet-from-file-trezor@2x.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
images/open-wallet-from-file-view-only.png
Normal file
|
After Width: | Height: | Size: 958 B |
BIN
images/open-wallet-from-file-view-only@2x.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 742 B After Width: | Height: | Size: 424 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 678 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
BIN
images/trezor.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
images/trezor@2x.png
Normal file
|
After Width: | Height: | Size: 301 KiB |
@@ -61,6 +61,10 @@ function checkSignature(signature) {
|
|||||||
if ((signature.length - 12) % 88 != 0)
|
if ((signature.length - 12) % 88 != 0)
|
||||||
return false;
|
return false;
|
||||||
return check256(signature, signature.length);
|
return check256(signature, signature.length);
|
||||||
|
} else if (signature.indexOf("ReserveProofV") === 0) {
|
||||||
|
if ((signature.length - 14) % 447 != 0)
|
||||||
|
return false;
|
||||||
|
return check256(signature, signature.length);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -73,14 +77,3 @@ function isValidOpenAliasAddress(address) {
|
|||||||
// we can get an awful lot of valid domains, including non ASCII chars... accept anything
|
// we can get an awful lot of valid domains, including non ASCII chars... accept anything
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeQRCodeString(addr, amount) {
|
|
||||||
var XMR_URI_SCHEME = "monero:"
|
|
||||||
var XMR_AMOUNT = "tx_amount"
|
|
||||||
var qrCodeString =""
|
|
||||||
qrCodeString += (XMR_URI_SCHEME + addr)
|
|
||||||
if (amount !== undefined && amount !== ""){
|
|
||||||
qrCodeString += ("?" + XMR_AMOUNT + "=" + amount)
|
|
||||||
}
|
|
||||||
return qrCodeString
|
|
||||||
}
|
|
||||||
|
|||||||
15
js/Utils.js
@@ -115,3 +115,18 @@ function capitalize(s){
|
|||||||
function removeTrailingZeros(value) {
|
function removeTrailingZeros(value) {
|
||||||
return (value + '').replace(/(\.\d*?)0+$/, '$1').replace(/\.$/, '');
|
return (value + '').replace(/(\.\d*?)0+$/, '$1').replace(/\.$/, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function parseDateStringOrRestoreHeightAsInteger(value) {
|
||||||
|
// Parse date string or restore height as integer
|
||||||
|
var restoreHeight = 0;
|
||||||
|
if (value.indexOf('-') === 4 && value.length === 10) {
|
||||||
|
restoreHeight = Wizard.getApproximateBlockchainHeight(value, Utils.netTypeToString());
|
||||||
|
} else if (parseInt(value.substring(0, 4)) >= 2014 && parseInt(value.substring(0, 4)) <= 2025 && value.length === 8) {
|
||||||
|
// Correct date typed in a wrong format (20201225 instead of 2020-12-25)
|
||||||
|
var restoreHeightHyphenated = value.substring(0, 4) + "-" + value.substring(4, 6) + "-" + value.substring(6, 8);
|
||||||
|
restoreHeight = Wizard.getApproximateBlockchainHeight(restoreHeightHyphenated, Utils.netTypeToString());
|
||||||
|
} else {
|
||||||
|
restoreHeight = parseInt(value);
|
||||||
|
}
|
||||||
|
return restoreHeight;
|
||||||
|
}
|
||||||
|
|||||||
11
js/Wizard.js
@@ -82,6 +82,17 @@ function walletPathExists(accountsDir, directory, filename, isIOS, walletManager
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function unusedWalletName(directory, filename, walletManager) {
|
||||||
|
for (var i = 0; i < 100; i++) {
|
||||||
|
var walletName = filename + (i > 0 ? "_" + i : "");
|
||||||
|
if (!walletManager.walletExists(directory + "/" + walletName + "/" + walletName)) {
|
||||||
|
return walletName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return filename;
|
||||||
|
}
|
||||||
|
|
||||||
function isAscii(str){
|
function isAscii(str){
|
||||||
for (var i = 0; i < str.length; i++) {
|
for (var i = 0; i < str.length; i++) {
|
||||||
if (str.charCodeAt(i) > 127)
|
if (str.charCodeAt(i) > 127)
|
||||||
|
|||||||
BIN
lang/flags/el.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
lang/flags/is.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
lang/flags/vi.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
@@ -61,4 +61,9 @@ Lojban
|
|||||||
<!-- <language display_name="کورمانجی" locale="kmr_KMR" wallet_language="English" flag="/lang/flags/ku.png" qs="none"/> -->
|
<!-- <language display_name="کورمانجی" locale="kmr_KMR" wallet_language="English" flag="/lang/flags/ku.png" qs="none"/> -->
|
||||||
<!-- <language display_name="বাংলা" locale="bn_BN" wallet_language="English" flag="/lang/flags/bd.png" qs="none"/> -->
|
<!-- <language display_name="বাংলা" locale="bn_BN" wallet_language="English" flag="/lang/flags/bd.png" qs="none"/> -->
|
||||||
<!-- <language display_name="Gaeilge" locale="ga_GA" wallet_language="English" flag="/lang/flags/irl.png" qs="none"/> -->
|
<!-- <language display_name="Gaeilge" locale="ga_GA" wallet_language="English" flag="/lang/flags/irl.png" qs="none"/> -->
|
||||||
|
<language display_name="Afrikaans" locale="af_AF" wallet_language="English" flag="/lang/flags/za.png" qs="none"/>
|
||||||
|
<language display_name="Ελληνικά" locale="el_GR" wallet_language="English" flag="/lang/flags/el.png" qs="none"/>
|
||||||
|
<language display_name="தமிழ்" locale="ta_IN" wallet_language="English" flag="/lang/flags/in.png" qs="none"/>
|
||||||
|
<language display_name="Tiếng Việt" locale="vi_VN" wallet_language="English" flag="/lang/flags/vi.png" qs="none"/>
|
||||||
|
<language display_name="Íslenska" locale="is_IS" wallet_language="English" flag="/lang/flags/is.png" qs="none"/>
|
||||||
</languages>
|
</languages>
|
||||||
|
|||||||
175
main.qml
@@ -42,6 +42,7 @@ import moneroComponents.WalletManager 1.0
|
|||||||
import moneroComponents.PendingTransaction 1.0
|
import moneroComponents.PendingTransaction 1.0
|
||||||
import moneroComponents.NetworkType 1.0
|
import moneroComponents.NetworkType 1.0
|
||||||
import moneroComponents.Settings 1.0
|
import moneroComponents.Settings 1.0
|
||||||
|
import moneroComponents.P2PoolManager 1.0
|
||||||
|
|
||||||
import "components"
|
import "components"
|
||||||
import "components" as MoneroComponents
|
import "components" as MoneroComponents
|
||||||
@@ -62,6 +63,7 @@ ApplicationWindow {
|
|||||||
minimumHeight: 450
|
minimumHeight: 450
|
||||||
|
|
||||||
property var currentItem
|
property var currentItem
|
||||||
|
property var previousActiveFocusItem
|
||||||
property bool hideBalanceForced: false
|
property bool hideBalanceForced: false
|
||||||
property bool ctrlPressed: false
|
property bool ctrlPressed: false
|
||||||
property alias persistentSettings : persistentSettings
|
property alias persistentSettings : persistentSettings
|
||||||
@@ -92,16 +94,14 @@ ApplicationWindow {
|
|||||||
readonly property string localDaemonAddress : "localhost:" + getDefaultDaemonRpcPort(persistentSettings.nettype)
|
readonly property string localDaemonAddress : "localhost:" + getDefaultDaemonRpcPort(persistentSettings.nettype)
|
||||||
property string currentDaemonAddress;
|
property string currentDaemonAddress;
|
||||||
property int disconnectedEpoch: 0
|
property int disconnectedEpoch: 0
|
||||||
property int estimatedBlockchainSize: 105 // GB
|
property int estimatedBlockchainSize: persistentSettings.pruneBlockchain ? 40 : 105 // GB
|
||||||
property alias viewState: rootItem.state
|
property alias viewState: rootItem.state
|
||||||
property string prevSplashText;
|
property string prevSplashText;
|
||||||
property bool splashDisplayedBeforeButtonRequest;
|
property bool splashDisplayedBeforeButtonRequest;
|
||||||
property int appEpoch: Math.floor((new Date).getTime() / 1000)
|
|
||||||
property bool themeTransition: false
|
property bool themeTransition: false
|
||||||
|
|
||||||
// fiat price conversion
|
// fiat price conversion
|
||||||
property real fiatPriceXMRUSD: 0
|
property real fiatPrice: 0
|
||||||
property real fiatPriceXMREUR: 0
|
|
||||||
property var fiatPriceAPIs: {
|
property var fiatPriceAPIs: {
|
||||||
return {
|
return {
|
||||||
"kraken": {
|
"kraken": {
|
||||||
@@ -132,6 +132,17 @@ ApplicationWindow {
|
|||||||
leftPanel.selectItem(page)
|
leftPanel.selectItem(page)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function lock() {
|
||||||
|
passwordDialog.onRejectedCallback = function() { appWindow.showWizard(); }
|
||||||
|
passwordDialog.onAcceptedCallback = function() {
|
||||||
|
if(walletPassword === passwordDialog.password)
|
||||||
|
passwordDialog.close();
|
||||||
|
else
|
||||||
|
passwordDialog.showError(qsTr("Wrong password") + translationManager.emptyString);
|
||||||
|
}
|
||||||
|
passwordDialog.open(usefulName(persistentSettings.wallet_path));
|
||||||
|
}
|
||||||
|
|
||||||
function sequencePressed(obj, seq) {
|
function sequencePressed(obj, seq) {
|
||||||
if(seq === undefined || !leftPanel.enabled)
|
if(seq === undefined || !leftPanel.enabled)
|
||||||
return
|
return
|
||||||
@@ -140,6 +151,8 @@ ApplicationWindow {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// lock wallet on demand
|
||||||
|
if(seq === "Ctrl+L" && !passwordDialog.visible) lock()
|
||||||
if(seq === "Ctrl+S") middlePanel.state = "Transfer"
|
if(seq === "Ctrl+S") middlePanel.state = "Transfer"
|
||||||
else if(seq === "Ctrl+R") middlePanel.state = "Receive"
|
else if(seq === "Ctrl+R") middlePanel.state = "Receive"
|
||||||
else if(seq === "Ctrl+H") middlePanel.state = "History"
|
else if(seq === "Ctrl+H") middlePanel.state = "History"
|
||||||
@@ -212,6 +225,9 @@ ApplicationWindow {
|
|||||||
if (prevState) {
|
if (prevState) {
|
||||||
appWindow.viewState = prevState;
|
appWindow.viewState = prevState;
|
||||||
}
|
}
|
||||||
|
if (wizard.wizardState == "wizardOpenWallet1") {
|
||||||
|
wizard.wizardStateView.wizardOpenWallet1View.pageRoot.forceActiveFocus();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
passwordDialog.open(usefulName(persistentSettings.wallet_path));
|
passwordDialog.open(usefulName(persistentSettings.wallet_path));
|
||||||
}
|
}
|
||||||
@@ -257,9 +273,6 @@ ApplicationWindow {
|
|||||||
walletPassword,
|
walletPassword,
|
||||||
persistentSettings.nettype,
|
persistentSettings.nettype,
|
||||||
persistentSettings.kdfRounds);
|
persistentSettings.kdfRounds);
|
||||||
|
|
||||||
// Hide titlebar based on persistentSettings.customDecorations
|
|
||||||
titleBar.visible = persistentSettings.customDecorations;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeWallet(callback) {
|
function closeWallet(callback) {
|
||||||
@@ -359,6 +372,7 @@ ApplicationWindow {
|
|||||||
middlePanel.getProofClicked.connect(handleGetProof);
|
middlePanel.getProofClicked.connect(handleGetProof);
|
||||||
middlePanel.checkProofClicked.connect(handleCheckProof);
|
middlePanel.checkProofClicked.connect(handleCheckProof);
|
||||||
|
|
||||||
|
persistentSettings.restore_height = currentWallet.walletCreationHeight;
|
||||||
|
|
||||||
console.log("Recovering from seed: ", persistentSettings.is_recovering)
|
console.log("Recovering from seed: ", persistentSettings.is_recovering)
|
||||||
console.log("restore Height", persistentSettings.restore_height)
|
console.log("restore Height", persistentSettings.restore_height)
|
||||||
@@ -422,8 +436,8 @@ ApplicationWindow {
|
|||||||
leftPanel.balanceString = balance
|
leftPanel.balanceString = balance
|
||||||
leftPanel.balanceUnlockedString = balanceU
|
leftPanel.balanceUnlockedString = balanceU
|
||||||
if (middlePanel.state === "Account") {
|
if (middlePanel.state === "Account") {
|
||||||
middlePanel.accountView.balanceAllText = walletManager.displayAmount(appWindow.currentWallet.balanceAll());
|
middlePanel.accountView.balanceAllText = walletManager.displayAmount(appWindow.currentWallet.balanceAll()) + " XMR";
|
||||||
middlePanel.accountView.unlockedBalanceAllText = walletManager.displayAmount(appWindow.currentWallet.unlockedBalanceAll());
|
middlePanel.accountView.unlockedBalanceAllText = walletManager.displayAmount(appWindow.currentWallet.unlockedBalanceAll()) + " XMR";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -718,6 +732,7 @@ ApplicationWindow {
|
|||||||
if (splash) {
|
if (splash) {
|
||||||
appWindow.showProcessingSplash(qsTr("Waiting for daemon to stop..."));
|
appWindow.showProcessingSplash(qsTr("Waiting for daemon to stop..."));
|
||||||
}
|
}
|
||||||
|
p2poolManager.exit()
|
||||||
daemonManager.stopAsync(persistentSettings.nettype, function(result) {
|
daemonManager.stopAsync(persistentSettings.nettype, function(result) {
|
||||||
daemonStartStopInProgress = 0;
|
daemonStartStopInProgress = 0;
|
||||||
if (splash) {
|
if (splash) {
|
||||||
@@ -730,14 +745,18 @@ ApplicationWindow {
|
|||||||
function onDaemonStarted(){
|
function onDaemonStarted(){
|
||||||
console.log("daemon started");
|
console.log("daemon started");
|
||||||
daemonStartStopInProgress = 0;
|
daemonStartStopInProgress = 0;
|
||||||
currentWallet.connected(true);
|
if (currentWallet) {
|
||||||
// resume refresh
|
currentWallet.connected(true);
|
||||||
currentWallet.startRefresh();
|
// resume refresh
|
||||||
|
currentWallet.startRefresh();
|
||||||
|
}
|
||||||
// resume simplemode connection timer
|
// resume simplemode connection timer
|
||||||
appWindow.disconnectedEpoch = Utils.epoch();
|
appWindow.disconnectedEpoch = Utils.epoch();
|
||||||
}
|
}
|
||||||
function onDaemonStopped(){
|
function onDaemonStopped(){
|
||||||
currentWallet.connected(true);
|
if (currentWallet) {
|
||||||
|
currentWallet.connected(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onDaemonStartFailure(error) {
|
function onDaemonStartFailure(error) {
|
||||||
@@ -981,28 +1000,31 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// called on "getProof"
|
// called on "getProof"
|
||||||
function handleGetProof(txid, address, message) {
|
function handleGetProof(txid, address, message, amount) {
|
||||||
console.log("Getting payment proof: ")
|
if (amount.length > 0) {
|
||||||
console.log("\ttxid: ", txid,
|
var result = currentWallet.getReserveProof(false, currentWallet.currentSubaddressAccount, walletManager.amountFromString(amount), message)
|
||||||
", address: ", address,
|
txProofComputed(null, result)
|
||||||
", message: ", message);
|
} else {
|
||||||
|
console.log("Getting payment proof: ")
|
||||||
function spendProofFallback(txid, result){
|
console.log("\ttxid: ", txid,
|
||||||
if (!result || result.indexOf("error|") === 0) {
|
", address: ", address,
|
||||||
currentWallet.getSpendProofAsync(txid, message, txProofComputed);
|
", message: ", message);
|
||||||
} else {
|
function spendProofFallback(txid, result){
|
||||||
txProofComputed(txid, result);
|
if (!result || result.indexOf("error|") === 0) {
|
||||||
|
currentWallet.getSpendProofAsync(txid, message, txProofComputed);
|
||||||
|
} else {
|
||||||
|
txProofComputed(txid, result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if (address.length > 0)
|
||||||
|
currentWallet.getTxProofAsync(txid, address, message, spendProofFallback);
|
||||||
|
else
|
||||||
|
spendProofFallback(txid, null);
|
||||||
}
|
}
|
||||||
|
informationPopup.open()
|
||||||
if (address.length > 0)
|
|
||||||
currentWallet.getTxProofAsync(txid, address, message, spendProofFallback);
|
|
||||||
else
|
|
||||||
spendProofFallback(txid, null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function txProofComputed(txid, result){
|
function txProofComputed(txid, result){
|
||||||
informationPopup.title = qsTr("Payment proof") + translationManager.emptyString;
|
|
||||||
if (result.indexOf("error|") === 0) {
|
if (result.indexOf("error|") === 0) {
|
||||||
var errorString = result.split("|")[1];
|
var errorString = result.split("|")[1];
|
||||||
informationPopup.text = qsTr("Couldn't generate a proof because of the following reason: \n") + errorString + translationManager.emptyString;
|
informationPopup.text = qsTr("Couldn't generate a proof because of the following reason: \n") + errorString + translationManager.emptyString;
|
||||||
@@ -1011,8 +1033,6 @@ ApplicationWindow {
|
|||||||
informationPopup.text = result;
|
informationPopup.text = result;
|
||||||
informationPopup.icon = StandardIcon.Critical;
|
informationPopup.icon = StandardIcon.Critical;
|
||||||
}
|
}
|
||||||
informationPopup.onCloseCallback = null
|
|
||||||
informationPopup.open()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// called on "checkProof"
|
// called on "checkProof"
|
||||||
@@ -1024,12 +1044,18 @@ ApplicationWindow {
|
|||||||
", signature: ", signature);
|
", signature: ", signature);
|
||||||
|
|
||||||
var result;
|
var result;
|
||||||
if (address.length > 0)
|
var isReserveProof = signature.indexOf("ReserveProofV") === 0;
|
||||||
|
if (address.length > 0 && !isReserveProof) {
|
||||||
result = currentWallet.checkTxProof(txid, address, message, signature);
|
result = currentWallet.checkTxProof(txid, address, message, signature);
|
||||||
else
|
}
|
||||||
|
else if (isReserveProof) {
|
||||||
|
result = currentWallet.checkReserveProof(address, message, signature);
|
||||||
|
}
|
||||||
|
else {
|
||||||
result = currentWallet.checkSpendProof(txid, message, signature);
|
result = currentWallet.checkSpendProof(txid, message, signature);
|
||||||
|
}
|
||||||
var results = result.split("|");
|
var results = result.split("|");
|
||||||
if (address.length > 0 && results.length == 5 && results[0] === "true") {
|
if (address.length > 0 && results.length == 5 && results[0] === "true" && !isReserveProof) {
|
||||||
var good = results[1] === "true";
|
var good = results[1] === "true";
|
||||||
var received = results[2];
|
var received = results[2];
|
||||||
var in_pool = results[3] === "true";
|
var in_pool = results[3] === "true";
|
||||||
@@ -1058,6 +1084,12 @@ ApplicationWindow {
|
|||||||
informationPopup.icon = good ? StandardIcon.Information : StandardIcon.Critical;
|
informationPopup.icon = good ? StandardIcon.Information : StandardIcon.Critical;
|
||||||
informationPopup.text = good ? qsTr("Good signature") : qsTr("Bad signature");
|
informationPopup.text = good ? qsTr("Good signature") : qsTr("Bad signature");
|
||||||
}
|
}
|
||||||
|
else if (isReserveProof && results[0] === "true") {
|
||||||
|
var good = results[1] === "true";
|
||||||
|
informationPopup.title = qsTr("Reserve proof check") + translationManager.emptyString;
|
||||||
|
informationPopup.icon = good ? StandardIcon.Information : StandardIcon.Critical;
|
||||||
|
informationPopup.text = good ? qsTr("Good signature on %1 total and %2 spent.").arg(results[2]).arg(results[3]) : qsTr("Bad signature");
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
informationPopup.title = qsTr("Error") + translationManager.emptyString;
|
informationPopup.title = qsTr("Error") + translationManager.emptyString;
|
||||||
informationPopup.text = currentWallet.errorString;
|
informationPopup.text = currentWallet.errorString;
|
||||||
@@ -1124,13 +1156,10 @@ ApplicationWindow {
|
|||||||
Timer {
|
Timer {
|
||||||
id: fiatPriceTimer
|
id: fiatPriceTimer
|
||||||
interval: 1000 * 60;
|
interval: 1000 * 60;
|
||||||
running: persistentSettings.fiatPriceEnabled;
|
running: persistentSettings.fiatPriceEnabled && currentWallet !== undefined
|
||||||
repeat: true
|
repeat: true
|
||||||
onTriggered: {
|
onTriggered: appWindow.fiatApiRefresh()
|
||||||
if(persistentSettings.fiatPriceEnabled)
|
triggeredOnStart: true
|
||||||
appWindow.fiatApiRefresh();
|
|
||||||
}
|
|
||||||
triggeredOnStart: false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function fiatApiParseTicker(url, resp, currency){
|
function fiatApiParseTicker(url, resp, currency){
|
||||||
@@ -1204,10 +1233,7 @@ ApplicationWindow {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(persistentSettings.fiatPriceCurrency === "xmrusd")
|
appWindow.fiatPrice = ticker;
|
||||||
appWindow.fiatPriceXMRUSD = ticker;
|
|
||||||
else if(persistentSettings.fiatPriceCurrency === "xmreur")
|
|
||||||
appWindow.fiatPriceXMREUR = ticker;
|
|
||||||
|
|
||||||
appWindow.updateBalance();
|
appWindow.updateBalance();
|
||||||
}
|
}
|
||||||
@@ -1246,7 +1272,7 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function fiatApiConvertToFiat(amount) {
|
function fiatApiConvertToFiat(amount) {
|
||||||
var ticker = persistentSettings.fiatPriceCurrency === "xmrusd" ? appWindow.fiatPriceXMRUSD : appWindow.fiatPriceXMREUR;
|
const ticker = appWindow.fiatPrice;
|
||||||
if(ticker <= 0){
|
if(ticker <= 0){
|
||||||
fiatApiError("Invalid ticker value: " + ticker);
|
fiatApiError("Invalid ticker value: " + ticker);
|
||||||
return "?.??";
|
return "?.??";
|
||||||
@@ -1254,6 +1280,15 @@ ApplicationWindow {
|
|||||||
return (amount * ticker).toFixed(2);
|
return (amount * ticker).toFixed(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fiatApiConvertToXMR(amount) {
|
||||||
|
const ticker = appWindow.fiatPrice;
|
||||||
|
if(ticker <= 0){
|
||||||
|
fiatApiError("Invalid ticker value: " + ticker);
|
||||||
|
return "?.??";
|
||||||
|
}
|
||||||
|
return (amount / ticker).toFixed(12);
|
||||||
|
}
|
||||||
|
|
||||||
function fiatApiUpdateBalance(balance){
|
function fiatApiUpdateBalance(balance){
|
||||||
// update balance card
|
// update balance card
|
||||||
var bFiat = "?.??"
|
var bFiat = "?.??"
|
||||||
@@ -1263,14 +1298,6 @@ ApplicationWindow {
|
|||||||
leftPanel.balanceFiatString = bFiat;
|
leftPanel.balanceFiatString = bFiat;
|
||||||
}
|
}
|
||||||
|
|
||||||
function fiatTimerStart(){
|
|
||||||
fiatPriceTimer.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
function fiatTimerStop(){
|
|
||||||
fiatPriceTimer.stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
function fiatApiError(msg){
|
function fiatApiError(msg){
|
||||||
console.log("fiatPriceError: " + msg);
|
console.log("fiatPriceError: " + msg);
|
||||||
}
|
}
|
||||||
@@ -1326,12 +1353,8 @@ ApplicationWindow {
|
|||||||
openWallet("wizard");
|
openWallet("wizard");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(persistentSettings.fiatPriceEnabled){
|
const desktopEntryEnabled = (typeof builtWithDesktopEntry != "undefined") && builtWithDesktopEntry;
|
||||||
appWindow.fiatApiRefresh();
|
if (persistentSettings.askDesktopShortcut && !persistentSettings.portable && desktopEntryEnabled) {
|
||||||
appWindow.fiatTimerStart();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (persistentSettings.askDesktopShortcut && !persistentSettings.portable) {
|
|
||||||
persistentSettings.askDesktopShortcut = false;
|
persistentSettings.askDesktopShortcut = false;
|
||||||
|
|
||||||
if (isTails) {
|
if (isTails) {
|
||||||
@@ -1368,6 +1391,8 @@ ApplicationWindow {
|
|||||||
property string account_name
|
property string account_name
|
||||||
property string wallet_path
|
property string wallet_path
|
||||||
property bool allow_background_mining : false
|
property bool allow_background_mining : false
|
||||||
|
property bool allow_p2pool_mining : false
|
||||||
|
property bool allowRemoteNodeMining : false
|
||||||
property bool miningIgnoreBattery : true
|
property bool miningIgnoreBattery : true
|
||||||
property var nettype: NetworkType.MAINNET
|
property var nettype: NetworkType.MAINNET
|
||||||
property int restore_height : 0
|
property int restore_height : 0
|
||||||
@@ -1376,6 +1401,7 @@ ApplicationWindow {
|
|||||||
property bool is_recovering_from_device : false
|
property bool is_recovering_from_device : false
|
||||||
property bool customDecorations : true
|
property bool customDecorations : true
|
||||||
property string daemonFlags
|
property string daemonFlags
|
||||||
|
property string p2poolFlags
|
||||||
property int logLevel: 0
|
property int logLevel: 0
|
||||||
property string logCategories: ""
|
property string logCategories: ""
|
||||||
property string daemonUsername: "" // TODO: drop after v0.17.2.0 release
|
property string daemonUsername: "" // TODO: drop after v0.17.2.0 release
|
||||||
@@ -1685,6 +1711,9 @@ ApplicationWindow {
|
|||||||
informationPopup.open();
|
informationPopup.open();
|
||||||
}
|
}
|
||||||
onRejectedNewPassword: {}
|
onRejectedNewPassword: {}
|
||||||
|
Keys.enabled: !passwordDialog.visible && informationPopup.visible
|
||||||
|
Keys.onEnterPressed: informationPopup.close()
|
||||||
|
Keys.onReturnPressed: informationPopup.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
DevicePassphraseDialog {
|
DevicePassphraseDialog {
|
||||||
@@ -1892,10 +1921,11 @@ ApplicationWindow {
|
|||||||
TitleBar {
|
TitleBar {
|
||||||
id: titleBar
|
id: titleBar
|
||||||
visible: persistentSettings.customDecorations && middlePanel.state !== "Merchant"
|
visible: persistentSettings.customDecorations && middlePanel.state !== "Merchant"
|
||||||
walletName: persistentSettings.displayWalletNameInTitleBar ? appWindow.walletName : ""
|
walletName: persistentSettings.displayWalletNameInTitleBar && rootItem.state != "wizard" ? appWindow.walletName : ""
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
onCloseClicked: appWindow.close();
|
onCloseClicked: appWindow.close();
|
||||||
|
onLockWalletClicked: appWindow.lock();
|
||||||
onLanguageClicked: appWindow.toggleLanguageView();
|
onLanguageClicked: appWindow.toggleLanguageView();
|
||||||
onCloseWalletClicked: appWindow.showWizard();
|
onCloseWalletClicked: appWindow.showWizard();
|
||||||
onMaximizeClicked: appWindow.visibility = appWindow.visibility !== Window.Maximized ? Window.Maximized : Window.Windowed
|
onMaximizeClicked: appWindow.visibility = appWindow.visibility !== Window.Maximized ? Window.Maximized : Window.Windowed
|
||||||
@@ -1944,6 +1974,7 @@ ApplicationWindow {
|
|||||||
|
|
||||||
function toggleLanguageView(){
|
function toggleLanguageView(){
|
||||||
languageSidebar.visible ? languageSidebar.close() : languageSidebar.open();
|
languageSidebar.visible ? languageSidebar.close() : languageSidebar.open();
|
||||||
|
languageSidebar.selectCurrentLanguage()
|
||||||
resetLanguageFields()
|
resetLanguageFields()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2135,7 +2166,7 @@ ApplicationWindow {
|
|||||||
console.log("close accepted");
|
console.log("close accepted");
|
||||||
// Close wallet non async on exit
|
// Close wallet non async on exit
|
||||||
daemonManager.exit();
|
daemonManager.exit();
|
||||||
|
p2poolManager.exit();
|
||||||
closeWallet(Qt.quit);
|
closeWallet(Qt.quit);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2203,8 +2234,7 @@ ApplicationWindow {
|
|||||||
|
|
||||||
function userActivity() {
|
function userActivity() {
|
||||||
// register user activity
|
// register user activity
|
||||||
var epoch = Math.floor((new Date).getTime()/1000);
|
appWindow.userLastActive = Utils.epoch();
|
||||||
appWindow.userLastActive = epoch;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkInUserActivity() {
|
function checkInUserActivity() {
|
||||||
@@ -2212,24 +2242,32 @@ ApplicationWindow {
|
|||||||
if(!persistentSettings.lockOnUserInActivity) return;
|
if(!persistentSettings.lockOnUserInActivity) return;
|
||||||
if(passwordDialog.visible) return;
|
if(passwordDialog.visible) return;
|
||||||
var inputDialogVisible = inputDialog && inputDialog.visible
|
var inputDialogVisible = inputDialog && inputDialog.visible
|
||||||
|
var successfulTxPopupVisible = successfulTxPopup && successfulTxPopup.visible
|
||||||
|
var informationPopupVisible = informationPopup && informationPopup.visible
|
||||||
|
|
||||||
// prompt password after X seconds of inactivity
|
// prompt password after X seconds of inactivity
|
||||||
var epoch = Math.floor((new Date).getTime() / 1000);
|
var inactivity = Utils.epoch() - appWindow.userLastActive;
|
||||||
var inactivity = epoch - appWindow.userLastActive;
|
|
||||||
if(inactivity < (persistentSettings.lockOnUserInActivityInterval * 60)) return;
|
if(inactivity < (persistentSettings.lockOnUserInActivityInterval * 60)) return;
|
||||||
|
|
||||||
passwordDialog.onAcceptedCallback = function() {
|
passwordDialog.onAcceptedCallback = function() {
|
||||||
if(walletPassword === passwordDialog.password){
|
if(walletPassword === passwordDialog.password){
|
||||||
passwordDialog.close();
|
passwordDialog.close();
|
||||||
|
if (inputDialogVisible) inputDialog.open(inputDialog.inputText)
|
||||||
|
if (successfulTxPopupVisible) successfulTxPopup.open(successfulTxPopup.transactionID)
|
||||||
|
if (informationPopupVisible) informationPopup.open()
|
||||||
} else {
|
} else {
|
||||||
passwordDialog.showError(qsTr("Wrong password"));
|
passwordDialog.showError(qsTr("Wrong password"));
|
||||||
}
|
}
|
||||||
if (inputDialogVisible) inputDialog.open(inputDialog.inputText)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
passwordDialog.onRejectedCallback = function() { appWindow.showWizard(); }
|
passwordDialog.onRejectedCallback = function() { appWindow.showWizard(); }
|
||||||
if (inputDialogVisible) inputDialog.close()
|
if (inputDialogVisible) inputDialog.close()
|
||||||
remoteNodeDialog.close();
|
remoteNodeDialog.close();
|
||||||
|
informationPopup.close()
|
||||||
|
txConfirmationPopup.close()
|
||||||
|
txConfirmationPopup.clearFields()
|
||||||
|
txConfirmationPopup.rejected()
|
||||||
|
successfulTxPopup.close();
|
||||||
passwordDialog.open();
|
passwordDialog.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2246,7 +2284,6 @@ ApplicationWindow {
|
|||||||
|
|
||||||
function changeWalletMode(mode){
|
function changeWalletMode(mode){
|
||||||
appWindow.disconnectedEpoch = 0;
|
appWindow.disconnectedEpoch = 0;
|
||||||
appWindow.walletMode = mode;
|
|
||||||
persistentSettings.walletMode = mode;
|
persistentSettings.walletMode = mode;
|
||||||
applyWalletMode(mode);
|
applyWalletMode(mode);
|
||||||
}
|
}
|
||||||
@@ -2350,6 +2387,8 @@ ApplicationWindow {
|
|||||||
MoneroComponents.LanguageSidebar {
|
MoneroComponents.LanguageSidebar {
|
||||||
id: languageSidebar
|
id: languageSidebar
|
||||||
dragMargin: 0
|
dragMargin: 0
|
||||||
|
onAboutToShow: previousActiveFocusItem = activeFocusItem;
|
||||||
|
onClosed: { if (previousActiveFocusItem) previousActiveFocusItem.forceActiveFocus() }
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.MenuBar { }
|
MoneroComponents.MenuBar { }
|
||||||
|
|||||||
2
monero
@@ -103,6 +103,7 @@ Rectangle {
|
|||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
id: balanceAll
|
id: balanceAll
|
||||||
|
Layout.rightMargin: 87
|
||||||
font.family: MoneroComponents.Style.fontMonoRegular.name;
|
font.family: MoneroComponents.Style.fontMonoRegular.name;
|
||||||
font.pixelSize: 16
|
font.pixelSize: 16
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
@@ -115,7 +116,8 @@ Rectangle {
|
|||||||
onExited: parent.color = MoneroComponents.Style.defaultFontColor
|
onExited: parent.color = MoneroComponents.Style.defaultFontColor
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("Copied to clipboard");
|
console.log("Copied to clipboard");
|
||||||
clipboard.setText(parent.text);
|
var balanceAllNumberOnly = parent.text.slice(0, -4);
|
||||||
|
clipboard.setText(balanceAllNumberOnly);
|
||||||
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
|
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -136,6 +138,7 @@ Rectangle {
|
|||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
id: unlockedBalanceAll
|
id: unlockedBalanceAll
|
||||||
|
Layout.rightMargin: 87
|
||||||
font.family: MoneroComponents.Style.fontMonoRegular.name;
|
font.family: MoneroComponents.Style.fontMonoRegular.name;
|
||||||
font.pixelSize: 16
|
font.pixelSize: 16
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
@@ -148,7 +151,8 @@ Rectangle {
|
|||||||
onExited: parent.color = MoneroComponents.Style.defaultFontColor
|
onExited: parent.color = MoneroComponents.Style.defaultFontColor
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("Copied to clipboard");
|
console.log("Copied to clipboard");
|
||||||
clipboard.setText(parent.text);
|
var unlockedBalanceAllNumberOnly = parent.text.slice(0, -4);
|
||||||
|
clipboard.setText(unlockedBalanceAllNumberOnly);
|
||||||
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
|
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -160,11 +164,48 @@ Rectangle {
|
|||||||
id: addressRow
|
id: addressRow
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
MoneroComponents.LabelSubheader {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
spacing: 0
|
||||||
fontSize: 24
|
|
||||||
textFormat: Text.RichText
|
MoneroComponents.LabelSubheader {
|
||||||
text: qsTr("Accounts") + translationManager.emptyString
|
Layout.fillWidth: true
|
||||||
|
fontSize: 24
|
||||||
|
textFormat: Text.RichText
|
||||||
|
text: qsTr("Accounts") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.StandardButton {
|
||||||
|
id: createNewAccountButton
|
||||||
|
visible: !selectAndSend
|
||||||
|
small: true
|
||||||
|
text: qsTr("Create new account") + translationManager.emptyString
|
||||||
|
fontSize: 13
|
||||||
|
onClicked: {
|
||||||
|
inputDialog.labelText = qsTr("Set the label of the new account:") + translationManager.emptyString
|
||||||
|
inputDialog.onAcceptedCallback = function() {
|
||||||
|
appWindow.currentWallet.subaddressAccount.addRow(inputDialog.inputText)
|
||||||
|
appWindow.currentWallet.switchSubaddressAccount(appWindow.currentWallet.numSubaddressAccounts() - 1)
|
||||||
|
appWindow.onWalletUpdate();
|
||||||
|
}
|
||||||
|
inputDialog.onRejectedCallback = null;
|
||||||
|
inputDialog.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.top: createNewAccountButton.bottom
|
||||||
|
anchors.topMargin: 8
|
||||||
|
anchors.left: createNewAccountButton.left
|
||||||
|
anchors.right: createNewAccountButton.right
|
||||||
|
height: 2
|
||||||
|
color: MoneroComponents.Style.appWindowBorderColor
|
||||||
|
|
||||||
|
MoneroEffects.ColorTransition {
|
||||||
|
targetObj: parent
|
||||||
|
blackColor: MoneroComponents.Style._b_appWindowBorderColor
|
||||||
|
whiteColor: MoneroComponents.Style._w_appWindowBorderColor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
@@ -192,6 +233,15 @@ Rectangle {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
color: itemMouseArea.containsMouse || index === currentAccountIndex ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
|
color: itemMouseArea.containsMouse || index === currentAccountIndex ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
visible: index === currentAccountIndex
|
||||||
|
Layout.fillHeight: true
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
color: "darkgrey"
|
||||||
|
width: 2
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: MoneroComponents.Style.appWindowBorderColor
|
color: MoneroComponents.Style.appWindowBorderColor
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
@@ -241,7 +291,7 @@ Rectangle {
|
|||||||
id: addressLabel
|
id: addressLabel
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: mainLayout.width >= 590 ? balanceTextLabel.left : balanceNumberLabel.left
|
anchors.left: balanceNumberLabel.left
|
||||||
anchors.leftMargin: -addressLabel.width - 30
|
anchors.leftMargin: -addressLabel.width - 30
|
||||||
fontSize: 16
|
fontSize: 16
|
||||||
fontFamily: MoneroComponents.Style.fontMonoRegular.name;
|
fontFamily: MoneroComponents.Style.fontMonoRegular.name;
|
||||||
@@ -249,18 +299,6 @@ Rectangle {
|
|||||||
themeTransition: false
|
themeTransition: false
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.Label {
|
|
||||||
id: balanceTextLabel
|
|
||||||
visible: mainLayout.width >= 590
|
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.left: balanceNumberLabel.left
|
|
||||||
anchors.leftMargin: -balanceTextLabel.width - 5
|
|
||||||
fontSize: 16
|
|
||||||
text: qsTr("Balance: ") + translationManager.emptyString
|
|
||||||
themeTransition: false
|
|
||||||
}
|
|
||||||
|
|
||||||
MoneroComponents.Label {
|
MoneroComponents.Label {
|
||||||
id: balanceNumberLabel
|
id: balanceNumberLabel
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
@@ -269,9 +307,9 @@ Rectangle {
|
|||||||
anchors.leftMargin: -balanceNumberLabel.width
|
anchors.leftMargin: -balanceNumberLabel.width
|
||||||
fontSize: 16
|
fontSize: 16
|
||||||
fontFamily: MoneroComponents.Style.fontMonoRegular.name;
|
fontFamily: MoneroComponents.Style.fontMonoRegular.name;
|
||||||
text: balance
|
text: balance + " XMR"
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
textWidth: mainLayout.width < 660 ? 70 : 135
|
textWidth: 180
|
||||||
themeTransition: false
|
themeTransition: false
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -301,9 +339,11 @@ Rectangle {
|
|||||||
fontAwesomeFallbackIcon: FontAwesome.edit
|
fontAwesomeFallbackIcon: FontAwesome.edit
|
||||||
fontAwesomeFallbackSize: 22
|
fontAwesomeFallbackSize: 22
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
opacity: 0.5
|
opacity: isOpenGL ? 0.5 : 1
|
||||||
|
fontAwesomeFallbackOpacity: 0.5
|
||||||
Layout.preferredWidth: 23
|
Layout.preferredWidth: 23
|
||||||
Layout.preferredHeight: 21
|
Layout.preferredHeight: 21
|
||||||
|
tooltip: qsTr("Edit account label") + translationManager.emptyString
|
||||||
|
|
||||||
onClicked: pageAccount.renameSubaddressAccountLabel(index);
|
onClicked: pageAccount.renameSubaddressAccountLabel(index);
|
||||||
}
|
}
|
||||||
@@ -314,9 +354,11 @@ Rectangle {
|
|||||||
fontAwesomeFallbackIcon: FontAwesome.clipboard
|
fontAwesomeFallbackIcon: FontAwesome.clipboard
|
||||||
fontAwesomeFallbackSize: 22
|
fontAwesomeFallbackSize: 22
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
opacity: 0.5
|
opacity: isOpenGL ? 0.5 : 1
|
||||||
|
fontAwesomeFallbackOpacity: 0.5
|
||||||
Layout.preferredWidth: 16
|
Layout.preferredWidth: 16
|
||||||
Layout.preferredHeight: 21
|
Layout.preferredHeight: 21
|
||||||
|
tooltip: qsTr("Copy address to clipboard") + translationManager.emptyString
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("Address copied to clipboard");
|
console.log("Address copied to clipboard");
|
||||||
@@ -344,30 +386,6 @@ Rectangle {
|
|||||||
whiteColor: MoneroComponents.Style._w_appWindowBorderColor
|
whiteColor: MoneroComponents.Style._w_appWindowBorderColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.CheckBox {
|
|
||||||
id: addNewAccountCheckbox
|
|
||||||
visible: !selectAndSend
|
|
||||||
border: false
|
|
||||||
uncheckedIcon: FontAwesome.plusCircle
|
|
||||||
toggleOnClick: false
|
|
||||||
fontAwesomeIcons: true
|
|
||||||
fontSize: 16
|
|
||||||
iconOnTheLeft: true
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.topMargin: 10
|
|
||||||
text: qsTr("Create new account") + translationManager.emptyString;
|
|
||||||
onClicked: {
|
|
||||||
inputDialog.labelText = qsTr("Set the label of the new account:") + translationManager.emptyString
|
|
||||||
inputDialog.onAcceptedCallback = function() {
|
|
||||||
appWindow.currentWallet.subaddressAccount.addRow(inputDialog.inputText)
|
|
||||||
appWindow.currentWallet.switchSubaddressAccount(appWindow.currentWallet.numSubaddressAccounts() - 1)
|
|
||||||
appWindow.onWalletUpdate();
|
|
||||||
}
|
|
||||||
inputDialog.onRejectedCallback = null;
|
|
||||||
inputDialog.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -378,8 +396,8 @@ Rectangle {
|
|||||||
subaddressAccountListView.model = appWindow.currentWallet.subaddressAccountModel;
|
subaddressAccountListView.model = appWindow.currentWallet.subaddressAccountModel;
|
||||||
appWindow.currentWallet.subaddress.refresh(appWindow.currentWallet.currentSubaddressAccount)
|
appWindow.currentWallet.subaddress.refresh(appWindow.currentWallet.currentSubaddressAccount)
|
||||||
|
|
||||||
balanceAll.text = walletManager.displayAmount(appWindow.currentWallet.balanceAll())
|
balanceAll.text = walletManager.displayAmount(appWindow.currentWallet.balanceAll()) + " XMR"
|
||||||
unlockedBalanceAll.text = walletManager.displayAmount(appWindow.currentWallet.unlockedBalanceAll())
|
unlockedBalanceAll.text = walletManager.displayAmount(appWindow.currentWallet.unlockedBalanceAll()) + " XMR"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,6 +97,8 @@ Rectangle {
|
|||||||
MoneroComponents.StandardButton {
|
MoneroComponents.StandardButton {
|
||||||
id: addFirstEntryButton
|
id: addFirstEntryButton
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
small: true
|
||||||
text: qsTr("Add an address") + translationManager.emptyString
|
text: qsTr("Add an address") + translationManager.emptyString
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.showAddAddress();
|
root.showAddAddress();
|
||||||
@@ -115,6 +117,18 @@ Rectangle {
|
|||||||
text: qsTr("Address book") + translationManager.emptyString
|
text: qsTr("Address book") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MoneroComponents.StandardButton {
|
||||||
|
id: addAddressButton
|
||||||
|
Layout.bottomMargin: 8
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
small: true
|
||||||
|
text: qsTr("Add address") + translationManager.emptyString
|
||||||
|
fontSize: 13
|
||||||
|
onClicked: {
|
||||||
|
root.showAddAddress();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: addressBookListRow
|
id: addressBookListRow
|
||||||
property int addressBookListItemHeight: 50
|
property int addressBookListItemHeight: 50
|
||||||
@@ -134,7 +148,7 @@ Rectangle {
|
|||||||
height: addressBookListRow.addressBookListItemHeight
|
height: addressBookListRow.addressBookListItemHeight
|
||||||
width: parent ? parent.width : undefined
|
width: parent ? parent.width : undefined
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
color: "transparent"
|
color: itemMouseArea.containsMouse ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
|
||||||
|
|
||||||
function doSend() {
|
function doSend() {
|
||||||
console.log("Sending to: ", address +" "+ paymentId);
|
console.log("Sending to: ", address +" "+ paymentId);
|
||||||
@@ -159,7 +173,7 @@ Rectangle {
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.topMargin: 5
|
anchors.topMargin: 5
|
||||||
anchors.rightMargin: 110
|
anchors.rightMargin: 125
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
MoneroComponents.Label {
|
MoneroComponents.Label {
|
||||||
@@ -187,8 +201,10 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
id: itemMouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
hoverEnabled: true
|
||||||
visible: root.selectAndSend
|
visible: root.selectAndSend
|
||||||
onClicked: {
|
onClicked: {
|
||||||
doSend();
|
doSend();
|
||||||
@@ -207,21 +223,42 @@ Rectangle {
|
|||||||
id: sendToButton
|
id: sendToButton
|
||||||
image: "qrc:///images/arrow-right-in-circle-outline-medium-white.svg"
|
image: "qrc:///images/arrow-right-in-circle-outline-medium-white.svg"
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
opacity: 0.5
|
opacity: isOpenGL ? 0.5 : 1
|
||||||
|
fontAwesomeFallbackIcon: FontAwesome.arrowRight
|
||||||
|
fontAwesomeFallbackSize: 22
|
||||||
|
fontAwesomeFallbackOpacity: 0.5
|
||||||
Layout.preferredWidth: 20
|
Layout.preferredWidth: 20
|
||||||
Layout.preferredHeight: 20
|
Layout.preferredHeight: 20
|
||||||
|
tooltip: qsTr("Send to this address") + translationManager.emptyString
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
doSend();
|
doSend();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.IconButton {
|
MoneroComponents.IconButton {
|
||||||
id: renameButton
|
fontAwesomeFallbackIcon: FontAwesome.searchPlus
|
||||||
image: "qrc:///images/edit.svg"
|
fontAwesomeFallbackSize: 22
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
opacity: 0.5
|
fontAwesomeFallbackOpacity: 0.5
|
||||||
Layout.preferredWidth: 23
|
Layout.preferredWidth: 23
|
||||||
Layout.preferredHeight: 21
|
Layout.preferredHeight: 21
|
||||||
|
tooltip: qsTr("See transactions") + translationManager.emptyString
|
||||||
|
|
||||||
|
onClicked: doSearchInHistory(address)
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.IconButton {
|
||||||
|
id: editEntryButton
|
||||||
|
image: "qrc:///images/edit.svg"
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
opacity: isOpenGL ? 0.5 : 1
|
||||||
|
fontAwesomeFallbackIcon: FontAwesome.edit
|
||||||
|
fontAwesomeFallbackSize: 22
|
||||||
|
fontAwesomeFallbackOpacity: 0.5
|
||||||
|
Layout.preferredWidth: 23
|
||||||
|
Layout.preferredHeight: 21
|
||||||
|
tooltip: qsTr("Edit entry") + translationManager.emptyString
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
addressBookListView.currentIndex = index;
|
addressBookListView.currentIndex = index;
|
||||||
@@ -232,10 +269,14 @@ Rectangle {
|
|||||||
MoneroComponents.IconButton {
|
MoneroComponents.IconButton {
|
||||||
id: copyButton
|
id: copyButton
|
||||||
image: "qrc:///images/copy.svg"
|
image: "qrc:///images/copy.svg"
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
opacity: isOpenGL ? 0.5 : 1
|
||||||
|
fontAwesomeFallbackIcon: FontAwesome.clipboard
|
||||||
|
fontAwesomeFallbackSize: 22
|
||||||
|
fontAwesomeFallbackOpacity: 0.5
|
||||||
Layout.preferredWidth: 16
|
Layout.preferredWidth: 16
|
||||||
Layout.preferredHeight: 21
|
Layout.preferredHeight: 21
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
tooltip: qsTr("Copy address to clipboard") + translationManager.emptyString
|
||||||
opacity: 0.5
|
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("Address copied to clipboard");
|
console.log("Address copied to clipboard");
|
||||||
@@ -260,23 +301,6 @@ Rectangle {
|
|||||||
whiteColor: MoneroComponents.Style._w_appWindowBorderColor
|
whiteColor: MoneroComponents.Style._w_appWindowBorderColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.CheckBox {
|
|
||||||
id: addNewEntryCheckbox
|
|
||||||
border: false
|
|
||||||
uncheckedIcon: FontAwesome.plusCircle
|
|
||||||
toggleOnClick: false
|
|
||||||
fontAwesomeIcons: true
|
|
||||||
fontSize: 16
|
|
||||||
iconOnTheLeft: true
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.topMargin: 10
|
|
||||||
text: qsTr("Add address") + translationManager.emptyString;
|
|
||||||
onClicked: {
|
|
||||||
root.showAddAddress();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: addContactLayout
|
id: addContactLayout
|
||||||
@@ -286,26 +310,29 @@ Rectangle {
|
|||||||
MoneroComponents.Label {
|
MoneroComponents.Label {
|
||||||
fontSize: 32
|
fontSize: 32
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text: (root.editEntry ? qsTr("Edit an address") : qsTr("Add an address")) + translationManager.emptyString
|
text: (root.editEntry ? qsTr("Edit entry") : qsTr("Add an address")) + translationManager.emptyString
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.LineEditMulti {
|
MoneroComponents.LineEditMulti {
|
||||||
id: addressLine
|
id: addressLine
|
||||||
|
visible: !root.editEntry
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
|
KeyNavigation.backtab: deleteButton.visible ? deleteButton: cancelButton
|
||||||
|
KeyNavigation.tab: resolveButton.visible ? resolveButton : descriptionLine
|
||||||
labelText: "<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style> %1"
|
labelText: "<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style> %1"
|
||||||
.arg(qsTr("Address")) + translationManager.emptyString
|
.arg(qsTr("Address")) + translationManager.emptyString
|
||||||
placeholderText: {
|
placeholderText: {
|
||||||
if(persistentSettings.nettype == NetworkType.MAINNET){
|
if(persistentSettings.nettype == NetworkType.MAINNET){
|
||||||
return "4.. / 8.. / OpenAlias";
|
return "4.. / 8.. / monero:.. / OpenAlias";
|
||||||
} else if (persistentSettings.nettype == NetworkType.STAGENET){
|
} else if (persistentSettings.nettype == NetworkType.STAGENET){
|
||||||
return "5.. / 7..";
|
return "5.. / 7.. / monero:..";
|
||||||
} else if(persistentSettings.nettype == NetworkType.TESTNET){
|
} else if(persistentSettings.nettype == NetworkType.TESTNET){
|
||||||
return "9.. / B..";
|
return "9.. / B.. / monero:..";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WrapAnywhere
|
||||||
addressValidation: true
|
addressValidation: true
|
||||||
pasteButton: true
|
pasteButton: false
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
const parsed = walletManager.parse_uri_to_object(addressLine.text);
|
const parsed = walletManager.parse_uri_to_object(addressLine.text);
|
||||||
if (!parsed.error) {
|
if (!parsed.error) {
|
||||||
@@ -313,6 +340,31 @@ Rectangle {
|
|||||||
descriptionLine.text = parsed.tx_description;
|
descriptionLine.text = parsed.tx_description;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
onEnterPressed: addButton.enabled ? addButton.clicked() : ""
|
||||||
|
onReturnPressed: addButton.enabled ? addButton.clicked() : ""
|
||||||
|
|
||||||
|
MoneroComponents.InlineButton {
|
||||||
|
fontFamily: FontAwesome.fontFamilySolid
|
||||||
|
fontStyleName: "Solid"
|
||||||
|
fontPixelSize: 18
|
||||||
|
text: FontAwesome.desktop
|
||||||
|
tooltip: qsTr("Grab QR code from screen") + translationManager.emptyString
|
||||||
|
onClicked: {
|
||||||
|
clearFields();
|
||||||
|
const codes = oshelper.grabQrCodesFromScreen();
|
||||||
|
for (var index = 0; index < codes.length; ++index) {
|
||||||
|
const parsed = walletManager.parse_uri_to_object(codes[index]);
|
||||||
|
if (!parsed.error) {
|
||||||
|
addressLine.text = parsed.address
|
||||||
|
descriptionLine.text = parsed.recipient_name
|
||||||
|
break;
|
||||||
|
} else if (walletManager.addressValid(codes[index], appWindow.persistentSettings.nettype)) {
|
||||||
|
addressLine.text = codes[index];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MoneroComponents.InlineButton {
|
MoneroComponents.InlineButton {
|
||||||
buttonColor: MoneroComponents.Style.orange
|
buttonColor: MoneroComponents.Style.orange
|
||||||
@@ -328,6 +380,8 @@ Rectangle {
|
|||||||
|
|
||||||
MoneroComponents.StandardButton {
|
MoneroComponents.StandardButton {
|
||||||
id: resolveButton
|
id: resolveButton
|
||||||
|
KeyNavigation.backtab: addressLine
|
||||||
|
KeyNavigation.tab: descriptionLine
|
||||||
Layout.topMargin: 10
|
Layout.topMargin: 10
|
||||||
text: qsTr("Resolve") + translationManager.emptyString
|
text: qsTr("Resolve") + translationManager.emptyString
|
||||||
visible: TxUtils.isValidOpenAliasAddress(addressLine.text)
|
visible: TxUtils.isValidOpenAliasAddress(addressLine.text)
|
||||||
@@ -365,75 +419,76 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.LineEditMulti {
|
MoneroComponents.LineEdit {
|
||||||
id: descriptionLine
|
id: descriptionLine
|
||||||
|
KeyNavigation.backtab: resolveButton.visible ? resolveButton : addressLine
|
||||||
|
KeyNavigation.tab: addButton.enabled ? addButton : cancelButton
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
|
Layout.fillWidth: true
|
||||||
|
fontSize: 16
|
||||||
|
placeholderFontSize: 16
|
||||||
labelText: "<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style> %1"
|
labelText: "<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style> %1"
|
||||||
.arg(qsTr("Description")) + translationManager.emptyString
|
.arg(qsTr("Description")) + translationManager.emptyString
|
||||||
placeholderText: qsTr("Add a name...") + translationManager.emptyString
|
placeholderText: qsTr("Add a name...") + translationManager.emptyString
|
||||||
|
onAccepted: addButton.enabled ? addButton.clicked() : ""
|
||||||
}
|
}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
|
||||||
|
MoneroComponents.StandardButton {
|
||||||
|
id: cancelButton
|
||||||
|
KeyNavigation.backtab: addButton
|
||||||
|
KeyNavigation.tab: deleteButton.visible ? deleteButton : addressLine
|
||||||
|
small: true
|
||||||
|
text: qsTr("Cancel") + translationManager.emptyString
|
||||||
|
primary: false
|
||||||
|
onClicked: root.showAddressBook();
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.StandardButton {
|
||||||
|
id: deleteButton
|
||||||
|
KeyNavigation.backtab: cancelButton
|
||||||
|
KeyNavigation.tab: addressLine
|
||||||
|
small: true
|
||||||
|
visible: root.editEntry
|
||||||
|
text: qsTr("Delete") + translationManager.emptyString
|
||||||
|
primary: false
|
||||||
|
onClicked: {
|
||||||
|
currentWallet.addressBook.deleteRow(addressBookListView.currentIndex);
|
||||||
|
root.showAddressBook();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MoneroComponents.StandardButton {
|
MoneroComponents.StandardButton {
|
||||||
id: addButton
|
id: addButton
|
||||||
|
KeyNavigation.backtab: descriptionLine
|
||||||
|
KeyNavigation.tab: cancelButton
|
||||||
|
small: true
|
||||||
text: (root.editEntry ? qsTr("Save") : qsTr("Add")) + translationManager.emptyString
|
text: (root.editEntry ? qsTr("Save") : qsTr("Add")) + translationManager.emptyString
|
||||||
enabled: root.checkInformation(addressLine.text, appWindow.persistentSettings.nettype)
|
enabled: root.checkInformation(addressLine.text, appWindow.persistentSettings.nettype)
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("Add")
|
if (!root.editEntry) {
|
||||||
if (!currentWallet.addressBook.addRow(addressLine.text.trim(),"", descriptionLine.text)) {
|
if (currentWallet.addressBook.addRow(addressLine.text.trim(),"", descriptionLine.text)) {
|
||||||
informationPopup.title = qsTr("Error") + translationManager.emptyString;
|
console.log("Entry added")
|
||||||
// TODO: check currentWallet.addressBook.errorString() instead.
|
} else {
|
||||||
if(currentWallet.addressBook.errorCode() === AddressBook.Invalid_Address)
|
informationPopup.title = qsTr("Error") + translationManager.emptyString;
|
||||||
informationPopup.text = qsTr("Invalid address") + translationManager.emptyString
|
// TODO: check currentWallet.addressBook.errorString() instead.
|
||||||
else if(currentWallet.addressBook.errorCode() === AddressBook.Invalid_Payment_Id)
|
if (currentWallet.addressBook.errorCode() === AddressBook.Invalid_Address)
|
||||||
informationPopup.text = currentWallet.addressBook.errorString()
|
informationPopup.text = qsTr("Invalid address") + translationManager.emptyString
|
||||||
else
|
else if (currentWallet.addressBook.errorCode() === AddressBook.Invalid_Payment_Id)
|
||||||
informationPopup.text = qsTr("Can't create entry") + translationManager.emptyString
|
informationPopup.text = currentWallet.addressBook.errorString()
|
||||||
|
else
|
||||||
|
informationPopup.text = qsTr("Can't create entry") + translationManager.emptyString
|
||||||
|
|
||||||
informationPopup.onCloseCallback = null
|
informationPopup.onCloseCallback = null
|
||||||
informationPopup.open();
|
informationPopup.open();
|
||||||
} else {
|
|
||||||
if (root.editEntry) {
|
|
||||||
currentWallet.addressBook.deleteRow(addressBookListView.currentIndex);
|
|
||||||
}
|
}
|
||||||
root.showAddressBook();
|
} else {
|
||||||
}
|
currentWallet.addressBook.setDescription(addressBookListView.currentIndex, descriptionLine.text);
|
||||||
}
|
console.log("Description edited")
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: cancelButton
|
|
||||||
Layout.leftMargin: 20
|
|
||||||
font.pixelSize: 16
|
|
||||||
font.bold: false
|
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
|
||||||
text: qsTr("Cancel") + translationManager.emptyString
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onClicked: root.showAddressBook();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: deleteButton
|
|
||||||
visible: root.editEntry
|
|
||||||
Layout.leftMargin: 20
|
|
||||||
font.pixelSize: 16
|
|
||||||
font.bold: false
|
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
|
||||||
text: qsTr("Delete") + translationManager.emptyString
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onClicked: {
|
|
||||||
currentWallet.addressBook.deleteRow(addressBookListView.currentIndex);
|
|
||||||
root.showAddressBook();
|
|
||||||
}
|
}
|
||||||
|
root.showAddressBook()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -464,6 +519,7 @@ Rectangle {
|
|||||||
addressBookEmptyLayout.visible = false
|
addressBookEmptyLayout.visible = false
|
||||||
addressBookLayout.visible = false;
|
addressBookLayout.visible = false;
|
||||||
addContactLayout.visible = true;
|
addContactLayout.visible = true;
|
||||||
|
addressLine.forceActiveFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
function showEditAddress(address, description) {
|
function showEditAddress(address, description) {
|
||||||
@@ -474,12 +530,14 @@ Rectangle {
|
|||||||
addContactLayout.visible = true;
|
addContactLayout.visible = true;
|
||||||
addressLine.text = address;
|
addressLine.text = address;
|
||||||
descriptionLine.text = description;
|
descriptionLine.text = description;
|
||||||
|
addressLine.forceActiveFocus();
|
||||||
|
addressLine.cursorPosition = addressLine.text.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
||||||
descriptionLine.text = recipient_name + " " + tx_description
|
descriptionLine.text = recipient_name
|
||||||
cameraUi.qrcode_decoded.disconnect(updateFromQrCode)
|
cameraUi.qrcode_decoded.disconnect(updateFromQrCode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ ColumnLayout {
|
|||||||
property alias state: stateView.state
|
property alias state: stateView.state
|
||||||
|
|
||||||
MoneroComponents.Navbar {
|
MoneroComponents.Navbar {
|
||||||
|
id: navbarId
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.topMargin: height
|
Layout.topMargin: height
|
||||||
Layout.bottomMargin: height
|
Layout.bottomMargin: height
|
||||||
@@ -128,7 +129,7 @@ ColumnLayout {
|
|||||||
PropertyAnimation {
|
PropertyAnimation {
|
||||||
target: enterItem
|
target: enterItem
|
||||||
property: "x"
|
property: "x"
|
||||||
from: 0 - target.width
|
from: (navbarId.currentIndex < navbarId.previousIndex ? 1 : -1) * - target.width
|
||||||
to: 0
|
to: 0
|
||||||
duration: 300
|
duration: 300
|
||||||
easing.type: Easing.OutCubic
|
easing.type: Easing.OutCubic
|
||||||
@@ -137,7 +138,7 @@ ColumnLayout {
|
|||||||
target: exitItem
|
target: exitItem
|
||||||
property: "x"
|
property: "x"
|
||||||
from: 0
|
from: 0
|
||||||
to: target.width
|
to: (navbarId.currentIndex < navbarId.previousIndex ? 1 : -1) * target.width
|
||||||
duration: 300
|
duration: 300
|
||||||
easing.type: Easing.OutCubic
|
easing.type: Easing.OutCubic
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,12 +154,15 @@ Rectangle {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
input.topPadding: 6
|
input.topPadding: 6
|
||||||
input.bottomPadding: 6
|
input.bottomPadding: 6
|
||||||
fontSize: 16
|
fontSize: 15
|
||||||
labelFontSize: 14
|
labelFontSize: 14
|
||||||
placeholderText: qsTr("Search by Transaction ID, Address, Description, Amount or Blockheight") + translationManager.emptyString
|
placeholderText: qsTr("Search by Transaction ID, Address, Description, Amount or Blockheight") + translationManager.emptyString
|
||||||
placeholderFontSize: 16
|
placeholderFontSize: 15
|
||||||
inputHeight: 34
|
inputHeight: 34
|
||||||
onTextUpdated: {
|
onTextUpdated: {
|
||||||
|
if (!sortAndFilter.collapsed) {
|
||||||
|
sortAndFilter.collapsed = true;
|
||||||
|
}
|
||||||
if(searchInput.text != null && searchInput.text.length >= 3){
|
if(searchInput.text != null && searchInput.text.length >= 3){
|
||||||
root.sortSearchString = searchInput.text;
|
root.sortSearchString = searchInput.text;
|
||||||
root.reset();
|
root.reset();
|
||||||
@@ -170,6 +173,27 @@ Rectangle {
|
|||||||
root.updateFilter();
|
root.updateFilter();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
color: "transparent"
|
||||||
|
height: cleanButton.height
|
||||||
|
width: cleanButton.width
|
||||||
|
Layout.rightMargin: -8
|
||||||
|
Layout.leftMargin: -2
|
||||||
|
|
||||||
|
MoneroComponents.InlineButton {
|
||||||
|
id: cleanButton
|
||||||
|
buttonColor: "transparent"
|
||||||
|
fontFamily: FontAwesome.fontFamilySolid
|
||||||
|
fontStyleName: "Solid"
|
||||||
|
fontPixelSize: 18
|
||||||
|
text: FontAwesome.times
|
||||||
|
tooltip: qsTr("Clean") + translationManager.emptyString
|
||||||
|
tooltipLeft: true
|
||||||
|
visible: searchInput.text != ""
|
||||||
|
onClicked: searchInput.text = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -958,6 +982,8 @@ Rectangle {
|
|||||||
label.font.family: FontAwesome.fontFamily
|
label.font.family: FontAwesome.fontFamily
|
||||||
fontSize: 18
|
fontSize: 18
|
||||||
width: 34
|
width: 34
|
||||||
|
tooltip: qsTr("Transaction details") + translationManager.emptyString
|
||||||
|
tooltipLeft: true
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
state: "details"
|
state: "details"
|
||||||
@@ -965,8 +991,14 @@ Rectangle {
|
|||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
z: parent.z + 1
|
z: parent.z + 1
|
||||||
|
|
||||||
onEntered: parent.opacity = 0.8;
|
onEntered: {
|
||||||
onExited: parent.opacity = 1.0;
|
parent.opacity = 0.8;
|
||||||
|
parent.tooltipPopup.open()
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
parent.opacity = 1.0;
|
||||||
|
parent.tooltipPopup.close()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -981,6 +1013,7 @@ Rectangle {
|
|||||||
|
|
||||||
MoneroComponents.StandardButton {
|
MoneroComponents.StandardButton {
|
||||||
visible: isout
|
visible: isout
|
||||||
|
enabled: currentWallet ? !currentWallet.isHwBacked() : false
|
||||||
anchors.left: btnDetails.right
|
anchors.left: btnDetails.right
|
||||||
anchors.leftMargin: 10
|
anchors.leftMargin: 10
|
||||||
text: FontAwesome.productHunt
|
text: FontAwesome.productHunt
|
||||||
@@ -988,6 +1021,8 @@ Rectangle {
|
|||||||
label.font.family: FontAwesome.fontFamilyBrands
|
label.font.family: FontAwesome.fontFamilyBrands
|
||||||
fontSize: 18
|
fontSize: 18
|
||||||
width: 34
|
width: 34
|
||||||
|
tooltip: qsTr("Generate payment proof") + translationManager.emptyString
|
||||||
|
tooltipLeft: true
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
state: "proof"
|
state: "proof"
|
||||||
@@ -995,8 +1030,14 @@ Rectangle {
|
|||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
z: parent.z + 1
|
z: parent.z + 1
|
||||||
|
|
||||||
onEntered: parent.opacity = 0.8;
|
onEntered: {
|
||||||
onExited: parent.opacity = 1.0;
|
parent.opacity = 0.8;
|
||||||
|
parent.tooltipPopup.open()
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
parent.opacity = 1.0;
|
||||||
|
parent.tooltipPopup.close()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1232,7 +1273,7 @@ Rectangle {
|
|||||||
if(res[i].state === 'copyable_address') (address ? root.toClipboard(address) : root.toClipboard(addressField.text));
|
if(res[i].state === 'copyable_address') (address ? root.toClipboard(address) : root.toClipboard(addressField.text));
|
||||||
if(res[i].state === 'copyable_receiving_address') root.toClipboard(currentWallet.address(subaddrAccount, subaddrIndex));
|
if(res[i].state === 'copyable_receiving_address') root.toClipboard(currentWallet.address(subaddrAccount, subaddrIndex));
|
||||||
if(res[i].state === 'copyable_txkey') root.getTxKey(hash, res[i]);
|
if(res[i].state === 'copyable_txkey') root.getTxKey(hash, res[i]);
|
||||||
if(res[i].state === 'set_tx_note') root.editDescription(hash, tx_note);
|
if(res[i].state === 'set_tx_note') root.editDescription(hash, tx_note, root.txPage);
|
||||||
if(res[i].state === 'details') root.showTxDetails(hash, paymentId, destinations, subaddrAccount, subaddrIndex, dateTime, displayAmount, isout);
|
if(res[i].state === 'details') root.showTxDetails(hash, paymentId, destinations, subaddrAccount, subaddrIndex, dateTime, displayAmount, isout);
|
||||||
if(res[i].state === 'proof') root.showTxProof(hash, paymentId, destinations, subaddrAccount, subaddrIndex);
|
if(res[i].state === 'proof') root.showTxProof(hash, paymentId, destinations, subaddrAccount, subaddrIndex);
|
||||||
doCollapse = false;
|
doCollapse = false;
|
||||||
@@ -1271,6 +1312,8 @@ Rectangle {
|
|||||||
image: "qrc:///images/whiteDropIndicator.png"
|
image: "qrc:///images/whiteDropIndicator.png"
|
||||||
rotation: delegate.collapsed ? 180 : 0
|
rotation: delegate.collapsed ? 180 : 0
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
fontAwesomeFallbackIcon: FontAwesome.arrowDown
|
||||||
|
fontAwesomeFallbackSize: 14
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1393,7 +1436,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateFilter(){
|
function updateFilter(currentPage){
|
||||||
// applying filters
|
// applying filters
|
||||||
root.txData = JSON.parse(JSON.stringify(root.txModelData)); // deepcopy
|
root.txData = JSON.parse(JSON.stringify(root.txModelData)); // deepcopy
|
||||||
|
|
||||||
@@ -1443,6 +1486,9 @@ Rectangle {
|
|||||||
|
|
||||||
root.updateSort();
|
root.updateSort();
|
||||||
root.updateDisplay(root.txOffset, root.txMax);
|
root.updateDisplay(root.txOffset, root.txMax);
|
||||||
|
if (currentPage) {
|
||||||
|
root.paginationJump(parseInt(currentPage));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateSort(){
|
function updateSort(){
|
||||||
@@ -1581,20 +1627,20 @@ Rectangle {
|
|||||||
root.txCount = root.txData.length;
|
root.txCount = root.txData.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
function update() {
|
function update(currentPage) {
|
||||||
// handle outside mutation of tx model; incoming/outgoing funds or new blocks. Update table.
|
// handle outside mutation of tx model; incoming/outgoing funds or new blocks. Update table.
|
||||||
currentWallet.history.refresh(currentWallet.currentSubaddressAccount);
|
currentWallet.history.refresh(currentWallet.currentSubaddressAccount);
|
||||||
|
|
||||||
root.updateTransactionsFromModel();
|
root.updateTransactionsFromModel();
|
||||||
root.updateFilter();
|
root.updateFilter(currentPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
function editDescription(_hash, _tx_note){
|
function editDescription(_hash, _tx_note, currentPage){
|
||||||
inputDialog.labelText = qsTr("Set description:") + translationManager.emptyString;
|
inputDialog.labelText = qsTr("Set description:") + translationManager.emptyString;
|
||||||
inputDialog.onAcceptedCallback = function() {
|
inputDialog.onAcceptedCallback = function() {
|
||||||
appWindow.currentWallet.setUserNote(_hash, inputDialog.inputText);
|
appWindow.currentWallet.setUserNote(_hash, inputDialog.inputText);
|
||||||
appWindow.showStatusMessage(qsTr("Updated description."),3);
|
appWindow.showStatusMessage(qsTr("Updated description."),3);
|
||||||
root.update();
|
root.update(currentPage);
|
||||||
}
|
}
|
||||||
inputDialog.onRejectedCallback = null;
|
inputDialog.onRejectedCallback = null;
|
||||||
inputDialog.open(_tx_note);
|
inputDialog.open(_tx_note);
|
||||||
@@ -1675,6 +1721,10 @@ Rectangle {
|
|||||||
|
|
||||||
console.log("getProof: Generate clicked: txid " + hash + ", address " + address);
|
console.log("getProof: Generate clicked: txid " + hash + ", address " + address);
|
||||||
middlePanel.getProofClicked(hash, address, '');
|
middlePanel.getProofClicked(hash, address, '');
|
||||||
|
informationPopup.title = qsTr("Payment proof") + translationManager.emptyString;
|
||||||
|
informationPopup.text = qsTr("Generating payment proof") + "..." + translationManager.emptyString;
|
||||||
|
informationPopup.onCloseCallback = null
|
||||||
|
informationPopup.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
function toClipboard(text){
|
function toClipboard(text){
|
||||||
@@ -1746,7 +1796,14 @@ Rectangle {
|
|||||||
root.model = appWindow.currentWallet.historyModel;
|
root.model = appWindow.currentWallet.historyModel;
|
||||||
root.model.sortRole = TransactionHistoryModel.TransactionBlockHeightRole
|
root.model.sortRole = TransactionHistoryModel.TransactionBlockHeightRole
|
||||||
root.model.sort(0, Qt.DescendingOrder);
|
root.model.sort(0, Qt.DescendingOrder);
|
||||||
fromDatePicker.currentDate = model.transactionHistory.firstDateTime
|
var count = root.model.rowCount()
|
||||||
|
if (count > 0) {
|
||||||
|
//date of the first transaction
|
||||||
|
fromDatePicker.currentDate = root.model.data(root.model.index((count - 1), 0), TransactionHistoryModel.TransactionDateRole);
|
||||||
|
} else {
|
||||||
|
//date of monero birth (2014-04-18)
|
||||||
|
fromDatePicker.currentDate = model.transactionHistory.firstDateTime
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
root.reset();
|
root.reset();
|
||||||
@@ -1763,10 +1820,13 @@ Rectangle {
|
|||||||
|
|
||||||
function searchInHistory(searchTerm){
|
function searchInHistory(searchTerm){
|
||||||
searchInput.text = searchTerm;
|
searchInput.text = searchTerm;
|
||||||
|
searchInput.forceActiveFocus();
|
||||||
|
searchInput.cursorPosition = searchInput.text.length;
|
||||||
sortAndFilter.collapsed = true;
|
sortAndFilter.collapsed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearFields() {
|
function clearFields() {
|
||||||
|
sortAndFilter.collapsed = false;
|
||||||
searchInput.text = "";
|
searchInput.text = "";
|
||||||
root.txDataCollapsed = [];
|
root.txDataCollapsed = [];
|
||||||
}
|
}
|
||||||
|
|||||||
456
pages/Mining.qml
@@ -26,17 +26,21 @@
|
|||||||
// 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.
|
||||||
|
|
||||||
|
import QtQml.Models 2.2
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
import "../components" as MoneroComponents
|
import "../components" as MoneroComponents
|
||||||
import moneroComponents.Wallet 1.0
|
import moneroComponents.Wallet 1.0
|
||||||
|
import moneroComponents.P2PoolManager 1.0
|
||||||
|
import moneroComponents.DaemonManager 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
property alias miningHeight: mainLayout.height
|
property alias miningHeight: mainLayout.height
|
||||||
property double currentHashRate: 0
|
property double currentHashRate: 0
|
||||||
|
property int threads: idealThreadCount / 2
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: mainLayout
|
id: mainLayout
|
||||||
@@ -51,13 +55,14 @@ Rectangle {
|
|||||||
MoneroComponents.Label {
|
MoneroComponents.Label {
|
||||||
id: soloTitleLabel
|
id: soloTitleLabel
|
||||||
fontSize: 24
|
fontSize: 24
|
||||||
text: qsTr("Solo mining") + translationManager.emptyString
|
text: qsTr("Mining") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.WarningBox {
|
MoneroComponents.WarningBox {
|
||||||
Layout.bottomMargin: 8
|
Layout.bottomMargin: 8
|
||||||
|
id: localDaemonWarning
|
||||||
text: qsTr("Mining is only available on local daemons.") + translationManager.emptyString
|
text: qsTr("Mining is only available on local daemons.") + translationManager.emptyString
|
||||||
visible: persistentSettings.useRemoteNode
|
visible: persistentSettings.useRemoteNode && !persistentSettings.allowRemoteNodeMining
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.WarningBox {
|
MoneroComponents.WarningBox {
|
||||||
@@ -68,7 +73,7 @@ Rectangle {
|
|||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
id: soloMainLabel
|
id: soloMainLabel
|
||||||
text: qsTr("Mining with your computer helps strengthen the Monero network. The more that people mine, the harder it is for the network to be attacked, and every little bit helps.\n\nMining also gives you a small chance to earn some Monero. Your computer will create hashes looking for block solutions. If you find a block, you will get the associated reward. Good luck!") + translationManager.emptyString
|
text: qsTr("Mining with your computer helps strengthen the Monero network. The more people mine, the harder it is for the network to be attacked, and every little bit helps.\n\nMining also gives you a small chance to earn some Monero. Your computer will create hashes looking for block solutions. If you find a block, you will get the associated reward. Good luck!") + "\n\n" + qsTr("P2Pool mining is a decentralized way to pool mine that pays out more frequently compared to solo mining, while also supporting the network.") + translationManager.emptyString
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
@@ -89,6 +94,43 @@ Rectangle {
|
|||||||
columnSpacing: 20
|
columnSpacing: 20
|
||||||
rowSpacing: 16
|
rowSpacing: 16
|
||||||
|
|
||||||
|
ListModel {
|
||||||
|
id: miningModeModel
|
||||||
|
|
||||||
|
ListElement { column1: qsTr("Solo") ; column2: ""; priority: 0}
|
||||||
|
ListElement { column1: "P2Pool" ; column2: ""; priority: 1}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.alignment : Qt.AlignTop | Qt.AlignLeft
|
||||||
|
|
||||||
|
MoneroComponents.Label {
|
||||||
|
id: miningModeLabel
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
text: qsTr("Mining mode") + translationManager.emptyString
|
||||||
|
fontSize: 16
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.topMargin: 5
|
||||||
|
spacing: 10
|
||||||
|
|
||||||
|
MoneroComponents.StandardDropdown {
|
||||||
|
Layout.maximumWidth: 200
|
||||||
|
id: miningModeDropdown
|
||||||
|
visible: true
|
||||||
|
currentIndex: 0
|
||||||
|
dataModel: miningModeModel
|
||||||
|
onChanged: {
|
||||||
|
persistentSettings.allow_p2pool_mining = miningModeDropdown.currentIndex === 1;
|
||||||
|
walletManager.stopMining();
|
||||||
|
p2poolManager.exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.alignment : Qt.AlignTop | Qt.AlignLeft
|
Layout.alignment : Qt.AlignTop | Qt.AlignLeft
|
||||||
@@ -106,30 +148,56 @@ Rectangle {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
spacing: 16
|
spacing: 16
|
||||||
|
|
||||||
MoneroComponents.LineEdit {
|
RowLayout {
|
||||||
id: soloMinerThreadsLine
|
MoneroComponents.StandardButton {
|
||||||
Layout.minimumWidth: 200
|
id: removeThreadButton
|
||||||
text: "1"
|
small: true
|
||||||
validator: IntValidator { bottom: 1; top: idealThreadCount }
|
primary: false
|
||||||
}
|
text: "−"
|
||||||
|
enabled: threads > 1
|
||||||
|
onClicked: threads--
|
||||||
|
}
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
id: numAvailableThreadsText
|
Layout.bottomMargin: 1
|
||||||
text: qsTr("Max # of CPU threads available for mining: ") + idealThreadCount + translationManager.emptyString
|
Layout.minimumWidth: 45
|
||||||
wrapMode: Text.WordWrap
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
text: threads
|
||||||
font.pixelSize: 14
|
horizontalAlignment: Text.AlignHCenter
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
font.pixelSize: 16
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
scrollGestureEnabled: false
|
||||||
|
onWheel: {
|
||||||
|
if (wheel.angleDelta.y > 0 && threads < idealThreadCount) {
|
||||||
|
return threads++
|
||||||
|
} else if (wheel.angleDelta.y < 0 && threads > 1) {
|
||||||
|
return threads--
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.StandardButton {
|
||||||
|
id: addThreadButton
|
||||||
|
small: true
|
||||||
|
primary: false
|
||||||
|
text: "+"
|
||||||
|
enabled: threads < idealThreadCount
|
||||||
|
onClicked: threads++
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
MoneroComponents.StandardButton {
|
MoneroComponents.StandardButton {
|
||||||
id: autoRecommendedThreadsButton
|
id: autoRecommendedThreadsButton
|
||||||
small: true
|
small: true
|
||||||
text: qsTr("Use recommended # of threads") + translationManager.emptyString
|
primary: false
|
||||||
|
text: qsTr("Use half (recommended)") + translationManager.emptyString
|
||||||
enabled: startSoloMinerButton.enabled
|
enabled: startSoloMinerButton.enabled
|
||||||
onClicked: {
|
onClicked: {
|
||||||
soloMinerThreadsLine.text = Math.floor(idealThreadCount / 2);
|
threads = idealThreadCount / 2
|
||||||
appWindow.showStatusMessage(qsTr("Set to use recommended # of threads"),3)
|
appWindow.showStatusMessage(qsTr("Set to use recommended # of threads"),3)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -137,25 +205,16 @@ Rectangle {
|
|||||||
MoneroComponents.StandardButton {
|
MoneroComponents.StandardButton {
|
||||||
id: autoSetMaxThreadsButton
|
id: autoSetMaxThreadsButton
|
||||||
small: true
|
small: true
|
||||||
text: qsTr("Use all threads") + translationManager.emptyString
|
primary: false
|
||||||
|
text: qsTr("Use all threads") + " (" + idealThreadCount + ")" + translationManager.emptyString
|
||||||
enabled: startSoloMinerButton.enabled
|
enabled: startSoloMinerButton.enabled
|
||||||
onClicked: {
|
onClicked: {
|
||||||
soloMinerThreadsLine.text = idealThreadCount
|
threads = idealThreadCount
|
||||||
appWindow.showStatusMessage(qsTr("Set to use all threads") + translationManager.emptyString,3)
|
appWindow.showStatusMessage(qsTr("Set to use all threads") + translationManager.emptyString,3)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
MoneroComponents.CheckBox {
|
|
||||||
id: backgroundMining
|
|
||||||
enabled: startSoloMinerButton.enabled
|
|
||||||
checked: persistentSettings.allow_background_mining
|
|
||||||
onClicked: {persistentSettings.allow_background_mining = checked}
|
|
||||||
text: qsTr("Background mining (experimental)") + translationManager.emptyString
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
// Disable this option until stable
|
// Disable this option until stable
|
||||||
visible: false
|
visible: false
|
||||||
@@ -169,6 +228,37 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
||||||
|
Layout.minimumWidth: 140
|
||||||
|
|
||||||
|
MoneroComponents.Label {
|
||||||
|
id: optionsLabel
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
visible: !persistentSettings.allow_p2pool_mining
|
||||||
|
text: qsTr("Options") + translationManager.emptyString
|
||||||
|
fontSize: 16
|
||||||
|
wrapMode: Text.Wrap
|
||||||
|
Layout.preferredWidth: manageSoloMinerLabel.textWidth
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
spacing: 16
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
MoneroComponents.CheckBox {
|
||||||
|
id: backgroundMining
|
||||||
|
visible: !persistentSettings.allow_p2pool_mining
|
||||||
|
enabled: startSoloMinerButton.enabled && !persistentSettings.allow_p2pool_mining
|
||||||
|
checked: persistentSettings.allow_background_mining
|
||||||
|
onClicked: persistentSettings.allow_background_mining = checked
|
||||||
|
text: qsTr("Background mining (experimental)") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.alignment : Qt.AlignTop | Qt.AlignLeft
|
Layout.alignment : Qt.AlignTop | Qt.AlignLeft
|
||||||
|
|
||||||
@@ -191,18 +281,55 @@ Rectangle {
|
|||||||
visible: true
|
visible: true
|
||||||
id: startSoloMinerButton
|
id: startSoloMinerButton
|
||||||
small: true
|
small: true
|
||||||
|
primary: !stopSoloMinerButton.enabled
|
||||||
text: qsTr("Start mining") + translationManager.emptyString
|
text: qsTr("Start mining") + translationManager.emptyString
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var success = walletManager.startMining(appWindow.currentWallet.address(0, 0), soloMinerThreadsLine.text, persistentSettings.allow_background_mining, persistentSettings.miningIgnoreBattery)
|
var daemonReady = appWindow.daemonSynced && appWindow.daemonRunning && !persistentSettings.useRemoteNode
|
||||||
if (success) {
|
if (persistentSettings.allowRemoteNodeMining) {
|
||||||
update()
|
daemonReady = persistentSettings.useRemoteNode && appWindow.daemonSynced
|
||||||
} else {
|
}
|
||||||
errorPopup.title = qsTr("Error starting mining") + translationManager.emptyString;
|
if (daemonReady) {
|
||||||
errorPopup.text = qsTr("Couldn't start mining.<br>") + translationManager.emptyString
|
var success;
|
||||||
if (persistentSettings.useRemoteNode)
|
if (persistentSettings.allow_p2pool_mining) {
|
||||||
errorPopup.text += qsTr("Mining is only available on local daemons. Run a local daemon to be able to mine.<br>") + translationManager.emptyString
|
if (p2poolManager.isInstalled()) {
|
||||||
errorPopup.icon = StandardIcon.Critical
|
if (persistentSettings.allowRemoteNodeMining) {
|
||||||
errorPopup.open()
|
startP2Pool()
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
daemonManager.stopAsync(persistentSettings.nettype, startP2PoolLocal)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
confirmationDialog.title = qsTr("P2Pool installation") + translationManager.emptyString;
|
||||||
|
confirmationDialog.text = qsTr("P2Pool will be installed at %1. Proceed?").arg(applicationDirectory) + translationManager.emptyString;
|
||||||
|
confirmationDialog.icon = StandardIcon.Question;
|
||||||
|
confirmationDialog.cancelText = qsTr("No") + translationManager.emptyString;
|
||||||
|
confirmationDialog.okText = qsTr("Yes") + translationManager.emptyString;
|
||||||
|
confirmationDialog.onAcceptedCallback = function() {
|
||||||
|
p2poolManager.download();
|
||||||
|
statusMessageText.text = "Downloading P2Pool...";
|
||||||
|
statusMessage.visible = true
|
||||||
|
startSoloMinerButton.enabled = false;
|
||||||
|
stopSoloMinerButton.enabled = false;
|
||||||
|
}
|
||||||
|
confirmationDialog.open();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
success = walletManager.startMining(appWindow.currentWallet.address(0, 0), threads, persistentSettings.allow_background_mining, persistentSettings.miningIgnoreBattery)
|
||||||
|
if (success)
|
||||||
|
{
|
||||||
|
update()
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
miningError(qsTr("Couldn't start mining.<br>") + translationManager.emptyString)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
miningError(qsTr("Couldn't start mining.<br>") + translationManager.emptyString)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -211,9 +338,11 @@ Rectangle {
|
|||||||
visible: true
|
visible: true
|
||||||
id: stopSoloMinerButton
|
id: stopSoloMinerButton
|
||||||
small: true
|
small: true
|
||||||
|
primary: stopSoloMinerButton.enabled
|
||||||
text: qsTr("Stop mining") + translationManager.emptyString
|
text: qsTr("Stop mining") + translationManager.emptyString
|
||||||
onClicked: {
|
onClicked: {
|
||||||
walletManager.stopMining()
|
walletManager.stopMining()
|
||||||
|
p2poolManager.exit()
|
||||||
update()
|
update()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -246,23 +375,161 @@ Rectangle {
|
|||||||
inputPaddingLeft: 0
|
inputPaddingLeft: 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ListModel {
|
||||||
|
id: chainModel
|
||||||
|
|
||||||
|
ListElement { column1: qsTr("Mini") ; column2: ""; priority: 0}
|
||||||
|
ListElement { column1: qsTr("Main") ; column2: ""; priority: 1}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.alignment : Qt.AlignTop | Qt.AlignLeft
|
||||||
|
|
||||||
|
MoneroComponents.Label {
|
||||||
|
id: chainLabel
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
visible: persistentSettings.allow_p2pool_mining
|
||||||
|
text: qsTr("Chain") + translationManager.emptyString
|
||||||
|
fontSize: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Tooltip {
|
||||||
|
id: chainsHelpTooltip
|
||||||
|
text: qsTr("Use the mini chain if you have a low hashrate.") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: chainsTooltipArea
|
||||||
|
width: parent.width
|
||||||
|
height: parent.height
|
||||||
|
enabled: persistentSettings.allow_p2pool_mining
|
||||||
|
hoverEnabled: true
|
||||||
|
onEntered: {
|
||||||
|
chainsHelpTooltip.tooltipPopup.open();
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
chainsHelpTooltip.tooltipPopup.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.topMargin: 5
|
||||||
|
spacing: 10
|
||||||
|
|
||||||
|
MoneroComponents.StandardDropdown {
|
||||||
|
Layout.maximumWidth: 200
|
||||||
|
id: chainDropdown
|
||||||
|
visible: persistentSettings.allow_p2pool_mining
|
||||||
|
currentIndex: 0
|
||||||
|
dataModel: chainModel
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.alignment : Qt.AlignTop | Qt.AlignLeft
|
||||||
|
|
||||||
|
MoneroComponents.Label {
|
||||||
|
id: flagsLabel
|
||||||
|
visible: persistentSettings.allow_p2pool_mining
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
text: qsTr("Flags") + translationManager.emptyString
|
||||||
|
fontSize: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Tooltip {
|
||||||
|
id: flagsHelpTooltip
|
||||||
|
text: "
|
||||||
|
Usage:<br>
|
||||||
|
--wallet Wallet address to mine to. Subaddresses and integrated addresses are not supported!<br>
|
||||||
|
--host IP address of your Monero node, default is 127.0.0.1<br>
|
||||||
|
--rpc-port monerod RPC API port number, default is 18081<br>
|
||||||
|
--zmq-port monerod ZMQ pub port number, default is 18083 (same port as in monerod\'s \"--zmq-pub\" command line parameter)<br>
|
||||||
|
--stratum Comma-separated list of IP:port for stratum server to listen on<br>
|
||||||
|
--p2p Comma-separated list of IP:port for p2p server to listen on<br>
|
||||||
|
--addpeers Comma-separated list of IP:port of other p2pool nodes to connect to<br>
|
||||||
|
--light-mode Don't allocate RandomX dataset, saves 2GB of RAM<br>
|
||||||
|
--loglevel Verbosity of the log, integer number between 0 and 6<br>
|
||||||
|
--config Name of the p2pool config file<br>
|
||||||
|
--data-api Path to the p2pool JSON data (use it in tandem with an external web-server)<br>
|
||||||
|
--local-api Enable /local/ path in api path for Stratum Server and built-in miner statistics<br>
|
||||||
|
--stratum-api An alias for --local-api<br>
|
||||||
|
--no-cache Disable p2pool.cache<br>
|
||||||
|
--no-color Disable colors in console output<br>
|
||||||
|
--no-randomx Disable internal RandomX hasher: p2pool will use RPC calls to monerod to check PoW hashes<br>
|
||||||
|
--out-peers N Maximum number of outgoing connections for p2p server (any value between 10 and 1000)<br>
|
||||||
|
--in-peers N Maximum number of incoming connections for p2p server (any value between 10 and 1000)<br>
|
||||||
|
--start-mining N Start built-in miner using N threads (any value between 1 and 64)<br>
|
||||||
|
--help Show this help message
|
||||||
|
"
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: flagsTooltipArea
|
||||||
|
width: parent.width
|
||||||
|
height: parent.height
|
||||||
|
enabled: persistentSettings.allow_p2pool_mining
|
||||||
|
hoverEnabled: true
|
||||||
|
onEntered: {
|
||||||
|
flagsHelpTooltip.tooltipPopup.open();
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
flagsHelpTooltip.tooltipPopup.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
MoneroComponents.LineEditMulti {
|
||||||
|
id: p2poolFlags
|
||||||
|
Layout.minimumWidth: 100
|
||||||
|
Layout.bottomMargin: 20
|
||||||
|
labelFontSize: 14
|
||||||
|
fontSize: 15
|
||||||
|
visible: persistentSettings.allow_p2pool_mining
|
||||||
|
wrapMode: Text.WrapAnywhere
|
||||||
|
labelText: qsTr("P2Pool startup flags") + translationManager.emptyString
|
||||||
|
placeholderText: qsTr("(optional)") + translationManager.emptyString
|
||||||
|
placeholderFontSize: 15
|
||||||
|
text: persistentSettings.p2poolFlags
|
||||||
|
addressValidation: false
|
||||||
|
onEditingFinished: {
|
||||||
|
persistentSettings.allowRemoteNodeMining = p2poolFlags.text.includes("--host");
|
||||||
|
persistentSettings.p2poolFlags = p2poolFlags.text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateStatusText() {
|
function updateStatusText(p2poolHashrate) {
|
||||||
if (appWindow.isMining) {
|
if (appWindow.isMining) {
|
||||||
var userHashRate = walletManager.miningHashRate();
|
if (persistentSettings.allow_p2pool_mining) {
|
||||||
if (userHashRate === 0) {
|
if (p2poolHashrate === 0) {
|
||||||
statusText.text = qsTr("Mining temporarily suspended.") + translationManager.emptyString;
|
statusText.text = qsTr("Starting P2Pool") + translationManager.emptyString;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
statusText.text = qsTr("Mining with P2Pool, at %1 H/s").arg(p2poolHashrate) + translationManager.emptyString;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var blockTime = 120;
|
var userHashRate = walletManager.miningHashRate();
|
||||||
var blocksPerDay = 86400 / blockTime;
|
if (userHashRate === 0) {
|
||||||
var globalHashRate = walletManager.networkDifficulty() / blockTime;
|
statusText.text = qsTr("Mining temporarily suspended.") + translationManager.emptyString;
|
||||||
var probabilityFindNextBlock = userHashRate / globalHashRate;
|
}
|
||||||
var probabilityFindBlockDay = 1 - Math.pow(1 - probabilityFindNextBlock, blocksPerDay);
|
else {
|
||||||
var chanceFindBlockDay = Math.round(1 / probabilityFindBlockDay);
|
var blockTime = 120;
|
||||||
statusText.text = qsTr("Mining at %1 H/s. It gives you a 1 in %2 daily chance of finding a block.").arg(userHashRate).arg(chanceFindBlockDay) + translationManager.emptyString;
|
var blocksPerDay = 86400 / blockTime;
|
||||||
|
var globalHashRate = walletManager.networkDifficulty() / blockTime;
|
||||||
|
var probabilityFindNextBlock = userHashRate / globalHashRate;
|
||||||
|
var probabilityFindBlockDay = 1 - Math.pow(1 - probabilityFindNextBlock, blocksPerDay);
|
||||||
|
var chanceFindBlockDay = Math.round(1 / probabilityFindBlockDay);
|
||||||
|
statusText.text = qsTr("Mining at %1 H/s. It gives you a 1 in %2 daily chance of finding a block.").arg(userHashRate).arg(chanceFindBlockDay) + translationManager.emptyString;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -270,16 +537,35 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onMiningStatus(isMining) {
|
function onMiningStatus(isMining, hashrate) {
|
||||||
var daemonReady = !persistentSettings.useRemoteNode && appWindow.daemonSynced
|
var daemonReady = appWindow.daemonSynced
|
||||||
|
if (!persistentSettings.allowRemoteNodeMining) {
|
||||||
|
var daemonReady = !persistentSettings.useRemoteNode && daemonReady
|
||||||
|
}
|
||||||
appWindow.isMining = isMining;
|
appWindow.isMining = isMining;
|
||||||
updateStatusText()
|
updateStatusText(hashrate)
|
||||||
startSoloMinerButton.enabled = !appWindow.isMining && daemonReady
|
startSoloMinerButton.enabled = !appWindow.isMining && daemonReady
|
||||||
stopSoloMinerButton.enabled = !startSoloMinerButton.enabled && daemonReady
|
stopSoloMinerButton.enabled = !startSoloMinerButton.enabled && daemonReady
|
||||||
}
|
}
|
||||||
|
|
||||||
function update() {
|
function update() {
|
||||||
walletManager.miningStatusAsync();
|
persistentSettings.allow_p2pool_mining = miningModeDropdown.currentIndex === 1;
|
||||||
|
if (persistentSettings.allow_p2pool_mining) {
|
||||||
|
p2poolManager.getStatus();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
walletManager.miningStatusAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function miningError(message) {
|
||||||
|
p2poolManager.exit()
|
||||||
|
errorPopup.title = qsTr("Error starting mining") + translationManager.emptyString;
|
||||||
|
errorPopup.text = message
|
||||||
|
if (persistentSettings.useRemoteNode && !persistentSettings.allowRemoteNodeMining)
|
||||||
|
errorPopup.text += qsTr("Mining is only available on local daemons. Run a local daemon to be able to mine.<br>") + translationManager.emptyString
|
||||||
|
errorPopup.icon = StandardIcon.Critical
|
||||||
|
errorPopup.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.StandardDialog {
|
MoneroComponents.StandardDialog {
|
||||||
@@ -289,21 +575,67 @@ Rectangle {
|
|||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
id: timer
|
id: timer
|
||||||
interval: 2000; running: false; repeat: true
|
interval: 2000
|
||||||
|
running: middlePanel.advancedView.state === "Mining" && middlePanel.state === "Advanced" && currentWallet !== undefined && (!persistentSettings.useRemoteNode || persistentSettings.allowRemoteNodeMining)
|
||||||
|
repeat: true
|
||||||
onTriggered: update()
|
onTriggered: update()
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPageCompleted() {
|
function startP2PoolLocal() {
|
||||||
console.log("Mining page loaded");
|
var noSync = false;
|
||||||
update()
|
var customDaemonArgs = persistentSettings.daemonFlags.toLowerCase();
|
||||||
timer.running = !persistentSettings.useRemoteNode
|
var daemonArgs = "--zmq-pub " + "tcp://127.0.0.1:18083 " + "--disable-dns-checkpoints "
|
||||||
|
if (!customDaemonArgs.includes("--zmq-pub") && !customDaemonArgs.includes("--disable-dns-checkpoints") && !customDaemonArgs.includes("--no-zmq")) {
|
||||||
|
daemonArgs = daemonArgs + customDaemonArgs;
|
||||||
|
}
|
||||||
|
var success = daemonManager.start(daemonArgs, persistentSettings.nettype, persistentSettings.blockchainDataDir, persistentSettings.bootstrapNodeAddress, noSync, persistentSettings.pruneBlockchain)
|
||||||
|
if (success) {
|
||||||
|
startP2Pool()
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
miningError(qsTr("Couldn't start mining.<br>") + translationManager.emptyString)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPageClosed() {
|
function startP2Pool() {
|
||||||
timer.running = false
|
var address = currentWallet.address(0, 0);
|
||||||
|
var chain = "mini"
|
||||||
|
if (chainDropdown.currentIndex === 1) {
|
||||||
|
chain = "main"
|
||||||
|
}
|
||||||
|
var p2poolArgs = persistentSettings.p2poolFlags;
|
||||||
|
var success = p2poolManager.start(p2poolArgs, address, chain, threads);
|
||||||
|
if (success)
|
||||||
|
{
|
||||||
|
update()
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
miningError(qsTr("Couldn't start mining.<br>") + translationManager.emptyString)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function p2poolDownloadFailed() {
|
||||||
|
statusMessage.visible = false
|
||||||
|
errorPopup.title = qsTr("P2Pool Installation Failed") + translationManager.emptyString;
|
||||||
|
errorPopup.text = "P2Pool installation failed."
|
||||||
|
errorPopup.icon = StandardIcon.Critical
|
||||||
|
errorPopup.open()
|
||||||
|
update()
|
||||||
|
}
|
||||||
|
|
||||||
|
function p2poolDownloadSucceeded() {
|
||||||
|
statusMessage.visible = false
|
||||||
|
informationPopup.title = qsTr("P2Pool Installation Succeeded") + translationManager.emptyString;
|
||||||
|
informationPopup.text = qsTr("P2Pool has successfully installed.");
|
||||||
|
informationPopup.icon = StandardIcon.Critical
|
||||||
|
informationPopup.open()
|
||||||
|
update()
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
walletManager.miningStatus.connect(onMiningStatus);
|
walletManager.miningStatus.connect(onMiningStatus);
|
||||||
|
p2poolManager.p2poolStatus.connect(onMiningStatus);
|
||||||
|
p2poolManager.p2poolDownloadFailure.connect(p2poolDownloadFailed);
|
||||||
|
p2poolManager.p2poolDownloadSuccess.connect(p2poolDownloadSucceeded);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ Rectangle {
|
|||||||
color: "transparent"
|
color: "transparent"
|
||||||
property var model
|
property var model
|
||||||
property alias receiveHeight: mainLayout.height
|
property alias receiveHeight: mainLayout.height
|
||||||
|
property var state: "Address"
|
||||||
|
|
||||||
function renameSubaddressLabel(_index){
|
function renameSubaddressLabel(_index){
|
||||||
inputDialog.labelText = qsTr("Set the label of the selected address:") + translationManager.emptyString;
|
inputDialog.labelText = qsTr("Set the label of the selected address:") + translationManager.emptyString;
|
||||||
@@ -60,6 +61,16 @@ Rectangle {
|
|||||||
inputDialog.open(appWindow.currentWallet.getSubaddressLabel(appWindow.currentWallet.currentSubaddressAccount, _index))
|
inputDialog.open(appWindow.currentWallet.getSubaddressLabel(appWindow.currentWallet.currentSubaddressAccount, _index))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function generateQRCodeString() {
|
||||||
|
if (pageReceive.state == "PaymentRequest") {
|
||||||
|
return walletManager.make_uri(appWindow.current_address,
|
||||||
|
walletManager.amountFromString(amountToReceiveXMR.text),
|
||||||
|
txDescriptionInput.text, receiverNameInput.text);
|
||||||
|
} else {
|
||||||
|
return walletManager.make_uri(appWindow.current_address);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Clipboard { id: clipboard }
|
Clipboard { id: clipboard }
|
||||||
|
|
||||||
/* main layout */
|
/* main layout */
|
||||||
@@ -72,17 +83,472 @@ Rectangle {
|
|||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
||||||
spacing: 20
|
spacing: 15
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: selectedAddressDetailsColumn
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
spacing: 0
|
||||||
|
property int qrSize: 220
|
||||||
|
|
||||||
|
MoneroComponents.Navbar {
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.bottomMargin: 10
|
||||||
|
|
||||||
|
MoneroComponents.NavbarItem {
|
||||||
|
active: state == "Address"
|
||||||
|
text: qsTr("Address") + translationManager.emptyString
|
||||||
|
onSelected: state = "Address"
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.NavbarItem {
|
||||||
|
active: state == "PaymentRequest"
|
||||||
|
text: qsTr("Payment request") + translationManager.emptyString
|
||||||
|
onSelected: {
|
||||||
|
state = "PaymentRequest";
|
||||||
|
qrCodeTextMouseArea.hoverEnabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: qrContainer
|
||||||
|
color: MoneroComponents.Style.blackTheme ? "white" : "transparent"
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.maximumWidth: parent.qrSize
|
||||||
|
Layout.preferredHeight: width
|
||||||
|
radius: 4
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: qrCode
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.margins: 1
|
||||||
|
smooth: false
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
source: "image://qrcode/" + generateQRCodeString();
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||||
|
onEntered: qrCodeTooltip.tooltipPopup.open()
|
||||||
|
onExited: qrCodeTooltip.tooltipPopup.close()
|
||||||
|
onClicked: {
|
||||||
|
if (mouse.button == Qt.LeftButton){
|
||||||
|
walletManager.saveQrCodeToClipboard(generateQRCodeString());
|
||||||
|
appWindow.showStatusMessage(qsTr("QR code copied to clipboard") + translationManager.emptyString, 3);
|
||||||
|
} else if (mouse.button == Qt.RightButton){
|
||||||
|
qrMenu.x = this.mouseX;
|
||||||
|
qrMenu.y = this.mouseY;
|
||||||
|
qrMenu.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Menu {
|
||||||
|
id: qrMenu
|
||||||
|
title: "QrCode"
|
||||||
|
currentIndex: menuItem1.hovered ? 0 : menuItem2.hovered ? 1 : -1
|
||||||
|
|
||||||
|
MenuItem {
|
||||||
|
id: menuItem1
|
||||||
|
text: qsTr("Copy to clipboard") + translationManager.emptyString;
|
||||||
|
onTriggered: walletManager.saveQrCodeToClipboard(generateQRCodeString())
|
||||||
|
}
|
||||||
|
|
||||||
|
MenuItem {
|
||||||
|
id: menuItem2
|
||||||
|
text: qsTr("Save as Image") + translationManager.emptyString;
|
||||||
|
onTriggered: qrFileDialog.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Tooltip {
|
||||||
|
id: qrCodeTooltip
|
||||||
|
text: qsTr("Left click: copy QR code to clipboard") + "<br>" + qsTr("Right click: save QR code as image file") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.TextPlain {
|
||||||
|
id: qrCodeText
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.topMargin: 6
|
||||||
|
Layout.maximumWidth: 285
|
||||||
|
Layout.minimumHeight: 75
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
visible: paymentRequestGridLayout.visible
|
||||||
|
font.pixelSize: 12
|
||||||
|
color: qrCodeTextMouseArea.containsMouse ? MoneroComponents.Style.orange : MoneroComponents.Style.defaultFontColor
|
||||||
|
text: generateQRCodeString();
|
||||||
|
wrapMode: Text.WrapAnywhere
|
||||||
|
tooltip: qsTr("Copy payment request to clipboard") + translationManager.emptyString
|
||||||
|
themeTransition: false
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: qrCodeTextMouseArea
|
||||||
|
hoverEnabled: false //true when Payment request navbar button is clicked (fix bug displaying tooltip when navbar button is clicked)
|
||||||
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onEntered: parent.tooltipPopup.open()
|
||||||
|
onExited: parent.tooltipPopup.close()
|
||||||
|
onClicked: {
|
||||||
|
clipboard.setText(qrCodeText.text);
|
||||||
|
appWindow.showStatusMessage(qsTr("Payment request copied to clipboard") + translationManager.emptyString, 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GridLayout {
|
||||||
|
id: paymentRequestGridLayout
|
||||||
|
columns: 3
|
||||||
|
rows: 4
|
||||||
|
visible: pageReceive.state == "PaymentRequest"
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.topMargin: 6
|
||||||
|
Layout.preferredWidth: 285
|
||||||
|
Layout.maximumWidth: 285
|
||||||
|
|
||||||
|
MoneroComponents.Label {
|
||||||
|
id: amountTitleFiat
|
||||||
|
Layout.bottomMargin: 3
|
||||||
|
Layout.preferredWidth: 90
|
||||||
|
visible: persistentSettings.fiatPriceEnabled
|
||||||
|
fontSize: 14
|
||||||
|
text: qsTr("Amount") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Input {
|
||||||
|
id: amountToReceiveFiat
|
||||||
|
Layout.preferredWidth: 165
|
||||||
|
Layout.maximumWidth: 165
|
||||||
|
visible: persistentSettings.fiatPriceEnabled
|
||||||
|
topPadding: 5
|
||||||
|
leftPadding: 5
|
||||||
|
font.family: MoneroComponents.Style.fontMonoRegular.name
|
||||||
|
font.pixelSize: 14
|
||||||
|
font.bold: false
|
||||||
|
horizontalAlignment: TextInput.AlignLeft
|
||||||
|
verticalAlignment: TextInput.AlignVCenter
|
||||||
|
selectByMouse: true
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
placeholderText: "0.00"
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
color: MoneroComponents.Style.blackTheme ? "transparent" : "white"
|
||||||
|
radius: 3
|
||||||
|
border.color: parent.activeFocus ? MoneroComponents.Style.inputBorderColorActive : MoneroComponents.Style.inputBorderColorInActive
|
||||||
|
border.width: 1
|
||||||
|
}
|
||||||
|
onTextEdited: {
|
||||||
|
text = text.trim().replace(",", ".");
|
||||||
|
const match = text.match(/^0+(\d.*)/);
|
||||||
|
if (match) {
|
||||||
|
const cursorPosition = cursorPosition;
|
||||||
|
text = match[1];
|
||||||
|
cursorPosition = Math.max(cursorPosition, 1) - 1;
|
||||||
|
} else if(text.indexOf('.') === 0){
|
||||||
|
text = '0' + text;
|
||||||
|
if (text.length > 2) {
|
||||||
|
cursorPosition = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (amountToReceiveFiat.text == "") {
|
||||||
|
amountToReceiveXMR.text = "";
|
||||||
|
} else {
|
||||||
|
amountToReceiveXMR.text = fiatApiConvertToXMR(amountToReceiveFiat.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
validator: RegExpValidator {
|
||||||
|
regExp: /^\s*(\d{1,8})?([\.,]\d{1,2})?\s*$/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Label {
|
||||||
|
Layout.bottomMargin: 3
|
||||||
|
visible: persistentSettings.fiatPriceEnabled
|
||||||
|
fontSize: 14
|
||||||
|
text: appWindow.fiatApiCurrencySymbol();
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Label {
|
||||||
|
id: amountTitleXMR
|
||||||
|
Layout.bottomMargin: 3
|
||||||
|
Layout.preferredWidth: 90
|
||||||
|
fontSize: 14
|
||||||
|
text: persistentSettings.fiatPriceEnabled ? "" : qsTr("Amount") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Input {
|
||||||
|
id: amountToReceiveXMR
|
||||||
|
Layout.preferredWidth: 165
|
||||||
|
Layout.maximumWidth: 165
|
||||||
|
topPadding: 5
|
||||||
|
leftPadding: 5
|
||||||
|
font.family: MoneroComponents.Style.fontMonoRegular.name
|
||||||
|
font.pixelSize: 14
|
||||||
|
font.bold: false
|
||||||
|
horizontalAlignment: TextInput.AlignLeft
|
||||||
|
verticalAlignment: TextInput.AlignVCenter
|
||||||
|
selectByMouse: true
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
placeholderText: "0.000000000000"
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
color: MoneroComponents.Style.blackTheme ? "transparent" : "white"
|
||||||
|
radius: 3
|
||||||
|
border.color: parent.activeFocus ? MoneroComponents.Style.inputBorderColorActive : MoneroComponents.Style.inputBorderColorInActive
|
||||||
|
border.width: 1
|
||||||
|
}
|
||||||
|
onTextEdited: {
|
||||||
|
text = text.trim().replace(",", ".");
|
||||||
|
const match = text.match(/^0+(\d.*)/);
|
||||||
|
if (match) {
|
||||||
|
const cursorPosition = cursorPosition;
|
||||||
|
text = match[1];
|
||||||
|
cursorPosition = Math.max(cursorPosition, 1) - 1;
|
||||||
|
} else if(text.indexOf('.') === 0){
|
||||||
|
text = '0' + text;
|
||||||
|
if (text.length > 2) {
|
||||||
|
cursorPosition = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (amountToReceiveXMR.text == "") {
|
||||||
|
amountToReceiveFiat.text = "";
|
||||||
|
} else {
|
||||||
|
amountToReceiveFiat.text = fiatApiConvertToFiat(amountToReceiveXMR.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
validator: RegExpValidator {
|
||||||
|
regExp: /^\s*(\d{1,8})?([\.,]\d{1,12})?\s*$/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Label {
|
||||||
|
Layout.bottomMargin: 3
|
||||||
|
fontSize: 14
|
||||||
|
text: "XMR"
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Label {
|
||||||
|
id: txDescription
|
||||||
|
Layout.bottomMargin: 3
|
||||||
|
Layout.preferredWidth: 90
|
||||||
|
fontSize: 14
|
||||||
|
text: qsTr("Description") + translationManager.emptyString
|
||||||
|
tooltip: qsTr("What is being payed for (a product, service, donation) (optional)") + translationManager.emptyString
|
||||||
|
tooltipIconVisible: true
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Input {
|
||||||
|
id: txDescriptionInput
|
||||||
|
Layout.preferredWidth: 165
|
||||||
|
Layout.maximumWidth: 165
|
||||||
|
maximumLength: 800
|
||||||
|
topPadding: 7
|
||||||
|
leftPadding: 7
|
||||||
|
font.pixelSize: 14
|
||||||
|
font.bold: false
|
||||||
|
horizontalAlignment: TextInput.AlignLeft
|
||||||
|
verticalAlignment: TextInput.AlignVCenter
|
||||||
|
selectByMouse: true
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
placeholderText: qsTr("Visible to the sender") + translationManager.emptyString
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
color: MoneroComponents.Style.blackTheme ? "transparent" : "white"
|
||||||
|
radius: 3
|
||||||
|
border.color: parent.activeFocus ? MoneroComponents.Style.inputBorderColorActive : MoneroComponents.Style.inputBorderColorInActive
|
||||||
|
border.width: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Label {
|
||||||
|
Layout.bottomMargin: 3
|
||||||
|
fontSize: 14
|
||||||
|
text: ""
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Label {
|
||||||
|
id: receiverNameLabel
|
||||||
|
Layout.bottomMargin: 3
|
||||||
|
Layout.preferredWidth: 90
|
||||||
|
fontSize: 14
|
||||||
|
text: qsTr("Your name") + translationManager.emptyString
|
||||||
|
tooltip: qsTr("Your name, company or website (optional)") + translationManager.emptyString
|
||||||
|
tooltipIconVisible: true
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Input {
|
||||||
|
id: receiverNameInput
|
||||||
|
Layout.preferredWidth: 165
|
||||||
|
Layout.maximumWidth: 165
|
||||||
|
topPadding: 7
|
||||||
|
leftPadding: 7
|
||||||
|
font.pixelSize: 14
|
||||||
|
font.bold: false
|
||||||
|
horizontalAlignment: TextInput.AlignLeft
|
||||||
|
verticalAlignment: TextInput.AlignVCenter
|
||||||
|
selectByMouse: true
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
placeholderText: qsTr("Visible to the sender") + translationManager.emptyString
|
||||||
|
maximumLength: 100
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
color: MoneroComponents.Style.blackTheme ? "transparent" : "white"
|
||||||
|
radius: 3
|
||||||
|
border.color: parent.activeFocus ? MoneroComponents.Style.inputBorderColorActive : MoneroComponents.Style.inputBorderColorInActive
|
||||||
|
border.width: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Label {
|
||||||
|
Layout.bottomMargin: 3
|
||||||
|
fontSize: 14
|
||||||
|
text: ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.TextPlain {
|
||||||
|
id: selectedaddressIndex
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.preferredWidth: 220
|
||||||
|
Layout.maximumWidth: 220
|
||||||
|
Layout.topMargin: 15
|
||||||
|
visible: pageReceive.state == "Address"
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
text: qsTr("Address #") + subaddressListView.currentIndex + translationManager.emptyString
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
|
font.pixelSize: 17
|
||||||
|
textFormat: Text.RichText
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
themeTransition: false
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.TextPlain {
|
||||||
|
id: selectedAddressDrescription
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.preferredWidth: 220
|
||||||
|
Layout.maximumWidth: 220
|
||||||
|
Layout.topMargin: 10
|
||||||
|
visible: pageReceive.state == "Address"
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
text: "(" + qsTr("no label") + ")" + translationManager.emptyString
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
|
font.pixelSize: 17
|
||||||
|
textFormat: Text.RichText
|
||||||
|
color: selectedAddressDrescriptionMouseArea.containsMouse ? MoneroComponents.Style.orange : MoneroComponents.Style.dimmedFontColor
|
||||||
|
themeTransition: false
|
||||||
|
tooltip: subaddressListView.currentIndex > 0 ? qsTr("Edit address label") : "" + translationManager.emptyString
|
||||||
|
MouseArea {
|
||||||
|
id: selectedAddressDrescriptionMouseArea
|
||||||
|
visible: subaddressListView.currentIndex > 0
|
||||||
|
hoverEnabled: true
|
||||||
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onEntered: parent.tooltip ? parent.tooltipPopup.open() : ""
|
||||||
|
onExited: parent.tooltip ? parent.tooltipPopup.close() : ""
|
||||||
|
onClicked: {
|
||||||
|
renameSubaddressLabel(appWindow.current_subaddress_table_index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.TextPlain {
|
||||||
|
id: selectedAddress
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.maximumWidth: 300
|
||||||
|
Layout.topMargin: 11
|
||||||
|
visible: pageReceive.state == "Address"
|
||||||
|
text: appWindow.current_address ? appWindow.current_address : ""
|
||||||
|
horizontalAlignment: TextInput.AlignHCenter
|
||||||
|
wrapMode: Text.Wrap
|
||||||
|
textFormat: Text.RichText
|
||||||
|
color: selectedAddressMouseArea.containsMouse ? MoneroComponents.Style.orange : MoneroComponents.Style.defaultFontColor
|
||||||
|
font.pixelSize: 15
|
||||||
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
|
themeTransition: false
|
||||||
|
tooltip: qsTr("Copy address to clipboard") + translationManager.emptyString
|
||||||
|
MouseArea {
|
||||||
|
id: selectedAddressMouseArea
|
||||||
|
hoverEnabled: true
|
||||||
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onEntered: parent.tooltip ? parent.tooltipPopup.open() : ""
|
||||||
|
onExited: parent.tooltip ? parent.tooltipPopup.close() : ""
|
||||||
|
onClicked: {
|
||||||
|
clipboard.setText(appWindow.current_address);
|
||||||
|
appWindow.showStatusMessage(qsTr("Address copied to clipboard") + translationManager.emptyString, 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.StandardButton {
|
||||||
|
Layout.preferredWidth: 220
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.topMargin: 18
|
||||||
|
small: true
|
||||||
|
text: qsTr("Show on device") + translationManager.emptyString
|
||||||
|
fontSize: 14
|
||||||
|
visible: appWindow.currentWallet ? appWindow.currentWallet.isHwBacked() : false
|
||||||
|
onClicked: {
|
||||||
|
appWindow.currentWallet.deviceShowAddressAsync(
|
||||||
|
appWindow.currentWallet.currentSubaddressAccount,
|
||||||
|
appWindow.current_subaddress_table_index,
|
||||||
|
'');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: addressRow
|
id: addressRow
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
MoneroComponents.LabelSubheader {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
spacing: 0
|
||||||
fontSize: 24
|
|
||||||
textFormat: Text.RichText
|
MoneroComponents.LabelSubheader {
|
||||||
text: qsTr("Addresses") + translationManager.emptyString
|
Layout.fillWidth: true
|
||||||
|
fontSize: 24
|
||||||
|
textFormat: Text.RichText
|
||||||
|
text: qsTr("Addresses") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.StandardButton {
|
||||||
|
id: createAddressButton
|
||||||
|
small: true
|
||||||
|
text: qsTr("Create new address") + translationManager.emptyString
|
||||||
|
fontSize: 13
|
||||||
|
onClicked: {
|
||||||
|
inputDialog.labelText = qsTr("Set the label of the new address:") + translationManager.emptyString
|
||||||
|
inputDialog.onAcceptedCallback = function() {
|
||||||
|
appWindow.currentWallet.subaddress.addRow(appWindow.currentWallet.currentSubaddressAccount, inputDialog.inputText)
|
||||||
|
current_subaddress_table_index = appWindow.currentWallet.numSubaddresses(appWindow.currentWallet.currentSubaddressAccount) - 1
|
||||||
|
subaddressListView.currentIndex = current_subaddress_table_index
|
||||||
|
}
|
||||||
|
inputDialog.onRejectedCallback = null;
|
||||||
|
inputDialog.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.top: createAddressButton.bottom
|
||||||
|
anchors.topMargin: 8
|
||||||
|
anchors.left: createAddressButton.left
|
||||||
|
anchors.right: createAddressButton.right
|
||||||
|
height: 2
|
||||||
|
color: MoneroComponents.Style.appWindowBorderColor
|
||||||
|
|
||||||
|
MoneroEffects.ColorTransition {
|
||||||
|
targetObj: parent
|
||||||
|
blackColor: MoneroComponents.Style._b_appWindowBorderColor
|
||||||
|
whiteColor: MoneroComponents.Style._w_appWindowBorderColor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
@@ -109,6 +575,15 @@ Rectangle {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
color: itemMouseArea.containsMouse || index === appWindow.current_subaddress_table_index ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
|
color: itemMouseArea.containsMouse || index === appWindow.current_subaddress_table_index ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
visible: index === appWindow.current_subaddress_table_index
|
||||||
|
Layout.fillHeight: true
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
color: "darkgrey"
|
||||||
|
width: 2
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle{
|
Rectangle{
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
@@ -127,7 +602,7 @@ Rectangle {
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.topMargin: 5
|
anchors.topMargin: 5
|
||||||
anchors.rightMargin: 80
|
anchors.rightMargin: 90
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
MoneroComponents.Label {
|
MoneroComponents.Label {
|
||||||
@@ -182,16 +657,30 @@ Rectangle {
|
|||||||
height: 21
|
height: 21
|
||||||
spacing: 10
|
spacing: 10
|
||||||
|
|
||||||
|
MoneroComponents.IconButton {
|
||||||
|
fontAwesomeFallbackIcon: FontAwesome.searchPlus
|
||||||
|
fontAwesomeFallbackSize: 22
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
fontAwesomeFallbackOpacity: 0.5
|
||||||
|
Layout.preferredWidth: 23
|
||||||
|
Layout.preferredHeight: 21
|
||||||
|
tooltip: qsTr("See transactions") + translationManager.emptyString
|
||||||
|
|
||||||
|
onClicked: doSearchInHistory(address)
|
||||||
|
}
|
||||||
|
|
||||||
MoneroComponents.IconButton {
|
MoneroComponents.IconButton {
|
||||||
id: renameButton
|
id: renameButton
|
||||||
image: "qrc:///images/edit.svg"
|
image: "qrc:///images/edit.svg"
|
||||||
fontAwesomeFallbackIcon: FontAwesome.edit
|
fontAwesomeFallbackIcon: FontAwesome.edit
|
||||||
fontAwesomeFallbackSize: 22
|
fontAwesomeFallbackSize: 22
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
opacity: 0.5
|
opacity: isOpenGL ? 0.5 : 1
|
||||||
|
fontAwesomeFallbackOpacity: 0.5
|
||||||
Layout.preferredWidth: 23
|
Layout.preferredWidth: 23
|
||||||
Layout.preferredHeight: 21
|
Layout.preferredHeight: 21
|
||||||
visible: index !== 0
|
visible: index !== 0
|
||||||
|
tooltip: qsTr("Edit address label") + translationManager.emptyString
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
renameSubaddressLabel(index);
|
renameSubaddressLabel(index);
|
||||||
@@ -204,9 +693,11 @@ Rectangle {
|
|||||||
fontAwesomeFallbackIcon: FontAwesome.clipboard
|
fontAwesomeFallbackIcon: FontAwesome.clipboard
|
||||||
fontAwesomeFallbackSize: 22
|
fontAwesomeFallbackSize: 22
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
opacity: 0.5
|
opacity: isOpenGL ? 0.5 : 1
|
||||||
|
fontAwesomeFallbackOpacity: 0.5
|
||||||
Layout.preferredWidth: 16
|
Layout.preferredWidth: 16
|
||||||
Layout.preferredHeight: 21
|
Layout.preferredHeight: 21
|
||||||
|
tooltip: qsTr("Copy address to clipboard") + translationManager.emptyString
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("Address copied to clipboard");
|
console.log("Address copied to clipboard");
|
||||||
@@ -223,6 +714,16 @@ Rectangle {
|
|||||||
appWindow.currentWallet.currentSubaddressAccount,
|
appWindow.currentWallet.currentSubaddressAccount,
|
||||||
subaddressListView.currentIndex
|
subaddressListView.currentIndex
|
||||||
);
|
);
|
||||||
|
if (subaddressListView.currentIndex == 0) {
|
||||||
|
selectedAddressDrescription.text = qsTr("Primary address") + translationManager.emptyString;
|
||||||
|
} else {
|
||||||
|
var selectedAddressLabel = appWindow.currentWallet.getSubaddressLabel(appWindow.currentWallet.currentSubaddressAccount, appWindow.current_subaddress_table_index);
|
||||||
|
if (selectedAddressLabel == "") {
|
||||||
|
selectedAddressDrescription.text = "(" + qsTr("no label") + ")" + translationManager.emptyString
|
||||||
|
} else {
|
||||||
|
selectedAddressDrescription.text = selectedAddressLabel
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -238,84 +739,6 @@ Rectangle {
|
|||||||
whiteColor: MoneroComponents.Style._w_appWindowBorderColor
|
whiteColor: MoneroComponents.Style._w_appWindowBorderColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.CheckBox {
|
|
||||||
id: addNewAddressCheckbox
|
|
||||||
border: false
|
|
||||||
uncheckedIcon: FontAwesome.plusCircle
|
|
||||||
toggleOnClick: false
|
|
||||||
fontAwesomeIcons: true
|
|
||||||
fontSize: 16
|
|
||||||
iconOnTheLeft: true
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.topMargin: 10
|
|
||||||
text: qsTr("Create new address") + translationManager.emptyString;
|
|
||||||
onClicked: {
|
|
||||||
inputDialog.labelText = qsTr("Set the label of the new address:") + translationManager.emptyString
|
|
||||||
inputDialog.onAcceptedCallback = function() {
|
|
||||||
appWindow.currentWallet.subaddress.addRow(appWindow.currentWallet.currentSubaddressAccount, inputDialog.inputText)
|
|
||||||
current_subaddress_table_index = appWindow.currentWallet.numSubaddresses(appWindow.currentWallet.currentSubaddressAccount) - 1
|
|
||||||
subaddressListView.currentIndex = current_subaddress_table_index
|
|
||||||
}
|
|
||||||
inputDialog.onRejectedCallback = null;
|
|
||||||
inputDialog.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
spacing: 11
|
|
||||||
property int qrSize: 220
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: qrContainer
|
|
||||||
color: MoneroComponents.Style.blackTheme ? "white" : "transparent"
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.maximumWidth: parent.qrSize
|
|
||||||
Layout.preferredHeight: width
|
|
||||||
radius: 4
|
|
||||||
|
|
||||||
Image {
|
|
||||||
id: qrCode
|
|
||||||
anchors.fill: parent
|
|
||||||
anchors.margins: 1
|
|
||||||
|
|
||||||
smooth: false
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
source: "image://qrcode/" + TxUtils.makeQRCodeString(appWindow.current_address)
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
acceptedButtons: Qt.RightButton
|
|
||||||
onPressAndHold: qrFileDialog.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MoneroComponents.StandardButton {
|
|
||||||
Layout.preferredWidth: 220
|
|
||||||
small: true
|
|
||||||
text: FontAwesome.save + " %1".arg(qsTr("Save as image")) + translationManager.emptyString
|
|
||||||
label.font.family: FontAwesome.fontFamily
|
|
||||||
fontSize: 13
|
|
||||||
onClicked: qrFileDialog.open()
|
|
||||||
}
|
|
||||||
|
|
||||||
MoneroComponents.StandardButton {
|
|
||||||
Layout.preferredWidth: 220
|
|
||||||
small: true
|
|
||||||
text: FontAwesome.eye + " %1".arg(qsTr("Show on device")) + translationManager.emptyString
|
|
||||||
label.font.family: FontAwesome.fontFamily
|
|
||||||
fontSize: 13
|
|
||||||
visible: appWindow.currentWallet ? appWindow.currentWallet.isHwBacked() : false
|
|
||||||
onClicked: {
|
|
||||||
appWindow.currentWallet.deviceShowAddressAsync(
|
|
||||||
appWindow.currentWallet.currentSubaddressAccount,
|
|
||||||
appWindow.current_subaddress_table_index,
|
|
||||||
'');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageDialog {
|
MessageDialog {
|
||||||
@@ -330,12 +753,14 @@ Rectangle {
|
|||||||
selectExisting: false
|
selectExisting: false
|
||||||
nameFilters: ["Image (*.png)"]
|
nameFilters: ["Image (*.png)"]
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
if(!walletManager.saveQrCode(TxUtils.makeQRCodeString(appWindow.current_address), walletManager.urlToLocalPath(fileUrl))) {
|
if(!walletManager.saveQrCode(generateQRCodeString(), walletManager.urlToLocalPath(fileUrl))) {
|
||||||
console.log("Failed to save QrCode to file " + walletManager.urlToLocalPath(fileUrl) )
|
console.log("Failed to save QrCode to file " + walletManager.urlToLocalPath(fileUrl) )
|
||||||
receivePageDialog.title = qsTr("Save QrCode") + translationManager.emptyString;
|
receivePageDialog.title = qsTr("Save QrCode") + translationManager.emptyString;
|
||||||
receivePageDialog.text = qsTr("Failed to save QrCode to ") + walletManager.urlToLocalPath(fileUrl) + translationManager.emptyString;
|
receivePageDialog.text = qsTr("Failed to save QrCode to ") + walletManager.urlToLocalPath(fileUrl) + translationManager.emptyString;
|
||||||
receivePageDialog.icon = StandardIcon.Error
|
receivePageDialog.icon = StandardIcon.Error
|
||||||
receivePageDialog.open()
|
receivePageDialog.open()
|
||||||
|
} else {
|
||||||
|
appWindow.showStatusMessage(qsTr("QR code saved to ") + walletManager.urlToLocalPath(fileUrl) + translationManager.emptyString, 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -343,16 +768,23 @@ Rectangle {
|
|||||||
|
|
||||||
function onPageCompleted() {
|
function onPageCompleted() {
|
||||||
console.log("Receive page loaded");
|
console.log("Receive page loaded");
|
||||||
|
pageReceive.clearFields();
|
||||||
subaddressListView.model = appWindow.currentWallet.subaddressModel;
|
subaddressListView.model = appWindow.currentWallet.subaddressModel;
|
||||||
|
|
||||||
if (appWindow.currentWallet) {
|
if (appWindow.currentWallet) {
|
||||||
appWindow.current_address = appWindow.currentWallet.address(appWindow.currentWallet.currentSubaddressAccount, 0)
|
appWindow.current_address = appWindow.currentWallet.address(appWindow.currentWallet.currentSubaddressAccount, 0)
|
||||||
appWindow.currentWallet.subaddress.refresh(appWindow.currentWallet.currentSubaddressAccount)
|
appWindow.currentWallet.subaddress.refresh(appWindow.currentWallet.currentSubaddressAccount)
|
||||||
|
if (subaddressListView.currentIndex == -1) {
|
||||||
|
subaddressListView.currentIndex = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearFields() {
|
function clearFields() {
|
||||||
// @TODO: add fields
|
amountToReceiveFiat.text = "";
|
||||||
|
amountToReceiveXMR.text = "";
|
||||||
|
txDescriptionInput.text = "";
|
||||||
|
receiverNameInput.text = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPageClosed() {
|
function onPageClosed() {
|
||||||
|
|||||||
@@ -112,11 +112,8 @@ Rectangle {
|
|||||||
MoneroComponents.LabelSubheader {
|
MoneroComponents.LabelSubheader {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
text: "<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style>" +
|
text: qsTr("Outputs marked as spent") + translationManager.emptyString
|
||||||
qsTr("Outputs marked as spent") + " <a href='#'>" + qsTr("Help") + "</a>" + translationManager.emptyString
|
tooltip: qsTr(
|
||||||
onLinkActivated: {
|
|
||||||
sharedRingDBDialog.title = qsTr("Outputs marked as spent") + translationManager.emptyString;
|
|
||||||
sharedRingDBDialog.text = qsTr(
|
|
||||||
"In order to obscure which inputs in a Monero transaction are being spent, a third party should not be able " +
|
"In order to obscure which inputs in a Monero transaction are being spent, a third party should not be able " +
|
||||||
"to tell which inputs in a ring are already known to be spent. Being able to do so would weaken the protection " +
|
"to tell which inputs in a ring are already known to be spent. Being able to do so would weaken the protection " +
|
||||||
"afforded by ring signatures. If all but one of the inputs are known to be already spent, then the input being " +
|
"afforded by ring signatures. If all but one of the inputs are known to be already spent, then the input being " +
|
||||||
@@ -128,9 +125,6 @@ Rectangle {
|
|||||||
"Alternatively, you can scan the blockchain (and the blockchain of key-reusing Monero clones) yourself " +
|
"Alternatively, you can scan the blockchain (and the blockchain of key-reusing Monero clones) yourself " +
|
||||||
"using the monero-blockchain-mark-spent-outputs tool to create a list of known spent outputs.<br>"
|
"using the monero-blockchain-mark-spent-outputs tool to create a list of known spent outputs.<br>"
|
||||||
) + translationManager.emptyString
|
) + translationManager.emptyString
|
||||||
sharedRingDBDialog.icon = StandardIcon.Information
|
|
||||||
sharedRingDBDialog.open()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
@@ -249,11 +243,8 @@ Rectangle {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 24
|
Layout.topMargin: 24
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
text: "<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style>" +
|
text: qsTr("Rings") + translationManager.emptyString
|
||||||
qsTr("Rings") + " <a href='#'>" + qsTr("Help") + "</a>" + translationManager.emptyString
|
tooltip: qsTr(
|
||||||
onLinkActivated: {
|
|
||||||
sharedRingDBDialog.title = qsTr("Rings") + translationManager.emptyString;
|
|
||||||
sharedRingDBDialog.text = qsTr(
|
|
||||||
"In order to avoid nullifying the protection afforded by Monero's ring signatures, an output should not " +
|
"In order to avoid nullifying the protection afforded by Monero's ring signatures, an output should not " +
|
||||||
"be spent with different rings on different blockchains. While this is normally not a concern, it can become one " +
|
"be spent with different rings on different blockchains. While this is normally not a concern, it can become one " +
|
||||||
"when a key-reusing Monero clone allows you to spend existing outputs. In this case, you need to ensure this " +
|
"when a key-reusing Monero clone allows you to spend existing outputs. In this case, you need to ensure this " +
|
||||||
@@ -266,9 +257,6 @@ Rectangle {
|
|||||||
"If you do not use a key-reusing Monero clone without these safety features, then you do not need to do anything " +
|
"If you do not use a key-reusing Monero clone without these safety features, then you do not need to do anything " +
|
||||||
"as it is all automated.<br>"
|
"as it is all automated.<br>"
|
||||||
) + translationManager.emptyString
|
) + translationManager.emptyString
|
||||||
sharedRingDBDialog.icon = StandardIcon.Information
|
|
||||||
sharedRingDBDialog.open()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ Rectangle {
|
|||||||
|
|
||||||
recipientModel.newRecipient(address, Utils.removeTrailingZeros(amount || ""));
|
recipientModel.newRecipient(address, Utils.removeTrailingZeros(amount || ""));
|
||||||
setPaymentId(payment_id || "");
|
setPaymentId(payment_id || "");
|
||||||
setDescription((recipient_name ? recipient_name + " " : "") + (tx_description || ""));
|
setDescription((recipient_name ? recipient_name + (tx_description ? " (" + tx_description + ")" : "") : (tx_description || "")));
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateFromQrCode(address, payment_id, amount, tx_description, recipient_name) {
|
function updateFromQrCode(address, payment_id, amount, tx_description, recipient_name) {
|
||||||
@@ -265,7 +265,6 @@ Rectangle {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
Layout.leftMargin: 10
|
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
font.pixelSize: 16
|
font.pixelSize: 16
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
@@ -277,6 +276,7 @@ Rectangle {
|
|||||||
fontStyleName: "Solid"
|
fontStyleName: "Solid"
|
||||||
fontPixelSize: 18
|
fontPixelSize: 18
|
||||||
text: FontAwesome.desktop
|
text: FontAwesome.desktop
|
||||||
|
tooltip: qsTr("Grab QR code from screen") + translationManager.emptyString
|
||||||
onClicked: {
|
onClicked: {
|
||||||
clearFields();
|
clearFields();
|
||||||
const codes = oshelper.grabQrCodesFromScreen();
|
const codes = oshelper.grabQrCodesFromScreen();
|
||||||
@@ -285,6 +285,9 @@ Rectangle {
|
|||||||
if (!parsed.error) {
|
if (!parsed.error) {
|
||||||
fillPaymentDetails(parsed.address, parsed.payment_id, parsed.amount, parsed.tx_description, parsed.recipient_name);
|
fillPaymentDetails(parsed.address, parsed.payment_id, parsed.amount, parsed.tx_description, parsed.recipient_name);
|
||||||
break;
|
break;
|
||||||
|
} else if (walletManager.addressValid(codes[index], appWindow.persistentSettings.nettype)) {
|
||||||
|
fillPaymentDetails(codes[index]);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -295,6 +298,7 @@ Rectangle {
|
|||||||
fontStyleName: "Solid"
|
fontStyleName: "Solid"
|
||||||
text: FontAwesome.qrcode
|
text: FontAwesome.qrcode
|
||||||
visible: appWindow.qrScannerEnabled
|
visible: appWindow.qrScannerEnabled
|
||||||
|
tooltip: qsTr("Scan QR code") + translationManager.emptyString
|
||||||
onClicked: {
|
onClicked: {
|
||||||
cameraUi.state = "Capture"
|
cameraUi.state = "Capture"
|
||||||
cameraUi.qrcode_decoded.connect(updateFromQrCode)
|
cameraUi.qrcode_decoded.connect(updateFromQrCode)
|
||||||
@@ -304,6 +308,7 @@ Rectangle {
|
|||||||
MoneroComponents.InlineButton {
|
MoneroComponents.InlineButton {
|
||||||
fontFamily: FontAwesome.fontFamily
|
fontFamily: FontAwesome.fontFamily
|
||||||
text: FontAwesome.addressBook
|
text: FontAwesome.addressBook
|
||||||
|
tooltip: qsTr("Import from address book") + translationManager.emptyString
|
||||||
onClicked: {
|
onClicked: {
|
||||||
middlePanel.addressBookView.selectAndSend = true;
|
middlePanel.addressBookView.selectAndSend = true;
|
||||||
appWindow.showPageRequest("AddressBook");
|
appWindow.showPageRequest("AddressBook");
|
||||||
@@ -315,12 +320,32 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
RowLayout {
|
||||||
Layout.preferredWidth: recipientLayout.secondRowWidth
|
id: amountLabel
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
spacing: 6
|
||||||
font.pixelSize: 16
|
Layout.preferredWidth: 125
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
Layout.maximumWidth: recipientLayout.secondRowWidth
|
||||||
text: qsTr("Amount") + translationManager.emptyString
|
|
||||||
|
MoneroComponents.TextPlain {
|
||||||
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
|
font.pixelSize: 16
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
text: qsTr("Amount") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.InlineButton {
|
||||||
|
fontFamily: FontAwesome.fontFamilySolid
|
||||||
|
fontStyleName: "Solid"
|
||||||
|
fontPixelSize: 16
|
||||||
|
text: FontAwesome.infinity
|
||||||
|
visible: recipientModel.count == 1
|
||||||
|
tooltip: qsTr("Send all unlocked balance of this account") + translationManager.emptyString
|
||||||
|
onClicked: recipientRepeater.itemAt(0).children[1].children[2].text = "(all)";
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
@@ -337,7 +362,9 @@ Rectangle {
|
|||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.rightMargin: recipientLayout.thirdRowWidth
|
Layout.topMargin: -1
|
||||||
|
Layout.leftMargin: 1
|
||||||
|
Layout.rightMargin: recipientLayout.thirdRowWidth + 1
|
||||||
color: MoneroComponents.Style.inputBorderColorInActive
|
color: MoneroComponents.Style.inputBorderColorInActive
|
||||||
height: 1
|
height: 1
|
||||||
visible: index > 0
|
visible: index > 0
|
||||||
@@ -350,12 +377,12 @@ Rectangle {
|
|||||||
KeyNavigation.backtab: index > 0 ? recipientRepeater.itemAt(index - 1).children[1].children[2] : sendButton
|
KeyNavigation.backtab: index > 0 ? recipientRepeater.itemAt(index - 1).children[1].children[2] : sendButton
|
||||||
KeyNavigation.tab: parent.children[2]
|
KeyNavigation.tab: parent.children[2]
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
Layout.topMargin: recipientLayout.rowSpacing / 2
|
Layout.topMargin: index > 0 ? 0 : 1
|
||||||
Layout.bottomMargin: recipientLayout.rowSpacing / 2
|
Layout.bottomMargin: 2
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
addressValidation: true
|
addressValidation: true
|
||||||
borderDisabled: true
|
borderDisabled: true
|
||||||
fontColor: error ? MoneroComponents.Style.errorColor : MoneroComponents.Style.defaultFontColor
|
fontColor: error && text != "" ? MoneroComponents.Style.errorColor : MoneroComponents.Style.defaultFontColor
|
||||||
fontFamily: MoneroComponents.Style.fontMonoRegular.name
|
fontFamily: MoneroComponents.Style.fontMonoRegular.name
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
inputPaddingBottom: 0
|
inputPaddingBottom: 0
|
||||||
@@ -367,17 +394,17 @@ Rectangle {
|
|||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WrapAnywhere
|
||||||
placeholderText: {
|
placeholderText: {
|
||||||
if(persistentSettings.nettype == NetworkType.MAINNET){
|
if(persistentSettings.nettype == NetworkType.MAINNET){
|
||||||
return "4.. / 8.. / OpenAlias";
|
return "4.. / 8.. / monero:.. / OpenAlias";
|
||||||
} else if (persistentSettings.nettype == NetworkType.STAGENET){
|
} else if (persistentSettings.nettype == NetworkType.STAGENET){
|
||||||
return "5.. / 7..";
|
return "5.. / 7.. / monero:..";
|
||||||
} else if(persistentSettings.nettype == NetworkType.TESTNET){
|
} else if(persistentSettings.nettype == NetworkType.TESTNET){
|
||||||
return "9.. / B..";
|
return "9.. / B.. / monero:..";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
const parsed = walletManager.parse_uri_to_object(text);
|
const parsed = walletManager.parse_uri_to_object(text);
|
||||||
if (!parsed.error) {
|
if (!parsed.error) {
|
||||||
fillPaymentDetails(parsed.address, parsed.payment_id, parsed.amount, parsed.tx_description);
|
fillPaymentDetails(parsed.address, parsed.payment_id, parsed.amount, parsed.tx_description, parsed.recipient_name);
|
||||||
}
|
}
|
||||||
address = text;
|
address = text;
|
||||||
}
|
}
|
||||||
@@ -430,6 +457,8 @@ Rectangle {
|
|||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
Layout.topMargin: index > 0 ? 0 : 1
|
||||||
|
Layout.bottomMargin: 1
|
||||||
Layout.leftMargin: recipientLayout.colSpacing / 2 - width
|
Layout.leftMargin: recipientLayout.colSpacing / 2 - width
|
||||||
Layout.rightMargin: recipientLayout.colSpacing / 2
|
Layout.rightMargin: recipientLayout.colSpacing / 2
|
||||||
color: MoneroComponents.Style.inputBorderColorInActive
|
color: MoneroComponents.Style.inputBorderColorInActive
|
||||||
@@ -440,14 +469,18 @@ Rectangle {
|
|||||||
KeyNavigation.backtab: parent.children[0]
|
KeyNavigation.backtab: parent.children[0]
|
||||||
KeyNavigation.tab: index + 1 < recipientRepeater.count ? recipientRepeater.itemAt(index + 1).children[1].children[0] : sendButton
|
KeyNavigation.tab: index + 1 < recipientRepeater.count ? recipientRepeater.itemAt(index + 1).children[1].children[0] : sendButton
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
Layout.topMargin: recipientLayout.rowSpacing / 2
|
Layout.topMargin: index > 0 ? 0 : 1
|
||||||
Layout.bottomMargin: recipientLayout.rowSpacing / 2
|
Layout.bottomMargin: 2
|
||||||
Layout.rightMargin: recipientLayout.colSpacing / 2
|
Layout.rightMargin: recipientLayout.colSpacing / 2
|
||||||
Layout.preferredWidth: 125
|
Layout.preferredWidth: 125
|
||||||
|
Layout.maximumWidth: 125
|
||||||
borderDisabled: true
|
borderDisabled: true
|
||||||
fontFamily: MoneroComponents.Style.fontMonoRegular.name
|
fontFamily: MoneroComponents.Style.fontMonoRegular.name
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
inputPadding: 0
|
inputPaddingLeft: 0
|
||||||
|
inputPaddingRight: 0
|
||||||
|
inputPaddingTop: 0
|
||||||
|
inputPaddingBottom: 0
|
||||||
placeholderFontFamily: MoneroComponents.Style.fontMonoRegular.name
|
placeholderFontFamily: MoneroComponents.Style.fontMonoRegular.name
|
||||||
placeholderFontSize: 14
|
placeholderFontSize: 14
|
||||||
placeholderLeftMargin: 0
|
placeholderLeftMargin: 0
|
||||||
@@ -482,22 +515,30 @@ Rectangle {
|
|||||||
font.styleName: "Solid"
|
font.styleName: "Solid"
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
opacity: mouseArea.containsMouse ? 1 : 0.85
|
opacity: mouseArea.containsMouse ? 1 : 0.85
|
||||||
text: recipientModel.count == 1 ? FontAwesome.infinity : FontAwesome.times
|
text: FontAwesome.times
|
||||||
|
tooltip: qsTr("Remove recipient") + translationManager.emptyString
|
||||||
|
tooltipLeft: true
|
||||||
|
visible: recipientModel.count > 1
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: mouseArea
|
id: mouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onClicked: {
|
onEntered: parent.tooltipPopup.open()
|
||||||
if (recipientModel.count == 1) {
|
onExited: parent.tooltipPopup.close()
|
||||||
parent.parent.children[2].text = "(all)";
|
onClicked: recipientModel.remove(index);
|
||||||
} else {
|
|
||||||
recipientModel.remove(index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MoneroComponents.TextPlain {
|
||||||
|
Layout.leftMargin: recipientLayout.colSpacing / 2
|
||||||
|
Layout.preferredWidth: recipientLayout.thirdRowWidth
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
|
text: "XMR"
|
||||||
|
visible: recipientModel.count == 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -514,6 +555,7 @@ Rectangle {
|
|||||||
Layout.column: 0
|
Layout.column: 0
|
||||||
Layout.row: 0
|
Layout.row: 0
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: recipientModel.count > 1 ? 0 : -1
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
@@ -553,11 +595,16 @@ Rectangle {
|
|||||||
Layout.column: 1
|
Layout.column: 1
|
||||||
Layout.row: 0
|
Layout.row: 0
|
||||||
Layout.preferredWidth: recipientLayout.secondRowWidth
|
Layout.preferredWidth: recipientLayout.secondRowWidth
|
||||||
|
Layout.topMargin: recipientModel.count > 1 ? 0 : -1
|
||||||
|
Layout.maximumWidth: recipientLayout.secondRowWidth
|
||||||
borderDisabled: true
|
borderDisabled: true
|
||||||
fontFamily: MoneroComponents.Style.fontMonoRegular.name
|
fontFamily: MoneroComponents.Style.fontMonoRegular.name
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
inputHeight: 30
|
inputHeight: 30
|
||||||
inputPadding: 0
|
inputPaddingLeft: 0
|
||||||
|
inputPaddingRight: 0
|
||||||
|
inputPaddingTop: 0
|
||||||
|
inputPaddingBottom: 0
|
||||||
readOnly: true
|
readOnly: true
|
||||||
text: Utils.removeTrailingZeros(walletManager.displayAmount(recipientModel.getAmountTotal()))
|
text: Utils.removeTrailingZeros(walletManager.displayAmount(recipientModel.getAmountTotal()))
|
||||||
visible: recipientModel.count > 1
|
visible: recipientModel.count > 1
|
||||||
@@ -567,6 +614,7 @@ Rectangle {
|
|||||||
Layout.column: 2
|
Layout.column: 2
|
||||||
Layout.row: 0
|
Layout.row: 0
|
||||||
Layout.preferredWidth: recipientLayout.thirdRowWidth
|
Layout.preferredWidth: recipientLayout.thirdRowWidth
|
||||||
|
Layout.maximumWidth: recipientLayout.thirdRowWidth
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
text: "XMR"
|
text: "XMR"
|
||||||
@@ -577,11 +625,16 @@ Rectangle {
|
|||||||
Layout.column: 1
|
Layout.column: 1
|
||||||
Layout.row: recipientModel.count > 1 ? 1 : 0
|
Layout.row: recipientModel.count > 1 ? 1 : 0
|
||||||
Layout.preferredWidth: recipientLayout.secondRowWidth
|
Layout.preferredWidth: recipientLayout.secondRowWidth
|
||||||
|
Layout.topMargin: recipientModel.count > 1 ? 0 : -1
|
||||||
|
Layout.maximumWidth: recipientLayout.secondRowWidth
|
||||||
borderDisabled: true
|
borderDisabled: true
|
||||||
fontFamily: MoneroComponents.Style.fontMonoRegular.name
|
fontFamily: MoneroComponents.Style.fontMonoRegular.name
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
inputHeight: 30
|
inputHeight: 30
|
||||||
inputPadding: 0
|
inputPaddingLeft: 0
|
||||||
|
inputPaddingRight: 0
|
||||||
|
inputPaddingTop: 0
|
||||||
|
inputPaddingBottom: 0
|
||||||
opacity: 0.7
|
opacity: 0.7
|
||||||
readOnly: true
|
readOnly: true
|
||||||
text: fiatApiConvertToFiat(walletManager.displayAmount(recipientModel.getAmountTotal()))
|
text: fiatApiConvertToFiat(walletManager.displayAmount(recipientModel.getAmountTotal()))
|
||||||
@@ -592,6 +645,8 @@ Rectangle {
|
|||||||
Layout.column: 2
|
Layout.column: 2
|
||||||
Layout.row: recipientModel.count > 1 ? 1 : 0
|
Layout.row: recipientModel.count > 1 ? 1 : 0
|
||||||
Layout.preferredWidth: recipientLayout.thirdRowWidth
|
Layout.preferredWidth: recipientLayout.thirdRowWidth
|
||||||
|
Layout.topMargin: recipientModel.count > 1 ? 0 : -1
|
||||||
|
Layout.maximumWidth: recipientLayout.thirdRowWidth
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
opacity: 0.7
|
opacity: 0.7
|
||||||
@@ -620,13 +675,6 @@ Rectangle {
|
|||||||
spacing: 0
|
spacing: 0
|
||||||
visible: appWindow.walletMode >= 2
|
visible: appWindow.walletMode >= 2
|
||||||
|
|
||||||
Label {
|
|
||||||
id: transactionPriority
|
|
||||||
Layout.topMargin: 0
|
|
||||||
text: qsTr("Transaction priority") + translationManager.emptyString
|
|
||||||
fontBold: false
|
|
||||||
fontSize: 16
|
|
||||||
}
|
|
||||||
// Note: workaround for translations in listElements
|
// Note: workaround for translations in listElements
|
||||||
// ListElement: cannot use script for property value, so
|
// ListElement: cannot use script for property value, so
|
||||||
// code like this wont work:
|
// code like this wont work:
|
||||||
@@ -650,15 +698,18 @@ Rectangle {
|
|||||||
spacing: 10
|
spacing: 10
|
||||||
|
|
||||||
StandardDropdown {
|
StandardDropdown {
|
||||||
Layout.preferredWidth: 200
|
Layout.maximumWidth: 200
|
||||||
id: priorityDropdown
|
id: priorityDropdown
|
||||||
currentIndex: 0
|
currentIndex: 0
|
||||||
dataModel: priorityModelV5
|
dataModel: priorityModelV5
|
||||||
|
labelText: qsTr("Transaction priority") + translationManager.emptyString
|
||||||
|
labelFontSize: 16
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
id: feeLabel
|
id: feeLabel
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignBottom
|
||||||
|
Layout.bottomMargin: 11
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
font.pixelSize: 14
|
font.pixelSize: 14
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
@@ -742,9 +793,11 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LineEditMulti {
|
LineEdit {
|
||||||
id: descriptionLine
|
id: descriptionLine
|
||||||
placeholderText: qsTr("Saved to local wallet history") + translationManager.emptyString
|
placeholderFontSize: 16
|
||||||
|
fontSize: 16
|
||||||
|
placeholderText: qsTr("Saved to local wallet history") + " (" + qsTr("only visible to you") + ")" + translationManager.emptyString
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
visible: descriptionCheckbox.checked
|
visible: descriptionCheckbox.checked
|
||||||
}
|
}
|
||||||
@@ -802,7 +855,6 @@ Rectangle {
|
|||||||
StandardButton {
|
StandardButton {
|
||||||
id: sendButton
|
id: sendButton
|
||||||
rightIcon: "qrc:///images/rightArrow.png"
|
rightIcon: "qrc:///images/rightArrow.png"
|
||||||
rightIconInactive: "qrc:///images/rightArrowInactive.png"
|
|
||||||
Layout.topMargin: 4
|
Layout.topMargin: 4
|
||||||
text: qsTr("Send") + translationManager.emptyString
|
text: qsTr("Send") + translationManager.emptyString
|
||||||
enabled: !sendButtonWarningBox.visible && !warningContent && !recipientModel.hasEmptyAddress() && !paymentIdWarningBox.visible
|
enabled: !sendButtonWarningBox.visible && !warningContent && !recipientModel.hasEmptyAddress() && !paymentIdWarningBox.visible
|
||||||
@@ -845,6 +897,32 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AdvancedOptionsItem {
|
||||||
|
visible: persistentSettings.transferShowAdvanced && appWindow.walletMode >= 2
|
||||||
|
title: qsTr("Outputs") + translationManager.emptyString
|
||||||
|
button1.text: qsTr("Export") + translationManager.emptyString
|
||||||
|
button1.enabled: appWindow.viewOnly
|
||||||
|
button1.onClicked: {
|
||||||
|
console.log("Transfer: export outputs clicked")
|
||||||
|
exportOutputsDialog.open();
|
||||||
|
}
|
||||||
|
button2.text: qsTr("Import") + translationManager.emptyString
|
||||||
|
button2.enabled: !appWindow.viewOnly
|
||||||
|
button2.onClicked: {
|
||||||
|
console.log("Transfer: import outputs clicked")
|
||||||
|
importOutputsDialog.open();
|
||||||
|
}
|
||||||
|
tooltip: {
|
||||||
|
var header = qsTr("Required for cold wallets to sign their corresponding key images") + translationManager.emptyString;
|
||||||
|
return "<style type='text/css'>.header{ font-size: 13px; } p{line-height:20px; margin-top:0px; margin-bottom:0px; " +
|
||||||
|
";} p.orange{color:#ff9323;}</style>" +
|
||||||
|
"<div class='header'>" + header + "</div>" +
|
||||||
|
"<p>" + qsTr("1. Using view-only wallet, export the outputs into a file") + "</p>" +
|
||||||
|
"<p>" + qsTr("2. Using cold wallet, import the outputs file") + "</p>" +
|
||||||
|
translationManager.emptyString
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
AdvancedOptionsItem {
|
AdvancedOptionsItem {
|
||||||
visible: persistentSettings.transferShowAdvanced && appWindow.walletMode >= 2
|
visible: persistentSettings.transferShowAdvanced && appWindow.walletMode >= 2
|
||||||
title: qsTr("Key images") + translationManager.emptyString
|
title: qsTr("Key images") + translationManager.emptyString
|
||||||
@@ -952,24 +1030,7 @@ Rectangle {
|
|||||||
// deleting transaction object, we don't want memleaks
|
// deleting transaction object, we don't want memleaks
|
||||||
transaction.destroy();
|
transaction.destroy();
|
||||||
} else {
|
} else {
|
||||||
confirmationDialog.text = qsTr("\nNumber of transactions: ") + transaction.txCount
|
confirmationDialog.text = qsTr("\nConfirmation message:\n ") + transaction.confirmationMessage
|
||||||
for (var i = 0; i < transaction.txCount; ++i) {
|
|
||||||
confirmationDialog.text += qsTr("\nTransaction #%1").arg(i+1)
|
|
||||||
+qsTr("\nRecipient: ") + transaction.recipientAddress[i]
|
|
||||||
+ (transaction.paymentId[i] == "" ? "" : qsTr("\n\payment ID: ") + transaction.paymentId[i])
|
|
||||||
+ qsTr("\nAmount: ") + walletManager.displayAmount(transaction.amount(i))
|
|
||||||
+ qsTr("\nFee: ") + walletManager.displayAmount(transaction.fee(i))
|
|
||||||
+ qsTr("\nRingsize: ") + (transaction.mixin(i)+1)
|
|
||||||
|
|
||||||
// TODO: add descriptions to unsigned_tx_set?
|
|
||||||
// + (transactionDescription === "" ? "" : (qsTr("\n\nDescription: ") + transactionDescription))
|
|
||||||
+ translationManager.emptyString
|
|
||||||
if (i > 0) {
|
|
||||||
confirmationDialog.text += "\n\n"
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(transaction.confirmationMessage);
|
console.log(transaction.confirmationMessage);
|
||||||
|
|
||||||
// Show confirmation dialog
|
// Show confirmation dialog
|
||||||
@@ -1019,6 +1080,41 @@ Rectangle {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FileDialog {
|
||||||
|
id: exportOutputsDialog
|
||||||
|
selectMultiple: false
|
||||||
|
selectExisting: false
|
||||||
|
onAccepted: {
|
||||||
|
console.log(walletManager.urlToLocalPath(exportOutputsDialog.fileUrl))
|
||||||
|
if (currentWallet.exportOutputs(walletManager.urlToLocalPath(exportOutputsDialog.fileUrl), true)) {
|
||||||
|
appWindow.showStatusMessage(qsTr("Outputs successfully exported to file") + translationManager.emptyString, 3);
|
||||||
|
} else {
|
||||||
|
appWindow.showStatusMessage(currentWallet.errorString, 5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onRejected: {
|
||||||
|
console.log("Canceled");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FileDialog {
|
||||||
|
id: importOutputsDialog
|
||||||
|
selectMultiple: false
|
||||||
|
selectExisting: true
|
||||||
|
title: qsTr("Please choose a file") + translationManager.emptyString
|
||||||
|
onAccepted: {
|
||||||
|
console.log(walletManager.urlToLocalPath(importOutputsDialog.fileUrl))
|
||||||
|
if (currentWallet.importOutputs(walletManager.urlToLocalPath(importOutputsDialog.fileUrl))) {
|
||||||
|
appWindow.showStatusMessage(qsTr("Outputs successfully imported to wallet") + translationManager.emptyString, 3);
|
||||||
|
} else {
|
||||||
|
appWindow.showStatusMessage(currentWallet.errorString, 5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onRejected: {
|
||||||
|
console.log("Canceled");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//ExportKeyImagesDialog
|
//ExportKeyImagesDialog
|
||||||
FileDialog {
|
FileDialog {
|
||||||
id: exportKeyImagesDialog
|
id: exportKeyImagesDialog
|
||||||
@@ -1026,7 +1122,11 @@ Rectangle {
|
|||||||
selectExisting: false
|
selectExisting: false
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
console.log(walletManager.urlToLocalPath(exportKeyImagesDialog.fileUrl))
|
console.log(walletManager.urlToLocalPath(exportKeyImagesDialog.fileUrl))
|
||||||
currentWallet.exportKeyImages(walletManager.urlToLocalPath(exportKeyImagesDialog.fileUrl));
|
if (currentWallet.exportKeyImages(walletManager.urlToLocalPath(exportKeyImagesDialog.fileUrl), true)) {
|
||||||
|
appWindow.showStatusMessage(qsTr("Key images successfully exported to file") + translationManager.emptyString, 3);
|
||||||
|
} else {
|
||||||
|
appWindow.showStatusMessage(currentWallet.errorString, 5);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
onRejected: {
|
onRejected: {
|
||||||
console.log("Canceled");
|
console.log("Canceled");
|
||||||
@@ -1041,7 +1141,11 @@ Rectangle {
|
|||||||
title: qsTr("Please choose a file") + translationManager.emptyString
|
title: qsTr("Please choose a file") + translationManager.emptyString
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
console.log(walletManager.urlToLocalPath(importKeyImagesDialog.fileUrl))
|
console.log(walletManager.urlToLocalPath(importKeyImagesDialog.fileUrl))
|
||||||
currentWallet.importKeyImages(walletManager.urlToLocalPath(importKeyImagesDialog.fileUrl));
|
if (currentWallet.importKeyImages(walletManager.urlToLocalPath(importKeyImagesDialog.fileUrl))) {
|
||||||
|
appWindow.showStatusMessage(qsTr("Key images successfully imported to wallet") + translationManager.emptyString, 3);
|
||||||
|
} else {
|
||||||
|
appWindow.showStatusMessage(currentWallet.errorString, 5);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
onRejected: {
|
onRejected: {
|
||||||
console.log("Canceled");
|
console.log("Canceled");
|
||||||
|
|||||||
@@ -60,13 +60,13 @@ Rectangle {
|
|||||||
MoneroComponents.Label {
|
MoneroComponents.Label {
|
||||||
id: soloTitleLabel
|
id: soloTitleLabel
|
||||||
fontSize: 24
|
fontSize: 24
|
||||||
text: qsTr("Prove Transaction") + translationManager.emptyString
|
text: qsTr("Prove Transaction") + " / " + qsTr("Reserve") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: qsTr("Generate a proof of your incoming/outgoing payment by supplying the transaction ID, the recipient address and an optional message. \n" +
|
text: qsTr("Generate a proof of your incoming/outgoing payment by supplying the transaction ID, the recipient address and an optional message. \n" +
|
||||||
"For the case of outgoing payments, you can get a 'Spend Proof' that proves the authorship of a transaction. In this case, you don't need to specify the recipient address.") + translationManager.emptyString
|
"For the case of outgoing payments, you can get a 'Spend Proof' that proves the authorship of a transaction. In this case, you don't need to specify the recipient address.") + qsTr("\nFor reserve proofs you don't need to specify tx id or address.") + translationManager.emptyString
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
font.pixelSize: 14
|
font.pixelSize: 14
|
||||||
@@ -83,6 +83,7 @@ Rectangle {
|
|||||||
placeholderText: qsTr("Paste tx ID") + translationManager.emptyString
|
placeholderText: qsTr("Paste tx ID") + translationManager.emptyString
|
||||||
readOnly: false
|
readOnly: false
|
||||||
copyButton: true
|
copyButton: true
|
||||||
|
enabled: getReserveProofAmtLine.text.length === 0
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.LineEdit {
|
MoneroComponents.LineEdit {
|
||||||
@@ -95,6 +96,38 @@ Rectangle {
|
|||||||
placeholderText: qsTr("Recipient's wallet address") + translationManager.emptyString;
|
placeholderText: qsTr("Recipient's wallet address") + translationManager.emptyString;
|
||||||
readOnly: false
|
readOnly: false
|
||||||
copyButton: true
|
copyButton: true
|
||||||
|
enabled: getReserveProofAmtLine.text.length === 0
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.LineEdit {
|
||||||
|
id: getReserveProofAmtLine
|
||||||
|
Layout.fillWidth: true
|
||||||
|
labelFontSize: 14
|
||||||
|
labelText: qsTr("Amount") + translationManager.emptyString
|
||||||
|
fontSize: 16
|
||||||
|
placeholderFontSize: 16
|
||||||
|
placeholderText: qsTr("Paste amount of XMR (reserve proof only)") + translationManager.emptyString
|
||||||
|
readOnly: false
|
||||||
|
copyButton: true
|
||||||
|
enabled: getProofAddressLine.text.length === 0 && getProofTxIdLine.text.length === 0
|
||||||
|
onTextChanged: {
|
||||||
|
text = text.trim().replace(",", ".");
|
||||||
|
const match = text.match(/^0+(\d.*)/);
|
||||||
|
if (match) {
|
||||||
|
const cursorPosition = cursorPosition;
|
||||||
|
text = match[1];
|
||||||
|
cursorPosition = Math.max(cursorPosition, 1) - 1;
|
||||||
|
} else if(text.indexOf('.') === 0) {
|
||||||
|
text = '0' + text;
|
||||||
|
if (text.length > 2) {
|
||||||
|
cursorPosition = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
error = walletManager.amountFromString(text) > appWindow.getUnlockedBalance();
|
||||||
|
}
|
||||||
|
validator: RegExpValidator {
|
||||||
|
regExp: /^\s*(\d{1,8})?([\.,]\d{1,12})?\s*$/
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.LineEdit {
|
MoneroComponents.LineEdit {
|
||||||
@@ -113,10 +146,10 @@ Rectangle {
|
|||||||
Layout.topMargin: 16
|
Layout.topMargin: 16
|
||||||
small: true
|
small: true
|
||||||
text: qsTr("Generate") + translationManager.emptyString
|
text: qsTr("Generate") + translationManager.emptyString
|
||||||
enabled: TxUtils.checkTxID(getProofTxIdLine.text) && (getProofAddressLine.text.length == 0 || TxUtils.checkAddress(getProofAddressLine.text, appWindow.persistentSettings.nettype))
|
enabled: TxUtils.checkTxID(getProofTxIdLine.text) && (getProofAddressLine.text.length == 0 || TxUtils.checkAddress(getProofAddressLine.text, appWindow.persistentSettings.nettype)) || getReserveProofAmtLine.text.length != 0 && walletManager.amountFromString(getReserveProofAmtLine.text) < appWindow.getUnlockedBalance() && walletManager.amountFromString(getReserveProofAmtLine.text) > 0
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("getProof: Generate clicked: txid " + getProofTxIdLine.text + ", address " + getProofAddressLine.text + ", message: " + getProofMessageLine.text);
|
console.log("getProof: Generate clicked: txid " + getProofTxIdLine.text + ", address " + getProofAddressLine.text + ", message: " + getProofMessageLine.text);
|
||||||
root.getProofClicked(getProofTxIdLine.text, getProofAddressLine.text, getProofMessageLine.text)
|
middlePanel.getProofClicked(getProofTxIdLine.text, getProofAddressLine.text, getProofMessageLine.text, getReserveProofAmtLine.text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,12 +166,12 @@ Rectangle {
|
|||||||
MoneroComponents.Label {
|
MoneroComponents.Label {
|
||||||
id: soloTitleLabel2
|
id: soloTitleLabel2
|
||||||
fontSize: 24
|
fontSize: 24
|
||||||
text: qsTr("Check Transaction") + translationManager.emptyString
|
text: qsTr("Check Transaction") + " / " + qsTr("Reserve") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
text: qsTr("Verify that funds were paid to an address by supplying the transaction ID, the recipient address, the message used for signing and the signature.\n" +
|
text: qsTr("Verify that funds were paid to an address by supplying the transaction ID, the recipient address, the message used for signing and the signature.\n" +
|
||||||
"For the case with Spend Proof, you don't need to specify the recipient address.") + translationManager.emptyString
|
"For the case with Spend Proof, you don't need to specify the recipient address.") + "\n" + qsTr("Transaction is not needed for reserve proof.") + translationManager.emptyString
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
@@ -189,7 +222,7 @@ Rectangle {
|
|||||||
labelFontSize: 14
|
labelFontSize: 14
|
||||||
labelText: qsTr("Signature") + translationManager.emptyString
|
labelText: qsTr("Signature") + translationManager.emptyString
|
||||||
placeholderFontSize: 16
|
placeholderFontSize: 16
|
||||||
placeholderText: qsTr("Paste tx proof") + translationManager.emptyString;
|
placeholderText: qsTr("Paste tx proof") + " / " + qsTr("reserve proof") + translationManager.emptyString;
|
||||||
readOnly: false
|
readOnly: false
|
||||||
copyButton: true
|
copyButton: true
|
||||||
}
|
}
|
||||||
@@ -198,10 +231,10 @@ Rectangle {
|
|||||||
Layout.topMargin: 16
|
Layout.topMargin: 16
|
||||||
small: true
|
small: true
|
||||||
text: qsTr("Check") + translationManager.emptyString
|
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)))
|
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)))) || (TxUtils.checkSignature(checkProofSignatureLine.text) && checkProofSignatureLine.text.indexOf("ReserveProofV") === 0 && TxUtils.checkAddress(checkProofAddressLine.text, appWindow.persistentSettings.nettype))
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("checkProof: Check clicked: txid " + checkProofTxIdLine.text + ", address " + checkProofAddressLine.text + ", message " + checkProofMessageLine.text + ", signature " + checkProofSignatureLine.text);
|
console.log("checkProof: Check clicked: txid " + checkProofTxIdLine.text + ", address " + checkProofAddressLine.text + ", message " + checkProofMessageLine.text + ", signature " + checkProofSignatureLine.text);
|
||||||
root.checkProofClicked(checkProofTxIdLine.text, checkProofAddressLine.text, checkProofMessageLine.text, checkProofSignatureLine.text)
|
middlePanel.checkProofClicked(checkProofTxIdLine.text, checkProofAddressLine.text, checkProofMessageLine.text, checkProofSignatureLine.text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ Item {
|
|||||||
|
|
||||||
smooth: false
|
smooth: false
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
source: "image://qrcode/" + TxUtils.makeQRCodeString(appWindow.current_address, amountToReceive.text)
|
source: "image://qrcode/" + walletManager.make_uri(appWindow.current_address, walletManager.amountFromString(amountToReceive.text))
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@@ -400,7 +400,7 @@ Item {
|
|||||||
font.pixelSize: 12
|
font.pixelSize: 12
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: _color
|
color: _color
|
||||||
text: TxUtils.makeQRCodeString(appWindow.current_address, amountToReceive.text)
|
text: walletManager.make_uri(appWindow.current_address, walletManager.amountFromString(amountToReceive.text))
|
||||||
themeTransition: false
|
themeTransition: false
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
@@ -685,7 +685,7 @@ Item {
|
|||||||
selectExisting: false
|
selectExisting: false
|
||||||
nameFilters: ["Image (*.png)"]
|
nameFilters: ["Image (*.png)"]
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
if(!walletManager.saveQrCode(TxUtils.makeQRCodeString(appWindow.current_address, amountToReceive.text), walletManager.urlToLocalPath(fileUrl))) {
|
if (!walletManager.saveQrCode(walletManager.make_uri(appWindow.current_address, walletManager.amountFromString(amountToReceive.text)), walletManager.urlToLocalPath(fileUrl))) {
|
||||||
console.log("Failed to save QrCode to file " + walletManager.urlToLocalPath(fileUrl) )
|
console.log("Failed to save QrCode to file " + walletManager.urlToLocalPath(fileUrl) )
|
||||||
receivePageDialog.title = qsTr("Save QrCode") + translationManager.emptyString;
|
receivePageDialog.title = qsTr("Save QrCode") + translationManager.emptyString;
|
||||||
receivePageDialog.text = qsTr("Failed to save QrCode to ") + walletManager.urlToLocalPath(fileUrl) + translationManager.emptyString;
|
receivePageDialog.text = qsTr("Failed to save QrCode to ") + walletManager.urlToLocalPath(fileUrl) + translationManager.emptyString;
|
||||||
|
|||||||