From 50fe67b99b5aa5ed68c9a0d53fae88e670e9bc1a Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 15 Nov 2018 06:21:31 +0900 Subject: [Client] Improve admin panel --- src/client/app/admin/views/index.vue | 60 ++++++++++++++++++++++++++++-------- 1 file changed, 48 insertions(+), 12 deletions(-) (limited to 'src/client') diff --git a/src/client/app/admin/views/index.vue b/src/client/app/admin/views/index.vue index 116d794b91..4aed85468a 100644 --- a/src/client/app/admin/views/index.vue +++ b/src/client/app/admin/views/index.vue @@ -37,15 +37,20 @@
-
-
-
-
-
-
-
-
-
+ + {{ instance.host }}{{ instance.notesCount | number }} + +
+
+
+
+
+
+
+
+
+
+
@@ -63,6 +68,8 @@ import XHashtags from "./hashtags.vue"; import XUsers from "./users.vue"; import { faHeadset, faArrowLeft } from '@fortawesome/free-solid-svg-icons'; import { faGrin } from '@fortawesome/free-regular-svg-icons'; +import MarqueeText from 'vue-marquee-text-component'; +import randomColor from 'randomcolor'; // Detect the user agent const ua = navigator.userAgent.toLowerCase(); @@ -77,7 +84,8 @@ export default Vue.extend({ XEmoji, XAnnouncements, XHashtags, - XUsers + XUsers, + MarqueeText }, provide: { isMobile @@ -88,11 +96,23 @@ export default Vue.extend({ version, isMobile, navOpend: !isMobile, + instances: [], faGrin, faArrowLeft, faHeadset }; }, + created() { + this.$root.api('instances').then(instances => { + instances.forEach(i => { + i.bg = randomColor({ + seed: i.host, + luminosity: 'dark' + }); + }); + this.instances = instances; + }); + }, methods: { nav(page: string) { this.page = page; @@ -101,7 +121,7 @@ export default Vue.extend({ }); -