mirror of
https://github.com/chaoticbackup/chaoticbackup.github.io.git
synced 2026-03-21 17:24:14 -05:00
support full art without portal entry
This commit is contained in:
parent
edf9aeac3d
commit
e604222d18
|
|
@ -23,31 +23,37 @@ export default class SingleAttack extends React.Component {
|
|||
let name = decodeURIComponent(path[3]);
|
||||
|
||||
const attack = API.portal.attacks.findOne({'gsx$name': name});
|
||||
if (!attack) {
|
||||
return(<PageNotFound location={this.props.location}/>);
|
||||
}
|
||||
|
||||
const card_data = API.cards.attacks.findOne({'gsx$name': name});
|
||||
|
||||
return (<Single
|
||||
card={card_data}
|
||||
col2={<React.Fragment>
|
||||
<div>
|
||||
<strong>Attributes:</strong><br />
|
||||
{attack.gsx$attributes}
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<strong>Background:</strong><br />
|
||||
{attack.gsx$background}
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<strong>Details:</strong><br />
|
||||
{attack.gsx$details}
|
||||
</div>
|
||||
</React.Fragment>}
|
||||
/>
|
||||
);
|
||||
if (attack) {
|
||||
return (<Single
|
||||
card={card_data}
|
||||
col2={<React.Fragment>
|
||||
<div>
|
||||
<strong>Attributes:</strong><br />
|
||||
{attack.gsx$attributes}
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<strong>Background:</strong><br />
|
||||
{attack.gsx$background}
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<strong>Details:</strong><br />
|
||||
{attack.gsx$details}
|
||||
</div>
|
||||
</React.Fragment>}
|
||||
/>
|
||||
);
|
||||
}
|
||||
else {
|
||||
if (card_data.gsx$splash) {
|
||||
return (<Single card={card_data}/>);
|
||||
}
|
||||
else {
|
||||
return(<PageNotFound location={this.props.location}/>);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,30 +23,36 @@ export default class SingleBattlegear extends React.Component {
|
|||
let name = decodeURIComponent(path[3]);
|
||||
|
||||
const battlegear = API.portal.battlegear.findOne({'gsx$name': name});
|
||||
if (!battlegear) {
|
||||
return(<PageNotFound location={this.props.location}/>);
|
||||
}
|
||||
|
||||
const card_data = API.cards.battlegear.findOne({'gsx$name': name});
|
||||
|
||||
return (<Single
|
||||
card={card_data}
|
||||
col2={<React.Fragment>
|
||||
<div>
|
||||
<strong>Attributes:</strong><br />
|
||||
{battlegear.gsx$attributes}
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<strong>Background:</strong><br />
|
||||
{battlegear.gsx$background}
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<strong>Details:</strong><br />
|
||||
{battlegear.gsx$details}
|
||||
</div>
|
||||
</React.Fragment>}
|
||||
/>);
|
||||
if (battlegear) {
|
||||
return (<Single
|
||||
card={card_data}
|
||||
col2={<React.Fragment>
|
||||
<div>
|
||||
<strong>Attributes:</strong><br />
|
||||
{battlegear.gsx$attributes}
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<strong>Background:</strong><br />
|
||||
{battlegear.gsx$background}
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<strong>Details:</strong><br />
|
||||
{battlegear.gsx$details}
|
||||
</div>
|
||||
</React.Fragment>}
|
||||
/>);
|
||||
}
|
||||
else {
|
||||
if (card_data.gsx$splash) {
|
||||
return (<Single card={card_data}/>);
|
||||
}
|
||||
else {
|
||||
return(<PageNotFound location={this.props.location}/>);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
import React from 'react';
|
||||
import Interactive from 'react-interactive';
|
||||
import { Link } from 'react-router-dom';
|
||||
import API from '../../SpreadsheetData';
|
||||
import s from '../../../styles/app.style';
|
||||
import {observer, inject} from 'mobx-react';
|
||||
import Single from './_base';
|
||||
import {PageNotFound, Initiative} from '../../Snippets';
|
||||
|
|
@ -23,36 +20,50 @@ export default class SingleLocation extends React.Component {
|
|||
let name = decodeURIComponent(path[3]);
|
||||
|
||||
const location = API.portal.locations.findOne({'gsx$name': name});
|
||||
if (!location) {
|
||||
return(<PageNotFound location={this.props.location}/>);
|
||||
}
|
||||
|
||||
const card_data = API.cards.locations.findOne({'gsx$name': name});
|
||||
|
||||
return (<Single
|
||||
card={card_data}
|
||||
col0={<React.Fragment>
|
||||
<div>
|
||||
<strong>Initiative: </strong>
|
||||
<Initiative initiative={card_data.gsx$initiative} notitle="true"/>
|
||||
</div>
|
||||
</React.Fragment>}
|
||||
col2={<React.Fragment>
|
||||
<div>
|
||||
<strong>Local Features:</strong><br />
|
||||
{location.gsx$localfeatures}
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<strong>Background:</strong><br />
|
||||
{location.gsx$background}
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<strong>Details:</strong><br />
|
||||
{location.gsx$details}
|
||||
</div>
|
||||
</React.Fragment>}
|
||||
/>);
|
||||
if (location) {
|
||||
return (<Single
|
||||
card={card_data}
|
||||
col0={<React.Fragment>
|
||||
<div>
|
||||
<strong>Initiative: </strong>
|
||||
<Initiative initiative={card_data.gsx$initiative} notitle="true"/>
|
||||
</div>
|
||||
</React.Fragment>}
|
||||
col2={<React.Fragment>
|
||||
<div>
|
||||
<strong>Local Features:</strong><br />
|
||||
{location.gsx$localfeatures}
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<strong>Background:</strong><br />
|
||||
{location.gsx$background}
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<strong>Details:</strong><br />
|
||||
{location.gsx$details}
|
||||
</div>
|
||||
</React.Fragment>}
|
||||
/>);
|
||||
}
|
||||
else {
|
||||
if (card_data.gsx$splash) {
|
||||
return (<Single
|
||||
card={card_data}
|
||||
col0={<React.Fragment>
|
||||
<div>
|
||||
<strong>Initiative: </strong>
|
||||
<Initiative initiative={card_data.gsx$initiative} notitle="true"/>
|
||||
</div>
|
||||
</React.Fragment>}
|
||||
/>);
|
||||
}
|
||||
else {
|
||||
return(<PageNotFound location={this.props.location}/>);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
import React from 'react';
|
||||
import Interactive from 'react-interactive';
|
||||
import { Link } from 'react-router-dom';
|
||||
import API from '../../SpreadsheetData';
|
||||
import s from '../../../styles/app.style';
|
||||
import {observer, inject} from 'mobx-react';
|
||||
import Single from './_base';
|
||||
import {PageNotFound, Rarity, Unique, Name, Element, Mugic, Discipline, Ability, Tribe} from '../../Snippets';
|
||||
import {PageNotFound, Mugic, Tribe} from '../../Snippets';
|
||||
|
||||
@inject((stores, props, context) => props) @observer
|
||||
export default class SingleMugic extends React.Component {
|
||||
|
|
@ -25,52 +23,71 @@ export default class SingleMugic extends React.Component {
|
|||
})();
|
||||
|
||||
const mugic = API.portal.mugic.findOne({'gsx$name': name});
|
||||
|
||||
if (!mugic) {
|
||||
return(<PageNotFound location={this.props.location}/>);
|
||||
}
|
||||
|
||||
const tribe = mugic.gsx$tribe;
|
||||
|
||||
const card_data = API.cards.mugic.findOne({'gsx$name': name});
|
||||
|
||||
let cost = [];
|
||||
if (card_data.gsx$cost == 0) {
|
||||
cost.push(<span key={0}>0</span>);
|
||||
}
|
||||
else if (card_data.gsx$cost.toLowerCase() == 'x') {
|
||||
cost.push(<span key={0}>X</span>);
|
||||
}
|
||||
else {
|
||||
for (let i = 0; i < card_data.gsx$cost; i++) {
|
||||
cost.push(<Mugic tribe={card_data.gsx$tribe} key={i} />);
|
||||
const cost = () => {
|
||||
let cost = [];
|
||||
if (card_data.gsx$cost == 0) {
|
||||
cost.push(<span key={0}>0</span>);
|
||||
}
|
||||
else if (card_data.gsx$cost.toLowerCase() == 'x') {
|
||||
cost.push(<span key={0}>X</span>);
|
||||
}
|
||||
else {
|
||||
for (let i = 0; i < card_data.gsx$cost; i++) {
|
||||
cost.push(<Mugic tribe={card_data.gsx$tribe} key={i} />);
|
||||
}
|
||||
}
|
||||
return cost;
|
||||
}
|
||||
|
||||
return (<Single
|
||||
card={card_data}
|
||||
col0={<React.Fragment>
|
||||
<div>
|
||||
<strong>Tribe: </strong>
|
||||
<Tribe tribe={tribe} />
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<strong>Cost: </strong>
|
||||
{cost}
|
||||
</div>
|
||||
</React.Fragment>}
|
||||
col2={<React.Fragment>
|
||||
<div>
|
||||
<strong>Background:</strong><br />
|
||||
{mugic.gsx$background}
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<strong>Details:</strong><br />
|
||||
{mugic.gsx$details}
|
||||
</div>
|
||||
</React.Fragment>}
|
||||
/>);
|
||||
if (mugic) {
|
||||
return (<Single
|
||||
card={card_data}
|
||||
col0={<React.Fragment>
|
||||
<div>
|
||||
<strong>Tribe: </strong>
|
||||
<Tribe tribe={mugic.gsx$tribe} />
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<strong>Cost: </strong>
|
||||
{cost()}
|
||||
</div>
|
||||
</React.Fragment>}
|
||||
col2={<React.Fragment>
|
||||
<div>
|
||||
<strong>Background:</strong><br />
|
||||
{mugic.gsx$background}
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<strong>Details:</strong><br />
|
||||
{mugic.gsx$details}
|
||||
</div>
|
||||
</React.Fragment>}
|
||||
/>);
|
||||
}
|
||||
else {
|
||||
if (card_data.gsx$splash) {
|
||||
return (<Single
|
||||
card={card_data}
|
||||
col0={<React.Fragment>
|
||||
<div>
|
||||
<strong>Tribe: </strong>
|
||||
<Tribe tribe={card_data.gsx$tribe} />
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<strong>Cost: </strong>
|
||||
{cost()}
|
||||
</div>
|
||||
</React.Fragment>}
|
||||
/>);
|
||||
}
|
||||
else {
|
||||
return(<PageNotFound location={this.props.location}/>);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user