From d165a0727e42349d935ab3ee287242f1e5029742 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 17 Mar 2021 18:11:26 +0100 Subject: frontend. export/view button. interactivity sanity check --- frontend/app/views/page/components/page.header.js | 18 ++++++++-- frontend/app/views/page/components/tile.form.js | 41 +++++++++++++++++++++-- frontend/app/views/page/components/tile.handle.js | 1 - 3 files changed, 55 insertions(+), 5 deletions(-) (limited to 'frontend/app/views/page') diff --git a/frontend/app/views/page/components/page.header.js b/frontend/app/views/page/components/page.header.js index 998572a..dbdf1b6 100644 --- a/frontend/app/views/page/components/page.header.js +++ b/frontend/app/views/page/components/page.header.js @@ -3,6 +3,9 @@ import { bindActionCreators } from 'redux' import { connect } from 'react-redux' import { Link } from 'react-router-dom' +import { Loader } from 'app/common' +import { capitalize } from 'app/utils' + import * as graphActions from '../../graph/graph.actions' import * as pageActions from '../page.actions' @@ -10,13 +13,22 @@ function PageHeader(props) { return (
- {"◁"} + {"◁"} {props.site.siteTitle} + {props.building && ( +
+
+ +
+ {capitalize(props.building)}ing... +
+ )}
+
) @@ -25,7 +37,9 @@ function PageHeader(props) { const mapStateToProps = (state) => ({ // auth: state.auth, site: state.site, - graph: state.graph, + graph: state.graph.show.res, + page: state.page.show.res, + building: state.graph.editor.building, // isAuthenticated: state.auth.isAuthenticated, }) diff --git a/frontend/app/views/page/components/tile.form.js b/frontend/app/views/page/components/tile.form.js index da72e27..d6272bc 100644 --- a/frontend/app/views/page/components/tile.form.js +++ b/frontend/app/views/page/components/tile.form.js @@ -10,7 +10,7 @@ import { TextInput, NumberInput, ColorInput, Slider, Select, LabelDescription, TextArea, Checkbox, SubmitButton, Loader } from 'app/common' -import { AudioSelect } from 'app/views/audio/components/audio.select' +import AudioSelect from 'app/views/audio/components/audio.select' import { preloadImage, preloadVideo } from 'app/utils' import * as tileActions from '../../tile/tile.actions' @@ -150,6 +150,10 @@ const newPosition = (data) => ({ opacity: 1, units: false, align: "center_center", + has_audio: false, + audio_on_click_id: 0, + audio_on_hover_id: 0, + wait_for_audio_on_click: false, ...data, }) @@ -198,6 +202,7 @@ class TileForm extends Component { ...PAGE_LIST_TOP_OPTIONS, ...linkPages.map(page => ({ name: page.id, label: page.path })) ] + this.setState({ pageList }) if (isNew) { const newTile = newImage({ id: "new", @@ -430,8 +435,8 @@ class TileForm extends Component { : ""} {this.renderHyperlinkForm()} - {this.renderAudioForm()} {this.renderMiscForm()} + {this.renderAudioForm()}
+ + {temporaryTile.settings.has_audio && ( +
+ + + + + +
+ )}
) } diff --git a/frontend/app/views/page/components/tile.handle.js b/frontend/app/views/page/components/tile.handle.js index f47c3cd..090069d 100644 --- a/frontend/app/views/page/components/tile.handle.js +++ b/frontend/app/views/page/components/tile.handle.js @@ -165,7 +165,6 @@ const generateTransform = (tile, box) => { } const generateVideoStyle = (tile, bounds) => { - // console.log(bounds) const style = { pointerEvents: "none", } -- cgit v1.2.3-70-g09d2