This commit is contained in:
syuilo 2018-06-10 12:29:19 +09:00
parent 20ec4104c6
commit 9d248dbb5a
2 changed files with 13 additions and 3 deletions

View file

@ -1,6 +1,6 @@
<template>
<div class="mk-note-preview" :title="title">
<mk-avatar class="avatar" :user="note.user"/>
<mk-avatar class="avatar" :user="note.user" v-if="!mini"/>
<div class="main">
<mk-note-header class="header" :note="note" :mini="true"/>
<div class="body">
@ -15,7 +15,17 @@ import Vue from 'vue';
import dateStringify from '../../../common/scripts/date-stringify';
export default Vue.extend({
props: ['note'],
props: {
note: {
type: Object,
required: true
},
mini: {
type: Boolean,
required: false,
default: false
}
},
computed: {
title(): string {
return dateStringify(this.note.createdAt);

View file

@ -37,7 +37,7 @@
</div>
<a class="location" v-if="p.geo" :href="`http://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
<div class="renote" v-if="p.renote">
<mk-note-preview :note="p.renote"/>
<mk-note-preview :note="p.renote" :mini="true"/>
</div>
</div>
<span class="app" v-if="p.app">via <b>{{ p.app.name }}</b></span>