mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-16 11:46:17 +02:00
* canRez(Tmp)Certified() * CertifiedItem beginnings * Skeleton of verifyOwnerChallenge() * Controlled failure; updateLocation() skeletion * Controlled failure on checkout page with ctrl+f * Skeleton Purchases first-use tutorial * Initial progress on new setup * Security pic tip * Skeleton Certificate page * Updates to Certificate * General progress; setup is nearly complete * Better buttons; last step almost done * Initial progress on wallet home * Completed recent transactions * Security page * Scrollbar * Fix auth error text * PassphraseSelection * Change security pic * Minor layout changes; beginnings of emulated header * Various layout changes; wallet nav bar * Help screen * Quick onaccepted change * First pass at new purchases * Small style updates * Some error progress * Lightbox in purchases * Collapse other help answers when clicking on another * REZZED notif * Commerce Lightbox * Lots of new interactions in Purchases * Hook up 'view certificate' * Fix errors, fix close button on cert * Purchases timer; much faster filter * Add debugCheckout * Purchase updates * GlyphButton; separator; Checkout Success; Ledger fix; debug modes * Lock glyph below security pic should be white * Various fixes, round 1 * Circular mask * Passphrase change button fix; TextField error edge highlighting * Recent Activity fixes * Various changes * Standard Security Pic location * Color changes * Filter bar changes * Styling for multiple owned items * Minor language change * Header dropdown (harder than expected) * Small fixes * View backup instructions * marketplaces.js onCommerceScreen * Beginnign of new injection * Marketplace injection changes * Purchase button style changes * More button styling * MY PURCHASES button * marketplace onUsernameChanged * New help QA * Help text changes etc * Downscale security image, reducing filesize * Lots of bugfixes * Cleanup before PR * Only open cert during inspection if commerce switch is on * Help text changes * Purchase status incl. change to confirmed; Help text; Open Explorer to hifikey * Quick glyph change * New 'wallet not set up' flow for when entering Purchases or Checkout without set-up wallet
162 lines
4.7 KiB
QML
162 lines
4.7 KiB
QML
//
|
|
// PassphraseChange.qml
|
|
// qml/hifi/commerce/wallet
|
|
//
|
|
// PassphraseChange
|
|
//
|
|
// Created by Zach Fox on 2017-08-18
|
|
// Copyright 2017 High Fidelity, Inc.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
//
|
|
|
|
import Hifi 1.0 as Hifi
|
|
import QtQuick 2.5
|
|
import QtQuick.Controls 1.4
|
|
import "../../../styles-uit"
|
|
import "../../../controls-uit" as HifiControlsUit
|
|
import "../../../controls" as HifiControls
|
|
|
|
// references XXX from root context
|
|
|
|
Item {
|
|
HifiConstants { id: hifi; }
|
|
|
|
id: root;
|
|
|
|
SecurityImageModel {
|
|
id: securityImageModel;
|
|
}
|
|
|
|
// Username Text
|
|
RalewayRegular {
|
|
id: usernameText;
|
|
text: Account.username;
|
|
// Text size
|
|
size: 24;
|
|
// Style
|
|
color: hifi.colors.white;
|
|
elide: Text.ElideRight;
|
|
// Anchors
|
|
anchors.top: parent.top;
|
|
anchors.left: parent.left;
|
|
anchors.leftMargin: 20;
|
|
width: parent.width/2;
|
|
height: 80;
|
|
}
|
|
|
|
//
|
|
// SECURE PASSPHRASE SELECTION START
|
|
//
|
|
Item {
|
|
id: choosePassphraseContainer;
|
|
// Anchors
|
|
anchors.top: usernameText.bottom;
|
|
anchors.left: parent.left;
|
|
anchors.right: parent.right;
|
|
anchors.bottom: parent.bottom;
|
|
|
|
// "Change Passphrase" text
|
|
RalewaySemiBold {
|
|
id: passphraseTitle;
|
|
text: "Change Passphrase:";
|
|
// Text size
|
|
size: 18;
|
|
anchors.top: parent.top;
|
|
anchors.left: parent.left;
|
|
anchors.leftMargin: 20;
|
|
anchors.right: parent.right;
|
|
height: 30;
|
|
// Style
|
|
color: hifi.colors.blueHighlight;
|
|
}
|
|
|
|
PassphraseSelection {
|
|
id: passphraseSelection;
|
|
isChangingPassphrase: true;
|
|
anchors.top: passphraseTitle.bottom;
|
|
anchors.topMargin: 8;
|
|
anchors.left: parent.left;
|
|
anchors.right: parent.right;
|
|
anchors.bottom: passphraseNavBar.top;
|
|
|
|
Connections {
|
|
onSendMessageToLightbox: {
|
|
if (msg.method === 'statusResult') {
|
|
if (msg.status) {
|
|
// Success submitting new passphrase
|
|
sendSignalToWallet({method: "walletSecurity_changePassphraseSuccess"});
|
|
} else {
|
|
// Error submitting new passphrase
|
|
resetSubmitButton();
|
|
passphraseSelection.setErrorText("Backend error");
|
|
}
|
|
} else {
|
|
sendSignalToWallet(msg);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Navigation Bar
|
|
Item {
|
|
id: passphraseNavBar;
|
|
// Size
|
|
width: parent.width;
|
|
height: 40;
|
|
// Anchors:
|
|
anchors.left: parent.left;
|
|
anchors.bottom: parent.bottom;
|
|
anchors.bottomMargin: 30;
|
|
|
|
// "Cancel" button
|
|
HifiControlsUit.Button {
|
|
color: hifi.buttons.noneBorderlessWhite;
|
|
colorScheme: hifi.colorSchemes.dark;
|
|
anchors.top: parent.top;
|
|
anchors.bottom: parent.bottom;
|
|
anchors.left: parent.left;
|
|
anchors.leftMargin: 20;
|
|
width: 150;
|
|
text: "Cancel"
|
|
onClicked: {
|
|
sendSignalToWallet({method: "walletSecurity_changePassphraseCancelled"});
|
|
}
|
|
}
|
|
|
|
// "Submit" button
|
|
HifiControlsUit.Button {
|
|
id: passphraseSubmitButton;
|
|
color: hifi.buttons.blue;
|
|
colorScheme: hifi.colorSchemes.dark;
|
|
anchors.top: parent.top;
|
|
anchors.bottom: parent.bottom;
|
|
anchors.right: parent.right;
|
|
anchors.rightMargin: 20;
|
|
width: 150;
|
|
text: "Submit";
|
|
onClicked: {
|
|
if (passphraseSelection.validateAndSubmitPassphrase()) {
|
|
passphraseSubmitButton.text = "Submitting...";
|
|
passphraseSubmitButton.enabled = false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//
|
|
// SECURE PASSPHRASE SELECTION END
|
|
//
|
|
|
|
signal sendSignalToWallet(var msg);
|
|
|
|
function resetSubmitButton() {
|
|
passphraseSubmitButton.enabled = true;
|
|
passphraseSubmitButton.text = "Submit";
|
|
}
|
|
|
|
function clearPassphraseFields() {
|
|
passphraseSelection.clearPassphraseFields();
|
|
}
|
|
}
|