-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add react-cmdk * feat: customize cmd items * fix: disable shortcuts when cmd palette is open * feat: added actions: - create timed event - create someday week event - create someday month event - logout - go to today * feat: open links in new tab * feat: add cmd icon to sidebar
- Loading branch information
1 parent
ef547fc
commit 8b40163
Showing
18 changed files
with
408 additions
and
46 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from "react"; | ||
import { getColor } from "@core/util/color.utils"; | ||
import { ColorNames } from "@core/types/color.types"; | ||
import { useAppDispatch, useAppSelector } from "@web/store/store.hooks"; | ||
import { settingsSlice } from "@web/ducks/settings/slices/settings.slice"; | ||
import { selectIsCmdPaletteOpen } from "@web/ducks/settings/selectors/settings.selectors"; | ||
|
||
import { StyledMetaKeyIcon } from "../Svg"; | ||
import { TooltipWrapper } from "../Tooltip/TooltipWrapper"; | ||
|
||
export const MetaKeyIcon = () => { | ||
const dispatch = useAppDispatch(); | ||
|
||
const isCmdPaletteOpen = useAppSelector(selectIsCmdPaletteOpen); | ||
|
||
return ( | ||
<TooltipWrapper | ||
description="Open command palette (Cmd + K)" | ||
onClick={() => { | ||
if (isCmdPaletteOpen) { | ||
dispatch(settingsSlice.actions.closeCmdPalette()); | ||
} else { | ||
dispatch(settingsSlice.actions.openCmdPalette()); | ||
} | ||
}} | ||
> | ||
<StyledMetaKeyIcon hovercolor={getColor(ColorNames.WHITE_1)} /> | ||
</TooltipWrapper> | ||
); | ||
}; |
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 |
---|---|---|
@@ -1,7 +1,13 @@ | ||
import { | ||
StyledHamburgerMenuIcon, | ||
StyledMetaKeyIcon, | ||
StyledMonthCalendarIcon, | ||
StyledTrashIcon, | ||
} from "./Svg"; | ||
|
||
export { StyledHamburgerMenuIcon, StyledMonthCalendarIcon, StyledTrashIcon }; | ||
export { | ||
StyledHamburgerMenuIcon, | ||
StyledMetaKeyIcon, | ||
StyledMonthCalendarIcon, | ||
StyledTrashIcon, | ||
}; |
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
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
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
13 changes: 4 additions & 9 deletions
13
packages/web/src/views/Calendar/components/LeftSidebar/SidebarIconRow/SidebarIconRow.tsx
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 |
---|---|---|
@@ -1,17 +1,12 @@ | ||
import React, { FC } from "react"; | ||
import { MonthCalendarIcon } from "@web/components/Icons/MonthCalendarIcon"; | ||
import { Preferences } from "@web/views/Calendar/hooks/usePreferences"; | ||
import React from "react"; | ||
import { MetaKeyIcon } from "@web/components/Icons/MetaKeyIcon"; | ||
|
||
import { StyledBottomRow } from "../styled"; | ||
|
||
interface Props { | ||
prefs: Preferences; | ||
} | ||
|
||
export const SidebarIconRow: FC<Props> = ({ prefs }) => { | ||
export const SidebarIconRow = () => { | ||
return ( | ||
<StyledBottomRow> | ||
<MonthCalendarIcon prefs={prefs} /> | ||
<MetaKeyIcon /> | ||
</StyledBottomRow> | ||
); | ||
}; |
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 @@ | ||
export * from "./SidebarIconRow"; |
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
Oops, something went wrong.