From d3fe02fb3e8dd7bfc45c246d54d45acccd5959c7 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 10 Apr 2021 12:40:50 +0900 Subject: [PATCH] Default UI redesign (#7429) * wip * wip * wip * wip * Update default.sidebar.vue * wip * wip * wip * wip * wip * wip * wip * wip * wip * Update sticky-sidebar.ts * wip * wip * Update messaging-room.form.vue * Update timeline.vue --- locales/ja-JP.yml | 1 + src/client/components/abuse-report-window.vue | 2 +- src/client/components/channel-preview.vue | 2 +- src/client/components/date-separated-list.vue | 31 +- src/client/components/drive.file.vue | 4 +- src/client/components/drive.vue | 5 +- src/client/components/emoji-picker-dialog.vue | 4 +- src/client/components/emoji-picker-window.vue | 4 +- src/client/components/emoji-picker.vue | 6 +- src/client/components/launch-pad.vue | 2 +- src/client/components/media-image.vue | 2 +- src/client/components/note-detailed.vue | 6 +- src/client/components/note-header.vue | 2 +- src/client/components/note.sub.vue | 2 +- src/client/components/note.vue | 23 +- src/client/components/notes.vue | 4 +- src/client/components/page-window.vue | 5 +- src/client/components/poll.vue | 2 +- src/client/components/post-form.vue | 2 +- src/client/components/signin.vue | 7 +- src/client/components/signup-dialog.vue | 2 +- .../components/taskmanager.api-window.vue | 2 +- src/client/components/taskmanager.vue | 4 +- src/client/components/ui/container.vue | 6 +- src/client/components/ui/folder.vue | 4 + src/client/components/ui/modal-window.vue | 4 +- src/client/components/user-info.vue | 4 +- src/client/components/user-select-dialog.vue | 2 +- src/client/components/visibility-picker.vue | 2 +- src/client/init.ts | 1 + src/client/pages/clip.vue | 2 +- src/client/pages/doc.vue | 4 +- src/client/pages/drive.vue | 13 +- src/client/pages/explore.vue | 2 +- src/client/pages/instance/instance.vue | 4 +- src/client/pages/messaging/index.vue | 68 ++- .../pages/messaging/messaging-room.form.vue | 4 +- src/client/pages/my-clips/index.vue | 2 +- src/client/pages/note.vue | 15 +- src/client/pages/notifications.vue | 6 +- src/client/pages/page-editor/page-editor.vue | 134 +++--- src/client/pages/reversi/index.vue | 2 +- src/client/pages/timeline.vue | 185 ++++---- src/client/pages/user/index.timeline.vue | 4 +- src/client/pages/user/index.vue | 150 +++--- src/client/pages/welcome.entrance.a.vue | 4 +- src/client/pages/welcome.entrance.c.vue | 4 +- src/client/scripts/sticky-sidebar.ts | 25 +- src/client/scripts/theme.ts | 1 + src/client/sidebar.ts | 6 + src/client/style.scss | 95 ++-- src/client/themes/_dark.json5 | 2 +- src/client/themes/_light.json5 | 2 +- src/client/themes/d-dark.json5 | 2 +- src/client/themes/d-persimmon.json5 | 1 - src/client/themes/l-light.json5 | 4 +- src/client/themes/l-rainy.json5 | 21 + src/client/ui/_common_/header.vue | 100 ++-- .../{components => ui/_common_}/sidebar.vue | 12 +- src/client/ui/chat/index.vue | 12 +- src/client/ui/chat/note-header.vue | 2 +- src/client/ui/chat/note.sub.vue | 2 +- src/client/ui/chat/note.vue | 2 +- src/client/ui/chat/post-form.vue | 4 +- src/client/ui/chat/side.vue | 4 +- src/client/ui/deck.vue | 2 +- src/client/ui/deck/column.vue | 2 +- src/client/ui/deck/main-column.vue | 2 +- src/client/ui/default.side.vue | 2 +- src/client/ui/default.sidebar.vue | 362 +++++++++++++++ src/client/ui/default.vue | 241 ++++------ src/client/ui/default.widgets.vue | 2 - src/client/ui/desktop.vue | 2 +- src/client/ui/universal.vue | 433 ++++++++++++++++++ src/client/ui/universal.widgets.vue | 81 ++++ src/client/ui/zen.vue | 2 +- src/client/widgets/aiscript.vue | 4 +- src/client/widgets/federation.vue | 2 +- src/client/widgets/job-queue.vue | 2 +- src/client/widgets/memo.vue | 2 +- src/client/widgets/trends.vue | 2 +- 81 files changed, 1532 insertions(+), 658 deletions(-) create mode 100644 src/client/themes/l-rainy.json5 rename src/client/{components => ui/_common_}/sidebar.vue (96%) create mode 100644 src/client/ui/default.sidebar.vue create mode 100644 src/client/ui/universal.vue create mode 100644 src/client/ui/universal.widgets.vue diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 5729da8da..b06432fc1 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -710,6 +710,7 @@ typingUsers: "{users}が入力中" jumpToSpecifiedDate: "特定の日付にジャンプ" showingPastTimeline: "過去のタイムラインを表示しています" clear: "クリア" +markAllAsRead: "全て既読にする" _email: _follow: diff --git a/src/client/components/abuse-report-window.vue b/src/client/components/abuse-report-window.vue index 7dbb9657b..35732d573 100644 --- a/src/client/components/abuse-report-window.vue +++ b/src/client/components/abuse-report-window.vue @@ -80,6 +80,6 @@ export default defineComponent({ diff --git a/src/client/components/channel-preview.vue b/src/client/components/channel-preview.vue index e222ad7ae..4dc633bcb 100644 --- a/src/client/components/channel-preview.vue +++ b/src/client/components/channel-preview.vue @@ -123,7 +123,7 @@ export default defineComponent({ > footer { padding: 12px 16px; - border-top: solid 1px var(--divider); + border-top: solid 0.5px var(--divider); > span { opacity: 0.7; diff --git a/src/client/components/date-separated-list.vue b/src/client/components/date-separated-list.vue index be9f01ca1..433655d6e 100644 --- a/src/client/components/date-separated-list.vue +++ b/src/client/components/date-separated-list.vue @@ -37,14 +37,16 @@ export default defineComponent({ }); } + const noGap = [...document.querySelectorAll('._noGap_')].some(el => el.contains(this.$parent.$el)); + return h(this.$store.state.animation ? TransitionGroup : 'div', this.$store.state.animation ? { - class: 'sqadhkmv _list_', + class: 'sqadhkmv' + (noGap ? ' _block' : ''), name: 'list', tag: 'div', 'data-direction': this.direction, 'data-reversed': this.reversed ? 'true' : 'false', } : { - class: 'sqadhkmv _list_', + class: 'sqadhkmv', }, this.items.map((item, i) => { const el = this.$slots.default({ item: item @@ -117,11 +119,7 @@ export default defineComponent({ transform: translateY(-64px); } } -} - - diff --git a/src/client/components/drive.file.vue b/src/client/components/drive.file.vue index 03f2da008..fb8b50d25 100644 --- a/src/client/components/drive.file.vue +++ b/src/client/components/drive.file.vue @@ -330,8 +330,8 @@ export default defineComponent({ } > .thumbnail { - width: 128px; - height: 128px; + width: 110px; + height: 110px; margin: auto; } diff --git a/src/client/components/drive.vue b/src/client/components/drive.vue index 150d0d877..2c8c16c48 100644 --- a/src/client/components/drive.vue +++ b/src/client/components/drive.vue @@ -704,6 +704,7 @@ export default defineComponent({ > .main { flex: 1; overflow: auto; + padding: var(--margin); &, * { user-select: none; @@ -735,7 +736,7 @@ export default defineComponent({ > .folder, > .file { flex-grow: 1; - width: 144px; + width: 128px; margin: 4px; box-sizing: border-box; } @@ -743,7 +744,7 @@ export default defineComponent({ > .padding { flex-grow: 1; pointer-events: none; - width: 144px + 8px; + width: 128px + 8px; } } diff --git a/src/client/components/emoji-picker-dialog.vue b/src/client/components/emoji-picker-dialog.vue index 5bdbc330a..c4b12e2f6 100644 --- a/src/client/components/emoji-picker-dialog.vue +++ b/src/client/components/emoji-picker-dialog.vue @@ -123,7 +123,7 @@ export default defineComponent({ > .index { min-height: var(--height); position: relative; - border-bottom: solid 1px var(--divider); + border-bottom: solid 0.5px var(--divider); > .arrow { position: absolute; @@ -181,7 +181,7 @@ export default defineComponent({ } &.result { - border-bottom: solid 1px var(--divider); + border-bottom: solid 0.5px var(--divider); &:empty { display: none; diff --git a/src/client/components/emoji-picker-window.vue b/src/client/components/emoji-picker-window.vue index 5504eaecd..53b6ae6b3 100644 --- a/src/client/components/emoji-picker-window.vue +++ b/src/client/components/emoji-picker-window.vue @@ -119,7 +119,7 @@ export default defineComponent({ > .index { min-height: var(--height); position: relative; - border-bottom: solid 1px var(--divider); + border-bottom: solid 0.5px var(--divider); > .arrow { position: absolute; @@ -177,7 +177,7 @@ export default defineComponent({ } &.result { - border-bottom: solid 1px var(--divider); + border-bottom: solid 0.5px var(--divider); &:empty { display: none; diff --git a/src/client/components/emoji-picker.vue b/src/client/components/emoji-picker.vue index 573833b9d..a212c1504 100644 --- a/src/client/components/emoji-picker.vue +++ b/src/client/components/emoji-picker.vue @@ -402,7 +402,7 @@ export default defineComponent({ > .tab { flex: 1; height: 38px; - border-top: solid 1px var(--divider); + border-top: solid 0.5px var(--divider); &.active { border-top: solid 1px var(--accent); @@ -425,7 +425,7 @@ export default defineComponent({ > div { &:not(.index) { padding: 4px 0 8px 0; - border-top: solid 1px var(--divider); + border-top: solid 0.5px var(--divider); } > header { @@ -492,7 +492,7 @@ export default defineComponent({ } &.result { - border-bottom: solid 1px var(--divider); + border-bottom: solid 0.5px var(--divider); &:empty { display: none; diff --git a/src/client/components/launch-pad.vue b/src/client/components/launch-pad.vue index a81320954..7610b44eb 100644 --- a/src/client/components/launch-pad.vue +++ b/src/client/components/launch-pad.vue @@ -146,7 +146,7 @@ export default defineComponent({ > .sub { margin-top: 8px; padding-top: 8px; - border-top: solid 1px var(--divider); + border-top: solid 0.5px var(--divider); } } diff --git a/src/client/components/media-image.vue b/src/client/components/media-image.vue index 41760d98d..4de5daa84 100644 --- a/src/client/components/media-image.vue +++ b/src/client/components/media-image.vue @@ -123,7 +123,7 @@ export default defineComponent({ .gqnyydlz { position: relative; - border: solid 1px var(--divider); + border: solid 0.5px var(--divider); > i { display: block; diff --git a/src/client/components/note-detailed.vue b/src/client/components/note-detailed.vue index 5124b2a88..373c96e5a 100644 --- a/src/client/components/note-detailed.vue +++ b/src/client/components/note-detailed.vue @@ -1,6 +1,6 @@