data: fixes previews

This commit is contained in:
jimmylee 2020-08-10 03:18:43 -07:00
parent 9806f30942
commit b40aae9865
3 changed files with 9 additions and 4 deletions

View File

@ -460,6 +460,7 @@ export default class ApplicationPage extends React.Component {
const navigation = NavigationData.generate(this.state.viewer); const navigation = NavigationData.generate(this.state.viewer);
const next = this.state.history[this.state.currentIndex]; const next = this.state.history[this.state.currentIndex];
const current = NavigationData.getCurrentById(navigation, next.id); const current = NavigationData.getCurrentById(navigation, next.id);
console.log(current);
const navigationElement = ( const navigationElement = (
<ApplicationNavigation <ApplicationNavigation
@ -473,7 +474,7 @@ export default class ApplicationPage extends React.Component {
/> />
); );
const headerElement = ( let headerElement = (
<ApplicationHeader <ApplicationHeader
viewer={this.state.viewer} viewer={this.state.viewer}
pageTitle={current.target.pageTitle} pageTitle={current.target.pageTitle}
@ -484,6 +485,10 @@ export default class ApplicationPage extends React.Component {
/> />
); );
if (current.target.decorator === "FILE") {
headerElement = null;
}
const scene = React.cloneElement(this.scenes[current.target.decorator], { const scene = React.cloneElement(this.scenes[current.target.decorator], {
current: current.target, current: current.target,
data: this.state.data, data: this.state.data,

View File

@ -12,7 +12,7 @@ const STYLES_FLEX = css`
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
flex-direction: column; flex-direction: column;
height: calc(100vh - ${Constants.sizes.header}px); height: 100vh;
background-color: ${Constants.system.pitchBlack}; background-color: ${Constants.system.pitchBlack};
`; `;

View File

@ -75,10 +75,10 @@ export default class SceneFilesFolder extends React.Component {
{ {
key: "size", key: "size",
name: "Size", name: "Size",
width: "116px", width: "84px",
type: "FILE_SIZE", type: "FILE_SIZE",
}, },
{ key: "type", name: "Type", type: "TEXT_TAG", width: "136px" }, { key: "type", name: "Type", type: "TEXT_TAG", width: "172px" },
{ {
key: "networks", key: "networks",
name: "Networks", name: "Networks",