Skip to content

Commit

Permalink
fix: kbd cls and set home scope in shortcuts guideline
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Sep 12, 2024
1 parent db2cd99 commit d9999a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/renderer/src/components/ui/kbd/Kbd.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export const Kbd: FC<{ children: string; className?: string }> = memo(({ childre
<button type="button" onClick={handleClick}>
<kbd
className={cn(
"kbd h-5 space-x-1 text-[0.7rem]",
"kbd box-border h-5 space-x-1 text-[0.7rem]",

isKeyPressed ? "" : "border-b-2",
className,
Expand Down
8 changes: 7 additions & 1 deletion src/renderer/src/modules/modal/shortcuts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,21 @@ import { useCurrentModal, useModalStack } from "@renderer/components/ui/modal"
import { NoopChildren } from "@renderer/components/ui/modal/stacked/utils"
import { ScrollArea } from "@renderer/components/ui/scroll-area"
import { shortcuts } from "@renderer/constants/shortcuts"
import { useSwitchHotKeyScope } from "@renderer/hooks/common"
import { cn } from "@renderer/lib/utils"
import clsx from "clsx"
import { m, useDragControls } from "framer-motion"
import { useCallback } from "react"
import { useCallback, useEffect } from "react"

const ShortcutModalContent = () => {
const { dismiss } = useCurrentModal()
const modalOverlay = useUISettingKey("modalOverlay")
const dragControls = useDragControls()

const switchScope = useSwitchHotKeyScope()
useEffect(() => {
switchScope("Home")
}, [])
return (
<m.div
drag
Expand Down

0 comments on commit d9999a3

Please sign in to comment.