mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-09 06:43:24 +00:00
orbis fixes
This commit is contained in:
@@ -113,9 +113,9 @@ export default class Coriolis extends React.Component {
|
||||
|
||||
async _getAnnouncements() {
|
||||
try {
|
||||
const announces = await request.get('https://orbis.zone/api/announcement')
|
||||
.query({ showInCoriolis: true });
|
||||
this.setState({ announcements: announces.body });
|
||||
const announces = await request.get('https://api.orbis.zone/announcements')
|
||||
.query({ coriolis: true });
|
||||
this.setState({ announcements: announces });
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
}
|
||||
|
||||
@@ -426,7 +426,10 @@ export default class Header extends TranslatedComponent {
|
||||
if (this.props.announcements) {
|
||||
announcements = [];
|
||||
for (let announce of this.props.announcements) {
|
||||
announcements.push(<Announcement text={announce.message} />);
|
||||
if (announce.expiry < Date.now()) {
|
||||
continue;
|
||||
}
|
||||
announcements.push(<Announcement text={announce.text} />);
|
||||
announcements.push(<hr/>);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -686,13 +686,12 @@ export default class OutfittingPage extends Page {
|
||||
_genOrbis() {
|
||||
const data = {};
|
||||
const ship = this.state.ship;
|
||||
ship.coriolisId = ship.id;
|
||||
data.coriolisShip = ship;
|
||||
data.url = window.location.href;
|
||||
data.title = this.state.buildName || ship.id;
|
||||
data.description = this.state.buildName || ship.id;
|
||||
data.ShipName = ship.id;
|
||||
data.Ship = ship.id;
|
||||
data.body = ship;
|
||||
data.url = `https://coriolis.io${outfitURL(ship.id, ship.toString(), data.title)}`;
|
||||
ship.type = ship.id;
|
||||
|
||||
console.log(data);
|
||||
this.context.showModal(<ModalOrbis ship={data} />);
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ function orbisShorten(url, success, error) {
|
||||
}
|
||||
}
|
||||
|
||||
const API_ORBIS = 'https://orbis.zone/api/builds/add';
|
||||
const API_ORBIS = 'https://api.orbis.zone/ships';
|
||||
/**
|
||||
* Upload to Orbis
|
||||
* @param {object} ship The URL to shorten
|
||||
|
||||
Reference in New Issue
Block a user