aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-25 16:41:57 +0800
committerobscuren <geffobscura@gmail.com>2014-07-25 16:41:57 +0800
commit97004f7eb22ab30ba1acc5dd3ee2f17b5466d41a (patch)
tree16635b2056a40cd9ab4607bc6c76e8ebe6f58bde /ethereal
parent82a84dca807c8966079253977329ef0800d20557 (diff)
downloaddexon-97004f7eb22ab30ba1acc5dd3ee2f17b5466d41a.tar.gz
dexon-97004f7eb22ab30ba1acc5dd3ee2f17b5466d41a.tar.zst
dexon-97004f7eb22ab30ba1acc5dd3ee2f17b5466d41a.zip
wip export
Diffstat (limited to 'ethereal')
-rw-r--r--ethereal/assets/qml/wallet.qml34
-rw-r--r--ethereal/gui.go3
2 files changed, 35 insertions, 2 deletions
diff --git a/ethereal/assets/qml/wallet.qml b/ethereal/assets/qml/wallet.qml
index eef49824f..aadc90e3b 100644
--- a/ethereal/assets/qml/wallet.qml
+++ b/ethereal/assets/qml/wallet.qml
@@ -26,6 +26,22 @@ ApplicationWindow {
shortcut: "Ctrl+o"
onTriggered: openAppDialog.open()
}
+
+ MenuSeparator {}
+
+ MenuItem {
+ text: "Import key"
+ shortcut: "Ctrl+i"
+ onTriggered: importDialog.open()
+ }
+
+ MenuItem {
+ text: "Export keys"
+ shortcut: "Ctrl+e"
+ onTriggered: exportDialog.open()
+ }
+
+ //MenuSeparator {}
}
Menu {
@@ -375,9 +391,7 @@ ApplicationWindow {
//ui.open(openAppDialog.fileUrl.toString())
//ui.openHtml(Qt.resolvedUrl(ui.assetPath("test.html")))
var path = openAppDialog.fileUrl.toString()
- console.log(path)
var ext = path.split('.').pop()
- console.log(ext)
if(ext == "html" || ext == "htm") {
ui.openHtml(path)
}else if(ext == "qml"){
@@ -386,6 +400,22 @@ ApplicationWindow {
}
}
+ FileDialog {
+ id: exportDialog
+ title: "Export keys"
+ onAccepted: {
+ }
+ }
+
+ FileDialog {
+ id: importDialog
+ title: "Import key"
+ onAccepted: {
+ var path = this.fileUrl.toString()
+ ui.importKey(path)
+ }
+ }
+
statusBar: StatusBar {
height: 30
RowLayout {
diff --git a/ethereal/gui.go b/ethereal/gui.go
index df01cddda..832200176 100644
--- a/ethereal/gui.go
+++ b/ethereal/gui.go
@@ -155,6 +155,9 @@ func (gui *Gui) showWallet(context *qml.Context) (*qml.Window, error) {
return win, nil
}
+func (gui *Gui) ImportKey(filePath string) {
+}
+
func (gui *Gui) showKeyImport(context *qml.Context) (*qml.Window, error) {
context.SetVar("lib", gui)
component, err := gui.engine.LoadFile(gui.uiLib.AssetPath("qml/first_run.qml"))