mirror of
https://github.com/meowarex/TidaLuna-Plugins.git
synced 2026-06-18 03:43:10 +10:00
Updated README <3
This commit is contained in:
@@ -2,7 +2,7 @@ import { ReactiveStore } from "@luna/core";
|
||||
import { LunaSettings, LunaSwitchSetting } from "@luna/ui";
|
||||
import React from "react";
|
||||
|
||||
export const settings = await ReactiveStore.getPluginStorage("OLEDTheme", {
|
||||
export const settings = await ReactiveStore.getPluginStorage("Obsidian", {
|
||||
qualityColorMatchedSeekBar: true,
|
||||
oledFriendlyButtons: true,
|
||||
lightMode: false,
|
||||
@@ -31,14 +31,14 @@ export const Settings = () => {
|
||||
(settings.qualityColorMatchedSeekBar = checked),
|
||||
);
|
||||
// Update styles immediately when setting changes
|
||||
if ((window as any).updateOLEDThemeStyles) {
|
||||
(window as any).updateOLEDThemeStyles();
|
||||
if ((window as any).updateObsidianStyles) {
|
||||
(window as any).updateObsidianStyles();
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<LunaSwitchSetting
|
||||
title="OLED Friendly Buttons"
|
||||
desc="Remove button styling from OLED theme to keep buttons with original Tidal appearance"
|
||||
desc="Adjusts the buttons to be more OLED friendly"
|
||||
checked={oledFriendlyButtons}
|
||||
onChange={(_, checked) => {
|
||||
console.log(
|
||||
@@ -47,8 +47,8 @@ export const Settings = () => {
|
||||
);
|
||||
setOledFriendlyButtons((settings.oledFriendlyButtons = checked));
|
||||
// Update styles immediately when setting changes
|
||||
if ((window as any).updateOLEDThemeStyles) {
|
||||
(window as any).updateOLEDThemeStyles();
|
||||
if ((window as any).updateObsidianStyles) {
|
||||
(window as any).updateObsidianStyles();
|
||||
}
|
||||
}}
|
||||
/>
|
||||
@@ -60,8 +60,8 @@ export const Settings = () => {
|
||||
console.log("Light Mode:", checked ? "enabled" : "disabled");
|
||||
setLightMode((settings.lightMode = checked));
|
||||
// Update styles immediately when setting changes
|
||||
if ((window as any).updateOLEDThemeStyles) {
|
||||
(window as any).updateOLEDThemeStyles();
|
||||
if ((window as any).updateObsidianStyles) {
|
||||
(window as any).updateObsidianStyles();
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -7,7 +7,7 @@ import darkTheme from "file://dark-theme.css?minify";
|
||||
import oledFriendlyTheme from "file://oled-friendly.css?minify";
|
||||
import lightTheme from "file://light-theme.css?minify";
|
||||
|
||||
export const { trace } = Tracer("[OLED Theme]");
|
||||
export const { trace } = Tracer("[Obsidian]");
|
||||
export { Settings };
|
||||
|
||||
// called when plugin is unloaded.
|
||||
@@ -15,7 +15,7 @@ export { Settings };
|
||||
export const unloads = new Set<LunaUnload>();
|
||||
|
||||
// StyleTag instance for theme management
|
||||
const themeStyleTag = new StyleTag("OLED-Theme", unloads);
|
||||
const themeStyleTag = new StyleTag("Obsidian", unloads);
|
||||
|
||||
// Quality color mapping
|
||||
const QUALITY_COLORS = {
|
||||
@@ -150,13 +150,13 @@ const applyThemeStyles = (): void => {
|
||||
// Make this function available globally so Settings can call it
|
||||
declare global {
|
||||
interface Window {
|
||||
updateOLEDThemeStyles?: () => void;
|
||||
updateObsidianStyles?: () => void;
|
||||
}
|
||||
}
|
||||
|
||||
window.updateOLEDThemeStyles = applyThemeStyles;
|
||||
window.updateObsidianStyles = applyThemeStyles;
|
||||
|
||||
// Apply the OLED theme initially
|
||||
// Apply the Obsidian theme initially
|
||||
applyThemeStyles();
|
||||
|
||||
// Ensure interval is cleared on unload
|
||||
|
||||
Reference in New Issue
Block a user