mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
show use_alt_np as disabled if dependent setting is disabled
+ add getters to settings store + add use sidebar setting
This commit is contained in:
@@ -1,13 +1,20 @@
|
||||
import { SettingType } from "@/interfaces/settings";
|
||||
import { Setting, SettingType } from "@/interfaces/settings";
|
||||
import useSettingsStore from "@/stores/settings";
|
||||
|
||||
const settings = useSettingsStore;
|
||||
|
||||
export default [
|
||||
{
|
||||
title: "Use alternate now playing card",
|
||||
type: SettingType.switch,
|
||||
source: () => settings().use_alt_np,
|
||||
action: () => settings().toggleUseRightNP(),
|
||||
},
|
||||
];
|
||||
const use_alt_np: Setting = {
|
||||
title: "Use alternate now playing card",
|
||||
type: SettingType.switch,
|
||||
source: () => settings().use_alt_np,
|
||||
inactive: () => settings().disable_show_alt_np,
|
||||
action: () => settings().toggleUseRightNP(),
|
||||
};
|
||||
const use_sidebar: Setting = {
|
||||
title: "Use right sidebar",
|
||||
type: SettingType.switch,
|
||||
source: () => settings().use_sidebar,
|
||||
action: () => settings().toggleDisableSidebar(),
|
||||
};
|
||||
|
||||
export default [use_sidebar, use_alt_np];
|
||||
|
||||
Reference in New Issue
Block a user