Skip to content

Commit

Permalink
feat(ui): LoggerMessage date
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Mar 19, 2018
1 parent b949406 commit 9cf8348
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/@vue/cli-ui/src/components/LoggerMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<div v-if="message.type !== 'log'" class="type">{{ message.type }}</div>
<div v-if="message.tag" class="tag">{{ message.tag }}</div>
<div class="message" v-html="formattedMessage"/>
<div class="date">{{ message.date | date }}</div>
</div>
</template>

Expand Down Expand Up @@ -102,4 +103,7 @@ export default {
&.pre
.message
white-space pre-wrap
.date
opacity .5
</style>
4 changes: 4 additions & 0 deletions packages/@vue/cli-ui/src/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ export function folder (value, maxLength = -1) {

return value
}

export function date (value) {
return new Date(value).toLocaleString()
}

0 comments on commit 9cf8348

Please sign in to comment.