merge: all upstream changes
This commit is contained in:
commit
f8f128b347
170 changed files with 4490 additions and 2218 deletions
|
|
@ -131,15 +131,19 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<XFiles :key="user.id" :user="user"/>
|
||||
<XActivity :key="user.id" :user="user"/>
|
||||
</template>
|
||||
<!-- <div v-if="!disableNotes">
|
||||
<div style="margin-bottom: 8px; z-index: 1;">{{ i18n.ts.featured }}</div>
|
||||
<MkNotes :class="$style.tl" :noGap="true" :pagination="pagination"/>
|
||||
</div> -->
|
||||
<MkStickyContainer>
|
||||
<template #header>
|
||||
<MkTab v-model="noteview" :class="$style.tab">
|
||||
<option :value="null">{{ i18n.ts.notes }}</option>
|
||||
<option value="replies">{{ i18n.ts.notesAndReplies }}</option>
|
||||
<option value="replies">{{ i18n.ts.all }}</option>
|
||||
<option value="files">{{ i18n.ts.withFiles }}</option>
|
||||
</MkTab>
|
||||
</template>
|
||||
<MkNotes v-if="!disableNotes" :class="$style.tl" :noGap="true" :pagination="pagination"/>
|
||||
<MkNotes :class="$style.tl" :noGap="true" :pagination="AllPagination"/>
|
||||
</MkStickyContainer>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -248,11 +252,21 @@ watch($$(moderationNote), async () => {
|
|||
});
|
||||
|
||||
const pagination = {
|
||||
endpoint: 'users/featured-notes' as const,
|
||||
limit: 10,
|
||||
params: computed(() => ({
|
||||
userId: props.user.id
|
||||
})),
|
||||
};
|
||||
|
||||
const AllPagination = {
|
||||
endpoint: 'users/notes' as const,
|
||||
limit: 10,
|
||||
params: computed(() => ({
|
||||
userId: props.user.id,
|
||||
withReplies: noteview === 'replies' || noteview === 'files',
|
||||
withRenotes: noteview === 'all',
|
||||
withReplies: noteview === 'all' || noteview === 'files',
|
||||
withChannelNotes: noteview === 'all',
|
||||
withFiles: noteview === 'files',
|
||||
})),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,15 +10,18 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<div :class="$style.root">
|
||||
<MkLoading v-if="fetching"/>
|
||||
<div v-if="!fetching && files.length > 0" :class="$style.stream">
|
||||
<MkA
|
||||
v-for="file in files"
|
||||
:key="file.note.id + file.file.id"
|
||||
:class="$style.img"
|
||||
:to="notePage(file.note)"
|
||||
>
|
||||
<!-- TODO: 画像以外のファイルに対応 -->
|
||||
<ImgWithBlurhash :hash="file.file.blurhash" :src="thumbnail(file.file)" :title="file.file.name"/>
|
||||
</MkA>
|
||||
<template v-for="file in files" :key="file.note.id + file.file.id">
|
||||
<div v-if="file.file.isSensitive && !showingFiles.includes(file.file.id)" :class="$style.sensitive" @click="showingFiles.push(file.file.id)">
|
||||
<div>
|
||||
<div><i class="ti ti-eye-exclamation"></i> {{ i18n.ts.sensitive }}</div>
|
||||
<div>{{ i18n.ts.clickToShow }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<MkA v-else :class="$style.img" :to="notePage(file.note)">
|
||||
<!-- TODO: 画像以外のファイルに対応 -->
|
||||
<ImgWithBlurhash :hash="file.file.blurhash" :src="thumbnail(file.file)" :title="file.file.name"/>
|
||||
</MkA>
|
||||
</template>
|
||||
</div>
|
||||
<p v-if="!fetching && files.length == 0" :class="$style.empty">{{ i18n.ts.nothing }}</p>
|
||||
</div>
|
||||
|
|
@ -45,6 +48,7 @@ let files = $ref<{
|
|||
note: Misskey.entities.Note;
|
||||
file: Misskey.entities.DriveFile;
|
||||
}[]>([]);
|
||||
let showingFiles = $ref<string[]>([]);
|
||||
|
||||
function thumbnail(image: Misskey.entities.DriveFile): string {
|
||||
return defaultStore.state.disableShowingAnimatedImages
|
||||
|
|
@ -94,4 +98,9 @@ onMounted(() => {
|
|||
padding: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sensitive {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ const props = defineProps<{
|
|||
user: Misskey.entities.UserDetailed;
|
||||
}>();
|
||||
|
||||
const include = ref<string | null>(null);
|
||||
const include = ref<string | null>('all');
|
||||
|
||||
const pagination = {
|
||||
endpoint: 'users/notes' as const,
|
||||
|
|
@ -38,6 +38,7 @@ const pagination = {
|
|||
userId: props.user.id,
|
||||
withRenotes: include.value === 'all',
|
||||
withReplies: include.value === 'all' || include.value === 'files',
|
||||
withChannelNotes: include.value === 'all',
|
||||
withFiles: include.value === 'files',
|
||||
})),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue