summaryrefslogtreecommitdiff
path: root/frontend/app/views/page
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-03-16 16:38:07 +0100
committerJules Laplace <julescarbon@gmail.com>2021-03-16 16:38:07 +0100
commita9d86650f40a82a64d1fd8e0525c26422d314d3a (patch)
tree6afbd4a520f557b377096e6bb8a0838c0b725f7e /frontend/app/views/page
parent6e18c6e4ef6344f92fed99dad9c83484487c32d7 (diff)
make uploads like animism. start audio stuff
Diffstat (limited to 'frontend/app/views/page')
-rw-r--r--frontend/app/views/page/components/page.header.js3
-rw-r--r--frontend/app/views/page/components/tile.edit.js4
-rw-r--r--frontend/app/views/page/components/tile.handle.js1
3 files changed, 5 insertions, 3 deletions
diff --git a/frontend/app/views/page/components/page.header.js b/frontend/app/views/page/components/page.header.js
index eb1c3b9..998572a 100644
--- a/frontend/app/views/page/components/page.header.js
+++ b/frontend/app/views/page/components/page.header.js
@@ -10,7 +10,8 @@ function PageHeader(props) {
return (
<header>
<div>
- <Link to={props.graph.show.res ? "/" + props.graph.show.res.path : "/"} className="logo"><b>{props.site.siteTitle}</b></Link>
+ <Link to={props.graph.show.res ? "/" + props.graph.show.res.path : "/"} className="logo arrow">{"◁"}</Link>
+ <b>{props.site.siteTitle}</b>
</div>
<div>
<button onClick={() => props.pageActions.toggleAddTileForm()}>+ Add tile</button>
diff --git a/frontend/app/views/page/components/tile.edit.js b/frontend/app/views/page/components/tile.edit.js
index 2ea09d1..cae9f73 100644
--- a/frontend/app/views/page/components/tile.edit.js
+++ b/frontend/app/views/page/components/tile.edit.js
@@ -29,7 +29,9 @@ class TileEdit extends Component {
load() {
const { currentEditTileId } = this.props.page.editor
- const tile = this.props.page.show.res.tiles.filter(tile => tile.id === currentEditTileId)[0]
+ const { tiles } = this.props.page.show.res
+ if (!tiles) return
+ const tile = tiles.filter(tile => tile.id === currentEditTileId)[0]
console.log('edit', currentEditTileId)
this.setState({ tile })
}
diff --git a/frontend/app/views/page/components/tile.handle.js b/frontend/app/views/page/components/tile.handle.js
index 9331cb3..f47c3cd 100644
--- a/frontend/app/views/page/components/tile.handle.js
+++ b/frontend/app/views/page/components/tile.handle.js
@@ -151,7 +151,6 @@ const generateTransform = (tile, box) => {
if (xalign === 'center') {
transform.push('translateX(-50%)')
}
- console.log(units)
// if (x % 2 == 1) x += 0.5
// if (y % 2 == 1) y += 0.5
transform.push('translateX(' + x + units + ')')