Edit readme and cleanup code a bit

pull/27/head
larteyoh 2 years ago
parent 47f56e5894
commit 857990b948

@ -520,7 +520,7 @@ endif()
if(Qt5_FOUND)
if(NEROSHOP_BUILD_GUI AND NEROSHOP_USE_QT)
# Some Linux distros require Qt::Widgets due to the lack of a native platform file dialog implementation
if(NEROSHOP_USE_QT_WIDGETS)#if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if(NEROSHOP_USE_QT_WIDGETS OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
message(STATUS "Using Qt5::Widgets")
target_compile_definitions(${neroshop_executable} PRIVATE NEROSHOP_USE_QT_WIDGETS)
find_package(Qt5 COMPONENTS Widgets)

@ -63,10 +63,20 @@ Coming soon
### Compiling neroshop from source
**0. Install prerequisites**
Debian/Ubuntu
```bash
# prerequisites
sudo apt install build-essential cmake git
```
Arch
```bash
sudo pacman -Sy --needed base-devel cmake git
```
Fedora
```bash
sudo dnf install gcc gcc-c++ make cmake git
```
**1. Clone neroshop (and its submodules)**
```bash
@ -88,8 +98,6 @@ sudo apt update && sudo apt install pkg-config libssl-dev libzmq3-dev libsodium-
```
Arch (needs to be updated)
```bash
# prerequisites
sudo pacman -Sy --needed base-devel cmake git
# neroshop
sudo pacman -Sy --needed curl openssl libuv
# monero-cpp (monero)
@ -97,8 +105,6 @@ sudo pacman -Syu --needed boost openssl zeromq libpgm libsodium libunwind xz rea
```
Fedora (needs to be updated)
```bash
# prerequisites
sudo dnf install gcc gcc-c++ make cmake git
# neroshop
sudo dnf install libcurl-devel openssl-devel libuv-devel libuv-static
# monero-cpp (monero)
@ -138,7 +144,7 @@ sudo make install
cd ../
```
For Fedora users, you may need to add this line under the "find_package(Boost .." in case of an "undefined reference to icu_*" error:
In some cases, you may need to add this line under the "find_package(Boost .." in "external/monero-cpp/external/monero-project/CMakeLists.txt" in case of an "undefined reference to icu_*" error:
`set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -licuio -licui18n -licuuc -licudata")`
<!-- git submodule update --init --force --> <!-- <= call this before building monero -->

@ -120,6 +120,7 @@ ApplicationWindow {
icon.color: "#001677"////hovered ? "#001677" : "#ffffff"//(!checked && hovered) ? "#001677" : "#ffffff"
//icon.width: parent.width//footer.height
//icon.height: parent.height//32//footer.height
hoverEnabled: true
anchors.verticalCenter: parent.verticalCenter
background: Rectangle {
color: "transparent"//(parent.checked) ? "#001677" : "transparent"
@ -152,6 +153,7 @@ ApplicationWindow {
radius: 20
foregroundColor: "#564978"
//textObject.visible: true
hoverEnabled: true
anchors.verticalCenter: parent.verticalCenter//anchors.top: parent.top; anchors.topMargin: (parent.height - this.height) / 2 // center vertically on footer (height)
value: 0.5 // placeholder value
@ -179,6 +181,7 @@ ApplicationWindow {
//textObject.visible: true
//textObject.text: "wallet sync: " + (this.value * 100).toString() + "%"
//textObject.color: "#ffffff"
hoverEnabled: true
anchors.verticalCenter: parent.verticalCenter//anchors.top: parent.top; anchors.topMargin: (parent.height - this.height) / 2
////value: Wallet.isGenerated() ? Wallet.getSyncPercentage() : 0.0 // this does not work (fails to update value so we use Timer instead)
Timer {

@ -47,6 +47,7 @@ RowLayout {
ButtonGroup.group: navBarButtonGroup // attaches a button to a button group
display: AbstractButton.IconOnly
//checkable: true
hoverEnabled: true
icon.source: "file:///" + neroshopResourcesDir + "/wallet.png"
icon.color: (!checked && this.hovered) ? NeroshopComponents.Style.moneroOrangeColor : "#ffffff"
@ -74,6 +75,7 @@ RowLayout {
text: qsTr("Sellers' Hub")
ButtonGroup.group: navBarButtonGroup
display: AbstractButton.IconOnly//AbstractButton.TextBesideIcon
hoverEnabled: true
icon.source: "file:///" + neroshopResourcesDir + "/shop.png"
icon.color: (!checked && this.hovered) ? reservedColor : "#ffffff"
@ -100,6 +102,7 @@ RowLayout {
text: (messagesButton.dummy_count > 0) ? qsTr("Messages : %1").arg(dummy_count.toString()) : qsTr("Messages")
ButtonGroup.group: navBarButtonGroup
display: AbstractButton.IconOnly//AbstractButton.TextBesideIcon
hoverEnabled: true
property int dummy_count: 0
icon.source: "file:///" + neroshopResourcesDir + "/mail.png"
@ -127,6 +130,7 @@ RowLayout {
text: qsTr("Orders")
ButtonGroup.group: navBarButtonGroup
display: AbstractButton.IconOnly//AbstractButton.TextBesideIcon
hoverEnabled: true
icon.source: "file:///" + neroshopResourcesDir + "/order.png"
icon.color: (!checked && this.hovered) ? reservedColor : "#ffffff"
@ -153,6 +157,7 @@ RowLayout {
text: qsTr("Account Settings")//qsTr("User")
ButtonGroup.group: navBarButtonGroup
display: AbstractButton.IconOnly//AbstractButton.TextBesideIcon
hoverEnabled: true
icon.source: "file:///" + neroshopResourcesDir + "/user.png"
icon.color: (!checked && this.hovered) ? reservedColor : "#ffffff"
@ -184,6 +189,7 @@ RowLayout {
Layout.preferredHeight : 40
Layout.preferredWidth : 100
property string reservedColor: "#323232"//(useDefaultButtonColor) ? defaultButtonColor : "#323232"
hoverEnabled: true
background: Rectangle {
//width: cartButton.width; height: cartButton.height//width: 100; height: 40

@ -122,66 +122,6 @@ Page {
currentFolder: walletPathField.text
folder: (isWindows) ? StandardPaths.writableLocation(StandardPaths.DocumentsLocation) + "/neroshop" : StandardPaths.writableLocation(StandardPaths.HomeLocation) + "/neroshop"
}
///////////////////////////
/* Button { // must be used in conjunction with a TabBar according to: https://doc.qt.io/qt-5/qml-qtquick-controls2-tabbutton.html
text: qsTr("Register")
width: implicitWidth
onClicked: mainPageStack.currentIndex = 0
background: Rectangle {
color: buttonsBar.buttonColor//"#00aebf"
}
}
Button {
id: login_button//auth_walletfile_button
text: qsTr("Login with Wallet file")
width: implicitWidth
onClicked: mainPageStack.currentIndex = 1
contentItem: Text {
//font.family: "Consolas";
//font.pointSize: 10;
//font.bold: true
text: login_button.text
color: "#ffffff" // white text
}
background: Rectangle {
color: buttonsBar.buttonColor//NeroshopComponents.Style.moneroOrangeColor//"#ff6600"//parent.down ? "#bbbbbb" :
//(parent.hovered ? "#d6d6d6" : "#f6f6f6")
radius: 0
//border.color: login_button.hovered ? "#ffffff" : this.color//"#ffffff"//control.down ? "#17a81a" : "#21be2b"
}
}
Button {
text: qsTr("Login with Seed (Mnemonic)")
width: implicitWidth
onClicked: mainPageStack.currentIndex = 2
background: Rectangle {
color: buttonsBar.buttonColor//NeroshopComponents.Style.moneroGrayColor
}
}
Button {
text: qsTr("Login with Keys")
width: implicitWidth
onClicked: mainPageStack.currentIndex = 3
background: Rectangle {
color: buttonsBar.buttonColor//"#402ef7"
}
}
Button {
text: qsTr("Login with Hardware wallet")
width: implicitWidth
//onClicked: mainPageStack.currentIndex = 4
background: Rectangle {
color: buttonsBar.buttonColor//"red"
}
} */
///////////////////////////
StackLayout { // Perfect for a stack of items where only one item is visible at a time//ColumnLayout { // From top to bottom
id: mainPageStack // auth_menu inside home menu
@ -207,6 +147,7 @@ Page {
anchors.rightMargin: 20
implicitWidth: 60; height: implicitWidth
text: qsTr(FontAwesome.angleRight)
hoverEnabled: true
background: Rectangle {
color: "#121212"//"#6b5b95"//
@ -273,6 +214,7 @@ Page {
//display: AbstractButton.IconOnly//AbstractButton.TextBesideIcon//AbstractButton.TextOnly//AbstractButton.TextUnderIcon
//icon.source: "file:///" + neroshopResourcesDir + "/ellipsis.png"//"/upload.png"
//icon.color: "#ffffff"
hoverEnabled: true
onClicked: walletFileDialog.open()
background: Rectangle {
@ -331,6 +273,7 @@ Page {
icon.source: "file:///" + neroshopResourcesDir + "/file.png" // keys (key.png), seed (sprout.png), file, hardware
//icon.color: "#ffffff"
display: AbstractButton.IconOnly//hovered ? AbstractButton.TextBesideIcon : AbstractButton.IconOnly//AbstractButton.TextUnderIcon
hoverEnabled: true
background: Rectangle {
color: (parent.checked) ? "#39304f" : "#6b5b95"
//border.color:
@ -356,6 +299,7 @@ Page {
icon.source: "file:///" + neroshopResourcesDir + "/sprout.png" // keys (key.png), seed (sprout.png), file, hardware
//icon.color: "#ffffff"
display: AbstractButton.IconOnly//hovered ? AbstractButton.TextBesideIcon : AbstractButton.IconOnly//AbstractButton.TextUnderIcon
hoverEnabled: true
background: Rectangle {
color: (parent.checked) ? "#39304f" : "#6b5b95"
//border.color:
@ -373,6 +317,7 @@ Page {
icon.source: "file:///" + neroshopResourcesDir + "/key.png" // keys (key.png), seed (sprout.png), file, hardware
//icon.color: "#ffffff"
display: AbstractButton.IconOnly//hovered ? AbstractButton.TextBesideIcon : AbstractButton.IconOnly//AbstractButton.TextUnderIcon
hoverEnabled: true
background: Rectangle {
color: (parent.checked) ? "#39304f" : "#6b5b95"
//border.color:
@ -390,6 +335,7 @@ Page {
icon.source: "file:///" + neroshopResourcesDir + "/usb.png" // keys (key.png), seed (sprout.png), file, hardware
//icon.color: "#ffffff"
display: AbstractButton.IconOnly//hovered ? AbstractButton.TextBesideIcon : AbstractButton.IconOnly//AbstractButton.TextUnderIcon
hoverEnabled: true
background: Rectangle {
color: (parent.checked) ? "#39304f" : "#6b5b95"
//border.color:
@ -528,6 +474,7 @@ Page {
anchors.leftMargin: 20
implicitWidth: 60; height: implicitWidth
text: qsTr(FontAwesome.angleLeft)
hoverEnabled: true
visible: (walletSeedRepeater.model == null)
background: Rectangle {
@ -559,6 +506,7 @@ Page {
anchors.rightMargin: 20
implicitWidth: 60; height: implicitWidth
text: qsTr(FontAwesome.angleRight)
hoverEnabled: true
visible: (walletSeedRepeater.model != null)
background: Rectangle {
@ -660,6 +608,7 @@ Page {
implicitWidth: 24; implicitHeight: 24
checkable: true
checked: true//false
hoverEnabled: true
// checked = show, unchecked = hide. Passwords are hidden by default
background: Rectangle {
color: "transparent"
@ -753,7 +702,8 @@ Page {
text: qsTr("Change")
//display: AbstractButton.IconOnly//AbstractButton.TextBesideIcon//AbstractButton.TextOnly
//icon.source: "file:///" + neroshopResourcesDir + "/change.png"
//icon.color: "#ffffff"
//icon.color: "#ffffff"
hoverEnabled: true
onClicked: walletFolderDialog.open()
background: Rectangle {
@ -781,7 +731,8 @@ Page {
Layout.topMargin: 10//20
Layout.preferredWidth: (walletPathChangeButton.width * 3) - parent.spacing//150
Layout.preferredHeight: 50
text: qsTr("Generate")//("Generate Keys")
text: qsTr("Generate")//("Generate Keys")
hoverEnabled: true
onClicked: generateWalletKeys()
contentItem: Text {
@ -914,6 +865,7 @@ Page {
icon.source: "file:///" + neroshopResourcesDir + "/copy.png"
icon.color: "#ffffff"
display: AbstractButton.IconOnly//AbstractButton.TextBesideIcon//AbstractButton.TextOnly//AbstractButton.TextUnderIcon
hoverEnabled: true
onClicked: Wallet.copyMnemonicToClipboard()////copyToClipboard()
background: Rectangle {
@ -939,6 +891,7 @@ Page {
anchors.leftMargin: 20
implicitWidth: 60; height: implicitWidth
text: qsTr(FontAwesome.angleLeft)
hoverEnabled: true
background: Rectangle {
color: "#121212"//"#6b5b95"//
@ -994,6 +947,7 @@ Page {
Layout.preferredHeight: 50
Layout.topMargin: 15
text: qsTr("Register")
hoverEnabled: true
onClicked: registerWallet()
background: Rectangle {
color: "#6b5b95"

Loading…
Cancel
Save