Moved viewPanel into top-level of extension GUI

This commit is contained in:
Joel Collins 2020-03-18 17:51:55 +00:00
parent 5dfc27ed03
commit 6b14ea8395
2 changed files with 3 additions and 3 deletions

View file

@ -32,6 +32,8 @@ The root of your ``gui`` dictionary expects 2 properties:
``icon`` - The name of a Material Design icon to use for your plugin ``icon`` - The name of a Material Design icon to use for your plugin
``viewPanel`` *(optional)* - Content to display to the right of the extension form. Either ``stream`` (default), ``gallery``, or ``settings``.
``forms`` - An array of forms as described below ``forms`` - An array of forms as described below
Form level Form level
@ -53,8 +55,6 @@ Each form is described by a JSON object, with the following properties:
``schema`` - List of dictionaries. Each dictionary element describes a form component. ``schema`` - List of dictionaries. Each dictionary element describes a form component.
``viewPanel`` *(optional)* - Content to display to the right of the extension form. Either ``stream`` (default), ``gallery``, or ``settings``.
``emitOnResponse`` *(optional)* - OpenFlexure eV event to emit when a response is recieved from the extension (generally avoid unless you know you need this.) ``emitOnResponse`` *(optional)* - OpenFlexure eV event to emit when a response is recieved from the extension (generally avoid unless you know you need this.)
Component level Component level

View file

@ -241,6 +241,7 @@ def dynamic_form():
return { return {
"icon": "sd_storage", "icon": "sd_storage",
"title": "Storage", "title": "Storage",
"viewPanel": "gallery",
"forms": [ "forms": [
{ {
"name": "Autostorage", "name": "Autostorage",
@ -248,7 +249,6 @@ def dynamic_form():
"isTask": False, "isTask": False,
"route": "/location-from-title", "route": "/location-from-title",
"emitOnResponse": "globalUpdateCaptures", "emitOnResponse": "globalUpdateCaptures",
"viewPanel": "gallery",
"submitLabel": "Set path", "submitLabel": "Set path",
"schema": [ "schema": [
{ {