mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-04 23:51:10 +02:00
Compare commits
26 Commits
328068a8aa
...
1b1bb020da
Author | SHA1 | Date | |
---|---|---|---|
|
1b1bb020da | ||
|
0a9d61986c | ||
|
b521e83829 | ||
|
08e2eafb7c | ||
|
c27bb53d7c | ||
|
6f9769607a | ||
|
551ab27b09 | ||
|
c57bdfaeaf | ||
|
af92ca67d7 | ||
|
6889ab5ac1 | ||
|
eddafbbdcc | ||
|
8d110ec790 | ||
|
a49cd13a83 | ||
|
50d479f7a6 | ||
|
94477c5480 | ||
|
ff1e50745d | ||
|
8118355f39 | ||
|
1d686adcb9 | ||
|
f8aa11bc41 | ||
|
923f77a2db | ||
|
45a2b1d2a7 | ||
|
7a3ea3a93c | ||
|
1878338a44 | ||
|
a64ae977cc | ||
|
ca3dafc5f0 | ||
|
7b2c886ddc |
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@ -91,7 +91,7 @@ jobs:
|
||||
- name: create .tar
|
||||
run: tar -cf monero-wallet-gui.tar monero-wallet-gui.app
|
||||
working-directory: build/bin
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: build/bin/monero-wallet-gui.tar
|
||||
@ -121,7 +121,7 @@ jobs:
|
||||
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@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: |
|
||||
@ -149,7 +149,7 @@ jobs:
|
||||
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -w /monero-gui monero:build-env-windows sh -c 'make depends root=/depends target=x86_64-w64-mingw32 tag=win-x64 -j3'
|
||||
- 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@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: |
|
||||
@ -177,7 +177,7 @@ jobs:
|
||||
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -e THREADS=3 monero:build-env-android
|
||||
- name: Remove obsolete docker layers
|
||||
run: docker images -a | grep none | awk '{ print $3; }' | xargs docker rmi || true
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: /home/runner/work/monero-gui/monero-gui/build/Android/release/android-build/monero-gui.apk
|
||||
@ -195,7 +195,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@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.OUTPUT }}
|
||||
path: /home/runner/work/monero-gui/monero-gui/${{ env.OUTPUT }}
|
||||
|
@ -5,7 +5,7 @@ message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
|
||||
|
||||
set(VERSION_MAJOR "18")
|
||||
set(VERSION_MINOR "3")
|
||||
set(VERSION_REVISION "3")
|
||||
set(VERSION_REVISION "4")
|
||||
set(VERSION "0.${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")
|
||||
|
||||
option(STATIC "Link libraries statically, requires static Qt")
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Use macOS 10.12 - 10.13 for better backwards compability.
|
||||
|
||||
1. `HOMEBREW_OPTFLAGS="-march=core2" HOMEBREW_OPTIMIZATION_LEVEL="O0" brew install boost zmq libpgm miniupnpc libsodium expat libunwind-headers protobuf libgcrypt hidapi`
|
||||
1. `HOMEBREW_OPTFLAGS="-march=core2" HOMEBREW_OPTIMIZATION_LEVEL="O0" brew install boost zmq libpgm miniupnpc libsodium expat libunwind-headers protobuf@21 libgcrypt hidapi libusb cmake pkg-config && brew link protobuf@21`
|
||||
|
||||
2. Get the latest LTS from here: https://www.qt.io/offline-installers and install
|
||||
|
||||
@ -12,7 +12,7 @@ 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=~/Qt5.12.8/5.12.8/clang_64 ..
|
||||
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
|
||||
```
|
||||
|
@ -1,7 +1,7 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
ARG THREADS=1
|
||||
ARG QT_VERSION=v5.15.13-lts-lgpl
|
||||
ARG QT_VERSION=v5.15.14-lts-lgpl
|
||||
|
||||
ENV CFLAGS="-fPIC"
|
||||
ENV CPPFLAGS="-fPIC"
|
||||
|
@ -1,7 +1,7 @@
|
||||
FROM ubuntu:20.04
|
||||
|
||||
ARG THREADS=1
|
||||
ARG QT_VERSION=v5.15.13-lts-lgpl
|
||||
ARG QT_VERSION=v5.15.14-lts-lgpl
|
||||
ENV SOURCE_DATE_EPOCH=1397818193
|
||||
|
||||
RUN apt update && \
|
||||
|
@ -60,9 +60,7 @@ The Bitcoin donation address is: `1KTexdemPdxSBcG55heUuTjDRYqbC5ZL8H`
|
||||
GUI development funding and/or some supporting services are also graciously provided by [sponsors](https://www.getmonero.org/community/sponsorships/):
|
||||
|
||||
[<img width="150" src="https://www.getmonero.org/img/sponsors/tarilabs.png"/>](https://tarilabs.com/)
|
||||
[<img width="150" src="https://www.getmonero.org/img/sponsors/globee.png"/>](https://globee.com/)
|
||||
[<img width="150" src="https://www.getmonero.org/img/sponsors/symas.png"/>](https://symas.com/)
|
||||
[<img width="150" src="https://www.getmonero.org/img/sponsors/forked_logo.png"/>](http://www.forked.net/)
|
||||
[<img width="150" src="https://www.getmonero.org/img/sponsors/macstadium.png"/>](https://www.macstadium.com/)
|
||||
|
||||
There are also several mining pools that kindly donate a portion of their fees, [a list of them can be found on our Bitcointalk post](https://bitcointalk.org/index.php?topic=583449.0).
|
||||
@ -107,7 +105,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.3.3`) to build the release binaries.
|
||||
\* `master` - replace with the desired version tag (e.g. `v0.18.3.4`) to build the release binaries.
|
||||
3. Prepare build environment
|
||||
```
|
||||
cd monero-gui
|
||||
@ -130,7 +128,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.3.3`) to build the release binaries.
|
||||
\* `master` - replace with the desired version tag (e.g. `v0.18.3.4`) to build the release binaries.
|
||||
3. Prepare build environment
|
||||
```
|
||||
cd monero-gui
|
||||
|
@ -16,6 +16,7 @@ Text {
|
||||
property alias tooltipLeft: tooltip.tooltipLeft
|
||||
property alias tooltipIconVisible: tooltip.tooltipIconVisible
|
||||
property alias tooltipPopup: tooltip.tooltipPopup
|
||||
property alias tooltipWrapMode: tooltip.tooltipWrapMode
|
||||
font.family: MoneroComponents.Style.fontMedium.name
|
||||
font.bold: false
|
||||
font.pixelSize: 14
|
||||
|
@ -36,6 +36,7 @@ import "." as MoneroComponents
|
||||
Rectangle {
|
||||
property alias text: tooltip.text
|
||||
property alias tooltipPopup: popup
|
||||
property alias tooltipWrapMode: tooltip.wrapMode
|
||||
property bool tooltipIconVisible: false
|
||||
property bool tooltipLeft: false
|
||||
property bool tooltipBottom: tooltipIconVisible ? false : true
|
||||
|
BIN
images/trezor5.png
Normal file
BIN
images/trezor5.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 305 KiB |
@ -2,13 +2,33 @@ function destinationsToAmount(destinations){
|
||||
// Gets amount from destinations line
|
||||
// input: "20.000000000000: 9tLGyK277MnYrDc7Vzi6TB1pJvstFoviziFwsqQNFbwA9rvg5RxYVYjEezFKDjvDHgAzTELJhJHVx6JAaWZKeVqSUZkXeKk"
|
||||
// returns: 20.000000000000
|
||||
return destinations.split(" ")[0].split(":")[0];
|
||||
var numberOfDestinations = (destinations.match(/:/g) || []).length;
|
||||
var amountList = "";
|
||||
for (var i = 0; i < numberOfDestinations; i++) {
|
||||
var destinationAndAmount = destinations.split("<br> ")[i];
|
||||
var amount = destinationAndAmount.split(":")[0];
|
||||
if (i+1 != numberOfDestinations) {
|
||||
amountList += amount + " ";
|
||||
} else {
|
||||
amountList += amount;
|
||||
}
|
||||
}
|
||||
return amountList;
|
||||
}
|
||||
|
||||
function destinationsToAddress(destinations){
|
||||
var address = destinations.split(" ")[1];
|
||||
if(address === undefined) return ""
|
||||
return address;
|
||||
var numberOfDestinations = (destinations.match(/:/g) || []).length;
|
||||
var addressList = "";
|
||||
for (var i = 0; i < numberOfDestinations; i++) {
|
||||
var destinationAndAmount = destinations.split("<br> ")[i];
|
||||
var address = destinationAndAmount.split(": ")[1];
|
||||
if (i+1 != numberOfDestinations) {
|
||||
addressList += address + " ";
|
||||
} else {
|
||||
addressList += address;
|
||||
}
|
||||
}
|
||||
return addressList;
|
||||
}
|
||||
|
||||
function addressTruncate(address, range){
|
||||
@ -70,7 +90,7 @@ function checkSignature(signature) {
|
||||
}
|
||||
|
||||
function isValidOpenAliasAddress(address) {
|
||||
var regex = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)+$/; // Basic domain structure
|
||||
var regex = /^[A-Za-z0-9-@]+(\.[A-Za-z0-9-]+)+$/; // Basic domain structure, allow email-like address
|
||||
|
||||
if (!regex.test(address)) {
|
||||
return false;
|
||||
|
@ -166,7 +166,7 @@ function getApproximateBlockchainHeight(_date, _nettype){
|
||||
|
||||
if(_nettype == "Testnet" || _nettype == "Stagenet"){
|
||||
// testnet got some huge rollbacks, so the estimation is way off
|
||||
var approximateTestnetRolledBackBlocks = _nettype == "Testnet" ? 342100 : 30000;
|
||||
var approximateTestnetRolledBackBlocks = _nettype == "Testnet" ? 342100 : _nettype == "Stagenet" ? 60000 : 30000;
|
||||
if(approxBlockchainHeight > approximateTestnetRolledBackBlocks)
|
||||
approxBlockchainHeight -= approximateTestnetRolledBackBlocks
|
||||
}
|
||||
|
2
monero
2
monero
@ -1 +1 @@
|
||||
Subproject commit 81d4db08eb75ce5392c65ca6571e7b08e41b7c95
|
||||
Subproject commit b089f9ee69924882c5d14dd1a6991deb05d9d1cd
|
@ -597,7 +597,7 @@ Rectangle {
|
||||
anchors.right: parent ? parent.right : undefined
|
||||
height: {
|
||||
if(!collapsed) return 60;
|
||||
return 320;
|
||||
return 200 + middleColumn.height;
|
||||
}
|
||||
color: {
|
||||
if(!collapsed) return "transparent"
|
||||
@ -652,9 +652,10 @@ Rectangle {
|
||||
Layout.preferredHeight: 60
|
||||
|
||||
ColumnLayout {
|
||||
id: leftColumn
|
||||
spacing: 0
|
||||
clip: true
|
||||
Layout.preferredHeight: 120
|
||||
Layout.preferredHeight: 100 + amountRectangle.height
|
||||
Layout.minimumWidth: 180
|
||||
|
||||
Rectangle {
|
||||
@ -680,23 +681,63 @@ Rectangle {
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: amountRectangle
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 20
|
||||
Layout.preferredHeight: amountColumn.height
|
||||
Component.onCompleted: {
|
||||
var amountListArray = [];
|
||||
amountListArray = amountList.split(" ");
|
||||
for (var i = 0; i < amountListArray.length; i++) {
|
||||
amountFieldModel.append({amountArray: amountListArray[i]});
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 15
|
||||
text: (amount == 0 ? qsTr("Unknown amount") : displayAmount) + translationManager.emptyString
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
ListModel {
|
||||
id: amountFieldModel
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
state: "copyable"
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: parent.color = MoneroComponents.Style.orange
|
||||
onExited: parent.color = MoneroComponents.Style.defaultFontColor
|
||||
ColumnLayout {
|
||||
id: amountColumn
|
||||
|
||||
Repeater {
|
||||
id: amountFieldRepeater
|
||||
model: amountFieldModel
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: amountField
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 15
|
||||
textFormat: Text.RichText
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
text: {
|
||||
if (numberOfDestinations > 1) {
|
||||
if(!collapsed) {
|
||||
if (index == 0) {
|
||||
return displayAmount;
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
} else {
|
||||
return amountFieldModel.get(index).amountArray + " XMR"
|
||||
}
|
||||
} else {
|
||||
if (amount == 0) {
|
||||
return qsTr("Unknown amount") + translationManager.emptyString
|
||||
} else {
|
||||
return displayAmount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
state: "copyable"
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: parent.color = MoneroComponents.Style.orange
|
||||
onExited: parent.color = MoneroComponents.Style.defaultFontColor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -764,9 +805,10 @@ Rectangle {
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: middleColumn
|
||||
spacing: 0
|
||||
clip: true
|
||||
Layout.preferredHeight: 120
|
||||
Layout.preferredHeight: 100 + addressRectangle.height
|
||||
Layout.minimumWidth: 230
|
||||
|
||||
Rectangle {
|
||||
@ -792,51 +834,101 @@ Rectangle {
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: addressRectangle
|
||||
color: "transparent"
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 20
|
||||
Layout.preferredHeight: addressColumn.height
|
||||
Component.onCompleted: {
|
||||
var addressListArray = [];
|
||||
addressListArray = addressList.split(" ");
|
||||
for (var i = 0; i < addressListArray.length; i++) {
|
||||
addressFieldModel.append({addressArray: addressListArray[i]});
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: addressField
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 15
|
||||
text: {
|
||||
if (isout) {
|
||||
if (address) {
|
||||
return (addressBookName ? FontAwesome.addressBook + " " + addressBookName : TxUtils.addressTruncate(address, 8));
|
||||
}
|
||||
if (amount != 0) {
|
||||
return qsTr("Unknown recipient") + translationManager.emptyString;
|
||||
} else {
|
||||
return qsTr("My wallet") + translationManager.emptyString;
|
||||
}
|
||||
} else {
|
||||
if (receivingAddress) {
|
||||
if (subaddrIndex == 0) {
|
||||
return qsTr("Address") + " #0" + " (" + qsTr("Primary address") + ")" + translationManager.emptyString;
|
||||
ListModel {
|
||||
id: addressFieldModel
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: addressColumn
|
||||
|
||||
Repeater {
|
||||
id: addressFieldRepeater
|
||||
model: addressFieldModel
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: addressField
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 15
|
||||
textFormat: Text.RichText
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
property var addressFromAddressListArray: ""
|
||||
tooltip: numberOfDestinations > 1 ? (!collapsed ? "" : addressFromAddressListArray)
|
||||
: address ? address
|
||||
: receivingAddress ? receivingAddress
|
||||
: ""
|
||||
tooltipWrapMode: Text.Wrap
|
||||
text: {
|
||||
if (numberOfDestinations > 1) {
|
||||
if(!collapsed) {
|
||||
if (index == 0) {
|
||||
return qsTr("Multiple recipients") + " (" + numberOfDestinations + ")" + translationManager.emptyString;
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
} else {
|
||||
addressFromAddressListArray = addressFieldModel.get(index).addressArray;
|
||||
var addressOnAddressBook = currentWallet ? currentWallet.addressBook.getDescription(addressFromAddressListArray) : null;
|
||||
if (addressOnAddressBook) {
|
||||
return FontAwesome.addressBook + " " + addressOnAddressBook;
|
||||
} else {
|
||||
return TxUtils.addressTruncate(addressFieldModel.get(index).addressArray, 8);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (receivingAddressLabel) {
|
||||
return qsTr("Address") + " #" + subaddrIndex + " (" + receivingAddressLabel + ")" + translationManager.emptyString;
|
||||
if (isout) {
|
||||
if (address) {
|
||||
return (addressBookName ? FontAwesome.addressBook + " " + addressBookName : TxUtils.addressTruncate(address, 8));
|
||||
}
|
||||
if (amount != 0) {
|
||||
return qsTr("Unknown recipient") + translationManager.emptyString;
|
||||
} else {
|
||||
return qsTr("My wallet") + translationManager.emptyString;
|
||||
}
|
||||
} else {
|
||||
return qsTr("Address") + " #" + subaddrIndex + " (" + TxUtils.addressTruncate(receivingAddress, 4) + ")" + translationManager.emptyString;
|
||||
if (receivingAddress) {
|
||||
if (subaddrIndex == 0) {
|
||||
return qsTr("Address") + " #0" + " (" + qsTr("Primary address") + ")" + translationManager.emptyString;
|
||||
} else {
|
||||
if (receivingAddressLabel) {
|
||||
return qsTr("Address") + " #" + subaddrIndex + " (" + receivingAddressLabel + ")" + translationManager.emptyString;
|
||||
} else {
|
||||
return qsTr("Address") + " #" + subaddrIndex + " (" + TxUtils.addressTruncate(receivingAddress, 4) + ")" + translationManager.emptyString;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return qsTr("Unknown address") + translationManager.emptyString;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return qsTr("Unknown address") + translationManager.emptyString;
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
state: isout ? "copyable_address" : "copyable_receiving_address"
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: {
|
||||
parent.color = MoneroComponents.Style.orange
|
||||
tooltip ? parent.tooltipPopup.open() : ""
|
||||
}
|
||||
onExited: {
|
||||
parent.color = MoneroComponents.Style.defaultFontColor
|
||||
tooltip ? parent.tooltipPopup.close() : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
MouseArea {
|
||||
state: isout ? "copyable_address" : "copyable_receiving_address"
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: parent.color = MoneroComponents.Style.orange
|
||||
onExited: parent.color = MoneroComponents.Style.defaultFontColor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -899,10 +991,12 @@ Rectangle {
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: rightColumn
|
||||
spacing: 0
|
||||
clip: true
|
||||
Layout.preferredHeight: 120
|
||||
Layout.minimumWidth: 130
|
||||
Layout.alignment: Qt.AlignTop
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
@ -1270,7 +1364,9 @@ 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') (address ? root.toClipboard(address)
|
||||
: res[i].parent.addressFromAddressListArray ? root.toClipboard(res[i].parent.addressFromAddressListArray)
|
||||
: root.toClipboard(res[i].parent.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);
|
||||
@ -1461,7 +1557,11 @@ Rectangle {
|
||||
}
|
||||
|
||||
if(root.sortSearchString.length >= 1){
|
||||
if(item.amount && item.amount.toString().startsWith(root.sortSearchString)){
|
||||
if(item.displayAmount && item.displayAmount.startsWith(root.sortSearchString)){
|
||||
txs.push(item);
|
||||
} else if(item.amountList != "" && item.amountList.toLowerCase().includes(root.sortSearchString.toLowerCase())){
|
||||
txs.push(item);
|
||||
} else if(item.addressList != "" && item.addressList.toLowerCase().includes(root.sortSearchString.toLowerCase())){
|
||||
txs.push(item);
|
||||
} else if(item.address !== "" && item.address.toLowerCase().startsWith(root.sortSearchString.toLowerCase())){
|
||||
txs.push(item);
|
||||
@ -1568,26 +1668,43 @@ Rectangle {
|
||||
var subaddrIndex = model.data(idx, TransactionHistoryModel.TransactionSubaddrIndexRole);
|
||||
var timestamp = new Date(date + " " + time).getTime() / 1000;
|
||||
var dateHuman = Utils.ago(timestamp);
|
||||
var numberOfDestinations = (destinations.match(/:/g) || []).length;
|
||||
var amountList = TxUtils.destinationsToAmount(destinations);
|
||||
|
||||
if (amount === 0) {
|
||||
// transactions to the same account have amount === 0, while the 'destinations string'
|
||||
// has the correct amount, so we try to fetch it from that instead.
|
||||
amount = Number(TxUtils.destinationsToAmount(destinations));
|
||||
if (numberOfDestinations >1) {
|
||||
var totalAmount = 0;
|
||||
for (var i = 0; i < numberOfDestinations; i++) {
|
||||
var amountFromAmountList = amountList.split(" ")[i];
|
||||
var amountAsNumber = Number(amountFromAmountList);
|
||||
totalAmount += amountAsNumber;
|
||||
}
|
||||
var displayAmount = Utils.removeTrailingZeros(totalAmount.toFixed(12)) + " XMR";
|
||||
} else {
|
||||
if (amount === 0) {
|
||||
// transactions to the same account have amount === 0, while the 'destinations string'
|
||||
// has the correct amount, so we try to fetch it from that instead.
|
||||
amount = Number(TxUtils.destinationsToAmount(destinations));
|
||||
}
|
||||
var displayAmount = Utils.removeTrailingZeros(amount.toFixed(12)) + " XMR";
|
||||
}
|
||||
var displayAmount = Utils.removeTrailingZeros(amount.toFixed(12)) + " XMR";
|
||||
|
||||
var tx_note = currentWallet.getUserNote(hash);
|
||||
var address = "";
|
||||
var addressBookName = "";
|
||||
var receivingAddress = "";
|
||||
var receivingAddressLabel = "";
|
||||
var addressList = "";
|
||||
|
||||
if (isout) {
|
||||
address = TxUtils.destinationsToAddress(destinations);
|
||||
addressBookName = currentWallet ? currentWallet.addressBook.getDescription(address) : null;
|
||||
if (numberOfDestinations >1) {
|
||||
addressList = TxUtils.destinationsToAddress(destinations);
|
||||
} else {
|
||||
receivingAddress = currentWallet ? currentWallet.address(subaddrAccount, subaddrIndex) : null;
|
||||
receivingAddressLabel = currentWallet ? appWindow.currentWallet.getSubaddressLabel(subaddrAccount, subaddrIndex) : null;
|
||||
if (isout) {
|
||||
address = TxUtils.destinationsToAddress(destinations);
|
||||
addressBookName = currentWallet ? currentWallet.addressBook.getDescription(address) : null;
|
||||
} else {
|
||||
receivingAddress = currentWallet ? currentWallet.address(subaddrAccount, subaddrIndex) : null;
|
||||
receivingAddressLabel = currentWallet ? appWindow.currentWallet.getSubaddressLabel(subaddrAccount, subaddrIndex) : null;
|
||||
}
|
||||
}
|
||||
|
||||
if (isout)
|
||||
@ -1602,11 +1719,14 @@ Rectangle {
|
||||
"isout": isout,
|
||||
"amount": amount,
|
||||
"displayAmount": displayAmount,
|
||||
"amountList": amountList,
|
||||
"hash": hash,
|
||||
"paymentId": paymentId,
|
||||
"address": address,
|
||||
"addressList": addressList,
|
||||
"addressBookName": addressBookName,
|
||||
"destinations": destinations,
|
||||
"numberOfDestinations": numberOfDestinations,
|
||||
"tx_note": tx_note,
|
||||
"dateHuman": dateHuman,
|
||||
"dateTime": date + " " + time,
|
||||
|
1
qml.qrc
1
qml.qrc
@ -283,6 +283,7 @@
|
||||
<file>images/ledgerNanoX.png</file>
|
||||
<file>images/ledgerStax.png</file>
|
||||
<file>images/trezor3.png</file>
|
||||
<file>images/trezor5.png</file>
|
||||
<file>images/trezorT.png</file>
|
||||
<file>images/trezorT@2x.png</file>
|
||||
<file>qtquickcontrols2.conf</file>
|
||||
|
@ -70,9 +70,6 @@ namespace
|
||||
|
||||
QPixmap screenshot()
|
||||
{
|
||||
#ifdef Q_OS_MAC
|
||||
return MacOSHelper::screenshot();
|
||||
#else
|
||||
std::unordered_set<QWindow *> hidden;
|
||||
const QWindowList windows = QGuiApplication::allWindows();
|
||||
for (QWindow *window : windows)
|
||||
@ -91,7 +88,6 @@ QPixmap screenshot()
|
||||
});
|
||||
|
||||
return QGuiApplication::primaryScreen()->grabWindow(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -53,21 +53,21 @@ void P2PoolManager::download() {
|
||||
QString fileName;
|
||||
QString validHash;
|
||||
#ifdef Q_OS_WIN
|
||||
url = "https://github.com/SChernykh/p2pool/releases/download/v3.10/p2pool-v3.10-windows-x64.zip";
|
||||
fileName = m_p2poolPath + "/p2pool-v3.10-windows-x64.zip";
|
||||
validHash = "2b5a37576ac6e73a6f26a0112d9a51360babef765199fbe06a6bfc513ed45581";
|
||||
url = "https://github.com/SChernykh/p2pool/releases/download/v4.1/p2pool-v4.1-windows-x64.zip";
|
||||
fileName = m_p2poolPath + "/p2pool-v4.1-windows-x64.zip";
|
||||
validHash = "a2a6327e2442282fe344d69a5e61ddb6bf66950bffd32c5a99b9cecc62d3a7d6";
|
||||
#elif defined(Q_OS_LINUX)
|
||||
url = "https://github.com/SChernykh/p2pool/releases/download/v3.10/p2pool-v3.10-linux-x64.tar.gz";
|
||||
fileName = m_p2poolPath + "/p2pool-v3.10-linux-x64.tar.gz";
|
||||
validHash = "441969c999e860231b2e48651747866754bad17292331fb22c5340c8a250168a";
|
||||
url = "https://github.com/SChernykh/p2pool/releases/download/v4.1/p2pool-v4.1-linux-x64.tar.gz";
|
||||
fileName = m_p2poolPath + "/p2pool-v4.1-linux-x64.tar.gz";
|
||||
validHash = "9d62adcb8426932ff51dae0eb02551b1b88996aa25804a470dc127bef30b4c07";
|
||||
#elif defined(Q_OS_MACOS_AARCH64)
|
||||
url = "https://github.com/SChernykh/p2pool/releases/download/v3.10/p2pool-v3.10-macos-aarch64.tar.gz";
|
||||
fileName = m_p2poolPath + "/p2pool-v3.10-macos-aarch64.tar.gz";
|
||||
validHash = "f8ff6de7b2ac38f0d3ac23e30cc8827d5a1b83c4190f4e79e8db695acc742a68";
|
||||
url = "https://github.com/SChernykh/p2pool/releases/download/v4.1/p2pool-v4.1-macos-aarch64.tar.gz";
|
||||
fileName = m_p2poolPath + "/p2pool-v4.1-macos-aarch64.tar.gz";
|
||||
validHash = "3cce06835e50395c986511019c7dabd93855de78c787d518f22e6c6572b44d2e";
|
||||
#elif defined(Q_OS_MACOS)
|
||||
url = "https://github.com/SChernykh/p2pool/releases/download/v3.10/p2pool-v3.10-macos-x64.tar.gz";
|
||||
fileName = m_p2poolPath + "/p2pool-v3.10-macos-x64.tar.gz";
|
||||
validHash = "9b20656556fe4bfe3df1df9a6f2c7c8bc9aa0dd2c4ac66ebca2c8580581ff9f6";
|
||||
url = "https://github.com/SChernykh/p2pool/releases/download/v4.1/p2pool-v4.1-macos-x64.tar.gz";
|
||||
fileName = m_p2poolPath + "/p2pool-v4.1-macos-x64.tar.gz";
|
||||
validHash = "e87dfda26388774688da8336a00df3f4befcb98c3ee4b26d496ff05179cce5e7";
|
||||
#endif
|
||||
QFile file(fileName);
|
||||
epee::net_utils::http::http_simple_client http_client;
|
||||
|
@ -38,7 +38,6 @@ class MacOSHelper
|
||||
public:
|
||||
static bool isCapsLock();
|
||||
static bool openFolderAndSelectItem(const QUrl &path);
|
||||
static QPixmap screenshot();
|
||||
static QString bundlePath();
|
||||
static void disableWindowTabbing();
|
||||
};
|
||||
|
@ -68,41 +68,6 @@ bool MacOSHelper::openFolderAndSelectItem(const QUrl &path)
|
||||
return true;
|
||||
}
|
||||
|
||||
QPixmap MacOSHelper::screenshot()
|
||||
{
|
||||
std::unordered_set<uintptr_t> appWindowIds;
|
||||
for (NSWindow *window in [NSApp windows])
|
||||
{
|
||||
appWindowIds.insert((uintptr_t)[window windowNumber]);
|
||||
}
|
||||
|
||||
CFArrayRef onScreenWindows = CGWindowListCreate(kCGWindowListOptionOnScreenOnly, kCGNullWindowID);
|
||||
const auto onScreenWindowsClenaup = sg::make_scope_guard([&onScreenWindows]() {
|
||||
CFRelease(onScreenWindows);
|
||||
});
|
||||
|
||||
CFMutableArrayRef foreignWindows = CFArrayCreateMutable(NULL, CFArrayGetCount(onScreenWindows), NULL);
|
||||
const auto foreignWindowsClenaup = sg::make_scope_guard([&foreignWindows]() {
|
||||
CFRelease(foreignWindows);
|
||||
});
|
||||
|
||||
for (CFIndex index = 0, count = CFArrayGetCount(onScreenWindows); index < count; ++index)
|
||||
{
|
||||
const uintptr_t windowId = reinterpret_cast<const uintptr_t>(CFArrayGetValueAtIndex(onScreenWindows, index));
|
||||
if (appWindowIds.find(windowId) == appWindowIds.end())
|
||||
{
|
||||
CFArrayAppendValue(foreignWindows, reinterpret_cast<const void *>(windowId));
|
||||
}
|
||||
}
|
||||
|
||||
CGImageRef image = CGWindowListCreateImageFromArray(CGRectInfinite, foreignWindows, kCGWindowListOptionAll);
|
||||
const auto imageClenaup = sg::make_scope_guard([&image]() {
|
||||
CFRelease(image);
|
||||
});
|
||||
|
||||
return QtMac::fromCGImageRef(image);
|
||||
}
|
||||
|
||||
QString MacOSHelper::bundlePath()
|
||||
{
|
||||
NSBundle *main = [NSBundle mainBundle];
|
||||
|
@ -96,7 +96,7 @@ QString xdgMime(){
|
||||
"X-GNOME-FullName=Monero-GUI\n"
|
||||
"Comment=Monero GUI\n"
|
||||
"Keywords=Monero;\n"
|
||||
"Exec=%1 %u\n"
|
||||
"Exec=\"%1\" %u\n"
|
||||
"Terminal=false\n"
|
||||
"Type=Application\n"
|
||||
"Icon=monero\n"
|
||||
|
@ -58,6 +58,7 @@ Rectangle {
|
||||
ListElement { column1: "Ledger Stax"; column2: "Ledger";}
|
||||
ListElement { column1: "Trezor Model T"; column2: "Trezor";}
|
||||
ListElement { column1: "Trezor Safe 3"; column2: "Trezor";}
|
||||
ListElement { column1: "Trezor Safe 5"; column2: "Trezor";}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
@ -169,6 +170,8 @@ Rectangle {
|
||||
return "qrc:///images/trezorT.png";
|
||||
} else if (trezorType == "Trezor Safe 3") {
|
||||
return "qrc:///images/trezor3.png";
|
||||
} else if (trezorType == "Trezor Safe 5") {
|
||||
return "qrc:///images/trezor5.png";
|
||||
}
|
||||
} else if (hardwareWalletType == "Ledger") {
|
||||
if (ledgerType == "Ledger Nano S") {
|
||||
|
@ -149,7 +149,7 @@ Rectangle {
|
||||
imageIcon: "qrc:///images/local-node-full.png"
|
||||
|
||||
onMenuClicked: {
|
||||
appWindow.persistentSettings.pruneBlockchain = false; // can be toggled on next page
|
||||
appWindow.persistentSettings.pruneBlockchain = true;
|
||||
applyWalletMode(2, 'wizardHome');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user