mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-16 17:46:46 +02:00
Merge pull request #11268 from howard-stearns/fix-wallet-login
fix wallet login (and share code with snapshot login)
This commit is contained in:
commit
c0d9c06067
3 changed files with 21 additions and 18 deletions
|
@ -14,7 +14,7 @@
|
|||
/*global XXX */
|
||||
|
||||
(function () { // BEGIN LOCAL_SCOPE
|
||||
|
||||
Script.include("/~/system/libraries/accountUtils.js");
|
||||
|
||||
// Function Name: onButtonClicked()
|
||||
//
|
||||
|
@ -59,13 +59,7 @@
|
|||
tablet.gotoHomeScreen();
|
||||
break;
|
||||
case 'walletSetup_loginClicked':
|
||||
if ((HMD.active && Settings.getValue("hmdTabletBecomesToolbar", false))
|
||||
|| (!HMD.active && Settings.getValue("desktopTabletBecomesToolbar", true))) {
|
||||
Menu.triggerOption("Login / Sign Up");
|
||||
tablet.gotoHomeScreen();
|
||||
} else {
|
||||
tablet.loadQMLOnTop("../../../dialogs/TabletLoginDialog.qml");
|
||||
}
|
||||
openLoginWindow();
|
||||
break;
|
||||
default:
|
||||
print('Unrecognized message from QML:', JSON.stringify(message));
|
||||
|
|
16
scripts/system/libraries/accountUtils.js
Normal file
16
scripts/system/libraries/accountUtils.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
//
|
||||
// accountUtils.js
|
||||
// scripts/system/libraries/libraries
|
||||
//
|
||||
// Copyright 2017 High Fidelity, Inc.
|
||||
//
|
||||
|
||||
openLoginWindow = function openLoginWindow() {
|
||||
if ((HMD.active && Settings.getValue("hmdTabletBecomesToolbar", false))
|
||||
|| (!HMD.active && Settings.getValue("desktopTabletBecomesToolbar", true))) {
|
||||
Menu.triggerOption("Login / Sign Up");
|
||||
} else {
|
||||
tablet.loadQMLOnTop("../../dialogs/TabletLoginDialog.qml");
|
||||
HMD.openTablet();
|
||||
}
|
||||
};
|
|
@ -10,7 +10,8 @@
|
|||
/* globals Tablet, Script, HMD, Settings, DialogsManager, Menu, Reticle, OverlayWebWindow, Desktop, Account, MyAvatar, Snapshot */
|
||||
/* eslint indent: ["error", 4, { "outerIIFEBody": 0 }] */
|
||||
|
||||
(function() { // BEGIN LOCAL_SCOPE
|
||||
(function () { // BEGIN LOCAL_SCOPE
|
||||
Script.include("/~/system/libraries/accountUtils.js");
|
||||
|
||||
var SNAPSHOT_DELAY = 500; // 500ms
|
||||
var FINISH_SOUND_DELAY = 350;
|
||||
|
@ -52,15 +53,7 @@ try {
|
|||
print('Failed to resolve request api, error: ' + err);
|
||||
}
|
||||
|
||||
function openLoginWindow() {
|
||||
if ((HMD.active && Settings.getValue("hmdTabletBecomesToolbar", false))
|
||||
|| (!HMD.active && Settings.getValue("desktopTabletBecomesToolbar", true))) {
|
||||
Menu.triggerOption("Login / Sign Up");
|
||||
} else {
|
||||
tablet.loadQMLOnTop("../../dialogs/TabletLoginDialog.qml");
|
||||
HMD.openTablet();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function removeFromStoryIDsToMaybeDelete(story_id) {
|
||||
storyIDsToMaybeDelete.splice(storyIDsToMaybeDelete.indexOf(story_id), 1);
|
||||
|
|
Loading…
Reference in a new issue