Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utils.controls.Lock, utils.controls.Unlock (new) #64

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/appmixer/utils/controls/Lock/Lock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {

async receive(context) {

const lock = await context.lock(context.componentId);
return context.sendJson({ lock: { resource: lock.resource, value: lock.value } }, 'out')

Check failure on line 6 in src/appmixer/utils/controls/Lock/Lock.js

View workflow job for this annotation

GitHub Actions / build

Missing semicolon
}
}

Check failure on line 8 in src/appmixer/utils/controls/Lock/Lock.js

View workflow job for this annotation

GitHub Actions / build

Missing semicolon
14 changes: 14 additions & 0 deletions src/appmixer/utils/controls/Lock/component.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "appmixer.utils.controls.Lock",
"description": "",
"version": "1.4.5",
"private": false,
"inPorts": [
"in"
],
"outPorts": [
"out"
]
}


7 changes: 7 additions & 0 deletions src/appmixer/utils/controls/Unlock/Unlock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {

async receive(context) {

return context.unlock(context.messages.in.content.lock.resource, context.messages.in.content.lock.value);
}
}

Check failure on line 7 in src/appmixer/utils/controls/Unlock/Unlock.js

View workflow job for this annotation

GitHub Actions / build

Missing semicolon
25 changes: 25 additions & 0 deletions src/appmixer/utils/controls/Unlock/component.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "appmixer.utils.controls.Unlock",
"description": "",
"version": "1.4.5",
"private": false,
"inPorts": [
{
"name": "in",
"inspector": {
"inputs": {
"lock": {
"type": "text",
"index": 1,
"label": "Lock",
"tooltip": "Lock"
}
}
}
}
],
"outPorts": [
"out"
]
}

Loading