From de681dfb858f8518021032a516289f73d5880ca4 Mon Sep 17 00:00:00 2001 From: Hakadao Date: Thu, 10 Aug 2023 01:22:39 +0800 Subject: [PATCH] feat: add setting to show chosen character on focused search bar * refactor: convert constant reactive property values to computed properties --- src/components/SearchBar/SearchBar.vue | 27 ++++-- .../Settings/components/Appearance.vue | 86 ++++++++++--------- .../Settings/components/SearchPage.vue | 84 ++++++++++++------ src/contentScripts/views/Search/Search.vue | 2 +- src/logic/storage.ts | 1 + src/models/models.ts | 1 + 6 files changed, 129 insertions(+), 72 deletions(-) diff --git a/src/components/SearchBar/SearchBar.vue b/src/components/SearchBar/SearchBar.vue index ce1cc62b..64d39a51 100644 --- a/src/components/SearchBar/SearchBar.vue +++ b/src/components/SearchBar/SearchBar.vue @@ -8,6 +8,7 @@ import { defineProps<{ darkenOnFocus?: boolean + focusedCharacter?: string }>() const isFocus = ref(false) @@ -142,6 +143,10 @@ function handleKeyDown() { - +
-.v-enter-active, -.v-leave-active { +.result-list-enter-active, +.result-list-leave-active { --at-apply: transition-all duration-300 } -.v-enter-from, -.v-leave-to { +.result-list-enter-from, +.result-list-leave-to { --at-apply: transform translate-y-4 opacity-0 scale-95; } +.focus-character-enter-active, +.focus-character-leave-active { + --at-apply: transition-all duration-300 ease-in-out; +} + +.focus-character-enter-from, +.focus-character-leave-to { + --at-apply: transform translate-y-6 opacity-0; +} + .mask-enter-active, .mask-leave-active { - --at-apply: transition-all duration-300 will-change-backdrop-filter; + --at-apply: transition-all duration-300; } .mask-enter-from, diff --git a/src/components/Settings/components/Appearance.vue b/src/components/Settings/components/Appearance.vue index 8317e309..8fd578f9 100644 --- a/src/components/Settings/components/Appearance.vue +++ b/src/components/Settings/components/Appearance.vue @@ -1,50 +1,54 @@