feat: shortcuts (#674)
* feat: added shortcut for page and view * fix: shortcut for view * fix: onclick method for views and pages
This commit is contained in:
parent
a18af1cecf
commit
0cf498651c
5 changed files with 31 additions and 3 deletions
|
|
@ -167,7 +167,10 @@ const ProjectPages: NextPage<UserAuth> = (props) => {
|
|||
right={
|
||||
<PrimaryButton
|
||||
className="flex items-center gap-2"
|
||||
onClick={() => setCreateUpdatePageModal(true)}
|
||||
onClick={() => {
|
||||
const e = new KeyboardEvent("keydown", { key: "d" });
|
||||
document.dispatchEvent(e);
|
||||
}}
|
||||
>
|
||||
<PlusIcon className="w-4 h-4" />
|
||||
Create Page
|
||||
|
|
|
|||
|
|
@ -67,7 +67,14 @@ const ProjectViews: NextPage<UserAuth> = (props) => {
|
|||
}
|
||||
right={
|
||||
<div className="flex items-center gap-2">
|
||||
<PrimaryButton type="button" className="flex items-center gap-2" onClick={() => setIsCreateViewModalOpen(true)}>
|
||||
<PrimaryButton
|
||||
type="button"
|
||||
className="flex items-center gap-2"
|
||||
onClick={() => {
|
||||
const e = new KeyboardEvent("keydown", { key: "v" });
|
||||
document.dispatchEvent(e);
|
||||
}}
|
||||
>
|
||||
<PlusIcon className="w-4 h-4" />
|
||||
Create View
|
||||
</PrimaryButton>
|
||||
|
|
@ -100,7 +107,6 @@ const ProjectViews: NextPage<UserAuth> = (props) => {
|
|||
title="Create New View"
|
||||
description="Views aid in saving your issues by applying various filters and grouping options."
|
||||
imgURL={emptyView}
|
||||
action={() => setIsCreateViewModalOpen(true)}
|
||||
/>
|
||||
)
|
||||
) : (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue