From 315c04e250630655907db61f4a1ecbb6360e4922 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 28 Aug 2021 12:39:41 +0200 Subject: [PATCH 1/4] Add config presets to core and dashboard. Add presets for midi-input --- nodecg-io-core/dashboard/crypto.ts | 4 +- nodecg-io-core/dashboard/main.ts | 1 + nodecg-io-core/dashboard/panel.html | 5 ++ nodecg-io-core/dashboard/serviceInstance.ts | 78 +++++++++++++++++---- nodecg-io-core/dashboard/styles.css | 6 ++ nodecg-io-core/extension/service.ts | 7 ++ nodecg-io-core/extension/serviceBundle.ts | 7 ++ nodecg-io-midi-input/extension/index.ts | 2 + tsconfig.common.json | 4 +- 9 files changed, 95 insertions(+), 19 deletions(-) diff --git a/nodecg-io-core/dashboard/crypto.ts b/nodecg-io-core/dashboard/crypto.ts index 4ead7cf98..883ab7225 100644 --- a/nodecg-io-core/dashboard/crypto.ts +++ b/nodecg-io-core/dashboard/crypto.ts @@ -39,11 +39,11 @@ class Config extends EventEmitter { export const config = new Config(); // Update the decrypted copy of the data once the encrypted version changes (if pw available). -// This ensures that the decrypted data is kept uptodate. +// This ensures that the decrypted data is kept up-to-date. encryptedData.on("change", updateDecryptedData); /** - * Sets the passed passwort to be used by the crypto module. + * Sets the passed password to be used by the crypto module. * Will try to decrypt decrypted data to tell whether the password is correct, * if it is wrong the internal password will be set to undefined. * Returns whether the password is correct. diff --git a/nodecg-io-core/dashboard/main.ts b/nodecg-io-core/dashboard/main.ts index e00bde1ea..a878b1756 100644 --- a/nodecg-io-core/dashboard/main.ts +++ b/nodecg-io-core/dashboard/main.ts @@ -6,6 +6,7 @@ export { createInstance, saveInstanceConfig, deleteInstance, + selectInstanceConfigPreset, } from "./serviceInstance"; export { renderBundleDeps, diff --git a/nodecg-io-core/dashboard/panel.html b/nodecg-io-core/dashboard/panel.html index 621fb7098..b7507fc51 100644 --- a/nodecg-io-core/dashboard/panel.html +++ b/nodecg-io-core/dashboard/panel.html @@ -42,6 +42,11 @@ + +