diff options
Diffstat (limited to 'app/client/modules/morph/index.js')
| -rw-r--r-- | app/client/modules/morph/index.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/app/client/modules/morph/index.js b/app/client/modules/morph/index.js new file mode 100644 index 0000000..9c90848 --- /dev/null +++ b/app/client/modules/morph/index.js @@ -0,0 +1,37 @@ +import { h, Component } from 'preact' +import { Route, Link } from 'react-router-dom' + +import actions from '../../actions' + +import util from '../../util' + +import MorphApp from './views/morph.app' + +class router { + componentWillMount(){ + actions.system.changeTool('morph') + document.body.style.backgroundImage = 'linear-gradient(' + (util.randint(40)+40) + 'deg, #def, #dfe)' + } + componentWillReceiveProps(){ + actions.system.changeTool('morph') + document.body.style.backgroundImage = 'linear-gradient(' + (util.randint(40)+40) + 'deg, #def, #dfe)' + } + render(){ + return ( + <section> + <Route exact path='/morph/app/' component={MorphApp} /> + </section> + ) + } +} + +function links(){ + return [ + { url: '/morph/app/', name: 'morph' }, + ] +} + +export default { + name: 'morph', + router, links, +} |
