From b1e6a33d6b7d24ee8bb21bf2b01e5ffc3f6dc931 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 29 Jul 2021 23:59:45 +0900 Subject: [PATCH] tweak style --- src/client/pages/drive.vue | 1 - src/client/pages/user/index.vue | 1 - src/client/scripts/paging.ts | 12 ++++++++++-- src/client/ui/chat/date-separated-list.vue | 22 ++++++++++++++++++---- src/client/ui/chat/index.vue | 9 +++++++-- src/client/ui/chat/notes.vue | 2 +- 6 files changed, 36 insertions(+), 11 deletions(-) diff --git a/src/client/pages/drive.vue b/src/client/pages/drive.vue index 753114f72..9ee1ea885 100644 --- a/src/client/pages/drive.vue +++ b/src/client/pages/drive.vue @@ -20,7 +20,6 @@ export default defineComponent({ [symbols.PAGE_INFO]: { title: computed(() => this.folder ? this.folder.name : this.$ts.drive), icon: 'fas fa-cloud', - menu: () => this.$refs.drive.getMenu() }, folder: null, }; diff --git a/src/client/pages/user/index.vue b/src/client/pages/user/index.vue index f5c5a0694..f61491078 100644 --- a/src/client/pages/user/index.vue +++ b/src/client/pages/user/index.vue @@ -282,7 +282,6 @@ export default defineComponent({ share: { title: this.user.name, }, - menu: () => getUserMenu(this.user), } : null), user: null, error: null, diff --git a/src/client/scripts/paging.ts b/src/client/scripts/paging.ts index bcb0d7f2b..194c2e800 100644 --- a/src/client/scripts/paging.ts +++ b/src/client/scripts/paging.ts @@ -94,7 +94,11 @@ export default (opts) => ({ for (let i = 0; i < items.length; i++) { const item = items[i]; markRaw(item); - if (i === 3) item._shouldInsertAd_ = true; + if (this.pagination.reversed) { + if (i === items.length - 2) item._shouldInsertAd_ = true; + } else { + if (i === 3) item._shouldInsertAd_ = true; + } } if (!this.pagination.noPaging && (items.length > (this.pagination.limit || 10))) { items.pop(); @@ -133,7 +137,11 @@ export default (opts) => ({ for (let i = 0; i < items.length; i++) { const item = items[i]; markRaw(item); - if (i === 10) item._shouldInsertAd_ = true; + if (this.pagination.reversed) { + if (i === items.length - 9) item._shouldInsertAd_ = true; + } else { + if (i === 10) item._shouldInsertAd_ = true; + } } if (items.length > SECOND_FETCH_LIMIT) { items.pop(); diff --git a/src/client/ui/chat/date-separated-list.vue b/src/client/ui/chat/date-separated-list.vue index bc7fc91d3..12638cd23 100644 --- a/src/client/ui/chat/date-separated-list.vue +++ b/src/client/ui/chat/date-separated-list.vue @@ -1,17 +1,23 @@