From fb8ed718cec074bb021bf7d594bbd42dba558ef0 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 10 Apr 2021 13:38:24 +0900 Subject: [PATCH] Improve UI --- src/client/components/timeline.vue | 8 ++++++- src/client/pages/note.vue | 6 +++++ src/client/pages/notifications.vue | 11 +++++++-- src/client/pages/timeline.vue | 11 +++++---- src/client/pages/user/index.vue | 4 ---- src/client/ui/_common_/header.vue | 38 +++++++++++++++++++++++------- 6 files changed, 57 insertions(+), 21 deletions(-) diff --git a/src/client/components/timeline.vue b/src/client/components/timeline.vue index c2ab0b005d..faa3984638 100644 --- a/src/client/components/timeline.vue +++ b/src/client/components/timeline.vue @@ -56,6 +56,7 @@ export default defineComponent({ includeLocalRenotes: this.$store.state.showLocalRenotes }, query: {}, + date: null }; }, @@ -157,7 +158,7 @@ export default defineComponent({ endpoint: endpoint, limit: 10, params: init => ({ - untilDate: init ? undefined : (this.date ? this.date.getTime() : undefined), + untilDate: this.date?.getTime(), ...this.baseQuery, ...this.query }) }; @@ -171,6 +172,11 @@ export default defineComponent({ methods: { focus() { this.$refs.tl.focus(); + }, + + timetravel(date?: Date) { + this.date = date; + this.$refs.tl.reload(); } } }); diff --git a/src/client/pages/note.vue b/src/client/pages/note.vue index 921e73c0bc..90cb98c40e 100644 --- a/src/client/pages/note.vue +++ b/src/client/pages/note.vue @@ -45,6 +45,7 @@ import MkRemoteCaution from '@client/components/remote-caution.vue'; import MkButton from '@client/components/ui/button.vue'; import * as os from '@client/os'; import * as symbols from '@client/symbols'; +import { url } from '@client/config'; export default defineComponent({ components: { @@ -65,6 +66,11 @@ export default defineComponent({ [symbols.PAGE_INFO]: computed(() => this.note ? { title: this.$ts.note, avatar: this.note.user, + share: { + title: this.$t('noteOf', { user: this.note.user.name }), + text: this.note.text, + url: `${url}/notes/${this.note.id}` + }, } : null), note: null, clips: null, diff --git a/src/client/pages/notifications.vue b/src/client/pages/notifications.vue index 6f38d7739f..25605988ed 100644 --- a/src/client/pages/notifications.vue +++ b/src/client/pages/notifications.vue @@ -6,7 +6,7 @@