summaryrefslogtreecommitdiff
path: root/packages/frontend/src
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-06-01 17:19:07 +0000
committerHazelnoot <acomputerdog@gmail.com>2025-06-01 17:19:07 +0000
commitcf341d7ce7552bbae03029c42dfbbcb71ab56c17 (patch)
tree46ecf86143931e92a69f76d6264348688d4c566f /packages/frontend/src
parentmerge: Factor out TransitionGroup dynamic switching into a dedicated componen... (diff)
parentfix spacing between notes and ads in the timeline (diff)
downloadsharkey-cf341d7ce7552bbae03029c42dfbbcb71ab56c17.tar.gz
sharkey-cf341d7ce7552bbae03029c42dfbbcb71ab56c17.tar.bz2
sharkey-cf341d7ce7552bbae03029c42dfbbcb71ab56c17.zip
merge: Fix spacing between notes and ads in the timeline (resolves #1084) (!1079)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/1079 Closes #1084 Approved-by: dakkar <dakkar@thenautilus.net> Approved-by: Marie <github@yuugi.dev>
Diffstat (limited to 'packages/frontend/src')
-rw-r--r--packages/frontend/src/components/MkNotes.vue9
-rw-r--r--packages/frontend/src/components/MkTimeline.vue11
-rw-r--r--packages/frontend/src/components/SkFollowingRecentNotes.vue1
-rw-r--r--packages/frontend/src/pages/favorites.vue1
4 files changed, 7 insertions, 15 deletions
diff --git a/packages/frontend/src/components/MkNotes.vue b/packages/frontend/src/components/MkNotes.vue
index efb481d01d..3028c48c4f 100644
--- a/packages/frontend/src/components/MkNotes.vue
+++ b/packages/frontend/src/components/MkNotes.vue
@@ -15,13 +15,8 @@ SPDX-License-Identifier: AGPL-3.0-only
<template #default="{ items: notes }">
<div :class="[$style.root, { [$style.noGap]: noGap, '_gaps': !noGap, [$style.reverse]: pagination.reversed }]">
<template v-for="(note, i) in notes" :key="note.id">
- <div v-if="note._shouldInsertAd_" :class="[$style.noteWithAd, { '_gaps': !noGap }]" :data-scroll-anchor="note.id">
- <DynamicNote :class="$style.note" :note="note as Misskey.entities.Note" :withHardMute="true"/>
- <div :class="$style.ad">
- <MkAd :preferForms="['horizontal', 'horizontal-big']"/>
- </div>
- </div>
- <DynamicNote v-else :class="$style.note" :note="note as Misskey.entities.Note" :withHardMute="true" :data-scroll-anchor="note.id"/>
+ <DynamicNote :class="$style.note" :note="note as Misskey.entities.Note" :withHardMute="true" :data-scroll-anchor="note.id"/>
+ <MkAd v-if="note._shouldInsertAd_" :preferForms="['horizontal', 'horizontal-big']" :class="$style.ad"/>
</template>
</div>
</template>
diff --git a/packages/frontend/src/components/MkTimeline.vue b/packages/frontend/src/components/MkTimeline.vue
index 1de8f70e72..834664db26 100644
--- a/packages/frontend/src/components/MkTimeline.vue
+++ b/packages/frontend/src/components/MkTimeline.vue
@@ -23,14 +23,9 @@ SPDX-License-Identifier: AGPL-3.0-only
:moveClass=" $style.transition_x_move"
tag="div"
>
- <div v-for="(note, i) in notes" :key="note.id">
- <div v-if="note._shouldInsertAd_" :class="[$style.noteWithAd, { '_gaps': !noGap }]" :data-scroll-anchor="note.id">
- <DynamicNote :class="$style.note" :note="note" :withHardMute="true"/>
- <div :class="$style.ad">
- <MkAd :preferForms="['horizontal', 'horizontal-big']"/>
- </div>
- </div>
- <DynamicNote v-else :class="$style.note" :note="note" :withHardMute="true" :data-scroll-anchor="note.id"/>
+ <div v-for="(note, i) in notes" :key="note.id" :class="{ '_gaps': !noGap }">
+ <DynamicNote :class="$style.note" :note="note as Misskey.entities.Note" :withHardMute="true" :data-scroll-anchor="note.id"/>
+ <MkAd v-if="note._shouldInsertAd_" :preferForms="['horizontal', 'horizontal-big']" :class="$style.ad"/>
</div>
</SkTransitionGroup>
</template>
diff --git a/packages/frontend/src/components/SkFollowingRecentNotes.vue b/packages/frontend/src/components/SkFollowingRecentNotes.vue
index 3eb2ac8572..37f2f8833a 100644
--- a/packages/frontend/src/components/SkFollowingRecentNotes.vue
+++ b/packages/frontend/src/components/SkFollowingRecentNotes.vue
@@ -14,6 +14,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<template #default="{ items: notes }">
+ <!-- TODO replace with SkDateSeparatedList when merged -->
<MkDateSeparatedList v-slot="{ item: note }" :items="notes" :class="$style.panel" :noGap="true">
<SkFollowingFeedEntry :note="note" :class="props.selectedUserId == note.userId && $style.selected" @select="u => selectUser(u.id)"/>
</MkDateSeparatedList>
diff --git a/packages/frontend/src/pages/favorites.vue b/packages/frontend/src/pages/favorites.vue
index aa18f44e88..4f74467871 100644
--- a/packages/frontend/src/pages/favorites.vue
+++ b/packages/frontend/src/pages/favorites.vue
@@ -15,6 +15,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<template #default="{ items }">
+ <!-- TODO replace with SkDateSeparatedList when merged -->
<MkDateSeparatedList v-slot="{ item }" :items="items" :direction="'down'" :noGap="false" :ad="false">
<DynamicNote :key="item.id" :note="item.note" :class="$style.note"/>
</MkDateSeparatedList>