From 9c8cce44b2a7f7d3199cf75359842b5b32e70711 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 19 Dec 2019 16:56:36 +0100 Subject: adding biggan module live interface --- app/client/common/player.component.js | 5 +++- app/client/live/live.reducer.js | 2 ++ app/client/modules/biggan/views/biggan.live.js | 39 ++++++++++++++++++++------ 3 files changed, 36 insertions(+), 10 deletions(-) (limited to 'app') diff --git a/app/client/common/player.component.js b/app/client/common/player.component.js index 546c650..6045db1 100644 --- a/app/client/common/player.component.js +++ b/app/client/common/player.component.js @@ -2,7 +2,10 @@ import { h, Component } from 'preact' import { connect } from 'react-redux' function Player(props) { - const className = props.fullscreen ? 'player fullscreen' : 'player' + let className = props.fullscreen ? 'player fullscreen' : 'player' + if (props.square) { + className += ' square' + } return (
diff --git a/app/client/live/live.reducer.js b/app/client/live/live.reducer.js index dfdf7ee..8112d31 100644 --- a/app/client/live/live.reducer.js +++ b/app/client/live/live.reducer.js @@ -23,9 +23,11 @@ const liveInitialState = { } const liveReducer = (state = liveInitialState, action) => { + console.log(action) let results; switch(action.type) { case types.socket.load_params: + console.log(action.opt) if (! action.opt || ! Object.keys(action.opt).length) { return state } diff --git a/app/client/modules/biggan/views/biggan.live.js b/app/client/modules/biggan/views/biggan.live.js index c583d7f..b3ad670 100644 --- a/app/client/modules/biggan/views/biggan.live.js +++ b/app/client/modules/biggan/views/biggan.live.js @@ -17,12 +17,13 @@ import * as bigganActions from '../biggan.actions' class BigGANLive extends Component { constructor(props) { super() + props.actions.live.get_params() } start(){ console.log(this.props.opt) console.log('starting up!') this.props.actions.tasks.live_task({ - folder_id: this.props.biggan.data.resultsFolder.id, + // folder_id: this.props.biggan.data.resultsFolder.id, }) } interrupt(){ @@ -37,7 +38,7 @@ class BigGANLive extends Component {
- +
@@ -53,10 +54,20 @@ class BigGANLive extends Component { onClick={() => {}} >{"Latent"} + + + @@ -98,8 +114,13 @@ class BigGANLive extends Component { onClick={() => {}} >{"Spin"} + -- cgit v1.2.3-70-g09d2