mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-11-13 15:09:20 +01:00
refactor: remove custom top bar feature from configuration and UI
This commit is contained in:
@@ -227,7 +227,6 @@ Freedom Loader can be configured either through the settings panel in the UI or
|
||||
"autoUpdate": true,
|
||||
"systemTray": true,
|
||||
"discordRPC": true,
|
||||
"customTopBar": true,
|
||||
"autoCheckInfo": true,
|
||||
"addThumbnail": 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 |
|
||||
| `systemTray` | boolean | `false` | Allow app to minimize on close [EXPERIMENTAL] |
|
||||
| `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 |
|
||||
| `addThumbnail` | boolean | `true` | Embed thumbnail in downloaded audio files |
|
||||
| `addMetadata` | boolean | `true` | Add metadata tags to downloaded files |
|
||||
|
||||
@@ -33,7 +33,6 @@ const FEATURE_WHITELIST = new Set([
|
||||
"autoUpdate",
|
||||
"systemTray",
|
||||
"discordRPC",
|
||||
"customTopBar",
|
||||
"autoCheckInfo",
|
||||
"addThumbnail",
|
||||
"addMetadata",
|
||||
|
||||
@@ -57,7 +57,7 @@ async function createMainWindow() {
|
||||
height: 800,
|
||||
minWidth: 750,
|
||||
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,
|
||||
show: false,
|
||||
webPreferences: {
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
"autoUpdate": true,
|
||||
"systemTray": false,
|
||||
"discordRPC": true,
|
||||
"customTopBar": true,
|
||||
"autoCheckInfo": true,
|
||||
"addThumbnail": true,
|
||||
"addMetadata": true,
|
||||
|
||||
@@ -179,13 +179,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<!-- <div class="setting-item">
|
||||
<input type="checkbox" data-key="customTopBar" id="customTopBar">
|
||||
<div class="setting-info">
|
||||
<span class="setting-title">Custom Top bar</span>
|
||||
<small>Use this if the topbar is missing or you prefer a custom one.</small>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="setting-item" style="margin-left: 32px; margin-top: 20px;">
|
||||
<div class="setting-info">
|
||||
|
||||
@@ -35,25 +35,26 @@ export function initTopBar() {
|
||||
|
||||
}
|
||||
|
||||
async function attachListeners(){
|
||||
try{
|
||||
const featuresList = await window.electronAPI.getFeatures();
|
||||
//* Disabled because i disabled native topbar for now, but keeping the code in case i want to re-enable it later
|
||||
// async function attachListeners(){
|
||||
// try{
|
||||
// const featuresList = await window.electronAPI.getFeatures();
|
||||
|
||||
if (!featuresList.customTopBar) {
|
||||
const topbar = document.getElementById("topbar");
|
||||
const container = document.getElementById("container");
|
||||
const themeSwitcher = document.getElementById("theme-switcher");
|
||||
// if (!featuresList.customTopBar) {
|
||||
// const topbar = document.getElementById("topbar");
|
||||
// const container = document.getElementById("container");
|
||||
// const themeSwitcher = document.getElementById("theme-switcher");
|
||||
|
||||
if (topbar) topbar.style.display = "none";
|
||||
if (container) container.style.marginTop = "0";
|
||||
if (themeSwitcher) themeSwitcher.style.top = "30px";
|
||||
}
|
||||
// if (topbar) topbar.style.display = "none";
|
||||
// if (container) container.style.marginTop = "0";
|
||||
// if (themeSwitcher) themeSwitcher.style.top = "30px";
|
||||
// }
|
||||
|
||||
} catch (error) {
|
||||
console.error("Failed to load layout features for topbar:", error);
|
||||
}
|
||||
// } catch (error) {
|
||||
// console.error("Failed to load layout features for topbar:", error);
|
||||
// }
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
initTopBar()
|
||||
document.addEventListener("DOMContentLoaded", attachListeners)
|
||||
//document.addEventListener("DOMContentLoaded", attachListeners)
|
||||
@@ -69,7 +69,6 @@ function buildYtDlpArgs({url, audioOnly, quality, outputFolder, isPlaylist}) {
|
||||
|
||||
logger.info(`CONFIG autoUpdate: ${configFeatures.autoUpdate}`);
|
||||
logger.info(`CONFIG discordRPC: ${configFeatures.discordRPC}`);
|
||||
logger.info(`CONFIG customTopBar: ${configFeatures.customTopBar}`);
|
||||
logger.info(`CONFIG autoCheckInfo: ${configFeatures.autoCheckInfo}`);
|
||||
logger.info(`CONFIG keepPlaylistOrder: ${configFeatures.keepPlaylistOrder}`);
|
||||
logger.info(`CONFIG addThumbnail: ${configFeatures.addThumbnail}`);
|
||||
|
||||
Reference in New Issue
Block a user