From/sentAt byline

This commit is contained in:
Jeffrey Biles
2020-03-23 22:58:46 -07:00
parent 4abbbaf633
commit fb0954828c
2 changed files with 9 additions and 3 deletions

View File

@@ -87,6 +87,10 @@ input[type='checkbox']:checked {
background: #679; background: #679;
} }
.mb-0 {
margin-bottom: 0;
}
/* Modal */ /* Modal */
.modal, .overlay { .modal, .overlay {

View File

@@ -7,8 +7,8 @@
<button @click="toggleRead(email)">Mark {{email.read ? 'Unread' : 'Read'}}</button> <button @click="toggleRead(email)">Mark {{email.read ? 'Unread' : 'Read'}}</button>
</div> </div>
<div>From: {{email.from}}</div> <h2 class="mb-0">Subject: <strong>{{email.subject}}</strong></h2>
<h2>Subject: <strong>{{email.subject}}</strong></h2> <div><em>From {{email.from}} on {{format(new Date(email.sentAt), 'MMM do yyyy')}}</em></div>
<div v-html="emailMarkdown" /> <div v-html="emailMarkdown" />
</div> </div>
</template> </template>
@@ -16,6 +16,7 @@
<script> <script>
import marked from 'marked'; import marked from 'marked';
import { useKeydown } from '../composition/useKeydown'; import { useKeydown } from '../composition/useKeydown';
import { format } from 'date-fns';
export default { export default {
setup({email}, {emit}) { setup({email}, {emit}) {
@@ -40,7 +41,8 @@
toggleArchive, toggleArchive,
goNewer, goNewer,
goOlder, goOlder,
toggleRead toggleRead,
format
} }
}, },
props: { props: {