From 5f066a4eff91996b165de3b86549fffe93800d38 Mon Sep 17 00:00:00 2001 From: MAZE Date: Thu, 9 May 2024 20:51:57 +0330 Subject: [PATCH 1/2] feat: add countdown timer button --- src/components/menu/item/item.tsx | 7 +++++++ src/components/menu/items/countdown-timer.tsx | 13 +++++++++++++ src/components/menu/items/index.ts | 1 + src/components/menu/items/sleep-timer.tsx | 2 +- src/components/menu/menu.tsx | 2 ++ 5 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 src/components/menu/items/countdown-timer.tsx diff --git a/src/components/menu/item/item.tsx b/src/components/menu/item/item.tsx index 01c4508..0b3b1f0 100644 --- a/src/components/menu/item/item.tsx +++ b/src/components/menu/item/item.tsx @@ -1,3 +1,4 @@ +import { FiExternalLink } from 'react-icons/fi/index'; import { Item as DropdownItem } from '@radix-ui/react-dropdown-menu'; import styles from './item.module.css'; @@ -37,6 +38,12 @@ export function Item({ {shortcut && {shortcut}} + + {href && ( + + + + )} ); diff --git a/src/components/menu/items/countdown-timer.tsx b/src/components/menu/items/countdown-timer.tsx new file mode 100644 index 0000000..51e3714 --- /dev/null +++ b/src/components/menu/items/countdown-timer.tsx @@ -0,0 +1,13 @@ +import { MdOutlineTimer } from 'react-icons/md/index'; + +import { Item } from '../item'; + +export function CountdownTimer() { + return ( + } + label="Countdown Timer" + /> + ); +} diff --git a/src/components/menu/items/index.ts b/src/components/menu/items/index.ts index f465357..e5c2904 100644 --- a/src/components/menu/items/index.ts +++ b/src/components/menu/items/index.ts @@ -7,3 +7,4 @@ export { Pomodoro as PomodoroItem } from './pomodoro'; export { Presets as PresetsItem } from './presets'; export { Shortcuts as ShortcutsItem } from './shortcuts'; export { SleepTimer as SleepTimerItem } from './sleep-timer'; +export { CountdownTimer as CountdownTimerItem } from './countdown-timer'; diff --git a/src/components/menu/items/sleep-timer.tsx b/src/components/menu/items/sleep-timer.tsx index d1e2820..6af39ab 100644 --- a/src/components/menu/items/sleep-timer.tsx +++ b/src/components/menu/items/sleep-timer.tsx @@ -10,7 +10,7 @@ export function SleepTimer({ open }: SleepTimerProps) { return ( } - label="Sleep timer" + label="Sleep Timer" shortcut="Shift + T" onClick={open} /> diff --git a/src/components/menu/menu.tsx b/src/components/menu/menu.tsx index de1ac89..3904477 100644 --- a/src/components/menu/menu.tsx +++ b/src/components/menu/menu.tsx @@ -14,6 +14,7 @@ import { PresetsItem, ShortcutsItem, SleepTimerItem, + CountdownTimerItem, } from './items'; import { Divider } from './divider'; import { ShareLinkModal } from '@/components/modals/share-link'; @@ -110,6 +111,7 @@ export function Menu() { open('notepad')} /> open('pomodoro')} /> + open('shortcuts')} /> From de49d37f08a90523e9b9b298189b10103e833e15 Mon Sep 17 00:00:00 2001 From: MAZE Date: Thu, 9 May 2024 20:52:32 +0330 Subject: [PATCH 2/2] chore: update README file --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index dd649cf..e45e17f 100644 --- a/README.md +++ b/README.md @@ -20,11 +20,10 @@ 1. 📝 Persistent sound selection 1. ✈️ Sharing sound selections with others 1. 🧰 Custom sound presets -1. 🌙 Sleep timer for sounds (soon) +1. 🌙 Sleep timer for sounds 1. 📓 Notepad for quick notes 1. 🍅 Pomodoro timer 1. ✅ Simple to-do list (soon) -1. ⌛ Distraction-free countdown timer (soon) 1. ⌨️ Keyboard shortcuts for everything 1. 🥷 Privacy focused: no data collection 1. 💰 Completely free, open-source, and self-hostable