basic element, but not pretty and not functioning

This commit is contained in:
howard-stearns 2018-02-23 13:56:56 -08:00
parent 1aaae94cc1
commit 84f9bff330
2 changed files with 61 additions and 6 deletions

View file

@ -76,6 +76,7 @@ Rectangle {
} else {
console.log("ERROR in Wallet.qml: Unknown wallet status: " + walletStatus);
}
console.log("FIXME wallet status:", walletStatus, "activeView:", root.activeView);
}
onLoginStatusResult: {
@ -176,10 +177,6 @@ Rectangle {
//
// TITLE BAR END
//
WalletChoice {
visible: (root.activeView === "preexisiting") || (root.activeView === "conflicting");
activeView: root.activeView;
}
WalletSetup {
id: walletSetup;
@ -730,6 +727,17 @@ Rectangle {
}
}
WalletChoice {
visible: (root.activeView === "preexisting") || (root.activeView === "conflicting");
activeView: root.activeView;
width: parent.width;
anchors {
top: titleBarContainer.bottom;
bottom: parent.bottom;
}
}
//
// FUNCTION DEFINITIONS START
//

View file

@ -14,10 +14,57 @@
import Hifi 1.0 as Hifi
import QtQuick 2.5
import "../../../styles-uit"
import "../../../controls-uit" as HifiControlsUit
Rectangle {
Column {
property string activeView: "conflict";
property bool isMissing: activeView === "preeexisting";
RalewayBold {
text: isMissing
? "Where are your private keys?"
: "Hmmm, your keys are different";
}
RalewayRegular {
text: "You have a wallet elsewhere." + activeView;
text: isMissing
? "Our records indicate that you created a wallet but the private keys are not in the folder where we checked."
: "Our records indicate that you created a wallet with different keys than the keys you're providing."
}
HifiControlsUit.Button {
text: isMissing
? "LOCATE MY KEYS"
: "LOCATE OTHER KEYS";
color: hifi.buttons.blue;
colorScheme: hifi.colorSchemes.dark;
onClicked: walletChooser();
}
HifiControlsUit.Button {
text: isMissing
? "CREATE NEW WALLET"
: "CONTINUE WITH THESE KEYS"
color: hifi.buttons.blue;
colorScheme: hifi.colorSchemes.dark;
onClicked: {
console.log("FIXME CREATE");
}
}
RalewayRegular {
text: "What's this?";
}
function onFileOpenChanged(filename) {
console.log('fixme selected', filename);
// disconnect the event, otherwise the requests will stack up
try {
// Not all calls to onFileOpenChanged() connect an event.
Window.browseChanged.disconnect(onFileOpenChanged);
} catch (e) {
console.log('ignoring', e);
}
console.log('fixme do something with', filename);
}
function walletChooser() {
console.log("GOT CLICK");
Window.browseChanged.connect(onFileOpenChanged);
Window.browseAsync("Choose wallet file", "", "*.hifikey");
}
}