Merge branch 'master' of github.com:jean-emmanuel/open-stage-control
This commit is contained in:
commit
0c11d5fd35
10 changed files with 29 additions and 22 deletions
|
|
@ -74,6 +74,7 @@
|
|||
- dropdown: close menu when receiving a value
|
||||
- dropdown: removed empty 1st option
|
||||
- switch: removed `showValues` (inconsistent with menu/dropdown, feature covered by `values` property)
|
||||
- frame: allow loading non local urls
|
||||
|
||||
- widget removals
|
||||
- `push`, `toggle`: merged into `button`
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name": "open-stage-control",
|
||||
"productName": "Open Stage Control",
|
||||
"description": "Libre and modular OSC / MIDI controller",
|
||||
"version": "1.0.0-alpha17",
|
||||
"version": "1.0.0-alpha18",
|
||||
"author": {
|
||||
"name": "Jean-Emmanuel Doucet",
|
||||
"email": "jean-emmanuel@ammd.net"
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@
|
|||
|
||||
| property | type |default | description |
|
||||
| --- | --- | --- | --- |
|
||||
| <h6 id="button_label">label<a class="headerlink" href="#button_label" title="Permanent link">#</a></h6> | `string`|<br/>`boolean` | <code>"auto"</code> | Set to `false` to hide completely<br/>- Insert icons using the prefix ^ followed by the icon's name : `^play`, `^pause`, etc (see https://fontawesome.com/icons?d=gallery&s=solid&m=free)<br/>- Icons can be transformed with the following suffixes: `.flip-[horizontal|vertical|both]`, `.rotate-[90|180|270]`, `.spin`, `.pulse`. Example: `^play.flip-horizontal` |
|
||||
| <h6 id="button_label">label<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#button_label" title="Permanent link">#</a></h6> | `string`|<br/>`boolean` | <code>"auto"</code> | Set to `false` to hide completely<br/>- Insert icons using the prefix ^ followed by the icon's name : `^play`, `^pause`, etc (see https://fontawesome.com/icons?d=gallery&s=solid&m=free)<br/>- Icons can be transformed with the following suffixes: `.flip-[horizontal|vertical|both]`, `.rotate-[90|180|270]`, `.spin`, `.pulse`. Example: `^play.flip-horizontal` |
|
||||
| <h6 id="button_on">on<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#button_on" title="Permanent link">#</a></h6> | `*` | <code>1</code> | Set to `null` to send send no argument in the osc message |
|
||||
| <h6 id="button_off">off<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#button_off" title="Permanent link">#</a></h6> | `*` | <code>0</code> | Set to `null` to send send no argument in the osc message. Must be different from `on`. |
|
||||
| <h6 id="button_mode">mode<a class="headerlink" href="#button_mode" title="Permanent link">#</a></h6> | `string` | <code>"toggle"</code> | Interraction mode:<br/>- `toggle` (classic on/off switch)<br/>- `push` (press & release)<br/>- `tap` (no release)<br/><br/>Choices: `toggle`, `push`, `tap` |
|
||||
|
|
@ -355,7 +355,7 @@
|
|||
|
||||
| property | type |default | description |
|
||||
| --- | --- | --- | --- |
|
||||
| <h6 id="tab_label">label<a class="headerlink" href="#tab_label" title="Permanent link">#</a></h6> | `string`|<br/>`boolean` | <code>"auto"</code> | Set to `false` to hide completely<br/>- Insert icons using the prefix ^ followed by the icon's name : `^play`, `^pause`, etc (see https://fontawesome.com/icons?d=gallery&s=solid&m=free)<br/>- Icons can be transformed with the following suffixes: `.flip-[horizontal|vertical|both]`, `.rotate-[90|180|270]`, `.spin`, `.pulse`. Example: `^play.flip-horizontal` |
|
||||
| <h6 id="tab_label">label<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#tab_label" title="Permanent link">#</a></h6> | `string`|<br/>`boolean` | <code>"auto"</code> | Set to `false` to hide completely<br/>- Insert icons using the prefix ^ followed by the icon's name : `^play`, `^pause`, etc (see https://fontawesome.com/icons?d=gallery&s=solid&m=free)<br/>- Icons can be transformed with the following suffixes: `.flip-[horizontal|vertical|both]`, `.rotate-[90|180|270]`, `.spin`, `.pulse`. Example: `^play.flip-horizontal` |
|
||||
| <h6 id="tab_variables">variables<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#tab_variables" title="Permanent link">#</a></h6> | `*` | <code>"@\{parent.variables}"</code> | Defines one or more arbitrary variables that can be inherited by children widgets |
|
||||
| <h6 id="tab_traversing">traversing<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#tab_traversing" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to enable traversing gestures in this widget. Set to `smart` or `auto` to limit affected widgets by the type of the first touched widget |
|
||||
|
||||
|
|
@ -396,7 +396,7 @@
|
|||
|
||||
| property | type |default | description |
|
||||
| --- | --- | --- | --- |
|
||||
| <h6 id="frame_value">value<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#frame_value" title="Permanent link">#</a></h6> | `string` | <code>""</code> | External web page URL. Only local URLs are allowed (starting with `http://127.0.0.1/`, `http://10.x.x.x/`, `http://192.168.x.x/`, etc) |
|
||||
| <h6 id="frame_value">value<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#frame_value" title="Permanent link">#</a></h6> | `string` | <code>""</code> | External web page URL. |
|
||||
|
||||
??? api "<div id="svg">svg<a class="headerlink" href="#svg" title="Permanent link">#</a></div>"
|
||||
Svg parser.
|
||||
|
|
@ -710,7 +710,7 @@
|
|||
| property | type |default | description |
|
||||
| --- | --- | --- | --- |
|
||||
| <h6 id="script_event">event<a class="headerlink" href="#script_event" title="Permanent link">#</a></h6> | `string` | <code>"value"</code> | Define which events trigger the script's execution.<br/><br/>Choices: `value`, `keyboard` |
|
||||
| <h6 id="script_script">script<a class="headerlink" href="#script_script" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed whenever the widget's receives the defined event. See <a href="https://openstagecontrol.ammd.net/v1/docs/widgets/scripting/">documentation</a>. |
|
||||
| <h6 id="script_script">script<a class="headerlink" href="#script_script" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed whenever the widget's receives the defined event. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>. |
|
||||
|
||||
=== "event: keyboard"
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ document = {
|
|||
}
|
||||
|
||||
window = {
|
||||
screen: {width: 800, height: 600},
|
||||
addEventListener: ()=>{},
|
||||
location: {},
|
||||
document: document,
|
||||
|
|
|
|||
|
|
@ -223,7 +223,8 @@ Button.cssVariables = Button.prototype.constructor.cssVariables.concat(
|
|||
Button.dynamicProps = Button.prototype.constructor.dynamicProps.concat(
|
||||
'on',
|
||||
'off',
|
||||
'norelease'
|
||||
'norelease',
|
||||
'label'
|
||||
)
|
||||
|
||||
module.exports = Button
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ module.exports = class OscReceiver {
|
|||
|
||||
callback(args) {
|
||||
|
||||
if (typeof args !== 'object') args = [args]
|
||||
if (!Array.isArray(args)) args = [args]
|
||||
var preArgs = this.usePreArgs ? (this.parent.getProp('preArgs') || []) : []
|
||||
if (!Array.isArray(preArgs) && preArgs !== '') preArgs = [preArgs]
|
||||
if (args.length >= preArgs.length) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ var Panel = require('./panel'),
|
|||
resize = require('../../events/resize'),
|
||||
{iconify} = require('../../ui/utils')
|
||||
|
||||
module.exports = class Tab extends Panel {
|
||||
class Tab extends Panel {
|
||||
|
||||
static description() {
|
||||
|
||||
|
|
@ -130,3 +130,9 @@ module.exports = class Tab extends Panel {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
Tab.dynamicProps = Tab.prototype.constructor.dynamicProps.concat(
|
||||
'label'
|
||||
)
|
||||
|
||||
module.exports = Tab
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
var Widget = require('../common/widget'),
|
||||
html = require('nanohtml'),
|
||||
{urlParser} = require('../utils'),
|
||||
locales = require('../../locales'),
|
||||
StaticProperties = require('../mixins/static_properties')
|
||||
|
||||
|
|
@ -19,7 +18,7 @@ class Frame extends StaticProperties(Widget, {bypass: true}) {
|
|||
}, ['decimals', 'bypass'], {
|
||||
|
||||
value: {type: 'string', value: '', help: [
|
||||
'External web page URL. Only local URLs are allowed (starting with `http://127.0.0.1/`, `http://10.x.x.x/`, `http://192.168.x.x/`, etc)',
|
||||
'External web page URL.',
|
||||
]}
|
||||
|
||||
})
|
||||
|
|
@ -47,9 +46,7 @@ class Frame extends StaticProperties(Widget, {bypass: true}) {
|
|||
|
||||
this.value = v
|
||||
|
||||
var parser = urlParser(this.value)
|
||||
|
||||
if (this.value && parser.isLocal()) {
|
||||
if (this.value) {
|
||||
this.frame.setAttribute('src', this.value)
|
||||
this.widget.classList.remove('error')
|
||||
if (this.errorTextMounted) {
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ class ScriptVm extends Vm {
|
|||
if (target && target[0] === '/') {
|
||||
args.unshift(address)
|
||||
address = target
|
||||
target = null
|
||||
}
|
||||
|
||||
var overrides = {
|
||||
|
|
|
|||
|
|
@ -2,19 +2,19 @@ var loopProtect = require('loop-protect'),
|
|||
{deepCopy} = require('../utils'),
|
||||
globals
|
||||
|
||||
setTimeout(()=>{
|
||||
globals = {
|
||||
screen: {width: screen.width, height: screen.height},
|
||||
env: deepCopy(ENV),
|
||||
url: document.location.host,
|
||||
platform: navigator.platform
|
||||
}
|
||||
})
|
||||
|
||||
class Vm {
|
||||
|
||||
constructor() {
|
||||
|
||||
if (!globals) {
|
||||
globals = {
|
||||
screen: {width: screen.width, height: screen.height},
|
||||
env: deepCopy(ENV),
|
||||
url: document.location.host,
|
||||
platform: navigator.platform
|
||||
}
|
||||
}
|
||||
|
||||
this.sandbox = document.createElement('iframe')
|
||||
this.sandbox.style.display = 'none'
|
||||
this.sandbox.sandbox = 'allow-same-origin'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue