add list of tokens and icons
|
@ -0,0 +1,151 @@
|
||||||
|
import QtQuick 2.3
|
||||||
|
import QtQuick.Controls 2.3
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import Qt.labs.platform 1.1
|
||||||
|
import "../../../../imports"
|
||||||
|
import "../../../../shared"
|
||||||
|
import "../tokens/"
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: element
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: modalDialogTitle
|
||||||
|
text: "Add/Remove Tokens"
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.left: parent.left
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 17
|
||||||
|
anchors.leftMargin: 16
|
||||||
|
anchors.topMargin: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: closeModalImg
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 16
|
||||||
|
anchors.topMargin: 16
|
||||||
|
source: "../../../img/close.svg"
|
||||||
|
MouseArea {
|
||||||
|
id: closeModalMouseArea
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: {
|
||||||
|
popup.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Separator {
|
||||||
|
id: headerSeparator
|
||||||
|
anchors.top: modalDialogTitle.bottom
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: modalBody
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 32
|
||||||
|
anchors.top: headerSeparator.bottom
|
||||||
|
anchors.topMargin: Theme.padding
|
||||||
|
anchors.bottom: footerSeparator.top
|
||||||
|
anchors.bottomMargin: 16
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 32
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
|
anchors.fill: parent
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
|
||||||
|
ScrollBar.vertical.policy: ScrollBar.AlwaysOn
|
||||||
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||||
|
|
||||||
|
ListView {
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 4
|
||||||
|
id: tokenListView
|
||||||
|
model: Tokens {}
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
delegate: Component {
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: element
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 0
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 0
|
||||||
|
height: 40
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: assetInfoImage
|
||||||
|
width: 36
|
||||||
|
height: 36
|
||||||
|
source: "../../../img/tokens/SNT@3x.png"
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 0
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
id: assetFullTokenName
|
||||||
|
text: name
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.bottomMargin: 0
|
||||||
|
anchors.left: assetInfoImage.right
|
||||||
|
anchors.leftMargin: Theme.smallPadding
|
||||||
|
color: Theme.darkGrey
|
||||||
|
font.pixelSize: 15
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
id: assetSymbol
|
||||||
|
text: symbol
|
||||||
|
anchors.left: assetInfoImage.right
|
||||||
|
anchors.leftMargin: Theme.smallPadding
|
||||||
|
anchors.top: assetInfoImage.top
|
||||||
|
anchors.topMargin: 0
|
||||||
|
color: Theme.black
|
||||||
|
font.pixelSize: 15
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// delegate: Message {
|
||||||
|
// userName: model.userName
|
||||||
|
// message: model.message
|
||||||
|
// identicon: model.identicon
|
||||||
|
// isCurrentUser: model.isCurrentUser
|
||||||
|
// repeatMessageInfo: model.repeatMessageInfo
|
||||||
|
// timestamp: model.timestamp
|
||||||
|
// sticker: model.sticker
|
||||||
|
// contentType: model.contentType
|
||||||
|
// }
|
||||||
|
highlightFollowsCurrentItem: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Separator {
|
||||||
|
id: footerSeparator
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.bottomMargin: 76
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledButton {
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: Theme.padding
|
||||||
|
label: "Apply to all accounts"
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.bottomMargin: Theme.padding
|
||||||
|
onClicked: {
|
||||||
|
console.log(txtCurrency.textField.text)
|
||||||
|
assetsModel.setDefaultCurrency(txtCurrency.textField.text)
|
||||||
|
popup.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*##^##
|
||||||
|
Designer {
|
||||||
|
D{i:0;autoSize:true;height:480;width:640}
|
||||||
|
}
|
||||||
|
##^##*/
|
|
@ -1,3 +1,4 @@
|
||||||
SendModalContent 1.0 SendModalContent.qml
|
SendModalContent 1.0 SendModalContent.qml
|
||||||
SettingsModalContent 1.0 SettingsModalContent.qml
|
SettingsModalContent 1.0 SettingsModalContent.qml
|
||||||
|
TokenSettingsModalContent 1.0 TokenSettingsModalContent.qml
|
||||||
AddAccount 1.0 AddAccount.qml
|
AddAccount 1.0 AddAccount.qml
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
import QtQuick 2.3
|
||||||
|
import QtQuick.Controls 2.3
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import Qt.labs.platform 1.1
|
||||||
|
import "../../../imports"
|
||||||
|
import "../../../shared"
|
||||||
|
import "./Components"
|
||||||
|
|
||||||
|
Item {
|
||||||
|
function open() {
|
||||||
|
popup.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
function close() {
|
||||||
|
popup.close()
|
||||||
|
}
|
||||||
|
|
||||||
|
Popup {
|
||||||
|
id: popup
|
||||||
|
modal: true
|
||||||
|
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
|
||||||
|
Overlay.modal: Rectangle {
|
||||||
|
color: "#60000000"
|
||||||
|
}
|
||||||
|
parent: Overlay.overlay
|
||||||
|
x: Math.round((parent.width - width) / 2)
|
||||||
|
y: Math.round((parent.height - height) / 2)
|
||||||
|
width: 480
|
||||||
|
height: 510
|
||||||
|
background: Rectangle {
|
||||||
|
color: Theme.white
|
||||||
|
radius: Theme.radius
|
||||||
|
}
|
||||||
|
padding: 0
|
||||||
|
contentItem: TokenSettingsModalContent {
|
||||||
|
id: settingsModalContent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*##^##
|
||||||
|
Designer {
|
||||||
|
D{i:0;autoSize:true;height:480;width:640}
|
||||||
|
}
|
||||||
|
##^##*/
|
|
@ -73,6 +73,10 @@ Item {
|
||||||
id: settingsModal
|
id: settingsModal
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TokenSettingsModal{
|
||||||
|
id: tokenSettingsModal
|
||||||
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
property int btnMargin: 8
|
property int btnMargin: 8
|
||||||
property int btnOuterMargin: 32
|
property int btnOuterMargin: 32
|
||||||
|
@ -179,7 +183,7 @@ Item {
|
||||||
text: qsTr("Add/Remove Tokens")
|
text: qsTr("Add/Remove Tokens")
|
||||||
icon.source: "../../img/add_remove_token.svg"
|
icon.source: "../../img/add_remove_token.svg"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
console.log("TODO: Add/Remove Tokens")
|
tokenSettingsModal.open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QQC2.Action {
|
QQC2.Action {
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Tokens 1.0 Tokens.qml
|
After Width: | Height: | Size: 870 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 407 B |
After Width: | Height: | Size: 780 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 987 B |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 998 B |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 893 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 666 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 1021 B |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 865 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 8.5 KiB |
After Width: | Height: | Size: 728 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 602 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 679 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 852 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 2.2 KiB |