Giter Club home page Giter Club logo

streamdeck-pisamples's People

Contributors

nguyenquyhy avatar tiptronic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

streamdeck-pisamples's Issues

Initializing Radios and have it reflected in the UI

This sample is kind of awesome, thank you! How do I initialize the state of the radio buttons using the JS and not the HTML?

Here is my html, lifted almost exactly from the sample code.

<div type="radio" class="sdpi-item" id="tickermode">
      <div class="sdpi-item-label">Source</div>
      <div class="sdpi-item-value ">
        <div class="sdpi-item-child">
          <input id="rdio1" type="radio" name="mytickermode" value="crypto">
          <label for="rdio1" class="sdpi-item-label"><span></span>Crypto</label>
        </div>
        <div class="sdpi-item-child">
          <input id="rdio2" type="radio" name="mytickermode" value="stocks">
          <label for="rdio2" class="sdpi-item-label"><span></span>Stocks</label>
        </div>
      </div>
    </div>

I have been working in the connectElgatoStreamDeckSocket function to preload the settings object if certain values are not found.

settings = {"tickermode":"stocks", "mynameinput":"myName"};

and

settings = {"mytickermode":"stocks", "mynameinput":"myName"};

These values make no changes to the UI. How should I set the value so that the UI is updated? What function should I call to update the UI?

get global settings

how can i store settings / values to be used again when the streamdeck app restarts ?
i tried setglobalsettings but these settings are not stored when restarting the software

Example of getting a global setting

Hello guys! Could you add an example of how to bind a field with a global setting?

I want to have a button that sets up properties to all instances of that button, but I'm not being able to figure out how to use the Stream Deck SDK for that. Would really appreciate if you can add an example of working with global settings.

set settings changes both my button instances

i have a plugin in javascript where i use both setSettings and setGlobalSettings,
setGlobalSettings is working fine, but i need each button to retreive some information from my api every second, for that i need to know which field is selected on the dropdown in my pi but its different for every button, so i need the setsettings for that.

everything fine until i receive didReceiveSettings in my main code, how do i store it to a variable i can recall everytime i run the command for the api, but the variable needs to be different for each button.

i tried:
else if(event == "didReceiveSettings") { var jsonPayload = jsonObj['payload']; var globalsettings = jsonPayload['settings']; myid= globalsettings["id"]; }
which works but the variable myid is updated for all my buttons

Dynamic content

Hi all,
i am creating a streamdeck plugin in javascript with two buttons, one to login to our api and one to send specific commands to it.
The login button works fine, i can login and retreive a token from our api.
Now once logged in i need to change the options in the select list of button 2 to all the options that are retreived from the api.

How can i dynamicly add and remove options from a list in a buttons property inspector ?

Tabs clickTab() contains invalid line

The clickTab() function (which is the same as the one in the docs) contains this line: activeTab = clickedTab.dataset?.target;, but activeTab is not defined nor used anywhere in the rest of the code. I guess this comes from a previous version of the function, but it should be removed

function clickTab(clickedTab) {
const allTabs = Array.from(document.querySelectorAll('.tab'));
allTabs.forEach((el, i) => el.classList.remove('selected'));
clickedTab.classList.add('selected');
activeTab = clickedTab.dataset?.target;
allTabs.forEach((el, i) => {
if(el.dataset.target) {
const t = document.querySelector(el.dataset.target);
if(t) {
t.style.display = el == clickedTab ? 'block' : 'none';
}
}
});
}

Sample Selectors Clear on Button Reselect

The sample for the dropdown list is a little lacking as it doesn't demonstrate how to actually keep the value on the button.

image

No matter which is selected, when the button is deselected in StreamDeck, then reselected, the first value is always the current value.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.