refactor: remove custom top bar feature from configuration and UI

This commit is contained in:
MasterAcnolo
2026-10-07 17:21:10 +02:00
parent 6aa3a39819
commit 7ee6d6fbe7
7 changed files with 20 additions and 24 deletions

View File

@@ -227,7 +227,6 @@ Freedom Loader can be configured either through the settings panel in the UI or
"autoUpdate": true, "autoUpdate": true,
"systemTray": true, "systemTray": true,
"discordRPC": true, "discordRPC": true,
"customTopBar": true,
"autoCheckInfo": true, "autoCheckInfo": true,
"addThumbnail": true, "addThumbnail": true,
"addMetadata": true, "addMetadata": true,
@@ -252,7 +251,6 @@ Freedom Loader can be configured either through the settings panel in the UI or
| `autoUpdate` | boolean | `true` | Enable automatic application updates | | `autoUpdate` | boolean | `true` | Enable automatic application updates |
| `systemTray` | boolean | `false` | Allow app to minimize on close [EXPERIMENTAL] | | `systemTray` | boolean | `false` | Allow app to minimize on close [EXPERIMENTAL] |
| `discordRPC` | boolean | `true` | Enable Discord Rich Presence integration | | `discordRPC` | boolean | `true` | Enable Discord Rich Presence integration |
| `customTopBar` | boolean | `true` | Use custom application top bar |
| `autoCheckInfo` | boolean | `true` | Automatically fetch video information on URL paste | | `autoCheckInfo` | boolean | `true` | Automatically fetch video information on URL paste |
| `addThumbnail` | boolean | `true` | Embed thumbnail in downloaded audio files | | `addThumbnail` | boolean | `true` | Embed thumbnail in downloaded audio files |
| `addMetadata` | boolean | `true` | Add metadata tags to downloaded files | | `addMetadata` | boolean | `true` | Add metadata tags to downloaded files |

View File

@@ -33,7 +33,6 @@ const FEATURE_WHITELIST = new Set([
"autoUpdate", "autoUpdate",
"systemTray", "systemTray",
"discordRPC", "discordRPC",
"customTopBar",
"autoCheckInfo", "autoCheckInfo",
"addThumbnail", "addThumbnail",
"addMetadata", "addMetadata",

View File

@@ -57,7 +57,7 @@ async function createMainWindow() {
height: 800, height: 800,
minWidth: 750, minWidth: 750,
minHeight: 800, minHeight: 800,
frame: !configFeatures.customTopBar, frame: false, // Force custom topbar for consistent UI across platforms, and less maintenance headaches with native titlebar actions
devTools: !app.isPackaged, devTools: !app.isPackaged,
show: false, show: false,
webPreferences: { webPreferences: {

View File

@@ -2,7 +2,6 @@
"autoUpdate": true, "autoUpdate": true,
"systemTray": false, "systemTray": false,
"discordRPC": true, "discordRPC": true,
"customTopBar": true,
"autoCheckInfo": true, "autoCheckInfo": true,
"addThumbnail": true, "addThumbnail": true,
"addMetadata": true, "addMetadata": true,

View File

@@ -179,13 +179,13 @@
</div> </div>
</div> </div>
<div class="setting-item"> <!-- <div class="setting-item">
<input type="checkbox" data-key="customTopBar" id="customTopBar"> <input type="checkbox" data-key="customTopBar" id="customTopBar">
<div class="setting-info"> <div class="setting-info">
<span class="setting-title">Custom Top bar</span> <span class="setting-title">Custom Top bar</span>
<small>Use this if the topbar is missing or you prefer a custom one.</small> <small>Use this if the topbar is missing or you prefer a custom one.</small>
</div> </div>
</div> </div> -->
<div class="setting-item" style="margin-left: 32px; margin-top: 20px;"> <div class="setting-item" style="margin-left: 32px; margin-top: 20px;">
<div class="setting-info"> <div class="setting-info">

View File

@@ -35,25 +35,26 @@ export function initTopBar() {
} }
async function attachListeners(){ //* Disabled because i disabled native topbar for now, but keeping the code in case i want to re-enable it later
try{ // async function attachListeners(){
const featuresList = await window.electronAPI.getFeatures(); // try{
// const featuresList = await window.electronAPI.getFeatures();
if (!featuresList.customTopBar) { // if (!featuresList.customTopBar) {
const topbar = document.getElementById("topbar"); // const topbar = document.getElementById("topbar");
const container = document.getElementById("container"); // const container = document.getElementById("container");
const themeSwitcher = document.getElementById("theme-switcher"); // const themeSwitcher = document.getElementById("theme-switcher");
if (topbar) topbar.style.display = "none"; // if (topbar) topbar.style.display = "none";
if (container) container.style.marginTop = "0"; // if (container) container.style.marginTop = "0";
if (themeSwitcher) themeSwitcher.style.top = "30px"; // if (themeSwitcher) themeSwitcher.style.top = "30px";
} // }
} catch (error) { // } catch (error) {
console.error("Failed to load layout features for topbar:", error); // console.error("Failed to load layout features for topbar:", error);
} // }
} // }
initTopBar() initTopBar()
document.addEventListener("DOMContentLoaded", attachListeners) //document.addEventListener("DOMContentLoaded", attachListeners)

View File

@@ -69,7 +69,6 @@ function buildYtDlpArgs({url, audioOnly, quality, outputFolder, isPlaylist}) {
logger.info(`CONFIG autoUpdate: ${configFeatures.autoUpdate}`); logger.info(`CONFIG autoUpdate: ${configFeatures.autoUpdate}`);
logger.info(`CONFIG discordRPC: ${configFeatures.discordRPC}`); logger.info(`CONFIG discordRPC: ${configFeatures.discordRPC}`);
logger.info(`CONFIG customTopBar: ${configFeatures.customTopBar}`);
logger.info(`CONFIG autoCheckInfo: ${configFeatures.autoCheckInfo}`); logger.info(`CONFIG autoCheckInfo: ${configFeatures.autoCheckInfo}`);
logger.info(`CONFIG keepPlaylistOrder: ${configFeatures.keepPlaylistOrder}`); logger.info(`CONFIG keepPlaylistOrder: ${configFeatures.keepPlaylistOrder}`);
logger.info(`CONFIG addThumbnail: ${configFeatures.addThumbnail}`); logger.info(`CONFIG addThumbnail: ${configFeatures.addThumbnail}`);