location cleanup

This commit is contained in:
howard-stearns 2016-11-16 12:53:57 -08:00
parent 01b2a893be
commit 9f2b6dc40b
2 changed files with 4 additions and 4 deletions

View file

@ -370,7 +370,7 @@ Window {
if (place.action === 'snapshot') {
return true;
}
return (place.place_name !== AddressManager.hostname); // Not our entry, but do show other entry points to current domain.
return (place.place_name !== AddressManager.placename); // Not our entry, but do show other entry points to current domain.
// could also require right protocolVersion
}
function getUserStoryPage(pageNumber, cb) { // cb(error) after all pages of domain data have been added to model
@ -436,7 +436,7 @@ Window {
notice.text = AddressManager.isConnected ? "Your location:" : "Not Connected";
notice.color = AddressManager.isConnected ? hifiStyleConstants.colors.baseGrayHighlight : hifiStyleConstants.colors.redHighlight;
// Display hostname, which includes ip address, localhost, and other non-placenames.
location.text = (AddressManager.hostname || '') + (AddressManager.pathname ? AddressManager.pathname.match(/\/[^\/]+/)[0] : '');
location.text = (AddressManager.placename || AddressManager.hostname || '') + (AddressManager.pathname ? AddressManager.pathname.match(/\/[^\/]+/)[0] : '');
}
}

View file

@ -35,7 +35,7 @@ class AddressManager : public QObject, public Dependency {
Q_OBJECT
SINGLETON_DEPENDENCY
Q_PROPERTY(bool isConnected READ isConnected)
Q_PROPERTY(QUrl href READ currentAddress)
Q_PROPERTY(QUrl href READ currentShareableAddress)
Q_PROPERTY(QString protocol READ getProtocol)
Q_PROPERTY(QString hostname READ getHost)
Q_PROPERTY(QString pathname READ currentPath)
@ -67,7 +67,7 @@ public:
QString currentFacingPath() const;
const QUuid& getRootPlaceID() const { return _rootPlaceID; }
const QString& getPlaceName() const { return _placeName; }
const QString& getPlaceName() const { return _shareablePlaceName.isEmpty() ? _placeName : _shareablePlaceName; }
const QString& getHost() const { return _host; }