-
Notifications
You must be signed in to change notification settings - Fork 1
/
DA.qml
251 lines (202 loc) · 6.51 KB
/
DA.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
import QtQuick 2.3
import QtQuick.Window 2.2
//import QtQuick.Controls 1.3
//import QtQuick.Controls.Styles 1.3
//import Ubuntu.Components 1.2
import "main.js" as Scripts
import "twitch.js" as Site
Item {
id:popup
property string number: "0"
property string list:""
property string pagesource:""
property string service:""
property string extrathing:""
property string sitedata:""
clip: true
onStateChanged: if(popup.state == "Active") {Site.get_html(service);}
states: [
State {
name:"Active"
PropertyChanges {
target: popup
z: 3
}
},
State {
name:"InActive"
PropertyChanges {
target: popup
z: -2
}
}
]
anchors.centerIn: parent
Image {
id:bg
anchors.centerIn: parent
source:pagesource
anchors.fill: parent
fillMode:Image.PreserveAspectCrop
}
Rectangle {
anchors.fill:parent
radius:10
color:Qt.rgba(0.5,0.5,0.5,0.3)
border.width:1
}
Rectangle {
//y:if(bg.status == Image.Ready) {parent.height} else {0}
id:blinder
width:parent.width
height:parent.height
color:"white"
radius:10
border.color:"black"
states: [
State {
name:"loading"
PropertyChanges {
target:blinder
y:0
}
PropertyChanges {
target:links
opacity:0
}
},
State {
name:"loaded"
PropertyChanges {
target:blinder
//y:parent.height * 0.90
opacity: 1
radius:0
}
/*PropertyChanges {
target:links
opacity:1
} */
when: bg.status == Image.Ready
}
]
state:"loading"
transitions: Transition {
PropertyAnimation { target: blinder
properties:"y,radius"; duration: 500 }
}
Item {
id:links
height:parent.height
width:parent.width
opacity:0
Image {
id:servicelogo
source:"img/twitch-tv.png"
width:parent.width * 0.10
height:parent.height * 0.10
fillMode:Image.PreserveAspectFit
}
Text {
anchors.left:servicelogo.right
anchors.verticalCenter:servicelogo.verticalCenter
font.underline: true
font.pixelSize: servicelogo.height * 0.5
text:service.split("/")[3]
}
Column {
width:parent.width
anchors.top:servicelogo.bottom
anchors.left:servicelogo.right
anchors.margins:20
spacing:10
Item {
width:links.width * 0.98
height:links.height * 0.08
Rectangle {
anchors.fill:parent
color:"lightgray"
opacity:0.4
}
Flasher {
//anchors.fill:parent
id:wrflasher
}
Image {
source:"./img/message-sent.svg"
width:parent.height * 0.80
height:parent.height * 0.80
anchors.verticalCenter: parent.verticalCenter
Text {
anchors.leftMargin: 10
anchors.left:parent.right
text:qsTr("Chat")
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: parent.height * 0.60
}
}
MouseArea {
anchors.fill:parent
onPressed:wrflasher.state = "Active"
/* onClicked: {
if(page.substr(page.length-1,page.length) == "/"){extrathing =""} else {extrathing="/"}
showurl = page+extrathing+"chat"
fullWeb.state = "show"
cardPage.header.hide()
} */
onClicked:Qt.openUrlExternally(page);
onReleased:wrflasher.state = "InActive"
}
}
}
}
}
Image {
id:logo
anchors.centerIn: parent
source:"img/twitch-tv.png"
width:parent.width /3
height:parent.height /3
fillMode:Image.PreserveAspectFit
states: [
State { name:"Loading"
PropertyChanges {
target:logo
opacity:1
}
PropertyChanges {
target:links
opacity:0
}
},
State { name:"Loaded"
/* PropertyChanges {
target:logo
opacity:0
} */
/* PropertyChanges {
target:links
opacity:1
} */
when:bg.status == Image.Ready
}
]
state:"loading"
transitions: Transition {
PropertyAnimation { target: logo
properties:"opacity"; duration: 300 }
}
Text {
anchors.top:parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
text:qsTr("Plugin Under Development")
font.pixelSize: (popup.width * 0.23) - text.length
Text {
anchors.top:parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
text:qsTr("Tap to launch in external application")
font.pixelSize: (popup.width * 0.23) - text.length
}
}
}
}