Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
c4b8c115
Commit
c4b8c115
authored
Feb 16, 2015
by
Alexandre Van de Sande
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
side icons
parent
666ef482
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
103 additions
and
19 deletions
+103
-19
browser.png
cmd/mist/assets/browser.png
+0
-0
browser@2x.png
cmd/mist/assets/browser@2x.png
+0
-0
main.qml
cmd/mist/assets/qml/main.qml
+56
-11
browser.qml
cmd/mist/assets/qml/views/browser.qml
+47
-8
No files found.
cmd/mist/assets/browser.png
View replaced file @
666ef482
View file @
c4b8c115
5.2 KB
|
W:
|
H:
756 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
cmd/mist/assets/browser@2x.png
0 → 100644
View file @
c4b8c115
1.57 KB
cmd/mist/assets/qml/main.qml
View file @
c4b8c115
...
@@ -40,10 +40,14 @@ ApplicationWindow {
...
@@ -40,10 +40,14 @@ ApplicationWindow {
// Takes care of loading all default plugins
// Takes care of loading all default plugins
Component.onCompleted
:
{
Component.onCompleted
:
{
catalog
=
addPlugin
(
"./views/catalog.qml"
,
{
noAdd
:
true
,
close
:
false
,
section
:
"begin"
});
catalog
=
addPlugin
(
"./views/catalog.qml"
,
{
noAdd
:
true
,
close
:
false
,
section
:
"begin"
,
active
:
true
});
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"
});
addPlugin
(
"./views/miner.qml"
,
{
noAdd
:
true
,
close
:
false
,
section
:
"ethereum"
,
active
:
true
});
var
walletWeb
=
addPlugin
(
"./views/browser.qml"
,
{
noAdd
:
true
,
close
:
false
,
section
:
"ethereum"
,
active
:
false
});
walletWeb
.
view
.
url
=
"http://ethereum-dapp-wallet.meteor.com/"
;
walletWeb
.
menuItem
.
title
=
"Wallet"
;
addPlugin
(
"./views/miner.qml"
,
{
noAdd
:
true
,
close
:
false
,
section
:
"ethereum"
,
active
:
false
});
addPlugin
(
"./views/transaction.qml"
,
{
noAdd
:
true
,
close
:
false
,
section
:
"legacy"
});
addPlugin
(
"./views/transaction.qml"
,
{
noAdd
:
true
,
close
:
false
,
section
:
"legacy"
});
addPlugin
(
"./views/whisper.qml"
,
{
noAdd
:
true
,
close
:
false
,
section
:
"legacy"
});
addPlugin
(
"./views/whisper.qml"
,
{
noAdd
:
true
,
close
:
false
,
section
:
"legacy"
});
addPlugin
(
"./views/chain.qml"
,
{
noAdd
:
true
,
close
:
false
,
section
:
"legacy"
});
addPlugin
(
"./views/chain.qml"
,
{
noAdd
:
true
,
close
:
false
,
section
:
"legacy"
});
...
@@ -443,10 +447,14 @@ ApplicationWindow {
...
@@ -443,10 +447,14 @@ ApplicationWindow {
property
var
view
;
property
var
view
;
property
var
path
;
property
var
path
;
property
var
closable
;
property
var
closable
;
property
var
badgeContent
;
property
alias
title
:
label
.
text
property
alias
title
:
label
.
text
property
alias
icon
:
icon
.
source
property
alias
icon
:
icon
.
source
property
alias
secondaryTitle
:
secondary
.
text
property
alias
secondaryTitle
:
secondary
.
text
property
alias
badgeNumber
:
badgeNumberLabel
.
text
property
alias
badgeIcon
:
badgeIconLabel
.
text
function
setSelection
(
on
)
{
function
setSelection
(
on
)
{
sel
.
visible
=
on
sel
.
visible
=
on
...
@@ -539,9 +547,6 @@ ApplicationWindow {
...
@@ -539,9 +547,6 @@ ApplicationWindow {
if
(
parent
.
closable
==
true
)
{
if
(
parent
.
closable
==
true
)
{
closeIcon
.
visible
=
sel
.
visible
closeIcon
.
visible
=
sel
.
visible
}
}
/*if(view.hasOwnProperty("iconSource")) {
icon.source = view.iconSource;
}*/
}
}
onExited
:
{
onExited
:
{
closeIcon
.
visible
=
false
closeIcon
.
visible
=
false
...
@@ -550,8 +555,8 @@ ApplicationWindow {
...
@@ -550,8 +555,8 @@ ApplicationWindow {
Image
{
Image
{
id
:
icon
id
:
icon
height
:
2
4
height
:
2
8
width
:
2
4
width
:
2
8
anchors
{
anchors
{
left
:
parent
.
left
left
:
parent
.
left
verticalCenter
:
parent
.
verticalCenter
verticalCenter
:
parent
.
verticalCenter
...
@@ -581,7 +586,7 @@ ApplicationWindow {
...
@@ -581,7 +586,7 @@ ApplicationWindow {
verticalCenter
:
parent
.
verticalCenter
verticalCenter
:
parent
.
verticalCenter
leftMargin
:
6
leftMargin
:
6
rightMargin
:
8
rightMargin
:
8
// verticalCenterOffset: -10
verticalCenterOffset
:
(
secondaryTitle
==
""
)
?
0
:
-
10
;
}
}
x
:
250
x
:
250
color
:
"#665F5F"
color
:
"#665F5F"
...
@@ -607,7 +612,7 @@ ApplicationWindow {
...
@@ -607,7 +612,7 @@ ApplicationWindow {
visible
:
false
visible
:
false
width
:
10
width
:
10
height
:
10
height
:
10
color
:
"#F
FFFFF
"
color
:
"#F
AFAFA
"
anchors
{
anchors
{
fill
:
icon
fill
:
icon
}
}
...
@@ -626,9 +631,49 @@ ApplicationWindow {
...
@@ -626,9 +631,49 @@ ApplicationWindow {
centerIn
:
parent
centerIn
:
parent
}
}
color
:
"#665F5F"
color
:
"#665F5F"
font.pixelSize
:
18
font.pixelSize
:
20
text
:
"
\
ue082"
text
:
"
\
ue082"
}
}
}
Rectangle
{
id
:
badge
visible
:
(
badgeContent
==
"icon"
||
badgeContent
==
"number"
)?
true
:
false
width
:
32
color
:
"#05000000"
anchors
{
right
:
parent
.
right
;
top
:
parent
.
top
;
bottom
:
parent
.
bottom
;
rightMargin
:
4
;
}
Text
{
id
:
badgeIconLabel
visible
:
(
badgeContent
==
"icon"
)
?
true
:
false
;
font.family
:
simpleLineIcons
.
name
anchors
{
centerIn
:
parent
}
horizontalAlignment
:
Text
.
AlignCenter
color
:
"#AAA0A0"
font.pixelSize
:
20
text
:
badgeIcon
}
Text
{
id
:
badgeNumberLabel
visible
:
(
badgeContent
==
"number"
)
?
true
:
false
;
anchors
{
centerIn
:
parent
}
horizontalAlignment
:
Text
.
AlignCenter
font.family
:
sourceSansPro
.
name
font.weight
:
Font
.
Light
color
:
"#AAA0A0"
font.pixelSize
:
18
text
:
badgeNumber
}
}
}
...
...
cmd/mist/assets/qml/views/browser.qml
View file @
c4b8c115
...
@@ -351,13 +351,50 @@ Rectangle {
...
@@ -351,13 +351,50 @@ Rectangle {
z
:
10
z
:
10
Timer
{
Timer
{
interval
:
5
00
;
running
:
true
;
repeat
:
true
interval
:
20
00
;
running
:
true
;
repeat
:
true
onTriggered
:
{
onTriggered
:
{
webview
.
runJavaScript
(
"try{document.querySelector('meta[name=badge]').getAttribute('content')}catch(e){}"
,
function
(
badge
)
{
webview
.
runJavaScript
(
"try{document.querySelector('meta[name=ethereum-dapp-info]').getAttribute('content')}catch(e){}"
,
function
(
extraInfo
)
{
if
(
badge
)
{
if
(
extraInfo
)
{
menuItem
.
secondaryTitle
=
badge
;
menuItem
.
secondaryTitle
=
extraInfo
;
}
}
});
});
webview
.
runJavaScript
(
"try{document.querySelector('meta[name=ethereum-dapp-badge]').getAttribute('content')}catch(e){}"
,
function
(
badge
)
{
if
(
badge
)
{
if
(
Number
(
badge
)
>
0
&&
Number
(
badge
)
<
999
)
{
menuItem
.
badgeNumber
=
Number
(
badge
);
menuItem
.
badgeContent
=
"number"
}
else
if
(
badge
==
"warning"
)
{
menuItem
.
badgeIcon
=
"
\
ue00e"
menuItem
.
badgeContent
=
"icon"
}
else
if
(
badge
==
"ghost"
)
{
menuItem
.
badgeIcon
=
"
\
ue01a"
menuItem
.
badgeContent
=
"icon"
}
else
if
(
badge
==
"question"
)
{
menuItem
.
badgeIcon
=
"
\
ue05d"
menuItem
.
badgeContent
=
"icon"
}
else
if
(
badge
==
"info"
)
{
menuItem
.
badgeIcon
=
"
\
ue08b"
menuItem
.
badgeContent
=
"icon"
}
else
if
(
badge
==
"check"
)
{
menuItem
.
badgeIcon
=
"
\
ue080"
menuItem
.
badgeContent
=
"icon"
}
else
if
(
badge
==
"gear"
)
{
menuItem
.
badgeIcon
=
"
\
ue09a"
menuItem
.
badgeContent
=
"icon"
}
console
.
log
(
menuItem
.
badgeContent
);
}
else
{
menuItem
.
badgeContent
=
""
}
});
}
}
}
}
...
@@ -367,10 +404,12 @@ Rectangle {
...
@@ -367,10 +404,12 @@ Rectangle {
menuItem
.
title
=
pageTitle
;
menuItem
.
title
=
pageTitle
;
});
});
webView
.
runJavaScript
(
"
document.querySelector(
\"
link[rel='icon']
\"
).getAttribute(
\"
href
\"
)
"
,
function
(
sideIcon
){
webView
.
runJavaScript
(
"
try{document.querySelector(
\"
link[rel='icon']
\"
).getAttribute(
\"
href
\"
)}catch(e){}
"
,
function
(
sideIcon
){
if
(
sideIcon
){
if
(
sideIcon
){
menuItem
.
icon
=
"http://localhost:3000/whisper-icon@2x.png"
menuItem
.
icon
=
webview
.
url
+
sideIcon
;
console
.
log
(
"icon: "
+
webview
.
url
+
sideIcon
);
};
};
console
.
log
(
"no icon!"
);
});
});
webView
.
runJavaScript
(
"try{document.querySelector(
\"
meta[name='ethereum-dapp-url-bar-style']
\"
).getAttribute(
\"
content
\"
)}catch(e){}"
,
function
(
topBarStyle
){
webView
.
runJavaScript
(
"try{document.querySelector(
\"
meta[name='ethereum-dapp-url-bar-style']
\"
).getAttribute(
\"
content
\"
)}catch(e){}"
,
function
(
topBarStyle
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment