* 投稿したファイルの一覧をプロフィールページ内のタブで見れるようにしてみた (Otaku-Social#14) * ギャラリー(ノート)の取得方法を変更、ページネーションに対応 * ギャラリー(ノート)が動作しない問題を修正 * ギャラリー(ノート)の名称変更 * styles * GalleryFromPosts -> Files * fix * enhance: 既存のファイルコンテナの「もっと見る」をクリックしたらファイルタブに飛べるように * Update Changelog * 共通化 * spdx * その他のメディアがちゃんとプレビューされるように * fix(frontend): リストがセンシティブ設定を考慮するように * arrayをsetに変更 * remove unused imports * 🎨 * 🎨 * 画像以外のファイルのプレビューに対応したのでコメントを削除 * サムネイルをMkDriveFileThumbnailに統一 * v-panelに置き換え * lint --------- Co-authored-by: tmorio <morikapusan@morikapu-denki.com> Co-authored-by: tmorio <20278135+tmorio@users.noreply.github.com> Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
57 lines
1.1 KiB
Vue
57 lines
1.1 KiB
Vue
<!--
|
|
SPDX-FileCopyrightText: syuilo and misskey-project
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
-->
|
|
|
|
<template>
|
|
<MkSpacer :contentMax="1100">
|
|
<div :class="$style.root">
|
|
<MkPagination v-slot="{items}" :pagination="pagination">
|
|
<div :class="$style.stream">
|
|
<MkNoteMediaGrid v-for="note in items" :note="note" square/>
|
|
</div>
|
|
</MkPagination>
|
|
</div>
|
|
</MkSpacer>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { computed } from 'vue';
|
|
import * as Misskey from 'misskey-js';
|
|
|
|
import MkNoteMediaGrid from '@/components/MkNoteMediaGrid.vue';
|
|
import MkPagination from '@/components/MkPagination.vue';
|
|
|
|
const props = defineProps<{
|
|
user: Misskey.entities.UserDetailed;
|
|
}>();
|
|
|
|
const pagination = {
|
|
endpoint: 'users/notes' as const,
|
|
limit: 15,
|
|
params: computed(() => ({
|
|
userId: props.user.id,
|
|
withFiles: true,
|
|
})),
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss" module>
|
|
.root {
|
|
padding: 8px;
|
|
}
|
|
|
|
.stream {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
|
|
gap: var(--MI-marginHalf);
|
|
}
|
|
|
|
@media screen and (min-width: 600px) {
|
|
.stream {
|
|
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
|
|
}
|
|
|
|
}
|
|
</style>
|