-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9582057
commit 21c9756
Showing
5 changed files
with
138 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
const API_BASE_URL_PROD = 'https://api.ardent-industry.com' | ||
const API_BASE_URL_LOCAL = 'http://localhost:3001/api' | ||
const API_BASE_URL = API_BASE_URL_PROD | ||
|
||
const API_BASE_URL = process?.env?.NODE_ENV === 'development' | ||
? API_BASE_URL_LOCAL | ||
: API_BASE_URL_PROD | ||
|
||
const SOL_COORDINATES = [0, 0, 0] | ||
const COLONIA_COORDINATES = [-9530.5, -910.28125, 19808.125] | ||
|
||
module.exports = { | ||
API_BASE_URL, | ||
API_BASE_URL_PROD, | ||
API_BASE_URL_LOCAL, | ||
SOL_COORDINATES, | ||
COLONIA_COORDINATES | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
import { useState, useEffect } from 'react' | ||
import Link from 'next/link' | ||
import Layout from 'components/layout' | ||
import { API_BASE_URL } from 'lib/consts' | ||
|
||
import Package from 'package.json' | ||
import Dialog from 'components/dialog' | ||
|
||
|
||
export default () => { | ||
const [stats, setStats] = useState() | ||
const [version, setVersion] = useState() | ||
|
||
useEffect(() => { | ||
(async () => { | ||
const res = await fetch(`${API_BASE_URL}/v1/stats`) | ||
const stats = await res.json() | ||
setStats(stats) | ||
})() | ||
;(async () => { | ||
const res = await fetch(`${API_BASE_URL}/v1/version`) | ||
const version = await res.json() | ||
setVersion(version) | ||
})() | ||
}, []) | ||
|
||
|
||
const [backupData, setBackupData] = useState() | ||
|
||
useEffect(() => { | ||
(async () => { | ||
//const res = await fetch(`${API_BASE_URL}/v1/backup`) | ||
//setBackupData(await res.json()) | ||
})() | ||
}, []) | ||
return ( | ||
<Layout> | ||
<div className='fx__fade-in'> | ||
<h1 className='heading--with-icon'> | ||
About | ||
</h1> | ||
<p className='clear'> | ||
Ardent Industry is companion software for <a href='https://www.elitedangerous.com/' rel='noreferrer' target='_blank'>Elite Dangerous</a>. | ||
</p> | ||
<p> | ||
ArdentOS v{Package.version} | ||
{' '} | ||
{version && | ||
<a style={{ textTransform: 'none' }} href={API_BASE_URL} rel='noreferrer' target='_blank' className='muted'> | ||
[ API v{version.version} ] | ||
</a>} | ||
</p> | ||
{stats && | ||
<> | ||
<p> | ||
Processed {stats.updatedInLast24Hours.toLocaleString()} updates in the last 24 hours. | ||
</p> | ||
<ul className='clear'> | ||
<li> | ||
Star systems: {stats.systems.toLocaleString()} | ||
</li> | ||
<li> | ||
Stations/settlements: {stats.stations.stations.toLocaleString()} | ||
</li> | ||
<li> | ||
Fleet carriers: {stats.stations.carriers.toLocaleString()} | ||
</li> | ||
<li> | ||
Trade orders: {stats.trade.tradeOrders.toLocaleString()} | ||
</li> | ||
<li> | ||
Trade markets: {(stats.trade.stations + stats.trade.carriers).toLocaleString()} | ||
</li> | ||
<li> | ||
Trade systems: {stats.trade.systems.toLocaleString()} | ||
</li> | ||
<li> | ||
Points of interest: {stats.pointsOfInterest.toLocaleString()} | ||
</li> | ||
</ul> | ||
</>} | ||
<p> | ||
Data from <a href='https://eddn.edcd.io' rel='noreferrer' target='_blank'>EDDN</a>, which is run by <a href='https://edcd.github.io/' rel='noreferrer' target='_blank'>EDCD</a>. | ||
</p> | ||
<h3>Downloads</h3> | ||
<p className='clear'> | ||
Both the source for the software and the raw data for Ardent Industry are available for download. | ||
</p> | ||
<ul> | ||
<li><a href='https://github.com/iaincollins/ardent-www' rel='noreferrer' target='_blank'>ArdentOS</a></li> | ||
<li><a href='https://github.com/iaincollins/ardent-api' rel='noreferrer' target='_blank'>Ardent API</a></li> | ||
<li><a href='https://github.com/iaincollins/ardent-collector' rel='noreferrer' target='_blank'>Ardent Collector</a></li> | ||
<li><a href='/downloads' rel='noreferrer' target='_blank'>Download Data</a></li> | ||
</ul> | ||
<h3>Legal</h3> | ||
<p className='clear'> | ||
Released under GNU Affero General Public License. | ||
</p> | ||
<p> | ||
Elite Dangerous is copyright Frontier Developments plc. This software is | ||
not endorsed by nor reflects the views or opinions of Frontier Developments and | ||
no employee of Frontier Developments was involved in the making of it. | ||
</p> | ||
</div> | ||
</Layout> | ||
) | ||
} |