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
d518423b
Commit
d518423b
authored
Aug 13, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated DNS Lookup
parent
1fa792ea
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
94 additions
and
27 deletions
+94
-27
transaction.qml
ethereal/assets/qml/views/transaction.qml
+10
-7
wallet.qml
ethereal/assets/qml/wallet.qml
+76
-16
webapp.qml
ethereal/assets/qml/webapp.qml
+6
-2
gui.go
ethereal/gui.go
+2
-2
No files found.
ethereal/assets/qml/views/transaction.qml
View file @
d518423b
...
...
@@ -18,13 +18,8 @@ Rectangle {
Column
{
id
:
mainContractColumn
anchors.fill
:
parent
function
contractFormReady
(){
if
(
codeView
.
text
.
length
>
0
&&
txValue
.
text
.
length
>
0
&&
txGas
.
text
.
length
>
0
&&
txGasPrice
.
length
>
0
)
{
txButton
.
state
=
"READY"
}
else
{
txButton
.
state
=
"NOTREADY"
}
}
states
:
[
State
{
name
:
"ERROR"
...
...
@@ -208,4 +203,12 @@ Rectangle {
}
}
}
function
contractFormReady
(){
if
(
codeView
.
text
.
length
>
0
&&
txValue
.
text
.
length
>
0
&&
txGas
.
text
.
length
>
0
&&
txGasPrice
.
length
>
0
)
{
txButton
.
state
=
"READY"
}
else
{
txButton
.
state
=
"NOTREADY"
}
}
}
ethereal/assets/qml/wallet.qml
View file @
d518423b
...
...
@@ -19,11 +19,11 @@ ApplicationWindow {
// Takes care of loading all default plugins
Component.onCompleted
:
{
var
historyView
=
addPlugin
(
"./views/history.qml"
)
var
newTxView
=
addPlugin
(
"./views/transaction.qml"
)
var
chainView
=
addPlugin
(
"./views/chain.qml"
)
var
infoView
=
addPlugin
(
"./views/info.qml"
)
var
pendingTxView
=
addPlugin
(
"./views/pending_tx.qml"
)
var
historyView
=
addPlugin
(
"./views/history.qml"
,
{
title
:
"History"
}
)
var
newTxView
=
addPlugin
(
"./views/transaction.qml"
,
{
title
:
"New Transaction"
}
)
var
chainView
=
addPlugin
(
"./views/chain.qml"
,
{
title
:
"Block chain"
}
)
var
infoView
=
addPlugin
(
"./views/info.qml"
,
{
title
:
"Info"
}
)
var
pendingTxView
=
addPlugin
(
"./views/pending_tx.qml"
,
{
title
:
"Pending"
,
canClose
:
true
}
)
// Call the ready handler
gui
.
done
()
...
...
@@ -38,7 +38,7 @@ ApplicationWindow {
return
}
return
mainSplit
.
addComponent
(
component
,
{
objectName
:
objectName
}
)
return
mainSplit
.
addComponent
(
component
,
options
)
}
MenuBar
{
...
...
@@ -111,7 +111,7 @@ ApplicationWindow {
text
:
"Run JS file"
onTriggered
:
{
generalFileDialog
.
callback
=
function
(
path
)
{
lib
.
evalJavascriptFile
(
path
)
eth
.
evalJavascriptFile
(
path
)
}
generalFileDialog
.
open
()
}
...
...
@@ -169,8 +169,6 @@ ApplicationWindow {
RowLayout
{
Label
{
anchors.left
:
importAppButton
.
right
anchors.leftMargin
:
5
id
:
walletValueLabel
font.pixelSize
:
10
...
...
@@ -250,7 +248,7 @@ ApplicationWindow {
return
;
}
menu
.
createMenuItem
(
view
.
iconFile
,
view
);
menu
.
createMenuItem
(
view
.
iconFile
,
view
,
options
);
mainSplit
.
views
.
push
(
view
);
return
view
...
...
@@ -261,8 +259,8 @@ ApplicationWindow {
********************/
Rectangle
{
id
:
menu
Layout.minimumWidth
:
80
Layout.maximumWidth
:
80
Layout.minimumWidth
:
1
80
Layout.maximumWidth
:
1
80
anchors.top
:
parent
.
top
color
:
"#252525"
...
...
@@ -280,11 +278,73 @@ ApplicationWindow {
}
}
/*
Component {
id: menuItemTemplate
Rectangle {
property var view;
property var source;
property alias title: title.text
height: 25
id: tab
anchors {
left: parent.left
right: parent.right
}
Label {
id: title
y: parent.height / 2 - this.height / 2
x: 5
font.pixelSize: 10
}
MouseArea {
anchors.fill: parent
onClicked: {
mainSplit.setView(view)
}
}
Image {
id: closeButton
y: parent.height / 2 - this.height / 2
visible: false
source: "../close.png"
anchors {
right: parent.right
rightMargin: 5
}
MouseArea {
anchors.fill: parent
onClicked: {
console.log("should close")
}
}
}
}
}
*/
function
createMenuItem
(
icon
,
view
,
options
)
{
if
(
options
===
undefined
)
{
options
=
{};
}
function
createMenuItem
(
icon
,
view
)
{
var
comp
=
menuItemTemplate
.
createObject
(
menuColumn
)
comp
.
view
=
view
comp
.
source
=
icon
/*
comp.title = options.title
if(options.canClose) {
//comp.closeButton.visible = options.canClose
}
*/
}
ColumnLayout
{
...
...
@@ -459,7 +519,7 @@ ApplicationWindow {
anchors.leftMargin
:
5
text
:
"Import"
onClicked
:
{
lib
.
importTx
(
txImportField
.
text
)
eth
.
importTx
(
txImportField
.
text
)
txImportField
.
visible
=
false
}
}
...
...
@@ -483,7 +543,7 @@ ApplicationWindow {
anchors.leftMargin
:
10
placeholderText
:
"address:port"
onAccepted
:
{
ui
.
connectToPeer
(
addrField
.
text
)
eth
.
connectToPeer
(
addrField
.
text
)
addPeerWin
.
visible
=
false
}
}
...
...
@@ -493,7 +553,7 @@ ApplicationWindow {
anchors.leftMargin
:
5
text
:
"Add"
onClicked
:
{
ui
.
connectToPeer
(
addrField
.
text
)
eth
.
connectToPeer
(
addrField
.
text
)
addPeerWin
.
visible
=
false
}
}
...
...
ethereal/assets/qml/webapp.qml
View file @
d518423b
...
...
@@ -31,9 +31,13 @@ ApplicationWindow {
//text: webview.url
Keys.onReturnPressed
:
{
var
uri
=
this
.
text
;
if
(
!
/.*
\:\/\/
.*/
.
test
(
uri
))
{
uri
=
"http://"
+
uri
;
}
var
reg
=
/
(
^https
?\:\/\/(?:
www
\.)?)([
a-zA-Z0-9_
\-]
*
\.
eth
)(
.*
)
/
var
uri
=
this
.
text
;
if
(
reg
.
test
(
uri
))
{
this
.
text
.
replace
(
reg
,
function
(
match
,
pre
,
domain
,
path
)
{
uri
=
pre
;
...
...
@@ -45,7 +49,7 @@ ApplicationWindow {
}
if
(
ip
.
length
!=
0
)
{
uri
+=
ip
.
join
(
"."
)
;
uri
+=
lookup
;
}
else
{
uri
+=
domain
;
}
...
...
ethereal/gui.go
View file @
d518423b
...
...
@@ -387,12 +387,12 @@ func (gui *Gui) update() {
if
bytes
.
Compare
(
tx
.
Sender
(),
gui
.
address
())
==
0
{
object
.
SubAmount
(
tx
.
Value
)
gui
.
win
.
Root
(
)
.
Call
(
"addTx"
,
"post"
,
ethpub
.
NewPTx
(
tx
),
"send"
)
gui
.
getObjectByName
(
"transactionView"
)
.
Call
(
"addTx"
,
"post"
,
ethpub
.
NewPTx
(
tx
),
"send"
)
gui
.
txDb
.
Put
(
tx
.
Hash
(),
tx
.
RlpEncode
())
}
else
if
bytes
.
Compare
(
tx
.
Recipient
,
gui
.
address
())
==
0
{
object
.
AddAmount
(
tx
.
Value
)
gui
.
win
.
Root
(
)
.
Call
(
"addTx"
,
"post"
,
ethpub
.
NewPTx
(
tx
),
"recv"
)
gui
.
getObjectByName
(
"transactionView"
)
.
Call
(
"addTx"
,
"post"
,
ethpub
.
NewPTx
(
tx
),
"recv"
)
gui
.
txDb
.
Put
(
tx
.
Hash
(),
tx
.
RlpEncode
())
}
...
...
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