From fcdfd8d3236c8d943f47a018acd7b6132508c4ed Mon Sep 17 00:00:00 2001
From: syuilo <syuilotan@yahoo.co.jp>
Date: Mon, 4 Mar 2019 09:16:24 +0900
Subject: Use vue-json-pretty

---
 src/client/app/admin/views/logs.vue | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

(limited to 'src/client/app/admin/views/logs.vue')

diff --git a/src/client/app/admin/views/logs.vue b/src/client/app/admin/views/logs.vue
index 9a06d89ba1..120a79cabd 100644
--- a/src/client/app/admin/views/logs.vue
+++ b/src/client/app/admin/views/logs.vue
@@ -20,7 +20,10 @@
 
 			<div class="nqjzuvev">
 				<code v-for="log in logs" :key="log._id" :class="log.level">
-					<mk-time :time="log.createdAt"/> [{{ log.domain.join('.') }}] {{ log.message }}
+					<details>
+						<summary><mk-time :time="log.createdAt"/> [{{ log.domain.join('.') }}] {{ log.message }}</summary>
+						<vue-json-pretty v-if="log.data" :data="log.data"></vue-json-pretty>
+					</details>
 				</code>
 			</div>
 		</section>
@@ -32,10 +35,15 @@
 import Vue from 'vue';
 import i18n from '../../i18n';
 import { faStream } from '@fortawesome/free-solid-svg-icons';
+import VueJsonPretty from 'vue-json-pretty';
 
 export default Vue.extend({
 	i18n: i18n('admin/views/logs.vue'),
 
+	components: {
+		VueJsonPretty
+	},
+
 	data() {
 		return {
 			logs: [],
-- 
cgit v1.2.3-freya

