From 42aeb8fa35bbe0bec7669538bd98333c0652c4c2 Mon Sep 17 00:00:00 2001 From: lazzzis Date: Fri, 29 Mar 2024 21:15:58 -0700 Subject: [PATCH] fix(ui): prevent from navigating to search page when opening command panel (#2719) --- plugins/magic-keys.client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/magic-keys.client.ts b/plugins/magic-keys.client.ts index 0a5618fe..52690ab1 100644 --- a/plugins/magic-keys.client.ts +++ b/plugins/magic-keys.client.ts @@ -49,7 +49,7 @@ export default defineNuxtPlugin(({ $scrollToTop }) => { whenever(logicAnd(isAuthenticated, notUsingInput, useMagicSequence(['g', 'i'])), () => navigateTo('/lists')) whenever(logicAnd(notUsingInput, useMagicSequence(['g', 's'])), () => navigateTo('/settings')) whenever(logicAnd(isAuthenticated, notUsingInput, useMagicSequence(['g', 'p'])), () => navigateTo(`/${instanceDomain}/@${currentUser.value?.account.username}`)) - whenever(logicAnd(notUsingInput, keys['/']), () => navigateTo('/search')) + whenever(logicAnd(notUsingInput, computed(() => keys.current.size === 1), keys['/']), () => navigateTo('/search')) const toggleFavouriteActiveStatus = () => { // TODO: find a better solution than clicking buttons...