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()"> <body onload="retrieveAddressList()">
<h3>Explore</h3> <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"> <input type="text" id="domainAddressInput" placeholder="Type domain address here">
@ -85,15 +88,36 @@
<script> <script>
function myDomainAddressInputGoTo() { function myDomainAddressInputGoTo() {
var hifiUrl = document.getElementById("domainAddressInput").value; var vircadiaUrl = document.getElementById("domainAddressInput").value;
if (hifiUrl != "") { if (vircadiaUrl !== "") {
var readyEvent = { var readyEvent = {
"action": "goToUrl", "action": "goToUrl",
"visit": hifiUrl, "visit": vircadiaUrl,
}; };
EventBridge.emitWebEvent(JSON.stringify(readyEvent)); 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) { function navigateTo(url) {
var readyEvent = { var readyEvent = {

View file

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

View file

@ -23,7 +23,6 @@ var DEFAULT_SCRIPTS_COMBINED = [
"system/pal.js", // "system/mod.js", // older UX, if you prefer "system/pal.js", // "system/mod.js", // older UX, if you prefer
"system/avatarapp.js", "system/avatarapp.js",
"system/makeUserConnection.js", "system/makeUserConnection.js",
"system/tablet-goto.js",
"system/marketplaces/marketplaces.js", "system/marketplaces/marketplaces.js",
"system/notifications.js", "system/notifications.js",
"system/commerce/wallet.js", "system/commerce/wallet.js",
@ -41,7 +40,7 @@ var DEFAULT_SCRIPTS_SEPARATE = [
"system/controllers/controllerScripts.js", "system/controllers/controllerScripts.js",
"communityModules/notificationCore/notificationCore.js", "communityModules/notificationCore/notificationCore.js",
"simplifiedUI/ui/simplifiedNametag/simplifiedNametag.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": "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"} {"stable": "communityModules/chat/FloofChat.js", "beta": "https://content.fluffy.ws/scripts/chat/FloofChat.js"}
//"system/chat.js" //"system/chat.js"