2020-01-29 21:37:25 +02:00
|
|
|
<template>
|
2021-04-13 21:23:29 +03:00
|
|
|
<div class="yrzkoczt" v-sticky-container>
|
2021-10-16 12:18:41 +03:00
|
|
|
<MkTab v-model="with_" class="tab">
|
2020-12-26 03:47:36 +02:00
|
|
|
<option :value="null">{{ $ts.notes }}</option>
|
|
|
|
<option value="replies">{{ $ts.notesAndReplies }}</option>
|
|
|
|
<option value="files">{{ $ts.withFiles }}</option>
|
2020-11-28 17:18:54 +02:00
|
|
|
</MkTab>
|
2021-04-16 18:12:50 +03:00
|
|
|
<XNotes ref="timeline" :no-gap="true" :pagination="pagination" @before="$emit('before')" @after="e => $emit('after', e)"/>
|
2020-01-29 21:37:25 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2020-10-17 14:12:00 +03:00
|
|
|
import { defineComponent } from 'vue';
|
2021-03-23 10:30:14 +02:00
|
|
|
import XNotes from '@client/components/notes.vue';
|
|
|
|
import MkTab from '@client/components/tab.vue';
|
|
|
|
import * as os from '@client/os';
|
2020-01-29 21:37:25 +02:00
|
|
|
|
2020-10-17 14:12:00 +03:00
|
|
|
export default defineComponent({
|
2020-01-29 21:37:25 +02:00
|
|
|
components: {
|
2020-11-28 17:18:54 +02:00
|
|
|
XNotes,
|
|
|
|
MkTab,
|
2020-01-29 21:37:25 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
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>
|
2021-04-13 21:23:29 +03:00
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.yrzkoczt {
|
|
|
|
> .tab {
|
2021-10-16 12:18:41 +03:00
|
|
|
margin: calc(var(--margin) / 2) 0;
|
|
|
|
padding: calc(var(--margin) / 2) 0;
|
2021-04-13 21:23:29 +03:00
|
|
|
background: var(--bg);
|
|
|
|
}
|
|
|
|
}
|
2021-10-17 12:15:50 +03:00
|
|
|
|
|
|
|
._fitSide_ .yrzkoczt {
|
|
|
|
> .tab {
|
|
|
|
margin-left: var(--margin);
|
|
|
|
margin-right: var(--margin);
|
|
|
|
}
|
|
|
|
}
|
2021-04-13 21:23:29 +03:00
|
|
|
</style>
|