From 23821d6fadf7eefe2a8291277ffa8273d3a41dab Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 25 Apr 2021 12:31:11 +0900 Subject: [PATCH] Improve client --- src/client/components/launch-pad.vue | 4 +- src/client/pages/about.vue | 96 +++++++++++++++++----------- src/client/pages/instance-info.vue | 3 +- src/client/ui/default.sidebar.vue | 25 +++++--- 4 files changed, 78 insertions(+), 50 deletions(-) diff --git a/src/client/components/launch-pad.vue b/src/client/components/launch-pad.vue index 936ca85730..58b74bdaee 100644 --- a/src/client/components/launch-pad.vue +++ b/src/client/components/launch-pad.vue @@ -25,7 +25,7 @@
{{ $t('aboutX', { x: instanceName }) }}
- +
{{ $ts.aboutMisskey }}
@@ -101,6 +101,7 @@ export default defineComponent({ flex-direction: column; align-items: center; justify-content: center; + vertical-align: bottom; width: 128px; height: 128px; border-radius: var(--radius); @@ -117,6 +118,7 @@ export default defineComponent({ > .icon { font-size: 26px; + height: 32px; } > .text { diff --git a/src/client/pages/about.vue b/src/client/pages/about.vue index 4f70998eee..bdd4c78827 100644 --- a/src/client/pages/about.vue +++ b/src/client/pages/about.vue @@ -1,39 +1,57 @@ @@ -45,9 +63,12 @@ import FormLink from '@client/components/form/link.vue'; import FormBase from '@client/components/form/base.vue'; import FormGroup from '@client/components/form/group.vue'; import FormKeyValueView from '@client/components/form/key-value-view.vue'; +import FormTextarea from '@client/components/form/textarea.vue'; +import FormSuspense from '@client/components/form/suspense.vue'; import * as os from '@client/os'; import number from '@client/filters/number'; import * as symbols from '@client/symbols'; +import { host } from '@client/config'; export default defineComponent({ components: { @@ -55,6 +76,8 @@ export default defineComponent({ FormGroup, FormLink, FormKeyValueView, + FormTextarea, + FormSuspense, }, data() { @@ -63,24 +86,17 @@ export default defineComponent({ title: this.$ts.instanceInfo, icon: 'fas fa-info-circle' }, + host, version, instanceName, stats: null, + initStats: () => os.api('stats', { + }).then((stats) => { + this.stats = stats; + }) } }, - computed: { - meta() { - return this.$instance; - }, - }, - - created() { - os.api('stats').then(stats => { - this.stats = stats; - }); - }, - methods: { number } @@ -88,18 +104,20 @@ export default defineComponent({ diff --git a/src/client/pages/instance-info.vue b/src/client/pages/instance-info.vue index 662b82ddb1..c66ad50f6d 100644 --- a/src/client/pages/instance-info.vue +++ b/src/client/pages/instance-info.vue @@ -147,7 +147,6 @@ import * as os from '@client/os'; import number from '@client/filters/number'; import bytes from '@client/filters/bytes'; import * as symbols from '@client/symbols'; -import { url } from '@client/config'; const chartLimit = 90; const sum = (...arr) => arr.reduce((r, a) => r.map((b, i) => a[i] + b)); @@ -449,7 +448,7 @@ export default defineComponent({ .fnfelxur { padding: 16px; - > img { + > .icon { display: block; margin: auto; height: 64px; diff --git a/src/client/ui/default.sidebar.vue b/src/client/ui/default.sidebar.vue index a55a1770ff..725fd844d9 100644 --- a/src/client/ui/default.sidebar.vue +++ b/src/client/ui/default.sidebar.vue @@ -31,8 +31,10 @@ {{ $ts.settings }}
-
- +
+ + +
@@ -260,14 +262,21 @@ export default defineComponent({ } } - > .misskey { + > .about { fill: currentColor; - } - - > .foo { - text-align: center; padding: 8px 0 16px 0; - opacity: 0.5; + text-align: center; + + > .link { + display: block; + width: 32px; + margin: 0 auto; + + img { + display: block; + width: 100%; + } + } } > .item {