Skip to content

Commit 6bf8d9b

Browse files
author
Martin Krcmar
committed
POC
1 parent 5a20a36 commit 6bf8d9b

File tree

4 files changed

+54
-0
lines changed

4 files changed

+54
-0
lines changed

Diff for: src/appmixer/utils/controls/Lock/Lock.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
3+
async receive(context) {
4+
5+
const lock = await context.lock(context.componentId);
6+
return context.sendJson({ lock: { resource: lock.resource, value: lock.value } }, 'out')
7+
}
8+
}

Diff for: src/appmixer/utils/controls/Lock/component.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "appmixer.utils.controls.Lock",
3+
"description": "",
4+
"version": "1.4.5",
5+
"private": false,
6+
"inPorts": [
7+
"in"
8+
],
9+
"outPorts": [
10+
"out"
11+
]
12+
}
13+
14+

Diff for: src/appmixer/utils/controls/Unlock/Unlock.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
3+
async receive(context) {
4+
5+
return context.unlock(context.messages.in.content.lock.resource, context.messages.in.content.lock.value);
6+
}
7+
}

Diff for: src/appmixer/utils/controls/Unlock/component.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "appmixer.utils.controls.Unlock",
3+
"description": "",
4+
"version": "1.4.5",
5+
"private": false,
6+
"inPorts": [
7+
{
8+
"name": "in",
9+
"inspector": {
10+
"inputs": {
11+
"lock": {
12+
"type": "text",
13+
"index": 1,
14+
"label": "Lock",
15+
"tooltip": "Lock"
16+
}
17+
}
18+
}
19+
}
20+
],
21+
"outPorts": [
22+
"out"
23+
]
24+
}
25+

0 commit comments

Comments
 (0)