From 1a02b918d755a38d2c8cfe544a3e27d784e6e85e Mon Sep 17 00:00:00 2001 From: Martin Allerton Date: Sat, 21 Aug 2021 23:05:11 +0100 Subject: [PATCH] formatting changes and added axios license Updates following comment from ctrlaltdavid --- scripts/communityScripts/explore/explore.html | 31 +++++++++---------- .../communityScripts/libraries/axios/LICENSE | 19 ++++++++++++ 2 files changed, 34 insertions(+), 16 deletions(-) create mode 100644 scripts/communityScripts/libraries/axios/LICENSE diff --git a/scripts/communityScripts/explore/explore.html b/scripts/communityScripts/explore/explore.html index 747e969daa..51f2045915 100644 --- a/scripts/communityScripts/explore/explore.html +++ b/scripts/communityScripts/explore/explore.html @@ -306,13 +306,13 @@ if (locationData != null) { for (var i = 0; i < locationData.length; i++) { joinedData.push({ - "index": joinedData.length - , "location": locationData[i].Visit - , "name": locationData[i]['Domain Name'] - , "owner": locationData[i].Owner - , "userCount": locationData[i].People - , "description": "" - , "thumbnail": "" + "index": joinedData.length, + "location": locationData[i].Visit, + "name": locationData[i]['Domain Name'], + "owner": locationData[i].Owner, + "userCount": locationData[i].People, + "description": "", + "thumbnail": "" }); } } @@ -325,13 +325,13 @@ for (var i = 0; i < placesData.length; i++) { if (placesData[i].domain.active && placesData[i].visibility == "open" && new Date(placesData[i].last_activity_update) > activeThresholdTime) { joinedData.push({ - "index": joinedData.length - , "location": placesData[i].address - , "name": placesData[i].name - , "owner": placesData[i].managers[0] - , "userCount": placesData[i].current_attendance - , "description": placesData[i].description - , "thumbnail": placesData[i].thumbnail + "index": joinedData.length, + "location": placesData[i].address, + "name": placesData[i].name, + "owner": placesData[i].managers[0], + "userCount": placesData[i].current_attendance, + "description": placesData[i].description, + "thumbnail": placesData[i].thumbnail }); } } @@ -353,11 +353,10 @@ // if metaverse data not loaded fire a request for it if (placesData == null) { - // TODO: fire off data get against the metaverse + // fire off data get against the metaverse axios.get("https://metaverse.vircadia.com/live/api/v1/places") .then((response) => { placesData = response.data.data.places; - exploreComponent.updateData(blendedData()); }) .catch(function (error) { diff --git a/scripts/communityScripts/libraries/axios/LICENSE b/scripts/communityScripts/libraries/axios/LICENSE new file mode 100644 index 0000000000..2d8d66aa4e --- /dev/null +++ b/scripts/communityScripts/libraries/axios/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014-present Matt Zabriskie + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file