Skip to content

Commit

Permalink
초과시점에 창에 포커스 맞추기
Browse files Browse the repository at this point in the history
  • Loading branch information
young-do committed Dec 18, 2024
1 parent 55d4767 commit e96c55d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/renderer/pages/pomodoro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { FocusScreen, HomeScreen, RestScreen, RestWaitScreen } from '@/widgets/p

// @note: 개발할 때, 초과시간까지 빠르게 테스트하기 위해 설정함
// 원래대로 하고 싶으면 false로 변경해서 사용하면 됩니다
const isFastForward = false; //import.meta.env.DEV;
const isFastForward = import.meta.env.DEV;
const taping = (ms: number) => (isFastForward ? Math.floor(ms / 60) : ms);

const focusExceedMaxTime = taping(minutesToMs(60));
Expand Down Expand Up @@ -76,6 +76,8 @@ const Pomodoro = () => {
onceExceedGoalTime: (mode) => {
if (!user?.cat?.type) return;
// 목표시간 초과 시 알림
// 초과시점에 창에 포커스 맞추기
window.electronAPI.showWindow();
if (mode === 'focus') return createNotificationByMode(user.cat.type, 'focus-end');
if (mode === 'rest') return createNotificationByMode(user.cat.type, 'rest-end');
},
Expand Down

0 comments on commit e96c55d

Please sign in to comment.