Integrate supported ops into the UI

This commit is contained in:
Ingvar Stepanyan
2021-07-26 13:09:10 +00:00
parent 95ed711729
commit e3ea463db5
6 changed files with 49 additions and 44 deletions

View File

@@ -143,7 +143,9 @@ class App extends Component {
'div',
{ class: 'pure-u-2-3' },
h(Preview, {
getPreview: this.capturePreview
getPreview: this.connection.supportedOps.capturePreview
? this.capturePreview
: undefined
})
),
h(
@@ -152,7 +154,9 @@ class App extends Component {
h(
'form',
{ class: 'pure-form pure-form-aligned' },
h(CaptureButton, { getFile: this.captureImage }),
this.connection.supportedOps.triggerCapture
? h(CaptureButton, { getFile: this.captureImage })
: undefined,
h(Widget, { config: state.config, setValue: this.setValue })
)
)