diff --git a/README.md b/README.md index 263932d..889cf34 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,8 @@ To install and work with the code on this project follow these steps: - Notifications - Shortcuts ([source](https://defkey.com/tidal-desktop-shortcuts)) - API for status and playback -- [Settings feature](./docs/settings.png) to disable certain functionality. -- Tray player (coming soon) +- [Settings feature](./docs/settings.png) to disable certain functionality. (`ctrl+/`) +- Tray(/mini) player (coming soon) ## Integrations diff --git a/src/main.js b/src/main.js index ff162f1..4278d44 100644 --- a/src/main.js +++ b/src/main.js @@ -8,6 +8,7 @@ const { hideSettingsWindow, } = require("./scripts/settings"); const { addTray, refreshTray } = require("./scripts/tray"); +const { addMenu } = require("./scripts/menu"); const path = require("path"); const tidalUrl = "https://listen.tidal.com"; @@ -79,6 +80,7 @@ function addGlobalShortcuts() { // Some APIs can only be used after this event occurs. app.on("ready", () => { createWindow(); + addMenu(); createSettingsWindow(); addGlobalShortcuts(); addTray({ icon }); diff --git a/src/pages/settings/icon.png b/src/pages/settings/icon.png new file mode 100644 index 0000000..31838df Binary files /dev/null and b/src/pages/settings/icon.png differ diff --git a/src/pages/settings/preload.js b/src/pages/settings/preload.js index 35be590..7b8e084 100644 --- a/src/pages/settings/preload.js +++ b/src/pages/settings/preload.js @@ -19,6 +19,14 @@ function refreshSettings() { menuBar.checked = store.get(settings.menuBar); } +/** + * Open an url in the default browsers + */ +window.openExternal = function(url) { + const { shell } = require("electron"); + shell.openExternal(url); +}; + /** * hide the settings window */ @@ -58,6 +66,10 @@ window.addEventListener("DOMContentLoaded", () => { refreshSettings(); }); + ipcRenderer.on("goToTab", (event, tab) => { + document.getElementById(tab).click(); + }); + notifications = get("notifications"); playBackControl = get("playBackControl"); api = get("apiCheckbox"); diff --git a/src/pages/settings/settings.html b/src/pages/settings/settings.html index 4a668a7..858cb85 100644 --- a/src/pages/settings/settings.html +++ b/src/pages/settings/settings.html @@ -31,6 +31,9 @@ + + +
+ Tidal-hifi is made by Rick van Lieshout.
+ It uses castlabs versions of Electron for widevine support.
+