From 158de9125a7303352e076e746e231e8926bfc8ce Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Fri, 18 Aug 2023 14:30:48 -0400 Subject: [PATCH] Home button fallback to Tutorial Previously, the Home button, in the case where there is no home bookmark defined, was redirecting to localhost. But some peopl emight not have a localhost domain server running. This PR change the fallback to the Tutorial instead of localhost, In addition, the tutorial place card wasn't work correctly. (it was trying to use the name instead of the address. I added an exception case for this. --- scripts/system/places/places.html | 3 +++ scripts/system/places/places.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/system/places/places.html b/scripts/system/places/places.html index 243e3269961..5dbb11b9075 100644 --- a/scripts/system/places/places.html +++ b/scripts/system/places/places.html @@ -425,6 +425,9 @@ if (placeRecords[i].metaverseRegion !== "local") { placeUrl = "hifi://" + placeRecords[i].address; } + if (placeRecords[i].name === "tutorial") { + placeUrl = "file:///~/serverless/tutorial.json"; + } //Add the place to the list diff --git a/scripts/system/places/places.js b/scripts/system/places/places.js index af7a7ece1bc..b9cd49bb1fe 100644 --- a/scripts/system/places/places.js +++ b/scripts/system/places/places.js @@ -94,7 +94,7 @@ if (LocationBookmarks.getHomeLocationAddress()) { location.handleLookupString(LocationBookmarks.getHomeLocationAddress()); } else { - location.goToLocalSandbox(); + Window.location = "file:///~/serverless/tutorial.json"; } } else if (messageObj.action === "GO_BACK" && (n - timestamp) > INTERCALL_DELAY) { location.goBack(); @@ -442,7 +442,7 @@ "domain": "", "domainOrder": "ZZZZZZZZZZZZZZZ", "metaverseServer": "", - "metaverseRegion": "local" + "metaverseRegion": "local" }; portalList.push(tutorialPortal);