2020-12-30 15:22:20 +00:00
|
|
|
<template>
|
|
|
|
<div class="civpbkhh">
|
2022-12-27 09:29:39 +00:00
|
|
|
<div ref="scroll" class="scrollbox" v-bind:class="{ scroll: isScrolling }">
|
2021-07-09 17:55:12 +00:00
|
|
|
<div v-for="note in notes" class="note">
|
|
|
|
<div class="content _panel">
|
|
|
|
<div class="body">
|
2022-12-19 10:01:30 +00:00
|
|
|
<MkA v-if="note.replyId" class="reply" :to="`/notes/${note.replyId}`"><i class="ti ti-arrow-back-up"></i></MkA>
|
2022-12-29 01:14:44 +00:00
|
|
|
<Mfm v-if="note.text" :text="note.text" :author="note.user" :i="$i"/>
|
2021-11-19 10:36:12 +00:00
|
|
|
<MkA v-if="note.renoteId" class="rp" :to="`/notes/${note.renoteId}`">RN: ...</MkA>
|
2021-07-09 17:55:12 +00:00
|
|
|
</div>
|
|
|
|
<div v-if="note.files.length > 0" class="richcontent">
|
2022-12-30 04:56:22 +00:00
|
|
|
<MkMediaList :media-list="note.files"/>
|
2021-07-09 17:55:12 +00:00
|
|
|
</div>
|
|
|
|
<div v-if="note.poll">
|
2022-12-30 04:56:22 +00:00
|
|
|
<MkPoll :note="note" :readOnly="true"/>
|
2021-07-09 17:55:12 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-12-30 04:56:22 +00:00
|
|
|
<MkReactionsViewer ref="reactionsViewer" :note="note"/>
|
2020-12-30 15:22:20 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { defineComponent } from 'vue';
|
2022-12-30 04:56:22 +00:00
|
|
|
import MkReactionsViewer from '@/components/MkReactionsViewer.vue';
|
|
|
|
import MkMediaList from '@/components/MkMediaList.vue';
|
|
|
|
import MkPoll from '@/components/MkPoll.vue';
|
2021-11-11 17:02:25 +00:00
|
|
|
import * as os from '@/os';
|
2020-12-30 15:22:20 +00:00
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
components: {
|
2022-12-30 04:56:22 +00:00
|
|
|
MkReactionsViewer,
|
|
|
|
MkMediaList,
|
|
|
|
MkPoll,
|
2020-12-30 15:22:20 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
notes: [],
|
2021-07-09 17:55:12 +00:00
|
|
|
isScrolling: false,
|
2022-06-10 05:36:55 +00:00
|
|
|
};
|
2020-12-30 15:22:20 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
created() {
|
|
|
|
os.api('notes/featured').then(notes => {
|
|
|
|
this.notes = notes;
|
|
|
|
});
|
2021-07-09 17:55:12 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
updated() {
|
|
|
|
if (this.$refs.scroll.clientHeight > window.innerHeight) {
|
|
|
|
this.isScrolling = true;
|
|
|
|
}
|
2022-12-22 07:01:59 +00:00
|
|
|
},
|
2020-12-30 15:22:20 +00:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2021-07-09 17:55:12 +00: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 15:22:20 +00:00
|
|
|
.civpbkhh {
|
|
|
|
text-align: right;
|
|
|
|
|
2021-07-09 17:55:12 +00: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 15:22:20 +00:00
|
|
|
|
2021-07-09 17:55:12 +00:00
|
|
|
> .richcontent {
|
|
|
|
min-width: 250px;
|
|
|
|
}
|
|
|
|
}
|
2020-12-30 15:22:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|