refactor(control-center): Quick Controls 재디자인 및 플랜/잠금 결제 동선 정리
This commit is contained in:
31
src/widgets/space-tools-dock/model/applyQuickPack.ts
Normal file
31
src/widgets/space-tools-dock/model/applyQuickPack.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
interface ApplyQuickPackParams {
|
||||
packId: 'balanced' | 'deep-work' | 'gentle';
|
||||
onTimerSelect: (timerLabel: string) => void;
|
||||
onSelectPreset: (presetId: string) => void;
|
||||
pushToast: (payload: { title: string; description?: string }) => void;
|
||||
}
|
||||
|
||||
export const applyQuickPack = ({
|
||||
packId,
|
||||
onTimerSelect,
|
||||
onSelectPreset,
|
||||
pushToast,
|
||||
}: ApplyQuickPackParams) => {
|
||||
if (packId === 'balanced') {
|
||||
onTimerSelect('25/5');
|
||||
onSelectPreset('rain-focus');
|
||||
pushToast({ title: 'Balanced 팩을 적용했어요.' });
|
||||
return;
|
||||
}
|
||||
|
||||
if (packId === 'deep-work') {
|
||||
onTimerSelect('50/10');
|
||||
onSelectPreset('deep-white');
|
||||
pushToast({ title: 'Deep Work 팩을 적용했어요.' });
|
||||
return;
|
||||
}
|
||||
|
||||
onTimerSelect('25/5');
|
||||
onSelectPreset('silent');
|
||||
pushToast({ title: 'Gentle 팩을 적용했어요.' });
|
||||
};
|
||||
@@ -1,2 +1,2 @@
|
||||
export type SpaceAnchorPopoverId = 'sound' | 'notes';
|
||||
export type SpaceUtilityPanelId = 'settings' | 'inbox' | 'stats';
|
||||
export type SpaceUtilityPanelId = 'control-center' | 'inbox' | 'manage-plan' | 'paywall';
|
||||
|
||||
Reference in New Issue
Block a user