mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-12-05 10:18:05 +09:00
Merge pull request 'develop' (#9115) from develop into main
Reviewed-on: https://codeberg.org/thatonecalculator/calckey/pulls/9115
This commit is contained in:
commit
2858b783bb
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "calckey",
|
||||
"version": "12.119.0-calc.13",
|
||||
"version": "12.119.0-calc.13.3",
|
||||
"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'" :in-dm="true" 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 New Issue
Block a user