diff --git a/frontend/src/components/VSkeleton/VBone.vue b/frontend/src/components/VSkeleton/VBone.vue
index 7ce0ed5308b..4cd7356be90 100644
--- a/frontend/src/components/VSkeleton/VBone.vue
+++ b/frontend/src/components/VSkeleton/VBone.vue
@@ -1,12 +1,21 @@
-
+
-
+
diff --git a/frontend/src/components/VSkeleton/VGridSkeleton.vue b/frontend/src/components/VSkeleton/VGridSkeleton.vue
index e0a15e57bfd..fd9803cc875 100644
--- a/frontend/src/components/VSkeleton/VGridSkeleton.vue
+++ b/frontend/src/components/VSkeleton/VGridSkeleton.vue
@@ -3,10 +3,12 @@
* Display placeholder elements while waiting for the actual elements to be
* loaded in the results views.
*/
-import { computed } from "vue"
+import { computed, inject, ref } from "vue"
import type { SupportedSearchType } from "~/constants/media"
+import { IsSidebarVisibleKey } from "~/types/provides"
+
import VAudioTrackSkeleton from "~/components/VSkeleton/VAudioTrackSkeleton.vue"
import VBone from "~/components/VSkeleton/VBone.vue"
@@ -14,11 +16,9 @@ const props = withDefaults(
defineProps<{
isForTab?: SupportedSearchType
numElems?: number
- isSidebarVisible?: boolean
}>(),
{
isForTab: "image",
- isSidebarVisible: false,
}
)
@@ -39,6 +39,8 @@ const elementCount = computed(() => {
}
return 8
})
+
+const isSidebarVisible = inject(IsSidebarVisibleKey, ref(false))
diff --git a/frontend/src/components/VSkeleton/meta/VGridSkeleton.stories.ts b/frontend/src/components/VSkeleton/meta/VGridSkeleton.stories.ts
index b99fd54d7fe..c11c9ba2b53 100644
--- a/frontend/src/components/VSkeleton/meta/VGridSkeleton.stories.ts
+++ b/frontend/src/components/VSkeleton/meta/VGridSkeleton.stories.ts
@@ -1,4 +1,4 @@
-import { h } from "vue"
+import { supportedSearchTypes } from "~/constants/media"
import VGridSkeleton from "~/components/VSkeleton/VGridSkeleton.vue"
@@ -7,42 +7,17 @@ import type { Meta, StoryObj } from "@storybook/vue3"
const meta = {
title: "Components/Skeleton",
component: VGridSkeleton,
+ argTypes: {
+ isForTab: { control: "select", options: supportedSearchTypes },
+ },
} satisfies Meta
export default meta
type Story = StoryObj
-const Template: Story = {
- render: (args) => ({
- components: { VGridSkeleton },
- setup() {
- return () => h(VGridSkeleton, { isForTab: args.isForTab })
- },
- }),
-}
-export const AllTab: Story = {
- ...Template,
- name: "All tab",
-
- args: {
- isForTab: "all",
- },
-}
-
-export const ImageTab: Story = {
- ...Template,
- name: "Image tab",
-
+export const Default: Story = {
+ name: "Grid Skeleton",
args: {
isForTab: "image",
},
}
-
-export const AudioTab = {
- ...Template,
- name: "Audio tab",
-
- args: {
- isForTab: "audio",
- },
-}
diff --git a/frontend/src/styles/tailwind.css b/frontend/src/styles/tailwind.css
index 86e322a874d..b41377a7eb0 100644
--- a/frontend/src/styles/tailwind.css
+++ b/frontend/src/styles/tailwind.css
@@ -258,6 +258,8 @@
--color-modal-layer: var(--color-gray-12-60);
--color-new-highlight: var(--color-yellow-3);
--color-gray-new-highlight: var(--color-gray-1-20);
+ --color-skeleton-base: var(--color-gray-2);
+ --color-skeleton-secondary: var(--color-gray-3);
}
}
@@ -316,6 +318,8 @@
--color-modal-layer: var(--color-gray-12-80);
--color-new-highlight: var(--color-pink-6);
--color-gray-new-highlight: var(--color-gray-12-20);
+ --color-skeleton-base: var(--color-gray-2);
+ --color-skeleton-secondary: var(--color-gray-3);
}
:is(.dark-mode *),
@@ -373,6 +377,8 @@
--color-modal-layer: var(--color-gray-12-60);
--color-new-highlight: var(--color-yellow-3);
--color-gray-new-highlight: var(--color-gray-1-20);
+ --color-skeleton-base: var(--color-gray-11);
+ --color-skeleton-secondary: var(--color-gray-10);
}
body {