Skip to content

Commit

Permalink
Home button fallback to Tutorial
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AleziaKurdis authored Aug 18, 2023
1 parent d42b7fd commit 158de91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions scripts/system/places/places.html
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions scripts/system/places/places.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -442,7 +442,7 @@
"domain": "",
"domainOrder": "ZZZZZZZZZZZZZZZ",
"metaverseServer": "",
"metaverseRegion": "local"
"metaverseRegion": "local"
};
portalList.push(tutorialPortal);

Expand Down

0 comments on commit 158de91

Please sign in to comment.