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

@@ -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)