Merge branch 'develop' into feature/2024.10

This commit is contained in:
dakkar 2024-11-13 11:45:10 +00:00
commit fdad036912
5 changed files with 49 additions and 19 deletions

View file

@ -103,6 +103,15 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
sub.andWhere('latest.is_quote = false'); sub.andWhere('latest.is_quote = false');
} }
// Select the appropriate collection of users
if (ps.list === 'followers') {
addFollower(sub);
} else if (ps.list === 'following') {
addFollowee(sub);
} else {
addMutual(sub);
}
return sub; return sub;
}, },
'latest', 'latest',
@ -118,15 +127,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
.leftJoinAndSelect('note.channel', 'channel') .leftJoinAndSelect('note.channel', 'channel')
; ;
// Select the appropriate collection of users
if (ps.list === 'followers') {
addFollower(query);
} else if (ps.list === 'following') {
addFollowee(query);
} else {
addMutual(query);
}
// Limit to files, if requested // Limit to files, if requested
if (ps.filesOnly) { if (ps.filesOnly) {
query.andWhere('note."fileIds" != \'{}\''); query.andWhere('note."fileIds" != \'{}\'');

View file

@ -54,6 +54,7 @@ defineEmits<{
overflow-wrap: break-word; overflow-wrap: break-word;
display: flex; display: flex;
contain: content; contain: content;
cursor: pointer;
} }
.avatar { .avatar {

View file

@ -23,7 +23,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template #default="{ items: notes }"> <template #default="{ items: notes }">
<MkDateSeparatedList v-slot="{ item: note }" :items="notes" :class="$style.panel" :noGap="true"> <MkDateSeparatedList v-slot="{ item: note }" :items="notes" :class="$style.panel" :noGap="true">
<SkFollowingFeedEntry v-if="!isHardMuted(note)" :isMuted="isSoftMuted(note)" :note="note" @select="userSelected"/> <SkFollowingFeedEntry v-if="!isHardMuted(note)" :isMuted="isSoftMuted(note)" :note="note" :class="selectedUserId == note.userId && $style.selected" @select="userSelected"/>
</MkDateSeparatedList> </MkDateSeparatedList>
</template> </template>
</MkPagination> </MkPagination>
@ -257,6 +257,21 @@ definePageMetadata(() => ({
margin-bottom: 12px; margin-bottom: 12px;
} }
@keyframes border {
from {border-left: 0px solid var(--accent);}
to {border-left: 6px solid var(--accent);}
}
.selected {
animation: border 0.2s ease-out 0s 1 forwards;
&:first-child {
border-top-left-radius: 5px;
}
&:last-child {
border-bottom-left-radius: 5px;
}
}
@media (min-width: 750px) { @media (min-width: 750px) {
.root { .root {
grid-template-columns: min-content 4fr 6fr min-content; grid-template-columns: min-content 4fr 6fr min-content;

View file

@ -143,8 +143,8 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkLazy> <MkLazy>
<XActivity :key="user.id" :user="user" :collapsed="true"/> <XActivity :key="user.id" :user="user" :collapsed="true"/>
</MkLazy> </MkLazy>
<MkLazy> <MkLazy v-if="user.listenbrainz && listenbrainzdata">
<XListenBrainz v-if="user.listenbrainz && listenbrainzdata" :key="user.id" :user="user" :collapsed="true"/> <XListenBrainz :key="user.id" :user="user" :collapsed="true"/>
</MkLazy> </MkLazy>
</template> </template>
<!-- <div v-if="!disableNotes"> <!-- <div v-if="!disableNotes">
@ -307,7 +307,7 @@ const pagination = {
endpoint: 'users/featured-notes' as const, endpoint: 'users/featured-notes' as const,
limit: 10, limit: 10,
params: computed(() => ({ params: computed(() => ({
userId: props.user.id, userId: props.user.id
})), })),
}; };
@ -835,10 +835,6 @@ onUnmounted(() => {
color: var(--MI_THEME-success); color: var(--MI_THEME-success);
} }
.pinnedNote:not(:last-child) {
border-bottom: solid 0.5px var(--MI_THEME-divider);
}
.infoBadges { .infoBadges {
position: absolute; position: absolute;
top: 12px; top: 12px;

View file

@ -7,22 +7,40 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkStickyContainer> <MkStickyContainer>
<template #header> <template #header>
<MkTab v-model="tab" :class="$style.tab"> <MkTab v-model="tab" :class="$style.tab">
<option value="pinned">{{ i18n.ts.pinnedOnly }}</option>
<option value="featured">{{ i18n.ts.featured }}</option> <option value="featured">{{ i18n.ts.featured }}</option>
<option :value="null">{{ i18n.ts.notes }}</option> <option :value="null">{{ i18n.ts.notes }}</option>
<option value="all">{{ i18n.ts.all }}</option> <option value="all">{{ i18n.ts.all }}</option>
<option value="files">{{ i18n.ts.withFiles }}</option> <option value="files">{{ i18n.ts.withFiles }}</option>
</MkTab> </MkTab>
</template> </template>
<MkNotes :noGap="true" :pagination="pagination" :class="$style.tl"/> <div v-if="tab === 'pinned'" class="_gaps">
<div v-if="user.pinnedNotes.length < 1" class="_fullinfo">
<img :src="infoImageUrl" class="_ghost" aria-hidden="true" :alt="i18n.ts.noNotes"/>
<div>{{ i18n.ts.noNotes }}</div>
</div>
<div v-else class="_panel">
<MkNote v-for="note of user.pinnedNotes" :key="note.id" class="note" :class="$style.pinnedNote" :note="note" :pinned="true"/>
</div>
</div>
<MkNotes v-else :noGap="true" :pagination="pagination" :class="$style.tl"/>
</MkStickyContainer> </MkStickyContainer>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed } from 'vue'; import { ref, computed, defineAsyncComponent } from 'vue';
import * as Misskey from 'misskey-js'; import * as Misskey from 'misskey-js';
import MkNotes from '@/components/MkNotes.vue'; import MkNotes from '@/components/MkNotes.vue';
import MkTab from '@/components/MkTab.vue'; import MkTab from '@/components/MkTab.vue';
import { i18n } from '@/i18n.js'; import { i18n } from '@/i18n.js';
import { infoImageUrl } from '@/instance.js';
import { defaultStore } from '@/store.js';
const MkNote = defineAsyncComponent(() =>
defaultStore.state.noteDesign === 'sharkey'
? import('@/components/SkNote.vue')
: import('@/components/MkNote.vue'),
);
const props = defineProps<{ const props = defineProps<{
user: Misskey.entities.UserDetailed; user: Misskey.entities.UserDetailed;