import { h, Component } from 'preact' import { Route, Link } from 'react-router-dom' import actions from '../../actions' import util from '../../util' import Pix2PixHDNew from './views/pix2pixhd.new' import Pix2PixHDShow from './views/pix2pixhd.show' import Pix2PixHDResults from './views/pix2pixhd.results' import Pix2PixHDTrain from './views/pix2pixhd.train' import Pix2PixHDLive from './views/pix2pixhd.live' class router { componentWillMount(){ actions.system.changeTool('pix2pixhd') document.body.style.backgroundImage = 'linear-gradient(' + (util.randint(40)+40) + 'deg, #def, #dfe)' } componentWillReceiveProps(){ actions.system.changeTool('pix2pixhd') document.body.style.backgroundImage = 'linear-gradient(' + (util.randint(40)+40) + 'deg, #def, #dfe)' } render(){ return (
) } } function links(){ return [ { url: '/pix2pixhd/new/', name: 'folders' }, { url: '/pix2pixhd/sequences/', name: 'sequences' }, { url: '/pix2pixhd/train/', name: 'checkpoints' }, { url: '/pix2pixhd/results/', name: 'results' }, { url: '/pix2pixhd/live/', name: 'live' }, ] } export default { name: 'pix2pixhd', router, links, }