From 361069314ffaa61a81b2189c2eec000a3d1d9c35 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 17 Sep 2021 22:39:15 +0900 Subject: Refine UI (#7806) * wip * wip * wip * wip * wip * wip * wip * wip * Update default.vue * wip --- src/client/components/ui/folder.vue | 3 ++- src/client/components/ui/input.vue | 2 +- src/client/components/ui/textarea.vue | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/client/components/ui') diff --git a/src/client/components/ui/folder.vue b/src/client/components/ui/folder.vue index 1f3593a74a..eecf1d8be1 100644 --- a/src/client/components/ui/folder.vue +++ b/src/client/components/ui/folder.vue @@ -99,7 +99,8 @@ export default defineComponent({ z-index: 10; position: sticky; top: var(--stickyTop, 0px); - background: var(--panel); + padding: var(--x-padding); + background: var(--x-header, var(--panel)); /* TODO panelの半透明バージョンをプログラマティックに作りたい background: var(--X17); -webkit-backdrop-filter: var(--blur, blur(8px)); diff --git a/src/client/components/ui/input.vue b/src/client/components/ui/input.vue index 05ce5d3e15..a916a0b035 100644 --- a/src/client/components/ui/input.vue +++ b/src/client/components/ui/input.vue @@ -245,7 +245,7 @@ export default defineComponent({ font-size: 1em; color: var(--fg); background: var(--panel); - border: solid 1px var(--inputBorder); + border: solid 0.5px var(--inputBorder); border-radius: 6px; outline: none; box-shadow: none; diff --git a/src/client/components/ui/textarea.vue b/src/client/components/ui/textarea.vue index 53a141f011..08ac3182a9 100644 --- a/src/client/components/ui/textarea.vue +++ b/src/client/components/ui/textarea.vue @@ -212,7 +212,7 @@ export default defineComponent({ font-size: 1em; color: var(--fg); background: var(--panel); - border: solid 1px var(--inputBorder); + border: solid 0.5px var(--inputBorder); border-radius: 6px; outline: none; box-shadow: none; -- cgit v1.3.1-freya From 72a49f334a58db61e2f977f5e53f28c1491f9da8 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 21 Sep 2021 21:04:59 +0900 Subject: enhance(client): リスト、アンテナタイムラインを個別ページとして分割 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +- src/client/components/ui/menu.vue | 35 ++++---- src/client/menu.ts | 24 +++++- src/client/os.ts | 2 +- src/client/pages/antenna-timeline.vue | 147 ++++++++++++++++++++++++++++++++ src/client/pages/timeline.vue | 58 ++----------- src/client/pages/user-list-timeline.vue | 147 ++++++++++++++++++++++++++++++++ src/client/router.ts | 2 + src/client/ui/_common_/sidebar.vue | 2 +- 9 files changed, 349 insertions(+), 71 deletions(-) create mode 100644 src/client/pages/antenna-timeline.vue create mode 100644 src/client/pages/user-list-timeline.vue (limited to 'src/client/components/ui') diff --git a/CHANGELOG.md b/CHANGELOG.md index b60fd7cfa0..cf5621fc05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,13 +8,14 @@ --> ## 12.x.x (unreleased) -- ActivityPub: deliverキューのメモリ使用量を削減 ### Improvements - ActivityPub: リモートユーザーのDeleteアクティビティに対応 - ActivityPub: add resolver check for blocked instance +- ActivityPub: deliverキューのメモリ使用量を削減 - アカウントが凍結された場合に、凍結された旨を表示してからログアウトするように - 凍結されたアカウントにログインしようとしたときに、凍結されている旨を表示するように +- リスト、アンテナタイムラインを個別ページとして分割 - UIの改善 ### Bugfixes diff --git a/src/client/components/ui/menu.vue b/src/client/components/ui/menu.vue index d652d9b84f..26b4b04b11 100644 --- a/src/client/components/ui/menu.vue +++ b/src/client/components/ui/menu.vue @@ -41,7 +41,7 @@ + + diff --git a/src/client/pages/timeline.vue b/src/client/pages/timeline.vue index 4b5b90e6ae..9dda82462d 100644 --- a/src/client/pages/timeline.vue +++ b/src/client/pages/timeline.vue @@ -6,11 +6,8 @@
({ title: this.$ts.timeline, @@ -116,32 +109,10 @@ export default defineComponent({ src() { this.showNav = false; }, - list(x) { - this.showNav = false; - if (x != null) this.antenna = null; - if (x != null) this.channel = null; - }, - antenna(x) { - this.showNav = false; - if (x != null) this.list = null; - if (x != null) this.channel = null; - }, - channel(x) { - this.showNav = false; - if (x != null) this.antenna = null; - if (x != null) this.list = null; - }, }, created() { this.src = this.$store.state.tl.src; - if (this.src === 'list') { - this.list = this.$store.state.tl.arg; - } else if (this.src === 'antenna') { - this.antenna = this.$store.state.tl.arg; - } else if (this.src === 'channel') { - this.channel = this.$store.state.tl.arg; - } }, methods: { @@ -164,12 +135,9 @@ export default defineComponent({ async chooseList(ev) { const lists = await os.api('users/lists/list'); const items = lists.map(list => ({ + type: 'link', text: list.name, - action: () => { - this.list = list; - this.src = 'list'; - this.saveSrc(); - } + to: `/timeline/list/${list.id}` })); os.popupMenu(items, ev.currentTarget || ev.target); }, @@ -177,13 +145,10 @@ export default defineComponent({ async chooseAntenna(ev) { const antennas = await os.api('antennas/list'); const items = antennas.map(antenna => ({ + type: 'link', text: antenna.name, indicate: antenna.hasUnreadNote, - action: () => { - this.antenna = antenna; - this.src = 'antenna'; - this.saveSrc(); - } + to: `/timeline/antenna/${antenna.id}` })); os.popupMenu(items, ev.currentTarget || ev.target); }, @@ -191,15 +156,10 @@ export default defineComponent({ async chooseChannel(ev) { const channels = await os.api('channels/followed'); const items = channels.map(channel => ({ + type: 'link', text: channel.name, indicate: channel.hasUnreadNote, - action: () => { - // NOTE: チャンネルタイムラインをこのコンポーネントで表示するようにすると投稿フォームはどうするかなどの問題が生じるのでとりあえずページ遷移で - //this.channel = channel; - //this.src = 'channel'; - //this.saveSrc(); - this.$router.push(`/channels/${channel.id}`); - } + to: `/channels/${channel.id}` })); os.popupMenu(items, ev.currentTarget || ev.target); }, @@ -207,10 +167,6 @@ export default defineComponent({ saveSrc() { this.$store.set('tl', { src: this.src, - arg: - this.src === 'list' ? this.list : - this.src === 'antenna' ? this.antenna : - this.channel }); }, diff --git a/src/client/pages/user-list-timeline.vue b/src/client/pages/user-list-timeline.vue new file mode 100644 index 0000000000..491fe948c1 --- /dev/null +++ b/src/client/pages/user-list-timeline.vue @@ -0,0 +1,147 @@ + + + + + diff --git a/src/client/router.ts b/src/client/router.ts index 225ee44e32..573f285c79 100644 --- a/src/client/router.ts +++ b/src/client/router.ts @@ -48,6 +48,8 @@ const defaultRoutes = [ { path: '/channels/:channelId/edit', component: page('channel-editor'), props: true }, { path: '/channels/:channelId', component: page('channel'), props: route => ({ channelId: route.params.channelId }) }, { path: '/clips/:clipId', component: page('clip'), props: route => ({ clipId: route.params.clipId }) }, + { path: '/timeline/list/:listId', component: page('user-list-timeline'), props: route => ({ listId: route.params.listId }) }, + { path: '/timeline/antenna/:antennaId', component: page('antenna-timeline'), props: route => ({ antennaId: route.params.antennaId }) }, { path: '/my/notifications', component: page('notifications') }, { path: '/my/favorites', component: page('favorites') }, { path: '/my/messages', component: page('messages') }, diff --git a/src/client/ui/_common_/sidebar.vue b/src/client/ui/_common_/sidebar.vue index 43b64d133e..65f3d7dbdd 100644 --- a/src/client/ui/_common_/sidebar.vue +++ b/src/client/ui/_common_/sidebar.vue @@ -19,7 +19,7 @@