diff --git a/package.json b/package.json index ac6ae9b4a..66b5b3f6e 100644 --- a/package.json +++ b/package.json @@ -176,6 +176,7 @@ "pug": "2.0.3", "punycode": "2.1.1", "qrcode": "1.3.2", + "randomcolor": "0.5.3", "ratelimiter": "3.2.0", "recaptcha-promise": "0.1.3", "reconnecting-websocket": "4.1.10", @@ -218,6 +219,7 @@ "vue-i18n": "8.3.1", "vue-js-modal": "1.3.26", "vue-loader": "15.4.2", + "vue-marquee-text-component": "1.1.0", "vue-router": "3.0.1", "vue-style-loader": "4.1.2", "vue-svg-inline-loader": "1.2.1", diff --git a/src/client/app/admin/views/index.vue b/src/client/app/admin/views/index.vue index 116d794b9..4aed85468 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({ }); -