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
ebc506da
Commit
ebc506da
authored
Feb 11, 2015
by
Jeffrey Wilcke
Browse files
Options
Downloads
Plain Diff
Merge pull request #302 from alexvandesande/UI
Catalog Page Behaviour
parents
d311b1b9
6221b282
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
cmd/mist/assets/qml/main.qml
+39
-15
39 additions, 15 deletions
cmd/mist/assets/qml/main.qml
cmd/mist/assets/qml/views/browser.qml
+13
-6
13 additions, 6 deletions
cmd/mist/assets/qml/views/browser.qml
cmd/mist/assets/qml/views/catalog.qml
+44
-98
44 additions, 98 deletions
cmd/mist/assets/qml/views/catalog.qml
with
96 additions
and
119 deletions
cmd/mist/assets/qml/main.qml
+
39
−
15
View file @
ebc506da
...
@@ -39,7 +39,7 @@ ApplicationWindow {
...
@@ -39,7 +39,7 @@ ApplicationWindow {
// Takes care of loading all default plugins
// Takes care of loading all default plugins
Component.onCompleted
:
{
Component.onCompleted
:
{
addPlugin
(
"
./views/catalog.qml
"
,
{
noAdd
:
true
,
close
:
false
,
section
:
"
begin
"
});
var
catalog
=
addPlugin
(
"
./views/catalog.qml
"
,
{
noAdd
:
true
,
close
:
false
,
section
:
"
begin
"
});
var
wallet
=
addPlugin
(
"
./views/wallet.qml
"
,
{
noAdd
:
true
,
close
:
false
,
section
:
"
ethereum
"
,
active
:
true
});
var
wallet
=
addPlugin
(
"
./views/wallet.qml
"
,
{
noAdd
:
true
,
close
:
false
,
section
:
"
ethereum
"
,
active
:
true
});
addPlugin
(
"
./views/miner.qml
"
,
{
noAdd
:
true
,
close
:
false
,
section
:
"
ethereum
"
,
active
:
true
});
addPlugin
(
"
./views/miner.qml
"
,
{
noAdd
:
true
,
close
:
false
,
section
:
"
ethereum
"
,
active
:
true
});
...
@@ -49,9 +49,9 @@ ApplicationWindow {
...
@@ -49,9 +49,9 @@ ApplicationWindow {
addPlugin
(
"
./views/pending_tx.qml
"
,
{
noAdd
:
true
,
close
:
false
,
section
:
"
legacy
"
});
addPlugin
(
"
./views/pending_tx.qml
"
,
{
noAdd
:
true
,
close
:
false
,
section
:
"
legacy
"
});
addPlugin
(
"
./views/info.qml
"
,
{
noAdd
:
true
,
close
:
false
,
section
:
"
legacy
"
});
addPlugin
(
"
./views/info.qml
"
,
{
noAdd
:
true
,
close
:
false
,
section
:
"
legacy
"
});
mainSplit
.
setView
(
wallet
.
view
,
wallet
.
menuItem
);
mainSplit
.
setView
(
catalog
.
view
,
catalog
.
menuItem
);
newBrowserTab
(
"
http://ethereum-dapp-
whisper-client.meteor.com/chat/amstea
m
"
);
//
newBrowserTab("http://ethereum-dapp-
catalog.meteor.co
m");
// Command setup
// Command setup
gui
.
sendCommand
(
0
)
gui
.
sendCommand
(
0
)
...
@@ -114,11 +114,34 @@ ApplicationWindow {
...
@@ -114,11 +114,34 @@ ApplicationWindow {
}
}
function
newBrowserTab
(
url
)
{
function
newBrowserTab
(
url
)
{
var
urlMatches
=
url
.
toString
().
match
(
/^
[
a-z
]
*
\:\/\/([^\/
?#
]
+
)(?:[\/
?#
]
|$
)
/i
);
var
requestedDomain
=
urlMatches
&&
urlMatches
[
1
];
var
domainAlreadyOpen
=
false
;
console
.
log
(
"
requested:
"
+
requestedDomain
)
for
(
var
i
=
0
;
i
<
mainSplit
.
views
.
length
;
i
++
)
{
if
(
mainSplit
.
views
[
i
].
view
.
url
)
{
var
matches
=
mainSplit
.
views
[
i
].
view
.
url
.
toString
().
match
(
/^
[
a-z
]
*
\:\/\/(?:
www
\.)?([^\/
?#
]
+
)(?:[\/
?#
]
|$
)
/i
);
var
existingDomain
=
matches
&&
matches
[
1
];
console
.
log
(
"
exists:
"
+
existingDomain
);
if
(
requestedDomain
==
existingDomain
)
{
domainAlreadyOpen
=
true
;
mainSplit
.
views
[
i
].
view
.
url
=
url
;
activeView
(
mainSplit
.
views
[
i
].
view
,
mainSplit
.
views
[
i
].
menuItem
);
}
}
}
if
(
!
domainAlreadyOpen
)
{
var
window
=
addPlugin
(
"
./views/browser.qml
"
,
{
noAdd
:
true
,
close
:
true
,
section
:
"
apps
"
,
active
:
true
});
var
window
=
addPlugin
(
"
./views/browser.qml
"
,
{
noAdd
:
true
,
close
:
true
,
section
:
"
apps
"
,
active
:
true
});
window
.
view
.
url
=
url
;
window
.
view
.
url
=
url
;
window
.
menuItem
.
title
=
"
Mist
"
;
window
.
menuItem
.
title
=
"
Mist
"
;
activeView
(
window
.
view
,
window
.
menuItem
);
activeView
(
window
.
view
,
window
.
menuItem
);
}
}
}
...
@@ -332,8 +355,9 @@ ApplicationWindow {
...
@@ -332,8 +355,9 @@ ApplicationWindow {
id
:
mainSplit
id
:
mainSplit
anchors.fill
:
parent
anchors.fill
:
parent
resizing
:
false
//
resizing: false
// this is NOT where we remove that damning resizing handle..
handleDelegate
:
Item
{
handleDelegate
:
Item
{
//This handle is a way to remove the line between the split views
Rectangle
{
Rectangle
{
anchors.fill
:
parent
anchors.fill
:
parent
}
}
...
@@ -497,7 +521,7 @@ ApplicationWindow {
...
@@ -497,7 +521,7 @@ ApplicationWindow {
anchors.fill
:
parent
anchors.fill
:
parent
border.width
:
0
border.width
:
0
radius
:
5
radius
:
5
color
:
"
#F
FFFFFFF
"
color
:
"
#F
AFAFA
"
}
}
Rectangle
{
Rectangle
{
anchors
{
anchors
{
...
@@ -506,7 +530,7 @@ ApplicationWindow {
...
@@ -506,7 +530,7 @@ ApplicationWindow {
right
:
r
.
right
right
:
r
.
right
}
}
width
:
10
width
:
10
color
:
"
#F
FFFFFFF
"
color
:
"
#F
AFAFA
"
border.width
:
0
border.width
:
0
Rectangle
{
Rectangle
{
...
@@ -517,7 +541,7 @@ ApplicationWindow {
...
@@ -517,7 +541,7 @@ ApplicationWindow {
top
:
parent
.
top
top
:
parent
.
top
}
}
height
:
1
height
:
1
color
:
"
#F
FFFFF
"
color
:
"
#F
AFAFA
"
}
}
Rectangle
{
Rectangle
{
...
@@ -528,7 +552,7 @@ ApplicationWindow {
...
@@ -528,7 +552,7 @@ ApplicationWindow {
bottom
:
parent
.
bottom
bottom
:
parent
.
bottom
}
}
height
:
1
height
:
1
color
:
"
#F
FFFFF
"
color
:
"
#F
AFAFA
"
}
}
}
}
}
}
...
@@ -800,7 +824,7 @@ ApplicationWindow {
...
@@ -800,7 +824,7 @@ ApplicationWindow {
anchors.top
:
parent
.
top
anchors.top
:
parent
.
top
color
:
"
#00000000
"
color
:
"
#00000000
"
Rectangle
{
/*
Rectangle {
id: urlPane
id: urlPane
height: 40
height: 40
color: "#00000000"
color: "#00000000"
...
@@ -847,7 +871,7 @@ ApplicationWindow {
...
@@ -847,7 +871,7 @@ ApplicationWindow {
z: -1
z: -1
height: 1
height: 1
color: "#CCCCCC"
color: "#CCCCCC"
}
}
*/
Rectangle
{
Rectangle
{
id
:
mainView
id
:
mainView
...
@@ -855,7 +879,7 @@ ApplicationWindow {
...
@@ -855,7 +879,7 @@ ApplicationWindow {
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
anchors.top
:
divider
.
bot
to
m
anchors.top
:
parent
.
to
p
function
createView
(
component
)
{
function
createView
(
component
)
{
var
view
=
component
.
createObject
(
mainView
)
var
view
=
component
.
createObject
(
mainView
)
...
...
This diff is collapsed.
Click to expand it.
cmd/mist/assets/qml/views/browser.qml
+
13
−
6
View file @
ebc506da
...
@@ -352,6 +352,13 @@ Rectangle {
...
@@ -352,6 +352,13 @@ Rectangle {
webview
.
anchors
.
topMargin
=
-
74
;
webview
.
anchors
.
topMargin
=
-
74
;
webview
.
runJavaScript
(
"
document.querySelector('body').classList.add('ethereum-dapp-url-bar-style-transparent')
"
)
webview
.
runJavaScript
(
"
document.querySelector('body').classList.add('ethereum-dapp-url-bar-style-transparent')
"
)
}
else
{
navBarBackground
.
visible
=
true
;
back
.
visible
=
true
;
appInfoPane
.
anchors
.
leftMargin
=
0
;
appInfoPaneShadow
.
anchors
.
leftMargin
=
0
;
webview
.
anchors
.
topMargin
=
0
;
};
};
});
});
...
...
This diff is collapsed.
Click to expand it.
cmd/mist/assets/qml/views/catalog.qml
+
44
−
98
View file @
ebc506da
...
@@ -12,7 +12,7 @@ Rectangle {
...
@@ -12,7 +12,7 @@ Rectangle {
anchors.fill
:
parent
anchors.fill
:
parent
color
:
"
#00000000
"
color
:
"
#00000000
"
property
var
title
:
""
property
var
title
:
"
Catalog
"
property
var
iconSource
:
""
property
var
iconSource
:
""
property
var
menuItem
property
var
menuItem
property
var
hideUrl
:
true
property
var
hideUrl
:
true
...
@@ -75,110 +75,56 @@ Rectangle {
...
@@ -75,110 +75,56 @@ Rectangle {
anchors.fill
:
parent
anchors.fill
:
parent
state
:
"
inspectorShown
"
state
:
"
inspectorShown
"
RowLayout
{
WebEngineView
{
id
:
navBar
objectName
:
"
webView
"
height
:
184
id
:
webview
z
:
20
anchors
{
left
:
parent
.
left
right
:
parent
.
right
}
Rectangle
{
id
:
appInfoPane
height
:
28
color
:
"
#efefef
"
radius
:
6
z
:
25
MouseArea
{
anchors.fill
:
parent
anchors.fill
:
parent
z
:
10
hoverEnabled
:
true
onEntered
:
{
uriNav
.
visible
=
true
appTitle
.
visible
=
false
appDomain
.
visible
=
false
}
}
anchors
{
left
:
parent
.
left
right
:
parent
.
right
leftMargin
:
10
rightMargin
:
10
top
:
parent
.
verticalCenter
topMargin
:
23
}
TextField
{
property
var
protocol
:
"
http://
"
id
:
uriNav
//property var domain: "localhost:3000"
anchors
{
property
var
domain
:
"
ethereum-dapp-catalog.meteor.com
"
left
:
parent
.
left
url
:
protocol
+
domain
right
:
parent
.
right
leftMargin
:
16
//navigationRequest: WebEngineView.IgnoreRequest
top
:
parent
.
verticalCenter
// onLoadingChanged: {
topMargin
:
-
10
// if (loadRequest.status == WebEngineView.LoadSucceededStatus) {
}
// webview.runJavaScript(eth.readFile("bignumber.min.js"));
// webview.runJavaScript(eth.readFile("ethereum.js/dist/ethereum.js"));
horizontalAlignment
:
Text
.
AlignHCenter
// }
// }
style
:
TextFieldStyle
{
textColor
:
"
#928484
"
//onNavigationRequested: {
background
:
Rectangle
{
// detect URL scheme prefix, most likely an external link
border.width
:
0
//var schemaRE = /^\w+:/;
color
:
"
transparent
"
//if (schemaRE.test(request.url)) {
}
// request.action = WebView.AcceptRequest;
}
//} else {
text
:
"
Type the address of a new Dapp
"
;
//request.action = WebView.IgnoreRequest;
y
:
parent
.
height
/
2
-
this
.
height
/
2
// delegate request.url here
z
:
30
//}
activeFocusOnPress
:
true
//}
Keys.onReturnPressed
:
{
newBrowserTab
(
this
.
text
);
this
.
text
=
"
Type the address of a new Dapp
"
;
}
}
onJavaScriptConsoleMessage
:
{
console
.
log
(
sourceID
+
"
:
"
+
lineNumber
+
"
:
"
+
JSON
.
stringify
(
message
));
}
}
Rectangle
{
onNavigationRequested
:
{
id
:
appInfoPaneShadow
var
cleanTitle
=
request
.
url
.
toString
()
width
:
10
var
matches
=
cleanTitle
.
match
(
/^
[
a-z
]
*
\:\/\/([^\/
?#
]
+
)(?:[\/
?#
]
|$
)
/i
);
height
:
30
var
requestedDomain
=
matches
&&
matches
[
1
];
color
:
"
#BDB6B6
"
radius
:
6
z
:
15
anchors
{
console
.
debug
(
"
NavigationRequested:
"
+
request
.
url
+
"
navigationType=
"
+
request
.
navigationType
)
left
:
parent
.
left
right
:
parent
.
right
leftMargin
:
10
rightMargin
:
10
top
:
parent
.
verticalCenter
topMargin
:
23
}
if
(
request
.
navigationType
==
0
){
if
(
requestedDomain
===
this
.
domain
){
request
.
action
=
WebEngineView
.
AcceptRequest
;
}
else
{
request
.
action
=
WebEngineView
.
IgnoreRequest
;
newBrowserTab
(
request
.
url
);
}
}
}
}
WebEngineView
{
objectName
:
"
webView
"
id
:
webview
anchors.fill
:
parent
onLoadingChanged
:
{
if
(
loadRequest
.
status
==
WebEngineView
.
LoadSucceededStatus
)
{
webview
.
runJavaScript
(
eth
.
readFile
(
"
bignumber.min.js
"
));
webview
.
runJavaScript
(
eth
.
readFile
(
"
ethereum.js/dist/ethereum.js
"
));
}
}
onJavaScriptConsoleMessage
:
{
console
.
log
(
sourceID
+
"
:
"
+
lineNumber
+
"
:
"
+
JSON
.
stringify
(
message
));
}
}
}
}
...
...
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