mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01: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
100 lines
2.8 KiB
QML
100 lines
2.8 KiB
QML
//
|
|
// SecurityImageSelection.qml
|
|
// qml/hifi/commerce/wallet
|
|
//
|
|
// SecurityImageSelection
|
|
//
|
|
// Created by Zach Fox on 2017-08-17
|
|
// 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;
|
|
property int currentIndex: securityImageGrid.currentIndex;
|
|
|
|
// This will cause a bug -- if you bring up security image selection in HUD mode while
|
|
// in HMD while having HMD preview enabled, then move, then finish passphrase selection,
|
|
// HMD preview will stay off.
|
|
// TODO: Fix this unlikely bug
|
|
onVisibleChanged: {
|
|
if (visible) {
|
|
sendSignalToWallet({method: 'disableHmdPreview'});
|
|
} else {
|
|
sendSignalToWallet({method: 'maybeEnableHmdPreview'});
|
|
}
|
|
}
|
|
|
|
SecurityImageModel {
|
|
id: gridModel;
|
|
}
|
|
|
|
GridView {
|
|
id: securityImageGrid;
|
|
interactive: false;
|
|
clip: true;
|
|
// Anchors
|
|
anchors.fill: parent;
|
|
currentIndex: -1;
|
|
cellWidth: width / 3;
|
|
cellHeight: height / 2;
|
|
model: gridModel;
|
|
delegate: Item {
|
|
width: securityImageGrid.cellWidth;
|
|
height: securityImageGrid.cellHeight;
|
|
Item {
|
|
anchors.fill: parent;
|
|
Image {
|
|
width: parent.width - 12;
|
|
height: parent.height - 12;
|
|
source: sourcePath;
|
|
anchors.horizontalCenter: parent.horizontalCenter;
|
|
anchors.verticalCenter: parent.verticalCenter;
|
|
fillMode: Image.PreserveAspectFit;
|
|
mipmap: true;
|
|
}
|
|
}
|
|
MouseArea {
|
|
anchors.fill: parent;
|
|
propagateComposedEvents: false;
|
|
onClicked: {
|
|
securityImageGrid.currentIndex = index;
|
|
}
|
|
}
|
|
}
|
|
highlight: Rectangle {
|
|
width: securityImageGrid.cellWidth;
|
|
height: securityImageGrid.cellHeight;
|
|
color: hifi.colors.blueHighlight;
|
|
}
|
|
}
|
|
|
|
//
|
|
// FUNCTION DEFINITIONS START
|
|
//
|
|
signal sendSignalToWallet(var msg);
|
|
|
|
function getImagePathFromImageID(imageID) {
|
|
return (imageID ? gridModel.getImagePathFromImageID(imageID) : "");
|
|
}
|
|
|
|
function getSelectedImageIndex() {
|
|
return gridModel.get(securityImageGrid.currentIndex).securityImageEnumValue;
|
|
}
|
|
//
|
|
// FUNCTION DEFINITIONS END
|
|
//
|
|
}
|