From 4de0b4e4ca9b53ee31b8ec0768ed5820d847a8b8 Mon Sep 17 00:00:00 2001 From: Puniko Date: Sun, 19 Feb 2023 15:01:23 +0100 Subject: [PATCH 01/36] use includes instead of some --- packages/client/src/components/media-list.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/client/src/components/media-list.vue b/packages/client/src/components/media-list.vue index c2643b23e..3e86ab0d0 100644 --- a/packages/client/src/components/media-list.vue +++ b/packages/client/src/components/media-list.vue @@ -130,9 +130,7 @@ const previewable = (file: foundkey.entities.DriveFile): boolean => { }; const isModule = (file: foundkey.entities.DriveFile): boolean => { - return FILE_TYPE_TRACKER_MODULES.some((type) => { - return file.type === type; - }) || FILE_EXT_TRACKER_MODULES.some((ext) => { + return FILE_TYPE_TRACKER_MODULES.includes(file.type) || FILE_EXT_TRACKER_MODULES.some((ext) => { return file.name.toLowerCase().endsWith("." + ext); }); }; From 3152630f274862d2980e15dfc505b78854413a98 Mon Sep 17 00:00:00 2001 From: Puniko Date: Sun, 19 Feb 2023 15:03:40 +0100 Subject: [PATCH 02/36] cleanup audioEl and volumechange --- packages/client/src/components/media-banner.vue | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/packages/client/src/components/media-banner.vue b/packages/client/src/components/media-banner.vue index ed4f70189..c493d6bad 100644 --- a/packages/client/src/components/media-banner.vue +++ b/packages/client/src/components/media-banner.vue @@ -31,16 +31,6 @@ defineProps<{ media: foundkey.entities.DriveFile; }>(); -const audioEl = $ref(); -let hide = $ref(true); - -function volumechange(): void { - if (audioEl) ColdDeviceStorage.set('mediaVolume', audioEl.volume); -} - -onMounted(() => { - if (audioEl) audioEl.volume = ColdDeviceStorage.get('mediaVolume'); -}); - -`,l=` - -`,c=` -