good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
b89d9f6e
Commit
b89d9f6e
authored
Sep 16, 2014
by
Jeffrey Wilcke
Browse files
Options
Downloads
Patches
Plain Diff
Added DApp url bar (TBD) & changed behaviour for the menu selection
parent
d22db772
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ethereal/assets/ext/http.js
+13
-0
13 additions, 0 deletions
ethereal/assets/ext/http.js
ethereal/assets/qml/wallet.qml
+858
-744
858 additions, 744 deletions
ethereal/assets/qml/wallet.qml
with
871 additions
and
744 deletions
ethereal/assets/ext/http.js
0 → 100644
+
13
−
0
View file @
b89d9f6e
// this function is included locally, but you can also include separately via a header definition
function
request
(
url
,
callback
)
{
var
xhr
=
new
XMLHttpRequest
();
xhr
.
onreadystatechange
=
(
function
(
req
)
{
return
function
()
{
if
(
req
.
readyState
===
4
)
{
callback
(
req
);
}
}
})(
xhr
);
xhr
.
open
(
'
GET
'
,
url
,
true
);
xhr
.
send
(
''
);
}
This diff is collapsed.
Click to expand it.
ethereal/assets/qml/wallet.qml
+
858
−
744
View file @
b89d9f6e
...
...
@@ -7,6 +7,7 @@ import QtQuick.Controls.Styles 1.1
import
Ethereum
1.0
import
"
../ext/filter.js
"
as
Eth
import
"
../ext/http.js
"
as
Http
ApplicationWindow
{
id
:
root
...
...
@@ -54,8 +55,33 @@ ApplicationWindow {
gui
.
done
();
}
function
addViews
(
view
,
path
,
options
)
{
var
views
=
mainSplit
.
addComponent
(
view
,
options
)
views
.
menuItem
.
path
=
path
mainSplit
.
views
.
push
(
views
);
if
(
!
options
.
noAdd
)
{
gui
.
addPlugin
(
path
)
}
return
views
}
function
addPlugin
(
path
,
options
)
{
try
{
if
(
typeof
(
path
)
===
"
string
"
&&
/^https
?
/
.
test
(
path
))
{
console
.
log
(
'
load http
'
)
Http
.
request
(
path
,
function
(
o
)
{
if
(
o
.
status
===
200
)
{
var
view
=
Qt
.
createQmlObject
(
o
.
responseText
,
mainView
,
path
)
addViews
(
view
,
path
,
options
)
}
})
return
}
var
component
=
Qt
.
createComponent
(
path
);
if
(
component
.
status
!=
Component
.
Ready
)
{
if
(
component
.
status
==
Component
.
Error
)
{
...
...
@@ -65,14 +91,8 @@ ApplicationWindow {
return
}
var
views
=
mainSplit
.
addComponent
(
component
,
options
)
views
.
menuItem
.
path
=
path
mainSplit
.
views
.
push
(
views
);
if
(
!
options
.
noAdd
)
{
gui
.
addPlugin
(
path
)
}
var
view
=
mainView
.
createView
(
component
,
options
)
var
views
=
addViews
(
view
,
path
,
options
)
return
views
.
view
}
catch
(
e
)
{
...
...
@@ -304,18 +324,16 @@ ApplicationWindow {
function
setView
(
view
,
menu
)
{
for
(
var
i
=
0
;
i
<
views
.
length
;
i
++
)
{
views
[
i
].
view
.
visible
=
false
views
[
i
].
menuItem
.
border
.
color
=
"
#00000000
"
views
[
i
].
menuItem
.
color
=
"
#00000000
"
views
[
i
].
menuItem
.
setSelection
(
false
)
}
view
.
visible
=
true
menu
.
border
.
color
=
"
#CCCCCC
"
menu
.
color
=
"
#FFFFFFFF
"
//menu.border.color = "#CCCCCC"
//menu.color = "#FFFFFFFF"
menu
.
setSelection
(
true
)
}
function
addComponent
(
component
,
options
)
{
var
view
=
mainView
.
createView
(
component
,
options
)
function
addComponent
(
view
,
options
)
{
view
.
visible
=
false
view
.
anchors
.
fill
=
mainView
...
...
@@ -361,12 +379,12 @@ ApplicationWindow {
property
alias
title
:
label
.
text
property
alias
icon
:
icon
.
source
property
alias
secondaryTitle
:
secondary
.
text
function
setSelection
(
on
)
{
sel
.
visible
=
on
}
width
:
1
80
width
:
1
76
height
:
28
border.color
:
"
#00000000
"
border.width
:
1
radius
:
5
color
:
"
#00000000
"
anchors
{
...
...
@@ -374,6 +392,50 @@ ApplicationWindow {
leftMargin
:
4
}
Rectangle
{
id
:
sel
visible
:
false
anchors.fill
:
parent
color
:
"
#00000000
"
Rectangle
{
id
:
r
anchors.fill
:
parent
border.color
:
"
#CCCCCC
"
border.width
:
1
radius
:
5
color
:
"
#FFFFFFFF
"
}
Rectangle
{
anchors
{
top
:
r
.
top
bottom
:
r
.
bottom
right
:
r
.
right
}
width
:
10
color
:
"
#FFFFFFFF
"
Rectangle
{
anchors
{
left
:
parent
.
left
right
:
parent
.
right
top
:
parent
.
top
}
height
:
1
color
:
"
#CCCCCC
"
}
Rectangle
{
anchors
{
left
:
parent
.
left
right
:
parent
.
right
bottom
:
parent
.
bottom
}
height
:
1
color
:
"
#CCCCCC
"
}
}
}
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
...
...
@@ -544,13 +606,65 @@ ApplicationWindow {
* Main view
********************/
Rectangle
{
id
:
mainView
color
:
"
#00000000
"
anchors.right
:
parent
.
right
anchors.left
:
menu
.
right
anchors.bottom
:
parent
.
bottom
anchors.top
:
parent
.
top
color
:
"
#00000000
"
Rectangle
{
id
:
urlPane
height
:
40
color
:
"
#00000000
"
anchors
{
left
:
parent
.
left
right
:
parent
.
right
leftMargin
:
5
rightMargin
:
5
top
:
parent
.
top
topMargin
:
5
}
TextField
{
id
:
url
objectName
:
"
url
"
placeholderText
:
"
DApp URL
"
anchors
{
left
:
parent
.
left
right
:
parent
.
right
top
:
parent
.
top
topMargin
:
5
rightMargin
:
5
leftMargin
:
5
}
Keys.onReturnPressed
:
{
addPlugin
(
this
.
text
,
{
canClose
:
true
,
section
:
"
apps
"
})
}
}
}
// Border
Rectangle
{
id
:
divider
anchors
{
left
:
parent
.
left
right
:
parent
.
right
top
:
urlPane
.
bottom
}
z
:
-
1
height
:
1
color
:
"
#CCCCCC
"
}
Rectangle
{
id
:
mainView
anchors.right
:
parent
.
right
anchors.left
:
parent
.
left
anchors.bottom
:
parent
.
bottom
anchors.top
:
divider
.
bottom
function
createView
(
component
)
{
var
view
=
component
.
createObject
(
mainView
)
...
...
@@ -558,8 +672,7 @@ ApplicationWindow {
return
view
;
}
}
}
}
...
...
@@ -734,6 +847,7 @@ ApplicationWindow {
anchors.left
:
parent
.
left
anchors.leftMargin
:
10
placeholderText
:
"
address:port
"
text
:
"
54.76.56.74:30303
"
onAccepted
:
{
eth
.
connectToPeer
(
addrField
.
text
)
addPeerWin
.
visible
=
false
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment