mirror of
https://github.com/overte-org/overte.git
synced 2025-07-28 22:50:33 +02:00
Merge pull request #11670 from zfox23/stagingSetting
Make it easier to switch between STABLE and STAGING Metaverses
This commit is contained in:
commit
3fae121335
33 changed files with 53 additions and 51 deletions
|
@ -22,7 +22,6 @@
|
||||||
#include <HTTPConnection.h>
|
#include <HTTPConnection.h>
|
||||||
#include <LogHandler.h>
|
#include <LogHandler.h>
|
||||||
#include <shared/NetworkUtils.h>
|
#include <shared/NetworkUtils.h>
|
||||||
#include <NetworkingConstants.h>
|
|
||||||
#include <NumericalConstants.h>
|
#include <NumericalConstants.h>
|
||||||
#include <UUID.h>
|
#include <UUID.h>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
var Settings = {
|
var Settings = {
|
||||||
showAdvanced: false,
|
showAdvanced: false,
|
||||||
|
// STABLE METAVERSE_URL: https://metaverse.highfidelity.com
|
||||||
|
// STAGING METAVERSE_URL: https://staging.highfidelity.com
|
||||||
METAVERSE_URL: 'https://metaverse.highfidelity.com',
|
METAVERSE_URL: 'https://metaverse.highfidelity.com',
|
||||||
ADVANCED_CLASS: 'advanced-setting',
|
ADVANCED_CLASS: 'advanced-setting',
|
||||||
DEPRECATED_CLASS: 'deprecated-setting',
|
DEPRECATED_CLASS: 'deprecated-setting',
|
||||||
|
|
|
@ -87,7 +87,7 @@ Window {
|
||||||
onReceivedHifiSchemeURL: resetAfterTeleport();
|
onReceivedHifiSchemeURL: resetAfterTeleport();
|
||||||
|
|
||||||
// Update location after using back and forward buttons.
|
// Update location after using back and forward buttons.
|
||||||
onMetaverseServerUrlChanged: updateLocationTextTimer.start();
|
onHostChanged: updateLocationTextTimer.start();
|
||||||
|
|
||||||
ListModel { id: suggestions }
|
ListModel { id: suggestions }
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ Window {
|
||||||
|
|
||||||
BaseWebView {
|
BaseWebView {
|
||||||
id: webview
|
id: webview
|
||||||
url: "https://metaverse.highfidelity.com/marketplace?category=avatars"
|
url: Account.metaverseServerURL + "/marketplace?category=avatars"
|
||||||
focus: true
|
focus: true
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
|
|
|
@ -17,7 +17,7 @@ import "../styles-uit"
|
||||||
import "../controls-uit" as HifiControls
|
import "../controls-uit" as HifiControls
|
||||||
import "toolbars"
|
import "toolbars"
|
||||||
|
|
||||||
// references Users, UserActivityLogger, MyAvatar, Vec3, Quat, AddressManager from root context
|
// references Users, UserActivityLogger, MyAvatar, Vec3, Quat, AddressManager, Account from root context
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: thisNameCard
|
id: thisNameCard
|
||||||
|
@ -30,7 +30,6 @@ Item {
|
||||||
|
|
||||||
// Properties
|
// Properties
|
||||||
property string profileUrl: "";
|
property string profileUrl: "";
|
||||||
property string defaultBaseUrl: AddressManager.metaverseServerUrl;
|
|
||||||
property string connectionStatus : ""
|
property string connectionStatus : ""
|
||||||
property string uuid: ""
|
property string uuid: ""
|
||||||
property string displayName: ""
|
property string displayName: ""
|
||||||
|
@ -59,7 +58,7 @@ Item {
|
||||||
clip: true
|
clip: true
|
||||||
Image {
|
Image {
|
||||||
id: userImage
|
id: userImage
|
||||||
source: profileUrl !== "" ? ((0 === profileUrl.indexOf("http")) ? profileUrl : (defaultBaseUrl + profileUrl)) : "";
|
source: profileUrl !== "" ? ((0 === profileUrl.indexOf("http")) ? profileUrl : (Account.metaverseServerURL + profileUrl)) : "";
|
||||||
mipmap: true;
|
mipmap: true;
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -95,7 +94,7 @@ Item {
|
||||||
enabled: (selected && activeTab == "nearbyTab") || isMyCard;
|
enabled: (selected && activeTab == "nearbyTab") || isMyCard;
|
||||||
hoverEnabled: enabled
|
hoverEnabled: enabled
|
||||||
onClicked: {
|
onClicked: {
|
||||||
userInfoViewer.url = defaultBaseUrl + "/users/" + userName;
|
userInfoViewer.url = Account.metaverseServerURL + "/users/" + userName;
|
||||||
userInfoViewer.visible = true;
|
userInfoViewer.visible = true;
|
||||||
}
|
}
|
||||||
onEntered: infoHoverImage.visible = true;
|
onEntered: infoHoverImage.visible = true;
|
||||||
|
@ -366,7 +365,7 @@ Item {
|
||||||
enabled: selected
|
enabled: selected
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
userInfoViewer.url = defaultBaseUrl + "/users/" + userName;
|
userInfoViewer.url = Account.metaverseServerURL + "/users/" + userName;
|
||||||
userInfoViewer.visible = true;
|
userInfoViewer.visible = true;
|
||||||
}
|
}
|
||||||
onEntered: {
|
onEntered: {
|
||||||
|
|
|
@ -23,9 +23,6 @@ import "../controls" as HifiControls
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: pal;
|
id: pal;
|
||||||
// Size
|
|
||||||
width: parent.width;
|
|
||||||
height: parent.height;
|
|
||||||
// Style
|
// Style
|
||||||
color: "#E3E3E3";
|
color: "#E3E3E3";
|
||||||
// Properties
|
// Properties
|
||||||
|
|
|
@ -25,7 +25,7 @@ Item {
|
||||||
HifiConstants { id: hifi; }
|
HifiConstants { id: hifi; }
|
||||||
|
|
||||||
id: root;
|
id: root;
|
||||||
property string referrerURL: "https://metaverse.highfidelity.com/marketplace?";
|
property string referrerURL: (Account.metaverseServerURL + "/marketplace?");
|
||||||
readonly property int additionalDropdownHeight: usernameDropdown.height - myUsernameButton.anchors.bottomMargin;
|
readonly property int additionalDropdownHeight: usernameDropdown.height - myUsernameButton.anchors.bottomMargin;
|
||||||
property alias usernameDropdownVisible: usernameDropdown.visible;
|
property alias usernameDropdownVisible: usernameDropdown.visible;
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ StackView {
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
}
|
}
|
||||||
|
|
||||||
onMetaverseServerUrlChanged: updateLocationTextTimer.start();
|
onHostChanged: updateLocationTextTimer.start();
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: navBar
|
id: navBar
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
|
@ -31,7 +31,7 @@ Item {
|
||||||
|
|
||||||
BaseWebView {
|
BaseWebView {
|
||||||
id: webview
|
id: webview
|
||||||
url: "https://metaverse.highfidelity.com/marketplace?category=avatars"
|
url: (Account.metaverseServerURL + "/marketplace?category=avatars)"
|
||||||
focus: true
|
focus: true
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
|
|
|
@ -25,6 +25,11 @@ class AccountScriptingInterface : public QObject {
|
||||||
* @property username {String} username if user is logged in, otherwise it returns "Unknown user"
|
* @property username {String} username if user is logged in, otherwise it returns "Unknown user"
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
Q_PROPERTY(QUrl metaverseServerURL READ getMetaverseServerURL)
|
||||||
|
QUrl getMetaverseServerURL() { return DependencyManager::get<AccountManager>()->getMetaverseServerURL(); }
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
|
|
|
@ -39,7 +39,7 @@ AddressBarDialog::AddressBarDialog(QQuickItem* parent) : OffscreenQmlDialog(pare
|
||||||
});
|
});
|
||||||
_backEnabled = !(DependencyManager::get<AddressManager>()->getBackStack().isEmpty());
|
_backEnabled = !(DependencyManager::get<AddressManager>()->getBackStack().isEmpty());
|
||||||
_forwardEnabled = !(DependencyManager::get<AddressManager>()->getForwardStack().isEmpty());
|
_forwardEnabled = !(DependencyManager::get<AddressManager>()->getForwardStack().isEmpty());
|
||||||
connect(addressManager.data(), &AddressManager::hostChanged, this, &AddressBarDialog::metaverseServerUrlChanged);
|
connect(addressManager.data(), &AddressManager::hostChanged, this, &AddressBarDialog::hostChanged);
|
||||||
connect(DependencyManager::get<DialogsManager>().data(), &DialogsManager::setUseFeed, this, &AddressBarDialog::setUseFeed);
|
connect(DependencyManager::get<DialogsManager>().data(), &DialogsManager::setUseFeed, this, &AddressBarDialog::setUseFeed);
|
||||||
connect(qApp, &Application::receivedHifiSchemeURL, this, &AddressBarDialog::receivedHifiSchemeURL);
|
connect(qApp, &Application::receivedHifiSchemeURL, this, &AddressBarDialog::receivedHifiSchemeURL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ class AddressBarDialog : public OffscreenQmlDialog {
|
||||||
Q_PROPERTY(bool backEnabled READ backEnabled NOTIFY backEnabledChanged)
|
Q_PROPERTY(bool backEnabled READ backEnabled NOTIFY backEnabledChanged)
|
||||||
Q_PROPERTY(bool forwardEnabled READ forwardEnabled NOTIFY forwardEnabledChanged)
|
Q_PROPERTY(bool forwardEnabled READ forwardEnabled NOTIFY forwardEnabledChanged)
|
||||||
Q_PROPERTY(bool useFeed READ useFeed WRITE setUseFeed NOTIFY useFeedChanged)
|
Q_PROPERTY(bool useFeed READ useFeed WRITE setUseFeed NOTIFY useFeedChanged)
|
||||||
Q_PROPERTY(QString metaverseServerUrl READ metaverseServerUrl NOTIFY metaverseServerUrlChanged)
|
Q_PROPERTY(QString metaverseServerUrl READ metaverseServerUrl)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AddressBarDialog(QQuickItem* parent = nullptr);
|
AddressBarDialog(QQuickItem* parent = nullptr);
|
||||||
|
@ -37,7 +37,7 @@ signals:
|
||||||
void forwardEnabledChanged();
|
void forwardEnabledChanged();
|
||||||
void useFeedChanged();
|
void useFeedChanged();
|
||||||
void receivedHifiSchemeURL(const QString& url);
|
void receivedHifiSchemeURL(const QString& url);
|
||||||
void metaverseServerUrlChanged();
|
void hostChanged();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void displayAddressOfflineMessage();
|
void displayAddressOfflineMessage();
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
#include <QtCore/QJsonDocument>
|
#include <QtCore/QJsonDocument>
|
||||||
#include <QtNetwork/QNetworkReply>
|
#include <QtNetwork/QNetworkReply>
|
||||||
|
|
||||||
#include <NetworkingConstants.h>
|
|
||||||
#include <plugins/PluginManager.h>
|
#include <plugins/PluginManager.h>
|
||||||
#include <plugins/SteamClientPlugin.h>
|
#include <plugins/SteamClientPlugin.h>
|
||||||
#include <ui/TabletScriptingInterface.h>
|
#include <ui/TabletScriptingInterface.h>
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
#include <AudioClient.h>
|
#include <AudioClient.h>
|
||||||
#include <avatar/AvatarManager.h>
|
#include <avatar/AvatarManager.h>
|
||||||
#include <devices/DdeFaceTracker.h>
|
#include <devices/DdeFaceTracker.h>
|
||||||
#include <NetworkingConstants.h>
|
|
||||||
#include <ScriptEngines.h>
|
#include <ScriptEngines.h>
|
||||||
#include <OffscreenUi.h>
|
#include <OffscreenUi.h>
|
||||||
#include <Preferences.h>
|
#include <Preferences.h>
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
#include <QNetworkRequest>
|
#include <QNetworkRequest>
|
||||||
|
|
||||||
#include <NetworkAccessManager.h>
|
#include <NetworkAccessManager.h>
|
||||||
#include <NetworkingConstants.h>
|
|
||||||
#include <SharedUtil.h>
|
#include <SharedUtil.h>
|
||||||
|
|
||||||
#include "FSTReader.h"
|
#include "FSTReader.h"
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
|
|
||||||
#include <SettingHandle.h>
|
#include <SettingHandle.h>
|
||||||
|
|
||||||
#include "NetworkingConstants.h"
|
|
||||||
#include "NetworkLogging.h"
|
#include "NetworkLogging.h"
|
||||||
#include "NodeList.h"
|
#include "NodeList.h"
|
||||||
#include "udt/PacketHeaders.h"
|
#include "udt/PacketHeaders.h"
|
||||||
|
@ -240,7 +239,7 @@ void AccountManager::sendRequest(const QString& path,
|
||||||
QUrl requestURL = _authURL;
|
QUrl requestURL = _authURL;
|
||||||
|
|
||||||
if (requestURL.isEmpty()) { // Assignment client doesn't set _authURL.
|
if (requestURL.isEmpty()) { // Assignment client doesn't set _authURL.
|
||||||
requestURL = NetworkingConstants::METAVERSE_SERVER_URL;
|
requestURL = getMetaverseServerURL();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path.startsWith("/")) {
|
if (path.startsWith("/")) {
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include <QtNetwork/QNetworkReply>
|
#include <QtNetwork/QNetworkReply>
|
||||||
#include <QUrlQuery>
|
#include <QUrlQuery>
|
||||||
|
|
||||||
|
#include "NetworkingConstants.h"
|
||||||
#include "NetworkAccessManager.h"
|
#include "NetworkAccessManager.h"
|
||||||
|
|
||||||
#include "DataServerAccountInfo.h"
|
#include "DataServerAccountInfo.h"
|
||||||
|
@ -96,6 +97,8 @@ public:
|
||||||
void setTemporaryDomain(const QUuid& domainID, const QString& key);
|
void setTemporaryDomain(const QUuid& domainID, const QString& key);
|
||||||
const QString& getTemporaryDomainKey(const QUuid& domainID) { return _accountInfo.getTemporaryDomainKey(domainID); }
|
const QString& getTemporaryDomainKey(const QUuid& domainID) { return _accountInfo.getTemporaryDomainKey(domainID); }
|
||||||
|
|
||||||
|
QUrl getMetaverseServerURL() { return NetworkingConstants::METAVERSE_SERVER_URL; }
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void requestAccessToken(const QString& login, const QString& password);
|
void requestAccessToken(const QString& login, const QString& password);
|
||||||
void requestAccessTokenWithSteam(QByteArray authSessionTicket);
|
void requestAccessTokenWithSteam(QByteArray authSessionTicket);
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
#include "AddressManager.h"
|
#include "AddressManager.h"
|
||||||
#include "NodeList.h"
|
#include "NodeList.h"
|
||||||
#include "NetworkingConstants.h"
|
|
||||||
#include "NetworkLogging.h"
|
#include "NetworkLogging.h"
|
||||||
#include "UserActivityLogger.h"
|
#include "UserActivityLogger.h"
|
||||||
#include "udt/PacketHeaders.h"
|
#include "udt/PacketHeaders.h"
|
||||||
|
@ -770,10 +769,6 @@ QString AddressManager::getDomainId() const {
|
||||||
return DependencyManager::get<NodeList>()->getDomainHandler().getUUID().toString();
|
return DependencyManager::get<NodeList>()->getDomainHandler().getUUID().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
const QUrl AddressManager::getMetaverseServerUrl() const {
|
|
||||||
return NetworkingConstants::METAVERSE_SERVER_URL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void AddressManager::handleShareableNameAPIResponse(QNetworkReply& requestReply) {
|
void AddressManager::handleShareableNameAPIResponse(QNetworkReply& requestReply) {
|
||||||
// make sure that this response is for the domain we're currently connected to
|
// make sure that this response is for the domain we're currently connected to
|
||||||
auto domainID = DependencyManager::get<NodeList>()->getDomainHandler().getUUID();
|
auto domainID = DependencyManager::get<NodeList>()->getDomainHandler().getUUID();
|
||||||
|
|
|
@ -41,7 +41,6 @@ class AddressManager : public QObject, public Dependency {
|
||||||
Q_PROPERTY(QString pathname READ currentPath)
|
Q_PROPERTY(QString pathname READ currentPath)
|
||||||
Q_PROPERTY(QString placename READ getPlaceName)
|
Q_PROPERTY(QString placename READ getPlaceName)
|
||||||
Q_PROPERTY(QString domainId READ getDomainId)
|
Q_PROPERTY(QString domainId READ getDomainId)
|
||||||
Q_PROPERTY(QUrl metaverseServerUrl READ getMetaverseServerUrl NOTIFY metaverseServerUrlChanged)
|
|
||||||
public:
|
public:
|
||||||
Q_INVOKABLE QString protocolVersion();
|
Q_INVOKABLE QString protocolVersion();
|
||||||
using PositionGetter = std::function<glm::vec3()>;
|
using PositionGetter = std::function<glm::vec3()>;
|
||||||
|
@ -71,7 +70,6 @@ public:
|
||||||
const QUuid& getRootPlaceID() const { return _rootPlaceID; }
|
const QUuid& getRootPlaceID() const { return _rootPlaceID; }
|
||||||
const QString& getPlaceName() const { return _shareablePlaceName.isEmpty() ? _placeName : _shareablePlaceName; }
|
const QString& getPlaceName() const { return _shareablePlaceName.isEmpty() ? _placeName : _shareablePlaceName; }
|
||||||
QString getDomainId() const;
|
QString getDomainId() const;
|
||||||
const QUrl getMetaverseServerUrl() const;
|
|
||||||
|
|
||||||
const QString& getHost() const { return _host; }
|
const QString& getHost() const { return _host; }
|
||||||
|
|
||||||
|
@ -123,8 +121,6 @@ signals:
|
||||||
void goBackPossible(bool isPossible);
|
void goBackPossible(bool isPossible);
|
||||||
void goForwardPossible(bool isPossible);
|
void goForwardPossible(bool isPossible);
|
||||||
|
|
||||||
void metaverseServerUrlChanged();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
AddressManager();
|
AddressManager();
|
||||||
private slots:
|
private slots:
|
||||||
|
|
|
@ -15,7 +15,12 @@
|
||||||
#include <QtCore/QUrl>
|
#include <QtCore/QUrl>
|
||||||
|
|
||||||
namespace NetworkingConstants {
|
namespace NetworkingConstants {
|
||||||
const QUrl METAVERSE_SERVER_URL = QUrl("https://metaverse.highfidelity.com");
|
// If you want to use STAGING instead of STABLE,
|
||||||
|
// don't forget to ALSO change the Domain Server Metaverse Server URL, which is at the top of:
|
||||||
|
// <hifi repo>\domain-server\resources\web\settings\js\settings.js
|
||||||
|
const QUrl METAVERSE_SERVER_URL_STABLE("https://metaverse.highfidelity.com");
|
||||||
|
const QUrl METAVERSE_SERVER_URL_STAGING("https://staging.highfidelity.com");
|
||||||
|
const QUrl METAVERSE_SERVER_URL = METAVERSE_SERVER_URL_STABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // hifi_NetworkingConstants_h
|
#endif // hifi_NetworkingConstants_h
|
||||||
|
|
|
@ -20,15 +20,16 @@
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
bool isAuthableHighFidelityURL(const QUrl& url) {
|
bool isAuthableHighFidelityURL(const QUrl& url) {
|
||||||
|
auto metaverseServerURL = NetworkingConstants::METAVERSE_SERVER_URL;
|
||||||
static const QStringList HF_HOSTS = {
|
static const QStringList HF_HOSTS = {
|
||||||
"highfidelity.com", "highfidelity.io",
|
"highfidelity.com", "highfidelity.io",
|
||||||
"metaverse.highfidelity.com", "metaverse.highfidelity.io"
|
metaverseServerURL.toString(), "metaverse.highfidelity.io"
|
||||||
};
|
};
|
||||||
const auto& scheme = url.scheme();
|
const auto& scheme = url.scheme();
|
||||||
const auto& host = url.host();
|
const auto& host = url.host();
|
||||||
|
|
||||||
return (scheme == "https" && HF_HOSTS.contains(host)) ||
|
return (scheme == "https" && HF_HOSTS.contains(host)) ||
|
||||||
((scheme == NetworkingConstants::METAVERSE_SERVER_URL.scheme()) && (host == NetworkingConstants::METAVERSE_SERVER_URL.host()));
|
((scheme == metaverseServerURL.scheme()) && (host == metaverseServerURL.host()));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isScript(const QString filename) {
|
bool isScript(const QString filename) {
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
(function () { // BEGIN LOCAL_SCOPE
|
(function () { // BEGIN LOCAL_SCOPE
|
||||||
Script.include("/~/system/libraries/accountUtils.js");
|
Script.include("/~/system/libraries/accountUtils.js");
|
||||||
|
|
||||||
var MARKETPLACE_URL = "https://metaverse.highfidelity.com/marketplace";
|
var MARKETPLACE_URL = Account.metaverseServerURL + "/marketplace";
|
||||||
|
|
||||||
// Function Name: onButtonClicked()
|
// Function Name: onButtonClicked()
|
||||||
//
|
//
|
||||||
|
|
|
@ -15,7 +15,7 @@ Script.include([
|
||||||
|
|
||||||
var toolIconUrl = Script.resolvePath("assets/images/tools/");
|
var toolIconUrl = Script.resolvePath("assets/images/tools/");
|
||||||
|
|
||||||
var DIRECTORY_WINDOW_URL = "https://metaverse.highfidelity.com/directory";
|
var DIRECTORY_WINDOW_URL = Account.metaverseServerURL + "/directory";
|
||||||
var directoryWindow = new OverlayWebWindow({
|
var directoryWindow = new OverlayWebWindow({
|
||||||
title: 'Directory',
|
title: 'Directory',
|
||||||
source: "about:blank",
|
source: "about:blank",
|
||||||
|
|
|
@ -163,7 +163,7 @@ var importingSVOTextOverlay = Overlays.addOverlay("text", {
|
||||||
visible: false
|
visible: false
|
||||||
});
|
});
|
||||||
|
|
||||||
var MARKETPLACE_URL = "https://metaverse.highfidelity.com/marketplace";
|
var MARKETPLACE_URL = Account.metaverseServerURL + "/marketplace";
|
||||||
var marketplaceWindow = new OverlayWebWindow({
|
var marketplaceWindow = new OverlayWebWindow({
|
||||||
title: 'Marketplace',
|
title: 'Marketplace',
|
||||||
source: "about:blank",
|
source: "about:blank",
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
var commerceMode = false;
|
var commerceMode = false;
|
||||||
var userIsLoggedIn = false;
|
var userIsLoggedIn = false;
|
||||||
var walletNeedsSetup = false;
|
var walletNeedsSetup = false;
|
||||||
|
var metaverseServerURL = "https://metaverse.highfidelity.com";
|
||||||
|
|
||||||
function injectCommonCode(isDirectoryPage) {
|
function injectCommonCode(isDirectoryPage) {
|
||||||
|
|
||||||
|
@ -57,7 +58,7 @@
|
||||||
);
|
);
|
||||||
|
|
||||||
// Footer.
|
// Footer.
|
||||||
var isInitialHiFiPage = location.href === "https://metaverse.highfidelity.com/marketplace?";
|
var isInitialHiFiPage = location.href === metaverseServerURL + "/marketplace?";
|
||||||
$("body").append(
|
$("body").append(
|
||||||
'<div id="marketplace-navigation">' +
|
'<div id="marketplace-navigation">' +
|
||||||
(!isInitialHiFiPage ? '<input id="back-button" type="button" class="white" value="< Back" />' : '') +
|
(!isInitialHiFiPage ? '<input id="back-button" type="button" class="white" value="< Back" />' : '') +
|
||||||
|
@ -69,7 +70,7 @@
|
||||||
|
|
||||||
// Footer actions.
|
// Footer actions.
|
||||||
$("#back-button").on("click", function () {
|
$("#back-button").on("click", function () {
|
||||||
(document.referrer !== "") ? window.history.back() : window.location = "https://metaverse.highfidelity.com/marketplace?";
|
(document.referrer !== "") ? window.history.back() : window.location = (metaverseServerURL + "/marketplace?");
|
||||||
});
|
});
|
||||||
$("#all-markets").on("click", function () {
|
$("#all-markets").on("click", function () {
|
||||||
EventBridge.emitWebEvent(GOTO_DIRECTORY);
|
EventBridge.emitWebEvent(GOTO_DIRECTORY);
|
||||||
|
@ -641,6 +642,7 @@
|
||||||
commerceMode = !!parsedJsonMessage.data.commerceMode;
|
commerceMode = !!parsedJsonMessage.data.commerceMode;
|
||||||
userIsLoggedIn = !!parsedJsonMessage.data.userIsLoggedIn;
|
userIsLoggedIn = !!parsedJsonMessage.data.userIsLoggedIn;
|
||||||
walletNeedsSetup = !!parsedJsonMessage.data.walletNeedsSetup;
|
walletNeedsSetup = !!parsedJsonMessage.data.walletNeedsSetup;
|
||||||
|
metaverseServerURL = parsedJsonMessage.data.metaverseServerURL;
|
||||||
injectCode();
|
injectCode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -444,7 +444,7 @@
|
||||||
}, WAITING_INTERVAL);
|
}, WAITING_INTERVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
var pollCount = 0, requestUrl = location.metaverseServerUrl + '/api/v1/user/connection_request';
|
var pollCount = 0, requestUrl = Account.metaverseServerURL + '/api/v1/user/connection_request';
|
||||||
// As currently implemented, we select the closest waiting avatar (if close enough) and send
|
// As currently implemented, we select the closest waiting avatar (if close enough) and send
|
||||||
// them a connectionRequest. If nobody is close enough we send a waiting message, and wait for a
|
// them a connectionRequest. If nobody is close enough we send a waiting message, and wait for a
|
||||||
// connectionRequest. If the 2 people who want to connect are both somewhat out of range when they
|
// connectionRequest. If the 2 people who want to connect are both somewhat out of range when they
|
||||||
|
@ -569,7 +569,7 @@
|
||||||
// IWBNI we also did some fail sound/visual effect.
|
// IWBNI we also did some fail sound/visual effect.
|
||||||
Window.makeConnection(false, result.connection);
|
Window.makeConnection(false, result.connection);
|
||||||
if (Account.isLoggedIn()) { // Give extra failure info
|
if (Account.isLoggedIn()) { // Give extra failure info
|
||||||
request(location.metaverseServerUrl + '/api/v1/users/' + Account.username + '/location', function (error, response) {
|
request(Account.metaverseServerURL + '/api/v1/users/' + Account.username + '/location', function (error, response) {
|
||||||
var message = '';
|
var message = '';
|
||||||
if (error || response.status !== 'success') {
|
if (error || response.status !== 'success') {
|
||||||
message = 'Unable to get location.';
|
message = 'Unable to get location.';
|
||||||
|
|
|
@ -15,7 +15,7 @@ Script.include("../libraries/WebTablet.js");
|
||||||
|
|
||||||
var toolIconUrl = Script.resolvePath("../assets/images/tools/");
|
var toolIconUrl = Script.resolvePath("../assets/images/tools/");
|
||||||
|
|
||||||
var MARKETPLACE_URL = "https://metaverse.highfidelity.com/marketplace";
|
var MARKETPLACE_URL = Account.metaverseServerURL + "/marketplace";
|
||||||
var marketplaceWindow = new OverlayWebWindow({
|
var marketplaceWindow = new OverlayWebWindow({
|
||||||
title: "Marketplace",
|
title: "Marketplace",
|
||||||
source: "about:blank",
|
source: "about:blank",
|
||||||
|
|
|
@ -15,7 +15,8 @@
|
||||||
|
|
||||||
Script.include("../libraries/WebTablet.js");
|
Script.include("../libraries/WebTablet.js");
|
||||||
|
|
||||||
var MARKETPLACE_URL = "https://metaverse.highfidelity.com/marketplace";
|
var METAVERSE_SERVER_URL = Account.metaverseServerURL;
|
||||||
|
var MARKETPLACE_URL = METAVERSE_SERVER_URL + "/marketplace";
|
||||||
var MARKETPLACE_URL_INITIAL = MARKETPLACE_URL + "?"; // Append "?" to signal injected script that it's the initial page.
|
var MARKETPLACE_URL_INITIAL = MARKETPLACE_URL + "?"; // Append "?" to signal injected script that it's the initial page.
|
||||||
var MARKETPLACES_URL = Script.resolvePath("../html/marketplaces.html");
|
var MARKETPLACES_URL = Script.resolvePath("../html/marketplaces.html");
|
||||||
var MARKETPLACES_INJECT_SCRIPT_URL = Script.resolvePath("../html/js/marketplacesInject.js");
|
var MARKETPLACES_INJECT_SCRIPT_URL = Script.resolvePath("../html/js/marketplacesInject.js");
|
||||||
|
@ -135,7 +136,7 @@
|
||||||
|
|
||||||
function setCertificateInfo(currentEntityWithContextOverlay, itemCertificateId) {
|
function setCertificateInfo(currentEntityWithContextOverlay, itemCertificateId) {
|
||||||
wireEventBridge(true);
|
wireEventBridge(true);
|
||||||
var certificateId = itemCertificateId || (Entities.getEntityProperties(currentEntityWithContextOverlay, ['certificateID']).certificateID + "\n");
|
var certificateId = itemCertificateId || (Entities.getEntityProperties(currentEntityWithContextOverlay, ['certificateID']).certificateID);
|
||||||
tablet.sendToQml({
|
tablet.sendToQml({
|
||||||
method: 'inspectionCertificate_setCertificateId',
|
method: 'inspectionCertificate_setCertificateId',
|
||||||
certificateId: certificateId
|
certificateId: certificateId
|
||||||
|
@ -155,7 +156,8 @@
|
||||||
data: {
|
data: {
|
||||||
commerceMode: Settings.getValue("commerce", false),
|
commerceMode: Settings.getValue("commerce", false),
|
||||||
userIsLoggedIn: Account.loggedIn,
|
userIsLoggedIn: Account.loggedIn,
|
||||||
walletNeedsSetup: Wallet.walletStatus === 1
|
walletNeedsSetup: Wallet.walletStatus === 1,
|
||||||
|
metaverseServerURL: Account.metaverseServerURL
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
|
@ -334,7 +334,7 @@ function updateUser(data) {
|
||||||
// User management services
|
// User management services
|
||||||
//
|
//
|
||||||
// These are prototype versions that will be changed when the back end changes.
|
// These are prototype versions that will be changed when the back end changes.
|
||||||
var METAVERSE_BASE = location.metaverseServerUrl;
|
var METAVERSE_BASE = Account.metaverseServerURL;
|
||||||
|
|
||||||
function requestJSON(url, callback) { // callback(data) if successfull. Logs otherwise.
|
function requestJSON(url, callback) { // callback(data) if successfull. Logs otherwise.
|
||||||
request({
|
request({
|
||||||
|
|
|
@ -35,7 +35,7 @@ var imageData = [];
|
||||||
var storyIDsToMaybeDelete = [];
|
var storyIDsToMaybeDelete = [];
|
||||||
var shareAfterLogin = false;
|
var shareAfterLogin = false;
|
||||||
var snapshotToShareAfterLogin = [];
|
var snapshotToShareAfterLogin = [];
|
||||||
var METAVERSE_BASE = location.metaverseServerUrl;
|
var METAVERSE_BASE = Account.metaverseServerURL;
|
||||||
var isLoggedIn;
|
var isLoggedIn;
|
||||||
var numGifSnapshotUploadsPending = 0;
|
var numGifSnapshotUploadsPending = 0;
|
||||||
var numStillSnapshotUploadsPending = 0;
|
var numStillSnapshotUploadsPending = 0;
|
||||||
|
|
|
@ -115,7 +115,7 @@
|
||||||
var stories = {}, pingPong = false;
|
var stories = {}, pingPong = false;
|
||||||
function expire(id) {
|
function expire(id) {
|
||||||
var options = {
|
var options = {
|
||||||
uri: location.metaverseServerUrl + '/api/v1/user_stories/' + id,
|
uri: Account.metaverseServerURL + '/api/v1/user_stories/' + id,
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
json: true,
|
json: true,
|
||||||
body: {expire: "true"}
|
body: {expire: "true"}
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
'protocol=' + encodeURIComponent(location.protocolVersion()),
|
'protocol=' + encodeURIComponent(location.protocolVersion()),
|
||||||
'per_page=' + count
|
'per_page=' + count
|
||||||
];
|
];
|
||||||
var url = location.metaverseServerUrl + '/api/v1/user_stories?' + options.join('&');
|
var url = Account.metaverseServerURL + '/api/v1/user_stories?' + options.join('&');
|
||||||
request({
|
request({
|
||||||
uri: url
|
uri: url
|
||||||
}, function (error, data) {
|
}, function (error, data) {
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
var USERS_URL = "https://hifi-content.s3.amazonaws.com/faye/tablet-dev/users.html";
|
var USERS_URL = "https://hifi-content.s3.amazonaws.com/faye/tablet-dev/users.html";
|
||||||
var HOME_BUTTON_TEXTURE = Script.resourcesPath() + "meshes/tablet-with-home-button.fbx/tablet-with-home-button.fbm/button-root.png";
|
var HOME_BUTTON_TEXTURE = Script.resourcesPath() + "meshes/tablet-with-home-button.fbx/tablet-with-home-button.fbm/button-root.png";
|
||||||
|
|
||||||
var FRIENDS_WINDOW_URL = "https://metaverse.highfidelity.com/user/friends";
|
var FRIENDS_WINDOW_URL = Account.metaverseServerURL + "/user/friends";
|
||||||
var FRIENDS_WINDOW_WIDTH = 290;
|
var FRIENDS_WINDOW_WIDTH = 290;
|
||||||
var FRIENDS_WINDOW_HEIGHT = 500;
|
var FRIENDS_WINDOW_HEIGHT = 500;
|
||||||
var FRIENDS_WINDOW_TITLE = "Add/Remove Friends";
|
var FRIENDS_WINDOW_TITLE = "Add/Remove Friends";
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
var SERVER = 'https://metaverse.highfidelity.com/api/v1';
|
var SERVER = Account.metaverseServerURL + '/api/v1';
|
||||||
|
|
||||||
var OVERLAY = null;
|
var OVERLAY = null;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue