refactor(feedback): 전역 토스트 제거 및 HUD 오버레이 피드백 도입
This commit is contained in:
@@ -39,7 +39,6 @@ interface SpaceToolsDockWidgetProps {
|
||||
onDeleteThought: (thoughtId: string) => RecentThought | null;
|
||||
onSetThoughtCompleted: (thoughtId: string, isCompleted: boolean) => RecentThought | null;
|
||||
onRestoreThought: (thought: RecentThought) => void;
|
||||
onRestoreThoughts: (thoughts: RecentThought[]) => void;
|
||||
onClearInbox: () => RecentThought[];
|
||||
onStatusMessage: (payload: HudStatusLinePayload) => void;
|
||||
onExitRequested: () => void;
|
||||
@@ -65,7 +64,6 @@ export const SpaceToolsDockWidget = ({
|
||||
onDeleteThought,
|
||||
onSetThoughtCompleted,
|
||||
onRestoreThought,
|
||||
onRestoreThoughts,
|
||||
onClearInbox,
|
||||
onStatusMessage,
|
||||
onExitRequested,
|
||||
@@ -194,26 +192,7 @@ export const SpaceToolsDockWidget = ({
|
||||
};
|
||||
|
||||
const handleInboxComplete = (thought: RecentThought) => {
|
||||
const previousThought = onSetThoughtCompleted(thought.id, !thought.isCompleted);
|
||||
|
||||
if (!previousThought) {
|
||||
return;
|
||||
}
|
||||
|
||||
const willBeCompleted = !thought.isCompleted;
|
||||
|
||||
onStatusMessage({
|
||||
message: willBeCompleted ? '완료 처리됨' : '완료 해제됨',
|
||||
durationMs: 4200,
|
||||
priority: 'undo',
|
||||
action: {
|
||||
label: '실행취소',
|
||||
onClick: () => {
|
||||
onRestoreThought(previousThought);
|
||||
onStatusMessage({ message: willBeCompleted ? '완료 처리를 취소했어요.' : '완료 해제를 취소했어요.' });
|
||||
},
|
||||
},
|
||||
});
|
||||
onSetThoughtCompleted(thought.id, !thought.isCompleted);
|
||||
};
|
||||
|
||||
const handleInboxDelete = (thought: RecentThought) => {
|
||||
@@ -238,25 +217,7 @@ export const SpaceToolsDockWidget = ({
|
||||
};
|
||||
|
||||
const handleInboxClear = () => {
|
||||
const snapshot = onClearInbox();
|
||||
|
||||
if (snapshot.length === 0) {
|
||||
onStatusMessage({ message: '인박스가 비어 있어요.' });
|
||||
return;
|
||||
}
|
||||
|
||||
onStatusMessage({
|
||||
message: '모두 비워짐',
|
||||
durationMs: 4200,
|
||||
priority: 'undo',
|
||||
action: {
|
||||
label: '실행취소',
|
||||
onClick: () => {
|
||||
onRestoreThoughts(snapshot);
|
||||
onStatusMessage({ message: '인박스를 복구했어요.' });
|
||||
},
|
||||
},
|
||||
});
|
||||
onClearInbox();
|
||||
};
|
||||
|
||||
const handlePlanPillClick = () => {
|
||||
@@ -284,9 +245,6 @@ export const SpaceToolsDockWidget = ({
|
||||
packId,
|
||||
onTimerSelect,
|
||||
onSelectPreset,
|
||||
onApplied: (message) => {
|
||||
onStatusMessage({ message, durationMs: 1200 });
|
||||
},
|
||||
});
|
||||
|
||||
const showVolumeFeedback = (nextVolume: number) => {
|
||||
|
||||
Reference in New Issue
Block a user