This commit is contained in:
syuilo
2020-11-29 00:18:54 +09:00
parent e5992742d4
commit d39c153c57
17 changed files with 770 additions and 468 deletions

View File

@@ -1,22 +1,24 @@
<template>
<div class="kjeftjfm" v-size="{ max: [500] }">
<div class="with">
<button class="_button" @click="with_ = null" :class="{ active: with_ === null }">{{ $t('notes') }}</button>
<button class="_button" @click="with_ = 'replies'" :class="{ active: with_ === 'replies' }">{{ $t('notesAndReplies') }}</button>
<button class="_button" @click="with_ = 'files'" :class="{ active: with_ === 'files' }">{{ $t('withFiles') }}</button>
</div>
<XNotes ref="timeline" :pagination="pagination" @before="$emit('before')" @after="e => $emit('after', e)"/>
<div>
<MkTab v-model:value="with_" class="_vMargin">
<option :value="null">{{ $t('notes') }}</option>
<option value="replies">{{ $t('notesAndReplies') }}</option>
<option value="files">{{ $t('withFiles') }}</option>
</MkTab>
<XNotes ref="timeline" class="_vMargin" :pagination="pagination" @before="$emit('before')" @after="e => $emit('after', e)"/>
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import XNotes from '@/components/notes.vue';
import MkTab from '@/components/tab.vue';
import * as os from '@/os';
export default defineComponent({
components: {
XNotes
XNotes,
MkTab,
},
props: {
@@ -54,29 +56,3 @@ export default defineComponent({
},
});
</script>
<style lang="scss" scoped>
.kjeftjfm {
> .with {
display: flex;
margin-bottom: var(--margin);
> button {
flex: 1;
padding: 11px 8px 8px 8px;
border-bottom: solid 3px transparent;
&.active {
color: var(--accent);
border-bottom-color: var(--accent);
}
}
}
&.max-width_500px {
> .with {
font-size: 80%;
}
}
}
</style>