This commit is contained in:
syuilo 2023-05-19 13:58:09 +09:00
parent 95b9284e79
commit 6a5ef5b6f2
81 changed files with 342 additions and 354 deletions

View file

@ -1,16 +1,16 @@
<template>
<div ref="thumbnail" class="zdjebgpv">
<div ref="thumbnail" :class="$style.root">
<ImgWithBlurhash v-if="isThumbnailAvailable" :hash="file.blurhash" :src="file.thumbnailUrl" :alt="file.name" :title="file.name" :cover="fit !== 'contain'"/>
<i v-else-if="is === 'image'" class="ti ti-photo icon"></i>
<i v-else-if="is === 'video'" class="ti ti-video icon"></i>
<i v-else-if="is === 'audio' || is === 'midi'" class="ti ti-file-music icon"></i>
<i v-else-if="is === 'csv'" class="ti ti-file-text icon"></i>
<i v-else-if="is === 'pdf'" class="ti ti-file-text icon"></i>
<i v-else-if="is === 'textfile'" class="ti ti-file-text icon"></i>
<i v-else-if="is === 'archive'" class="ti ti-file-zip icon"></i>
<i v-else class="ti ti-file icon"></i>
<i v-else-if="is === 'image'" class="ti ti-photo" :class="$style.icon"></i>
<i v-else-if="is === 'video'" class="ti ti-video" :class="$style.icon"></i>
<i v-else-if="is === 'audio' || is === 'midi'" class="ti ti-file-music" :class="$style.icon"></i>
<i v-else-if="is === 'csv'" class="ti ti-file-text" :class="$style.icon"></i>
<i v-else-if="is === 'pdf'" class="ti ti-file-text" :class="$style.icon"></i>
<i v-else-if="is === 'textfile'" class="ti ti-file-text" :class="$style.icon"></i>
<i v-else-if="is === 'archive'" class="ti ti-file-zip" :class="$style.icon"></i>
<i v-else class="ti ti-file" :class="$style.icon"></i>
<i v-if="isThumbnailAvailable && is === 'video'" class="ti ti-video icon-sub"></i>
<i v-if="isThumbnailAvailable && is === 'video'" class="ti ti-video" :class="$style.iconSub"></i>
</div>
</template>
@ -53,28 +53,28 @@ const isThumbnailAvailable = computed(() => {
});
</script>
<style lang="scss" scoped>
.zdjebgpv {
<style lang="scss" module>
.root {
position: relative;
display: flex;
background: var(--panel);
border-radius: 8px;
overflow: clip;
}
> .icon-sub {
position: absolute;
width: 30%;
height: auto;
margin: 0;
right: 4%;
bottom: 4%;
}
.iconSub {
position: absolute;
width: 30%;
height: auto;
margin: 0;
right: 4%;
bottom: 4%;
}
> .icon {
pointer-events: none;
margin: auto;
font-size: 32px;
color: #777;
}
.icon {
pointer-events: none;
margin: auto;
font-size: 32px;
color: #777;
}
</style>