3
0
Fork 0
mirror of https://github.com/lubosz/overte.git synced 2025-04-26 09:15:25 +02:00
This commit is contained in:
Zach Fox 2017-10-24 13:21:03 -07:00
parent c64c2e17c8
commit 48c8d52c09
4 changed files with 11 additions and 9 deletions
interface
resources/qml/hifi
src/scripting
libraries/networking/src

View file

@ -30,7 +30,6 @@ Item {
// Properties
property string profileUrl: "";
property string defaultBaseUrl: Account.metaverseServerURL;
property string connectionStatus : ""
property string uuid: ""
property string displayName: ""
@ -59,7 +58,7 @@ Item {
clip: true
Image {
id: userImage
source: profileUrl !== "" ? ((0 === profileUrl.indexOf("http")) ? profileUrl : (defaultBaseUrl + profileUrl)) : "";
source: profileUrl !== "" ? ((0 === profileUrl.indexOf("http")) ? profileUrl : (Account.metaverseServerURL + profileUrl)) : "";
mipmap: true;
// Anchors
anchors.fill: parent
@ -95,7 +94,7 @@ Item {
enabled: (selected && activeTab == "nearbyTab") || isMyCard;
hoverEnabled: enabled
onClicked: {
userInfoViewer.url = defaultBaseUrl + "/users/" + userName;
userInfoViewer.url = Account.metaverseServerURL + "/users/" + userName;
userInfoViewer.visible = true;
}
onEntered: infoHoverImage.visible = true;
@ -366,7 +365,7 @@ Item {
enabled: selected
hoverEnabled: true
onClicked: {
userInfoViewer.url = defaultBaseUrl + "/users/" + userName;
userInfoViewer.url = Account.metaverseServerURL + "/users/" + userName;
userInfoViewer.visible = true;
}
onEntered: {

View file

@ -23,9 +23,6 @@ import "../controls" as HifiControls
Rectangle {
id: pal;
// Size
width: parent.width;
height: parent.height;
// Style
color: "#E3E3E3";
// Properties

View file

@ -25,6 +25,11 @@ class AccountScriptingInterface : public QObject {
* @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:
/**jsdoc

View file

@ -58,7 +58,9 @@ using UserAgentGetter = std::function<QString()>;
const auto DEFAULT_USER_AGENT_GETTER = []() -> QString { return HIGH_FIDELITY_USER_AGENT; };
const QUrl METAVERSE_SERVER_URL = "https://metaverse.highfidelity.com";
const QUrl METAVERSE_SERVER_URL_STAGING = "https://staging.highfidelity.com";
const QUrl METAVERSE_SERVER_URL_STABLE = "https://metaverse.highfidelity.com";
const QUrl METAVERSE_SERVER_URL = METAVERSE_SERVER_URL_STABLE;
class AccountManager : public QObject, public Dependency {
Q_OBJECT
@ -98,7 +100,6 @@ public:
void setTemporaryDomain(const QUuid& domainID, const QString& key);
const QString& getTemporaryDomainKey(const QUuid& domainID) { return _accountInfo.getTemporaryDomainKey(domainID); }
Q_PROPERTY(QUrl metaverseServerURL READ getMetaverseServerURL)
QUrl getMetaverseServerURL() { return METAVERSE_SERVER_URL; }
public slots: