-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.qml
75 lines (63 loc) · 1.62 KB
/
main.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import QtQuick 2.12
import QtQuick.Controls 2.5
import QtQuick.Controls.Universal 2.3
import "rpc.js" as Rpc
ApplicationWindow {
id: mainWin
visible: true
width: 800
height: 600
title: qsTr("Beta")
background: BtcbImgBg{}
property int margin: 0
property alias light: lightCb.checked
Universal.theme: light ? Universal.Light : Universal.Dark
Universal.foreground : light ? "cyan" : "gold"
Universal.accent: Universal.foreground
property string wallet
Logo{
id: logo
locked: 0 == mainView.currentIndex
}
SwipeView {
id: mainView
anchors.fill: parent
// anchors.margins: margin
padding: margin
currentIndex: 0
// interactive: false
Login {
id: login
padding: margin
onLoginSuccess: {
mainView.setCurrentIndex(1);
mainWin.wallet = wallet;
Rpc.recvPendingAll(wallet);
}
}
AccountPage {
id: accountPage
wallet: mainWin.wallet
onSend: {
sendPage.account = account;
sendPage.wallet = wallet;
mainView.currentIndex = 2;
}
}
Send {
id: sendPage
padding: margin
wallet: mainWin.wallet
onBack: {
mainView.currentIndex = 1;
}
}
}
CheckBox {
id: lightCb
anchors.top: parent.top
anchors.right: parent.right
text: checked ? qsTr("Light") : qsTr("Dark")
visible: false
}
}