diff --git a/scripts/system/places/federation.json b/scripts/system/places/federation.json
index ba02fc8b8c..939c66e3d5 100644
--- a/scripts/system/places/federation.json
+++ b/scripts/system/places/federation.json
@@ -1,4 +1,4 @@
[
{"node": "https://metaverse.vircadia.com/live"},
- {"node": "https://mv.overte.org/server"}
-]
\ No newline at end of file
+ {"node": "https://mv.overte.org/server"}
+]
diff --git a/scripts/system/places/places.css b/scripts/system/places/places.css
index f02b949d75..6b52dc2239 100644
--- a/scripts/system/places/places.css
+++ b/scripts/system/places/places.css
@@ -487,6 +487,41 @@ div.placeEntry {
text-align: center;
}
+div.addMsEntry {
+ width: 85%;
+ height: 38px;
+ background: #292929;
+ border: 0px;
+ border-radius: 6px;
+ box-shadow: 3px 3px 5px rgba(0,0,0,0.8);
+ margin: 6px 0px 9px 6px;
+ text-align: left;
+}
+
+#addMS {
+ margin: 8px;
+ width: 85%;
+}
+
+#addMsBtn {
+ background: #bababa;
+ background-image: linear-gradient(to bottom, #bababa, #424242);
+ border-radius: 4px;
+ color: #ffffff;
+ font-size: 18px;
+ padding: 1px 5px 1px 5px;
+ border: 0px;
+ text-decoration: none;
+ font-weight: 700;
+}
+
+#addMsBtn:hover {
+ background: #e0e0e0;
+ background-image: linear-gradient(to bottom, #e0e0e0, #737373);
+ text-decoration: none;
+ font-weight: 700;
+}
+
div.placeEntryHighlighter {
width: 85%;
height: 80px;
@@ -847,7 +882,7 @@ td.warningTitle {
font-size: 10px;
font-style: none;
color: #ffffff;
- text-align: left;
+ text-align: left;
}
.region-LOCAL {
@@ -913,3 +948,10 @@ button.federationFilterOn:hover {
button.externalFilterOn:hover {
border: solid #00e2ff 1px;
}
+
+#reloading {
+ width: 80%;
+ color: #ffffff;
+ font-size: 18px;
+ text-align: center;
+}
diff --git a/scripts/system/places/places.html b/scripts/system/places/places.html
index 549aad556e..83def56ed9 100644
--- a/scripts/system/places/places.html
+++ b/scripts/system/places/places.html
@@ -245,11 +245,14 @@
metaverseCounter++;
}
-
+
+ formattedMetaverseList = formattedMetaverseList + "
";
formatedList = formatedList + "
";
@@ -276,14 +279,14 @@
formatedList = formatedList + "
";
formatedList = formatedList + "
";
}
-
+
for (var i = 0; i < placeRecords.length; i++) {
if (counter === loadRecordsUpTo) {
//Display Load More button
formatedList = formatedList + "";
formatedList = formatedList + "
";
@@ -400,7 +403,7 @@
currentDomain = placeRecords[i].domain;
}
-
+
var moreStyle = "";
if (placeRecords[i].category === "A") {
moreStyle = " style='background-image: url(" + placeRecords[i].thumbnail + "); background-repeat: no-repeat; background-position: 50% 50%; background-size: cover;'";
@@ -409,21 +412,21 @@
} else if (placeRecords[i].category === "U") { //TO REMOVE ONCE BEACONS GET REMOVED
moreStyle = " style='background-color: #38130f;'";
}
-
+
var shortenedDescription = placeRecords[i].description.substr(0, 55);
if (shortenedDescription.slice(-1) !== ".") {
shortenedDescription = shortenedDescription + "...";
}
-
+
var placeUrl = "hifi://" + placeRecords[i].name;
if (placeRecords[i].category === "U") { //TO REMOVE ONCE BEACONS GET REMOVED
placeUrl = placeRecords[i].address;
} else if (placeRecords[i].metaverseRegion !== "local") {
placeUrl = "hifi://" + placeRecords[i].address;
}
-
+
//Add the place to the list
-
+
formatedList = formatedList + "";
formatedList = formatedList + "
";
formatedList = formatedList + " ";
@@ -460,12 +463,12 @@
document.getElementById("listInfo").innerHTML = counter + placeInfo + " of " + placeRecords.length + ".";
}
}
-
+
function loadMore() {
loadRecordsUpTo = loadRecordsUpTo + NUMBER_OF_RECORDS_PER_LOAD;
generateContent();
}
-
+
function teleport(placeID, address) {
var teleportOrder = {
"channel": channel,
@@ -476,7 +479,7 @@
EventBridge.emitWebEvent(JSON.stringify(teleportOrder));
}
-
+
function goHome() {
var message = {
"channel": channel,
@@ -484,7 +487,7 @@
};
EventBridge.emitWebEvent(JSON.stringify(message));
}
-
+
function goBack() {
var message = {
"channel": channel,
@@ -492,7 +495,7 @@
};
EventBridge.emitWebEvent(JSON.stringify(message));
}
-
+
function goForward() {
var message = {
"channel": channel,
@@ -509,8 +512,9 @@
"value": pinned
};
EventBridge.emitWebEvent(JSON.stringify(message));
- sleepFor(210);
- reload();
+ document.getElementById("reloading").innerHTML = "RELOADING...";
+ sleepFor(210);
+ reload();
}
function fetchMetaverse(metaverseIndex, fetch) {
@@ -521,10 +525,11 @@
"value": fetch
};
EventBridge.emitWebEvent(JSON.stringify(message));
+ document.getElementById("reloading").innerHTML = "RELOADING...";
sleepFor(210);
reload();
}
-
+
function filterLifeOnly() {
if (lifeOnlyFilter) {
lifeOnlyFilter = false;
@@ -569,7 +574,7 @@
loadRecordsUpTo = NUMBER_OF_RECORDS_PER_LOAD;
generateContent();
}
-
+
function filterMaturity(targeted) {
if (maturityFilter.indexOf(targeted) === -1) {
maturityFilter.push(targeted);
@@ -591,7 +596,7 @@
displaySearchFieldsFilter();
generateContent();
}
-
+
function arrayRemove(arr, value) {
return arr.filter(function(ele){
return ele != value;
@@ -656,13 +661,13 @@
}
}
-
+
function filterSearch() {
document.getElementById("clearBtn").style.display = "block";
loadRecordsUpTo = NUMBER_OF_RECORDS_PER_LOAD;
generateContent();
}
-
+
function teleportUsingAddressBarValue(url) {
var finalizedUrl = url;
if (url.substr(0, 7).toLocaleLowerCase() !== "http://" &&
@@ -679,7 +684,7 @@
loadRecordsUpTo = NUMBER_OF_RECORDS_PER_LOAD;
generateContent();
}
-
+
function displayTab(tab) {
currentListFormat = tab;
if (tab === "PLACES") {
@@ -695,11 +700,11 @@
document.getElementById("listFormatDomains").disabled = false;
document.getElementById("listFormatMetaverse").disabled = true;
}
-
+
loadRecordsUpTo = NUMBER_OF_RECORDS_PER_LOAD;
generateContent();
}
-
+
function openDetail(placeId) {
for (var k=0; k < placeList.length; k++) {
@@ -718,7 +723,7 @@
document.getElementById("placeDetail-placeName").innerHTML = placeDetail.name;
document.getElementById("placeDetail-managers").innerHTML = "By
" + placeDetail.managers;
document.getElementById("placeDetail-description").innerHTML = placeDetail.description;
-
+
var placeUrl = "hifi://" + placeDetail.name;
if (placeDetail.category === "U") { //TO REMOVE ONCE BEACONS GET REMOVED
placeUrl = placeDetail.address;
@@ -737,7 +742,7 @@
document.getElementById("placeDetail-capacity").innerHTML = "CAPACITY: " + capacity + "";
document.getElementById("placeDetail-metaverse").innerHTML = "" + placeDetail.metaverseServer + "";
document.getElementById("placeDetail-region").innerHTML = "" + placeDetail.metaverseRegion.toUpperCase() + "";
-
+
document.getElementById("placeDetail").style.width = "100%";
}
@@ -750,6 +755,21 @@
while(new Date().getTime() < now + milliseconds){ /* do nothing */ }
}
+ function addMS() {
+ var msUrlToAdd = document.getElementById("addMS").value;
+ if (msUrlToAdd.substr(0, 4).toLocaleLowerCase() === "http") {
+ var message = {
+ "channel": channel,
+ "action": "ADD_MS",
+ "metaverseUrl": msUrlToAdd
+ };
+ EventBridge.emitWebEvent(JSON.stringify(message));
+ document.getElementById("reloading").innerHTML = "RELOADING...";
+ sleepFor(210);
+ reload();
+ }
+ }
+
displayMaturityFilter();
document.getElementById("clearBtn").style.display = "none";
document.getElementById("searchFiltersBar").style.display = "none";
diff --git a/scripts/system/places/places.js b/scripts/system/places/places.js
index 056dc2d174..f7c851eeca 100644
--- a/scripts/system/places/places.js
+++ b/scripts/system/places/places.js
@@ -106,8 +106,19 @@
d = new Date();
timestamp = d.getTime();
metaverseServers[messageObj.metaverseIndex].fetch = messageObj.value;
- saveMetaverseToFetchSetting();
-
+ saveMetaverseToFetchSetting();
+ } else if (messageObj.action === "ADD_MS" && (n - timestamp) > INTERCALL_DELAY) {
+ d = new Date();
+ timestamp = d.getTime();
+ var newMs = {
+ "url": messageObj.metaverseUrl,
+ "region": "external",
+ "fetch": false,
+ "pinned": true,
+ "order": "Z"
+ }
+ metaverseServers.push(newMs);
+ savePinnedMetaverseSetting();
}
}
}