2020-12-30 16:22:20 +01:00
|
|
|
<template>
|
2023-04-08 02:01:42 +02:00
|
|
|
<div class="civpbkhh">
|
|
|
|
<div
|
|
|
|
ref="scroll"
|
|
|
|
class="scrollbox"
|
|
|
|
v-bind:class="{ scroll: isScrolling }"
|
|
|
|
>
|
|
|
|
<div v-for="note in notes" class="note">
|
|
|
|
<div class="content _panel">
|
|
|
|
<div class="body">
|
|
|
|
<MkA
|
|
|
|
v-if="note.replyId"
|
|
|
|
class="reply"
|
|
|
|
:to="`/notes/${note.replyId}`"
|
|
|
|
><i class="ph-arrow-bend-up-left ph-bold ph-lg"></i
|
|
|
|
></MkA>
|
|
|
|
<Mfm
|
|
|
|
v-if="note.text"
|
|
|
|
:text="note.text"
|
|
|
|
:author="note.user"
|
|
|
|
:i="$i"
|
|
|
|
:custom-emojis="note.emojis"
|
|
|
|
/>
|
|
|
|
<!-- <MkA v-if="note.renoteId" class="rp" :to="`/notes/${note.renoteId}`">RN: ...</MkA> -->
|
|
|
|
</div>
|
|
|
|
<div v-if="note.files.length > 0" class="richcontent">
|
|
|
|
<XMediaList :media-list="note.files" />
|
|
|
|
</div>
|
|
|
|
<div v-if="note.poll">
|
|
|
|
<XPoll :note="note" :readOnly="true" />
|
|
|
|
</div>
|
2021-07-09 19:55:12 +02:00
|
|
|
</div>
|
2023-04-08 02:01:42 +02:00
|
|
|
<XReactionsViewer ref="reactionsViewer" :note="note" />
|
2021-07-09 19:55:12 +02:00
|
|
|
</div>
|
2020-12-30 16:22:20 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2023-04-08 02:01:42 +02:00
|
|
|
import { defineComponent } from "vue";
|
|
|
|
import XReactionsViewer from "@/components/MkReactionsViewer.vue";
|
|
|
|
import XMediaList from "@/components/MkMediaList.vue";
|
|
|
|
import XPoll from "@/components/MkPoll.vue";
|
|
|
|
import * as os from "@/os";
|
2020-12-30 16:22:20 +01:00
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
components: {
|
2021-07-09 19:55:12 +02:00
|
|
|
XReactionsViewer,
|
|
|
|
XMediaList,
|
2023-04-08 02:01:42 +02:00
|
|
|
XPoll,
|
2020-12-30 16:22:20 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
notes: [],
|
2021-07-09 19:55:12 +02:00
|
|
|
isScrolling: false,
|
2022-06-10 07:36:55 +02:00
|
|
|
};
|
2020-12-30 16:22:20 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
created() {
|
2023-04-08 02:01:42 +02:00
|
|
|
os.api("notes/featured").then((notes) => {
|
2020-12-30 16:22:20 +01:00
|
|
|
this.notes = notes;
|
|
|
|
});
|
2021-07-09 19:55:12 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
updated() {
|
|
|
|
if (this.$refs.scroll.clientHeight > window.innerHeight) {
|
|
|
|
this.isScrolling = true;
|
|
|
|
}
|
2023-04-08 02:01:42 +02:00
|
|
|
},
|
2020-12-30 16:22:20 +01:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2021-07-09 19:55:12 +02:00
|
|
|
@keyframes scroll {
|
|
|
|
0% {
|
|
|
|
transform: translate3d(0, 0, 0);
|
|
|
|
}
|
|
|
|
5% {
|
|
|
|
transform: translate3d(0, 0, 0);
|
|
|
|
}
|
|
|
|
75% {
|
|
|
|
transform: translate3d(0, calc(-100% + 90vh), 0);
|
|
|
|
}
|
|
|
|
90% {
|
|
|
|
transform: translate3d(0, calc(-100% + 90vh), 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-30 16:22:20 +01:00
|
|
|
.civpbkhh {
|
|
|
|
text-align: right;
|
|
|
|
|
2021-07-09 19:55:12 +02:00
|
|
|
> .scrollbox {
|
|
|
|
&.scroll {
|
|
|
|
animation: scroll 45s linear infinite;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .note {
|
|
|
|
margin: 16px 0 16px auto;
|
|
|
|
|
|
|
|
> .content {
|
|
|
|
padding: 16px;
|
|
|
|
margin: 0 0 0 auto;
|
|
|
|
max-width: max-content;
|
|
|
|
border-radius: 16px;
|
2020-12-30 16:22:20 +01:00
|
|
|
|
2021-07-09 19:55:12 +02:00
|
|
|
> .richcontent {
|
|
|
|
min-width: 250px;
|
|
|
|
}
|
|
|
|
}
|
2020-12-30 16:22:20 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|