Merge pull request 'develop' (#9115) from develop into main
Reviewed-on: https://codeberg.org/thatonecalculator/calckey/pulls/9115
This commit is contained in:
commit
8c84a4d951
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "calckey",
|
"name": "calckey",
|
||||||
"version": "12.119.0-calc.13",
|
"version": "12.119.0-calc.13.3",
|
||||||
"codename": "aqua",
|
"codename": "aqua",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="hoawjimk">
|
<div class="hoawjimk">
|
||||||
<XBanner v-for="media in mediaList.filter(media => !previewable(media))" :key="media.id" :media="media"/>
|
<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">
|
<div ref="gallery" :data-count="mediaList.filter(media => previewable(media)).length">
|
||||||
<template v-for="media in mediaList.filter(media => previewable(media))">
|
<template v-for="media in mediaList.filter(media => previewable(media))">
|
||||||
<XVideo v-if="media.type.startsWith('video')" :key="media.id" :video="media"/>
|
<XVideo v-if="media.type.startsWith('video')" :key="media.id" :video="media"/>
|
||||||
@ -28,6 +28,7 @@ import { defaultStore } from '@/store';
|
|||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
mediaList: misskey.entities.DriveFile[];
|
mediaList: misskey.entities.DriveFile[];
|
||||||
raw?: boolean;
|
raw?: boolean;
|
||||||
|
inDm?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const gallery = ref(null);
|
const gallery = ref(null);
|
||||||
@ -103,6 +104,11 @@ const previewable = (file: misskey.entities.DriveFile): boolean => {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.hoawjimk {
|
.hoawjimk {
|
||||||
|
|
||||||
|
> .width400 {
|
||||||
|
width: 400px !important;
|
||||||
|
}
|
||||||
|
|
||||||
> .gird-container {
|
> .gird-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="message.file" class="file" width="400px">
|
<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">
|
<a v-else :href="message.file.url" rel="noopener" target="_blank" :title="message.file.name">
|
||||||
<p>{{ message.file.name }}</p>
|
<p>{{ message.file.name }}</p>
|
||||||
</a>
|
</a>
|
||||||
|
Loading…
Reference in New Issue
Block a user