orbis trial

This commit is contained in:
willyb321
2018-07-31 15:13:25 +10:00
parent de1cb901fc
commit 736c700aa0
4 changed files with 1062 additions and 1062 deletions

View File

@@ -34,8 +34,6 @@ export default class ModalOrbis extends TranslatedComponent {
const target = e.target; const target = e.target;
target.disabled = true; target.disabled = true;
this.setState({ orbisUrl: 'Sending...' }, () => { this.setState({ orbisUrl: 'Sending...' }, () => {
console.log(this.props);
console.log(this.state)
orbisUpload(this.props.ship, this.state.orbisCreds) orbisUpload(this.props.ship, this.state.orbisCreds)
.then(orbisUrl => { .then(orbisUrl => {
target.disabled = false; target.disabled = false;
@@ -92,6 +90,7 @@ export default class ModalOrbis extends TranslatedComponent {
<h3 >{translate('shortened')}</h3> <h3 >{translate('shortened')}</h3>
<input value={this.state.orbisUrl} readOnly size={25} onFocus={ (e) => e.target.select() }/> <input value={this.state.orbisUrl} readOnly size={25} onFocus={ (e) => e.target.select() }/>
<br/><br/> <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={'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> <button className={'r dismiss cap'} onClick={this.context.hideModal}>{translate('close')}</button>
</div>; </div>;

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -95,8 +95,8 @@ function orbisShorten(url, success, error) {
} }
} }
const API_ORBIS = 'http://localhost:3000/builds/add'; const API_ORBIS = 'https://orbis.zone/api/builds/add';
const API_ORBIS_LOGIN = 'http://localhost:3000/login'; const API_ORBIS_LOGIN = 'https://orbis.zone/api/login';
/** /**
* Upload to Orbis * Upload to Orbis
@@ -111,6 +111,7 @@ export function orbisUpload(ship, creds) {
agent agent
.post(API_ORBIS_LOGIN) .post(API_ORBIS_LOGIN)
.send(creds) .send(creds)
.redirects(0)
.withCredentials() .withCredentials()
.end(function(err) { .end(function(err) {
if (err) { if (err) {