-
Notifications
You must be signed in to change notification settings - Fork 669
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
export const shortcuts = { | ||
subscriptions: { | ||
previous: { | ||
name: "Previous Subscription", | ||
key: "p", | ||
}, | ||
next: { | ||
name: "Next Subscription", | ||
key: "n", | ||
}, | ||
toggleFolder: { | ||
name: "Toggle Folder", | ||
key: "x", | ||
}, | ||
add: { | ||
name: "Add Subscription", | ||
key: "ctrl+t, ⌘+t", | ||
}, | ||
}, | ||
entries: { | ||
refetch: { | ||
name: "Refetch", | ||
key: "r", | ||
}, | ||
previous: { | ||
name: "Previous Entry", | ||
key: "k, up", | ||
}, | ||
next: { | ||
name: "Next Entry", | ||
key: "j, down", | ||
}, | ||
toggleRead: { | ||
name: "Toggle Read", | ||
key: "m", | ||
}, | ||
toggleStarred: { | ||
name: "Toggle Starred", | ||
key: "s", | ||
}, | ||
openInBrower: { | ||
name: "Open in Browser", | ||
key: "b, ↩︎", | ||
}, | ||
markAllAsRead: { | ||
name: "Mark All as Read", | ||
key: "a", | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { shortcuts } from "@renderer/lib/shortcuts" | ||
import { cn } from "@renderer/lib/utils" | ||
import { SettingsTitle } from "@renderer/modules/settings/title" | ||
|
||
export function Component() { | ||
return ( | ||
<> | ||
<SettingsTitle path="shortcuts" className="mb-4" /> | ||
<div className="space-y-6"> | ||
{Object.keys(shortcuts).map((type) => ( | ||
<section key={type}> | ||
<div className="mb-2 text-sm capitalize">{type}</div> | ||
<div className="rounded-md border text-[13px] text-zinc-600"> | ||
{Object.keys(shortcuts[type]).map((action, index) => ( | ||
<div key={`${type}-${action}`} className={cn("flex items-center justify-between px-3 py-1.5", index % 2 && "bg-native/40")}> | ||
<div>{shortcuts[type][action].name}</div> | ||
<div className="uppercase">{shortcuts[type][action].key}</div> | ||
</div> | ||
))} | ||
</div> | ||
</section> | ||
))} | ||
</div> | ||
</> | ||
) | ||
} |