mirror of
https://github.com/meowarex/TidaLuna-Plugins.git
synced 2026-06-18 03:43:10 +10:00
Merge pull request #8 from meowarex/dev
Removed Debug Messages + Fixed Setting States
This commit is contained in:
@@ -3,7 +3,7 @@ import { LunaSettings, LunaSwitchSetting } from "@luna/ui";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export const settings = await ReactiveStore.getPluginStorage("CleanView", {
|
export const settings = await ReactiveStore.getPluginStorage("CleanView", {
|
||||||
hideUIEnabled: false,
|
hideUIEnabled: true,
|
||||||
playerBarVisible: true,
|
playerBarVisible: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -27,16 +27,11 @@ const applyThemeStyles = function(): void {
|
|||||||
// Remove SeekBar coloring if Quality Color Matched Seek Bar is enabled
|
// Remove SeekBar coloring if Quality Color Matched Seek Bar is enabled
|
||||||
if (settings.qualityColorMatchedSeekBar) {
|
if (settings.qualityColorMatchedSeekBar) {
|
||||||
modifiedStyle = modifiedStyle.replace(/\[class\^="_progressBarWrapper"\]\s*\{[^}]*\}/g, '');
|
modifiedStyle = modifiedStyle.replace(/\[class\^="_progressBarWrapper"\]\s*\{[^}]*\}/g, '');
|
||||||
trace.msg.log("OLED theme applied with SeekBar coloring removed");
|
|
||||||
} else {
|
|
||||||
trace.msg.log("OLED theme applied with original SeekBar coloring");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove button styling if OLED Friendly Buttons is enabled
|
// Remove button styling if OLED Friendly Buttons is enabled
|
||||||
if (settings.oledFriendlyButtons) {
|
if (settings.oledFriendlyButtons) {
|
||||||
// First, let's debug what we're working with
|
|
||||||
const originalRuleCount = (modifiedStyle.match(/\{[^}]*\}/g) || []).length;
|
const originalRuleCount = (modifiedStyle.match(/\{[^}]*\}/g) || []).length;
|
||||||
trace.msg.log(`Original CSS has ${originalRuleCount} rules`);
|
|
||||||
|
|
||||||
// Split CSS into individual rules and filter out button-related ones
|
// Split CSS into individual rules and filter out button-related ones
|
||||||
const cssRules = modifiedStyle.split('}').filter(rule => rule.trim());
|
const cssRules = modifiedStyle.split('}').filter(rule => rule.trim());
|
||||||
@@ -83,12 +78,6 @@ const applyThemeStyles = function(): void {
|
|||||||
});
|
});
|
||||||
|
|
||||||
modifiedStyle = filteredRules.join('} ') + (filteredRules.length > 0 ? '}' : '');
|
modifiedStyle = filteredRules.join('} ') + (filteredRules.length > 0 ? '}' : '');
|
||||||
|
|
||||||
const filteredRuleCount = (modifiedStyle.match(/\{[^}]*\}/g) || []).length;
|
|
||||||
const removedRuleCount = originalRuleCount - filteredRuleCount;
|
|
||||||
trace.msg.log(`OLED Friendly Buttons enabled: Removed ${removedRuleCount} button-related CSS rules, ${filteredRuleCount} rules remaining`);
|
|
||||||
} else {
|
|
||||||
trace.msg.log("OLED Friendly Buttons disabled: Button styling preserved from original theme");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
appliedStyleElement = document.createElement("style");
|
appliedStyleElement = document.createElement("style");
|
||||||
|
|||||||
Reference in New Issue
Block a user