mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2024-11-22 05:23:09 +01:00
staticWindowTitle(fix): Order alphabetically on all appearances, change if to a ternary
This commit is contained in:
parent
cb8667bd41
commit
974877ea4f
@ -55,9 +55,9 @@ export const settings = {
|
||||
singleInstance: "singleInstance",
|
||||
skipArtists: "skipArtists",
|
||||
skippedArtists: "skippedArtists",
|
||||
staticWindowTitle: "staticWindowTitle",
|
||||
theme: "theme",
|
||||
trayIcon: "trayIcon",
|
||||
staticWindowTitle: "staticWindowTitle",
|
||||
updateFrequency: "updateFrequency",
|
||||
windowBounds: {
|
||||
root: "windowBounds",
|
||||
|
@ -46,9 +46,9 @@ let adBlock: HTMLInputElement,
|
||||
singleInstance: HTMLInputElement,
|
||||
skipArtists: HTMLInputElement,
|
||||
skippedArtists: HTMLInputElement,
|
||||
staticWindowTitle: HTMLInputElement,
|
||||
theme: HTMLSelectElement,
|
||||
trayIcon: HTMLInputElement,
|
||||
staticWindowTitle: HTMLInputElement,
|
||||
updateFrequency: HTMLInputElement,
|
||||
enableListenBrainz: HTMLInputElement,
|
||||
ListenBrainzAPI: HTMLInputElement,
|
||||
@ -141,10 +141,10 @@ function refreshSettings() {
|
||||
port.value = settingsStore.get(settings.apiSettings.port);
|
||||
singleInstance.checked = settingsStore.get(settings.singleInstance);
|
||||
skipArtists.checked = settingsStore.get(settings.skipArtists);
|
||||
theme.value = settingsStore.get(settings.theme);
|
||||
skippedArtists.value = settingsStore.get<string, string[]>(settings.skippedArtists).join("\n");
|
||||
trayIcon.checked = settingsStore.get(settings.trayIcon);
|
||||
staticWindowTitle.checked = settingsStore.get(settings.staticWindowTitle);
|
||||
theme.value = settingsStore.get(settings.theme);
|
||||
trayIcon.checked = settingsStore.get(settings.trayIcon);
|
||||
updateFrequency.value = settingsStore.get(settings.updateFrequency);
|
||||
enableListenBrainz.checked = settingsStore.get(settings.ListenBrainz.enabled);
|
||||
ListenBrainzAPI.value = settingsStore.get(settings.ListenBrainz.api);
|
||||
@ -261,9 +261,9 @@ window.addEventListener("DOMContentLoaded", () => {
|
||||
port = get("port");
|
||||
theme = get<HTMLSelectElement>("themesList");
|
||||
trayIcon = get("trayIcon");
|
||||
staticWindowTitle = get("staticWindowTitle");
|
||||
skipArtists = get("skipArtists");
|
||||
skippedArtists = get("skippedArtists");
|
||||
staticWindowTitle = get("staticWindowTitle");
|
||||
singleInstance = get("singleInstance");
|
||||
updateFrequency = get("updateFrequency");
|
||||
enableListenBrainz = get("enableListenBrainz");
|
||||
@ -298,10 +298,10 @@ window.addEventListener("DOMContentLoaded", () => {
|
||||
addInputListener(port, settings.apiSettings.port);
|
||||
addInputListener(skipArtists, settings.skipArtists);
|
||||
addTextAreaListener(skippedArtists, settings.skippedArtists);
|
||||
addInputListener(staticWindowTitle, settings.staticWindowTitle);
|
||||
addInputListener(singleInstance, settings.singleInstance);
|
||||
addSelectListener(theme, settings.theme);
|
||||
addInputListener(trayIcon, settings.trayIcon);
|
||||
addInputListener(staticWindowTitle, settings.staticWindowTitle);
|
||||
addInputListener(updateFrequency, settings.updateFrequency);
|
||||
addInputListener(
|
||||
enableListenBrainz,
|
||||
|
@ -595,8 +595,7 @@ setInterval(function () {
|
||||
};
|
||||
|
||||
// update title, url and play info with new info
|
||||
if(settingsStore.get(settings.staticWindowTitle)) setTitle(staticTitle)
|
||||
else setTitle(songDashArtistTitle);
|
||||
settingsStore.get(settings.staticWindowTitle) ? setTitle(staticTitle) : setTitle(songDashArtistTitle);
|
||||
getTrackURL();
|
||||
currentSong = songDashArtistTitle;
|
||||
currentPlayStatus = currentStatus;
|
||||
|
@ -69,9 +69,9 @@ export const settingsStore = new Store({
|
||||
singleInstance: true,
|
||||
skipArtists: false,
|
||||
skippedArtists: [""],
|
||||
staticWindowTitle: false,
|
||||
theme: "none",
|
||||
trayIcon: true,
|
||||
staticWindowTitle: false,
|
||||
updateFrequency: 500,
|
||||
windowBounds: { width: 800, height: 600 },
|
||||
},
|
||||
@ -128,7 +128,7 @@ const settingsModule = {
|
||||
settingsWindow,
|
||||
};
|
||||
|
||||
export const createSettingsWindow = function() {
|
||||
export const createSettingsWindow = function () {
|
||||
settingsWindow = new BrowserWindow({
|
||||
width: 650,
|
||||
height: 700,
|
||||
@ -160,7 +160,7 @@ export const createSettingsWindow = function() {
|
||||
settingsModule.settingsWindow = settingsWindow;
|
||||
};
|
||||
|
||||
export const showSettingsWindow = function(tab = "general") {
|
||||
export const showSettingsWindow = function (tab = "general") {
|
||||
if (!settingsWindow) {
|
||||
console.log("Settings window is not initialized. Attempting to create it.");
|
||||
createSettingsWindow();
|
||||
@ -171,11 +171,11 @@ export const showSettingsWindow = function(tab = "general") {
|
||||
settingsWindow.webContents.send("refreshData");
|
||||
settingsWindow.show();
|
||||
};
|
||||
export const hideSettingsWindow = function() {
|
||||
export const hideSettingsWindow = function () {
|
||||
settingsWindow.hide();
|
||||
};
|
||||
|
||||
export const closeSettingsWindow = function() {
|
||||
export const closeSettingsWindow = function () {
|
||||
settingsWindow = null;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user