Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 25 additions & 8 deletions apps/desktop/src/components/main/body/empty/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { AppWindowIcon, ArrowUpRight, ChevronDown } from "lucide-react";
import { useCallback, useState } from "react";

import { Kbd, KbdGroup } from "@hypr/ui/components/ui/kbd";
import { cn } from "@hypr/utils";

import { type Tab, useTabs } from "../../../../store/zustand/tabs";
Expand Down Expand Up @@ -72,8 +71,16 @@ function EmptyView() {
<div className="flex flex-col items-center justify-center h-full gap-6 mb-12 text-neutral-600">
<div className="relative flex flex-col gap-1 text-center min-w-[280px]">
<ActionItem label="New Note" shortcut={["⌘", "N"]} onClick={newNote} />
<ActionItem label="Calendar" onClick={openCalendar} />
<ActionItem label="Contacts" onClick={openContacts} />
<ActionItem
label="Calendar"
shortcut={["⌘", "⇧", "C"]}
onClick={openCalendar}
/>
<ActionItem
label="Contacts"
shortcut={["⌘", "⇧", "O"]}
onClick={openContacts}
/>
<ActionItem
label="Others"
icon={
Expand Down Expand Up @@ -113,6 +120,7 @@ function ActionItem({
<button
onClick={onClick}
className={cn([
"group",
"flex items-center justify-between gap-8",
"text-sm",
"rounded-md px-4 py-2",
Expand All @@ -121,13 +129,22 @@ function ActionItem({
>
<span>{label}</span>
{shortcut && shortcut.length > 0 ? (
<KbdGroup>
<kbd
className={cn([
"inline-flex h-5 items-center gap-1",
"rounded border border-neutral-300",
"bg-gradient-to-b from-white to-neutral-100",
"px-1.5 font-mono text-xs font-medium text-neutral-400",
"shadow-[0_1px_0_0_rgba(0,0,0,0.1),inset_0_1px_0_0_rgba(255,255,255,0.8)]",
"select-none transition-all duration-100",
"group-hover:-translate-y-0.5 group-hover:shadow-[0_2px_0_0_rgba(0,0,0,0.15),inset_0_1px_0_0_rgba(255,255,255,0.8)]",
"group-active:translate-y-0.5 group-active:shadow-none",
])}
>
{shortcut.map((key, index) => (
<Kbd key={index} className="bg-neutral-200">
{key}
</Kbd>
<span key={index}>{key}</span>
))}
</KbdGroup>
</kbd>
) : icon ? (
icon
) : (
Expand Down
Loading