Merge pull request #439 from kasenvr/fix/remove-goto

Remove old goto, update Explore app.
This commit is contained in:
kasenvr 2020-06-11 17:24:48 -04:00 committed by GitHub
commit 2ae304864e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 9 deletions

View file

@ -73,6 +73,9 @@
<body onload="retrieveAddressList()">
<h3>Explore</h3>
<button class="myButton" onclick="navigateBack()">< Back</button>
<button class="myButton" onclick="navigateHome()">Home</button>
<button class="myButton" onclick="navigateForward()">Forward ></button>
<input type="text" id="domainAddressInput" placeholder="Type domain address here">
@ -85,15 +88,36 @@
<script>
function myDomainAddressInputGoTo() {
var hifiUrl = document.getElementById("domainAddressInput").value;
if (hifiUrl != "") {
var vircadiaUrl = document.getElementById("domainAddressInput").value;
if (vircadiaUrl !== "") {
var readyEvent = {
"action": "goToUrl",
"visit": hifiUrl,
"visit": vircadiaUrl,
};
EventBridge.emitWebEvent(JSON.stringify(readyEvent));
}
}
function navigateBack() {
var readyEvent = {
"action": "navigateBack"
}
EventBridge.emitWebEvent(JSON.stringify(readyEvent));
}
function navigateHome() {
var readyEvent = {
"action": "navigateHome"
}
EventBridge.emitWebEvent(JSON.stringify(readyEvent));
}
function navigateForward() {
var readyEvent = {
"action": "navigateForward"
}
EventBridge.emitWebEvent(JSON.stringify(readyEvent));
}
function navigateTo(url) {
var readyEvent = {

View file

@ -48,7 +48,7 @@
function onWebEventReceived(event) {
messageData = JSON.parse(event);
if (messageData.action == "requestAddressList") {
if (messageData.action === "requestAddressList") {
goToAddresses = Settings.getValue("goToDecentral", "");
for (var i = 0; i < goToAddresses.length; i++) {
@ -80,14 +80,27 @@
tablet.emitScriptEvent(JSON.stringify(readyEvent));
} else if (messageData.action == "goToUrl") {
} else if (messageData.action === "goToUrl") {
Window.location = messageData.visit;
} else if (messageData.action == "addLocation") {
} else if (messageData.action === "navigateBack") {
location.goBack();
} else if (messageData.action === "navigateHome") {
if (LocationBookmarks.getHomeLocationAddress()) {
location.handleLookupString(LocationBookmarks.getHomeLocationAddress());
} else {
location.goToLocalSandbox();
}
} else if (messageData.action === "navigateForward") {
location.goForward();
} else if (messageData.action === "addLocation") {
var locationBoxUserData = {
owner: messageData.owner,
domainName: messageData.domainName,
port: messageData.Port,
ipAddress: null,
avatarCountRadius: null,
customPath: null,
grabbableKey: {
grabbable: false
}
@ -105,7 +118,7 @@
collisionless: true,
grabbable: false
});
} else if (messageData.action == "retrievePortInformation") {
} else if (messageData.action === "retrievePortInformation") {
var readyEvent = {
"action": "retrievePortInformationResponse",
"goToAddresses": goToAddresses

View file

@ -23,7 +23,6 @@ var DEFAULT_SCRIPTS_COMBINED = [
"system/pal.js", // "system/mod.js", // older UX, if you prefer
"system/avatarapp.js",
"system/makeUserConnection.js",
"system/tablet-goto.js",
"system/marketplaces/marketplaces.js",
"system/notifications.js",
"system/commerce/wallet.js",
@ -41,7 +40,7 @@ var DEFAULT_SCRIPTS_SEPARATE = [
"system/controllers/controllerScripts.js",
"communityModules/notificationCore/notificationCore.js",
"simplifiedUI/ui/simplifiedNametag/simplifiedNametag.js",
{"stable": "system/more/app-more.js", "beta": "https://kasenvr.github.io/community-apps/more/app-more.js"},
{"stable": "system/more/app-more.js", "beta": "https://cdn.vircadia.com/community-apps/more/app-more.js"},
{"stable": "communityScripts/explore/explore.js", "beta": "https://metaverse.vircadia.com/interim/d-goto/app/explore.js"},
{"stable": "communityModules/chat/FloofChat.js", "beta": "https://content.fluffy.ws/scripts/chat/FloofChat.js"}
//"system/chat.js"