auto start streamer added

This commit is contained in:
devl0rd 2020-04-22 16:19:05 -06:00
parent c9e838c908
commit 061963bc81
2 changed files with 28 additions and 12 deletions

View file

@ -53,10 +53,25 @@
</div>
<div id="settings" class="contentArea contentAreaScrollable customScroll" style="display: none;">
<div class="form-group">
<label class="switch">
<input id="autoStart" type="checkbox">
<span class="slider round"></span>
</label>
<label class="form-check-label" for="autoStart">
Start streamer automatically
</label>
</div>
<div class="form-group">
<label class="switch">
<input id="rainbowEnabled" type="checkbox">
<span class="slider round"></span>
</label>
<label class="form-check-label" for="rainbowEnabled">
Enable Rainbow Accents
</label>
</div>
<form class="form-group">
<div class="row">
<div class="col">
<button id="installScpVBusBtn" type="button" class="btn btn-dark btn-block">Install Controller</button>
@ -79,15 +94,6 @@
</div>
</div>
</form>
<div class="form-group">
<label class="switch">
<input id="rainbowEnabled" type="checkbox">
<span class="slider round"></span>
</label>
<label class="form-check-label" for="rainbowEnabled">
Enable Rainbow Accents
</label>
</div>
</div>
</div>
<div id="statusbar" class="rainbowBackgroundColor2">

View file

@ -81,13 +81,23 @@ function applyClientSettings() {
ipcRenderer.send('installAudioDriver');
clientSettings.firstInstall = true;
}
if (clientSettings.autoStartStreamer) {
connect();
}
saveClientSettings();
}
$("#rainbowEnabled").on('change', function () {
clientSettings.rainbowEnabled = $("#rainbowEnabled").prop("checked");
saveClientSettings();
applyClientSettings();
});
$("#autoStart").on('change', function () {
clientSettings.autoStartStreamer = $("#autoStart").prop("checked");
saveClientSettings();
applyClientSettings();
});
// $("#debugEnabled").on('change', function () {
// clientSettings.debug = $("#debugEnabled").prop("checked");
// saveClientSettings();