mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2025-08-03 19:41:28 +02:00
Added a separate advanced options settings panel with flags
- Added gpu-rasterization flag config setting `disableHardwareMediaKeys` moved to `flags.disableHardwareMediaKeys`, it will be migrated automatically
This commit is contained in:
@@ -11,7 +11,8 @@ let trayIcon,
|
||||
menuBar,
|
||||
mutedArtists,
|
||||
singleInstance,
|
||||
disableHardwareMediaKeys;
|
||||
disableHardwareMediaKeys,
|
||||
gpuRasterization;
|
||||
|
||||
const { store, settings } = require("./../../scripts/settings");
|
||||
const { ipcRenderer } = require("electron");
|
||||
@@ -35,7 +36,8 @@ function refreshSettings() {
|
||||
muteArtists.checked = store.get(settings.muteArtists);
|
||||
mutedArtists.value = store.get(settings.mutedArtists).join("\n");
|
||||
singleInstance.checked = store.get(settings.singleInstance);
|
||||
disableHardwareMediaKeys.checked = store.get(settings.disableHardwareMediaKeys);
|
||||
disableHardwareMediaKeys.checked = store.get(settings.flags.disableHardwareMediaKeys);
|
||||
gpuRasterization.checked = store.get(settings.flags.gpuRasterization);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -117,6 +119,7 @@ window.addEventListener("DOMContentLoaded", () => {
|
||||
mutedArtists = get("mutedArtists");
|
||||
singleInstance = get("singleInstance");
|
||||
disableHardwareMediaKeys = get("disableHardwareMediaKeys");
|
||||
gpuRasterization = get("gpuRasterization");
|
||||
|
||||
refreshSettings();
|
||||
|
||||
@@ -133,5 +136,6 @@ window.addEventListener("DOMContentLoaded", () => {
|
||||
addInputListener(muteArtists, settings.muteArtists);
|
||||
addTextAreaListener(mutedArtists, settings.mutedArtists);
|
||||
addInputListener(singleInstance, settings.singleInstance);
|
||||
addInputListener(disableHardwareMediaKeys, settings.disableHardwareMediaKeys);
|
||||
addInputListener(disableHardwareMediaKeys, settings.flags.gpuRasterization);
|
||||
addInputListener(gpuRasterization, settings.flags.gpuRasterization);
|
||||
});
|
||||
|
@@ -37,6 +37,9 @@
|
||||
<input type="radio" name="tabset" id="integrations" />
|
||||
<label for="integrations">Integrations</label>
|
||||
|
||||
<!-- advanced tab -->
|
||||
<input type="radio" name="tabset" id="advanced" />
|
||||
<label for="advanced">Advanced</label>
|
||||
<!-- about tab -->
|
||||
<input type="radio" name="tabset" id="about" />
|
||||
<label for="about">About</label>
|
||||
@@ -122,17 +125,6 @@
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="option">
|
||||
<h4>Disable hardware media keys</h4>
|
||||
<p>
|
||||
Disable built-in media keys. <br />
|
||||
Also prevents certain desktop environments from recognizing the chrome MPRIS client separetely from the custom MPRIS client.
|
||||
</p>
|
||||
<label class="switch">
|
||||
<input id="disableHardwareMediaKeys" type="checkbox">
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="api" class="tab-panel">
|
||||
@@ -196,16 +188,44 @@
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="about" class="tab-panel">
|
||||
<div class="section">
|
||||
<img alt="tidal icon" style="width: 100px; height: auto; display: block; margin: 0 auto; margin-bottom: 20px; margin-top: 20px;" src = "./icon.png">
|
||||
<p style="max-width: 350px; display:block; margin: 0 auto; text-align: center;">
|
||||
<a id="openExternal" style="text-decoration: underline; cursor: pointer;" data-url="https://github.com/Mastermindzh/tidal-hifi">Tidal-hifi</a> is made by <a id="openExternal" data-url="https://www.rickvanlieshout.com" style="text-decoration: underline; cursor: pointer;">Rick van Lieshout</a>.<br />
|
||||
It uses <a style="text-decoration: underline; cursor: pointer;" id="openExternal" data-url="https://castlabs.com/">Castlabs'</a> versions of Electron for widevine support.
|
||||
</p>
|
||||
|
||||
<section id="advanced" class="tab-panel">
|
||||
<div class="section">
|
||||
<h3>Flags</h3>
|
||||
<div class="option">
|
||||
<h4>Disable hardware media keys</h4>
|
||||
<p>
|
||||
Disable built-in media keys. <br />
|
||||
Also prevents certain desktop environments from recognizing the chrome MPRIS client separetely from the custom MPRIS client.
|
||||
</p>
|
||||
<label class="switch">
|
||||
<input id="disableHardwareMediaKeys" type="checkbox">
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</section>
|
||||
<div class="option">
|
||||
<h4>Enable GPU rasterization</h4>
|
||||
<p>
|
||||
Move a part of the rendering to the GPU for increased performance.
|
||||
</p>
|
||||
<label class="switch">
|
||||
<input id="gpuRasterization" type="checkbox">
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- about -->
|
||||
<section id="about" class="tab-panel">
|
||||
<div class="section">
|
||||
<img alt="tidal icon" style="width: 100px; height: auto; display: block; margin: 0 auto; margin-bottom: 20px; margin-top: 20px;" src = "./icon.png">
|
||||
<p style="max-width: 350px; display:block; margin: 0 auto; text-align: center;">
|
||||
<a id="openExternal" style="text-decoration: underline; cursor: pointer;" data-url="https://github.com/Mastermindzh/tidal-hifi">Tidal-hifi</a> is made by <a id="openExternal" data-url="https://www.rickvanlieshout.com" style="text-decoration: underline; cursor: pointer;">Rick van Lieshout</a>.<br />
|
||||
It uses <a style="text-decoration: underline; cursor: pointer;" id="openExternal" data-url="https://castlabs.com/">Castlabs'</a> versions of Electron for widevine support.
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<small>Some settings require a restart of Tidal-hifi. To do so, click the button below:</small>
|
||||
<button id="restart" style ="width: 100%">Restart Tidal-hifi</button>
|
||||
|
Reference in New Issue
Block a user