Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f9fa89b72a | ||
|
|
ac86e61e30 | ||
|
|
99fccd7071 | ||
|
|
b370a18f12 | ||
|
|
ba68411a9a | ||
|
|
98cc1427f1 | ||
|
|
37432d1093 | ||
|
|
3abcce3d27 | ||
|
|
c0044ccf0f | ||
|
|
89fd548d5f | ||
|
|
0bee6b26e2 | ||
|
|
6407930852 | ||
|
|
f80283ce7a | ||
|
|
66700b974b | ||
|
|
390e744af5 | ||
|
|
66fbec6669 | ||
|
|
d7c2f13d88 | ||
|
|
dabf417815 | ||
|
|
485a102ce5 | ||
|
|
785d78f0f1 | ||
|
|
5decc23765 | ||
|
|
db393a44d8 | ||
|
|
7a98f2e884 | ||
|
|
4c16a4a3e4 | ||
|
|
ba8ad7283b | ||
|
|
551423e899 | ||
|
|
5bd59432a2 | ||
|
|
2018adc479 | ||
|
|
9bb84ce517 | ||
|
|
faa631ff7c | ||
|
|
05b076f74e | ||
|
|
d243cefc48 | ||
|
|
01d6640aff | ||
|
|
6bd307b170 | ||
|
|
221b4435dd | ||
|
|
a5c305de6a | ||
|
|
f24187c25e | ||
|
|
df29db7198 | ||
|
|
864a161766 | ||
|
|
14c26c4d26 | ||
|
|
baef8be9ec | ||
|
|
0f8a1cf42a | ||
|
|
c72adf628b | ||
|
|
68327c0a7b | ||
|
|
bd9b6075b3 | ||
|
|
8d95b8a4a2 | ||
|
|
d6f381a196 | ||
|
|
10b08b3b98 | ||
|
|
7ac859dca3 | ||
|
|
fb49a8b921 | ||
|
|
6bf2165a89 | ||
|
|
9f03cc4016 | ||
|
|
6a773e0f55 | ||
|
|
a33f24217a | ||
|
|
c6647c9d63 | ||
|
|
a3dc3882fb | ||
|
|
27328f36ef | ||
|
|
3f2d979444 | ||
|
|
7691273c63 | ||
|
|
68856c52c8 | ||
|
|
448fff6ad0 | ||
|
|
06994283ea | ||
|
|
dc9f980b8f | ||
|
|
523a9056f7 | ||
|
|
2e203f0ca4 | ||
|
|
94e866ead3 | ||
|
|
e68aac122b | ||
|
|
5e5ea68fcf | ||
|
|
dcb8ec0325 | ||
|
|
ed9ea9c3c8 | ||
|
|
7a61fc4030 | ||
|
|
1ed82a9e8e | ||
|
|
3a1462ef93 | ||
|
|
ddd080e3db | ||
|
|
9e558b7586 | ||
|
|
2e99db88c0 | ||
|
|
687f1295ed | ||
|
|
66fab82c34 | ||
|
|
f43b7e59a5 | ||
|
|
56483fe161 | ||
|
|
fbbdd2146e | ||
|
|
8832485668 | ||
|
|
6026e0a168 | ||
|
|
80ba7ec7c5 | ||
|
|
a88f80708f | ||
|
|
62d0a59ccb | ||
|
|
03996459da | ||
|
|
fbe4c0844b | ||
|
|
26b69025d5 | ||
|
|
ebeb705b7c | ||
|
|
8b5699169e | ||
|
|
3d93c43d96 | ||
|
|
4403cf5688 | ||
|
|
14425844e5 | ||
|
|
0eef8dac1a | ||
|
|
1a340495c2 | ||
|
|
3e800edd2b | ||
|
|
91ae4cff0d | ||
|
|
6cbdb9f37c | ||
|
|
daec1dbf4f | ||
|
|
0575b7d609 | ||
|
|
fc2ac55fff | ||
|
|
cf28c97bd6 | ||
|
|
7d384cd276 | ||
|
|
68a83e2a58 | ||
|
|
f9c378f055 | ||
|
|
1084bb4ead | ||
|
|
2549e171ad | ||
|
|
946bd24e4f | ||
|
|
0aebb0fa4c | ||
|
|
7b286f48f9 | ||
|
|
7884edfbe9 | ||
|
|
c5de80fed6 | ||
|
|
cb4374a38e | ||
|
|
a693ebfe97 | ||
|
|
53b5fa100d |
No files matched your search
@@ -1 +1,2 @@
|
||||
*
|
||||
!docker.gitconfig
|
||||
@@ -0,0 +1,179 @@
|
||||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
import fnmatch
|
||||
import hashlib
|
||||
import pathlib
|
||||
import subprocess
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
MAX_TRIES = 32
|
||||
MAX_XML_SIZE = 1024 * 1024 * 1024
|
||||
MIRROR = 'download.qt.io'
|
||||
|
||||
|
||||
def fetch_links_to_archives(host_os, target, major, minor, patch, toolchain, packages):
|
||||
qt_dir = f'qt{major}_{major}{minor}{patch}'
|
||||
base_url = f'https://{MIRROR}/online/qtsdkrepository/{host_os}/{target}/{qt_dir}/{qt_dir}'
|
||||
url = f'{base_url}/Updates.xml'
|
||||
print('fetching', url, flush=True)
|
||||
|
||||
for _ in range(MAX_TRIES):
|
||||
try:
|
||||
with urllib.request.urlopen(url, timeout=30) as response:
|
||||
resp = response.read(MAX_XML_SIZE + 1)
|
||||
if len(resp) > MAX_XML_SIZE:
|
||||
raise RuntimeError(f'{url} exceeds the {MAX_XML_SIZE}-byte size limit')
|
||||
update_xml = ET.fromstring(resp)
|
||||
break
|
||||
except KeyboardInterrupt:
|
||||
raise
|
||||
except Exception as e:
|
||||
print('error', e, flush=True)
|
||||
else:
|
||||
raise RuntimeError(f'Failed to fetch {url} after {MAX_TRIES} attempts')
|
||||
|
||||
package_prefix = f'qt.qt{major}.{major}{minor}{patch}'
|
||||
package_names = {
|
||||
f'{package_prefix}.{package}.{toolchain}' if package else f'{package_prefix}.{toolchain}'
|
||||
for package in packages
|
||||
}
|
||||
|
||||
found_packages = set()
|
||||
for pkg in update_xml.findall('./PackageUpdate'):
|
||||
name = pkg.find('.//Name')
|
||||
if name is None:
|
||||
continue
|
||||
if name.text not in package_names:
|
||||
continue
|
||||
found_packages.add(name.text)
|
||||
version = pkg.find('.//Version')
|
||||
if version is None:
|
||||
continue
|
||||
archives = pkg.find('.//DownloadableArchives')
|
||||
if archives is None or archives.text is None:
|
||||
continue
|
||||
for archive in archives.text.split(', '):
|
||||
archive = archive.strip()
|
||||
if not archive:
|
||||
continue
|
||||
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, 'archive': archive}
|
||||
|
||||
missing_packages = package_names - found_packages
|
||||
if missing_packages:
|
||||
raise RuntimeError(f'Qt packages not found: {", ".join(sorted(missing_packages))}')
|
||||
|
||||
|
||||
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):
|
||||
result = subprocess.run([
|
||||
'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=-',
|
||||
], input=data, check=False)
|
||||
if result.returncode == 0:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
def file_hash(path):
|
||||
digest = hashlib.sha256()
|
||||
with open(path, 'rb') as file:
|
||||
for chunk in iter(lambda: file.read(1024 * 1024), b''):
|
||||
digest.update(chunk)
|
||||
return digest.digest()
|
||||
|
||||
|
||||
def calc_hash_sum(files):
|
||||
digest = hashlib.sha256()
|
||||
for path in files:
|
||||
digest.update(file_hash(path))
|
||||
return digest.hexdigest()
|
||||
|
||||
|
||||
def extract_archives(files, out='.', targets=()):
|
||||
for path in files:
|
||||
print('extracting', path, flush=True)
|
||||
result = subprocess.run(
|
||||
['bsdtar', '-xf', path, '-C', out, *targets],
|
||||
stdout=subprocess.DEVNULL,
|
||||
check=False,
|
||||
)
|
||||
if result.returncode != 0:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('os')
|
||||
parser.add_argument('target')
|
||||
parser.add_argument('version')
|
||||
parser.add_argument('toolchain')
|
||||
parser.add_argument('expect')
|
||||
parser.add_argument('--add-package', action='append', default=[],
|
||||
help='additional package below qt.qt<major>.<version>, such as addons.qtshadertools')
|
||||
parser.add_argument('--archive', action='append', default=[],
|
||||
help='fnmatch pattern selecting archives from the requested packages')
|
||||
args = parser.parse_args()
|
||||
|
||||
host_os, target, version, toolchain, expect = (
|
||||
args.os, args.target, args.version, args.toolchain, args.expect
|
||||
)
|
||||
major, minor, patch = version.split('.')
|
||||
|
||||
packages = [''] + args.add_package
|
||||
links = list(fetch_links_to_archives(
|
||||
host_os, target, major, minor, patch, toolchain, packages
|
||||
))
|
||||
if args.archive:
|
||||
links = [
|
||||
link for link in links
|
||||
if any(fnmatch.fnmatch(link['archive'], pattern) for pattern in args.archive)
|
||||
]
|
||||
if not links:
|
||||
raise RuntimeError('No Qt archives matched')
|
||||
print(*(link['url'] for link in links), sep='\n', flush=True)
|
||||
|
||||
if not download(links):
|
||||
raise RuntimeError('Failed to download Qt archives')
|
||||
|
||||
archive_names = [link['name'] for link in links]
|
||||
result = calc_hash_sum(archive_names)
|
||||
print('result', result, 'expect', expect, flush=True)
|
||||
if expect != '-' and result != expect:
|
||||
raise RuntimeError(f'Qt archive hash mismatch: expected {expect}, got {result}')
|
||||
|
||||
if not extract_archives(archive_names):
|
||||
raise RuntimeError('Failed to extract Qt archives')
|
||||
|
||||
for archive_name in archive_names:
|
||||
pathlib.Path(archive_name).unlink()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -1,6 +1,6 @@
|
||||
import requests
|
||||
import json
|
||||
import subprocess
|
||||
from urllib.request import urlretrieve
|
||||
from urllib.request import urlopen, urlretrieve
|
||||
import difflib
|
||||
|
||||
sech_key = "https://p2pool.io/SChernykh.asc"
|
||||
@@ -32,7 +32,8 @@ def get_hash(fname):
|
||||
def main():
|
||||
global p2pool_files, sech_key, sech_key_backup, sech_key_fp
|
||||
p2pool_tag_api = "https://api.github.com/repos/SChernykh/p2pool/releases/latest"
|
||||
data = requests.get(p2pool_tag_api).json()
|
||||
with urlopen(p2pool_tag_api) as response:
|
||||
data = json.load(response)
|
||||
tag = data["tag_name"]
|
||||
head = f"p2pool-{tag}-"
|
||||
url = f"https://github.com/SChernykh/p2pool/releases/download/{tag}/"
|
||||
|
||||
+76
-81
@@ -4,28 +4,26 @@ on: [push, pull_request]
|
||||
|
||||
env:
|
||||
FREE_DISKSPACE: |
|
||||
sudo rm -rf /usr/local/.ghcup /usr/share/dotnet /usr/share/swift /usr/share/miniconda
|
||||
QT_TAG: v5.15.17-lts-lgpl
|
||||
QT_PREFIX: ${{ github.workspace }}/qt-install
|
||||
sudo rm -rf /usr/local/.ghcup /usr/share/dotnet /usr/share/swift /usr/share/miniconda /usr/local/lib/android /opt/hostedtoolcache
|
||||
|
||||
jobs:
|
||||
build-macos:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: install dependencies
|
||||
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi ninja openssl zmq libsodium unbound protobuf qt5 pkg-config
|
||||
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi ninja openssl zmq libsodium unbound protobuf qt pkg-config
|
||||
- name: build
|
||||
run: DEV_MODE=ON make release
|
||||
run: DEV_MODE=ON QML_TESTS=ON make release
|
||||
- name: test qml
|
||||
run: build/release/bin/monero-wallet-gui.app/Contents/MacOS/monero-wallet-gui --test-qml
|
||||
|
||||
build-ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-26.04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: remove bundled boost
|
||||
@@ -38,13 +36,14 @@ jobs:
|
||||
- name: update apt
|
||||
run: sudo apt update
|
||||
- name: install monero dependencies
|
||||
run: sudo apt -y install build-essential cmake ninja-build libboost-all-dev libunbound-dev graphviz doxygen pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev libnorm-dev libusb-1.0-0-dev libpgm-dev libprotobuf-dev protobuf-compiler
|
||||
- name: install monero gui dependencies
|
||||
run: sudo apt -y install qtbase5-dev qtdeclarative5-dev qml-module-qtqml-models2 qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-xmllistmodel qml-module-qt-labs-settings qml-module-qt-labs-platform qml-module-qt-labs-folderlistmodel qttools5-dev-tools qml-module-qtquick-templates2 libqt5svg5-dev libgcrypt20-dev xvfb
|
||||
run: sudo apt -y install build-essential cmake ninja-build libboost-all-dev libunbound-dev graphviz doxygen 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 qt6-base-dev qt6-declarative-dev qt6-svg-dev qt6-tools-dev qt6-tools-dev-tools qml6-module-qtcore qml6-module-qtqml qml6-module-qtqml-models qml6-module-qtquick qml6-module-qtquick-controls qml6-module-qtquick-dialogs qml6-module-qtquick-effects qml6-module-qtquick-layouts qml6-module-qtquick-shapes qml6-module-qtquick-window qml6-module-qt-labs-folderlistmodel qml6-module-qt-labs-platform qml6-module-qttest
|
||||
- name: build
|
||||
run: DEV_MODE=ON make release
|
||||
run: DEV_MODE=ON QML_TESTS=ON make release
|
||||
- name: test qml
|
||||
run: xvfb-run -a build/release/bin/monero-wallet-gui --test-qml
|
||||
env:
|
||||
QT_QPA_PLATFORM: offscreen
|
||||
QT_QUICK_BACKEND: software
|
||||
run: build/release/bin/monero-wallet-gui --test-qml
|
||||
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
@@ -52,7 +51,7 @@ jobs:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: eine/setup-msys2@v2
|
||||
@@ -60,102 +59,98 @@ jobs:
|
||||
msystem: ucrt64
|
||||
update: true
|
||||
install: make
|
||||
pacboy: toolchain:p pcre:p cmake:p ninja:p boost:p openssl:p zeromq:p libsodium:p hidapi:p protobuf-c:p libusb:p unbound:p git qt5:p libgcrypt:p angleproject:p
|
||||
- name: add qmake.exe and windeployqt.exe
|
||||
run: |
|
||||
cp -f "$MSYSTEM_PREFIX/bin/qmake-qt5.exe" "$MSYSTEM_PREFIX/bin/qmake.exe"
|
||||
cp -f "$MSYSTEM_PREFIX/bin/windeployqt-qt5.exe" "$MSYSTEM_PREFIX/bin/windeployqt.exe"
|
||||
pacboy: toolchain:p pcre:p cmake:p ninja:p boost:p openssl:p zeromq:p libsodium:p hidapi:p protobuf:p libusb:p unbound:p git qt6-base:p qt6-declarative:p qt6-svg:p qt6-tools:p libgcrypt:p rust:p
|
||||
- name: add qmlimportscanner.exe
|
||||
run: cp -f "$MSYSTEM_PREFIX/share/qt6/bin/qmlimportscanner.exe" "$MSYSTEM_PREFIX/bin/qmlimportscanner.exe"
|
||||
- name: build
|
||||
run: DEV_MODE=ON make release-win64
|
||||
run: DEV_MODE=ON QML_TESTS=ON make release-win64
|
||||
- name: deploy
|
||||
run: cmake --build . --target deploy
|
||||
working-directory: build/release
|
||||
- name: test qml
|
||||
run: build/release/bin/monero-wallet-gui --test-qml
|
||||
run: build/release/bin/monero-wallet-gui --test-qml -o test.log,txt || { rc=$?; cat test.log; exit "$rc"; }
|
||||
|
||||
macos-bundle:
|
||||
runs-on: macos-15
|
||||
name: macOS ${{ matrix.arch }} bundle
|
||||
runs-on: ${{ matrix.runner }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- runner: macos-14
|
||||
archive_name: monero-wallet-gui-macos-armv8.tar.gz
|
||||
arch: ARM
|
||||
- runner: macos-15-intel
|
||||
archive_name: monero-wallet-gui-macos-x64.tar.gz
|
||||
arch: Intel
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: install dependencies
|
||||
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi ninja openssl zmq unbound protobuf pkg-config
|
||||
- name: clone qt repo
|
||||
run: git clone -b "${QT_TAG}" --recursive --depth 1 --shallow-submodules https://github.com/qt/qt5
|
||||
- name: build qt from source
|
||||
run: |
|
||||
cd qt5
|
||||
mkdir build && cd build
|
||||
../configure -prefix "${QT_PREFIX}" -opensource -confirm-license -release -nomake examples -nomake tests -no-rpath -skip qtwebengine -skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtlocation -skip qtnetworkauth -skip qtpurchasing -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qttools -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras -skip gamepad -skip serialbus -skip location -skip webengine
|
||||
make -j"$(sysctl -n hw.ncpu)"
|
||||
make install
|
||||
cd ../qttools/src/linguist/lrelease
|
||||
../../../../build/qtbase/bin/qmake
|
||||
make -j"$(sysctl -n hw.ncpu)"
|
||||
make install
|
||||
cd ../../../../qttools/src/macdeployqt/macdeployqt/
|
||||
../../../../build/qtbase/bin/qmake
|
||||
make -j"$(sysctl -n hw.ncpu)"
|
||||
make install
|
||||
- name: build monero-gui
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
cmake -G Ninja -D CMAKE_BUILD_TYPE=Release -D ARCH=default -D CMAKE_PREFIX_PATH="${QT_PREFIX}" ..
|
||||
cmake --build .
|
||||
- name: deploy
|
||||
run: cmake --build . --target deploy
|
||||
working-directory: build
|
||||
- name: test qml
|
||||
run: build/bin/monero-wallet-gui.app/Contents/MacOS/monero-wallet-gui --test-qml
|
||||
- name: create .tar
|
||||
run: tar -cf monero-wallet-gui.tar monero-wallet-gui.app
|
||||
working-directory: build/bin
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: build/bin/monero-wallet-gui.tar
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: install dependencies
|
||||
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi libsodium ninja openssl pkg-config protobuf unbound zeromq aria2
|
||||
- name: download Qt
|
||||
run: mkdir qt6 && cd qt6 && python3 ../monero-gui/.github/qt_helper.py mac_x64 desktop 6.11.1 clang_64 4a88665d61643410399e15d2cc7625cca62d7f5a005d88c02a1e17dde7d9f62c
|
||||
working-directory: ../
|
||||
- name: configure
|
||||
run: >
|
||||
cmake -S . -B build -G Ninja
|
||||
-D CMAKE_PREFIX_PATH="/Users/runner/work/monero-gui/qt6/"
|
||||
-D CMAKE_OSX_DEPLOYMENT_TARGET="13.0"
|
||||
-D ARCH=default
|
||||
- name: build
|
||||
run: cmake --build build
|
||||
- name: deploy
|
||||
run: cmake --build build --target deploy
|
||||
- name: check qml startup
|
||||
run: build/bin/monero-wallet-gui.app/Contents/MacOS/monero-wallet-gui --check-qml
|
||||
- name: create archive
|
||||
run: tar -C build/bin -czf "${{ matrix.archive_name }}" monero-wallet-gui.app
|
||||
- uses: actions/upload-artifact@v7
|
||||
with:
|
||||
path: ${{ matrix.archive_name }}
|
||||
archive: false
|
||||
|
||||
docker-linux-static:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: install dependencies
|
||||
run: sudo apt -y install xvfb libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xkb1 libxcb-shape0 libxkbcommon-x11-0
|
||||
- name: free up diskspace
|
||||
run: ${{env.FREE_DISKSPACE}}
|
||||
- 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=4 --file Dockerfile.linux .
|
||||
- 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'
|
||||
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -w /monero-gui monero:build-env-linux sh -c 'make depends root=/depends target=x86_64-linux-gnu tag=linux-x64'
|
||||
- name: sha256sum
|
||||
run: shasum -a256 /home/runner/work/monero-gui/monero-gui/build/release/bin/monero-wallet-gui
|
||||
- name: test qml
|
||||
run: xvfb-run -a /home/runner/work/monero-gui/monero-gui/build/release/bin/monero-wallet-gui --test-qml
|
||||
- uses: actions/upload-artifact@v4
|
||||
run: shasum -a256 /home/runner/work/monero-gui/monero-gui/build/x86_64-linux-gnu/release/bin/monero-wallet-gui
|
||||
- name: install test dependencies
|
||||
run: sudo apt -y install xvfb libopengl0 libegl1 libgl1 libxkbcommon-x11-0 libxcb-cursor0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-shape0
|
||||
- name: check qml startup
|
||||
run: xvfb-run -a /home/runner/work/monero-gui/monero-gui/build/x86_64-linux-gnu/release/bin/monero-wallet-gui --check-qml
|
||||
- uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: |
|
||||
/home/runner/work/monero-gui/monero-gui/build/release/bin/monero-wallet-gui
|
||||
/home/runner/work/monero-gui/monero-gui/build/release/bin/monerod
|
||||
/home/runner/work/monero-gui/monero-gui/build/x86_64-linux-gnu/release/bin/monero-wallet-gui
|
||||
/home/runner/work/monero-gui/monero-gui/build/x86_64-linux-gnu/release/bin/monerod
|
||||
|
||||
docker-windows-static:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: free up diskspace
|
||||
run: ${{env.FREE_DISKSPACE}}
|
||||
- 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=4 --file Dockerfile.windows .
|
||||
- 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'
|
||||
- name: sha256sum
|
||||
run: shasum -a256 /home/runner/work/monero-gui/monero-gui/build/x86_64-w64-mingw32/release/bin/monero-wallet-gui.exe
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: |
|
||||
@@ -165,24 +160,24 @@ jobs:
|
||||
docker-android:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: free up diskspace
|
||||
run: ${{env.FREE_DISKSPACE}}
|
||||
- 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=4 --file Dockerfile.android .
|
||||
- name: build
|
||||
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui monero:build-env-android
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: /home/runner/work/monero-gui/monero-gui/build/Android/release/android-build/monero-gui.apk
|
||||
path: /home/runner/work/monero-gui/monero-gui/build/Android/release/android-build/build/outputs/apk/release/android-build-release-unsigned.apk
|
||||
|
||||
source-archive:
|
||||
runs-on: ubuntu-slim
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: archive
|
||||
@@ -192,7 +187,7 @@ jobs:
|
||||
export OUTPUT="$VERSION.tar"
|
||||
echo "OUTPUT=$OUTPUT" >> $GITHUB_ENV
|
||||
/home/runner/.local/bin/git-archive-all --prefix "$VERSION/" --force-submodules "$OUTPUT"
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: ${{ env.OUTPUT }}
|
||||
path: /home/runner/work/monero-gui/monero-gui/${{ env.OUTPUT }}
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
p2pool-hashes:
|
||||
runs-on: ubuntu-slim
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v7
|
||||
- name: Verify Hashes
|
||||
run: |
|
||||
python3 .github/verify_p2pool.py
|
||||
+142
-196
@@ -1,11 +1,13 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
project(monero-gui)
|
||||
|
||||
include(CMakeDependentOption)
|
||||
|
||||
message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
|
||||
|
||||
set(VERSION_MAJOR "18")
|
||||
set(VERSION_MINOR "5")
|
||||
set(VERSION_REVISION "1")
|
||||
set(VERSION_REVISION "4")
|
||||
set(VERSION "0.${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")
|
||||
|
||||
option(STATIC "Link libraries statically, requires static Qt")
|
||||
@@ -15,13 +17,10 @@ option(WITH_SCANNER "Enable webcam QR scanner" OFF)
|
||||
option(WITH_DESKTOP_ENTRY "Ask to install desktop entry on first startup" ON)
|
||||
option(WITH_UPDATER "Regularly check for new updates" ON)
|
||||
option(DEV_MODE "Checkout latest monero master on build" OFF)
|
||||
cmake_dependent_option(QML_TESTS "Build QML tests" OFF "NOT STATIC;NOT ANDROID;NOT IOS" OFF)
|
||||
option(SKIP_OPTIONAL_MONERO_BINARIES "Don't build optional monero binaries" ON)
|
||||
|
||||
if(DEV_MODE)
|
||||
# DEV_MODE checks out the monero submodule to master, which requires C++17.
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
else()
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
endif()
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake")
|
||||
@@ -61,6 +60,30 @@ if(NOT MANUAL_SUBMODULES)
|
||||
endif()
|
||||
|
||||
add_subdirectory(monero)
|
||||
|
||||
if(SKIP_OPTIONAL_MONERO_BINARIES)
|
||||
foreach(_optional_monero_target
|
||||
simplewallet
|
||||
gen_multisig
|
||||
gen_ssl_cert
|
||||
wallet_rpc_server
|
||||
blockchain_import
|
||||
blockchain_export
|
||||
blockchain_blackball
|
||||
blockchain_usage
|
||||
blockchain_ancestry
|
||||
blockchain_depth
|
||||
blockchain_stats
|
||||
blockchain_prune_known_spent_data
|
||||
blockchain_prune)
|
||||
if(TARGET ${_optional_monero_target})
|
||||
# Directory exclusion also skips install rules for unbuilt binaries.
|
||||
get_target_property(_optional_monero_source_dir ${_optional_monero_target} SOURCE_DIR)
|
||||
set_property(DIRECTORY "${_optional_monero_source_dir}" PROPERTY EXCLUDE_FROM_ALL TRUE)
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
add_subdirectory(external)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
@@ -113,215 +136,56 @@ if(UNIX AND NOT APPLE AND NOT ANDROID)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(QT5_LIBRARIES
|
||||
Qt5Core
|
||||
Qt5Quick
|
||||
Qt5Gui
|
||||
Qt5Qml
|
||||
Qt5Svg
|
||||
Qt5Xml
|
||||
)
|
||||
|
||||
if(WITH_SCANNER)
|
||||
list(APPEND QT5_LIBRARIES Qt5Multimedia)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
list(APPEND QT5_LIBRARIES Qt5MacExtras)
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
if(NOT CMAKE_PREFIX_PATH AND DEFINED ENV{CMAKE_PREFIX_PATH})
|
||||
message(STATUS "Using CMAKE_PREFIX_PATH environment variable: '$ENV{CMAKE_PREFIX_PATH}'")
|
||||
set(CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH})
|
||||
endif()
|
||||
if(APPLE AND NOT CMAKE_PREFIX_PATH)
|
||||
execute_process(COMMAND brew --prefix qt5 OUTPUT_VARIABLE QT5_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
list(APPEND CMAKE_PREFIX_PATH ${QT5_DIR})
|
||||
execute_process(COMMAND brew --prefix qt OUTPUT_VARIABLE QT6_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
list(APPEND CMAKE_PREFIX_PATH ${QT6_DIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(QT_MIN_VERSION "5.12")
|
||||
set(QT_MIN_VERSION "6.8")
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
# TODO: drop this once we switch to Qt 5.14+
|
||||
pkg_check_modules(Qt5QmlModels_PKG_CONFIG QUIET Qt5QmlModels)
|
||||
if(Qt5QmlModels_PKG_CONFIG_FOUND)
|
||||
list(APPEND QT5_LIBRARIES Qt5QmlModels)
|
||||
set(QT_COMPONENTS
|
||||
Core
|
||||
Concurrent
|
||||
Gui
|
||||
Qml
|
||||
QmlModels
|
||||
Quick
|
||||
QuickControls2
|
||||
Svg
|
||||
Widgets
|
||||
Xml
|
||||
)
|
||||
if(UNIX AND NOT APPLE AND NOT ANDROID)
|
||||
list(APPEND QT_COMPONENTS DBus)
|
||||
endif()
|
||||
|
||||
foreach(QT5_MODULE ${QT5_LIBRARIES})
|
||||
find_package(${QT5_MODULE} ${QT_MIN_VERSION} REQUIRED)
|
||||
include_directories(${${QT5_MODULE}_INCLUDE_DIRS})
|
||||
endforeach()
|
||||
|
||||
if(NOT (CMAKE_CROSSCOMPILING AND ANDROID))
|
||||
pkg_check_modules(QT5_PKG_CONFIG REQUIRED ${QT5_LIBRARIES})
|
||||
else()
|
||||
set(QT5_LIBRARIES_ABI)
|
||||
foreach(QT5_MODULE ${QT5_LIBRARIES})
|
||||
list(APPEND QT5_LIBRARIES_ABI "${QT5_MODULE}_${CMAKE_ANDROID_ARCH_ABI}")
|
||||
endforeach()
|
||||
pkg_check_modules(QT5_PKG_CONFIG REQUIRED ${QT5_LIBRARIES_ABI})
|
||||
if(QML_TESTS)
|
||||
list(APPEND QT_COMPONENTS QuickTest Test)
|
||||
endif()
|
||||
if(WITH_SCANNER)
|
||||
list(APPEND QT_COMPONENTS Multimedia)
|
||||
endif()
|
||||
find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS ${QT_COMPONENTS})
|
||||
|
||||
get_target_property(QMAKE_IMPORTED_LOCATION Qt5::qmake IMPORTED_LOCATION)
|
||||
list(TRANSFORM QT_COMPONENTS PREPEND "Qt6::" OUTPUT_VARIABLE QT_LIBRARIES)
|
||||
|
||||
get_target_property(QMAKE_IMPORTED_LOCATION Qt6::qmake IMPORTED_LOCATION)
|
||||
get_filename_component(QT_INSTALL_PREFIX "${QMAKE_IMPORTED_LOCATION}/../.." ABSOLUTE)
|
||||
|
||||
if(APPLE AND NOT STATIC)
|
||||
set(CMAKE_BUILD_RPATH "${QT_INSTALL_PREFIX}/lib")
|
||||
endif()
|
||||
|
||||
if(QT5_PKG_CONFIG_FOUND)
|
||||
set(QT5_PKG_CONFIG "QT5_PKG_CONFIG")
|
||||
if(STATIC)
|
||||
set(QT5_PKG_CONFIG "${QT5_PKG_CONFIG}_STATIC")
|
||||
endif()
|
||||
|
||||
if(UNIX AND CMAKE_PREFIX_PATH)
|
||||
if(APPLE)
|
||||
list(JOIN ${QT5_PKG_CONFIG}_LDFLAGS_OTHER " " ${QT5_PKG_CONFIG}_LDFLAGS_OTHER)
|
||||
endif()
|
||||
# temporal workaround for https://bugreports.qt.io/browse/QTBUG-80922
|
||||
STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${QT_INSTALL_PREFIX}" ${QT5_PKG_CONFIG}_LDFLAGS_OTHER "${${QT5_PKG_CONFIG}_LDFLAGS_OTHER}")
|
||||
STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${QT_INSTALL_PREFIX}" ${QT5_PKG_CONFIG}_LIBRARIES "${${QT5_PKG_CONFIG}_LIBRARIES}")
|
||||
STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${QT_INSTALL_PREFIX}" ${QT5_PKG_CONFIG}_INCLUDE_DIRS "${${QT5_PKG_CONFIG}_INCLUDE_DIRS}")
|
||||
STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${QT_INSTALL_PREFIX}" ${QT5_PKG_CONFIG}_LIBRARY_DIRS "${${QT5_PKG_CONFIG}_LIBRARY_DIRS}")
|
||||
endif()
|
||||
|
||||
set(QT5_LIBRARIES ${${QT5_PKG_CONFIG}_LIBRARIES} ${${QT5_PKG_CONFIG}_LDFLAGS_OTHER})
|
||||
include_directories(${${QT5_PKG_CONFIG}_INCLUDE_DIRS})
|
||||
link_directories(${${QT5_PKG_CONFIG}_LIBRARY_DIRS})
|
||||
endif()
|
||||
|
||||
list(APPEND QT5_LIBRARIES
|
||||
${Qt5Gui_PLUGINS}
|
||||
${Qt5Svg_PLUGINS}
|
||||
${Qt5Qml_PLUGINS}
|
||||
${Qt5Network_PLUGINS}
|
||||
)
|
||||
|
||||
if(STATIC)
|
||||
set(QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/Qt/labs/folderlistmodel)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/Qt/labs/settings)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/Qt/labs/platform)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtGraphicalEffects)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtGraphicalEffects/private)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtMultimedia)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQml)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQml/Models.2)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQuick.2)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQuick/Controls)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQuick/Controls.2)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQuick/Dialogs)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQuick/Dialogs/Private)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQuick/Layouts)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQuick/PrivateWidgets)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQuick/Templates.2)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQuick/Window.2)
|
||||
|
||||
set(QT5_EXTRA_LIBRARIES_LIST
|
||||
qtquicktemplates2plugin
|
||||
Qt5QuickTemplates2
|
||||
qtquickcontrols2plugin
|
||||
Qt5QuickControls2
|
||||
dialogplugin
|
||||
dialogsprivateplugin
|
||||
qmlfolderlistmodelplugin
|
||||
qmlsettingsplugin
|
||||
qtlabsplatformplugin
|
||||
qquicklayoutsplugin
|
||||
modelsplugin
|
||||
)
|
||||
|
||||
if(WITH_SCANNER)
|
||||
list(APPEND QT5_EXTRA_LIBRARIES_LIST
|
||||
declarative_multimedia
|
||||
Qt5MultimediaQuick
|
||||
)
|
||||
endif()
|
||||
|
||||
list(APPEND QT5_EXTRA_LIBRARIES_LIST
|
||||
qtgraphicaleffectsplugin
|
||||
qtgraphicaleffectsprivate
|
||||
qtquick2plugin
|
||||
qtquickcontrolsplugin
|
||||
widgetsplugin
|
||||
windowplugin
|
||||
)
|
||||
|
||||
if(NOT ${Qt5Core_VERSION} VERSION_LESS 5.14)
|
||||
list(APPEND QT5_EXTRA_LIBRARIES_LIST qmlplugin)
|
||||
endif()
|
||||
|
||||
set(QT5_EXTRA_LIBRARIES)
|
||||
foreach(LIBRARY ${QT5_EXTRA_LIBRARIES_LIST})
|
||||
find_library(${LIBRARY}_LIBRARY ${LIBRARY} PATHS ${QT5_EXTRA_PATHS} REQUIRED)
|
||||
list(APPEND QT5_EXTRA_LIBRARIES ${${LIBRARY}_LIBRARY})
|
||||
endforeach()
|
||||
|
||||
if(MINGW)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
list(APPEND QT5_EXTRA_LIBRARIES D3D11 Dwrite D2d1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(QT5_LIBRARIES
|
||||
${QT5_EXTRA_LIBRARIES}
|
||||
${QT5_LIBRARIES}
|
||||
)
|
||||
|
||||
set(QT5_INTEGRATION_LIBRARIES_LIST
|
||||
Qt5EventDispatcherSupport
|
||||
Qt5PacketProtocol
|
||||
Qt5ThemeSupport
|
||||
Qt5FontDatabaseSupport
|
||||
)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
list(APPEND QT5_INTEGRATION_LIBRARIES_LIST
|
||||
Qt5XcbQpa
|
||||
Qt5ServiceSupport
|
||||
Qt5GlxSupport
|
||||
)
|
||||
elseif(MINGW)
|
||||
list(APPEND QT5_INTEGRATION_LIBRARIES_LIST qtfreetype)
|
||||
endif()
|
||||
|
||||
foreach(LIBRARY ${QT5_INTEGRATION_LIBRARIES_LIST})
|
||||
find_library(${LIBRARY}_LIBRARY ${LIBRARY} PATHS ${QT5_EXTRA_PATHS} REQUIRED)
|
||||
list(APPEND QT5_LIBRARIES ${${LIBRARY}_LIBRARY})
|
||||
endforeach()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
pkg_check_modules(X11XCB_XCBGLX REQUIRED x11-xcb xcb-glx)
|
||||
list(APPEND QT5_LIBRARIES ${X11XCB_XCBGLX_LIBRARIES})
|
||||
pkg_check_modules(FONTCONFIG REQUIRED fontconfig)
|
||||
list(APPEND QT5_LIBRARIES ${FONTCONFIG_STATIC_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
set(QT5_EXTRA_LIBRARIES_LIST
|
||||
GLESv2
|
||||
log
|
||||
z
|
||||
jnigraphics
|
||||
android
|
||||
EGL
|
||||
Qt5VirtualKeyboard_${CMAKE_ANDROID_ARCH_ABI}
|
||||
c++_shared
|
||||
)
|
||||
foreach(LIBRARY ${QT5_EXTRA_LIBRARIES_LIST})
|
||||
find_library(${LIBRARY}_LIBRARY ${LIBRARY} PATHS "${ANDROID_TOOLCHAIN_ROOT}/sysroot/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/${ANDROID_PLATFORM_LEVEL}" REQUIRED)
|
||||
list(APPEND QT5_LIBRARIES ${${LIBRARY}_LIBRARY})
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wa,-mbig-obj")
|
||||
set(EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi;crypt32;bcrypt)
|
||||
# QtCore uses the Windows version-information APIs, but Qt 6.8 does not
|
||||
# propagate version.lib to consumers.
|
||||
set(EXTRA_LIBRARIES mswsock ws2_32 iphlpapi crypt32 bcrypt -lversion)
|
||||
if(DEPENDS)
|
||||
set(ICU_LIBRARIES icuio icui18n icuuc icudata icutu iconv)
|
||||
else()
|
||||
@@ -440,4 +304,86 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_SECURITY_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_FLAGS} ${STATIC_FLAGS}")
|
||||
|
||||
add_subdirectory(translations)
|
||||
|
||||
set(EXECUTABLE_FLAG)
|
||||
if(MINGW)
|
||||
set(EXECUTABLE_FLAG WIN32)
|
||||
set(ICON "${PROJECT_SOURCE_DIR}/images/appicon.ico")
|
||||
set(ICON_RC "${CMAKE_CURRENT_BINARY_DIR}/icon.rc")
|
||||
set(ICON_RES "${CMAKE_CURRENT_BINARY_DIR}/icon.o")
|
||||
file(WRITE "${ICON_RC}" "IDI_ICON1 ICON DISCARDABLE \"${ICON}\"")
|
||||
find_program(WINDRES_EXECUTABLE
|
||||
NAMES windres x86_64-w64-mingw32-windres
|
||||
REQUIRED
|
||||
CMAKE_FIND_ROOT_PATH_BOTH
|
||||
)
|
||||
add_custom_command(
|
||||
OUTPUT "${ICON_RES}"
|
||||
COMMAND "${WINDRES_EXECUTABLE}" "${ICON_RC}" "${ICON_RES}"
|
||||
MAIN_DEPENDENCY "${ICON_RC}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
set(ICON "${PROJECT_SOURCE_DIR}/images/appicon.icns")
|
||||
set_source_files_properties("${ICON}" PROPERTIES
|
||||
MACOSX_PACKAGE_LOCATION "Resources"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT ANDROID)
|
||||
add_executable(monero-wallet-gui ${EXECUTABLE_FLAG} ${ICON} ${ICON_RES})
|
||||
else()
|
||||
set(QT_ANDROID_MIN_SDK_VERSION 28 CACHE STRING "Minimum Android API level")
|
||||
set(QT_ANDROID_TARGET_SDK_VERSION 35 CACHE STRING "Target Android API level")
|
||||
qt_add_executable(monero-wallet-gui)
|
||||
set_target_properties(monero-wallet-gui PROPERTIES
|
||||
QT_ANDROID_MIN_SDK_VERSION "${QT_ANDROID_MIN_SDK_VERSION}"
|
||||
QT_ANDROID_TARGET_SDK_VERSION "${QT_ANDROID_TARGET_SDK_VERSION}"
|
||||
)
|
||||
target_compile_definitions(monero-wallet-gui PRIVATE ANDROID)
|
||||
endif()
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
include(src/qml-resources.cmake)
|
||||
|
||||
qt_policy(SET QTP0004 NEW)
|
||||
|
||||
set(QML_MODULE_OPTIONS)
|
||||
if(MINGW AND NOT CMAKE_GENERATOR MATCHES "Ninja")
|
||||
message(STATUS "Disabling QML cache generation: MinGW requires the Ninja generator")
|
||||
list(APPEND QML_MODULE_OPTIONS NO_CACHEGEN)
|
||||
endif()
|
||||
|
||||
qt_add_qml_module(monero-wallet-gui
|
||||
${QML_MODULE_OPTIONS}
|
||||
URI MoneroGUI
|
||||
VERSION 1.0
|
||||
RESOURCE_PREFIX /
|
||||
NO_RESOURCE_TARGET_PATH
|
||||
NO_GENERATE_EXTRA_QMLDIRS
|
||||
IMPORT_PATH
|
||||
"${CMAKE_SOURCE_DIR}/fonts"
|
||||
QML_FILES
|
||||
${GUI_QML_FILES}
|
||||
RESOURCES
|
||||
${GUI_ASSET_FILES}
|
||||
)
|
||||
|
||||
if(STATIC)
|
||||
qt_import_qml_plugins(monero-wallet-gui)
|
||||
endif()
|
||||
|
||||
if(APPLE AND WITH_SCANNER)
|
||||
qt_import_plugins(monero-wallet-gui INCLUDE Qt6::QDarwinCameraPermissionPlugin)
|
||||
target_link_options(monero-wallet-gui PRIVATE "-Wl,-u,_QDarwinCameraPermissionRequest")
|
||||
endif()
|
||||
|
||||
add_custom_command(TARGET monero-wallet-gui POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
$<TARGET_FILE:daemon>
|
||||
$<TARGET_FILE_DIR:monero-wallet-gui>
|
||||
)
|
||||
|
||||
install(TARGETS monero-wallet-gui DESTINATION bin)
|
||||
@@ -1,6 +1,6 @@
|
||||
# macOS:
|
||||
|
||||
Use macOS 10.12 - 10.13 for better backwards compability.
|
||||
Use macOS 12 for better backwards compability.
|
||||
|
||||
1. `HOMEBREW_OPTFLAGS="-march=core2" HOMEBREW_OPTIMIZATION_LEVEL="O0" brew install boost zmq libpgm libsodium expat protobuf@21 libgcrypt hidapi libusb cmake pkg-config && brew link protobuf@21`
|
||||
|
||||
@@ -12,9 +12,9 @@ Use macOS 10.12 - 10.13 for better backwards compability.
|
||||
|
||||
```bash
|
||||
mkdir build && cd build
|
||||
cmake -D CMAKE_BUILD_TYPE=Release -D ARCH=default -D CMAKE_PREFIX_PATH=/path/to/Qt5.12.8/5.12.8/clang_64 ..
|
||||
make
|
||||
make deploy
|
||||
cmake -S . -B build -G Ninja -D ARCH=default -D CMAKE_PREFIX_PATH=/path/to/Qt6.8.3/
|
||||
cmake --build build
|
||||
cmake --build build --target deploy
|
||||
```
|
||||
|
||||
5. Replace the `monerod` binary inside `monero-wallet-gui.app/Contents/MacOS/` with one built using deterministic builds / gitian.
|
||||
@@ -45,31 +45,3 @@ You can check if this step worked by using `codesign -dvvv monero-wallet-gui.app
|
||||
5. `xcrun notarytool info aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee --apple-id [email protected] --team-id XXXXXXXXXX`
|
||||
|
||||
6. `xcrun stapler staple -v monero-gui-mac-x64-v0.X.Y.Z.dmg`
|
||||
|
||||
## Compile Qt for Apple Silicon
|
||||
|
||||
Qt does not offer pre-built binaries for Apple Silicon, they have to be manually compiled.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/qt/qt5.git
|
||||
cd qt5
|
||||
git checkout v5.15.9-lts-lgpl
|
||||
./init-repository
|
||||
mkdir build
|
||||
cd build
|
||||
../configure -prefix /path/to/qt-build-dir/ -opensource -confirm-license -release -nomake examples -nomake tests -no-rpath -skip qtwebengine -skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtlocation -skip qtnetworkauth -skip qtpurchasing -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qttools -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras -skip gamepad -skip serialbus -skip location -skip webengine
|
||||
make
|
||||
make install
|
||||
cd ../qttools/src/linguist/lrelease
|
||||
../../../../build/qtbase/bin/qmake
|
||||
make
|
||||
make install
|
||||
cd ../../../../qttools/src/macdeployqt/macdeployqt/
|
||||
../../../../build/qtbase/bin/qmake
|
||||
make
|
||||
make install
|
||||
```
|
||||
|
||||
For compilation with Xcode 15 the following patch has to be applied: https://raw.githubusercontent.com/Homebrew/formula-patches/086e8cf/qt5/qt5-qmake-xcode15.patch
|
||||
|
||||
The `CMAKE_PREFIX_PATH` has to be set to `/path/to/qt-build-dir/` during monero-gui compilation.
|
||||
+152
-63
@@ -1,31 +1,39 @@
|
||||
FROM ubuntu:20.04
|
||||
FROM debian:bookworm
|
||||
|
||||
ARG THREADS=1
|
||||
ARG ANDROID_NDK_REVISION=23c
|
||||
ARG ANDROID_NDK_HASH=e5053c126a47e84726d9f7173a04686a71f9a67a
|
||||
ARG ANDROID_SDK_REVISION=7302050_latest
|
||||
ARG ANDROID_SDK_HASH=7a00faadc0864f78edd8f4908a629a46d622375cbe2e5814e82934aebecdb622
|
||||
ARG QT_VERSION=v5.15.19-lts-lgpl
|
||||
ARG QT_VERSION=v6.8.4-lts-lgpl
|
||||
ARG QT_COMMIT=487fcaa501534f0906dd2c19714f9052164142fc
|
||||
ARG ANDROID_NDK_REVISION=27d
|
||||
ARG ANDROID_NDK_HASH=601246087a682d1944e1e16dd85bc6e49560fe8b6d61255be2829178c8ed15d9
|
||||
ARG ANDROID_SDK_REVISION=11076708_latest
|
||||
ARG ANDROID_SDK_HASH=2d2d50857e4eb553af5a6dc3ad507a17adf43d115264b1afc116f95c92e5e258
|
||||
|
||||
WORKDIR /opt/android
|
||||
ENV WORKDIR=/opt/android
|
||||
|
||||
ENV ANDROID_NATIVE_API_LEVEL=31
|
||||
# Native libraries must use the minimum supported API.
|
||||
ENV ANDROID_NATIVE_API_LEVEL=28
|
||||
ENV ANDROID_API=android-${ANDROID_NATIVE_API_LEVEL}
|
||||
ENV ANDROID_TARGET_API_LEVEL=35
|
||||
ENV ANDROID_CLANG=aarch64-linux-android${ANDROID_NATIVE_API_LEVEL}-clang
|
||||
ENV ANDROID_CLANGPP=aarch64-linux-android${ANDROID_NATIVE_API_LEVEL}-clang++
|
||||
ENV ANDROID_NDK_ROOT=${WORKDIR}/android-ndk-r${ANDROID_NDK_REVISION}
|
||||
ENV ANDROID_SDK_ROOT=${WORKDIR}/cmdline-tools
|
||||
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
|
||||
ENV PATH=${JAVA_HOME}/bin:${PATH}
|
||||
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
|
||||
ENV QT_HOST_BUILD=${WORKDIR}/qt-host
|
||||
ENV QT_HOST_PREFIX=${QT_HOST_BUILD}/qtbase
|
||||
ENV PATH=${QT_HOST_PREFIX}/bin:${QT_HOST_PREFIX}/libexec:${JAVA_HOME}/bin:${PATH}
|
||||
ENV PREFIX=${WORKDIR}/prefix
|
||||
ENV LD_LIBRARY_PATH=${QT_HOST_PREFIX}/lib:${QT_HOST_PREFIX}
|
||||
ENV TOOLCHAIN_DIR=${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y ant automake build-essential ca-certificates-java file gettext git libc6 libncurses5 \
|
||||
libssl-dev libstdc++6 libtinfo5 libtool libz1 ninja-build openjdk-11-jdk-headless openjdk-11-jre-headless pkg-config python3 \
|
||||
unzip wget
|
||||
libdbus-1-3 libegl1 libfontconfig1 libfreetype6 libgl1-mesa-dev libglib2.0-0 libgssapi-krb5-2 libssl-dev \
|
||||
libstdc++6 libtinfo5 libtool libx11-6 libxkbcommon0 libz1 libzstd1 ninja-build openjdk-17-jdk-headless \
|
||||
openjdk-17-jre-headless pkg-config python3 unzip wget \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN PACKAGE_NAME=commandlinetools-linux-${ANDROID_SDK_REVISION}.zip \
|
||||
&& wget -q https://dl.google.com/android/repository/${PACKAGE_NAME} \
|
||||
@@ -35,15 +43,59 @@ RUN PACKAGE_NAME=commandlinetools-linux-${ANDROID_SDK_REVISION}.zip \
|
||||
|
||||
RUN PACKAGE_NAME=android-ndk-r${ANDROID_NDK_REVISION}-linux.zip \
|
||||
&& wget -q https://dl.google.com/android/repository/${PACKAGE_NAME} \
|
||||
&& echo "${ANDROID_NDK_HASH} ${PACKAGE_NAME}" | sha1sum -c \
|
||||
&& echo "${ANDROID_NDK_HASH} ${PACKAGE_NAME}" | sha256sum -c \
|
||||
&& unzip -q ${PACKAGE_NAME} \
|
||||
&& rm -f ${PACKAGE_NAME}
|
||||
|
||||
RUN echo y | ${ANDROID_SDK_ROOT}/bin/sdkmanager --sdk_root=${ANDROID_SDK_ROOT} "build-tools;28.0.3" "platforms;${ANDROID_API}" "tools" > /dev/null
|
||||
RUN yes | ${ANDROID_SDK_ROOT}/bin/sdkmanager --sdk_root=${ANDROID_SDK_ROOT} \
|
||||
"build-tools;35.0.1" "platforms;android-${ANDROID_TARGET_API_LEVEL}" > /dev/null
|
||||
|
||||
# Keep the pinned CMake version in sync with the Linux Docker build.
|
||||
RUN wget -q https://github.com/Kitware/CMake/releases/download/v4.3.3/cmake-4.3.3-linux-x86_64.tar.gz \
|
||||
&& echo "927b2368a946c37269c3a66225ab00544e756459cdd0b5d0da438694fb9ff802 cmake-4.3.3-linux-x86_64.tar.gz" | sha256sum -c \
|
||||
&& tar -xzf cmake-4.3.3-linux-x86_64.tar.gz -C /usr/local --strip-components=1 \
|
||||
&& rm cmake-4.3.3-linux-x86_64.tar.gz \
|
||||
&& cmake --version
|
||||
|
||||
ENV HOST_PATH=${PATH}
|
||||
ENV PATH=${TOOLCHAIN_DIR}/aarch64-linux-android/bin:${TOOLCHAIN_DIR}/bin:${PATH}
|
||||
|
||||
ARG QT_UNITY_BUILD=ON
|
||||
|
||||
RUN git clone https://github.com/qt/qt5.git -b ${QT_VERSION} --depth 1 qt-sources \
|
||||
&& git -C qt-sources reset --hard ${QT_COMMIT} \
|
||||
&& mkdir -p "${QT_HOST_BUILD}" \
|
||||
&& cd "${QT_HOST_BUILD}" \
|
||||
&& PATH=${HOST_PATH} ../qt-sources/configure -init-submodules \
|
||||
-submodules qtbase,qtdeclarative,qtshadertools,qttools \
|
||||
-skip qtactiveqt \
|
||||
-skip qtlanguageserver \
|
||||
-skip qtquicktimeline \
|
||||
-developer-build \
|
||||
-no-warnings-are-errors \
|
||||
-opensource \
|
||||
-confirm-license \
|
||||
-release \
|
||||
-no-feature-testlib \
|
||||
-no-feature-widgets \
|
||||
-no-feature-qml-debug \
|
||||
-no-feature-assistant \
|
||||
-no-feature-clang \
|
||||
-no-feature-clangcpp \
|
||||
-no-feature-designer \
|
||||
-no-feature-distancefieldgenerator \
|
||||
-no-feature-pixeltool \
|
||||
-no-feature-qdbus \
|
||||
-no-feature-qdoc \
|
||||
-no-feature-qev \
|
||||
-no-feature-qtattributionsscanner \
|
||||
-no-feature-qtdiag \
|
||||
-no-feature-qtplugininfo \
|
||||
-nomake examples \
|
||||
-nomake tests \
|
||||
-- -DQT_UNITY_BUILD="${QT_UNITY_BUILD}" \
|
||||
&& PATH=${HOST_PATH} cmake --build . --parallel ${THREADS} --target host_tools
|
||||
|
||||
ARG ZLIB_VERSION=1.3.1
|
||||
ARG ZLIB_HASH=9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23
|
||||
RUN wget -q https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz \
|
||||
@@ -56,41 +108,78 @@ RUN wget -q https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zl
|
||||
&& make -j${THREADS} install \
|
||||
&& rm -rf $(pwd)
|
||||
|
||||
RUN git clone https://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 \
|
||||
&& cd qt5 \
|
||||
&& git reset --hard dc2ac680fa9d0ef7b0d9520859593d13951bedea \
|
||||
&& perl init-repository --module-subset=default,-qtwebengine \
|
||||
&& PATH=${HOST_PATH} ./configure -v -developer-build -release \
|
||||
-xplatform android-clang \
|
||||
-android-ndk-platform ${ANDROID_API} \
|
||||
-android-ndk ${ANDROID_NDK_ROOT} \
|
||||
-android-sdk ${ANDROID_SDK_ROOT} \
|
||||
-android-ndk-host linux-x86_64 \
|
||||
-no-dbus \
|
||||
-opengl es2 \
|
||||
-no-use-gold-linker \
|
||||
-no-sql-mysql \
|
||||
-opensource -confirm-license \
|
||||
-android-arch arm64-v8a \
|
||||
-prefix ${PREFIX} \
|
||||
-nomake tools -nomake tests -nomake examples \
|
||||
-skip qtwebengine \
|
||||
-skip qtserialport \
|
||||
-skip qtconnectivity \
|
||||
-skip qttranslations \
|
||||
-skip qtpurchasing \
|
||||
-skip qtgamepad -skip qtscript -skip qtdoc \
|
||||
-no-warnings-are-errors \
|
||||
&& PATH=${HOST_PATH} make -j${THREADS} \
|
||||
&& PATH=${HOST_PATH} make -j${THREADS} install \
|
||||
&& cd qttools/src/linguist/lrelease \
|
||||
&& ../../../../qtbase/bin/qmake \
|
||||
&& PATH=${HOST_PATH} make -j${THREADS} install \
|
||||
&& cd ../../../.. \
|
||||
&& rm -rf $(pwd)
|
||||
# Backport the Android JNI unity exclusions from Qt 6.10.0; remove when updating
|
||||
# to a Qt version containing https://github.com/qt/qtbase/commit/6f92aada9abd4ec8e83e38eb953e987558af796d.
|
||||
# Initialize all target modules before patching: initialization rejects dirty submodules.
|
||||
RUN cd qt-sources \
|
||||
&& PATH=${HOST_PATH} ./init-repository --force --module-subset=qtbase,qtdeclarative,qtshadertools,qtsvg,qttools,qtmultimedia,-qtquick3d \
|
||||
&& wget -q -O /tmp/qt-android-unity.patch https://github.com/qt/qtbase/commit/6f92aada9abd4ec8e83e38eb953e987558af796d.patch \
|
||||
&& echo "5b657c5ddd625336cb3f132cdd92aeba4d2f87c24de7544bb52f5125ed9668ef /tmp/qt-android-unity.patch" | sha256sum -c \
|
||||
&& git -C qtbase apply /tmp/qt-android-unity.patch \
|
||||
&& rm /tmp/qt-android-unity.patch
|
||||
|
||||
ARG ICONV_VERSION=1.16
|
||||
ARG ICONV_HASH=e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04
|
||||
RUN mkdir qt-build-android \
|
||||
&& cd qt-build-android \
|
||||
&& PATH=${HOST_PATH} ../qt-sources/configure \
|
||||
-prefix ${PREFIX} \
|
||||
-qt-host-path "${QT_HOST_PREFIX}" \
|
||||
-android-ndk ${ANDROID_NDK_ROOT} \
|
||||
-android-sdk ${ANDROID_SDK_ROOT} \
|
||||
-android-abis arm64-v8a \
|
||||
-android-ndk-platform ${ANDROID_API} \
|
||||
-no-feature-ffmpeg \
|
||||
-opensource -confirm-license -release \
|
||||
-opengl es2 -no-dbus -no-openssl -no-feature-sql \
|
||||
-skip qtactiveqt \
|
||||
-skip qtlanguageserver \
|
||||
-skip qtquicktimeline \
|
||||
-skip qtquick3d \
|
||||
-no-feature-http \
|
||||
-no-feature-ssl \
|
||||
-no-feature-dtls \
|
||||
-no-feature-ocsp \
|
||||
-no-feature-networkproxy \
|
||||
-no-feature-socks5 \
|
||||
-no-feature-networkdiskcache \
|
||||
-no-feature-brotli \
|
||||
-no-feature-dnslookup \
|
||||
-no-feature-topleveldomain \
|
||||
-no-feature-udpsocket \
|
||||
-no-feature-system-proxies \
|
||||
-no-feature-sctp \
|
||||
-no-feature-qml-worker-script \
|
||||
-no-feature-testlib \
|
||||
-no-feature-quick-particles \
|
||||
-no-feature-qml-xmllistmodel \
|
||||
-no-feature-qml-debug \
|
||||
-no-feature-quickcontrols2-imagine \
|
||||
-no-feature-quickcontrols2-universal \
|
||||
-no-feature-quickcontrols2-fluentwinui3 \
|
||||
-no-feature-printsupport \
|
||||
-no-feature-pdf \
|
||||
-no-feature-vulkan \
|
||||
-no-feature-sessionmanager \
|
||||
-no-feature-assistant \
|
||||
-no-feature-designer \
|
||||
-no-feature-qdoc \
|
||||
-no-feature-clang \
|
||||
-no-feature-clangcpp \
|
||||
-no-feature-distancefieldgenerator \
|
||||
-no-feature-pixeltool \
|
||||
-no-feature-qdbus \
|
||||
-no-feature-qev \
|
||||
-no-feature-qtattributionsscanner \
|
||||
-no-feature-qtdiag \
|
||||
-no-feature-qtplugininfo \
|
||||
-nomake examples -nomake tests \
|
||||
-- -DQT_UNITY_BUILD="${QT_UNITY_BUILD}" \
|
||||
&& PATH=${HOST_PATH} cmake --build . --parallel ${THREADS} \
|
||||
&& PATH=${HOST_PATH} cmake --install . \
|
||||
&& cd .. \
|
||||
&& rm -rf qt-build-android qt-sources
|
||||
|
||||
ARG ICONV_VERSION=1.18
|
||||
ARG ICONV_HASH=3b08f5f4f9b4eb82f151a7040bfd6fe6c6fb922efe4b1659c66ea933276965e8
|
||||
RUN wget -q https://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz \
|
||||
&& echo "${ICONV_HASH} libiconv-${ICONV_VERSION}.tar.gz" | sha256sum -c \
|
||||
&& tar -xzf libiconv-${ICONV_VERSION}.tar.gz \
|
||||
@@ -198,42 +287,42 @@ RUN git clone -b libgcrypt-1.10.1 --depth 1 https://github.com/gpg/libgcrypt \
|
||||
&& make -j${THREADS} install \
|
||||
&& rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b v3.31.4 --depth 1 https://github.com/Kitware/CMake \
|
||||
&& cd CMake \
|
||||
&& git reset --hard 569b821a138a4d3f7f4cc42c0cf5ae5e68d56f96 \
|
||||
&& PATH=${HOST_PATH} ./bootstrap \
|
||||
&& PATH=${HOST_PATH} make -j${THREADS} \
|
||||
&& PATH=${HOST_PATH} make -j${THREADS} install \
|
||||
&& rm -rf $(pwd)
|
||||
|
||||
# Workaround
|
||||
# Keep only the SDK components required by androiddeployqt. Moving these out
|
||||
# of cmdline-tools also avoids sdkmanager treating its own directory as the
|
||||
# SDK root during deployment.
|
||||
ENV NEW_SDK_ROOT=${WORKDIR}/sdk
|
||||
RUN mkdir ${NEW_SDK_ROOT} \
|
||||
&& cp -r ${ANDROID_SDK_ROOT}/licenses ${NEW_SDK_ROOT} \
|
||||
&& cp -r ${ANDROID_SDK_ROOT}/platforms ${NEW_SDK_ROOT} \
|
||||
&& cp -r ${ANDROID_SDK_ROOT}/build-tools ${NEW_SDK_ROOT}
|
||||
&& cp -r ${ANDROID_SDK_ROOT}/build-tools ${NEW_SDK_ROOT} \
|
||||
&& rm -rf ${ANDROID_SDK_ROOT} \
|
||||
&& mv ${NEW_SDK_ROOT} ${ANDROID_SDK_ROOT}
|
||||
|
||||
COPY docker.gitconfig /etc/monero-gui.gitconfig
|
||||
RUN git config --system --add include.path /etc/monero-gui.gitconfig
|
||||
|
||||
CMD set -ex \
|
||||
&& cd /monero-gui \
|
||||
&& mkdir -p build/Android/release \
|
||||
&& cd build/Android/release \
|
||||
&& cmake -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" \
|
||||
&& cmake \
|
||||
-G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE="${PREFIX}/lib/cmake/Qt6/qt.toolchain.cmake" \
|
||||
-DCMAKE_PREFIX_PATH="${PREFIX}" \
|
||||
-DCMAKE_FIND_ROOT_PATH="${PREFIX}" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DARCH="armv8-a" \
|
||||
-DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL} \
|
||||
-DANDROID_PLATFORM=${ANDROID_API} \
|
||||
-DQT_ANDROID_MIN_SDK_VERSION=${ANDROID_NATIVE_API_LEVEL} \
|
||||
-DQT_ANDROID_TARGET_SDK_VERSION=${ANDROID_TARGET_API_LEVEL} \
|
||||
-DANDROID_ABI="arm64-v8a" \
|
||||
-DANDROID_TOOLCHAIN=clang \
|
||||
-DBoost_USE_STATIC_RUNTIME=ON \
|
||||
-DLRELEASE_PATH="${PREFIX}/bin" \
|
||||
-DQT_ANDROID_APPLICATION_BINARY="monero-wallet-gui" \
|
||||
-DANDROID_SDK="${NEW_SDK_ROOT}" \
|
||||
-DANDROID_SDK="${ANDROID_SDK_ROOT}" \
|
||||
-DWITH_SCANNER=ON \
|
||||
-DWITH_DESKTOP_ENTRY=OFF \
|
||||
../../.. \
|
||||
&& PATH=${HOST_PATH} cmake --build . --target generate_translations_header \
|
||||
&& sed -i -e "/^build .*monero-wallet-gui.*:.*LINKER/,/^$/ { s#monero/external/randomx/librandomx.a##; s#-lm#-lm monero/external/randomx/librandomx.a#; }" build.ninja \
|
||||
&& cmake --build . --target monero-wallet-gui \
|
||||
&& cmake --build . --target apk
|
||||
+92
-103
@@ -1,17 +1,55 @@
|
||||
FROM ubuntu:18.04
|
||||
FROM ubuntu:20.04
|
||||
|
||||
ARG THREADS=1
|
||||
ARG QT_VERSION=v5.15.19-lts-lgpl
|
||||
ARG QT_VERSION=v6.8.4-lts-lgpl
|
||||
ARG QT_COMMIT=487fcaa501534f0906dd2c19714f9052164142fc
|
||||
|
||||
ENV CFLAGS="-fPIC"
|
||||
ENV CPPFLAGS="-fPIC"
|
||||
ENV CXXFLAGS="-fPIC"
|
||||
ENV SOURCE_DATE_EPOCH=1397818193
|
||||
|
||||
ENV QT_PREFIX=/depends/x86_64-linux-gnu
|
||||
|
||||
ENV PATH="${QT_PREFIX}/bin:${PATH}"
|
||||
ENV CMAKE_PREFIX_PATH="${QT_PREFIX}"
|
||||
|
||||
RUN apt update && \
|
||||
apt install -y automake autopoint bison gettext git gperf libgl1-mesa-dev libglib2.0-dev ninja-build \
|
||||
libpng-dev libpthread-stubs0-dev libsodium-dev libtool-bin libudev-dev libusb-1.0-0-dev mesa-common-dev \
|
||||
pkg-config python wget xutils-dev
|
||||
DEBIAN_FRONTEND=noninteractive apt install -y \
|
||||
aria2 automake autopoint bison bzip2 ca-certificates curl gettext git g++ make \
|
||||
gperf libarchive-tools libexpat1-dev libgl1-mesa-dev libglib2.0-dev libpng-dev libpthread-stubs0-dev \
|
||||
libtool-bin libudev-dev mesa-common-dev \
|
||||
ninja-build pkg-config python3 python-is-python3 wget xutils-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN git clone -b v0.18.5.4 --depth 1 https://github.com/monero-project/monero && \
|
||||
cd monero && \
|
||||
git reset --hard 85f036ba7019cd36f08e8a38a27c37ea7b522618 && \
|
||||
cp -a contrib/depends / && \
|
||||
cd .. && \
|
||||
rm -rf monero
|
||||
|
||||
# TODO: Remove this workaround once a better solution is found.
|
||||
RUN sed -i 's|--openssldir=$(host_prefix)/etc/openssl|--openssldir=/etc/ssl|' /depends/packages/openssl.mk && \
|
||||
make -j"$THREADS" -C /depends HOST=x86_64-linux-gnu
|
||||
|
||||
# Use the pinned upstream CMake binary without changing the compiler or glibc
|
||||
# baseline. The Linux x86_64 binaries require glibc 2.17 or newer.
|
||||
RUN wget -q https://github.com/Kitware/CMake/releases/download/v4.3.3/cmake-4.3.3-linux-x86_64.tar.gz && \
|
||||
echo "927b2368a946c37269c3a66225ab00544e756459cdd0b5d0da438694fb9ff802 cmake-4.3.3-linux-x86_64.tar.gz" | sha256sum -c && \
|
||||
tar -xzf cmake-4.3.3-linux-x86_64.tar.gz -C /usr/local --strip-components=1 && \
|
||||
rm cmake-4.3.3-linux-x86_64.tar.gz && \
|
||||
cmake --version
|
||||
|
||||
RUN wget https://dbus.freedesktop.org/releases/dbus/dbus-1.12.2.tar.gz && \
|
||||
echo "272bb5091770b047c8188b926d5e6038fa4fe6745488b2add96b23e2d9a83d88 dbus-1.12.2.tar.gz" | sha256sum -c && \
|
||||
tar -xzf dbus-1.12.2.tar.gz && \
|
||||
rm dbus-1.12.2.tar.gz && \
|
||||
cd dbus-1.12.2 && \
|
||||
./configure --prefix="${QT_PREFIX}" --disable-shared --enable-static --disable-systemd --disable-launchd --disable-selinux --disable-apparmor --disable-libaudit --disable-xml-docs --disable-doxygen-docs --disable-ducktype-docs --disable-modular-tests --disable-embedded-tests --disable-x11-autolaunch --without-x --with-systemdsystemunitdir=no --with-systemduserunitdir=no && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b xorgproto-2020.1 --depth 1 https://gitlab.freedesktop.org/xorg/proto/xorgproto && \
|
||||
cd xorgproto && \
|
||||
@@ -21,9 +59,9 @@ RUN git clone -b xorgproto-2020.1 --depth 1 https://gitlab.freedesktop.org/xorg/
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b 1.12 --depth 1 https://gitlab.freedesktop.org/xorg/proto/xcbproto && \
|
||||
RUN git clone -b xcb-proto-1.17.0 --depth 1 https://gitlab.freedesktop.org/xorg/proto/xcbproto && \
|
||||
cd xcbproto && \
|
||||
git reset --hard 6398e42131eedddde0d98759067dde933191f049 && \
|
||||
git reset --hard 77d7fc04da729ddc5ed4aacf30253726fac24dca && \
|
||||
./autogen.sh && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
@@ -37,9 +75,9 @@ RUN git clone -b libXau-1.0.9 --depth 1 https://gitlab.freedesktop.org/xorg/lib/
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b 1.12 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb && \
|
||||
RUN git clone -b libxcb-1.17.0 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb && \
|
||||
cd libxcb && \
|
||||
git reset --hard d34785a34f28fa6a00f8ce00d87e3132ff0f6467 && \
|
||||
git reset --hard 622152ee42a310876f10602601206954b8d0613e && \
|
||||
./autogen.sh --enable-shared --disable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
@@ -156,96 +194,61 @@ RUN git clone -b release-64-2 --depth 1 https://github.com/unicode-org/icu && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN wget https://archives.boost.io/release/1.80.0/source/boost_1_80_0.tar.gz && \
|
||||
echo "4b2136f98bdd1f5857f1c3dea9ac2018effe65286cf251534b6ae20cc45e1847 boost_1_80_0.tar.gz" | sha256sum -c && \
|
||||
tar -xzf boost_1_80_0.tar.gz && \
|
||||
rm boost_1_80_0.tar.gz && \
|
||||
cd boost_1_80_0 && \
|
||||
./bootstrap.sh && \
|
||||
./b2 --with-atomic --with-system --with-filesystem --with-thread --with-date_time --with-chrono --with-regex --with-serialization --with-program_options --with-locale variant=release link=static runtime-link=static cflags="${CFLAGS}" cxxflags="${CXXFLAGS}" install -a --prefix=/usr && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN wget https://www.openssl.org/source/openssl-1.1.1u.tar.gz && \
|
||||
echo "e2f8d84b523eecd06c7be7626830370300fbcc15386bf5142d72758f6963ebc6 openssl-1.1.1u.tar.gz" | sha256sum -c && \
|
||||
tar -xzf openssl-1.1.1u.tar.gz && \
|
||||
rm openssl-1.1.1u.tar.gz && \
|
||||
cd openssl-1.1.1u && \
|
||||
./config no-shared no-zlib-dynamic --prefix=/usr --openssldir=/usr && \
|
||||
RUN git clone -b xcb-util-cursor-0.1.4 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-cursor && \
|
||||
cd libxcb-cursor && \
|
||||
git reset --hard 3d7e713e85af18d7e52cafdc9d20a2715048dee7 && \
|
||||
git submodule init && \
|
||||
git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
||||
git -C m4 reset --hard c617eee22ae5c285e79e81ec39ce96862fd3262f && \
|
||||
./autogen.sh --enable-shared --disable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN wget https://www.nlnetlabs.nl/downloads/unbound/unbound-1.16.2.tar.gz && \
|
||||
echo "2e32f283820c24c51ca1dd8afecfdb747c7385a137abe865c99db4b257403581 unbound-1.16.2.tar.gz" | sha256sum -c && \
|
||||
tar -xzf unbound-1.16.2.tar.gz && \
|
||||
rm unbound-1.16.2.tar.gz && \
|
||||
cd unbound-1.16.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 install && \
|
||||
rm -rf $(pwd)
|
||||
# CMake's FindFontconfig target does not expose the private dependencies of a
|
||||
# static Fontconfig build. Bundle them so Qt tools and downstream static links
|
||||
# do not depend on library ordering or pkg-config-specific metadata.
|
||||
RUN printf 'create /tmp/libfontconfig.a\naddlib /usr/local/lib/libfontconfig.a\naddlib /usr/local/lib/libfreetype.a\naddlib /usr/lib/libexpat.a\nsave\nend\n' | ar -M && \
|
||||
mv /tmp/libfontconfig.a /usr/local/lib/libfontconfig.a && \
|
||||
ldconfig
|
||||
|
||||
RUN rm /usr/lib/x86_64-linux-gnu/libX11.a && \
|
||||
rm /usr/lib/x86_64-linux-gnu/libXext.a && \
|
||||
rm /usr/lib/x86_64-linux-gnu/libX11-xcb.a && \
|
||||
git clone https://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 && \
|
||||
cd qt5 && \
|
||||
git reset --hard dc2ac680fa9d0ef7b0d9520859593d13951bedea && \
|
||||
git submodule update --init --depth 1 qtbase qtdeclarative qtgraphicaleffects qtimageformats qtmultimedia qtquickcontrols qtquickcontrols2 qtsvg qttools qttranslations qtx11extras && \
|
||||
ARG QT_UNITY_BUILD=ON
|
||||
|
||||
RUN rm -f /usr/lib/x86_64-linux-gnu/libX11.a \
|
||||
/usr/lib/x86_64-linux-gnu/libXext.a \
|
||||
/usr/lib/x86_64-linux-gnu/libX11-xcb.a && \
|
||||
git clone https://github.com/qt/qt5.git -b ${QT_VERSION} --depth 1 qt-sources && \
|
||||
git -C qt-sources reset --hard ${QT_COMMIT} && \
|
||||
sed -ri s/\(Libs:.*\)/\\1\ -lexpat/ /usr/local/lib/pkgconfig/fontconfig.pc && \
|
||||
sed -ri s/\(Libs:.*\)/\\1\ -lz/ /usr/local/lib/pkgconfig/freetype2.pc && \
|
||||
sed -ri s/\(Libs:.*\)/\\1\ -lXau/ /usr/local/lib/pkgconfig/xcb.pc && \
|
||||
sed -i s/\\/usr\\/X11R6\\/lib64/\\/usr\\/local\\/lib/ qtbase/mkspecs/linux-g++-64/qmake.conf && \
|
||||
./configure --prefix=/usr -platform linux-g++-64 -opensource -confirm-license -release -static -no-avx \
|
||||
-opengl desktop -qpa xcb -xcb -xcb-xlib -feature-xlib -system-freetype -fontconfig -glib \
|
||||
-no-dbus -no-feature-qml-worker-script -no-linuxfb -no-openssl -no-sql-sqlite -no-kms -no-use-gold-linker \
|
||||
-qt-harfbuzz -qt-libjpeg -qt-libpng -qt-pcre -qt-zlib \
|
||||
-skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d \
|
||||
-skip qtdoc -skip qtgamepad -skip qtlocation -skip qtmacextras -skip qtnetworkauth -skip qtpurchasing \
|
||||
-skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qttools \
|
||||
-skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview \
|
||||
-skip qtwinextras -skip qtx11extras -skip gamepad -skip serialbus -skip location -skip webengine \
|
||||
-nomake examples -nomake tests -nomake tools && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
cd qttools/src/linguist/lrelease && \
|
||||
../../../../qtbase/bin/qmake && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
cd ../../../.. && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b v1.0.26 --depth 1 https://github.com/libusb/libusb && \
|
||||
cd libusb && \
|
||||
git reset --hard 4239bc3a50014b8e6a5a2a59df1fff3b7469543b && \
|
||||
./autogen.sh --disable-shared --enable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b hidapi-0.15.0 --depth 1 https://github.com/libusb/hidapi && \
|
||||
cd hidapi && \
|
||||
git reset --hard d6b2a974608dec3b76fb1e36c189f22b9cf3650c && \
|
||||
./bootstrap && \
|
||||
./configure --disable-shared --enable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b v4.3.4 --depth 1 https://github.com/zeromq/libzmq && \
|
||||
cd libzmq && \
|
||||
git reset --hard 4097855ddaaa65ed7b5e8cb86d143842a594eebd && \
|
||||
./autogen.sh && \
|
||||
./configure --disable-shared --enable-static --disable-libunwind --with-libsodium && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
mkdir qt-build && \
|
||||
cd qt-build && \
|
||||
../qt-sources/configure -init-submodules \
|
||||
-submodules qtbase,qtdeclarative,qtshadertools,qtsvg,qttools \
|
||||
-prefix ${QT_PREFIX} -opensource -confirm-license -release -static -no-avx \
|
||||
-opengl desktop -xcb -no-feature-xlib -system-freetype -fontconfig -no-feature-eglfs -no-glib \
|
||||
-dbus-linked -no-feature-qml-worker-script -no-feature-linuxfb -no-openssl -no-feature-sql -no-feature-kms \
|
||||
-no-feature-testlib -no-feature-quick-particles -no-feature-qml-xmllistmodel -no-feature-qml-debug \
|
||||
-no-feature-quickcontrols2-imagine -no-feature-quickcontrols2-universal -no-feature-quickcontrols2-fluentwinui3 \
|
||||
-no-feature-printsupport -no-feature-pdf -no-feature-vulkan -no-feature-sessionmanager -no-feature-gtk3 \
|
||||
-no-feature-assistant -no-feature-clang -no-feature-clangcpp -no-feature-qdoc -no-feature-designer -no-feature-distancefieldgenerator \
|
||||
-no-feature-pixeltool -no-feature-qdbus -no-feature-qtattributionsscanner -no-feature-qtdiag -no-feature-qtplugininfo \
|
||||
-no-feature-http -no-feature-ssl -no-feature-dtls -no-feature-ocsp -no-feature-networkproxy -no-feature-socks5 -no-feature-networkdiskcache \
|
||||
-no-feature-brotli -no-feature-dnslookup -no-feature-topleveldomain -no-feature-udpsocket -no-feature-system-proxies \
|
||||
-no-feature-sctp -skip qtactiveqt -skip qtlanguageserver -skip qtquicktimeline -qt-harfbuzz -qt-libjpeg -qt-libpng -qt-pcre -qt-zlib \
|
||||
-nomake examples -nomake tests \
|
||||
-- -DQT_UNITY_BUILD="${QT_UNITY_BUILD}" && \
|
||||
cmake --build . --parallel $THREADS && \
|
||||
cmake --install . && \
|
||||
cd .. && \
|
||||
rm -rf qt-build qt-sources
|
||||
|
||||
RUN git clone -b libgpg-error-1.45 --depth 1 https://github.com/gpg/libgpg-error && \
|
||||
cd libgpg-error && \
|
||||
git reset --hard dbac537e5e865fb6f3aa8596d213aa8c47a9dea1 && \
|
||||
./autogen.sh && \
|
||||
./configure --disable-shared --enable-static --disable-doc --disable-tests && \
|
||||
./configure --disable-shared --enable-static --disable-doc --disable-tests --prefix="${QT_PREFIX}" && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
@@ -254,24 +257,10 @@ RUN git clone -b libgcrypt-1.10.1 --depth 1 https://github.com/gpg/libgcrypt &&
|
||||
cd libgcrypt && \
|
||||
git reset --hard ae0e567820c37f9640440b3cff77d7c185aa6742 && \
|
||||
./autogen.sh && \
|
||||
./configure --disable-shared --enable-static --disable-doc && \
|
||||
./configure --disable-shared --enable-static --disable-doc --with-gpg-error-prefix="${QT_PREFIX}" --prefix="${QT_PREFIX}" && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b v21.5 --depth 1 https://github.com/protocolbuffers/protobuf && \
|
||||
cd protobuf && \
|
||||
git reset --hard ab840345966d0fa8e7100d771c92a73bfbadd25c && \
|
||||
./autogen.sh && \
|
||||
./configure --enable-static --disable-shared && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b v3.24.0 --depth 1 https://github.com/Kitware/CMake && \
|
||||
cd CMake && \
|
||||
git reset --hard 4be24f031a4829db75b85062cc67125035d8831e && \
|
||||
./bootstrap && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
COPY docker.gitconfig /etc/monero-gui.gitconfig
|
||||
RUN git config --system --add include.path /etc/monero-gui.gitconfig
|
||||
+168
-43
@@ -1,62 +1,180 @@
|
||||
FROM ubuntu:20.04
|
||||
FROM ubuntu:24.04
|
||||
|
||||
ARG THREADS=1
|
||||
ARG QT_VERSION=v5.15.19-lts-lgpl
|
||||
ARG QT_VERSION=v6.8.4-lts-lgpl
|
||||
ARG QT_COMMIT=487fcaa501534f0906dd2c19714f9052164142fc
|
||||
|
||||
ENV SOURCE_DATE_EPOCH=1397818193
|
||||
ENV QT_HOST_BUILD=/opt/qt-host
|
||||
ENV QT_HOST_PREFIX=${QT_HOST_BUILD}/qtbase
|
||||
ENV LD_LIBRARY_PATH=${QT_HOST_PREFIX}/lib:${QT_HOST_PREFIX}
|
||||
ENV QT_TARGET_PREFIX=/depends/x86_64-w64-mingw32
|
||||
ENV PATH=${QT_HOST_PREFIX}/bin:${QT_HOST_PREFIX}/libexec:${PATH}
|
||||
|
||||
RUN apt update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt install -y build-essential cmake g++-mingw-w64 gettext git libtool ninja-build pkg-config \
|
||||
python && \
|
||||
DEBIAN_FRONTEND=noninteractive apt install -y \
|
||||
autoconf \
|
||||
automake \
|
||||
autopoint \
|
||||
bison \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
cmake \
|
||||
curl \
|
||||
flex \
|
||||
g++-mingw-w64 \
|
||||
gettext \
|
||||
git \
|
||||
gperf \
|
||||
libdbus-1-3 \
|
||||
libfontconfig1-dev \
|
||||
libglib2.0-0 \
|
||||
libgl1-mesa-dev \
|
||||
libgssapi-krb5-2 \
|
||||
libtool \
|
||||
libxkbcommon0 \
|
||||
ninja-build \
|
||||
perl \
|
||||
pkg-config \
|
||||
python3 \
|
||||
python-is-python3 \
|
||||
xz-utils && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
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)
|
||||
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)"
|
||||
|
||||
RUN git clone -b v0.18.5.1 --depth 1 https://github.com/monero-project/monero && \
|
||||
RUN git clone -b v0.18.5.4 --depth 1 https://github.com/monero-project/monero && \
|
||||
cd monero && \
|
||||
git reset --hard 4f92268d7c16741cfb41e5bbe2aa46cc260a9ea5 && \
|
||||
git reset --hard 85f036ba7019cd36f08e8a38a27c37ea7b522618 && \
|
||||
cp -a contrib/depends / && \
|
||||
cd .. && \
|
||||
rm -rf monero
|
||||
|
||||
RUN make -j$THREADS -C /depends HOST=x86_64-w64-mingw32 NO_QT=1
|
||||
RUN make -j"$THREADS" -C /depends HOST=x86_64-w64-mingw32
|
||||
|
||||
RUN git clone https://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 && \
|
||||
cd qt5 && \
|
||||
git reset --hard dc2ac680fa9d0ef7b0d9520859593d13951bedea && \
|
||||
git submodule update --init --depth 1 qtbase qtdeclarative qtgraphicaleffects qtimageformats qtmultimedia qtquickcontrols qtquickcontrols2 qtsvg qttools qttranslations && \
|
||||
./configure --prefix=/depends/x86_64-w64-mingw32 -xplatform win32-g++ \
|
||||
ARG QT_UNITY_BUILD=ON
|
||||
|
||||
RUN git clone https://github.com/qt/qt5.git -b "${QT_VERSION}" --depth 1 qt-sources && \
|
||||
git -C qt-sources reset --hard "${QT_COMMIT}" && \
|
||||
mkdir -p "${QT_HOST_BUILD}" && \
|
||||
cd "${QT_HOST_BUILD}" && \
|
||||
/qt-sources/configure -init-submodules \
|
||||
-submodules qtbase,qtdeclarative,qtshadertools,qttools \
|
||||
-skip qtactiveqt \
|
||||
-skip qtlanguageserver \
|
||||
-skip qtquicktimeline \
|
||||
-developer-build \
|
||||
-no-warnings-are-errors \
|
||||
-opensource \
|
||||
-confirm-license \
|
||||
-release \
|
||||
-no-feature-testlib \
|
||||
-no-feature-widgets \
|
||||
-no-feature-qml-debug \
|
||||
-no-feature-assistant \
|
||||
-no-feature-clang \
|
||||
-no-feature-clangcpp \
|
||||
-no-feature-designer \
|
||||
-no-feature-distancefieldgenerator \
|
||||
-no-feature-pixeltool \
|
||||
-no-feature-qdbus \
|
||||
-no-feature-qdoc \
|
||||
-no-feature-qev \
|
||||
-no-feature-qtattributionsscanner \
|
||||
-no-feature-qtdiag \
|
||||
-no-feature-qtplugininfo \
|
||||
-nomake examples \
|
||||
-nomake tests \
|
||||
-- -DQT_UNITY_BUILD="${QT_UNITY_BUILD}" && \
|
||||
cmake --build . --parallel "$THREADS" --target host_tools && \
|
||||
mkdir /qt-target-build && \
|
||||
cd /qt-target-build && \
|
||||
/qt-sources/configure -init-submodules \
|
||||
-submodules qtbase,qtdeclarative,qtshadertools,qtsvg,qttools \
|
||||
-skip qtactiveqt \
|
||||
-skip qtlanguageserver \
|
||||
-skip qtquicktimeline \
|
||||
-prefix "${QT_TARGET_PREFIX}" \
|
||||
-qt-host-path "${QT_HOST_PREFIX}" \
|
||||
-xplatform win32-g++ \
|
||||
-device-option CROSS_COMPILE=/usr/bin/x86_64-w64-mingw32- \
|
||||
-I $(pwd)/qtbase/src/3rdparty/angle/include \
|
||||
-opensource -confirm-license -release -static -static-runtime -opengl dynamic -no-angle \
|
||||
-no-avx -no-openssl -no-sql-sqlite \
|
||||
-no-feature-qml-worker-script -no-openssl -no-sql-sqlite \
|
||||
-qt-freetype -qt-harfbuzz -qt-libjpeg -qt-libpng -qt-pcre -qt-zlib \
|
||||
-skip gamepad -skip location -skip qt3d -skip qtactiveqt -skip qtandroidextras \
|
||||
-skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdoc \
|
||||
-skip qtgamepad -skip qtlocation -skip qtmacextras -skip qtnetworkauth -skip qtpurchasing \
|
||||
-skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport \
|
||||
-skip qtspeech -skip qttools -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel \
|
||||
-skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras \
|
||||
-skip serialbus -skip webengine \
|
||||
-nomake examples -nomake tests -nomake tools && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
cd qttools/src/linguist/lrelease && \
|
||||
../../../../qtbase/bin/qmake && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
cd ../../../.. && \
|
||||
rm -rf $(pwd)
|
||||
-opensource \
|
||||
-confirm-license \
|
||||
-release \
|
||||
-static \
|
||||
-static-runtime \
|
||||
-opengl dynamic \
|
||||
-no-avx \
|
||||
-no-openssl \
|
||||
-no-feature-sql \
|
||||
-no-feature-http \
|
||||
-no-feature-ssl \
|
||||
-no-feature-dtls \
|
||||
-no-feature-ocsp \
|
||||
-no-feature-networkproxy \
|
||||
-no-feature-socks5 \
|
||||
-no-feature-networkdiskcache \
|
||||
-no-feature-brotli \
|
||||
-no-feature-dnslookup \
|
||||
-no-feature-topleveldomain \
|
||||
-no-feature-udpsocket \
|
||||
-no-feature-system-proxies \
|
||||
-no-feature-sctp \
|
||||
-no-feature-schannel \
|
||||
-no-feature-qml-worker-script \
|
||||
-no-feature-testlib \
|
||||
-no-feature-quick-particles \
|
||||
-no-feature-qml-xmllistmodel \
|
||||
-no-feature-qml-debug \
|
||||
-no-feature-quickcontrols2-imagine \
|
||||
-no-feature-quickcontrols2-universal \
|
||||
-no-feature-quickcontrols2-fluentwinui3 \
|
||||
-no-feature-printsupport \
|
||||
-no-feature-pdf \
|
||||
-no-feature-vulkan \
|
||||
-no-feature-sessionmanager \
|
||||
-no-feature-assistant \
|
||||
-no-feature-designer \
|
||||
-no-feature-qdoc \
|
||||
-no-feature-clang \
|
||||
-no-feature-clangcpp \
|
||||
-no-feature-distancefieldgenerator \
|
||||
-no-feature-pixeltool \
|
||||
-no-feature-qdbus \
|
||||
-no-feature-qev \
|
||||
-no-feature-qtattributionsscanner \
|
||||
-no-feature-qtdiag \
|
||||
-no-feature-qtplugininfo \
|
||||
-qt-freetype \
|
||||
-qt-harfbuzz \
|
||||
-qt-libjpeg \
|
||||
-qt-libpng \
|
||||
-qt-pcre \
|
||||
-qt-zlib \
|
||||
-nomake examples \
|
||||
-nomake tests \
|
||||
-- \
|
||||
-DQT_UNITY_BUILD="${QT_UNITY_BUILD}" \
|
||||
-DCMAKE_TOOLCHAIN_FILE=/depends/x86_64-w64-mingw32/share/toolchain.cmake && \
|
||||
cmake --build . --parallel "$THREADS" && \
|
||||
cmake --install . && \
|
||||
cd / && \
|
||||
rm -rf qt-target-build qt-sources
|
||||
|
||||
RUN git clone -b libgpg-error-1.38 --depth 1 https://github.com/gpg/libgpg-error && \
|
||||
cd libgpg-error && \
|
||||
git reset --hard 71d278824c5fe61865f7927a2ed1aa3115f9e439 && \
|
||||
./autogen.sh && \
|
||||
./configure --disable-shared --enable-static --disable-doc --disable-tests \
|
||||
--host=x86_64-w64-mingw32 --prefix=/depends/x86_64-w64-mingw32 && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
./configure \
|
||||
--disable-shared \
|
||||
--enable-static \
|
||||
--disable-doc \
|
||||
--disable-tests \
|
||||
--host=x86_64-w64-mingw32 \
|
||||
--prefix=/depends/x86_64-w64-mingw32 && \
|
||||
make -j"$THREADS" && \
|
||||
make -j"$THREADS" install && \
|
||||
cd .. && \
|
||||
rm -rf libgpg-error
|
||||
|
||||
@@ -64,10 +182,17 @@ RUN git clone -b libgcrypt-1.8.5 --depth 1 https://github.com/gpg/libgcrypt && \
|
||||
cd libgcrypt && \
|
||||
git reset --hard 56606331bc2a80536db9fc11ad53695126007298 && \
|
||||
./autogen.sh && \
|
||||
./configure --disable-shared --enable-static --disable-doc \
|
||||
--host=x86_64-w64-mingw32 --prefix=/depends/x86_64-w64-mingw32 \
|
||||
./configure \
|
||||
--disable-shared \
|
||||
--enable-static \
|
||||
--disable-doc \
|
||||
--host=x86_64-w64-mingw32 \
|
||||
--prefix=/depends/x86_64-w64-mingw32 \
|
||||
--with-gpg-error-prefix=/depends/x86_64-w64-mingw32 && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
make -j"$THREADS" && \
|
||||
make -j"$THREADS" install && \
|
||||
cd .. && \
|
||||
rm -rf libgcrypt
|
||||
|
||||
COPY docker.gitconfig /etc/monero-gui.gitconfig
|
||||
RUN git config --system --add include.path /etc/monero-gui.gitconfig
|
||||
+15
-14
@@ -26,13 +26,11 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import moneroComponents.Wallet 1.0
|
||||
import moneroComponents.NetworkType 1.0
|
||||
import moneroComponents.Clipboard 1.0
|
||||
import FontAwesome 1.0
|
||||
|
||||
import "components" as MoneroComponents
|
||||
import "components/effects/" as MoneroEffects
|
||||
@@ -106,6 +104,9 @@ Rectangle {
|
||||
anchors.topMargin: (persistentSettings.customDecorations)? 50 : 0
|
||||
|
||||
Item {
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
|
||||
Item {
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
@@ -116,23 +117,23 @@ Rectangle {
|
||||
|
||||
Image {
|
||||
id: card
|
||||
visible: !isOpenGL || MoneroComponents.Style.blackTheme
|
||||
visible: GraphicsInfo.api === GraphicsInfo.Software || MoneroComponents.Style.blackTheme
|
||||
width: 260
|
||||
height: 135
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: MoneroComponents.Style.blackTheme ? "qrc:///images/card-background-black" + (currentAccountIndex % MoneroComponents.Style.accountColors.length) + ".png" : "qrc:///images/card-background-white.png"
|
||||
}
|
||||
|
||||
DropShadow {
|
||||
visible: isOpenGL && !MoneroComponents.Style.blackTheme
|
||||
MultiEffect {
|
||||
visible: GraphicsInfo.api !== GraphicsInfo.Software && !MoneroComponents.Style.blackTheme
|
||||
anchors.fill: card
|
||||
horizontalOffset: 3
|
||||
verticalOffset: 3
|
||||
radius: 10.0
|
||||
samples: 15
|
||||
color: "#3B000000"
|
||||
source: card
|
||||
cached: true
|
||||
shadowEnabled: true
|
||||
shadowHorizontalOffset: 3
|
||||
shadowVerticalOffset: 3
|
||||
shadowBlur: 0.625
|
||||
blurMax: 16
|
||||
shadowColor: "#3B000000"
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
@@ -308,7 +309,7 @@ Rectangle {
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: balancePart1MouseArea.clicked(mouse)
|
||||
onClicked: (mouse) => balancePart1MouseArea.clicked(mouse)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
ANDROID_STANDALONE_TOOLCHAIN_PATH ?= /usr/local/toolchain
|
||||
MANUAL_SUBMODULES ?= OFF
|
||||
QML_TESTS ?= OFF
|
||||
|
||||
dotgit=$(shell ls -d .git/config)
|
||||
ifeq ($(dotgit), .git/config)
|
||||
@@ -22,49 +23,45 @@ ifeq ($(USE_SINGLE_BUILDDIR), OFF)
|
||||
builddir := $(builddir)/$(branch)
|
||||
topdir := $(topdir)/..
|
||||
endif
|
||||
|
||||
deldirs := $(builddir)
|
||||
else
|
||||
deldirs := $(builddir)/debug $(builddir)/release $(builddir)/fuzz
|
||||
endif
|
||||
|
||||
default:
|
||||
mkdir -p build && cd build && cmake -G Ninja -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && cmake --build .
|
||||
mkdir -p build && cd build && cmake -G Ninja -D DEV_MODE=$(or ${DEV_MODE},OFF) -DQML_TESTS=${QML_TESTS} -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && cmake --build .
|
||||
debug:
|
||||
mkdir -p build && cd build && cmake -G Ninja -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D CMAKE_BUILD_TYPE=Debug .. && cmake --build . --verbose
|
||||
mkdir -p build && cd build && cmake -G Ninja -D DEV_MODE=$(or ${DEV_MODE},ON) -DQML_TESTS=${QML_TESTS} -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D CMAKE_BUILD_TYPE=Debug .. && cmake --build . --verbose
|
||||
|
||||
depends:
|
||||
mkdir -p build/$(target)/release
|
||||
cd build/$(target)/release && cmake -G Ninja -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 ../../.. && cmake --build .
|
||||
cd build/$(target)/release && cmake -G Ninja -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},OFF) -DQML_TESTS=${QML_TESTS} -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D BUILD_TAG=$(tag) -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$(root)/$(target)/share/toolchain.cmake ../../.. && cmake --build .
|
||||
|
||||
devmode:
|
||||
mkdir -p build && cd build && cmake -G Ninja -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && cmake --build .
|
||||
mkdir -p build && cd build && cmake -G Ninja -D DEV_MODE=$(or ${DEV_MODE},ON) -DQML_TESTS=${QML_TESTS} -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && cmake --build .
|
||||
clean:
|
||||
mkdir -p build && cd build && rm -rf *
|
||||
scanner:
|
||||
mkdir -p build && cd build && cmake -G Ninja -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D WITH_SCANNER=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && cmake --build .
|
||||
mkdir -p build && cd build && cmake -G Ninja -D DEV_MODE=$(or ${DEV_MODE},ON) -DQML_TESTS=${QML_TESTS} -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D WITH_SCANNER=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && cmake --build .
|
||||
|
||||
release:
|
||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -G Ninja -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D CMAKE_BUILD_TYPE=Release $(topdir) && cmake --build .
|
||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -G Ninja -D DEV_MODE=$(or ${DEV_MODE},OFF) -DQML_TESTS=${QML_TESTS} -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D CMAKE_BUILD_TYPE=Release $(topdir) && cmake --build .
|
||||
|
||||
release-linux-armv8:
|
||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -G Ninja -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) && cmake --build .
|
||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -G Ninja -D DEV_MODE=$(or ${DEV_MODE},OFF) -DQML_TESTS=${QML_TESTS} -D ARCH="armv8-a" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-armv8" $(topdir) && cmake --build .
|
||||
|
||||
release-linux-ppc64le:
|
||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -G Ninja -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="ppc64le" -D CMAKE_BUILD_TYPE=Release $(topdir) && cmake --build .
|
||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -G Ninja -D DEV_MODE=$(or ${DEV_MODE},OFF) -DQML_TESTS=${QML_TESTS} -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="ppc64le" -D CMAKE_BUILD_TYPE=Release $(topdir) && cmake --build .
|
||||
|
||||
release-static:
|
||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -G Ninja -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) && cmake --build .
|
||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -G Ninja -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},OFF) -DQML_TESTS=${QML_TESTS} -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release $(topdir) && cmake --build .
|
||||
|
||||
debug-static-win64:
|
||||
mkdir -p $(builddir)/debug && cd $(builddir)/debug && cmake -D STATIC=ON -G Ninja -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Debug -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) -D MINGW=ON $(topdir) && cmake --build .
|
||||
mkdir -p $(builddir)/debug && cd $(builddir)/debug && cmake -D STATIC=ON -G Ninja -D DEV_MODE=$(or ${DEV_MODE},ON) -DQML_TESTS=${QML_TESTS} -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Debug -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) -D MINGW=ON $(topdir) && cmake --build .
|
||||
|
||||
debug-static-mac64:
|
||||
mkdir -p $(builddir)/debug
|
||||
cd $(builddir)/debug && cmake -G Ninja -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Debug -D BUILD_TAG="mac-x64" $(topdir) && cmake --build .
|
||||
cd $(builddir)/debug && cmake -G Ninja -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},ON) -DQML_TESTS=${QML_TESTS} -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Debug -D BUILD_TAG="mac-x64" $(topdir) && cmake --build .
|
||||
|
||||
release-static-win64:
|
||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=ON -G Ninja -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" $(topdir) && cmake --build .
|
||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=ON -G Ninja -D DEV_MODE=$(or ${DEV_MODE},OFF) -DQML_TESTS=${QML_TESTS} -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" $(topdir) && cmake --build .
|
||||
|
||||
release-win64:
|
||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=OFF -G Ninja -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" $(topdir) && cmake --build .
|
||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=OFF -G Ninja -D DEV_MODE=$(or ${DEV_MODE},OFF) -DQML_TESTS=${QML_TESTS} -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" $(topdir) && cmake --build .
|
||||
+13
-28
@@ -27,12 +27,10 @@
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
import QtQml 2.0
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQml
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import moneroComponents.Wallet 1.0
|
||||
|
||||
import "./pages"
|
||||
@@ -98,8 +96,13 @@ Rectangle {
|
||||
}
|
||||
previousView = currentView
|
||||
if (currentView) {
|
||||
stackView.replace(currentView)
|
||||
// Component.onCompleted is called before wallet is initilized
|
||||
if (stackView.currentItem !== currentView) {
|
||||
if (stackView.depth > 0) {
|
||||
stackView.replace(currentView)
|
||||
} else {
|
||||
stackView.push(currentView)
|
||||
}
|
||||
}
|
||||
if (typeof currentView.onPageCompleted === "function") {
|
||||
currentView.onPageCompleted();
|
||||
}
|
||||
@@ -191,6 +194,8 @@ Rectangle {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: persistentSettings.customDecorations ? 15 : 10
|
||||
onActiveChanged: if (!active && !isMac) active = true
|
||||
palette.mid: "#8E8E93"
|
||||
palette.dark: "#B8B8BD"
|
||||
}
|
||||
|
||||
onFlickingChanged: {
|
||||
@@ -204,26 +209,6 @@ Rectangle {
|
||||
anchors.fill:parent
|
||||
clip: true // otherwise animation will affect left panel
|
||||
|
||||
delegate: StackViewDelegate {
|
||||
pushTransition: StackViewTransition {
|
||||
PropertyAnimation {
|
||||
target: enterItem
|
||||
property: "x"
|
||||
from: 0 - target.width
|
||||
to: 0
|
||||
duration: 300
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
PropertyAnimation {
|
||||
target: exitItem
|
||||
property: "x"
|
||||
from: 0
|
||||
to: target.width
|
||||
duration: 300
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}// flickable
|
||||
|
||||
@@ -94,7 +94,7 @@ Packaging for your favorite distribution would be a welcome contribution!
|
||||
|
||||
## Compiling the Monero GUI from source
|
||||
|
||||
*Note*: Qt 5.12 is the minimum version required to build the GUI.
|
||||
*Note*: Qt 6.8 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/release-v0.18/contrib/gitian/README.md).
|
||||
|
||||
@@ -107,7 +107,7 @@ Packaging for your favorite distribution would be a welcome contribution!
|
||||
```
|
||||
git clone --branch master --recursive https://github.com/monero-project/monero-gui.git
|
||||
```
|
||||
\* `master` - replace with the desired version tag (e.g. `v0.18.5.1`) to build the release binaries.
|
||||
\* `master` - replace with the desired version tag (e.g. `v0.18.5.4`) to build the release binaries.
|
||||
3. Prepare build environment
|
||||
```
|
||||
cd monero-gui
|
||||
@@ -130,7 +130,7 @@ Packaging for your favorite distribution would be a welcome contribution!
|
||||
```
|
||||
git clone --branch master --recursive https://github.com/monero-project/monero-gui.git
|
||||
```
|
||||
\* `master` - replace with the desired version tag (e.g. `v0.18.5.1`) to build the release binaries.
|
||||
\* `master` - replace with the desired version tag (e.g. `v0.18.5.4`) to build the release binaries.
|
||||
3. Prepare build environment
|
||||
```
|
||||
cd monero-gui
|
||||
@@ -138,17 +138,22 @@ Packaging for your favorite distribution would be a welcome contribution!
|
||||
```
|
||||
\* `4` - number of CPU threads to use
|
||||
|
||||
The image builds the non-Qt dependencies with Monero's `contrib/depends`
|
||||
system and installs Qt into the resulting `/depends/x86_64-linux-gnu`
|
||||
prefix.
|
||||
|
||||
4. Build
|
||||
```
|
||||
docker run --rm -it -v <MONERO_GUI_DIR_FULL_PATH>:/monero-gui -w /monero-gui monero:build-env-linux sh -c 'make release-static'
|
||||
docker run --rm -it -v <MONERO_GUI_DIR_FULL_PATH>:/monero-gui -w /monero-gui monero:build-env-linux sh -c 'make depends root=/depends target=x86_64-linux-gnu tag=linux-x64'
|
||||
```
|
||||
\* `<MONERO_GUI_DIR_FULL_PATH>` - absolute path to `monero-gui` directory
|
||||
\* Set `CMAKE_BUILD_PARALLEL_LEVEL` to control the number of parallel build jobs, e.g. add `-e CMAKE_BUILD_PARALLEL_LEVEL=4` to the `docker run` command
|
||||
5. Monero GUI Linux static binary will be placed in `monero-gui/build/release/bin` directory
|
||||
|
||||
5. Monero GUI Linux static binary will be placed in `monero-gui/build/x86_64-linux-gnu/release/bin` directory
|
||||
6. (*Note*) This process is only for building `monero-wallet-gui`, `monerod` has to be built separately according to the instructions in the `monero` repository.
|
||||
7. (*Optional*) Compare `monero-wallet-gui` SHA-256 hash to the one obtained from a trusted source
|
||||
```
|
||||
docker run --rm -it -v <MONERO_GUI_DIR_FULL_PATH>:/monero-gui -w /monero-gui monero:build-env-linux sh -c 'shasum -a 256 /monero-gui/build/release/bin/monero-wallet-gui'
|
||||
docker run --rm -it -v <MONERO_GUI_DIR_FULL_PATH>:/monero-gui -w /monero-gui monero:build-env-linux sh -c 'shasum -a 256 /monero-gui/build/x86_64-linux-gnu/release/bin/monero-wallet-gui'
|
||||
```
|
||||
\* `<MONERO_GUI_DIR_FULL_PATH>` - absolute path to `monero-gui` directory
|
||||
|
||||
@@ -201,9 +206,34 @@ Packaging for your favorite distribution would be a welcome contribution!
|
||||
http://<your.local.ip>:8080/QtApp-debug.apk
|
||||
```
|
||||
|
||||
### Building on Linux
|
||||
### Comparing Docker Qt build times
|
||||
|
||||
(Tested on Ubuntu 17.10 x64, Ubuntu 18.04 x64 and Gentoo x64)
|
||||
`Dockerfile.linux`, `Dockerfile.windows`, and `Dockerfile.android` enable Qt unity
|
||||
builds by default. Add `--build-arg QT_UNITY_BUILD=OFF` to disable them, or
|
||||
`--build-arg QT_UNITY_BUILD=ON` to enable them explicitly. Use the same setting
|
||||
when comparing reproducible binary hashes.
|
||||
|
||||
To compare fresh Qt builds, run both variants sequentially on the same builder
|
||||
with the same CPU and memory allocation, thread count, and platform. For example,
|
||||
from the repository root on an amd64 builder:
|
||||
|
||||
```sh
|
||||
docker build --no-cache --progress=plain --platform linux/amd64 \
|
||||
--build-arg THREADS=4 --build-arg QT_UNITY_BUILD=OFF \
|
||||
--tag monero:build-env-linux-unity-off --file Dockerfile.linux . \
|
||||
> qt-unity-off.log 2>&1
|
||||
docker build --no-cache --progress=plain --platform linux/amd64 \
|
||||
--build-arg THREADS=4 --build-arg QT_UNITY_BUILD=ON \
|
||||
--tag monero:build-env-linux-unity-on --file Dockerfile.linux . \
|
||||
> qt-unity-on.log 2>&1
|
||||
```
|
||||
|
||||
Compare the Qt build step durations in the two logs as well as total image build
|
||||
time; downloads and other dependencies can affect the total. For Windows or
|
||||
Android, substitute the corresponding Dockerfile and image tags, and include
|
||||
both the host-tools and target Qt build steps in the comparison.
|
||||
|
||||
### Building on Linux
|
||||
|
||||
1. Install Monero dependencies
|
||||
|
||||
@@ -221,32 +251,32 @@ Packaging for your favorite distribution would be a welcome contribution!
|
||||
|
||||
2. Install Qt:
|
||||
|
||||
*Note*: The Qt 5.12 or newer requirement makes **some** distributions (mostly based on Debian, like Ubuntu 16.x or Linux Mint 18.x) obsolete due to their repositories containing an older Qt version.
|
||||
*Note*: The Qt 6.8 or newer requirement makes **some** distributions obsolete due to their repositories containing an older Qt version.
|
||||
|
||||
The recommended way is to install 5.12 or newer from the [official Qt installer](https://www.qt.io/download-qt-installer) or [compiling it yourself](https://wiki.qt.io/Install_Qt_5_on_Ubuntu). This ensures you have the correct version. Higher versions *can* work but as it differs from our production build target, slight differences may occur.
|
||||
The recommended way is to install 6.8 or newer from the [official Qt installer](https://www.qt.io/download-qt-installer) or [compiling it yourself](https://doc.qt.io/qt-6/build-sources.html). This ensures you have the correct version. Higher versions *can* work but as it differs from our production build target, slight differences may occur.
|
||||
|
||||
The following instructions will fetch Qt from your distribution's repositories instead. Take note of what version it installs. Your mileage may vary.
|
||||
|
||||
- For Debian distributions (Debian, Ubuntu, Mint, Tails...)
|
||||
|
||||
`sudo apt install qtbase5-dev qtdeclarative5-dev qml-module-qtqml-models2 qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-xmllistmodel qml-module-qt-labs-settings qml-module-qt-labs-platform qml-module-qt-labs-folderlistmodel qttools5-dev-tools qml-module-qtquick-templates2 libqt5svg5-dev`
|
||||
`sudo apt install qt6-base-dev qt6-declarative-dev qt6-svg-dev qt6-tools-dev qt6-tools-dev-tools qml6-module-qtcore qml6-module-qtqml qml6-module-qtqml-models qml6-module-qtquick qml6-module-qtquick-controls qml6-module-qtquick-dialogs qml6-module-qtquick-effects qml6-module-qtquick-layouts qml6-module-qtquick-shapes qml6-module-qtquick-window qml6-module-qt-labs-folderlistmodel qml6-module-qt-labs-platform`
|
||||
|
||||
- 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/qtbase:6 dev-qt/qtdeclarative:6 dev-qt/qtsvg:6 dev-qt/qttools:6`
|
||||
|
||||
- Optional : To build the flag `WITH_SCANNER`
|
||||
|
||||
- For Debian distributions (Debian, Ubuntu, Mint, Tails...)
|
||||
|
||||
`sudo apt install qtmultimedia5-dev qml-module-qtmultimedia`
|
||||
`sudo apt install qt6-multimedia-dev qml6-module-qtmultimedia`
|
||||
|
||||
- For Gentoo
|
||||
|
||||
`emerge dev-qt/qtmultimedia:5`
|
||||
`emerge dev-qt/qtmultimedia:6`
|
||||
|
||||
|
||||
3. Clone repository
|
||||
@@ -262,7 +292,7 @@ The following instructions will fetch Qt from your distribution's repositories i
|
||||
make release
|
||||
```
|
||||
|
||||
\* 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`
|
||||
\* Add `CMAKE_PREFIX_PATH` environment variable to set a custom Qt install directory, e.g. `CMAKE_PREFIX_PATH=$HOME/Qt/6.8.3/gcc_64 make release`
|
||||
\* Set `CMAKE_BUILD_PARALLEL_LEVEL` to control the number of parallel build jobs, e.g. `CMAKE_BUILD_PARALLEL_LEVEL=4 make release`
|
||||
|
||||
The executable can be found in the build/release/bin folder.
|
||||
@@ -279,7 +309,7 @@ The executable can be found in the build/release/bin folder.
|
||||
|
||||
4. Install Qt:
|
||||
|
||||
`brew install qt5` (or download QT 5.12+ from [qt.io](https://www.qt.io/download-open-source/))
|
||||
`brew install qt` (or download Qt 6.8+ from [qt.io](https://www.qt.io/download-open-source/))
|
||||
|
||||
5. Grab an up-to-date copy of the monero-gui repository
|
||||
|
||||
@@ -293,7 +323,7 @@ The executable can be found in the build/release/bin folder.
|
||||
```
|
||||
make release
|
||||
```
|
||||
\* 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`
|
||||
\* Add `CMAKE_PREFIX_PATH` environment variable to set a custom Qt install directory, e.g. `CMAKE_PREFIX_PATH=$HOME/Qt/6.8.3/macos make release`
|
||||
\* Set `CMAKE_BUILD_PARALLEL_LEVEL` to control the number of parallel build jobs, e.g. `CMAKE_BUILD_PARALLEL_LEVEL=4 make release`
|
||||
|
||||
The executable can be found in the `build/release/bin` folder.
|
||||
@@ -316,10 +346,10 @@ The Monero GUI on Windows is 64 bits only; 32-bit Windows GUI builds are not off
|
||||
|
||||
You find more details about those dependencies in the [Monero documentation](https://github.com/monero-project/monero). Note that that there is no more need to compile Boost from source; like everything else, you can install it now with a MSYS2 package.
|
||||
|
||||
4. Install Qt5
|
||||
4. Install Qt6
|
||||
|
||||
```
|
||||
pacman -S mingw-w64-x86_64-qt5
|
||||
pacman -S mingw-w64-x86_64-qt6-base mingw-w64-x86_64-qt6-declarative mingw-w64-x86_64-qt6-svg mingw-w64-x86_64-qt6-tools
|
||||
```
|
||||
|
||||
There is no more need to download some special installer from the Qt website, the standard MSYS2 package for Qt will do in almost all circumstances.
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
if(NOT DEFINED EXECUTABLE)
|
||||
message(FATAL_ERROR "EXECUTABLE is not set")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED INSTALL_NAME_TOOL)
|
||||
set(INSTALL_NAME_TOOL install_name_tool)
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND otool -l "${EXECUTABLE}"
|
||||
OUTPUT_VARIABLE _otool_output
|
||||
RESULT_VARIABLE _otool_result
|
||||
)
|
||||
|
||||
if(NOT _otool_result EQUAL 0)
|
||||
message(FATAL_ERROR "Failed to read rpaths from ${EXECUTABLE}")
|
||||
endif()
|
||||
|
||||
string(REGEX MATCHALL "path (/opt/homebrew|/usr/local)[^ \n]*" _homebrew_rpath_lines "${_otool_output}")
|
||||
|
||||
foreach(_line IN LISTS _homebrew_rpath_lines)
|
||||
string(REGEX REPLACE "^path " "" _rpath "${_line}")
|
||||
|
||||
message(STATUS "Deleting Homebrew rpath: ${_rpath}")
|
||||
|
||||
execute_process(
|
||||
COMMAND "${INSTALL_NAME_TOOL}" -delete_rpath "${_rpath}" "${EXECUTABLE}"
|
||||
RESULT_VARIABLE _delete_result
|
||||
OUTPUT_QUIET
|
||||
ERROR_QUIET
|
||||
)
|
||||
endforeach()
|
||||
+65
-36
@@ -1,45 +1,66 @@
|
||||
if(APPLE OR (WIN32 AND NOT STATIC))
|
||||
add_custom_target(deploy)
|
||||
get_target_property(_qmake_executable Qt5::qmake IMPORTED_LOCATION)
|
||||
get_target_property(_qmake_executable Qt6::qmake IMPORTED_LOCATION)
|
||||
get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY)
|
||||
|
||||
if(APPLE AND NOT IOS)
|
||||
find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${_qt_bin_dir}")
|
||||
add_custom_command(TARGET deploy
|
||||
POST_BUILD
|
||||
COMMAND "${MACDEPLOYQT_EXECUTABLE}" "$<TARGET_FILE_DIR:monero-wallet-gui>/../.." -always-overwrite -qmldir="${CMAKE_SOURCE_DIR}"
|
||||
COMMENT "Running macdeployqt..."
|
||||
)
|
||||
|
||||
# workaround for a Qt bug that requires manually adding libqsvg.dylib to bundle
|
||||
find_file(_qt_svg_dylib "libqsvg.dylib" PATHS "${CMAKE_PREFIX_PATH}/plugins/imageformats" NO_DEFAULT_PATH)
|
||||
if(_qt_svg_dylib)
|
||||
add_custom_command(TARGET deploy
|
||||
POST_BUILD
|
||||
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.framework/Versions/5/QtGui" $<TARGET_FILE_DIR:monero-wallet-gui>/../PlugIns/imageformats/libqsvg.dylib
|
||||
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtWidgets.framework/Versions/5/QtWidgets" "@executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets" $<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/QtSvg.framework/Versions/5/QtSvg" $<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/QtCore.framework/Versions/5/QtCore" $<TARGET_FILE_DIR:monero-wallet-gui>/../PlugIns/imageformats/libqsvg.dylib
|
||||
COMMENT "Copying libqsvg.dylib, running install_name_tool"
|
||||
|
||||
)
|
||||
endif()
|
||||
|
||||
# Copy Boost dylibs that macdeployqt doesn't pick up
|
||||
# Help macdeployqt resolve transitive @rpath dependencies.
|
||||
find_package(Boost QUIET COMPONENTS atomic container date_time)
|
||||
set(_boost_extras Boost::atomic Boost::container Boost::date_time)
|
||||
foreach(_tgt IN LISTS _boost_extras)
|
||||
find_package(Protobuf QUIET)
|
||||
set(_macdeployqt_library_options)
|
||||
foreach(_tgt Boost::atomic Boost::container Boost::date_time protobuf::libprotobuf)
|
||||
if(TARGET ${_tgt})
|
||||
add_custom_command(TARGET deploy POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
"$<TARGET_FILE:${_tgt}>"
|
||||
"$<TARGET_FILE_DIR:monero-wallet-gui>/../Frameworks/"
|
||||
COMMENT "Copying $<TARGET_FILE_NAME:${_tgt}>"
|
||||
list(APPEND _macdeployqt_library_options
|
||||
"-libpath=$<TARGET_FILE_DIR:${_tgt}>"
|
||||
)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# macdeployqt skips Boost's @loader_path dependencies. Copy them first.
|
||||
foreach(_tgt Boost::atomic Boost::container Boost::date_time)
|
||||
if(TARGET ${_tgt})
|
||||
add_custom_command(TARGET deploy POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory
|
||||
"$<TARGET_FILE_DIR:monero-wallet-gui>/../Frameworks"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
"$<TARGET_FILE:${_tgt}>"
|
||||
"$<TARGET_FILE_DIR:monero-wallet-gui>/../Frameworks/"
|
||||
VERBATIM
|
||||
COMMENT "Copying $<TARGET_FILE_NAME:${_tgt}>"
|
||||
)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
find_library(_abseil_strings_dylib
|
||||
NAMES absl_strings
|
||||
HINTS /opt/homebrew/opt/abseil/lib /usr/local/opt/abseil/lib
|
||||
)
|
||||
if(_abseil_strings_dylib)
|
||||
get_filename_component(_abseil_lib_dir "${_abseil_strings_dylib}" DIRECTORY)
|
||||
list(APPEND _macdeployqt_library_options "-libpath=${_abseil_lib_dir}")
|
||||
endif()
|
||||
|
||||
add_custom_command(TARGET deploy
|
||||
POST_BUILD
|
||||
COMMAND "${MACDEPLOYQT_EXECUTABLE}" "$<TARGET_FILE_DIR:monero-wallet-gui>/../.."
|
||||
-always-overwrite "-qmldir=${CMAKE_SOURCE_DIR}" ${_macdeployqt_library_options}
|
||||
COMMAND_EXPAND_LISTS
|
||||
VERBATIM
|
||||
COMMENT "Running macdeployqt..."
|
||||
)
|
||||
|
||||
# Remove Homebrew rpaths from the executable.
|
||||
# These can make the app load local Homebrew libraries instead of bundled libraries.
|
||||
add_custom_command(TARGET deploy
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DEXECUTABLE=$<TARGET_FILE:monero-wallet-gui>
|
||||
-DINSTALL_NAME_TOOL=${CMAKE_INSTALL_NAME_TOOL}
|
||||
-P ${CMAKE_SOURCE_DIR}/cmake/DeleteHomebrewRpaths.cmake
|
||||
COMMENT "Removing Homebrew rpaths from app executable"
|
||||
)
|
||||
|
||||
# Apple Silicon requires all binaries to be codesigned
|
||||
find_program(CODESIGN_EXECUTABLE NAMES codesign)
|
||||
if(CODESIGN_EXECUTABLE)
|
||||
@@ -53,11 +74,22 @@ if(APPLE OR (WIN32 AND NOT STATIC))
|
||||
elseif(WIN32)
|
||||
find_program(QMAKE_EXECUTABLE qmake HINTS "${_qt_bin_dir}")
|
||||
find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${_qt_bin_dir}")
|
||||
if(NOT QMAKE_EXECUTABLE OR NOT WINDEPLOYQT_EXECUTABLE)
|
||||
message(WARNING "Deploy requires qmake.exe and windeployqt.exe (no -qt5 suffix) in ${_qt_bin_dir}")
|
||||
set(QMLIMPORTSCANNER_EXECUTABLE "${_qt_bin_dir}/qmlimportscanner${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
if(NOT QMAKE_EXECUTABLE OR NOT WINDEPLOYQT_EXECUTABLE OR
|
||||
NOT EXISTS "${QMLIMPORTSCANNER_EXECUTABLE}")
|
||||
message(WARNING "Deploy requires qmake, windeployqt, and qmlimportscanner in ${_qt_bin_dir}")
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND "${QMAKE_EXECUTABLE}" -query QT_INSTALL_QML
|
||||
OUTPUT_VARIABLE _qt_qml_dir
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT IS_DIRECTORY "${_qt_qml_dir}")
|
||||
message(WARNING "Qt QML import directory does not exist: ${_qt_qml_dir}")
|
||||
endif()
|
||||
add_custom_command(TARGET deploy POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E env PATH="${_qt_bin_dir}" "${WINDEPLOYQT_EXECUTABLE}" "$<TARGET_FILE:monero-wallet-gui>" -no-translations -qmldir="${CMAKE_SOURCE_DIR}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E env PATH="${_qt_bin_dir}" "${WINDEPLOYQT_EXECUTABLE}" "$<TARGET_FILE:monero-wallet-gui>" -no-translations -qmldir="${CMAKE_SOURCE_DIR}" -qmlimport="${_qt_qml_dir}"
|
||||
COMMENT "Running windeployqt..."
|
||||
)
|
||||
set(WIN_DEPLOY_DLLS
|
||||
@@ -74,14 +106,11 @@ if(APPLE OR (WIN32 AND NOT STATIC))
|
||||
zlib1.dll
|
||||
libzstd.dll
|
||||
libwinpthread-1.dll
|
||||
libtiff-6.dll
|
||||
libstdc++-6.dll
|
||||
libpng16-16.dll
|
||||
libpcre16-0.dll
|
||||
libpcre-1.dll
|
||||
libmng-2.dll
|
||||
liblzma-5.dll
|
||||
liblcms2-2.dll
|
||||
libjpeg-8.dll
|
||||
libintl-8.dll
|
||||
libiconv-2.dll
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
|
||||
@@ -26,9 +26,10 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import FontAwesome 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
import FontAwesome
|
||||
|
||||
import "." as MoneroComponents
|
||||
import "effects/" as MoneroEffects
|
||||
@@ -57,8 +58,8 @@ Item {
|
||||
opacity: enabled ? 1 : 0.7
|
||||
|
||||
Keys.onEnterPressed: toggle()
|
||||
Keys.onReturnPressed: Keys.onEnterPressed(event)
|
||||
Keys.onSpacePressed: Keys.onEnterPressed(event)
|
||||
Keys.onReturnPressed: toggle()
|
||||
Keys.onSpacePressed: toggle()
|
||||
|
||||
function toggle(){
|
||||
if (checkBox.toggleOnClick) {
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtGraphicalEffects 1.0
|
||||
import FontAwesome 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
import FontAwesome
|
||||
|
||||
import "." 1.0
|
||||
import "." as MoneroComponents
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
import FontAwesome 1.0
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
MouseArea {
|
||||
@@ -14,7 +13,7 @@ MouseArea {
|
||||
id: root
|
||||
acceptedButtons: Qt.RightButton
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
onClicked: (mouse) => {
|
||||
if (mouse.button === Qt.RightButton) {
|
||||
root.parent.persistentSelection = true;
|
||||
contextMenu.open()
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import FontAwesome
|
||||
|
||||
import FontAwesome 1.0
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
MenuItem {
|
||||
|
||||
@@ -26,12 +26,9 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Window 2.0
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Window
|
||||
import moneroComponents.Wallet 1.0
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
+15
-171
@@ -26,13 +26,11 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 1.2
|
||||
import QtQuick.Controls 2.2 as QtQuickControls2
|
||||
import QtQuick.Layouts 1.2
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Controls.Styles 1.2
|
||||
import FontAwesome 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Controls as Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import FontAwesome
|
||||
|
||||
import "." as MoneroComponents
|
||||
import "effects/" as MoneroEffects
|
||||
@@ -47,7 +45,7 @@ Item {
|
||||
property bool error: false
|
||||
property alias inputLabel: inputLabel
|
||||
|
||||
signal dateChanged();
|
||||
signal dateChanged()
|
||||
|
||||
height: 50
|
||||
|
||||
@@ -246,10 +244,11 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
QtQuickControls2.Popup {
|
||||
Controls.Popup {
|
||||
id: popup
|
||||
padding: 0
|
||||
closePolicy: QtQuickControls2.Popup.CloseOnEscape | QtQuickControls2.Popup.CloseOnPressOutsideParent
|
||||
focus: true
|
||||
closePolicy: Controls.Popup.CloseOnEscape | Controls.Popup.CloseOnPressOutsideParent
|
||||
onOpened: {
|
||||
calendar.visibleMonth = currentDate.getMonth();
|
||||
calendar.visibleYear = currentDate.getFullYear();
|
||||
@@ -290,7 +289,7 @@ Item {
|
||||
height: 1
|
||||
}
|
||||
|
||||
Calendar {
|
||||
MoneroComponents.MoneroCalendar {
|
||||
id: calendar
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
@@ -298,166 +297,11 @@ Item {
|
||||
anchors.margins: 1
|
||||
anchors.bottomMargin: 10
|
||||
height: 220
|
||||
frameVisible: false
|
||||
|
||||
style: CalendarStyle {
|
||||
gridVisible: false
|
||||
background: Rectangle { color: MoneroComponents.Style.middlePanelBackgroundColor }
|
||||
dayDelegate: Item {
|
||||
z: parent.z + 1
|
||||
implicitHeight: implicitWidth
|
||||
implicitWidth: calendar.width / 7
|
||||
|
||||
Rectangle {
|
||||
id: dayRect
|
||||
anchors.fill: parent
|
||||
radius: parent.implicitHeight / 2
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: dayText
|
||||
anchors.centerIn: parent
|
||||
font.family: MoneroComponents.Style.fontMonoRegular.name
|
||||
font.pixelSize: {
|
||||
if(!styleData.visibleMonth) return 12
|
||||
return 14
|
||||
}
|
||||
font.bold: {
|
||||
if(dayArea.pressed || styleData.visibleMonth) return true;
|
||||
return false;
|
||||
}
|
||||
text: styleData.date.getDate()
|
||||
themeTransition: false
|
||||
color: {
|
||||
if (currentDate.toDateString() === styleData.date.toDateString()) {
|
||||
if (dayArea.containsMouse) {
|
||||
dayRect.color = MoneroComponents.Style.buttonBackgroundColorHover;
|
||||
} 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 {
|
||||
id: dayArea
|
||||
anchors.fill: parent
|
||||
visible: styleData.valid
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
if(styleData.visibleMonth) {
|
||||
currentDate = styleData.date
|
||||
popup.close()
|
||||
} else {
|
||||
var date = styleData.date
|
||||
if(date.getMonth() > calendar.visibleMonth)
|
||||
calendar.showNextMonth()
|
||||
else calendar.showPreviousMonth()
|
||||
}
|
||||
|
||||
datePicker.dateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dayOfWeekDelegate: Item {
|
||||
implicitHeight: 20
|
||||
implicitWidth: calendar.width / 7
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
anchors.centerIn: parent
|
||||
elide: Text.ElideRight
|
||||
font.family: MoneroComponents.Style.fontMonoRegular.name
|
||||
font.pixelSize: 12
|
||||
color: MoneroComponents.Style.lightGreyFontColor
|
||||
themeTransition: false
|
||||
text: {
|
||||
var locale = Qt.locale()
|
||||
return locale.dayName(styleData.dayOfWeek, Locale.ShortFormat)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
navigationBar: Rectangle {
|
||||
color: MoneroComponents.Style.middlePanelBackgroundColor
|
||||
implicitWidth: calendar.width
|
||||
implicitHeight: 30
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
anchors.centerIn: parent
|
||||
font.family: MoneroComponents.Style.fontMonoRegular.name
|
||||
font.pixelSize: 14
|
||||
color: MoneroComponents.Style.dimmedFontColor
|
||||
themeTransition: false
|
||||
text: styleData.title
|
||||
}
|
||||
|
||||
|
||||
Item {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 4
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: height
|
||||
|
||||
MoneroEffects.ImageMask {
|
||||
id: prevMonthIcon
|
||||
anchors.centerIn: parent
|
||||
image: "qrc:///images/prevMonth.png"
|
||||
height: 8
|
||||
width: 12
|
||||
fontAwesomeFallbackIcon: FontAwesome.arrowLeft
|
||||
fontAwesomeFallbackSize: 14
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
onClicked: calendar.showPreviousMonth()
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 4
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: height
|
||||
|
||||
MoneroEffects.ImageMask {
|
||||
id: nextMonthIcon
|
||||
anchors.centerIn: parent
|
||||
image: "qrc:///images/prevMonth.png"
|
||||
height: 8
|
||||
width: 12
|
||||
rotation: 180
|
||||
fontAwesomeFallbackIcon: FontAwesome.arrowLeft
|
||||
fontAwesomeFallbackSize: 14
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
onClicked: calendar.showNextMonth()
|
||||
}
|
||||
}
|
||||
}
|
||||
selectedDate: datePicker.currentDate
|
||||
onDateSelected: function(selectedDate) {
|
||||
datePicker.currentDate = selectedDate
|
||||
popup.close()
|
||||
datePicker.dateChanged()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick
|
||||
import "." as MoneroComponents
|
||||
|
||||
Item {
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "." as MoneroComponents
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick
|
||||
import "../components" as MoneroComponents
|
||||
import "../components/effects" as MoneroEffects
|
||||
|
||||
@@ -62,6 +62,6 @@ MoneroEffects.ImageMask {
|
||||
button.height = button.height - 2
|
||||
}
|
||||
|
||||
onClicked: button.clicked(mouse)
|
||||
onClicked: (mouse) => button.clicked(mouse)
|
||||
}
|
||||
}
|
||||
+21
-18
@@ -26,15 +26,17 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
import FontAwesome 1.0
|
||||
|
||||
import FontAwesome
|
||||
|
||||
import "." as MoneroComponents
|
||||
import "./effects/" as MoneroEffects
|
||||
|
||||
import QtQuick.Effects
|
||||
|
||||
Item {
|
||||
id: inlineButton
|
||||
|
||||
@@ -42,9 +44,9 @@ Item {
|
||||
property string textColor: MoneroComponents.Style.inlineButtonTextColor
|
||||
property alias text: inlineText.text
|
||||
property alias fontPixelSize: inlineText.font.pixelSize
|
||||
property alias fontFamily: inlineText.font.family
|
||||
property alias fontStyleName: inlineText.font.styleName
|
||||
property bool isFontAwesomeIcon: fontFamily == FontAwesome.fontFamily || fontFamily == FontAwesome.fontFamilySolid
|
||||
property string fontFamily: MoneroComponents.Style.fontBold.name
|
||||
property string fontStyleName: ""
|
||||
property bool isFontAwesomeIcon: fontStyleName === "Solid" || fontFamily === FontAwesome.fontFamily || fontFamily === FontAwesome.fontFamilySolid
|
||||
property alias buttonColor: rect.color
|
||||
property alias tooltip: tooltip.text
|
||||
property alias tooltipLeft: tooltip.tooltipLeft
|
||||
@@ -70,8 +72,9 @@ Item {
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: inlineText
|
||||
font.family: MoneroComponents.Style.fontBold.name
|
||||
font.bold: true
|
||||
font.family: inlineButton.fontStyleName === "Solid" ? FontAwesome.fontFamilySolid : inlineButton.fontFamily
|
||||
font.styleName: inlineButton.fontStyleName
|
||||
font.bold: !inlineButton.isFontAwesomeIcon
|
||||
font.pixelSize: inlineButton.isFontAwesomeIcon ? 22 : inlineButton.small ? 14 : 16
|
||||
color: inlineButton.textColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
@@ -108,20 +111,20 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
DropShadow {
|
||||
visible: !MoneroComponents.Style.blackTheme
|
||||
MultiEffect {
|
||||
visible: !MoneroComponents.Style.blackTheme && GraphicsInfo.api !== GraphicsInfo.Software
|
||||
anchors.fill: rect
|
||||
horizontalOffset: 2
|
||||
verticalOffset: 2
|
||||
radius: 7.0
|
||||
samples: 10
|
||||
color: "#1B000000"
|
||||
cached: true
|
||||
source: rect
|
||||
shadowEnabled: true
|
||||
shadowHorizontalOffset: 2
|
||||
shadowVerticalOffset: 2
|
||||
shadowBlur: 0.875
|
||||
blurMax: 16
|
||||
shadowColor: "#1B000000"
|
||||
}
|
||||
|
||||
Keys.enabled: inlineButton.visible
|
||||
Keys.onSpacePressed: doClick()
|
||||
Keys.onEnterPressed: Keys.onReturnPressed(event)
|
||||
Keys.onEnterPressed: doClick()
|
||||
Keys.onReturnPressed: doClick()
|
||||
}
|
||||
@@ -26,8 +26,8 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls
|
||||
import QtQuick
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
|
||||
@@ -26,12 +26,9 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Window 2.0
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
@@ -109,11 +106,15 @@ Item {
|
||||
}
|
||||
|
||||
Keys.enabled: root.visible
|
||||
Keys.onEnterPressed: Keys.onReturnPressed(event)
|
||||
Keys.onReturnPressed: {
|
||||
function acceptInput() {
|
||||
root.close()
|
||||
root.accepted()
|
||||
}
|
||||
|
||||
Keys.onEnterPressed: acceptInput()
|
||||
Keys.onReturnPressed: {
|
||||
acceptInput()
|
||||
}
|
||||
Keys.onEscapePressed: {
|
||||
root.close()
|
||||
root.rejected()
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls
|
||||
import QtQuick
|
||||
|
||||
import "../js/TxUtils.js" as TxUtils
|
||||
import "../components" as MoneroComponents
|
||||
@@ -51,12 +51,16 @@ TextArea {
|
||||
selectionColor: MoneroComponents.Style.textSelectionColor
|
||||
selectedTextColor: MoneroComponents.Style.textSelectedColor
|
||||
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
}
|
||||
|
||||
property int minimumHeight: 100
|
||||
height: contentHeight > minimumHeight ? contentHeight : minimumHeight
|
||||
|
||||
onTextChanged: {
|
||||
if(addressValidation){
|
||||
// js replacement for `RegExpValidator { regExp: /[0-9A-Fa-f]{95}/g }`
|
||||
// js replacement for `RegularExpressionValidator { regularExpression: /[0-9A-Fa-f]{95}/g }`
|
||||
if (textArea.text.startsWith("monero:")) {
|
||||
error = false;
|
||||
return;
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
import "../components/effects/" as MoneroEffects
|
||||
|
||||
@@ -26,10 +26,11 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
import FontAwesome 1.0
|
||||
|
||||
import FontAwesome
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.2
|
||||
import QtQuick.Controls 2.0
|
||||
import moneroComponents.LanguageModel 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import moneroComponents.LanguageModel 1.0 as LanguageModels
|
||||
|
||||
|
||||
Drawer {
|
||||
@@ -85,7 +85,6 @@ Drawer {
|
||||
var locale_spl = locale.split("_");
|
||||
|
||||
// reload active translations
|
||||
console.log(locale_spl[0]);
|
||||
translationManager.setLanguage(locale_spl[0]);
|
||||
|
||||
// set wizard language settings
|
||||
@@ -166,12 +165,13 @@ Drawer {
|
||||
|
||||
ScrollBar.vertical: ScrollBar {
|
||||
onActiveChanged: if (!active && !isMac) active = true
|
||||
palette.mid: "#8E8E93"
|
||||
palette.dark: "#B8B8BD"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Flags model
|
||||
LanguageModel {
|
||||
LanguageModels.LanguageModel {
|
||||
id: langModel
|
||||
}
|
||||
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
// 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.
|
||||
|
||||
import FontAwesome 1.0
|
||||
import QtQuick 2.9
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
import FontAwesome
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
// 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.
|
||||
|
||||
import Qt.labs.platform 1.0 as PlatformLabs
|
||||
import Qt.labs.platform as PlatformLabs
|
||||
import "." as MoneroComponents
|
||||
|
||||
PlatformLabs.MenuBar {
|
||||
|
||||
@@ -26,8 +26,7 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
import "effects/" as MoneroEffects
|
||||
@@ -61,26 +60,25 @@ Rectangle {
|
||||
property bool present: !under || under.checked || checked || under.numSelectedChildren > 0
|
||||
height: present ? ((appWindow.height >= 800) ? 44 : 38 ) : 0
|
||||
|
||||
LinearGradient {
|
||||
visible: isOpenGL && (button.checked || buttonArea.containsMouse)
|
||||
Rectangle {
|
||||
visible: GraphicsInfo.api !== GraphicsInfo.Software && (button.checked || buttonArea.containsMouse)
|
||||
height: parent.height
|
||||
width: 260
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: -20
|
||||
anchors.leftMargin: parent.getOffset()
|
||||
start: Qt.point(width, 0)
|
||||
end: Qt.point(0, 0)
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: MoneroComponents.Style.menuButtonGradientStart }
|
||||
GradientStop { position: 1.0; color: MoneroComponents.Style.menuButtonGradientStop }
|
||||
orientation: Gradient.Horizontal
|
||||
GradientStop { position: 0.0; color: MoneroComponents.Style.menuButtonGradientStop }
|
||||
GradientStop { position: 1.0; color: MoneroComponents.Style.menuButtonGradientStart }
|
||||
}
|
||||
opacity: button.checked ? 1 : 0.3
|
||||
}
|
||||
|
||||
// fallback hover effect when opengl is not available
|
||||
// fallback hover effect for the software renderer
|
||||
Rectangle {
|
||||
visible: !isOpenGL && (button.checked || buttonArea.containsMouse)
|
||||
visible: GraphicsInfo.api === GraphicsInfo.Software && (button.checked || buttonArea.containsMouse)
|
||||
anchors.fill: parent
|
||||
color: MoneroComponents.Style.menuButtonFallbackBackgroundColor
|
||||
opacity: button.checked ? 1 : 0.3
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick
|
||||
|
||||
import "." as MoneroComponents
|
||||
import "effects/" as MoneroEffects
|
||||
|
||||
@@ -0,0 +1,193 @@
|
||||
// Copyright (c) 2026, 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.
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
import "." as MoneroComponents
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property int visibleMonth: (new Date()).getMonth()
|
||||
property int visibleYear: (new Date()).getFullYear()
|
||||
property date selectedDate
|
||||
|
||||
signal dateSelected(date selectedDate)
|
||||
|
||||
function moveMonth(offset) {
|
||||
const date = new Date(visibleYear, visibleMonth + offset, 1)
|
||||
visibleMonth = date.getMonth()
|
||||
visibleYear = date.getFullYear()
|
||||
}
|
||||
|
||||
function showPreviousMonth() {
|
||||
moveMonth(-1)
|
||||
}
|
||||
|
||||
function showNextMonth() {
|
||||
moveMonth(1)
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: MoneroComponents.Style.middlePanelBackgroundColor
|
||||
|
||||
Column {
|
||||
anchors.fill: parent
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: 30
|
||||
color: MoneroComponents.Style.middlePanelBackgroundColor
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
anchors.centerIn: parent
|
||||
font.family: MoneroComponents.Style.fontMonoRegular.name
|
||||
font.pixelSize: 14
|
||||
color: MoneroComponents.Style.dimmedFontColor
|
||||
themeTransition: false
|
||||
text: Qt.locale().standaloneMonthName(root.visibleMonth, Locale.LongFormat)
|
||||
+ " " + root.visibleYear
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 12
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: "\u2039"
|
||||
font.pixelSize: 22
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
anchors.margins: -8
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: root.showPreviousMonth()
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 12
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: "\u203a"
|
||||
font.pixelSize: 22
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
anchors.margins: -8
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: root.showNextMonth()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DayOfWeekRow {
|
||||
width: parent.width
|
||||
height: 20
|
||||
locale: Qt.locale()
|
||||
|
||||
delegate: MoneroComponents.TextPlain {
|
||||
required property var model
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.family: MoneroComponents.Style.fontMonoRegular.name
|
||||
font.pixelSize: 12
|
||||
color: MoneroComponents.Style.lightGreyFontColor
|
||||
themeTransition: false
|
||||
text: model.shortName
|
||||
}
|
||||
}
|
||||
|
||||
MonthGrid {
|
||||
id: monthGrid
|
||||
width: parent.width
|
||||
height: parent.height - 50
|
||||
month: root.visibleMonth
|
||||
year: root.visibleYear
|
||||
locale: Qt.locale()
|
||||
|
||||
delegate: Item {
|
||||
required property var model
|
||||
|
||||
Rectangle {
|
||||
id: dayBackground
|
||||
anchors.centerIn: parent
|
||||
width: Math.min(parent.width, parent.height)
|
||||
height: width
|
||||
radius: width / 2
|
||||
color: {
|
||||
if (root.selectedDate
|
||||
&& root.selectedDate.toDateString() === model.date.toDateString())
|
||||
return MoneroComponents.Style.buttonBackgroundColor
|
||||
if (dayArea.containsMouse)
|
||||
return MoneroComponents.Style.blackTheme ? "#20FFFFFF" : "#10000000"
|
||||
return "transparent"
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
anchors.centerIn: parent
|
||||
font.family: MoneroComponents.Style.fontMonoRegular.name
|
||||
font.pixelSize: model.month === root.visibleMonth ? 14 : 12
|
||||
font.bold: model.month === root.visibleMonth
|
||||
font.underline: model.today
|
||||
color: {
|
||||
if (model.month !== root.visibleMonth)
|
||||
return MoneroComponents.Style.lightGreyFontColor
|
||||
return MoneroComponents.Style.defaultFontColor
|
||||
}
|
||||
text: model.day
|
||||
themeTransition: false
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: dayArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
if (model.month !== root.visibleMonth) {
|
||||
if (model.date < new Date(root.visibleYear, root.visibleMonth, 1))
|
||||
root.showPreviousMonth()
|
||||
else
|
||||
root.showNextMonth()
|
||||
return
|
||||
}
|
||||
root.dateSelected(model.date)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,8 +26,8 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import "." as MoneroComponents
|
||||
|
||||
Rectangle {
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick
|
||||
|
||||
QtObject {
|
||||
property bool active: false
|
||||
|
||||
@@ -26,10 +26,11 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
import FontAwesome
|
||||
|
||||
import FontAwesome 1.0
|
||||
import moneroComponents.Wallet 1.0
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
|
||||
@@ -26,23 +26,18 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Window 2.0
|
||||
import FontAwesome 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "." as MoneroComponents
|
||||
import "effects/" as MoneroEffects
|
||||
import "../js/Utils.js" as Utils
|
||||
|
||||
FocusScope {
|
||||
id: root
|
||||
visible: false
|
||||
|
||||
property alias password: passwordInput1.text
|
||||
property alias acceptButton: okButton
|
||||
property string walletName
|
||||
property var okButtonText
|
||||
property string okButtonIcon
|
||||
@@ -110,7 +105,7 @@ FocusScope {
|
||||
function close() {
|
||||
leftPanel.enabled = true
|
||||
middlePanel.enabled = true
|
||||
wizard.enabled = true
|
||||
wizard.enabled = !wizard.deviceWalletCreationInProgress
|
||||
if (rootItem.state == "wizard") {
|
||||
titleBar.state = "essentials"
|
||||
} else {
|
||||
|
||||
@@ -26,11 +26,10 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Window 2.1
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Window
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
@@ -73,25 +72,24 @@ Rectangle {
|
||||
id: imgLogo
|
||||
width: 60
|
||||
height: 60
|
||||
sourceSize: Qt.size(width, height)
|
||||
anchors.centerIn: parent
|
||||
source: "qrc:///images/monero-vector.svg"
|
||||
mipmap: true
|
||||
}
|
||||
|
||||
BusyIndicator {
|
||||
running: parent.visible
|
||||
running: root.visible
|
||||
anchors.centerIn: imgLogo
|
||||
style: BusyIndicatorStyle {
|
||||
indicator: Image {
|
||||
visible: control.running
|
||||
source: "qrc:///images/busy-indicator.png"
|
||||
RotationAnimator on rotation {
|
||||
running: control.running
|
||||
loops: Animation.Infinite
|
||||
duration: 1000
|
||||
from: 0
|
||||
to: 360
|
||||
}
|
||||
contentItem: Image {
|
||||
visible: parent.running
|
||||
source: "qrc:///images/busy-indicator.png"
|
||||
RotationAnimator on rotation {
|
||||
running: root.visible
|
||||
loops: Animation.Infinite
|
||||
duration: 1000
|
||||
from: 0
|
||||
to: 360
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick
|
||||
import moneroComponents.Wallet 1.0
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
+139
-39
@@ -26,9 +26,10 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtMultimedia 5.4
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick
|
||||
import QtCore
|
||||
import QtMultimedia
|
||||
import QtQuick.Dialogs
|
||||
import moneroComponents.QRCodeScanner 1.0
|
||||
|
||||
Rectangle {
|
||||
@@ -45,18 +46,99 @@ Rectangle {
|
||||
state: "Stopped"
|
||||
|
||||
signal qrcode_decoded(string address, string payment_id, string amount, string tx_description, string recipient_name, var extra_parameters)
|
||||
property bool walletRestoreMode: false
|
||||
property bool sessionConfigured: false
|
||||
|
||||
function parseWalletRestoreUri(data) {
|
||||
var prefix = ""
|
||||
if (data.indexOf("monero-wallet:") === 0)
|
||||
prefix = "monero-wallet:"
|
||||
else if (data.indexOf("monero_wallet:") === 0)
|
||||
prefix = "monero_wallet:"
|
||||
else
|
||||
return null
|
||||
|
||||
var queryOffset = data.indexOf("?")
|
||||
var address = data.substring(prefix.length, queryOffset < 0 ? data.length : queryOffset)
|
||||
if (!walletManager.addressValid(address, appWindow.persistentSettings.nettype))
|
||||
return null
|
||||
|
||||
var params = {}
|
||||
if (queryOffset >= 0) {
|
||||
var items = data.substring(queryOffset + 1).split("&")
|
||||
for (var index = 0; index < items.length; ++index) {
|
||||
var separator = items[index].indexOf("=")
|
||||
if (separator < 0)
|
||||
continue
|
||||
var name = decodeURIComponent(items[index].substring(0, separator))
|
||||
var value = decodeURIComponent(items[index].substring(separator + 1))
|
||||
if (name === "view_key")
|
||||
params.secret_view_key = value
|
||||
else if (name === "spend_key")
|
||||
params.secret_spend_key = value
|
||||
else if (name === "height")
|
||||
params.restore_height = value
|
||||
}
|
||||
}
|
||||
return { "address": address, "extra_parameters": params }
|
||||
}
|
||||
|
||||
function showDecodeError(error, warning) {
|
||||
if (!warning)
|
||||
root.state = "Stopped"
|
||||
messageDialog.text = error
|
||||
messageDialog.visible = true
|
||||
}
|
||||
|
||||
function startCapture() {
|
||||
if (root.state !== "Capture")
|
||||
return
|
||||
if (cameraPermission.status === Qt.PermissionStatus.Undetermined) {
|
||||
cameraPermission.request()
|
||||
} else if (cameraPermission.status === Qt.PermissionStatus.Denied) {
|
||||
showDecodeError(qsTr("Camera permission was denied.") + translationManager.emptyString, false)
|
||||
} else {
|
||||
startCamera()
|
||||
}
|
||||
}
|
||||
|
||||
function startCamera() {
|
||||
if (mediaDevices.videoInputs.length === 0) {
|
||||
appWindow.qrScannerEnabled = false
|
||||
root.state = "Stopped"
|
||||
return
|
||||
}
|
||||
if (!sessionConfigured) {
|
||||
if (!finder.setSource(camera) || !finder.setVideoOutput(viewfinder)) {
|
||||
appWindow.qrScannerEnabled = false
|
||||
root.state = "Stopped"
|
||||
return
|
||||
}
|
||||
sessionConfigured = true
|
||||
}
|
||||
camera.start()
|
||||
}
|
||||
|
||||
CameraPermission {
|
||||
id: cameraPermission
|
||||
}
|
||||
|
||||
MediaDevices {
|
||||
id: mediaDevices
|
||||
|
||||
onVideoInputsChanged: {
|
||||
appWindow.qrScannerEnabled = videoInputs.length > 0
|
||||
if (videoInputs.length === 0 && root.state === "Capture")
|
||||
root.state = "Stopped"
|
||||
}
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "Capture"
|
||||
StateChangeScript {
|
||||
script: {
|
||||
root.visible = true
|
||||
camera.captureMode = Camera.CaptureStillImage
|
||||
camera.cameraState = Camera.ActiveState
|
||||
camera.start()
|
||||
finder.enabled = true
|
||||
}
|
||||
// Finish entering Capture before an error can return to Stopped.
|
||||
script: Qt.callLater(root.startCapture)
|
||||
}
|
||||
},
|
||||
State {
|
||||
@@ -66,7 +148,7 @@ Rectangle {
|
||||
camera.stop()
|
||||
root.visible = false
|
||||
finder.enabled = false
|
||||
camera.cameraState = Camera.UnloadedState
|
||||
root.walletRestoreMode = false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -75,17 +157,45 @@ Rectangle {
|
||||
Camera {
|
||||
id: camera
|
||||
objectName: "qrCameraQML"
|
||||
captureMode: Camera.CaptureStillImage
|
||||
cameraState: Camera.UnloadedState
|
||||
cameraDevice: mediaDevices.defaultVideoInput
|
||||
|
||||
focus {
|
||||
focusMode: Camera.FocusContinuous
|
||||
onActiveChanged: {
|
||||
if (camera.active && root.state === "Capture") {
|
||||
root.visible = true
|
||||
finder.enabled = true
|
||||
} else if (!camera.active) {
|
||||
root.visible = false
|
||||
finder.enabled = false
|
||||
}
|
||||
}
|
||||
onErrorOccurred: function(error, errorString) {
|
||||
console.error("QR scanner camera error:", error, errorString)
|
||||
if (root.state === "Capture") {
|
||||
root.state = "Stopped"
|
||||
messageDialog.text = errorString
|
||||
messageDialog.visible = true
|
||||
}
|
||||
}
|
||||
focusMode: Camera.FocusModeAuto
|
||||
}
|
||||
|
||||
QRCodeScanner {
|
||||
id : finder
|
||||
objectName: "QrFinder"
|
||||
onDecoded : {
|
||||
onDecoded : (data) => {
|
||||
var walletRestore = null
|
||||
try {
|
||||
if (root.walletRestoreMode)
|
||||
walletRestore = root.parseWalletRestoreUri(data)
|
||||
} catch (error) {
|
||||
root.showDecodeError(qsTr("Invalid wallet restore QR code"), false)
|
||||
return
|
||||
}
|
||||
if (walletRestore !== null) {
|
||||
root.qrcode_decoded(walletRestore.address, "", "", "", "", walletRestore.extra_parameters)
|
||||
root.state = "Stopped"
|
||||
return
|
||||
}
|
||||
const parsed = walletManager.parse_uri_to_object(data);
|
||||
if (!parsed.error) {
|
||||
root.qrcode_decoded(parsed.address, parsed.payment_id, parsed.amount, parsed.tx_description, parsed.recipient_name, parsed.extra_parameters);
|
||||
@@ -94,24 +204,17 @@ Rectangle {
|
||||
root.qrcode_decoded(data, "", "", "", "", null);
|
||||
root.state = "Stopped";
|
||||
} else {
|
||||
onNotifyError(parsed.error);
|
||||
root.showDecodeError(parsed.error, false)
|
||||
}
|
||||
}
|
||||
onNotifyError : {
|
||||
if( warning )
|
||||
messageDialog.icon = StandardIcon.Critical
|
||||
else {
|
||||
messageDialog.icon = StandardIcon.Warning
|
||||
root.state = "Stopped"
|
||||
}
|
||||
messageDialog.text = error
|
||||
messageDialog.visible = true
|
||||
onNotifyError : (error, warning) => {
|
||||
root.showDecodeError(error, warning)
|
||||
}
|
||||
}
|
||||
|
||||
VideoOutput {
|
||||
id: viewfinder
|
||||
visible: root.state == "Capture"
|
||||
visible: camera.active
|
||||
|
||||
x: 0
|
||||
y: 0
|
||||
@@ -119,16 +222,9 @@ Rectangle {
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
|
||||
source: camera
|
||||
autoOrientation: true
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
propagateComposedEvents: true
|
||||
onPressAndHold: {
|
||||
if (camera.lockStatus == Camera.locked)camera.unlock()
|
||||
camera.searchAndLock()
|
||||
}
|
||||
onDoubleClicked: {
|
||||
root.state = "Stopped"
|
||||
}
|
||||
@@ -137,16 +233,20 @@ Rectangle {
|
||||
|
||||
MessageDialog {
|
||||
id: messageDialog
|
||||
title: qsTr("QrCode Scanned") + translationManager.emptyString
|
||||
title: qsTr("QR Scanner") + translationManager.emptyString
|
||||
onAccepted: {
|
||||
root.state = "Stopped"
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if( QtMultimedia.availableCameras.length == 0) {
|
||||
console.log("No camera available. Disable qrScannerEnabled");
|
||||
appWindow.qrScannerEnabled = false;
|
||||
Connections {
|
||||
target: cameraPermission
|
||||
function onStatusChanged() {
|
||||
root.startCapture()
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
appWindow.qrScannerEnabled = mediaDevices.videoInputs.length > 0
|
||||
}
|
||||
}
|
||||
@@ -26,8 +26,8 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
|
||||
@@ -26,9 +26,8 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "." as MoneroComponents
|
||||
|
||||
|
||||
@@ -26,12 +26,9 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick.Controls 1.2
|
||||
import QtQuick.Controls.Styles 1.2
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "../js/Utils.js" as Utils
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
GridLayout {
|
||||
|
||||
@@ -26,10 +26,11 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
import FontAwesome 1.0
|
||||
|
||||
import FontAwesome
|
||||
|
||||
import "." as MoneroComponents
|
||||
import "effects/" as MoneroEffects
|
||||
@@ -138,7 +139,8 @@ ColumnLayout {
|
||||
|
||||
MoneroComponents.InlineButton {
|
||||
buttonColor: "transparent"
|
||||
fontFamily: FontAwesome.fontFamily
|
||||
fontFamily: FontAwesome.fontFamilySolid
|
||||
fontStyleName: "Solid"
|
||||
fontPixelSize: 18
|
||||
text: FontAwesome.edit
|
||||
tooltip: qsTr("Edit remote node") + translationManager.emptyString
|
||||
@@ -153,7 +155,8 @@ ColumnLayout {
|
||||
|
||||
MoneroComponents.InlineButton {
|
||||
buttonColor: "transparent"
|
||||
fontFamily: FontAwesome.fontFamily
|
||||
fontFamily: FontAwesome.fontFamilySolid
|
||||
fontStyleName: "Solid"
|
||||
text: FontAwesome.times
|
||||
visible: remoteNodesModel.count > 1
|
||||
tooltip: qsTr("Remove remote node") + translationManager.emptyString
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import FontAwesome 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
import FontAwesome
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
@@ -11,7 +12,6 @@ ColumnLayout {
|
||||
property alias description: area.text
|
||||
property alias title: header.text
|
||||
property bool isLast: false
|
||||
property bool enabled: true
|
||||
signal clicked()
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.0 as QtQuickControls
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Controls as QtQuickControls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
|
||||
@@ -26,10 +26,11 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
import FontAwesome 1.0
|
||||
|
||||
import FontAwesome
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
@@ -187,6 +188,6 @@ Item {
|
||||
|
||||
Keys.enabled: button.visible
|
||||
Keys.onSpacePressed: doClick()
|
||||
Keys.onEnterPressed: Keys.onReturnPressed(event)
|
||||
Keys.onEnterPressed: doClick()
|
||||
Keys.onReturnPressed: doClick()
|
||||
}
|
||||
@@ -26,12 +26,9 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Window 2.0
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
import "effects/" as MoneroEffects
|
||||
@@ -50,8 +47,6 @@ Rectangle {
|
||||
property alias cancelText: cancelButton.text
|
||||
property alias closeVisible: closeButton.visible
|
||||
|
||||
property var icon
|
||||
|
||||
// same signals as Dialog has
|
||||
signal accepted()
|
||||
signal rejected()
|
||||
@@ -130,6 +125,8 @@ Rectangle {
|
||||
anchors.fill: parent
|
||||
ScrollBar.vertical: ScrollBar {
|
||||
onActiveChanged: if (!active && !isMac) active = true
|
||||
palette.mid: "#8E8E93"
|
||||
palette.dark: "#B8B8BD"
|
||||
}
|
||||
boundsBehavior: isMac ? Flickable.DragAndOvershootBounds : Flickable.StopAtBounds
|
||||
|
||||
@@ -145,6 +142,7 @@ Rectangle {
|
||||
selectByMouse: false
|
||||
wrapMode: TextEdit.Wrap
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
background: null
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
import QtGraphicalEffects 1.0
|
||||
import FontAwesome 1.0
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import FontAwesome
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
import "../components/effects/" as MoneroEffects
|
||||
@@ -57,6 +57,7 @@ ColumnLayout {
|
||||
property int labelFontSize: 14
|
||||
property bool labelFontBold: false
|
||||
property int dropdownHeight: 39
|
||||
property int maxDropdownItems: 0
|
||||
property int fontSize: 14
|
||||
property int fontItemSize: 14
|
||||
property string colorBorder: MoneroComponents.Style.inputBorderColorInActive
|
||||
@@ -64,6 +65,20 @@ ColumnLayout {
|
||||
property bool headerBorder: true
|
||||
property bool headerFontBold: false
|
||||
|
||||
property real maxAvailableDropdownHeight: Number.POSITIVE_INFINITY
|
||||
|
||||
function updateMaxAvailableDropdownHeight() {
|
||||
var itemCap = dropdown.maxDropdownItems > 0 ? dropdown.maxDropdownItems * dropdown.dropdownHeight * 0.75 : Number.POSITIVE_INFINITY
|
||||
var win = dropdown.Window.window
|
||||
if (!win) {
|
||||
maxAvailableDropdownHeight = itemCap
|
||||
return
|
||||
}
|
||||
var headBottom = head.mapToItem(null, 0, head.height).y
|
||||
var spaceCap = Math.max(dropdown.dropdownHeight * 0.75, win.height - headBottom - 8)
|
||||
maxAvailableDropdownHeight = Math.min(itemCap, spaceCap)
|
||||
}
|
||||
|
||||
signal changed();
|
||||
|
||||
onExpandedChanged: if(expanded) appWindow.currentItem = dropdown
|
||||
@@ -135,7 +150,14 @@ ColumnLayout {
|
||||
MouseArea {
|
||||
id: dropArea
|
||||
anchors.fill: parent
|
||||
onClicked: dropdown.expanded ? popup.close() : popup.open()
|
||||
onClicked: {
|
||||
if (dropdown.expanded) {
|
||||
popup.close()
|
||||
} else {
|
||||
dropdown.updateMaxAvailableDropdownHeight()
|
||||
popup.open()
|
||||
}
|
||||
}
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.ArrowCursor
|
||||
}
|
||||
@@ -152,72 +174,80 @@ ColumnLayout {
|
||||
width: dropdown.width
|
||||
y: head.y + head.height
|
||||
clip: true
|
||||
height: dropdown.expanded ? columnid.height : 0
|
||||
height: dropdown.expanded ? Math.min(columnid.height, dropdown.maxAvailableDropdownHeight) : 0
|
||||
color: dropdown.pressedColor
|
||||
|
||||
Behavior on height {
|
||||
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
|
||||
}
|
||||
|
||||
Column {
|
||||
id: columnid
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
property int currentIndex: 0
|
||||
Flickable {
|
||||
anchors.fill: parent
|
||||
contentHeight: columnid.height
|
||||
interactive: contentHeight > height
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
clip: true
|
||||
ScrollBar.vertical: ScrollBar { }
|
||||
|
||||
Repeater {
|
||||
id: repeater
|
||||
Column {
|
||||
id: columnid
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
property int currentIndex: 0
|
||||
|
||||
// Workaround for translations in listElements. All translated strings needs to be listed in this file.
|
||||
property string stringAutomatic: qsTr("Automatic") + translationManager.emptyString
|
||||
property string stringSlow: qsTr("Slow (x0.2 fee)") + translationManager.emptyString
|
||||
property string stringNormal: qsTr("Normal (x1 fee)") + translationManager.emptyString
|
||||
property string stringFast: qsTr("Fast (x5 fee)") + translationManager.emptyString
|
||||
property string stringFastest: qsTr("Fastest (x200 fee)") + translationManager.emptyString
|
||||
Repeater {
|
||||
id: repeater
|
||||
|
||||
delegate: Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: (dropdown.dropdownHeight * 0.75)
|
||||
//radius: index === repeater.count - 1 ? 4 : 0
|
||||
color: itemArea.containsMouse || index === columnid.currentIndex || itemArea.containsMouse ? dropdown.releasedColor : dropdown.pressedColor
|
||||
property string stringAutomatic: qsTr("Automatic") + translationManager.emptyString
|
||||
property string stringSlow: qsTr("Slow (x0.2 fee)") + translationManager.emptyString
|
||||
property string stringNormal: qsTr("Normal (x1 fee)") + translationManager.emptyString
|
||||
property string stringFast: qsTr("Fast (x5 fee)") + translationManager.emptyString
|
||||
property string stringFastest: qsTr("Fastest (x200 fee)") + translationManager.emptyString
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: col1Text
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
delegate: Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: col2Text.left
|
||||
anchors.leftMargin: 12
|
||||
anchors.rightMargin: 0
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.bold: false
|
||||
font.pixelSize: fontItemSize
|
||||
color: itemArea.containsMouse || index === columnid.currentIndex || itemArea.containsMouse ? "#FA6800" : "#FFFFFF"
|
||||
text: qsTr(column1) + translationManager.emptyString
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: col2Text
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 45
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 14
|
||||
color: "#FFFFFF"
|
||||
text: ""
|
||||
}
|
||||
height: (dropdown.dropdownHeight * 0.75)
|
||||
//radius: index === repeater.count - 1 ? 4 : 0
|
||||
color: itemArea.containsMouse || index === columnid.currentIndex || itemArea.containsMouse ? dropdown.releasedColor : dropdown.pressedColor
|
||||
|
||||
MouseArea {
|
||||
id: itemArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.ArrowCursor
|
||||
MoneroComponents.TextPlain {
|
||||
id: col1Text
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.right: col2Text.left
|
||||
anchors.leftMargin: 12
|
||||
anchors.rightMargin: 0
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.bold: false
|
||||
font.pixelSize: fontItemSize
|
||||
color: itemArea.containsMouse || index === columnid.currentIndex || itemArea.containsMouse ? "#FA6800" : "#FFFFFF"
|
||||
text: qsTr(column1) + translationManager.emptyString
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
popup.close()
|
||||
columnid.currentIndex = index
|
||||
changed();
|
||||
MoneroComponents.TextPlain {
|
||||
id: col2Text
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 45
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 14
|
||||
color: "#FFFFFF"
|
||||
text: ""
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: itemArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.ArrowCursor
|
||||
|
||||
onClicked: {
|
||||
popup.close()
|
||||
columnid.currentIndex = index
|
||||
changed();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
pragma Singleton
|
||||
|
||||
import QtQuick 2.5
|
||||
import QtQuick
|
||||
|
||||
QtObject {
|
||||
property bool blackTheme: true
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import moneroComponents.Clipboard 1.0
|
||||
import "../components" as MoneroComponents
|
||||
@@ -54,14 +54,16 @@ Rectangle {
|
||||
|
||||
Clipboard { id: clipboard }
|
||||
|
||||
property var transactionID;
|
||||
property string transactionID: ""
|
||||
|
||||
// same signals as Dialog has
|
||||
signal accepted()
|
||||
signal rejected()
|
||||
|
||||
function open(txid) {
|
||||
root.transactionID = txid;
|
||||
function open(txids) {
|
||||
root.transactionID = !txids ? ""
|
||||
: typeof txids === "string" ? txids
|
||||
: txids.join("\n");
|
||||
root.visible = true;
|
||||
}
|
||||
|
||||
@@ -128,7 +130,7 @@ Rectangle {
|
||||
readOnly: true
|
||||
wrapMode: Text.Wrap
|
||||
labelText: qsTr("Transaction file location:") + translationManager.emptyString
|
||||
text: walletManager.urlToLocalPath(saveTxDialog.fileUrl)
|
||||
text: walletManager.urlToLocalPath(saveTxDialog.selectedFile)
|
||||
fontSize: 16
|
||||
}
|
||||
|
||||
@@ -161,7 +163,7 @@ Rectangle {
|
||||
width: 200
|
||||
KeyNavigation.tab: doneButton
|
||||
onClicked: {
|
||||
oshelper.openContainingFolder(walletManager.urlToLocalPath(saveTxDialog.fileUrl))
|
||||
oshelper.openContainingFolder(walletManager.urlToLocalPath(saveTxDialog.selectedFile))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick
|
||||
|
||||
import "." as MoneroComponents
|
||||
import "effects/" as MoneroEffects
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
import "." as MoneroComponents
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Window 2.1
|
||||
import QtQuick
|
||||
import QtQuick.Window
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
|
||||
+12
-23
@@ -26,12 +26,13 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Window 2.0
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Layouts 1.2
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import QtQuick.Window
|
||||
import QtQuick.Layouts
|
||||
|
||||
import FontAwesome
|
||||
|
||||
import FontAwesome 1.0
|
||||
import "." as MoneroComponents
|
||||
import "effects/" as MoneroEffects
|
||||
|
||||
@@ -281,17 +282,17 @@ Rectangle {
|
||||
|
||||
source: MoneroComponents.Style.titleBarLogoSource
|
||||
visible: {
|
||||
if(!isOpenGL) return true;
|
||||
if(GraphicsInfo.api === GraphicsInfo.Software) return true;
|
||||
if(!MoneroComponents.Style.blackTheme) return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Colorize {
|
||||
visible: isOpenGL && MoneroComponents.Style.blackTheme
|
||||
MultiEffect {
|
||||
visible: GraphicsInfo.api !== GraphicsInfo.Software && MoneroComponents.Style.blackTheme
|
||||
anchors.fill: imgLogo
|
||||
source: imgLogo
|
||||
saturation: 0.0
|
||||
saturation: -1.0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -359,7 +360,7 @@ Rectangle {
|
||||
smooth: true
|
||||
mipmap: true
|
||||
opacity: 0.75
|
||||
rotation: appWindow.visibility === Window.FullScreen ? 180 : 0
|
||||
rotation: appWindow.visibility === Window.Maximized ? 180 : 0
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
@@ -421,21 +422,9 @@ Rectangle {
|
||||
|
||||
MouseArea {
|
||||
enabled: persistentSettings.customDecorations
|
||||
property var previousPosition
|
||||
anchors.fill: parent
|
||||
propagateComposedEvents: true
|
||||
onPressed: previousPosition = globalCursor.getPosition()
|
||||
onPressed: appWindow.startSystemMove()
|
||||
onDoubleClicked: root.maximizeClicked()
|
||||
onPositionChanged: {
|
||||
if (pressedButtons == Qt.LeftButton) {
|
||||
var pos = globalCursor.getPosition()
|
||||
var dx = pos.x - previousPosition.x
|
||||
var dy = pos.y - previousPosition.y
|
||||
|
||||
appWindow.x += dx
|
||||
appWindow.y += dy
|
||||
previousPosition = pos
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,11 +26,12 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import FontAwesome
|
||||
|
||||
import FontAwesome 1.0
|
||||
import "." as MoneroComponents
|
||||
|
||||
Rectangle {
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 1.4 as QtQuickControls1
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import FontAwesome
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
import "../js/Utils.js" as Utils
|
||||
import FontAwesome 1.0
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
@@ -189,7 +189,7 @@ Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 71
|
||||
|
||||
QtQuickControls1.BusyIndicator {
|
||||
BusyIndicator {
|
||||
id: txAmountBusyIndicator
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
@@ -326,6 +326,8 @@ Rectangle {
|
||||
|
||||
ScrollBar.vertical: ScrollBar {
|
||||
policy: recipientsArea.contentHeight > flickable.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
|
||||
palette.mid: "#8E8E93"
|
||||
palette.dark: "#B8B8BD"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -381,7 +383,7 @@ Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 50
|
||||
|
||||
QtQuickControls1.BusyIndicator {
|
||||
BusyIndicator {
|
||||
visible: !bottomTextAnimation.running
|
||||
running: !bottomTextAnimation.running
|
||||
scale: .5
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import moneroComponents.Downloader 1.0
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
|
||||
import "." as MoneroComponents
|
||||
|
||||
|
||||
@@ -26,8 +26,7 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick
|
||||
|
||||
import "../" as MoneroComponents
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Shapes
|
||||
|
||||
import "../" as MoneroComponents
|
||||
|
||||
@@ -49,34 +49,49 @@ Item {
|
||||
|
||||
// background software renderer
|
||||
Rectangle {
|
||||
visible: !isOpenGL
|
||||
visible: GraphicsInfo.api === GraphicsInfo.Software
|
||||
anchors.fill: parent
|
||||
color: root.fallBackColor
|
||||
}
|
||||
|
||||
// background opengl
|
||||
LinearGradient {
|
||||
visible: isOpenGL
|
||||
// accelerated background
|
||||
Shape {
|
||||
id: gradientShape
|
||||
visible: GraphicsInfo.api !== GraphicsInfo.Software
|
||||
anchors.fill: parent
|
||||
start: root.start
|
||||
end: root.end
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
id: gradientStart
|
||||
position: root.posStart
|
||||
color: root.initialStartColor
|
||||
}
|
||||
GradientStop {
|
||||
id: gradientStop
|
||||
position: root.posStop
|
||||
color: root.initialStopColor
|
||||
|
||||
ShapePath {
|
||||
strokeWidth: -1
|
||||
fillGradient: LinearGradient {
|
||||
x1: root.start.x
|
||||
y1: root.start.y
|
||||
x2: root.end.x
|
||||
y2: root.end.y
|
||||
|
||||
GradientStop {
|
||||
id: gradientStart
|
||||
position: root.posStart
|
||||
color: root.initialStartColor
|
||||
}
|
||||
GradientStop {
|
||||
id: gradientStop
|
||||
position: root.posStop
|
||||
color: root.initialStopColor
|
||||
}
|
||||
}
|
||||
|
||||
startX: 0
|
||||
startY: 0
|
||||
PathLine { x: gradientShape.width; y: 0 }
|
||||
PathLine { x: gradientShape.width; y: gradientShape.height }
|
||||
PathLine { x: 0; y: gradientShape.height }
|
||||
PathLine { x: 0; y: 0 }
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "black";
|
||||
when: isOpenGL && MoneroComponents.Style.blackTheme
|
||||
when: GraphicsInfo.api !== GraphicsInfo.Software && MoneroComponents.Style.blackTheme
|
||||
PropertyChanges {
|
||||
target: gradientStart
|
||||
color: root.blackColorStart
|
||||
@@ -87,7 +102,7 @@ Item {
|
||||
}
|
||||
}, State {
|
||||
name: "white";
|
||||
when: isOpenGL && !MoneroComponents.Style.blackTheme
|
||||
when: GraphicsInfo.api !== GraphicsInfo.Software && !MoneroComponents.Style.blackTheme
|
||||
PropertyChanges {
|
||||
target: gradientStart
|
||||
color: root.whiteColorStart
|
||||
|
||||
@@ -26,15 +26,16 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
|
||||
import FontAwesome
|
||||
|
||||
import "../" as MoneroComponents
|
||||
import FontAwesome 1.0
|
||||
|
||||
Item {
|
||||
// Use this component to color+opacity change images with transparency (svg/png)
|
||||
// Does not work in low graphics mode, use fontAwesome fallback option.
|
||||
// Does not work with the software renderer, use the FontAwesome fallback.
|
||||
|
||||
id: root
|
||||
property string image: ""
|
||||
@@ -63,12 +64,13 @@ Item {
|
||||
visible: false
|
||||
}
|
||||
|
||||
ColorOverlay {
|
||||
MultiEffect {
|
||||
id: imgMockColor
|
||||
anchors.fill: root
|
||||
source: svgMask
|
||||
color: root.color
|
||||
visible: image && isOpenGL
|
||||
colorization: 1.0
|
||||
colorizationColor: root.color
|
||||
visible: image && GraphicsInfo.api !== GraphicsInfo.Software
|
||||
}
|
||||
|
||||
Text {
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Keep this exact list in sync with the submodules.
|
||||
[safe]
|
||||
directory = /monero-gui
|
||||
directory = /monero-gui/monero
|
||||
directory = /monero-gui/external/quirc
|
||||
directory = /monero-gui/monero/external/rapidjson
|
||||
directory = /monero-gui/monero/external/rapidjson/thirdparty/gtest
|
||||
directory = /monero-gui/monero/external/trezor-common
|
||||
directory = /monero-gui/monero/external/trezor-common/defs/ethereum/tokens
|
||||
directory = /monero-gui/monero/external/randomx
|
||||
directory = /monero-gui/monero/external/supercop
|
||||
@@ -1,76 +1,70 @@
|
||||
pragma Singleton
|
||||
import QtQuick 2.9
|
||||
|
||||
Object {
|
||||
import QtQuick
|
||||
|
||||
QtObject {
|
||||
//Font Awesome version 5.15.3
|
||||
FontLoader {
|
||||
id: regular
|
||||
readonly property FontLoader regular: FontLoader {
|
||||
source: "./fa-regular-400.otf"
|
||||
}
|
||||
|
||||
FontLoader {
|
||||
id: brands
|
||||
readonly property FontLoader brands: FontLoader {
|
||||
source: "./fa-brands-400.otf"
|
||||
}
|
||||
|
||||
FontLoader {
|
||||
id: solid
|
||||
readonly property FontLoader solid: FontLoader {
|
||||
source: "./fa-solid-900.otf"
|
||||
}
|
||||
|
||||
property string fontFamily: regular.name
|
||||
property string fontFamilyBrands: brands.name
|
||||
property string fontFamilySolid: solid.name
|
||||
readonly property string fontFamily: regular.name
|
||||
readonly property string fontFamilyBrands: brands.name
|
||||
readonly property string fontFamilySolid: solid.name
|
||||
|
||||
// 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 arrowCircleRight : "\uf0a9"
|
||||
property string arrowDown : "\uf063"
|
||||
property string arrowLeft : "\uf060"
|
||||
property string arrowRight : "\uf061"
|
||||
property string cashRegister: "\uf788"
|
||||
property string checkCircle: "\uf058"
|
||||
property string clipboard : "\uf0ea"
|
||||
property string clockO : "\uf017"
|
||||
property string cloud : "\uf0c2"
|
||||
property string desktop : "\uf108"
|
||||
property string edit : "\uf044"
|
||||
property string ellipsisH : "\uf141"
|
||||
property string exclamationCircle : "\uf06a"
|
||||
property string eye : "\uf06e"
|
||||
property string eyeSlash : "\uf070"
|
||||
property string folderOpen : "\uf07c"
|
||||
property string globe : "\uf0ac"
|
||||
property string home : "\uf015"
|
||||
property string houseUser : "\ue065"
|
||||
property string infinity : "\uf534"
|
||||
property string info : "\uf129"
|
||||
property string key : "\uf084"
|
||||
property string language : "\uf1ab"
|
||||
property string lock : "\uf023"
|
||||
property string magnifyingGlass : "\uf002"
|
||||
property string minus : "\uf068"
|
||||
property string minusCircle : "\uf056"
|
||||
property string moonO : "\uf186"
|
||||
property string monero : "\uf3d0"
|
||||
property string paste : "\uf0ea"
|
||||
property string pencilSquare : "\uf14b"
|
||||
property string plus : "\uf067"
|
||||
property string plusCircle : "\uf055"
|
||||
property string productHunt : "\uf288"
|
||||
property string qrcode : "\uf029"
|
||||
property string questionCircle : "\uf059"
|
||||
property string random : "\uf074"
|
||||
property string repeat : "\uf01e"
|
||||
property string searchPlus : "\uf00e"
|
||||
property string server : "\uf233"
|
||||
property string shieldAlt : "\uf3ed"
|
||||
property string signOutAlt : "\uf2f5"
|
||||
property string times : "\uf00d"
|
||||
readonly property string addressBook: "\uf2b9"
|
||||
readonly property string arrowCircleRight: "\uf0a9"
|
||||
readonly property string arrowDown: "\uf063"
|
||||
readonly property string arrowLeft: "\uf060"
|
||||
readonly property string arrowRight: "\uf061"
|
||||
readonly property string cashRegister: "\uf788"
|
||||
readonly property string checkCircle: "\uf058"
|
||||
readonly property string clipboard: "\uf0ea"
|
||||
readonly property string clockO: "\uf017"
|
||||
readonly property string cloud: "\uf0c2"
|
||||
readonly property string desktop: "\uf108"
|
||||
readonly property string edit: "\uf044"
|
||||
readonly property string ellipsisH: "\uf141"
|
||||
readonly property string exclamationCircle: "\uf06a"
|
||||
readonly property string eye: "\uf06e"
|
||||
readonly property string eyeSlash: "\uf070"
|
||||
readonly property string folderOpen: "\uf07c"
|
||||
readonly property string globe: "\uf0ac"
|
||||
readonly property string home: "\uf015"
|
||||
readonly property string houseUser: "\ue065"
|
||||
readonly property string infinity: "\uf534"
|
||||
readonly property string info: "\uf129"
|
||||
readonly property string key: "\uf084"
|
||||
readonly property string language: "\uf1ab"
|
||||
readonly property string lock: "\uf023"
|
||||
readonly property string magnifyingGlass: "\uf002"
|
||||
readonly property string minus: "\uf068"
|
||||
readonly property string minusCircle: "\uf056"
|
||||
readonly property string moonO: "\uf186"
|
||||
readonly property string monero: "\uf3d0"
|
||||
readonly property string paste: "\uf0ea"
|
||||
readonly property string pencilSquare: "\uf14b"
|
||||
readonly property string plus: "\uf067"
|
||||
readonly property string plusCircle: "\uf055"
|
||||
readonly property string productHunt: "\uf288"
|
||||
readonly property string qrcode: "\uf029"
|
||||
readonly property string questionCircle: "\uf059"
|
||||
readonly property string random: "\uf074"
|
||||
readonly property string repeat: "\uf01e"
|
||||
readonly property string searchPlus: "\uf00e"
|
||||
readonly property string server: "\uf233"
|
||||
readonly property string shieldAlt: "\uf3ed"
|
||||
readonly property string signOutAlt: "\uf2f5"
|
||||
readonly property string times: "\uf00d"
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
import QtQuick 2.9
|
||||
|
||||
QtObject {
|
||||
id: object
|
||||
default property alias children: object.__children
|
||||
|
||||
property list<QtObject> __children: [QtObject {}]
|
||||
}
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="14" viewBox="0 0 8 14">
|
||||
<path fill="none" fill-rule="evenodd" stroke="#404040" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.2" d="M1 1l6 6-6 6" opacity="1"/>
|
||||
<path fill="none" fill-rule="evenodd" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.2" d="M1 1l6 6-6 6" opacity="1"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 245 B |
+7
-1
@@ -28,6 +28,12 @@ function isNumeric(n) {
|
||||
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||
}
|
||||
|
||||
function finishSettingsLoad(settings) {
|
||||
// Qt may save defaults over existing settings when a new setting is added.
|
||||
// Refresh the pending save after all settings have loaded.
|
||||
settings.wallet_pathChanged();
|
||||
}
|
||||
|
||||
function showSeedPage() {
|
||||
// Shows `Settings->Seed & keys`. Prompts a password dialog.
|
||||
passwordDialog.onAcceptedCallback = function() {
|
||||
@@ -121,7 +127,7 @@ function parseDateStringOrRestoreHeightAsInteger(value) {
|
||||
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) {
|
||||
} else if (parseInt(value.substring(0, 4)) >= 2014 && parseInt(value.substring(0, 4)) <= new Date().getFullYear() && 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());
|
||||
|
||||
@@ -1,29 +1,5 @@
|
||||
.pragma library
|
||||
|
||||
function updateFromQrCode(address, payment_id, amount, tx_description, recipient_name, extra_parameters) {
|
||||
// Switch to recover from keys
|
||||
recoverFromSeedMode = false
|
||||
spendKeyLine.text = ""
|
||||
viewKeyLine.text = ""
|
||||
restoreHeight.text = ""
|
||||
|
||||
if(typeof extra_parameters.secret_view_key != "undefined") {
|
||||
viewKeyLine.text = extra_parameters.secret_view_key
|
||||
}
|
||||
if(typeof extra_parameters.secret_spend_key != "undefined") {
|
||||
spendKeyLine.text = extra_parameters.secret_spend_key
|
||||
}
|
||||
if(typeof extra_parameters.restore_height != "undefined") {
|
||||
restoreHeight.text = extra_parameters.restore_height
|
||||
}
|
||||
addressLine.text = address
|
||||
|
||||
cameraUi.qrcode_decoded.disconnect(updateFromQrCode)
|
||||
|
||||
// Check if keys are correct
|
||||
checkNextButton();
|
||||
}
|
||||
|
||||
function switchPage(next) {
|
||||
// Android focus workaround
|
||||
releaseFocus();
|
||||
|
||||
@@ -26,15 +26,16 @@
|
||||
// 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.
|
||||
|
||||
import QtQml.Models 2.2
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Window 2.0
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls.Styles 1.1
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQml.Models
|
||||
import QtCore
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import QtQuick.Window
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Dialogs
|
||||
|
||||
import FontAwesome 1.0
|
||||
|
||||
import FontAwesome
|
||||
|
||||
import moneroComponents.Network 1.0
|
||||
import moneroComponents.Wallet 1.0
|
||||
@@ -68,10 +69,12 @@ ApplicationWindow {
|
||||
property bool hideBalanceForced: false
|
||||
property bool ctrlPressed: false
|
||||
property alias persistentSettings : persistentSettings
|
||||
property string accountsDir: !persistentSettings.portable ? moneroAccountsDir : persistentSettings.portableFolderName + "/wallets"
|
||||
property string accountsDir: !portableSettings.portable ? moneroAccountsDir : portableSettings.portableFolderName + "/wallets"
|
||||
property var currentWallet;
|
||||
property bool disconnected: currentWallet ? currentWallet.disconnected : false
|
||||
property var transaction;
|
||||
property double transactionRequestId: 0
|
||||
property double activeTransactionRequestId: 0
|
||||
property var walletPassword
|
||||
property int restoreHeight:0
|
||||
property bool daemonSynced: false
|
||||
@@ -105,20 +108,20 @@ ApplicationWindow {
|
||||
|
||||
// fiat price conversion
|
||||
property real fiatPrice: 0
|
||||
property real fiatPriceUSD: 0
|
||||
property var fiatRates: ({"USD": 1}) // units of each currency per 1 USD
|
||||
property real fiatRatesTimestamp: 0
|
||||
readonly property real fiatRatesMaxAge: 60 * 60 * 1000
|
||||
readonly property string fiatRatesAPI: "https://api.frankfurter.dev/v1/latest?base=USD"
|
||||
readonly property var fiatCurrencies: [
|
||||
"USD", "EUR", "GBP", "AUD", "BRL", "CAD", "CHF", "CNY", "CZK", "DKK",
|
||||
"HKD", "HUF", "IDR", "ILS", "INR", "ISK", "JPY", "KRW", "MXN", "MYR",
|
||||
"NOK", "NZD", "PHP", "PLN", "RON", "SEK", "SGD", "THB", "TRY", "ZAR"
|
||||
]
|
||||
property var fiatPriceAPIs: {
|
||||
return {
|
||||
"kraken": {
|
||||
"xmrusd": "https://api.kraken.com/0/public/Ticker?pair=XMRUSD",
|
||||
"xmreur": "https://api.kraken.com/0/public/Ticker?pair=XMREUR"
|
||||
},
|
||||
"coingecko": {
|
||||
"xmrusd": "https://api.coingecko.com/api/v3/simple/price?ids=monero&vs_currencies=usd",
|
||||
"xmreur": "https://api.coingecko.com/api/v3/simple/price?ids=monero&vs_currencies=eur"
|
||||
},
|
||||
"cryptocompare": {
|
||||
"xmrusd": "https://min-api.cryptocompare.com/data/price?fsym=XMR&tsyms=USD",
|
||||
"xmreur": "https://min-api.cryptocompare.com/data/price?fsym=XMR&tsyms=EUR",
|
||||
}
|
||||
"kraken": "https://api.kraken.com/0/public/Ticker?pair=XMRUSD",
|
||||
"coinpaprika": "https://api.coinpaprika.com/v1/tickers/xmr-monero"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,12 +247,6 @@ ApplicationWindow {
|
||||
function initialize() {
|
||||
console.log("initializing..")
|
||||
|
||||
// Use stored log level
|
||||
if (persistentSettings.logLevel == 5)
|
||||
walletManager.setLogCategories(persistentSettings.logCategories)
|
||||
else
|
||||
walletManager.setLogLevel(persistentSettings.logLevel)
|
||||
|
||||
// Reload transfer page with translations enabled
|
||||
middlePanel.transferView.onPageCompleted();
|
||||
|
||||
@@ -544,7 +541,13 @@ ApplicationWindow {
|
||||
default:
|
||||
// opening with password but password doesn't match
|
||||
console.error("Error opening wallet with password: ", wallet.errorString);
|
||||
passwordDialog.showError(qsTr("Couldn't open wallet: ") + wallet.errorString);
|
||||
var errorMessage = qsTr("Couldn't open wallet: ") + wallet.errorString;
|
||||
if (wallet.isLedger()) {
|
||||
errorMessage += "\n" + qsTr("Make sure your Ledger is connected and unlocked, and the Monero app is open.");
|
||||
} else if (wallet.isTrezor()) {
|
||||
errorMessage += "\n" + qsTr("Make sure your Trezor is connected and unlocked.");
|
||||
}
|
||||
passwordDialog.showError(errorMessage);
|
||||
console.log("closing wallet async : " + wallet.address)
|
||||
closeWallet();
|
||||
return;
|
||||
@@ -836,7 +839,6 @@ ApplicationWindow {
|
||||
middlePanel.advancedView.miningView.update()
|
||||
informationPopup.text += qsTr("\n\nExiting p2pool. Please check that port 18083 is available.") + translationManager.emptyString;
|
||||
}
|
||||
informationPopup.icon = StandardIcon.Critical
|
||||
informationPopup.onCloseCallback = null
|
||||
informationPopup.open();
|
||||
}
|
||||
@@ -895,8 +897,15 @@ ApplicationWindow {
|
||||
return false;
|
||||
}
|
||||
|
||||
function onTransactionCreated(pendingTransaction, addresses, paymentId, mixinCount) {
|
||||
function onTransactionCreated(pendingTransaction, addresses, paymentId, mixinCount, requestId) {
|
||||
console.log("Transaction created");
|
||||
if (requestId !== activeTransactionRequestId) {
|
||||
console.log("Discarding stale transaction");
|
||||
currentWallet.disposeTransaction(pendingTransaction);
|
||||
return;
|
||||
}
|
||||
|
||||
activeTransactionRequestId = 0;
|
||||
txConfirmationPopup.bottomText.text = "";
|
||||
transaction = pendingTransaction;
|
||||
// validate address;
|
||||
@@ -909,12 +918,14 @@ ApplicationWindow {
|
||||
}
|
||||
// deleting transaction object, we don't want memleaks
|
||||
currentWallet.disposeTransaction(transaction);
|
||||
transaction = null;
|
||||
|
||||
} else if (transaction.txCount == 0) {
|
||||
console.error("Can't create transaction: ", transaction.errorString);
|
||||
txConfirmationPopup.errorText.text = qsTr("No unmixable outputs to sweep") + translationManager.emptyString
|
||||
// deleting transaction object, we don't want memleaks
|
||||
currentWallet.disposeTransaction(transaction);
|
||||
transaction = null;
|
||||
} else {
|
||||
console.log("Transaction created, amount: " + walletManager.displayAmount(transaction.amount)
|
||||
+ ", fee: " + walletManager.displayAmount(transaction.fee));
|
||||
@@ -922,8 +933,6 @@ ApplicationWindow {
|
||||
// here we update txConfirmationPopup
|
||||
txConfirmationPopup.transactionAmount = Utils.removeTrailingZeros(walletManager.displayAmount(transaction.amount));
|
||||
txConfirmationPopup.transactionFee = Utils.removeTrailingZeros(walletManager.displayAmount(transaction.fee));
|
||||
txConfirmationPopup.confirmButton.text = viewOnly ? qsTr("Save as file") : qsTr("Confirm") + translationManager.emptyString;
|
||||
txConfirmationPopup.confirmButton.rightIcon = viewOnly ? "" : "qrc:///images/rightArrow.png"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -951,6 +960,7 @@ ApplicationWindow {
|
||||
throw "Sending all requires one destination address";
|
||||
}
|
||||
|
||||
txConfirmationPopup.clearFields();
|
||||
txConfirmationPopup.bottomTextAnimation.running = false;
|
||||
txConfirmationPopup.bottomText.text = qsTr("Creating transaction...") + translationManager.emptyString;
|
||||
txConfirmationPopup.recipients = recipients;
|
||||
@@ -959,8 +969,11 @@ ApplicationWindow {
|
||||
txConfirmationPopup.transactionDescription = description;
|
||||
txConfirmationPopup.open();
|
||||
|
||||
const requestId = ++transactionRequestId;
|
||||
activeTransactionRequestId = requestId;
|
||||
|
||||
if (recipientAll) {
|
||||
currentWallet.createTransactionAllAsync(recipientAll.address, paymentId, mixinCount, priority);
|
||||
currentWallet.createTransactionAllAsync(recipientAll.address, paymentId, mixinCount, priority, requestId);
|
||||
} else {
|
||||
const addresses = recipients.map(function (recipient) {
|
||||
return recipient.address;
|
||||
@@ -968,7 +981,17 @@ ApplicationWindow {
|
||||
const amountsxmr = recipients.map(function (recipient) {
|
||||
return recipient.amount;
|
||||
});
|
||||
currentWallet.createTransactionAsync(addresses, paymentId, amountsxmr, mixinCount, priority);
|
||||
currentWallet.createTransactionAsync(addresses, paymentId, amountsxmr, mixinCount, priority, requestId);
|
||||
}
|
||||
}
|
||||
|
||||
function rejectPendingTransaction() {
|
||||
activeTransactionRequestId = 0;
|
||||
txConfirmationPopup.bottomTextAnimation.running = false;
|
||||
txConfirmationPopup.bottomText.text = "";
|
||||
if (transaction) {
|
||||
currentWallet.disposeTransaction(transaction);
|
||||
transaction = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -976,15 +999,14 @@ ApplicationWindow {
|
||||
FileDialog {
|
||||
id: saveTxDialog
|
||||
title: "Please choose a location"
|
||||
folder: "file://" + appWindow.accountsDir
|
||||
selectExisting: false;
|
||||
currentFolder: "file://" + appWindow.accountsDir
|
||||
fileMode: FileDialog.SaveFile
|
||||
|
||||
onAccepted: {
|
||||
handleTransactionConfirmed()
|
||||
}
|
||||
onRejected: {
|
||||
// do nothing
|
||||
|
||||
rejectPendingTransaction()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -993,19 +1015,23 @@ ApplicationWindow {
|
||||
function handleSweepUnmixable() {
|
||||
console.log("Creating transaction: ")
|
||||
|
||||
txConfirmationPopup.clearFields();
|
||||
txConfirmationPopup.sweepUnmixable = true;
|
||||
transaction = currentWallet.createSweepUnmixableTransaction();
|
||||
txConfirmationPopup.open();
|
||||
if (transaction.status !== PendingTransaction.Status_Ok) {
|
||||
console.error("Can't create transaction: ", transaction.errorString);
|
||||
txConfirmationPopup.errorText.text = qsTr("Can't create transaction: ") + transaction.errorString + translationManager.emptyString
|
||||
// deleting transaction object, we don't want memleaks
|
||||
currentWallet.disposeTransaction(transaction);
|
||||
transaction = null;
|
||||
|
||||
} else if (transaction.txCount == 0) {
|
||||
console.error("No unmixable outputs to sweep");
|
||||
txConfirmationPopup.errorText.text = qsTr("No unmixable outputs to sweep") + translationManager.emptyString
|
||||
// deleting transaction object, we don't want memleaks
|
||||
currentWallet.disposeTransaction(transaction);
|
||||
transaction = null;
|
||||
} else {
|
||||
console.log("Transaction created, amount: " + walletManager.displayAmount(transaction.amount)
|
||||
+ ", fee: " + walletManager.displayAmount(transaction.fee));
|
||||
@@ -1013,7 +1039,6 @@ ApplicationWindow {
|
||||
txConfirmationPopup.transactionFee = Utils.removeTrailingZeros(walletManager.displayAmount(transaction.fee));
|
||||
// committing transaction
|
||||
}
|
||||
txConfirmationPopup.open();
|
||||
}
|
||||
|
||||
// called after user confirms transaction
|
||||
@@ -1021,18 +1046,20 @@ ApplicationWindow {
|
||||
// View only wallet - we save the tx
|
||||
if(viewOnly){
|
||||
// No file specified - abort
|
||||
if(!saveTxDialog.fileUrl) {
|
||||
currentWallet.disposeTransaction(transaction)
|
||||
if(!saveTxDialog.selectedFile.toString()) {
|
||||
rejectPendingTransaction()
|
||||
return;
|
||||
}
|
||||
|
||||
var path = walletManager.urlToLocalPath(saveTxDialog.fileUrl)
|
||||
var path = walletManager.urlToLocalPath(saveTxDialog.selectedFile)
|
||||
|
||||
// Store to file
|
||||
transaction.setFilename(path);
|
||||
}
|
||||
appWindow.showProcessingSplash(qsTr("Sending transaction ..."));
|
||||
currentWallet.commitTransactionAsync(transaction);
|
||||
const pendingTransaction = transaction;
|
||||
transaction = null;
|
||||
currentWallet.commitTransactionAsync(pendingTransaction);
|
||||
}
|
||||
|
||||
function onTransactionCommitted(success, transaction, txid) {
|
||||
@@ -1041,7 +1068,6 @@ ApplicationWindow {
|
||||
console.log("Error committing transaction: " + transaction.errorString);
|
||||
informationPopup.title = qsTr("Error") + translationManager.emptyString
|
||||
informationPopup.text = qsTr("Couldn't send the money: ") + transaction.errorString
|
||||
informationPopup.icon = StandardIcon.Critical
|
||||
informationPopup.onCloseCallback = null;
|
||||
informationPopup.open();
|
||||
} else {
|
||||
@@ -1072,7 +1098,7 @@ ApplicationWindow {
|
||||
// called on "getProof"
|
||||
function handleGetProof(txid, address, message, amount) {
|
||||
if (amount !== null && amount.length > 0) {
|
||||
var result = currentWallet.getReserveProof(false, currentWallet.currentSubaddressAccount, walletManager.amountFromString(amount), message)
|
||||
var result = currentWallet.getReserveProof(false, currentWallet.currentSubaddressAccount, amount, message)
|
||||
txProofComputed(null, result)
|
||||
} else {
|
||||
console.log("Getting payment proof: ")
|
||||
@@ -1098,10 +1124,8 @@ ApplicationWindow {
|
||||
if (result.indexOf("error|") === 0) {
|
||||
var errorString = result.split("|")[1];
|
||||
informationPopup.text = qsTr("Couldn't generate a proof because of the following reason: \n") + errorString + translationManager.emptyString;
|
||||
informationPopup.icon = StandardIcon.Critical;
|
||||
} else {
|
||||
informationPopup.text = result;
|
||||
informationPopup.icon = StandardIcon.Critical;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1132,10 +1156,8 @@ ApplicationWindow {
|
||||
var confirmations = results[4];
|
||||
|
||||
informationPopup.title = qsTr("Payment proof check") + translationManager.emptyString;
|
||||
informationPopup.icon = StandardIcon.Information
|
||||
if (!good) {
|
||||
informationPopup.text = qsTr("Bad signature");
|
||||
informationPopup.icon = StandardIcon.Critical;
|
||||
} else if (received > 0) {
|
||||
if (in_pool) {
|
||||
informationPopup.text = qsTr("This address received %1 monero, but the transaction is not yet mined").arg(walletManager.displayAmount(received));
|
||||
@@ -1151,19 +1173,16 @@ ApplicationWindow {
|
||||
else if (results.length == 2 && results[0] === "true") {
|
||||
var good = results[1] === "true";
|
||||
informationPopup.title = qsTr("Payment proof check") + translationManager.emptyString;
|
||||
informationPopup.icon = good ? StandardIcon.Information : StandardIcon.Critical;
|
||||
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");
|
||||
informationPopup.text = good ? qsTr("Good signature on %1 total and %2 spent.").arg(walletManager.displayAmount(results[2])).arg(walletManager.displayAmount(results[3])) : qsTr("Bad signature");
|
||||
}
|
||||
else {
|
||||
informationPopup.title = qsTr("Error") + translationManager.emptyString;
|
||||
informationPopup.text = currentWallet.errorString;
|
||||
informationPopup.icon = StandardIcon.Critical
|
||||
}
|
||||
informationPopup.onCloseCallback = null
|
||||
informationPopup.open()
|
||||
@@ -1226,55 +1245,37 @@ ApplicationWindow {
|
||||
|
||||
Timer {
|
||||
id: fiatPriceTimer
|
||||
interval: 1000 * 60;
|
||||
interval: 1000 * 60 * 5;
|
||||
running: persistentSettings.fiatPriceEnabled && currentWallet !== undefined
|
||||
repeat: true
|
||||
onTriggered: appWindow.fiatApiRefresh()
|
||||
triggeredOnStart: true
|
||||
}
|
||||
|
||||
function fiatApiParseTicker(url, resp, currency){
|
||||
// parse & validate incoming JSON
|
||||
function getKeyFromCurrency(currency) {
|
||||
if (currency.length !== 6 || currency.substring(0, 3) !== "xmr") return undefined;
|
||||
return currency.substring(3);
|
||||
}
|
||||
|
||||
function fiatApiParseTicker(url, resp){
|
||||
if(url.startsWith("https://api.kraken.com/0/")){
|
||||
if(resp.hasOwnProperty("error") && resp.error.length > 0 || !resp.hasOwnProperty("result")){
|
||||
appWindow.fiatApiError("Kraken API has error(s)");
|
||||
return;
|
||||
}
|
||||
|
||||
var key = currency === "xmreur" ? "XXMRZEUR" : "XXMRZUSD";
|
||||
var ticker = resp.result[key]["c"][0];
|
||||
return ticker;
|
||||
} else if(url.startsWith("https://api.coingecko.com/api/v3/")){
|
||||
var key = currency === "xmreur" ? "eur" : "usd";
|
||||
if(!resp.hasOwnProperty("monero") || !resp["monero"].hasOwnProperty(key)){
|
||||
appWindow.fiatApiError("Coingecko API has error(s)");
|
||||
var key = "XXMRZUSD";
|
||||
if(!resp.result.hasOwnProperty(key)){
|
||||
appWindow.fiatApiError("Kraken API has error(s)");
|
||||
return;
|
||||
}
|
||||
return resp["monero"][key];
|
||||
} else if(url.startsWith("https://min-api.cryptocompare.com/data/")){
|
||||
var key = currency === "xmreur" ? "EUR" : "USD";
|
||||
if(!resp.hasOwnProperty(key)){
|
||||
appWindow.fiatApiError("cryptocompare API has error(s)");
|
||||
return parseFloat(resp.result[key]["c"][0]);
|
||||
} else if(url.startsWith("https://api.coinpaprika.com/v1/")){
|
||||
if(!resp.hasOwnProperty("quotes") || !resp.quotes.hasOwnProperty("USD") || !resp.quotes["USD"].hasOwnProperty("price")){
|
||||
appWindow.fiatApiError("CoinPaprika API has error(s)");
|
||||
return;
|
||||
}
|
||||
return resp[key];
|
||||
}
|
||||
}
|
||||
|
||||
function fiatApiGetCurrency(url) {
|
||||
var apis = appWindow.fiatPriceAPIs;
|
||||
for (var api in apis){
|
||||
if (!apis.hasOwnProperty(api))
|
||||
continue;
|
||||
|
||||
for (var cur in apis[api]){
|
||||
if(!apis[api].hasOwnProperty(cur))
|
||||
continue;
|
||||
|
||||
if (apis[api][cur] === url) {
|
||||
return cur;
|
||||
}
|
||||
}
|
||||
return resp.quotes["USD"]["price"];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1291,20 +1292,52 @@ ApplicationWindow {
|
||||
return;
|
||||
}
|
||||
|
||||
// handle incoming JSON, set ticker
|
||||
var currency = appWindow.fiatApiGetCurrency(url);
|
||||
if(typeof currency == "undefined"){
|
||||
appWindow.fiatApiError("could not get currency");
|
||||
return;
|
||||
}
|
||||
|
||||
var ticker = appWindow.fiatApiParseTicker(url, resp, currency);
|
||||
if(ticker <= 0){
|
||||
var ticker = appWindow.fiatApiParseTicker(url, resp);
|
||||
if(!(ticker > 0)){
|
||||
appWindow.fiatApiError("could not get ticker");
|
||||
return;
|
||||
}
|
||||
|
||||
appWindow.fiatPrice = ticker;
|
||||
appWindow.fiatPriceUSD = ticker;
|
||||
appWindow.fiatApiUpdatePrice();
|
||||
}
|
||||
|
||||
function fiatApiRatesReceived(url, resp, error) {
|
||||
if (error) {
|
||||
appWindow.fiatApiError(error);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
resp = JSON.parse(resp);
|
||||
} catch (e) {
|
||||
appWindow.fiatApiError("bad JSON: " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
if(resp.base !== "USD" || typeof resp.rates !== "object" || resp.rates === null){
|
||||
appWindow.fiatApiError("fiat rates API has error(s)");
|
||||
return;
|
||||
}
|
||||
|
||||
var rates = {"USD": 1};
|
||||
for (var code in resp.rates){
|
||||
if (!resp.rates.hasOwnProperty(code)) continue;
|
||||
|
||||
const rate = Number(resp.rates[code]);
|
||||
if (isFinite(rate) && rate > 0)
|
||||
rates[code] = rate;
|
||||
}
|
||||
|
||||
appWindow.fiatRates = rates;
|
||||
appWindow.fiatRatesTimestamp = Date.now();
|
||||
appWindow.fiatApiUpdatePrice();
|
||||
}
|
||||
|
||||
function fiatApiUpdatePrice() {
|
||||
const symbol = appWindow.fiatApiCurrencySymbol();
|
||||
const rate = appWindow.fiatRates.hasOwnProperty(symbol) ? appWindow.fiatRates[symbol] : 0;
|
||||
appWindow.fiatPrice = (appWindow.fiatPriceUSD > 0 && rate > 0) ? appWindow.fiatPriceUSD * rate : 0;
|
||||
|
||||
appWindow.updateBalance();
|
||||
}
|
||||
@@ -1320,26 +1353,26 @@ ApplicationWindow {
|
||||
return;
|
||||
}
|
||||
|
||||
var provider = appWindow.fiatPriceAPIs[userProvider];
|
||||
var userCurrency = persistentSettings.fiatPriceCurrency;
|
||||
if(!provider.hasOwnProperty(userCurrency)){
|
||||
appWindow.fiatApiError("currency \"" + userCurrency + "\" not implemented");
|
||||
}
|
||||
network.getJSON(appWindow.fiatPriceAPIs[userProvider], fiatApiJsonReceived);
|
||||
|
||||
var url = provider[userCurrency];
|
||||
network.getJSON(url, fiatApiJsonReceived);
|
||||
if(appWindow.fiatApiCurrencySymbol() !== "USD"){
|
||||
if(!persistentSettings.fiatRatesConsentGiven){
|
||||
appWindow.fiatApiError("exchange rate provider consent not given for non-USD currency");
|
||||
return;
|
||||
}
|
||||
|
||||
if(Date.now() - appWindow.fiatRatesTimestamp > appWindow.fiatRatesMaxAge)
|
||||
network.getJSON(appWindow.fiatRatesAPI, fiatApiRatesReceived);
|
||||
}
|
||||
}
|
||||
|
||||
function fiatApiCurrencySymbol() {
|
||||
switch (persistentSettings.fiatPriceCurrency) {
|
||||
case "xmrusd":
|
||||
return "USD";
|
||||
case "xmreur":
|
||||
return "EUR";
|
||||
default:
|
||||
console.error("unsupported currency", persistentSettings.fiatPriceCurrency);
|
||||
return "UNSUPPORTED";
|
||||
const key = getKeyFromCurrency(persistentSettings.fiatPriceCurrency);
|
||||
if (key === undefined) {
|
||||
console.error("unsupported currency", persistentSettings.fiatPriceCurrency);
|
||||
return "UNSUPPORTED";
|
||||
}
|
||||
return key.toUpperCase();
|
||||
}
|
||||
|
||||
function fiatApiConvertToFiat(amount) {
|
||||
@@ -1363,7 +1396,7 @@ ApplicationWindow {
|
||||
function fiatApiUpdateBalance(balance){
|
||||
// update balance card
|
||||
var bFiat = "?.??"
|
||||
if (!hideBalanceForced && !persistentSettings.hideBalance) {
|
||||
if (!hideBalanceForced && !persistentSettings.hideBalance && appWindow.fiatPrice > 0) {
|
||||
bFiat = fiatApiConvertToFiat(balance);
|
||||
}
|
||||
leftPanel.balanceFiatString = bFiat;
|
||||
@@ -1374,6 +1407,12 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
logger.resetLogFilePath(portableSettings.portable);
|
||||
if (persistentSettings.logLevel == 5)
|
||||
walletManager.setLogCategories(persistentSettings.logCategories)
|
||||
else
|
||||
walletManager.setLogLevel(persistentSettings.logLevel)
|
||||
|
||||
if (screenAvailableWidth > width) {
|
||||
x = (screenAvailableWidth - width) / 2;
|
||||
}
|
||||
@@ -1403,16 +1442,14 @@ ApplicationWindow {
|
||||
mainApp.closing.connect(appWindow.close);
|
||||
|
||||
if( appWindow.qrScannerEnabled ){
|
||||
console.log("qrScannerEnabled : load component QRCodeScanner");
|
||||
var component = Qt.createComponent("components/QRCodeScanner.qml");
|
||||
if (component.status == Component.Ready) {
|
||||
console.log("Camera component ready");
|
||||
cameraUi = component.createObject(appWindow);
|
||||
} else {
|
||||
console.log("component not READY !!!");
|
||||
console.error("QR scanner component not ready:", component.errorString());
|
||||
appWindow.qrScannerEnabled = false;
|
||||
}
|
||||
} else console.log("qrScannerEnabled disabled");
|
||||
}
|
||||
|
||||
if(!walletsFound()) {
|
||||
wizard.wizardState = "wizardLanguage";
|
||||
@@ -1420,12 +1457,11 @@ ApplicationWindow {
|
||||
} else {
|
||||
wizard.wizardState = "wizardHome";
|
||||
rootItem.state = "normal"
|
||||
logger.resetLogFilePath(persistentSettings.portable);
|
||||
openWallet("wizard");
|
||||
}
|
||||
|
||||
const desktopEntryEnabled = (typeof builtWithDesktopEntry != "undefined") && builtWithDesktopEntry;
|
||||
if (persistentSettings.askDesktopShortcut && !persistentSettings.portable && desktopEntryEnabled) {
|
||||
if (persistentSettings.askDesktopShortcut && !portableSettings.portable && desktopEntryEnabled) {
|
||||
persistentSettings.askDesktopShortcut = false;
|
||||
|
||||
if (isTails) {
|
||||
@@ -1433,7 +1469,6 @@ ApplicationWindow {
|
||||
} else if (isLinux) {
|
||||
confirmationDialog.title = qsTr("Desktop entry") + translationManager.emptyString;
|
||||
confirmationDialog.text = qsTr("Would you like to register Monero GUI Desktop entry?") + translationManager.emptyString;
|
||||
confirmationDialog.icon = StandardIcon.Question;
|
||||
confirmationDialog.cancelText = qsTr("No") + translationManager.emptyString;
|
||||
confirmationDialog.okText = qsTr("Yes") + translationManager.emptyString;
|
||||
confirmationDialog.onAcceptedCallback = function() {
|
||||
@@ -1447,13 +1482,19 @@ ApplicationWindow {
|
||||
remoteNodesModel.initialize();
|
||||
}
|
||||
|
||||
MoneroSettings {
|
||||
id: persistentSettings
|
||||
fileName: {
|
||||
PortableSettings {
|
||||
id: portableSettings
|
||||
settings: persistentSettings
|
||||
unportableFileName: {
|
||||
if(isTails && tailsUsePersistence)
|
||||
return homePath + "/Persistent/Monero/monero-core.conf";
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
Settings {
|
||||
id: persistentSettings
|
||||
location: portableSettings.location
|
||||
|
||||
property bool askDesktopShortcut: isLinux
|
||||
property bool askStopLocalNode: true
|
||||
@@ -1519,18 +1560,21 @@ ApplicationWindow {
|
||||
property bool fiatPriceToggle: false
|
||||
property string fiatPriceProvider: "kraken"
|
||||
property string fiatPriceCurrency: "xmrusd"
|
||||
property bool fiatRatesConsentGiven: false
|
||||
|
||||
property string proxyAddress: "127.0.0.1:9050"
|
||||
property bool proxyEnabled: isTails
|
||||
function getProxyAddress() {
|
||||
if ((socksProxyFlagSet && socksProxyFlag == "") || !proxyEnabled) {
|
||||
if (socksProxyFlagSet) {
|
||||
return socksProxyFlag == "" ? "" : "socks5://" + socksProxyFlag;
|
||||
}
|
||||
if (!proxyEnabled) {
|
||||
return "";
|
||||
}
|
||||
var proxyAddressSetOrForced = socksProxyFlagSet ? socksProxyFlag : proxyAddress;
|
||||
if (proxyAddressSetOrForced == "") {
|
||||
return "127.0.0.1:0";
|
||||
if (proxyAddress == "") {
|
||||
return "socks5://127.0.0.1:0";
|
||||
}
|
||||
return proxyAddressSetOrForced;
|
||||
return "socks5://" + proxyAddress;
|
||||
}
|
||||
function getWalletProxyAddress() {
|
||||
if (!useRemoteNode) {
|
||||
@@ -1538,7 +1582,7 @@ ApplicationWindow {
|
||||
} else {
|
||||
const remoteAddress = remoteNodesModel.currentRemoteNode().address;
|
||||
// skip proxy when using localhost remote node
|
||||
if (remoteAddress.startsWith("127.0.0.1:") || remoteAddress.startsWith("localhost:")) {
|
||||
if (/^(127\.0\.0\.1|localhost):[0-9]+$/i.test(remoteAddress)) {
|
||||
return "";
|
||||
} else {
|
||||
return getProxyAddress();
|
||||
@@ -1548,6 +1592,13 @@ ApplicationWindow {
|
||||
|
||||
Component.onCompleted: {
|
||||
MoneroComponents.Style.blackTheme = persistentSettings.blackTheme
|
||||
|
||||
if (!appWindow.fiatPriceAPIs.hasOwnProperty(fiatPriceProvider)) {
|
||||
console.warn("unsupported fiat price provider \"" + fiatPriceProvider + "\", resetting");
|
||||
fiatPriceProvider = "kraken";
|
||||
fiatPriceEnabled = false;
|
||||
}
|
||||
Utils.finishSettingsLoad(persistentSettings)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1598,11 +1649,8 @@ ApplicationWindow {
|
||||
|
||||
function applyRemoteNode(index) {
|
||||
selected = index;
|
||||
const remoteNode = currentRemoteNode();
|
||||
persistentSettings.useRemoteNode = true;
|
||||
if (currentWallet) {
|
||||
currentWallet.setDaemonLogin(remoteNode.username, remoteNode.password);
|
||||
currentWallet.setTrustedDaemon(remoteNode.trusted);
|
||||
appWindow.connectRemoteNode();
|
||||
}
|
||||
}
|
||||
@@ -1653,6 +1701,8 @@ ApplicationWindow {
|
||||
// dynamically change onclose handler
|
||||
id: txConfirmationPopup
|
||||
z: parent.z + 1
|
||||
confirmButton.text: (viewOnly ? qsTr("Save as file") : qsTr("Confirm")) + translationManager.emptyString
|
||||
confirmButton.rightIcon: viewOnly ? "" : "qrc:///images/rightArrow.png"
|
||||
onAccepted: {
|
||||
var handleAccepted = function() {
|
||||
// Save transaction to file if view only wallet
|
||||
@@ -1670,7 +1720,7 @@ ApplicationWindow {
|
||||
passwordDialog.showError(qsTr("Wrong password") + translationManager.emptyString);
|
||||
}
|
||||
}
|
||||
passwordDialog.onRejectedCallback = null;
|
||||
passwordDialog.onRejectedCallback = rejectPendingTransaction;
|
||||
if(!persistentSettings.askPasswordBeforeSending) {
|
||||
handleAccepted()
|
||||
} else {
|
||||
@@ -1681,6 +1731,7 @@ ApplicationWindow {
|
||||
appWindow.viewOnly ? "" : FontAwesome.arrowCircleRight);
|
||||
}
|
||||
}
|
||||
onRejected: rejectPendingTransaction()
|
||||
}
|
||||
|
||||
// Transaction successfully sent popup
|
||||
@@ -1718,18 +1769,17 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
// Choose blockchain folder
|
||||
FileDialog {
|
||||
FolderDialog {
|
||||
id: blockchainFileDialog
|
||||
property string directory: ""
|
||||
signal changed();
|
||||
|
||||
title: "Please choose a folder"
|
||||
selectFolder: true
|
||||
folder: "file://" + persistentSettings.blockchainDataDir
|
||||
currentFolder: "file://" + persistentSettings.blockchainDataDir
|
||||
|
||||
onRejected: console.log("data dir selection canceled")
|
||||
onAccepted: {
|
||||
var dataDir = walletManager.urlToLocalPath(blockchainFileDialog.fileUrl)
|
||||
var dataDir = walletManager.urlToLocalPath(blockchainFileDialog.selectedFolder)
|
||||
var validator = daemonManager.validateDataDir(dataDir, estimatedBlockchainSize);
|
||||
if(validator.valid) {
|
||||
persistentSettings.blockchainDataDir = dataDir;
|
||||
@@ -1745,8 +1795,6 @@ ApplicationWindow {
|
||||
if(!validator.lmdbExists)
|
||||
confirmationDialog.text += qsTr("Note: lmdb folder not found. A new folder will be created.") + "\n\n"
|
||||
|
||||
confirmationDialog.icon = StandardIcon.Question
|
||||
|
||||
// Continue
|
||||
confirmationDialog.onAcceptedCallback = function() {
|
||||
persistentSettings.blockchainDataDir = dataDir
|
||||
@@ -1757,7 +1805,7 @@ ApplicationWindow {
|
||||
confirmationDialog.open()
|
||||
}
|
||||
|
||||
blockchainFileDialog.directory = blockchainFileDialog.fileUrl;
|
||||
blockchainFileDialog.directory = blockchainFileDialog.selectedFolder;
|
||||
delete validator;
|
||||
}
|
||||
}
|
||||
@@ -1782,11 +1830,9 @@ ApplicationWindow {
|
||||
appWindow.walletPassword = passwordDialog.password;
|
||||
informationPopup.title = qsTr("Information") + translationManager.emptyString;
|
||||
informationPopup.text = qsTr("Password changed successfully") + translationManager.emptyString;
|
||||
informationPopup.icon = StandardIcon.Information;
|
||||
} else {
|
||||
informationPopup.title = qsTr("Error") + translationManager.emptyString;
|
||||
informationPopup.text = qsTr("Error: ") + currentWallet.errorString;
|
||||
informationPopup.icon = StandardIcon.Critical;
|
||||
}
|
||||
informationPopup.onCloseCallback = null;
|
||||
informationPopup.open();
|
||||
@@ -1942,11 +1988,14 @@ ApplicationWindow {
|
||||
}
|
||||
}
|
||||
|
||||
FastBlur {
|
||||
MultiEffect {
|
||||
id: blur
|
||||
anchors.fill: blurredArea
|
||||
source: blurredArea
|
||||
radius: 64
|
||||
blurEnabled: true
|
||||
blurMax: 64
|
||||
blur: 1.0
|
||||
autoPaddingEnabled: false
|
||||
visible: passwordDialog.visible || inputDialog.visible || splash.visible || updateDialog.visible ||
|
||||
devicePassphraseDialog.visible || txConfirmationPopup.visible || successfulTxPopup.visible ||
|
||||
remoteNodeDialog.visible
|
||||
@@ -2188,7 +2237,6 @@ ApplicationWindow {
|
||||
// Show confirmation dialog
|
||||
confirmationDialog.title = qsTr("Local node is running") + translationManager.emptyString;
|
||||
confirmationDialog.text = qsTr("Do you want to stop local node or keep it running in the background?") + translationManager.emptyString;
|
||||
confirmationDialog.icon = StandardIcon.Question;
|
||||
confirmationDialog.cancelText = qsTr("Force stop") + translationManager.emptyString;
|
||||
confirmationDialog.okText = qsTr("Keep it running") + translationManager.emptyString;
|
||||
confirmationDialog.onAcceptedCallback = function() {
|
||||
@@ -2200,7 +2248,7 @@ ApplicationWindow {
|
||||
confirmationDialog.open();
|
||||
}
|
||||
|
||||
onClosing: {
|
||||
onClosing: function(close) {
|
||||
close.accepted = false;
|
||||
console.log("blocking close event");
|
||||
if(isAndroid) {
|
||||
@@ -2280,7 +2328,8 @@ ApplicationWindow {
|
||||
function checkUpdates() {
|
||||
const version = Version.GUI_VERSION.match(/\d+\.\d+\.\d+\.\d+/);
|
||||
if (version) {
|
||||
walletManager.checkUpdatesAsync("monero-gui", "gui", getBuildTag(), version[0]);
|
||||
walletManager.checkUpdatesAsync(
|
||||
"monero-gui", "gui", getBuildTag(), version[0], persistentSettings.getProxyAddress());
|
||||
} else {
|
||||
console.error("failed to parse version number", Version.GUI_VERSION);
|
||||
}
|
||||
@@ -2338,9 +2387,11 @@ ApplicationWindow {
|
||||
if (inputDialogVisible) inputDialog.close()
|
||||
remoteNodeDialog.close();
|
||||
informationPopup.close()
|
||||
txConfirmationPopup.close()
|
||||
txConfirmationPopup.clearFields()
|
||||
txConfirmationPopup.rejected()
|
||||
if (txConfirmationPopup.visible) {
|
||||
txConfirmationPopup.close()
|
||||
txConfirmationPopup.clearFields()
|
||||
txConfirmationPopup.rejected()
|
||||
}
|
||||
successfulTxPopup.close();
|
||||
|
||||
if (currentWallet && currentWallet.getBackgroundSyncType() != Wallet.BackgroundSync_Off) {
|
||||
@@ -2398,7 +2449,7 @@ ApplicationWindow {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: titleBar.height
|
||||
color: MoneroComponents.Style.blackTheme ? "black" : "white"
|
||||
opacity: isOpenGL ? 0.3 : inputDialog.visible || splash.visible ? 0.7 : 1.0
|
||||
opacity: GraphicsInfo.api !== GraphicsInfo.Software ? 0.3 : inputDialog.visible || splash.visible ? 0.7 : 1.0
|
||||
|
||||
MoneroEffects.ColorTransition {
|
||||
targetObj: parent
|
||||
|
||||
+1
-1
Submodule monero updated: 4f92268d7c...85f036ba70.
+8
-8
@@ -26,12 +26,12 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Dialogs 1.2
|
||||
import FontAwesome 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Dialogs
|
||||
|
||||
import FontAwesome
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
import "../components/effects/" as MoneroEffects
|
||||
@@ -339,7 +339,7 @@ Rectangle {
|
||||
fontAwesomeFallbackIcon: FontAwesome.edit
|
||||
fontAwesomeFallbackSize: 22
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
opacity: isOpenGL ? 0.5 : 1
|
||||
opacity: GraphicsInfo.api !== GraphicsInfo.Software ? 0.5 : 1
|
||||
fontAwesomeFallbackOpacity: 0.5
|
||||
Layout.preferredWidth: 23
|
||||
Layout.preferredHeight: 21
|
||||
@@ -354,7 +354,7 @@ Rectangle {
|
||||
fontAwesomeFallbackIcon: FontAwesome.clipboard
|
||||
fontAwesomeFallbackSize: 22
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
opacity: isOpenGL ? 0.5 : 1
|
||||
opacity: GraphicsInfo.api !== GraphicsInfo.Software ? 0.5 : 1
|
||||
fontAwesomeFallbackOpacity: 0.5
|
||||
Layout.preferredWidth: 16
|
||||
Layout.preferredHeight: 21
|
||||
|
||||
+9
-10
@@ -26,10 +26,12 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Dialogs
|
||||
|
||||
import FontAwesome
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
import "../components/effects/" as MoneroEffects
|
||||
@@ -39,7 +41,6 @@ import moneroComponents.AddressBook 1.0
|
||||
import moneroComponents.AddressBookModel 1.0
|
||||
import moneroComponents.Clipboard 1.0
|
||||
import moneroComponents.NetworkType 1.0
|
||||
import FontAwesome 1.0
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
@@ -223,7 +224,7 @@ Rectangle {
|
||||
id: sendToButton
|
||||
image: "qrc:///images/arrow-right-in-circle-outline-medium-white.svg"
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
opacity: isOpenGL ? 0.5 : 1
|
||||
opacity: GraphicsInfo.api !== GraphicsInfo.Software ? 0.5 : 1
|
||||
fontAwesomeFallbackIcon: FontAwesome.arrowRight
|
||||
fontAwesomeFallbackSize: 22
|
||||
fontAwesomeFallbackOpacity: 0.5
|
||||
@@ -252,7 +253,7 @@ Rectangle {
|
||||
id: editEntryButton
|
||||
image: "qrc:///images/edit.svg"
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
opacity: isOpenGL ? 0.5 : 1
|
||||
opacity: GraphicsInfo.api !== GraphicsInfo.Software ? 0.5 : 1
|
||||
fontAwesomeFallbackIcon: FontAwesome.edit
|
||||
fontAwesomeFallbackSize: 22
|
||||
fontAwesomeFallbackOpacity: 0.5
|
||||
@@ -270,7 +271,7 @@ Rectangle {
|
||||
id: copyButton
|
||||
image: "qrc:///images/copy.svg"
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
opacity: isOpenGL ? 0.5 : 1
|
||||
opacity: GraphicsInfo.api !== GraphicsInfo.Software ? 0.5 : 1
|
||||
fontAwesomeFallbackIcon: FontAwesome.clipboard
|
||||
fontAwesomeFallbackSize: 22
|
||||
fontAwesomeFallbackOpacity: 0.5
|
||||
@@ -539,7 +540,6 @@ Rectangle {
|
||||
function oa_message(text) {
|
||||
oaPopup.title = qsTr("OpenAlias error") + translationManager.emptyString
|
||||
oaPopup.text = text
|
||||
oaPopup.icon = StandardIcon.Information
|
||||
oaPopup.onCloseCallback = null
|
||||
oaPopup.open()
|
||||
}
|
||||
@@ -550,7 +550,6 @@ Rectangle {
|
||||
qsTr("OpenAlias: ") + openAlias + "\n\n" +
|
||||
qsTr("Resolved address: ") + resolvedAddress + "\n\n" +
|
||||
qsTr("Only use this address if you trust this OpenAlias result.") + translationManager.emptyString
|
||||
confirmationDialog.icon = StandardIcon.Question
|
||||
confirmationDialog.cancelText = qsTr("Cancel") + translationManager.emptyString
|
||||
confirmationDialog.okText = qsTr("Use address") + translationManager.emptyString
|
||||
confirmationDialog.onAcceptedCallback = onAccepted
|
||||
|
||||
+10
-25
@@ -26,10 +26,9 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import "../components" as MoneroComponents
|
||||
import "."
|
||||
|
||||
@@ -94,7 +93,13 @@ ColumnLayout {
|
||||
}
|
||||
previousView = currentView
|
||||
if (currentView) {
|
||||
stackView.replace(currentView)
|
||||
if (stackView.currentItem !== currentView) {
|
||||
if (stackView.depth > 0) {
|
||||
stackView.replace(currentView)
|
||||
} else {
|
||||
stackView.push(currentView)
|
||||
}
|
||||
}
|
||||
if (typeof currentView.onPageCompleted === "function") {
|
||||
currentView.onPageCompleted();
|
||||
}
|
||||
@@ -127,26 +132,6 @@ ColumnLayout {
|
||||
anchors.fill: parent
|
||||
clip: false // otherwise animation will affect left panel
|
||||
|
||||
delegate: StackViewDelegate {
|
||||
pushTransition: StackViewTransition {
|
||||
PropertyAnimation {
|
||||
target: enterItem
|
||||
property: "x"
|
||||
from: (navbarId.currentIndex < navbarId.previousIndex ? 1 : -1) * - target.width
|
||||
to: 0
|
||||
duration: 300
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
PropertyAnimation {
|
||||
target: exitItem
|
||||
property: "x"
|
||||
from: 0
|
||||
to: (navbarId.currentIndex < navbarId.previousIndex ? 1 : -1) * target.width
|
||||
duration: 300
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+97
-34
@@ -26,17 +26,17 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Dialogs
|
||||
import FontAwesome
|
||||
|
||||
import moneroComponents.Wallet 1.0
|
||||
import moneroComponents.WalletManager 1.0
|
||||
import moneroComponents.TransactionHistory 1.0
|
||||
import moneroComponents.TransactionInfo 1.0
|
||||
import moneroComponents.TransactionHistoryModel 1.0
|
||||
import moneroComponents.Clipboard 1.0
|
||||
import FontAwesome 1.0
|
||||
|
||||
import "../components/effects/" as MoneroEffects
|
||||
import "../components" as MoneroComponents
|
||||
@@ -800,10 +800,14 @@ Rectangle {
|
||||
id: addressField
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 15
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
elide: Text.ElideRight
|
||||
tooltip: recipientTooltip
|
||||
text: {
|
||||
if (isout) {
|
||||
if (address) {
|
||||
return (addressBookName ? FontAwesome.addressBook + " " + addressBookName : TxUtils.addressTruncate(address, 8));
|
||||
return recipientText;
|
||||
}
|
||||
if (amount != 0) {
|
||||
return qsTr("Unknown recipient") + translationManager.emptyString;
|
||||
@@ -832,10 +836,22 @@ Rectangle {
|
||||
|
||||
MouseArea {
|
||||
state: isout ? "copyable_address" : "copyable_receiving_address"
|
||||
anchors.fill: parent
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
width: Math.min(parent.width, parent.paintedWidth)
|
||||
height: parent.height
|
||||
hoverEnabled: true
|
||||
onEntered: parent.color = MoneroComponents.Style.orange
|
||||
onExited: parent.color = MoneroComponents.Style.defaultFontColor
|
||||
onEntered: {
|
||||
parent.color = MoneroComponents.Style.orange;
|
||||
if (recipientTooltip) {
|
||||
parent.tooltipPopup.x = 0;
|
||||
parent.tooltipPopup.open();
|
||||
}
|
||||
}
|
||||
onExited: {
|
||||
parent.color = MoneroComponents.Style.defaultFontColor;
|
||||
parent.tooltipPopup.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1270,12 +1286,12 @@ Rectangle {
|
||||
for(var i = 0; i < res.length; i+=1){
|
||||
if(res[i].containsMouse === true){
|
||||
if(res[i].state === 'copyable' && res[i].parent.hasOwnProperty('text')) toClipboard(res[i].parent.text);
|
||||
if(res[i].state === 'copyable_address') (address ? root.toClipboard(address) : root.toClipboard(addressField.text));
|
||||
if(res[i].state === 'copyable_address') (recipientAddresses ? root.toClipboard(recipientAddresses) : root.toClipboard(addressField.text));
|
||||
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 === '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 === 'proof') root.showTxProof(hash, paymentId, destinations, subaddrAccount, subaddrIndex);
|
||||
if(res[i].state === 'proof') root.showTxProof(hash, paymentId, address);
|
||||
doCollapse = false;
|
||||
break;
|
||||
}
|
||||
@@ -1443,6 +1459,7 @@ Rectangle {
|
||||
const timezoneOffset = new Date().getTimezoneOffset() * 60;
|
||||
var fromDate = Math.floor(fromDatePicker.currentDate.getTime() / 86400000) * 86400 + timezoneOffset;
|
||||
var toDate = (Math.floor(toDatePicker.currentDate.getTime() / 86400000) + 1) * 86400 + timezoneOffset;
|
||||
var recipientQuery = (root.sortSearchString || "").toLowerCase();
|
||||
|
||||
var txs = [];
|
||||
for (var i = 0; i < root.txData.length; i++){
|
||||
@@ -1462,14 +1479,16 @@ Rectangle {
|
||||
if(root.sortSearchString.length >= 1){
|
||||
if(item.amount && item.amount.toString().startsWith(root.sortSearchString)){
|
||||
txs.push(item);
|
||||
} else if(item.address !== "" && item.address.toLowerCase().startsWith(root.sortSearchString.toLowerCase())){
|
||||
} else if(item.recipientAddresses.split("\n").some(function(address) {
|
||||
return address.toLowerCase().startsWith(recipientQuery);
|
||||
})){
|
||||
txs.push(item);
|
||||
} else if(item.recipientSearchNames.toLowerCase().indexOf(recipientQuery) !== -1){
|
||||
txs.push(item);
|
||||
} else if(item.receivingAddress !== "" && item.receivingAddress.toLowerCase().startsWith(root.sortSearchString.toLowerCase())){
|
||||
txs.push(item);
|
||||
} else if(item.receivingAddressLabel !== "" && item.receivingAddressLabel.toLowerCase().startsWith(root.sortSearchString.toLowerCase())){
|
||||
txs.push(item);
|
||||
} else if(item.addressBookName !== "" && item.addressBookName.toLowerCase().startsWith(root.sortSearchString.toLowerCase())){
|
||||
txs.push(item);
|
||||
} else if(typeof item.blockheight !== "undefined" && item.blockheight.toString().startsWith(root.sortSearchString)) {
|
||||
txs.push(item);
|
||||
} else if(item.tx_note.toLowerCase().indexOf(root.sortSearchString.toLowerCase()) !== -1) {
|
||||
@@ -1494,6 +1513,14 @@ Rectangle {
|
||||
// applying sorts
|
||||
root.txOffset = 0;
|
||||
root.txData.sort(function(a, b) {
|
||||
if (root.sortBy === "blockheight") {
|
||||
var aPending = a.blockheight === "";
|
||||
var bPending = b.blockheight === "";
|
||||
if (aPending !== bPending)
|
||||
return aPending ? 1 : -1;
|
||||
if (aPending)
|
||||
return a.timestamp - b.timestamp;
|
||||
}
|
||||
return a[root.sortBy] - b[root.sortBy];
|
||||
});
|
||||
|
||||
@@ -1558,9 +1585,11 @@ Rectangle {
|
||||
var hash = _model.data(idx, TransactionHistoryModel.TransactionHashRole);
|
||||
var paymentId = _model.data(idx, TransactionHistoryModel.TransactionPaymentIdRole);
|
||||
var destinations = _model.data(idx, TransactionHistoryModel.TransactionDestinationsRole);
|
||||
var destinationAddresses = _model.data(idx, TransactionHistoryModel.TransactionDestinationAddressesRole);
|
||||
var time = _model.data(idx, TransactionHistoryModel.TransactionTimeRole);
|
||||
var date = _model.data(idx, TransactionHistoryModel.TransactionDateRole);
|
||||
var blockheight = _model.data(idx, TransactionHistoryModel.TransactionBlockHeightRole);
|
||||
var blockheightValue = _model.data(idx, TransactionHistoryModel.TransactionBlockHeightRole);
|
||||
var blockheight = blockheightValue == null ? "" : blockheightValue.toString();
|
||||
var confirmations = _model.data(idx, TransactionHistoryModel.TransactionConfirmationsRole);
|
||||
var confirmationsRequired = _model.data(idx, TransactionHistoryModel.TransactionConfirmationsRequiredRole);
|
||||
var fee = _model.data(idx, TransactionHistoryModel.TransactionFeeRole);
|
||||
@@ -1578,13 +1607,40 @@ Rectangle {
|
||||
|
||||
var tx_note = currentWallet.getUserNote(hash);
|
||||
var address = "";
|
||||
var addressBookName = "";
|
||||
var recipientAddresses = "";
|
||||
var recipientSearchNames = "";
|
||||
var recipientText = "";
|
||||
var recipientTooltip = "";
|
||||
var receivingAddress = "";
|
||||
var receivingAddressLabel = "";
|
||||
|
||||
if (isout) {
|
||||
address = TxUtils.destinationsToAddress(destinations);
|
||||
addressBookName = currentWallet ? currentWallet.addressBook.getDescription(address) : null;
|
||||
var uniqueAddresses = [];
|
||||
var recipientNames = [];
|
||||
var recipientTooltipEntries = [];
|
||||
|
||||
for (var destinationIndex = 0; destinationIndex < destinationAddresses.length; ++destinationIndex) {
|
||||
var destinationAddress = destinationAddresses[destinationIndex];
|
||||
if (uniqueAddresses.indexOf(destinationAddress) !== -1)
|
||||
continue;
|
||||
|
||||
uniqueAddresses.push(destinationAddress);
|
||||
var destinationName = currentWallet ? currentWallet.addressBook.getDescription(destinationAddress) : "";
|
||||
destinationName = destinationName || "";
|
||||
recipientNames.push(destinationName);
|
||||
var shortDestinationAddress = TxUtils.addressTruncate(destinationAddress, 8);
|
||||
recipientTooltipEntries.push(destinationName ? Utils.htmlEscape(destinationName) + " — " + shortDestinationAddress : shortDestinationAddress);
|
||||
}
|
||||
|
||||
address = uniqueAddresses.length > 0 ? uniqueAddresses[0] : "";
|
||||
recipientAddresses = uniqueAddresses.join("\n");
|
||||
recipientSearchNames = recipientNames.join("\n");
|
||||
recipientTooltip = uniqueAddresses.length > 1 ? recipientTooltipEntries.join("<br>") : "";
|
||||
if (uniqueAddresses.length === 1) {
|
||||
recipientText = recipientNames[0] ? FontAwesome.addressBook + " " + recipientNames[0] : TxUtils.addressTruncate(address, 8);
|
||||
} else if (uniqueAddresses.length > 1) {
|
||||
recipientText = qsTr("%1 recipients").arg(uniqueAddresses.length) + translationManager.emptyString;
|
||||
}
|
||||
} else {
|
||||
receivingAddress = currentWallet ? currentWallet.address(subaddrAccount, subaddrIndex) : null;
|
||||
receivingAddressLabel = currentWallet ? appWindow.currentWallet.getSubaddressLabel(subaddrAccount, subaddrIndex) : null;
|
||||
@@ -1605,13 +1661,15 @@ Rectangle {
|
||||
"hash": hash,
|
||||
"paymentId": paymentId,
|
||||
"address": address,
|
||||
"addressBookName": addressBookName,
|
||||
"recipientAddresses": recipientAddresses,
|
||||
"recipientSearchNames": recipientSearchNames,
|
||||
"recipientText": recipientText,
|
||||
"recipientTooltip": recipientTooltip,
|
||||
"destinations": destinations,
|
||||
"tx_note": tx_note,
|
||||
"dateHuman": dateHuman,
|
||||
"dateTime": date + " " + time,
|
||||
"blockheight": blockheight,
|
||||
"address": address,
|
||||
"timestamp": timestamp,
|
||||
"fee": fee,
|
||||
"confirmations": confirmations,
|
||||
@@ -1707,9 +1765,8 @@ Rectangle {
|
||||
});
|
||||
}
|
||||
|
||||
function showTxProof(hash, paymentId, destinations, subaddrAccount, subaddrIndex){
|
||||
var address = TxUtils.destinationsToAddress(destinations);
|
||||
if(address === undefined){
|
||||
function showTxProof(hash, paymentId, address){
|
||||
if(!address){
|
||||
console.log('getProof: Error fetching address')
|
||||
return;
|
||||
}
|
||||
@@ -1753,15 +1810,14 @@ Rectangle {
|
||||
+ translationManager.emptyString;
|
||||
}
|
||||
|
||||
FileDialog {
|
||||
FolderDialog {
|
||||
id: writeCSVFileDialog
|
||||
title: qsTr("Please choose a folder") + translationManager.emptyString
|
||||
selectFolder: true
|
||||
onRejected: {
|
||||
console.log("csv write canceled")
|
||||
}
|
||||
onAccepted: {
|
||||
var dataDir = walletManager.urlToLocalPath(writeCSVFileDialog.fileUrl);
|
||||
var dataDir = walletManager.urlToLocalPath(writeCSVFileDialog.selectedFolder);
|
||||
var written = currentWallet.history.writeCSV(currentWallet.currentSubaddressAccount, dataDir);
|
||||
|
||||
if(written !== ""){
|
||||
@@ -1769,7 +1825,6 @@ Rectangle {
|
||||
var text = qsTr("CSV file written to: %1").arg(written) + "\n\n"
|
||||
text += qsTr("Tip: Use your favorite spreadsheet software to sort on blockheight.") + "\n\n" + translationManager.emptyString;
|
||||
confirmationDialog.text = text;
|
||||
confirmationDialog.icon = StandardIcon.Information;
|
||||
confirmationDialog.cancelText = qsTr("Open folder") + translationManager.emptyString;
|
||||
confirmationDialog.onAcceptedCallback = null;
|
||||
confirmationDialog.onRejectedCallback = function() {
|
||||
@@ -1779,7 +1834,6 @@ Rectangle {
|
||||
} else {
|
||||
informationPopup.title = qsTr("Error") + translationManager.emptyString;
|
||||
informationPopup.text = qsTr("Error exporting transaction data.") + "\n\n" + translationManager.emptyString;
|
||||
informationPopup.icon = StandardIcon.Critical;
|
||||
informationPopup.onCloseCallback = null;
|
||||
informationPopup.open();
|
||||
|
||||
@@ -1792,29 +1846,38 @@ Rectangle {
|
||||
}
|
||||
catch(err) {}
|
||||
finally {
|
||||
writeCSVFileDialog.folder = _folder;
|
||||
writeCSVFileDialog.currentFolder = _folder;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onPageCompleted() {
|
||||
// setup date filter scope according to real transactions
|
||||
if(appWindow.currentWallet != null){
|
||||
root.model = appWindow.currentWallet.historyModel;
|
||||
root.model.sortRole = TransactionHistoryModel.TransactionBlockHeightRole
|
||||
root.model.sort(0, Qt.DescendingOrder);
|
||||
}
|
||||
|
||||
root.reset();
|
||||
root.refresh();
|
||||
|
||||
// Block height order does not imply date order, especially for failed transactions.
|
||||
if(appWindow.currentWallet != null){
|
||||
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);
|
||||
var firstDate = root.model.data(root.model.index(0, 0), TransactionHistoryModel.TransactionDateRole);
|
||||
for (var i = 1; i < count; ++i) {
|
||||
var date = root.model.data(root.model.index(i, 0), TransactionHistoryModel.TransactionDateRole);
|
||||
if (date < firstDate)
|
||||
firstDate = date;
|
||||
}
|
||||
fromDatePicker.currentDate = firstDate;
|
||||
} else {
|
||||
//date of monero birth (2014-04-18)
|
||||
fromDatePicker.currentDate = model.transactionHistory.firstDateTime
|
||||
}
|
||||
}
|
||||
|
||||
root.reset();
|
||||
root.refresh();
|
||||
root.initialized = true;
|
||||
root.updateFilter();
|
||||
}
|
||||
|
||||
+4
-9
@@ -26,15 +26,10 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import moneroComponents.Clipboard 1.0
|
||||
import "../version.js" as Version
|
||||
import "../components" as MoneroComponents
|
||||
import "." 1.0
|
||||
|
||||
|
||||
Rectangle {
|
||||
@@ -272,7 +267,7 @@ Rectangle {
|
||||
console.log("keys page loaded");
|
||||
|
||||
primaryAddress.text = currentWallet.address(0, 0)
|
||||
walletCreationHeight.text = currentWallet.walletCreationHeight
|
||||
walletCreationHeight.text = currentWallet.walletCreationHeight.toFixed(0)
|
||||
secretViewKey.text = currentWallet.secretViewKey
|
||||
publicViewKey.text = currentWallet.publicViewKey
|
||||
secretSpendKey.text = (!currentWallet.viewOnly) ? currentWallet.secretSpendKey : ""
|
||||
@@ -281,7 +276,7 @@ Rectangle {
|
||||
seedText.text = currentWallet.seed === "" ? qsTr("Mnemonic seed protected by hardware device.") + translationManager.emptyString : currentWallet.seed
|
||||
|
||||
if(typeof currentWallet != "undefined") {
|
||||
viewOnlyQRCode.source = "image://qrcode/monero_wallet:" + currentWallet.address(0, 0) + "?view_key="+currentWallet.secretViewKey+"&height="+currentWallet.walletCreationHeight
|
||||
viewOnlyQRCode.source = "image://qrcode/monero-wallet:" + currentWallet.address(0, 0) + "?view_key="+currentWallet.secretViewKey+"&height="+currentWallet.walletCreationHeight
|
||||
fullWalletQRCode.source = viewOnlyQRCode.source +"&spend_key="+currentWallet.secretSpendKey
|
||||
|
||||
if(currentWallet.viewOnly) {
|
||||
|
||||
+4
-8
@@ -26,10 +26,10 @@
|
||||
// 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.
|
||||
|
||||
import QtQml.Models 2.2
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQml.Models
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Dialogs
|
||||
import "../components" as MoneroComponents
|
||||
import moneroComponents.Wallet 1.0
|
||||
import moneroComponents.P2PoolManager 1.0
|
||||
@@ -305,7 +305,6 @@ Rectangle {
|
||||
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() {
|
||||
@@ -586,7 +585,6 @@ Rectangle {
|
||||
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()
|
||||
}
|
||||
|
||||
@@ -681,7 +679,6 @@ allArgs = allArgs.filter( ( el ) => !defaultArgs.includes( el.split(" ")[0] ) )
|
||||
default:
|
||||
errorPopup.text = qsTr("Unknown error.") + translationManager.emptyString;
|
||||
}
|
||||
errorPopup.icon = StandardIcon.Critical
|
||||
errorPopup.open()
|
||||
update()
|
||||
}
|
||||
@@ -690,7 +687,6 @@ allArgs = allArgs.filter( ( el ) => !defaultArgs.includes( el.split(" ")[0] ) )
|
||||
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()
|
||||
}
|
||||
|
||||
+42
-42
@@ -26,12 +26,12 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Dialogs 1.2
|
||||
import FontAwesome 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Dialogs
|
||||
|
||||
import FontAwesome
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
import "../components/effects/" as MoneroEffects
|
||||
@@ -61,10 +61,28 @@ Rectangle {
|
||||
inputDialog.open(appWindow.currentWallet.getSubaddressLabel(appWindow.currentWallet.currentSubaddressAccount, _index))
|
||||
}
|
||||
|
||||
function updateSelectedAddressDisplay() {
|
||||
appWindow.current_subaddress_table_index = subaddressListView.currentIndex;
|
||||
appWindow.current_address = appWindow.currentWallet.address(
|
||||
appWindow.currentWallet.currentSubaddressAccount,
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function generateQRCodeString() {
|
||||
if (pageReceive.state == "PaymentRequest") {
|
||||
return walletManager.make_uri(appWindow.current_address,
|
||||
walletManager.amountFromString(amountToReceiveXMR.text),
|
||||
amountToReceiveXMR.text,
|
||||
txDescriptionInput.text, receiverNameInput.text);
|
||||
} else {
|
||||
return walletManager.make_uri(appWindow.current_address);
|
||||
@@ -135,7 +153,7 @@ Rectangle {
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
onEntered: qrCodeTooltip.tooltipPopup.open()
|
||||
onExited: qrCodeTooltip.tooltipPopup.close()
|
||||
onClicked: {
|
||||
onClicked: (mouse) => {
|
||||
if (mouse.button == Qt.LeftButton){
|
||||
walletManager.saveQrCodeToClipboard(generateQRCodeString());
|
||||
appWindow.showStatusMessage(qsTr("QR code copied to clipboard") + translationManager.emptyString, 3);
|
||||
@@ -261,8 +279,8 @@ Rectangle {
|
||||
amountToReceiveXMR.text = fiatApiConvertToXMR(amountToReceiveFiat.text);
|
||||
}
|
||||
}
|
||||
validator: RegExpValidator {
|
||||
regExp: /^\s*(\d{1,8})?([\.,]\d{1,2})?\s*$/
|
||||
validator: RegularExpressionValidator {
|
||||
regularExpression: /^\s*(\d{1,8})?([\.,]\d{1,2})?\s*$/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,8 +339,8 @@ Rectangle {
|
||||
amountToReceiveFiat.text = fiatApiConvertToFiat(amountToReceiveXMR.text);
|
||||
}
|
||||
}
|
||||
validator: RegExpValidator {
|
||||
regExp: /^\s*(\d{1,8})?([\.,]\d{1,12})?\s*$/
|
||||
validator: RegularExpressionValidator {
|
||||
regularExpression: /^\s*(\d{1,8})?([\.,]\d{1,12})?\s*$/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -676,7 +694,7 @@ Rectangle {
|
||||
fontAwesomeFallbackIcon: FontAwesome.edit
|
||||
fontAwesomeFallbackSize: 22
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
opacity: isOpenGL ? 0.5 : 1
|
||||
opacity: GraphicsInfo.api !== GraphicsInfo.Software ? 0.5 : 1
|
||||
fontAwesomeFallbackOpacity: 0.5
|
||||
Layout.preferredWidth: 23
|
||||
Layout.preferredHeight: 21
|
||||
@@ -694,7 +712,7 @@ Rectangle {
|
||||
fontAwesomeFallbackIcon: FontAwesome.clipboard
|
||||
fontAwesomeFallbackSize: 22
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
opacity: isOpenGL ? 0.5 : 1
|
||||
opacity: GraphicsInfo.api !== GraphicsInfo.Software ? 0.5 : 1
|
||||
fontAwesomeFallbackOpacity: 0.5
|
||||
Layout.preferredWidth: 16
|
||||
Layout.preferredHeight: 21
|
||||
@@ -708,24 +726,7 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
onCurrentItemChanged: {
|
||||
// reset global vars
|
||||
appWindow.current_subaddress_table_index = subaddressListView.currentIndex;
|
||||
appWindow.current_address = appWindow.currentWallet.address(
|
||||
appWindow.currentWallet.currentSubaddressAccount,
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
onCurrentItemChanged: updateSelectedAddressDisplay()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -744,24 +745,22 @@ Rectangle {
|
||||
|
||||
MessageDialog {
|
||||
id: receivePageDialog
|
||||
standardButtons: StandardButton.Ok
|
||||
buttons: MessageDialog.Ok
|
||||
}
|
||||
|
||||
FileDialog {
|
||||
id: qrFileDialog
|
||||
title: qsTr("Please choose a name") + translationManager.emptyString
|
||||
folder: shortcuts.pictures
|
||||
selectExisting: false
|
||||
fileMode: FileDialog.SaveFile
|
||||
nameFilters: ["Image (*.png)"]
|
||||
onAccepted: {
|
||||
if(!walletManager.saveQrCode(generateQRCodeString(), walletManager.urlToLocalPath(fileUrl))) {
|
||||
console.log("Failed to save QrCode to file " + walletManager.urlToLocalPath(fileUrl) )
|
||||
if(!walletManager.saveQrCode(generateQRCodeString(), walletManager.urlToLocalPath(selectedFile))) {
|
||||
console.log("Failed to save QrCode to file " + walletManager.urlToLocalPath(selectedFile) )
|
||||
receivePageDialog.title = qsTr("Save QrCode") + translationManager.emptyString;
|
||||
receivePageDialog.text = qsTr("Failed to save QrCode to ") + walletManager.urlToLocalPath(fileUrl) + translationManager.emptyString;
|
||||
receivePageDialog.icon = StandardIcon.Error
|
||||
receivePageDialog.text = qsTr("Failed to save QrCode to ") + walletManager.urlToLocalPath(selectedFile) + translationManager.emptyString;
|
||||
receivePageDialog.open()
|
||||
} else {
|
||||
appWindow.showStatusMessage(qsTr("QR code saved to ") + walletManager.urlToLocalPath(fileUrl) + translationManager.emptyString, 3);
|
||||
appWindow.showStatusMessage(qsTr("QR code saved to ") + walletManager.urlToLocalPath(selectedFile) + translationManager.emptyString, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -773,11 +772,12 @@ Rectangle {
|
||||
subaddressListView.model = appWindow.currentWallet.subaddressModel;
|
||||
|
||||
if (appWindow.currentWallet) {
|
||||
appWindow.current_address = appWindow.currentWallet.address(appWindow.currentWallet.currentSubaddressAccount, 0)
|
||||
appWindow.currentWallet.subaddress.refresh(appWindow.currentWallet.currentSubaddressAccount)
|
||||
if (subaddressListView.currentIndex == -1) {
|
||||
var numSubaddresses = appWindow.currentWallet.numSubaddresses(appWindow.currentWallet.currentSubaddressAccount);
|
||||
if (subaddressListView.currentIndex == -1 || subaddressListView.currentIndex >= numSubaddresses) {
|
||||
subaddressListView.currentIndex = 0;
|
||||
}
|
||||
updateSelectedAddressDisplay();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,11 +26,10 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Dialogs
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
import moneroComponents.Clipboard 1.0
|
||||
@@ -81,7 +80,7 @@ Rectangle {
|
||||
|
||||
MessageDialog {
|
||||
id: sharedRingDBDialog
|
||||
standardButtons: StandardButton.Ok
|
||||
buttons: MessageDialog.Ok
|
||||
}
|
||||
|
||||
MoneroComponents.Label {
|
||||
|
||||
+25
-18
@@ -26,11 +26,9 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Dialogs
|
||||
|
||||
import moneroComponents.Clipboard 1.0
|
||||
import moneroComponents.WalletManager 1.0
|
||||
@@ -49,7 +47,7 @@ Rectangle {
|
||||
// dynamically change onclose handler
|
||||
property var onCloseCallback
|
||||
id: signatureVerificationMessage
|
||||
standardButtons: StandardButton.Ok
|
||||
buttons: MessageDialog.Ok
|
||||
onAccepted: {
|
||||
if (onCloseCallback) {
|
||||
onCloseCallback()
|
||||
@@ -58,15 +56,24 @@ Rectangle {
|
||||
}
|
||||
|
||||
function displayVerificationResult(result) {
|
||||
if (result) {
|
||||
if (result.valid) {
|
||||
signatureVerificationMessage.title = qsTr("Good signature") + translationManager.emptyString
|
||||
signatureVerificationMessage.text = qsTr("This is a good signature") + translationManager.emptyString
|
||||
signatureVerificationMessage.icon = StandardIcon.Information
|
||||
if (result.type === "spend") {
|
||||
signatureVerificationMessage.text = qsTr("This is a good signature made with the spend key.") + translationManager.emptyString
|
||||
}
|
||||
else if (result.type === "view") {
|
||||
signatureVerificationMessage.text = qsTr("This is a good signature made with the view key. It does not prove that the signer can spend funds.") + translationManager.emptyString
|
||||
}
|
||||
else {
|
||||
signatureVerificationMessage.text = qsTr("This is a good signature made with an unknown key type.") + translationManager.emptyString
|
||||
}
|
||||
if (result.old) {
|
||||
signatureVerificationMessage.text += "\n\n" + qsTr("This signature uses the old signing algorithm.") + translationManager.emptyString
|
||||
}
|
||||
}
|
||||
else {
|
||||
signatureVerificationMessage.title = qsTr("Bad signature") + translationManager.emptyString
|
||||
signatureVerificationMessage.text = qsTr("This signature did not verify") + translationManager.emptyString
|
||||
signatureVerificationMessage.icon = StandardIcon.Critical
|
||||
}
|
||||
signatureVerificationMessage.open()
|
||||
}
|
||||
@@ -379,8 +386,8 @@ Rectangle {
|
||||
text: qsTr("Verify File") + translationManager.emptyString
|
||||
enabled: verifyFileLine.text !== '' && verifyAddressLine.text !== '' && verifySignatureLine.text !== ''
|
||||
onClicked: {
|
||||
var verified = appWindow.currentWallet.verifySignedMessage(verifyFileLine.text, verifyAddressLine.text, verifySignatureLine.text, true)
|
||||
displayVerificationResult(verified)
|
||||
var result = appWindow.currentWallet.verifySignedMessageWithDetails(verifyFileLine.text, verifyAddressLine.text, verifySignatureLine.text, true)
|
||||
displayVerificationResult(result)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -391,8 +398,8 @@ Rectangle {
|
||||
text: qsTr("Verify Message") + translationManager.emptyString
|
||||
enabled: verifyMessageLine.text !== '' && verifyAddressLine.text !== '' && verifySignatureLine.text !== ''
|
||||
onClicked: {
|
||||
var verified = appWindow.currentWallet.verifySignedMessage(verifyMessageLine.text, verifyAddressLine.text, verifySignatureLine.text, false)
|
||||
displayVerificationResult(verified)
|
||||
var result = appWindow.currentWallet.verifySignedMessageWithDetails(verifyMessageLine.text, verifyAddressLine.text, verifySignatureLine.text, false)
|
||||
displayVerificationResult(result)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -401,22 +408,22 @@ Rectangle {
|
||||
FileDialog {
|
||||
id: signFileDialog
|
||||
title: qsTr("Please choose a file to sign") + translationManager.emptyString;
|
||||
folder: "file://"
|
||||
currentFolder: "file://"
|
||||
nameFilters: [ "*"]
|
||||
|
||||
onAccepted: {
|
||||
signFileLine.text = walletManager.urlToLocalPath(signFileDialog.fileUrl)
|
||||
signFileLine.text = walletManager.urlToLocalPath(signFileDialog.selectedFile)
|
||||
}
|
||||
}
|
||||
|
||||
FileDialog {
|
||||
id: verifyFileDialog
|
||||
title: qsTr("Please choose a file to verify") + translationManager.emptyString;
|
||||
folder: "file://"
|
||||
currentFolder: "file://"
|
||||
nameFilters: [ "*"]
|
||||
|
||||
onAccepted: {
|
||||
verifyFileLine.text = walletManager.urlToLocalPath(verifyFileDialog.fileUrl)
|
||||
verifyFileLine.text = walletManager.urlToLocalPath(verifyFileDialog.selectedFile)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+26
-37
@@ -26,16 +26,17 @@
|
||||
// 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.
|
||||
|
||||
import QtQml.Models 2.2
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQml.Models
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Dialogs
|
||||
import FontAwesome
|
||||
|
||||
import moneroComponents.Clipboard 1.0
|
||||
import moneroComponents.PendingTransaction 1.0
|
||||
import moneroComponents.Wallet 1.0
|
||||
import moneroComponents.NetworkType 1.0
|
||||
import FontAwesome 1.0
|
||||
import "../components"
|
||||
import "../components" as MoneroComponents
|
||||
import "." 1.0
|
||||
@@ -100,7 +101,6 @@ Rectangle {
|
||||
function oa_message(text) {
|
||||
oaPopup.title = qsTr("OpenAlias error") + translationManager.emptyString
|
||||
oaPopup.text = text
|
||||
oaPopup.icon = StandardIcon.Information
|
||||
oaPopup.onCloseCallback = null
|
||||
oaPopup.open()
|
||||
}
|
||||
@@ -111,7 +111,6 @@ Rectangle {
|
||||
qsTr("OpenAlias: ") + openAlias + "\n\n" +
|
||||
qsTr("Resolved address: ") + resolvedAddress + "\n\n" +
|
||||
qsTr("Only use this address if you trust this OpenAlias result.") + translationManager.emptyString
|
||||
confirmationDialog.icon = StandardIcon.Question
|
||||
confirmationDialog.cancelText = qsTr("Cancel") + translationManager.emptyString
|
||||
confirmationDialog.okText = qsTr("Use address") + translationManager.emptyString
|
||||
confirmationDialog.onAcceptedCallback = onAccepted
|
||||
@@ -200,7 +199,7 @@ Rectangle {
|
||||
ListModel {
|
||||
id: recipientModel
|
||||
|
||||
readonly property int maxRecipients: 16
|
||||
readonly property int maxRecipients: 15
|
||||
|
||||
ListElement {
|
||||
address: ""
|
||||
@@ -520,8 +519,8 @@ Rectangle {
|
||||
|
||||
amount = text;
|
||||
}
|
||||
validator: RegExpValidator {
|
||||
regExp: /^\s*(\d{1,8})?([\.,]\d{1,12})?\s*$/
|
||||
validator: RegularExpressionValidator {
|
||||
regularExpression: /^\s*(\d{1,8})?([\.,]\d{1,12})?\s*$/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -976,7 +975,7 @@ Rectangle {
|
||||
root.paymentClicked(recipientModel.getRecipients(), paymentIdLine.text, root.mixin, priority, descriptionLine.text)
|
||||
}
|
||||
button2.text: qsTr("Sign (offline)") + translationManager.emptyString
|
||||
button2.enabled: !appWindow.viewOnly
|
||||
button2.enabled: currentWallet !== undefined && !appWindow.viewOnly && !currentWallet.isHwBacked()
|
||||
button2.onClicked: {
|
||||
console.log("Transfer: sign tx clicked")
|
||||
signTxDialog.open();
|
||||
@@ -1022,11 +1021,11 @@ Rectangle {
|
||||
FileDialog {
|
||||
id: signTxDialog
|
||||
title: qsTr("Please choose a file") + translationManager.emptyString
|
||||
folder: "file://" + appWindow.accountsDir
|
||||
currentFolder: "file://" + appWindow.accountsDir
|
||||
nameFilters: [ "Unsigned transfers (*)"]
|
||||
|
||||
onAccepted: {
|
||||
var path = walletManager.urlToLocalPath(fileUrl);
|
||||
var path = walletManager.urlToLocalPath(selectedFile);
|
||||
// Load the unsigned tx from file
|
||||
var transaction = currentWallet.loadTxFile(path);
|
||||
|
||||
@@ -1034,7 +1033,6 @@ Rectangle {
|
||||
console.error("Can't load unsigned transaction: ", transaction.errorString);
|
||||
informationPopup.title = qsTr("Error") + translationManager.emptyString;
|
||||
informationPopup.text = qsTr("Can't load unsigned transaction: ") + transaction.errorString
|
||||
informationPopup.icon = StandardIcon.Critical
|
||||
informationPopup.onCloseCallback = null
|
||||
informationPopup.open();
|
||||
// deleting transaction object, we don't want memleaks
|
||||
@@ -1045,7 +1043,6 @@ Rectangle {
|
||||
|
||||
// Show confirmation dialog
|
||||
confirmationDialog.title = qsTr("Confirmation") + translationManager.emptyString
|
||||
confirmationDialog.icon = StandardIcon.Question
|
||||
confirmationDialog.onAcceptedCallback = function() {
|
||||
transaction.sign(path+"_signed");
|
||||
transaction.destroy();
|
||||
@@ -1066,20 +1063,18 @@ Rectangle {
|
||||
FileDialog {
|
||||
id: submitTxDialog
|
||||
title: qsTr("Please choose a file") + translationManager.emptyString
|
||||
folder: "file://" + appWindow.accountsDir
|
||||
currentFolder: "file://" + appWindow.accountsDir
|
||||
nameFilters: [ "signed transfers (*)"]
|
||||
|
||||
onAccepted: {
|
||||
if(!currentWallet.submitTxFile(walletManager.urlToLocalPath(fileUrl))){
|
||||
if(!currentWallet.submitTxFile(walletManager.urlToLocalPath(selectedFile))){
|
||||
informationPopup.title = qsTr("Error") + translationManager.emptyString;
|
||||
informationPopup.text = qsTr("Can't submit transaction: ") + currentWallet.errorString
|
||||
informationPopup.icon = StandardIcon.Critical
|
||||
informationPopup.onCloseCallback = null
|
||||
informationPopup.open();
|
||||
} else {
|
||||
informationPopup.title = qsTr("Information") + translationManager.emptyString
|
||||
informationPopup.text = qsTr("Monero sent successfully") + translationManager.emptyString
|
||||
informationPopup.icon = StandardIcon.Information
|
||||
informationPopup.onCloseCallback = null
|
||||
informationPopup.open();
|
||||
}
|
||||
@@ -1092,11 +1087,10 @@ Rectangle {
|
||||
|
||||
FileDialog {
|
||||
id: exportOutputsDialog
|
||||
selectMultiple: false
|
||||
selectExisting: false
|
||||
fileMode: FileDialog.SaveFile
|
||||
onAccepted: {
|
||||
console.log(walletManager.urlToLocalPath(exportOutputsDialog.fileUrl))
|
||||
if (currentWallet.exportOutputs(walletManager.urlToLocalPath(exportOutputsDialog.fileUrl), true)) {
|
||||
console.log(walletManager.urlToLocalPath(exportOutputsDialog.selectedFile))
|
||||
if (currentWallet.exportOutputs(walletManager.urlToLocalPath(exportOutputsDialog.selectedFile), true)) {
|
||||
appWindow.showStatusMessage(qsTr("Outputs successfully exported to file") + translationManager.emptyString, 3);
|
||||
} else {
|
||||
appWindow.showStatusMessage(currentWallet.errorString, 5);
|
||||
@@ -1109,12 +1103,10 @@ Rectangle {
|
||||
|
||||
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))) {
|
||||
console.log(walletManager.urlToLocalPath(importOutputsDialog.selectedFile))
|
||||
if (currentWallet.importOutputs(walletManager.urlToLocalPath(importOutputsDialog.selectedFile))) {
|
||||
appWindow.showStatusMessage(qsTr("Outputs successfully imported to wallet") + translationManager.emptyString, 3);
|
||||
} else {
|
||||
appWindow.showStatusMessage(currentWallet.errorString, 5);
|
||||
@@ -1128,11 +1120,10 @@ Rectangle {
|
||||
//ExportKeyImagesDialog
|
||||
FileDialog {
|
||||
id: exportKeyImagesDialog
|
||||
selectMultiple: false
|
||||
selectExisting: false
|
||||
fileMode: FileDialog.SaveFile
|
||||
onAccepted: {
|
||||
console.log(walletManager.urlToLocalPath(exportKeyImagesDialog.fileUrl))
|
||||
if (currentWallet.exportKeyImages(walletManager.urlToLocalPath(exportKeyImagesDialog.fileUrl), true)) {
|
||||
console.log(walletManager.urlToLocalPath(exportKeyImagesDialog.selectedFile))
|
||||
if (currentWallet.exportKeyImages(walletManager.urlToLocalPath(exportKeyImagesDialog.selectedFile), true)) {
|
||||
appWindow.showStatusMessage(qsTr("Key images successfully exported to file") + translationManager.emptyString, 3);
|
||||
} else {
|
||||
appWindow.showStatusMessage(currentWallet.errorString, 5);
|
||||
@@ -1146,12 +1137,10 @@ Rectangle {
|
||||
//ImportKeyImagesDialog
|
||||
FileDialog {
|
||||
id: importKeyImagesDialog
|
||||
selectMultiple: false
|
||||
selectExisting: true
|
||||
title: qsTr("Please choose a file") + translationManager.emptyString
|
||||
onAccepted: {
|
||||
console.log(walletManager.urlToLocalPath(importKeyImagesDialog.fileUrl))
|
||||
if (currentWallet.importKeyImages(walletManager.urlToLocalPath(importKeyImagesDialog.fileUrl))) {
|
||||
console.log(walletManager.urlToLocalPath(importKeyImagesDialog.selectedFile))
|
||||
if (currentWallet.importKeyImages(walletManager.urlToLocalPath(importKeyImagesDialog.selectedFile))) {
|
||||
appWindow.showStatusMessage(qsTr("Key images successfully imported to wallet") + translationManager.emptyString, 3);
|
||||
} else {
|
||||
appWindow.showStatusMessage(currentWallet.errorString, 5);
|
||||
@@ -1180,7 +1169,7 @@ Rectangle {
|
||||
|
||||
function updateStatus() {
|
||||
var messageNotConnected = qsTr("Wallet is not connected to daemon.");
|
||||
if(appWindow.walletMode >= 2 && !persistentSettings.useRemoteNode) messageNotConnected += root.startLinkText;
|
||||
if(appWindow.walletMode >= 2 && !persistentSettings.useRemoteNode) messageNotConnected += " " + root.startLinkText;
|
||||
pageRoot.enabled = true;
|
||||
if(typeof currentWallet === "undefined") {
|
||||
root.warningContent = messageNotConnected;
|
||||
|
||||
+5
-6
@@ -26,10 +26,9 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
import moneroComponents.Clipboard 1.0
|
||||
@@ -125,8 +124,8 @@ Rectangle {
|
||||
}
|
||||
error = walletManager.amountFromString(text) > appWindow.getUnlockedBalance();
|
||||
}
|
||||
validator: RegExpValidator {
|
||||
regExp: /^\s*(\d{1,8})?([\.,]\d{1,12})?\s*$/
|
||||
validator: RegularExpressionValidator {
|
||||
regularExpression: /^\s*(\d{1,8})?([\.,]\d{1,12})?\s*$/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+39
-46
@@ -26,12 +26,11 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Controls 2.0
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Dialogs
|
||||
|
||||
import moneroComponents.Clipboard 1.0
|
||||
import moneroComponents.Wallet 1.0
|
||||
@@ -206,16 +205,15 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
DropShadow {
|
||||
MultiEffect {
|
||||
anchors.fill: source
|
||||
cached: true
|
||||
horizontalOffset: 3
|
||||
verticalOffset: 3
|
||||
radius: 8.0
|
||||
samples: 16
|
||||
color: "#20000000"
|
||||
smooth: true
|
||||
source: tracker
|
||||
shadowEnabled: true
|
||||
shadowHorizontalOffset: 3
|
||||
shadowVerticalOffset: 3
|
||||
shadowBlur: 1.0
|
||||
blurMax: 8
|
||||
shadowColor: "#20000000"
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@@ -239,12 +237,12 @@ Item {
|
||||
|
||||
smooth: false
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: "image://qrcode/" + walletManager.make_uri(appWindow.current_address, walletManager.amountFromString(amountToReceive.text))
|
||||
source: "image://qrcode/" + walletManager.make_uri(appWindow.current_address, amountToReceive.text)
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.RightButton
|
||||
onClicked: {
|
||||
onClicked: (mouse) => {
|
||||
if (mouse.button == Qt.RightButton){
|
||||
qrMenu.x = this.mouseX;
|
||||
qrMenu.y = this.mouseY;
|
||||
@@ -266,16 +264,15 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
DropShadow {
|
||||
MultiEffect {
|
||||
anchors.fill: source
|
||||
cached: true
|
||||
horizontalOffset: 3
|
||||
verticalOffset: 3
|
||||
radius: 8.0
|
||||
samples: 16
|
||||
color: "#30000000"
|
||||
smooth: true
|
||||
source: qrImg
|
||||
shadowEnabled: true
|
||||
shadowHorizontalOffset: 3
|
||||
shadowVerticalOffset: 3
|
||||
shadowBlur: 1.0
|
||||
blurMax: 8
|
||||
shadowColor: "#30000000"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -398,7 +395,6 @@ Item {
|
||||
// onClicked: {
|
||||
// merchantPageDialog.title = qsTr("Payment URL") + translationManager.emptyString;
|
||||
// merchantPageDialog.text = qsTr("payment url explanation")
|
||||
// merchantPageDialog.icon = StandardIcon.Information
|
||||
// merchantPageDialog.open()
|
||||
// }
|
||||
// }
|
||||
@@ -428,7 +424,7 @@ Item {
|
||||
font.pixelSize: 12
|
||||
font.bold: true
|
||||
color: _color
|
||||
text: walletManager.make_uri(appWindow.current_address, walletManager.amountFromString(amountToReceive.text))
|
||||
text: walletManager.make_uri(appWindow.current_address, amountToReceive.text)
|
||||
themeTransition: false
|
||||
|
||||
MouseArea {
|
||||
@@ -451,16 +447,15 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
DropShadow {
|
||||
MultiEffect {
|
||||
anchors.fill: source
|
||||
cached: true
|
||||
horizontalOffset: 3
|
||||
verticalOffset: 3
|
||||
radius: 8.0
|
||||
samples: 16
|
||||
color: "#20000000"
|
||||
smooth: true
|
||||
source: payment_url_container
|
||||
shadowEnabled: true
|
||||
shadowHorizontalOffset: 3
|
||||
shadowVerticalOffset: 3
|
||||
shadowBlur: 1.0
|
||||
blurMax: 8
|
||||
shadowColor: "#20000000"
|
||||
}
|
||||
|
||||
Item {
|
||||
@@ -513,8 +508,8 @@ Item {
|
||||
amountToReceive.text = '0' + amountToReceive.text;
|
||||
}
|
||||
}
|
||||
validator: RegExpValidator {
|
||||
regExp: /^(\d{1,8})?([\.]\d{1,12})?$/
|
||||
validator: RegularExpressionValidator {
|
||||
regularExpression: /^(\d{1,8})?([\.]\d{1,12})?$/
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -653,7 +648,7 @@ Item {
|
||||
var confirmations = 0;
|
||||
var displayAmount = model.data(idx, TransactionHistoryModel.TransactionDisplayAmountRole);
|
||||
|
||||
if (blockHeight === undefined) {
|
||||
if (!blockHeight) {
|
||||
in_txpool = true;
|
||||
} else {
|
||||
confirmations = model.data(idx, TransactionHistoryModel.TransactionConfirmationsRole);
|
||||
@@ -703,22 +698,20 @@ Item {
|
||||
|
||||
MessageDialog {
|
||||
id: merchantPageDialog
|
||||
standardButtons: StandardButton.Ok
|
||||
buttons: MessageDialog.Ok
|
||||
}
|
||||
|
||||
FileDialog {
|
||||
id: qrFileDialog
|
||||
title: "Please choose a name"
|
||||
folder: shortcuts.pictures
|
||||
selectExisting: false
|
||||
fileMode: FileDialog.SaveFile
|
||||
nameFilters: ["Image (*.png)"]
|
||||
onAccepted: {
|
||||
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) )
|
||||
receivePageDialog.title = qsTr("Save QrCode") + translationManager.emptyString;
|
||||
receivePageDialog.text = qsTr("Failed to save QrCode to ") + walletManager.urlToLocalPath(fileUrl) + translationManager.emptyString;
|
||||
receivePageDialog.icon = StandardIcon.Error
|
||||
receivePageDialog.open()
|
||||
if (!walletManager.saveQrCode(walletManager.make_uri(appWindow.current_address, amountToReceive.text), walletManager.urlToLocalPath(selectedFile))) {
|
||||
console.log("Failed to save QrCode to file " + walletManager.urlToLocalPath(selectedFile) )
|
||||
merchantPageDialog.title = qsTr("Save QrCode") + translationManager.emptyString;
|
||||
merchantPageDialog.text = qsTr("Failed to save QrCode to ") + walletManager.urlToLocalPath(selectedFile) + translationManager.emptyString;
|
||||
merchantPageDialog.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "../../components" as MoneroComponents
|
||||
|
||||
@@ -60,16 +60,15 @@ Item {
|
||||
source: "qrc:///images/uncheckedIcon.png"
|
||||
}
|
||||
}
|
||||
DropShadow {
|
||||
MultiEffect {
|
||||
anchors.fill: source
|
||||
cached: true
|
||||
horizontalOffset: 3
|
||||
verticalOffset: 3
|
||||
radius: 8.0
|
||||
samples: 16
|
||||
color: "#20000000"
|
||||
smooth: true
|
||||
source: checkbox
|
||||
shadowEnabled: true
|
||||
shadowHorizontalOffset: 3
|
||||
shadowVerticalOffset: 3
|
||||
shadowBlur: 1.0
|
||||
blurMax: 8
|
||||
shadowColor: "#20000000"
|
||||
}
|
||||
}
|
||||
MoneroComponents.TextPlain {
|
||||
|
||||
@@ -26,12 +26,10 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Window 2.0
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Layouts 1.2
|
||||
import QtQuick
|
||||
import QtQuick.Window
|
||||
import QtQuick.Layouts
|
||||
|
||||
import FontAwesome 1.0
|
||||
import "../../components/" as MoneroComponents
|
||||
import "../../components/effects/" as MoneroEffects
|
||||
|
||||
@@ -134,7 +132,7 @@ Rectangle {
|
||||
smooth: true
|
||||
mipmap: true
|
||||
opacity: 0.75
|
||||
rotation: appWindow.visibility === Window.FullScreen ? 180 : 0
|
||||
rotation: appWindow.visibility === Window.Maximized ? 180 : 0
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
@@ -178,20 +176,8 @@ Rectangle {
|
||||
|
||||
MouseArea {
|
||||
enabled: persistentSettings.customDecorations
|
||||
property var previousPosition
|
||||
anchors.fill: parent
|
||||
propagateComposedEvents: true
|
||||
onPressed: previousPosition = globalCursor.getPosition()
|
||||
onPositionChanged: {
|
||||
if (pressedButtons == Qt.LeftButton) {
|
||||
var pos = globalCursor.getPosition()
|
||||
var dx = pos.x - previousPosition.x
|
||||
var dy = pos.y - previousPosition.y
|
||||
|
||||
appWindow.x += dx
|
||||
appWindow.y += dy
|
||||
previousPosition = pos
|
||||
}
|
||||
}
|
||||
onPressed: appWindow.startSystemMove()
|
||||
}
|
||||
}
|
||||
@@ -26,11 +26,10 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Dialogs
|
||||
|
||||
import "../../js/Utils.js" as Utils
|
||||
import "../../components" as MoneroComponents
|
||||
|
||||
+11
-26
@@ -26,11 +26,10 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Dialogs
|
||||
import "../../js/Windows.js" as Windows
|
||||
import "../../js/Utils.js" as Utils
|
||||
import "../../components" as MoneroComponents
|
||||
@@ -105,7 +104,13 @@ ColumnLayout {
|
||||
}
|
||||
previousView = currentView
|
||||
if (currentView) {
|
||||
stackView.replace(currentView)
|
||||
if (stackView.currentItem !== currentView) {
|
||||
if (stackView.depth > 0) {
|
||||
stackView.replace(currentView)
|
||||
} else {
|
||||
stackView.push(currentView)
|
||||
}
|
||||
}
|
||||
if (typeof currentView.onPageCompleted === "function") {
|
||||
currentView.onPageCompleted();
|
||||
}
|
||||
@@ -142,26 +147,6 @@ ColumnLayout {
|
||||
anchors.fill: parent
|
||||
clip: false // otherwise animation will affect left panel
|
||||
|
||||
delegate: StackViewDelegate {
|
||||
pushTransition: StackViewTransition {
|
||||
PropertyAnimation {
|
||||
target: enterItem
|
||||
property: "x"
|
||||
from: (navbarId.currentIndex < navbarId.previousIndex ? 1 : -1) * - target.width
|
||||
to: 0
|
||||
duration: 300
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
PropertyAnimation {
|
||||
target: exitItem
|
||||
property: "x"
|
||||
from: 0
|
||||
to: (navbarId.currentIndex < navbarId.previousIndex ? 1 : -1) * target.width
|
||||
duration: 300
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Dialogs
|
||||
|
||||
import "../../js/Wizard.js" as Wizard
|
||||
import "../../js/Utils.js" as Utils
|
||||
@@ -41,6 +41,16 @@ Rectangle {
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
property alias infoHeight: infoLayout.height
|
||||
readonly property string rendererName: ({
|
||||
[GraphicsInfo.OpenGL]: "OpenGL",
|
||||
[GraphicsInfo.Vulkan]: "Vulkan",
|
||||
[GraphicsInfo.Metal]: "Metal",
|
||||
[GraphicsInfo.Direct3D11]: "Direct3D 11",
|
||||
[GraphicsInfo.Direct3D12]: "Direct3D 12",
|
||||
[GraphicsInfo.OpenVG]: "OpenVG",
|
||||
[GraphicsInfo.Software]: "Software",
|
||||
[GraphicsInfo.Null]: "Null"
|
||||
})[GraphicsInfo.api] ?? "Unknown"
|
||||
property string walletModeString: {
|
||||
var modeStr;
|
||||
if(appWindow.walletMode === 0){
|
||||
@@ -50,7 +60,7 @@ Rectangle {
|
||||
} else if(appWindow.walletMode === 2){
|
||||
modeStr = "%1 (%2)".arg(qsTr("Advanced mode")).arg(persistentSettings.useRemoteNode ? qsTr("Remote node") : qsTr("Local node")) + translationManager.emptyString;
|
||||
}
|
||||
return modeStr + (persistentSettings.portable ? ", %1".arg(qsTr("portable")) : "");
|
||||
return modeStr + (portableSettings.portable ? ", %1".arg(qsTr("portable")) : "");
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
@@ -208,7 +218,6 @@ Rectangle {
|
||||
+ "- Tx descriptions\n\n"
|
||||
+ "The old wallet cache file will be renamed and can be restored later.\n"
|
||||
);
|
||||
confirmationDialog.icon = StandardIcon.Question
|
||||
confirmationDialog.onAcceptedCallback = function() {
|
||||
appWindow.closeWallet(function() {
|
||||
walletManager.clearWalletCache(persistentSettings.wallet_path);
|
||||
@@ -338,7 +347,7 @@ Rectangle {
|
||||
Layout.fillWidth: true
|
||||
color: MoneroComponents.Style.dimmedFontColor
|
||||
font.pixelSize: 14
|
||||
text: isOpenGL ? "OpenGL" : "Low graphics mode"
|
||||
text: rendererName
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@@ -395,7 +404,7 @@ Rectangle {
|
||||
|
||||
data += "\nWallet log path: " + logger.logFilePath;
|
||||
data += "\nWallet mode: " + walletModeString;
|
||||
data += "\nGraphics mode: " + (isOpenGL ? "OpenGL" : "Low graphics mode");
|
||||
data += "\nGraphics mode: " + rendererName;
|
||||
if (isTails)
|
||||
data += "\nTails: " + (tailsUsePersistence ? "persistent" : "persistence disabled");
|
||||
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Dialogs
|
||||
|
||||
import moneroComponents.Wallet 1.0
|
||||
|
||||
@@ -186,6 +186,8 @@ Rectangle {
|
||||
}
|
||||
|
||||
//! Manage pricing
|
||||
readonly property bool fiatRatesConsentNeeded: persistentSettings.fiatPriceCurrency !== "xmrusd" && !persistentSettings.fiatRatesConsentGiven
|
||||
|
||||
RowLayout {
|
||||
MoneroComponents.CheckBox {
|
||||
id: enableConvertCurrency
|
||||
@@ -227,14 +229,16 @@ Rectangle {
|
||||
Layout.maximumWidth: 100
|
||||
labelText: qsTr("Currency") + translationManager.emptyString
|
||||
labelFontSize: 14
|
||||
currentIndex: persistentSettings.fiatPriceCurrency === "xmrusd" ? 0 : 1
|
||||
maxDropdownItems: 8
|
||||
dataModel: fiatPriceCurrencyModel
|
||||
onChanged: {
|
||||
var obj = dataModel.get(currentIndex);
|
||||
persistentSettings.fiatPriceCurrency = obj.data;
|
||||
|
||||
if(persistentSettings.fiatPriceEnabled)
|
||||
if(persistentSettings.fiatPriceEnabled) {
|
||||
appWindow.fiatApiUpdatePrice();
|
||||
appWindow.fiatApiRefresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,24 +247,30 @@ Rectangle {
|
||||
|
||||
ColumnLayout {
|
||||
// Feature needs to be double enabled for security purposes (miss-clicks)
|
||||
visible: enableConvertCurrency.checked && !persistentSettings.fiatPriceEnabled
|
||||
visible: enableConvertCurrency.checked && (!persistentSettings.fiatPriceEnabled || settingsUI.fiatRatesConsentNeeded)
|
||||
spacing: 0
|
||||
Layout.topMargin: 5
|
||||
Layout.leftMargin: 36
|
||||
|
||||
MoneroComponents.WarningBox {
|
||||
text: qsTr("Enabling price conversion exposes your IP address to the selected price source.") + translationManager.emptyString;
|
||||
text: !persistentSettings.fiatPriceEnabled
|
||||
? qsTr("Enabling price conversion exposes your IP address to the selected price source, and for currencies other than USD, to the exchange rate provider (frankfurter.dev).") + translationManager.emptyString
|
||||
: qsTr("Using a non-USD currency exposes your IP address to the exchange rate provider (frankfurter.dev).") + translationManager.emptyString;
|
||||
}
|
||||
|
||||
MoneroComponents.StandardButton {
|
||||
Layout.topMargin: 10
|
||||
Layout.bottomMargin: 10
|
||||
small: true
|
||||
text: qsTr("Confirm and enable") + translationManager.emptyString
|
||||
text: !persistentSettings.fiatPriceEnabled
|
||||
? qsTr("Confirm and enable") + translationManager.emptyString
|
||||
: qsTr("Confirm") + translationManager.emptyString
|
||||
|
||||
onClicked: {
|
||||
console.log("Enabled price conversion");
|
||||
console.log(persistentSettings.fiatPriceEnabled ? "Confirmed exchange rate provider consent" : "Enabled price conversion");
|
||||
persistentSettings.fiatPriceEnabled = true;
|
||||
persistentSettings.fiatRatesConsentGiven = true;
|
||||
appWindow.fiatApiRefresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -314,14 +324,6 @@ Rectangle {
|
||||
|
||||
ListModel {
|
||||
id: fiatPriceCurrencyModel
|
||||
ListElement {
|
||||
data: "xmrusd"
|
||||
column1: "USD"
|
||||
}
|
||||
ListElement {
|
||||
data: "xmreur"
|
||||
column1: "EUR"
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
@@ -341,6 +343,17 @@ Rectangle {
|
||||
i += 1;
|
||||
}
|
||||
|
||||
var currencies = appWindow.fiatCurrencies;
|
||||
fiatPriceCurrencyModel.clear();
|
||||
|
||||
for (var j = 0; j < currencies.length; ++j) {
|
||||
const key = "xmr" + currencies[j].toLowerCase();
|
||||
fiatPriceCurrencyModel.append({"column1": currencies[j], "data": key});
|
||||
|
||||
if(key === persistentSettings.fiatPriceCurrency)
|
||||
fiatPriceCurrencyDropdown.currentIndex = j;
|
||||
}
|
||||
|
||||
console.log('SettingsLayout loaded');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
|
||||
import "../../js/Utils.js" as Utils
|
||||
import "../../components" as MoneroComponents
|
||||
@@ -175,6 +175,7 @@ Rectangle {
|
||||
font.pixelSize: 14
|
||||
wrapMode: TextEdit.Wrap
|
||||
readOnly: true
|
||||
background: null
|
||||
function logCommand(msg){
|
||||
msg = log_color(msg, MoneroComponents.Style.blackTheme ? "lime" : "green");
|
||||
consoleArea.append(msg);
|
||||
@@ -219,6 +220,8 @@ Rectangle {
|
||||
ScrollBar.vertical: ScrollBar {
|
||||
onActiveChanged: if (!active && !isMac) active = true
|
||||
policy: isMac ? ScrollBar.AsNeeded : ScrollBar.AlwaysOn
|
||||
palette.mid: "#8E8E93"
|
||||
palette.dark: "#B8B8BD"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,10 +26,11 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Controls 2.0
|
||||
import FontAwesome 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
|
||||
import FontAwesome
|
||||
|
||||
import "../../components" as MoneroComponents
|
||||
import "../../components/effects" as MoneroEffects
|
||||
@@ -299,7 +300,7 @@ Rectangle{
|
||||
onInputLabelLinkActivated: {
|
||||
//mouse.accepted = false
|
||||
if(persistentSettings.blockchainDataDir !== ""){
|
||||
blockchainFileDialog.folder = "file://" + persistentSettings.blockchainDataDir;
|
||||
blockchainFileDialog.currentFolder = "file://" + persistentSettings.blockchainDataDir;
|
||||
}
|
||||
blockchainFileDialog.open();
|
||||
blockchainFolder.focus = true;
|
||||
|
||||
@@ -26,11 +26,12 @@
|
||||
// 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.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Dialogs 1.2
|
||||
import FontAwesome 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Dialogs
|
||||
|
||||
import FontAwesome
|
||||
|
||||
import "../../js/Utils.js" as Utils
|
||||
import "../../components" as MoneroComponents
|
||||
@@ -114,13 +115,11 @@ Rectangle {
|
||||
} else {
|
||||
informationPopup.text = qsTr("Error: ") + currentWallet.errorString;
|
||||
}
|
||||
informationPopup.icon = StandardIcon.Critical
|
||||
informationPopup.onCloseCallback = null
|
||||
informationPopup.open();
|
||||
} else {
|
||||
informationPopup.title = qsTr("Information") + translationManager.emptyString
|
||||
informationPopup.text = qsTr("Successfully rescanned spent outputs.") + translationManager.emptyString
|
||||
informationPopup.icon = StandardIcon.Information
|
||||
informationPopup.onCloseCallback = null
|
||||
informationPopup.open();
|
||||
}
|
||||
@@ -145,7 +144,6 @@ Rectangle {
|
||||
if (currentWallet.errorString == "The wallet has already seen 1 or more recent transactions than the scanned tx") {
|
||||
informationPopup.title = qsTr("Error") + translationManager.emptyString;
|
||||
informationPopup.text = qsTr("The wallet has already seen 1 or more recent transactions than the scanned transaction.\n\nIn order to rescan the transaction, you can re-sync your wallet by resetting the wallet restore height in the Settings > Info page. Make sure to use a restore height from before your wallet's earliest transaction.") + translationManager.emptyString;
|
||||
informationPopup.icon = StandardIcon.Critical
|
||||
informationPopup.onCloseCallback = null
|
||||
informationPopup.open();
|
||||
} else {
|
||||
|
||||
Loaded 100 of 178 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user