-
+
- {{ path.name }}
+ {{ path.name }}
@@ -25,6 +31,7 @@
import { focusElem } from "@/utils";
import { subPath } from "@/interfaces";
import { onUpdated } from "vue";
+import { Routes } from "@/composables/enums";
defineProps<{
subPaths: subPath[];
@@ -43,7 +50,6 @@ onUpdated(() => {
.folder {
display: flex;
gap: $small;
- width: inherit;
.playbtnrect {
height: 2.25rem;
@@ -64,7 +70,6 @@ onUpdated(() => {
height: 2.25rem;
display: flex;
align-items: center;
- width: 100%;
overflow: auto;
padding-right: $smaller;
@@ -74,7 +79,7 @@ onUpdated(() => {
background-image: url("../../../assets/icons/folder.fill.svg");
background-size: 1.5rem;
margin-left: $smaller;
- background-position: 65% 50%;
+ cursor: pointer;
}
.paths {
@@ -91,7 +96,10 @@ onUpdated(() => {
.path {
white-space: nowrap;
margin: auto 0;
- cursor: default;
+
+ a {
+ cursor: default;
+ }
.text {
padding: $smaller;
@@ -102,13 +110,11 @@ onUpdated(() => {
content: "/";
font-size: small;
margin-right: $smaller;
- opacity: .25;
+ opacity: 0.25;
}
&:first-child {
- &::before {
- display: none;
- }
+ display: none;
}
&:last-child {
diff --git a/src/interfaces/settings.ts b/src/interfaces/settings.ts
index 4d45a164..ca6e4336 100644
--- a/src/interfaces/settings.ts
+++ b/src/interfaces/settings.ts
@@ -14,6 +14,7 @@ export interface Setting {
title: string;
type: SettingType;
options?: SettingOption[];
+ inactive?: () => boolean;
action: (arg0?: any) => void;
source: () => any;
}
diff --git a/src/settings/general/now-playing.ts b/src/settings/general/now-playing.ts
index da759660..5776ddd3 100644
--- a/src/settings/general/now-playing.ts
+++ b/src/settings/general/now-playing.ts
@@ -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];
diff --git a/src/stores/settings/index.ts b/src/stores/settings/index.ts
index 4a6f9499..0feecb5c 100644
--- a/src/stores/settings/index.ts
+++ b/src/stores/settings/index.ts
@@ -1,16 +1,29 @@
import { defineStore } from "pinia";
-import useQueueStore from "../queue";
export default defineStore("settings", {
state: () => ({
use_alt_np: false,
+ use_sidebar: true,
}),
actions: {
toggleUseRightNP() {
+ if (!this.use_sidebar) return;
this.use_alt_np = !this.use_alt_np;
- useQueueStore();
+ },
+ toggleDisableSidebar() {
+ this.use_sidebar = !this.use_sidebar;
+ },
+ },
+ getters: {
+ show_alt_np(): boolean {
+ return this.use_sidebar && this.use_alt_np;
+ },
+ show_default_np(): boolean {
+ return !this.show_alt_np;
+ },
+ disable_show_alt_np(): boolean {
+ return !this.use_sidebar;
},
},
- getters: {},
persist: true,
});