Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
🔖 Release v2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
GitSquared committed May 19, 2019
1 parent 507a088 commit 590c675
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 34 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<a href="#featured-in"><img alt="undefined" src="https://img.shields.io/github/downloads/GitSquared/edex-ui/total.svg?style=popout"></a>
<a href="https://github.com/GitSquared/edex-ui/blob/master/LICENSE"><img alt="undefined" src="https://img.shields.io/github/license/GitSquared/edex-ui.svg?style=popout"></a>
<br>
<a href="https://github.com/GitSquared/edex-ui/releases/download/v2.2.1/eDEX-UI.Windows.Installer.exe" target="_blank"><img alt="undefined" src="https://badgen.net/badge//Windows/blue?icon=windows"></a>
<a href="https://github.com/GitSquared/edex-ui/releases/download/v2.2.1/eDEX-UI.MacOS.Image.dmg" target="_blank"><img alt="undefined" src="https://badgen.net/badge//macOS/grey?icon=apple"></a>
<a href="https://github.com/GitSquared/edex-ui/releases/download/v2.2.1/eDEX-UI.Linux.x86_64.AppImage" target="_blank"><img alt="undefined" src="https://badgen.net/badge//Linux64/orange?icon=terminal"></a>
<a href="https://github.com/GitSquared/edex-ui/releases/download/v2.2.1/eDEX-UI.Linux.i386.AppImage" target="_blank"><img alt="undefined" src="https://badgen.net/badge//Linux32/orange?icon=terminal"></a>
<a href="https://github.com/GitSquared/edex-ui/releases/download/v2.2.2/eDEX-UI.Windows.Installer.exe" target="_blank"><img alt="undefined" src="https://badgen.net/badge//Windows/blue?icon=windows"></a>
<a href="https://github.com/GitSquared/edex-ui/releases/download/v2.2.2/eDEX-UI.MacOS.Image.dmg" target="_blank"><img alt="undefined" src="https://badgen.net/badge//macOS/grey?icon=apple"></a>
<a href="https://github.com/GitSquared/edex-ui/releases/download/v2.2.2/eDEX-UI.Linux.x86_64.AppImage" target="_blank"><img alt="undefined" src="https://badgen.net/badge//Linux64/orange?icon=terminal"></a>
<a href="https://github.com/GitSquared/edex-ui/releases/download/v2.2.2/eDEX-UI.Linux.i386.AppImage" target="_blank"><img alt="undefined" src="https://badgen.net/badge//Linux32/orange?icon=terminal"></a>
<a href="https://aur.archlinux.org/packages/edex-ui" target="_blank"><img alt="undefined" src="https://badgen.net/badge/AUR/Package/cyan"></a>
<br><br><br>
</p>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "edex-ui",
"productName": "eDEX-UI",
"version": "3.0.0-pre",
"version": "2.2.2",
"description": "A science fiction desktop running everywhere. Awesome.",
"keywords": [
"desktop",
Expand Down
16 changes: 8 additions & 8 deletions src/classes/locationGlobe.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class LocationGlobe {
// Connections
this.conns = [];
this.addConn = ip => {
require("https").get({host: "ipinfo.now.sh", port: 443, path: "/"+ip, localAddress: window.mods.netstat.internalIPv4, agent: false}, res => {
require("https").get({host: "freegeoip.app", port: 443, path: "/json/"+ip, localAddress: window.mods.netstat.internalIPv4, agent: false}, res => {
let rawData = "";
res.on("data", chunk => {
rawData += chunk;
Expand Down Expand Up @@ -135,9 +135,9 @@ class LocationGlobe {

async parseResponse(rawData, ip) {
const json = JSON.parse(rawData);
if (json.geo) {
const lat = Number(json.geo.latitude);
const lon = Number(json.geo.longitude);
if (json.latitude && json.longitude) {
const lat = Number(json.latitude);
const lon = Number(json.longitude);

window.mods.globe.conns.push({
ip,
Expand All @@ -153,7 +153,7 @@ class LocationGlobe {
this.globe.addMarker(randomLat - 20, randomLong + 150, '', true);
}
addTemporaryConnectedMarker(ip) {
require("https").get({host: "ipinfo.now.sh", port: 443, path: "/"+ip, localAddress: window.mods.netstat.internalIPv4, agent: false}, res => {
require("https").get({host: "freegeoip.app", port: 443, path: "/json/"+ip, localAddress: window.mods.netstat.internalIPv4, agent: false}, res => {
let rawData = "";
res.on("data", chunk => {
rawData += chunk;
Expand All @@ -165,9 +165,9 @@ class LocationGlobe {
} catch(e) {
return;
}
if (json.geo) {
const lat = Number(json.geo.latitude);
const lon = Number(json.geo.longitude);
if (json.latitude && json.longitude) {
const lat = Number(json.latitude);
const lon = Number(json.longitude);

window.mods.globe.conns.push({
ip,
Expand Down
23 changes: 16 additions & 7 deletions src/classes/netstat.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,28 @@ class Netstat {
offline = true;
} else {
if (this.lastconn.finished) {
this.lastconn = require("https").get({host: "ipinfo.now.sh", port: 443, path: "/", localAddress: net.ip4, agent: this._httpsAgent}, res => {
this.lastconn = require("https").get({host: "freegeoip.app", port: 443, path: "/json/", localAddress: net.ip4, agent: this._httpsAgent}, res => {
let rawData = "";
res.on("data", chunk => {
rawData += chunk;
});
res.on("end", () => {
try {
this.ipinfo = JSON.parse(rawData);

if (!this.ipinfo.api_version.startsWith("3")) console.warn("Warning: ipinfo API version might not be compatible");

delete this.ipinfo.api_version;
delete this.ipinfo.time;
let data = JSON.parse(rawData);
this.ipinfo = {
ip: data.ip,
geo: {
latitude: data.latitude,
longitude: data.longitude,
metro_code: data.zip_code,
time_zone: data.time_zone
}
};

// if (!this.ipinfo.api_version.startsWith("3")) console.warn("Warning: ipinfo API version might not be compatible");

// delete this.ipinfo.api_version;
// delete this.ipinfo.time;
let ip = this.ipinfo.ip;
document.querySelector("#mod_netstat_innercontainer > div:nth-child(2) > h2").innerHTML = window._escapeHtml(ip);
} catch(e) {
Expand Down
20 changes: 10 additions & 10 deletions src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "edex-ui",
"productName": "eDEX-UI",
"version": "3.0.0-pre",
"version": "2.2.2",
"description": "eDEX-UI sci-fi interface",
"keywords": [
"desktop",
Expand All @@ -25,16 +25,16 @@
"dependencies": {
"color": "3.1.1",
"howler": "2.1.2",
"nanoid": "2.0.1",
"nanoid": "2.0.2",
"node-pty": "0.8.1",
"pretty-bytes": "5.2.0",
"shell-env": "3.0.0",
"signale": "1.4.0",
"smoothie": "1.35.0",
"systeminformation": "4.4.1",
"systeminformation": "4.5.1",
"tail": "2.0.2",
"ws": "7.0.0",
"xterm": "3.13.0",
"xterm": "3.13.1",
"username": "5.0.0"
},
"optionalDependencies": {
Expand Down

0 comments on commit 590c675

Please sign in to comment.