mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-22 02:15:11 +01:00
d3fe02fb3e
* wip * wip * wip * wip * Update default.sidebar.vue * wip * wip * wip * wip * wip * wip * wip * wip * wip * Update sticky-sidebar.ts * wip * wip * Update messaging-room.form.vue * Update timeline.vue
58 lines
1.2 KiB
Vue
58 lines
1.2 KiB
Vue
<template>
|
|
<div>
|
|
<MkTab v-model:value="with_" class="_isolated _section">
|
|
<option :value="null">{{ $ts.notes }}</option>
|
|
<option value="replies">{{ $ts.notesAndReplies }}</option>
|
|
<option value="files">{{ $ts.withFiles }}</option>
|
|
</MkTab>
|
|
<XNotes ref="timeline" class="_section _noGap_" :pagination="pagination" @before="$emit('before')" @after="e => $emit('after', e)"/>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { defineComponent } from 'vue';
|
|
import XNotes from '@client/components/notes.vue';
|
|
import MkTab from '@client/components/tab.vue';
|
|
import * as os from '@client/os';
|
|
|
|
export default defineComponent({
|
|
components: {
|
|
XNotes,
|
|
MkTab,
|
|
},
|
|
|
|
props: {
|
|
user: {
|
|
type: Object,
|
|
required: true,
|
|
},
|
|
},
|
|
|
|
watch: {
|
|
user() {
|
|
this.$refs.timeline.reload();
|
|
},
|
|
|
|
with_() {
|
|
this.$refs.timeline.reload();
|
|
},
|
|
},
|
|
|
|
data() {
|
|
return {
|
|
date: null,
|
|
with_: null,
|
|
pagination: {
|
|
endpoint: 'users/notes',
|
|
limit: 10,
|
|
params: init => ({
|
|
userId: this.user.id,
|
|
includeReplies: this.with_ === 'replies',
|
|
withFiles: this.with_ === 'files',
|
|
untilDate: init ? undefined : (this.date ? this.date.getTime() : undefined),
|
|
})
|
|
}
|
|
};
|
|
},
|
|
});
|
|
</script>
|