From 54564271fe318443ea33c7686e2dc5a62f2c2bf0 Mon Sep 17 00:00:00 2001 From: Dominik Pschenitschni Date: Fri, 18 Nov 2022 16:47:54 +0100 Subject: [PATCH] feat: merge useListBackground composable with list store --- src/components/home/contentAuth.vue | 14 +-- src/components/home/contentLinkShare.vue | 12 ++- src/components/list/ListWrapper.vue | 2 - src/components/list/partials/ListCard.vue | 13 ++- .../list/partials/useListBackground.ts | 55 ----------- .../{getBlobFromBlurHash.ts => blurhash.ts} | 11 +++ src/services/list.ts | 13 --- src/stores/base.ts | 58 +---------- src/stores/lists.ts | 97 +++++++++++-------- 9 files changed, 94 insertions(+), 181 deletions(-) delete mode 100644 src/components/list/partials/useListBackground.ts rename src/helpers/{getBlobFromBlurHash.ts => blurhash.ts} (72%) diff --git a/src/components/home/contentAuth.vue b/src/components/home/contentAuth.vue index 027fb3ed1..d610b5e82 100644 --- a/src/components/home/contentAuth.vue +++ b/src/components/home/contentAuth.vue @@ -8,14 +8,14 @@
+ :style="{'background-image': backgroundUrl ? `url(${backgroundUrl})` : undefined}">
baseStore.background) -const blurHash = computed(() => baseStore.blurHash) const menuActive = computed(() => baseStore.menuActive) +const currentList = computed(() => baseStore.currentList) + +const {backgroundUrl, blurHashUrl} = useListBackground(currentList) function showKeyboardShortcuts() { baseStore.setKeyboardShortcutsActive(true) diff --git a/src/components/home/contentLinkShare.vue b/src/components/home/contentLinkShare.vue index bfcf8821b..a3213a6d1 100644 --- a/src/components/home/contentLinkShare.vue +++ b/src/components/home/contentLinkShare.vue @@ -1,7 +1,7 @@