mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-08 22:33:24 +00:00
orbis trial
This commit is contained in:
@@ -34,8 +34,6 @@ export default class ModalOrbis extends TranslatedComponent {
|
||||
const target = e.target;
|
||||
target.disabled = true;
|
||||
this.setState({ orbisUrl: 'Sending...' }, () => {
|
||||
console.log(this.props);
|
||||
console.log(this.state)
|
||||
orbisUpload(this.props.ship, this.state.orbisCreds)
|
||||
.then(orbisUrl => {
|
||||
target.disabled = false;
|
||||
@@ -92,6 +90,7 @@ export default class ModalOrbis extends TranslatedComponent {
|
||||
<h3 >{translate('shortened')}</h3>
|
||||
<input value={this.state.orbisUrl} readOnly size={25} onFocus={ (e) => e.target.select() }/>
|
||||
<br/><br/>
|
||||
<p>Orbis.zone is currently in a trial period, and may be wiped at any time as development progresses. Some elements are also still placeholders.</p>
|
||||
<button className={'l cb dismiss cap'} disabled={!!this.state.failed} onClick={this.sendToOrbis}>{translate('PHASE_UPLOAD_ORBIS')}</button>
|
||||
<button className={'r dismiss cap'} onClick={this.context.hideModal}>{translate('close')}</button>
|
||||
</div>;
|
||||
|
||||
@@ -335,7 +335,7 @@
|
||||
"horizons": "Horizons",
|
||||
"horizons required": "Only available to those who have purchased Elite Dangerous: Horizons",
|
||||
"horizons early adoption": "Horizons Early Adopter",
|
||||
"PHASE_UPLOAD_ORBIS": "Upload to orbis.zone (Coming soon!)",
|
||||
"PHASE_UPLOAD_ORBIS": "Upload to orbis.zone (Currently in trial period.)",
|
||||
"orbis username": "Username/email for orbis.zone",
|
||||
"orbis password": "Password for orbis.zone",
|
||||
"horizons early adoption required": "Only available to those who purchased Elite Dangerous: Horizons on PC before February 5, 2016 or on Xbox One before July 30, 2016",
|
||||
|
||||
@@ -514,8 +514,8 @@ export default class OutfittingPage extends Page {
|
||||
console.log(this.state);
|
||||
ship.coriolisId = ship.id;
|
||||
data.coriolisShip = ship;
|
||||
data.title = this.state.buildName;
|
||||
data.description = this.state.buildName;
|
||||
data.title = this.state.buildName || ship.id;
|
||||
data.description = this.state.buildName || ship.id;
|
||||
data.ShipName = ship.id;
|
||||
data.Ship = ship.id;
|
||||
this.context.showModal(<ModalOrbis ship={data}/>);
|
||||
@@ -644,7 +644,7 @@ export default class OutfittingPage extends Page {
|
||||
<button onClick={this._genShortlink} onMouseOver={termtip.bind(null, 'shortlink')} onMouseOut={hide}>
|
||||
<LinkIcon className='lg' />
|
||||
</button>
|
||||
<button onClick={this._genOrbis} disabled={true} onMouseOver={termtip.bind(null, 'PHASE_UPLOAD_ORBIS')} onMouseOut={hide}>
|
||||
<button onClick={this._genOrbis} onMouseOver={termtip.bind(null, 'PHASE_UPLOAD_ORBIS')} onMouseOut={hide}>
|
||||
<OrbisIcon className='lg' />
|
||||
</button>
|
||||
<button onClick={this._genShoppingList} onMouseOver={termtip.bind(null, 'PHRASE_SHOPPING_MATS')} onMouseOut={hide}>
|
||||
|
||||
@@ -95,8 +95,8 @@ function orbisShorten(url, success, error) {
|
||||
}
|
||||
}
|
||||
|
||||
const API_ORBIS = 'http://localhost:3000/builds/add';
|
||||
const API_ORBIS_LOGIN = 'http://localhost:3000/login';
|
||||
const API_ORBIS = 'https://orbis.zone/api/builds/add';
|
||||
const API_ORBIS_LOGIN = 'https://orbis.zone/api/login';
|
||||
|
||||
/**
|
||||
* Upload to Orbis
|
||||
@@ -111,6 +111,7 @@ export function orbisUpload(ship, creds) {
|
||||
agent
|
||||
.post(API_ORBIS_LOGIN)
|
||||
.send(creds)
|
||||
.redirects(0)
|
||||
.withCredentials()
|
||||
.end(function(err) {
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user