Skip to content

Commit 210e3b3

Browse files
committed
Basic video thumbnails.
1 parent 0ab706a commit 210e3b3

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

src/components/searchViewComponents/VideoList.vue

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import CardContent from "@/components/searchViewComponents/subcomponents/generic
66
import MediaCenterIcon from "@/components/searchViewComponents/subcomponents/MediaCenterIcon.vue";
77
import { mdiVideo } from "@mdi/js";
88
import { Types } from "@/helpers/typeHelper";
9-
import { picsum } from "@/helpers/picsum";
9+
import { mdiRobotDead, mdiTimerSand } from "@mdi/js";
10+
import NyatsImg from "@/helpers/nyats/vuetify-img-cid.vue";
1011
1112
const fileType = Types.video;
1213
@@ -19,15 +20,28 @@ const { slicedHits } = useFileListComposable({ fileType });
1920
<hover-card :hit="hit" :index="index" :file-type="fileType">
2021
<v-row>
2122
<v-col cols="12" sm="4" md="3" lg="2">
22-
<v-img
23+
<nyats-img
2324
class="ma-3 mr-sm-0"
2425
cover
2526
aspect-ratio="1.778"
26-
:src="hit.src || picsum({ seed: hit.hash })"
2727
gradient="to bottom, rgba(0,0,0,.1), rgba(0,0,0,.5)"
28+
:cid="hit.hash"
29+
type="video"
2830
>
2931
<media-center-icon :icon="mdiVideo" />
30-
</v-img>
32+
33+
<template #placeholder>
34+
<v-row class="fill-height ma-0" align="center" justify="center">
35+
<v-icon color="grey" size="large" :icon="mdiTimerSand" />
36+
</v-row>
37+
</template>
38+
39+
<template #failed>
40+
<v-row class="fill-height ma-0" align="center" justify="center">
41+
<v-icon color="grey" size="large" :icon="mdiRobotDead" />
42+
</v-row>
43+
</template>
44+
</nyats-img>
3145
</v-col>
3246
<v-col cols="12" sm="8" md="9" lg="10" class="py-sm-0 ml-sm-n6">
3347
<CardContent :hit="hit" />

0 commit comments

Comments
 (0)