Skip to content

Commit 9ee38c1

Browse files
committed
Disable copy button during active copy state and shorten reset timeout
- when showing briefly the check icon, disable the button └── packages └── ui └── src └── components └── editor ├── common │ └── IconButton │ └── IconButton.tsx └── prompt └── Tasks ├── Tasks.module.scss ├── Tasks.stories.tsx ├── Tasks.tsx ├── components │ └── TaskGroup.tsx ├── hooks │ └── use-auto-focus-new-task.ts └── index.ts
1 parent 2e197cf commit 9ee38c1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • packages/ui/src/components/editor/prompt/Tasks

‎packages/ui/src/components/editor/prompt/Tasks/Tasks.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,11 @@ export const Tasks: React.FC<Tasks.Props> = (props) => {
209209
{params.task.text && (
210210
<IconButton
211211
codicon_icon={
212-
copied_timestamp === params.task.created_at
212+
copied_timestamp == params.task.created_at
213213
? 'check'
214214
: 'copy'
215215
}
216+
disabled={copied_timestamp == params.task.created_at}
216217
on_mouse_down={
217218
is_editing ? (e) => e.preventDefault() : undefined
218219
}
@@ -224,7 +225,7 @@ export const Tasks: React.FC<Tasks.Props> = (props) => {
224225
set_copied_timestamp((current) =>
225226
current === params.task.created_at ? null : current
226227
)
227-
}, 2000)
228+
}, 1500)
228229
}}
229230
title="Copy text"
230231
/>

0 commit comments

Comments
 (0)