mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-25 13:39:06 +01:00
fix: 🐛 fix image size in dms
This commit is contained in:
parent
33e057e46e
commit
3dd683c911
3 changed files with 9 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "calckey",
|
||||
"version": "12.119.0-calc.13",
|
||||
"version": "12.119.0-calc.13.2",
|
||||
"codename": "aqua",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="hoawjimk">
|
||||
<XBanner v-for="media in mediaList.filter(media => !previewable(media))" :key="media.id" :media="media"/>
|
||||
<div v-if="mediaList.filter(media => previewable(media)).length > 0" class="gird-container">
|
||||
<div v-if="mediaList.filter(media => previewable(media)).length > 0" class="gird-container" :class="{ width400: inDm }">
|
||||
<div ref="gallery" :data-count="mediaList.filter(media => previewable(media)).length">
|
||||
<template v-for="media in mediaList.filter(media => previewable(media))">
|
||||
<XVideo v-if="media.type.startsWith('video')" :key="media.id" :video="media"/>
|
||||
|
@ -28,6 +28,7 @@ import { defaultStore } from '@/store';
|
|||
const props = defineProps<{
|
||||
mediaList: misskey.entities.DriveFile[];
|
||||
raw?: boolean;
|
||||
inDm?: boolean;
|
||||
}>();
|
||||
|
||||
const gallery = ref(null);
|
||||
|
@ -103,6 +104,11 @@ const previewable = (file: misskey.entities.DriveFile): boolean => {
|
|||
|
||||
<style lang="scss" scoped>
|
||||
.hoawjimk {
|
||||
|
||||
> .width400 {
|
||||
width: 400px !important;
|
||||
}
|
||||
|
||||
> .gird-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div v-if="message.file" class="file" width="400px">
|
||||
<XMediaList v-if="message.file.type.split('/')[0] == 'image' || message.file.type.split('/')[0] == 'video'" width="400px" :media-list="[message.file]" max-width="400px" style="border-radius: 5px"/>
|
||||
<XMediaList v-if="message.file.type.split('/')[0] == 'image' || message.file.type.split('/')[0] == 'video'" width="400px" :media-list="[message.file]" style="border-radius: 5px"/>
|
||||
<a v-else :href="message.file.url" rel="noopener" target="_blank" :title="message.file.name">
|
||||
<p>{{ message.file.name }}</p>
|
||||
</a>
|
||||
|
|
Loading…
Reference in a new issue