Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into cipi
Browse files Browse the repository at this point in the history
  • Loading branch information
cipig committed Sep 28, 2022
2 parents f4e532a + d0f82e8 commit 9ae96a9
Show file tree
Hide file tree
Showing 19 changed files with 402 additions and 360 deletions.
70 changes: 70 additions & 0 deletions assets/config/0.5.6-coins.json
Original file line number Diff line number Diff line change
Expand Up @@ -1758,6 +1758,30 @@
"currently_enabled": false,
"wallet_only": true
},
"CHTA": {
"coin": "CHTA",
"name": "Cheetahcoin",
"type": "UTXO",
"coingecko_id": "test-coin",
"coinpaprika_id": "chta-cheetahcoin",
"nomics_id": "CHTA",
"electrum": [
{
"url": "electrum.shorelinecrypto.com:10007"
},
{
"url": "electrum1.mooo.com:10007"
},
{
"url": "electrum2.mooo.com:10007"
}
],
"explorer_url": [
"http://chtaexplorer.mooo.com:3002/"
],
"active": false,
"currently_enabled": false
},
"CLC": {
"coin": "CLC",
"name": "Collider Coin",
Expand Down Expand Up @@ -3826,6 +3850,29 @@
"active": false,
"currently_enabled": false
},
"LNC": {
"coin": "LNC",
"name": "LightningCash",
"coinpaprika_id": "lnc-lightningcash",
"coingecko_id": "lightningcash",
"nomics_id": "LNC3",
"electrum": [
{
"url": "74.208.95.26:50001"
},
{
"url": "74.56.11.23:50001"
}
],
"explorer_url": [
"https://explorer.lightningcash-coin.com/"
],
"explorer_tx_url": "tx/",
"explorer_address_url": "address/",
"type": "UTXO",
"active": false,
"currently_enabled": false
},
"LOOM-ERC20": {
"coin": "LOOM-ERC20",
"name": "Loom Network",
Expand Down Expand Up @@ -5224,6 +5271,29 @@
"active": false,
"currently_enabled": false
},
"AVN": {
"coin": "AVN",
"name": "Avian",
"coinpaprika_id": "avn-avian",
"coingecko_id": "avian-network",
"nomics_id": "AVN3",
"electrum": [
{
"url": "electrum-us.avn.network:50001",
"protocol": "TCP"
},
{
"url": "electrum-eu.avn.network:50001",
"protocol": "TCP"
}
],
"explorer_url": [
"https://explorer.avn.network/"
],
"type": "UTXO",
"active": false,
"currently_enabled": false
},
"AWC": {
"active": false,
"coin": "AWC",
Expand Down
3 changes: 3 additions & 0 deletions atomic_defi_design/Dex/Constants/Style.qml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ QtObject {
"AUR": "#0A6C5E",
"AVA": "#5B567F",
"AVAX": "#E84142",
"AVN": "#33E0CE",
"AXS": "#0055D5",
"BAL": "#4D4D4D",
"BNB": "#F9D987",
Expand Down Expand Up @@ -324,6 +325,7 @@ QtObject {
"CRYPTO": "#F58736",
"LABS": "#C1F6E1",
"LCC": "#068210",
"LNC": "#C3A635",
"MESH": "#0098DA",
"MGW": "#854F2F",
"MONA": "#DEC799",
Expand Down Expand Up @@ -384,6 +386,7 @@ QtObject {
"CEL": "#4055A6",
"CELR": "#595959",
"CENNZ": "#2E87F1",
"CHTA": "#C3A634",
"COMP": "#00DBA3",
"CRO": "#243565",
"CVC": "#3AB03E",
Expand Down
28 changes: 13 additions & 15 deletions atomic_defi_design/Dex/Wallet/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,18 @@ Item
{
id: root
property alias send_modal: send_modal
readonly property int layout_margin: 20
readonly property string headerTitleColor: Style.colorText2
readonly property string headerTitleFont: Style.textSizeMid1
readonly property string headerTextColor: Dex.CurrentTheme.foregroundColor
readonly property string headerTextFont: Style.textSize
readonly property string headerSmallTitleFont: Style.textSizeSmall4
readonly property string headerSmallFont: Style.textSizeSmall2
readonly property string addressURL: General.getAddressExplorerURL(api_wallet_page.ticker, current_ticker_infos.address)

function loadingPercentage(remaining) {

readonly property int layout_margin: 20
readonly property string headerTitleColor: Style.colorText2
readonly property string headerTitleFont: Style.textSizeMid1
readonly property string headerTextColor: Dex.CurrentTheme.foregroundColor
readonly property string headerTextFont: Style.textSize
readonly property string headerSmallTitleFont: Style.textSizeSmall4
readonly property string headerSmallFont: Style.textSizeSmall2
readonly property string addressURL: General.getAddressExplorerURL(api_wallet_page.ticker, current_ticker_infos.address)

function loadingPercentage(remaining)
{
return General.formatPercent((100 * (1 - parseFloat(remaining)/parseFloat(current_ticker_infos.current_block))).toFixed(3), false)
}

Expand Down Expand Up @@ -937,7 +939,6 @@ Item
{
width: parent.width
height: parent.height
model: transactions_mdl.proxy_mdl
}

ColumnLayout
Expand Down Expand Up @@ -994,10 +995,7 @@ Item
cursorShape: Qt.PointingHandCursor
anchors.fill: parent
hoverEnabled: true
onClicked: {
console.log(addressURL)
Qt.openUrlExternally(addressURL)
}
onClicked: Qt.openUrlExternally(addressURL)
}
}

Expand Down
26 changes: 16 additions & 10 deletions atomic_defi_design/Dex/Wallet/Sidebar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import "../Components"
import "../Constants" as Constants
import App 1.0
import Dex.Themes 1.0 as Dex
import Dex.Components 1.0 as Dex

// Coins bar at left side
Item
Expand Down Expand Up @@ -59,7 +60,7 @@ Item
Layout.preferredHeight: 38

textField.placeholderText: qsTr("Search")
forceFocus: true
//forceFocus: true
searchModel: portfolio_coins
}

Expand All @@ -71,14 +72,21 @@ Item
Layout.fillHeight: true
Layout.alignment: Qt.AlignHCenter
color: 'transparent'
content: DexListView {
content: Dex.ListView
{
id: list
height: list_bg.height
model: portfolio_coins
topMargin: 5
bottomMargin: 5
scrollbar_visible: false
DexRectangle {

reuseItems: true

delegate: SidebarItemDelegate { }

Dex.Rectangle
{
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width + 4
Expand All @@ -94,23 +102,21 @@ Item
}
}

DexRectangle {
Dex.Rectangle
{
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width + 4
height: 30
radius: 8
opacity: .5
visible: list.position > 0 ? true : false
Qaterial.Icon {
Qaterial.Icon
{
anchors.centerIn: parent
color: DexTheme.foregroundColor
color: Dex.CurrentTheme.foregroundColor
icon: Qaterial.Icons.arrowUpCircleOutline
}
}

reuseItems: true

delegate: SidebarItemDelegate { }
}
}

Expand Down
18 changes: 6 additions & 12 deletions atomic_defi_design/Dex/Wallet/SidebarItemDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import "../Components"
import "../Constants" as Dex
import App 1.0

GradientRectangle {
GradientRectangle
{
width: list_bg.width - list_bg.border.width*2 - 6
height: 44
radius: Dex.Style.rectangleCornerRadius + 4
Expand All @@ -24,23 +25,16 @@ GradientRectangle {
hoverEnabled: true

acceptedButtons: Qt.LeftButton | Qt.RightButton
onClicked: {
if(!can_change_ticker) return

onClicked:
{
if (mouse.button === Qt.RightButton) context_menu.popup()
else api_wallet_page.ticker = ticker
}
onPressAndHold: {
if(!can_change_ticker) return

if (mouse.source === Qt.MouseEventNotSynthesized) context_menu.popup()
}
onPressAndHold: if (mouse.source === Qt.MouseEventNotSynthesized) context_menu.popup()
}

// Right click menu
CoinMenu {
id: context_menu
}
CoinMenu { id: context_menu }

readonly property double side_margin: 16

Expand Down
36 changes: 21 additions & 15 deletions atomic_defi_design/Dex/Wallet/Transactions.qml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import QtQuick.Controls 2.15
import "../Components"
import "../Constants"
import Dex.Themes 1.0 as Dex
import Dex.Components 1.0 as Dex

DefaultListView
Dex.ListView
{
id: list

Expand All @@ -18,14 +19,10 @@ DefaultListView
property real _feeColumnWidth: 225
property real _dateColumnWidth: 170

ModalLoader
{
id: tx_details_modal
sourceComponent: TransactionDetailsModal {}
}
model: transactions_mdl.proxy_mdl

// Row
delegate: DexRectangle
delegate: Dex.Rectangle
{
id: rectangle
width: list.width
Expand All @@ -35,7 +32,7 @@ DefaultListView
colorAnimation: false
color: mouse_area.containsMouse ? Dex.CurrentTheme.buttonColorHovered : 'transparent'

DexMouseArea
Dex.MouseArea
{
id: mouse_area
anchors.fill: parent
Expand All @@ -47,14 +44,17 @@ DefaultListView
}
}

RowLayout {
RowLayout
{
id: tx_row
anchors.fill: parent
anchors.margins: 15

RowLayout {
RowLayout
{
spacing: 3
Layout.preferredWidth: _categoryColumnWidth

Circle
{
id: note_tag
Expand All @@ -70,7 +70,7 @@ DefaultListView
}

// Description
DexLabel
Dex.Text
{
id: description
horizontalAlignment: Qt.AlignLeft
Expand All @@ -80,7 +80,7 @@ DefaultListView
}

// Crypto
DexLabel
Dex.Text
{
id: crypto_amount
Layout.preferredWidth: _cryptoColumnWidth
Expand All @@ -98,7 +98,7 @@ DefaultListView
}

// Fiat
DexLabel
Dex.Text
{
Layout.preferredWidth: _fiatColumnWidth
horizontalAlignment: Text.AlignRight
Expand All @@ -109,7 +109,7 @@ DefaultListView
}

// Fee
DexLabel
Dex.Text
{
Layout.preferredWidth: _feeColumnWidth
horizontalAlignment: Text.AlignRight
Expand All @@ -120,7 +120,7 @@ DefaultListView
}

// Date
DexLabel
Dex.Text
{
Layout.preferredWidth: _dateColumnWidth
horizontalAlignment: Text.AlignRight
Expand All @@ -130,4 +130,10 @@ DefaultListView
}
}
}

ModalLoader
{
id: tx_details_modal
sourceComponent: TransactionDetailsModal {}
}
}
Binary file added atomic_defi_design/assets/images/coins/avn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added atomic_defi_design/assets/images/coins/chta.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added atomic_defi_design/assets/images/coins/lnc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 9ae96a9

Please sign in to comment.