From 283365be58f8e19c64fe7488fff5eaa96ef9bd5a Mon Sep 17 00:00:00 2001 From: taiyme <53635909+taiyme@users.noreply.github.com> Date: Mon, 27 May 2024 16:36:49 +0900 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20=E3=83=95=E3=82=A9=E3=83=BC?= =?UTF-8?q?=E3=82=AB=E3=82=B9/=E3=82=BF=E3=83=96=E7=A7=BB=E5=8B=95?= =?UTF-8?q?=E3=81=AB=E9=96=A2=E3=81=99=E3=82=8B=E6=8C=99=E5=8B=95=E3=82=92?= =?UTF-8?q?=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/components/MkButton.vue | 1 - .../src/components/MkChannelFollowButton.vue | 12 +- .../frontend/src/components/MkContextMenu.vue | 3 +- .../frontend/src/components/MkEmojiPicker.vue | 5 - .../src/components/MkFollowButton.vue | 12 +- .../src/components/MkImgWithBlurhash.vue | 4 +- .../frontend/src/components/MkMediaAudio.vue | 25 +- .../frontend/src/components/MkMediaBanner.vue | 13 +- .../frontend/src/components/MkMediaImage.vue | 25 +- .../frontend/src/components/MkMediaList.vue | 54 +++- .../frontend/src/components/MkMediaVideo.vue | 44 ++- .../frontend/src/components/MkMenu.child.vue | 5 +- packages/frontend/src/components/MkMenu.vue | 284 ++++++++++-------- packages/frontend/src/components/MkNote.vue | 97 +++--- .../src/components/MkNoteDetailed.vue | 82 +++-- .../frontend/src/components/MkPopupMenu.vue | 4 +- packages/frontend/src/components/MkSelect.vue | 27 +- .../frontend/src/components/MkSuperMenu.vue | 4 +- .../src/components/TmsAccountButton.vue | 13 +- .../frontend/src/components/TmsServerLogo.vue | 12 +- packages/frontend/src/os.ts | 49 +-- .../frontend/src/pages/drive.file.info.vue | 1 + packages/frontend/src/pages/page.vue | 1 + .../frontend/src/pages/settings/profile.vue | 1 + packages/frontend/src/scripts/focus.ts | 32 -- packages/frontend/src/scripts/hotkey.ts | 1 + packages/frontend/src/scripts/keycode.ts | 7 +- packages/frontend/src/scripts/tms/focus.ts | 70 +++++ .../frontend/src/scripts/tms/get-or-null.ts | 19 ++ packages/frontend/src/style.scss | 23 +- 30 files changed, 598 insertions(+), 332 deletions(-) delete mode 100644 packages/frontend/src/scripts/focus.ts create mode 100644 packages/frontend/src/scripts/tms/focus.ts create mode 100644 packages/frontend/src/scripts/tms/get-or-null.ts diff --git a/packages/frontend/src/components/MkButton.vue b/packages/frontend/src/components/MkButton.vue index 8f7c0f4d9ac8..669775cbe909 100644 --- a/packages/frontend/src/components/MkButton.vue +++ b/packages/frontend/src/components/MkButton.vue @@ -249,7 +249,6 @@ function onMousedown(evt: MouseEvent): void { } &:focus-visible { - outline: solid 2px var(--focus); outline-offset: 2px; } diff --git a/packages/frontend/src/components/MkChannelFollowButton.vue b/packages/frontend/src/components/MkChannelFollowButton.vue index e0966e4d444d..5069fac98c76 100644 --- a/packages/frontend/src/components/MkChannelFollowButton.vue +++ b/packages/frontend/src/components/MkChannelFollowButton.vue @@ -86,17 +86,7 @@ async function onClick() { } &:focus-visible { - &:after { - content: ""; - pointer-events: none; - position: absolute; - top: -5px; - right: -5px; - bottom: -5px; - left: -5px; - border: 2px solid var(--focus); - border-radius: 32px; - } + outline-offset: 2px; } &:hover { diff --git a/packages/frontend/src/components/MkContextMenu.vue b/packages/frontend/src/components/MkContextMenu.vue index 8ea8fa6cf3a3..b0f6bc9d8126 100644 --- a/packages/frontend/src/components/MkContextMenu.vue +++ b/packages/frontend/src/components/MkContextMenu.vue @@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only :leaveToClass="defaultStore.state.animation ? $style.transition_fade_leaveTo : ''" >