From 27c373ddf4516166d43d3f3c56870cb30048af94 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 17 Apr 2021 00:12:50 +0900 Subject: [PATCH] Tweak UI --- src/client/components/date-separated-list.vue | 31 ++++----- src/client/components/form/suspense.vue | 1 - src/client/components/global/loading.vue | 1 - src/client/components/notes.vue | 63 ++++++++++++------- src/client/components/notifications.vue | 50 ++++++++------- src/client/components/timeline.vue | 2 +- src/client/pages/channel.vue | 2 +- src/client/pages/note.vue | 4 +- src/client/pages/user/index.timeline.vue | 2 +- 9 files changed, 89 insertions(+), 67 deletions(-) diff --git a/src/client/components/date-separated-list.vue b/src/client/components/date-separated-list.vue index 833cdfc89..012ed4238 100644 --- a/src/client/components/date-separated-list.vue +++ b/src/client/components/date-separated-list.vue @@ -18,7 +18,12 @@ export default defineComponent({ type: Boolean, required: false, default: false - } + }, + noGap: { + type: Boolean, + required: false, + default: false + }, }, methods: { @@ -37,18 +42,16 @@ export default defineComponent({ }, render() { - const noGap = [...document.querySelectorAll('._noGap_')].some(el => el.contains(this.$parent.$el)); - if (this.items.length === 0) return; return h(this.$store.state.animation ? TransitionGroup : 'div', this.$store.state.animation ? { - class: 'sqadhkmv' + (noGap ? ' _block' : ''), + class: 'sqadhkmv' + (this.noGap ? ' noGap _block' : ''), name: 'list', tag: 'div', 'data-direction': this.direction, 'data-reversed': this.reversed ? 'true' : 'false', } : { - class: 'sqadhkmv', + class: 'sqadhkmv' + (this.noGap ? ' noGap _block' : ''), }, this.items.map((item, i) => { const el = this.$slots.default({ item: item @@ -154,17 +157,17 @@ export default defineComponent({ } } } -} -._noGap_ .sqadhkmv { - > * { - margin: 0 !important; - border: none; - border-radius: 0; - box-shadow: none; + &.noGap { + > * { + margin: 0 !important; + border: none; + border-radius: 0; + box-shadow: none; - &:not(:last-child) { - border-bottom: solid 0.5px var(--divider); + &:not(:last-child) { + border-bottom: solid 0.5px var(--divider); + } } } } diff --git a/src/client/components/form/suspense.vue b/src/client/components/form/suspense.vue index e22b09ada..562fe23e0 100644 --- a/src/client/components/form/suspense.vue +++ b/src/client/components/form/suspense.vue @@ -80,7 +80,6 @@ export default defineComponent({ .fade-leave-active { transition: opacity 0.125s ease; } - .fade-enter-from, .fade-leave-to { opacity: 0; diff --git a/src/client/components/global/loading.vue b/src/client/components/global/loading.vue index 17d71b5c7..9b810f0a1 100644 --- a/src/client/components/global/loading.vue +++ b/src/client/components/global/loading.vue @@ -6,7 +6,6 @@ + + diff --git a/src/client/components/notifications.vue b/src/client/components/notifications.vue index 12d2d2cbd..1b789093e 100644 --- a/src/client/components/notifications.vue +++ b/src/client/components/notifications.vue @@ -1,21 +1,23 @@ diff --git a/src/client/components/timeline.vue b/src/client/components/timeline.vue index faa398463..753eba2ba 100644 --- a/src/client/components/timeline.vue +++ b/src/client/components/timeline.vue @@ -1,5 +1,5 @@