Added category icon, renamed StreamDeck
This commit is contained in:
parent
af76f81b36
commit
995165d58b
6 changed files with 11 additions and 12 deletions
|
|
@ -1,8 +1,8 @@
|
|||
/// <reference path="../../../libs/js/stream-deck.js" />
|
||||
/// <reference path="../../../libs/js/utils.js" />
|
||||
|
||||
StreamDeck.onConnected((jsn) => {
|
||||
StreamDeck.loadLocalization('../../../');
|
||||
$SD.onConnected((jsn) => {
|
||||
$SD.loadLocalization('../../../');
|
||||
|
||||
const form = document.querySelector('#property-inspector');
|
||||
const { actionInfo, appInfo, connection, messageType, port, uuid } = jsn;
|
||||
|
|
@ -15,8 +15,8 @@ StreamDeck.onConnected((jsn) => {
|
|||
'input',
|
||||
Utils.debounce(150, () => {
|
||||
const value = Utils.getFormValue(form);
|
||||
StreamDeck.sendToPlugin(value, context);
|
||||
StreamDeck.setSettings(value);
|
||||
$SD.sendToPlugin(value, context);
|
||||
$SD.setSettings(value);
|
||||
console.log(value);
|
||||
})
|
||||
);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* The first event fired when Stream Deck starts
|
||||
*/
|
||||
StreamDeck.onConnected(({ actionInfo, appInfo, connection, messageType, port, uuid }) => {
|
||||
$SD.onConnected(({ actionInfo, appInfo, connection, messageType, port, uuid }) => {
|
||||
// TODO: Remove this test logging code and replace with simple action
|
||||
console.log({ object: 'stream-deck', event: 'onConnected' });
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ StreamDeck.onConnected(({ actionInfo, appInfo, connection, messageType, port, uu
|
|||
console.log({ object: 'action', event: 'onSendToPropertyInspector' });
|
||||
});
|
||||
|
||||
StreamDeck.onDeviceDidConnect(() => {
|
||||
$SD.onDeviceDidConnect(() => {
|
||||
console.log({ object: 'stream-deck', event: 'onDeviceDidConnect' });
|
||||
})
|
||||
.onDeviceDidDisconnect(() => {
|
||||
|
|
@ -53,11 +53,9 @@ StreamDeck.onConnected(({ actionInfo, appInfo, connection, messageType, port, uu
|
|||
console.log({ object: 'stream-deck', event: 'onSendToPropertyInspector' });
|
||||
})
|
||||
.onApplicationDidLaunch(() => {
|
||||
// TODO: figure out why this event does not fire
|
||||
console.log({ object: 'stream-deck', event: 'onApplicationDidLaunch' });
|
||||
})
|
||||
.onApplicationDidTerminate(() => {
|
||||
// TODO: figure out why this event does not fire
|
||||
console.log({ object: 'stream-deck', event: 'onApplicationDidTerminate' });
|
||||
})
|
||||
.onSystemDidWakeUp(() => {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ const fadeColor = function (col, amt) {
|
|||
return '#' + (g | (b << 8) | (r << 16)).toString(16).padStart(6, 0);
|
||||
};
|
||||
|
||||
StreamDeck.onConnected(({ appInfo }) => {
|
||||
$SD.onConnected(({ appInfo }) => {
|
||||
if (appInfo?.colors) return;
|
||||
const clrs = appInfo.colors;
|
||||
const node = document.getElementById('#sdpi-dynamic-styles') || document.createElement('style');
|
||||
|
|
|
|||
|
|
@ -368,7 +368,7 @@ class ELGSDStreamDeck {
|
|||
}
|
||||
}
|
||||
|
||||
var StreamDeck = new ELGSDStreamDeck();
|
||||
var $SD = new ELGSDStreamDeck();
|
||||
|
||||
/**
|
||||
* connectElgatoStreamDeckSocket
|
||||
|
|
@ -381,5 +381,5 @@ var StreamDeck = new ELGSDStreamDeck();
|
|||
* @param {string} actionInfo - Context is an internal identifier used to communicate to the host application.
|
||||
*/
|
||||
function connectElgatoStreamDeckSocket() {
|
||||
StreamDeck.connect(arguments);
|
||||
$SD.connect(arguments);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
}
|
||||
],
|
||||
"Category": "Template Plugin",
|
||||
"CategoryIcon": "actions/template/assets/actionimage",
|
||||
"Actions": [
|
||||
{
|
||||
"Icon": "actions/template/assets/actionimage",
|
||||
|
|
|
|||
Loading…
Reference in a new issue