diff --git a/frontend/src/views/apps/PhotosApp.vue b/frontend/src/views/apps/PhotosApp.vue index 2b015de..6ac2a53 100644 --- a/frontend/src/views/apps/PhotosApp.vue +++ b/frontend/src/views/apps/PhotosApp.vue @@ -4,6 +4,7 @@ import { computed, ref } from 'vue' import { useMediaStore } from '@/stores/media' import { usePhoneStore } from '@/stores/phone' +import type { PhonePhoto } from '@/stores/media' const media = useMediaStore() const phone = usePhoneStore() @@ -26,6 +27,20 @@ const filtered = computed(() => phone.t(photo.titleKey).toLowerCase().includes(query.value.toLowerCase()), ), ) + +function photoStyle(photo?: PhonePhoto): Record { + if (!photo) return {} + return { + background: photo.gradient, + ...(photo.url + ? { + backgroundImage: `url(${photo.url})`, + backgroundPosition: 'center', + backgroundSize: 'cover', + } + : {}), + } +}