mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-16 13:03:31 +08:00
fix: disable run-now button for disabled scheduled tasks
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ce92de29f0
commit
bfd2405857
@ -100,10 +100,10 @@ export function TaskRow({ task, showLogs, onToggleLogs }: Props) {
|
||||
{/* Run Now */}
|
||||
<div className="relative" ref={confirmAction === 'run' ? confirmRef : undefined}>
|
||||
<button
|
||||
onClick={() => isRunning ? undefined : setConfirmAction(confirmAction === 'run' ? null : 'run')}
|
||||
disabled={isRunning}
|
||||
className={`${iconBtn} text-[var(--color-brand)] hover:bg-[var(--color-surface-selected)] disabled:opacity-50`}
|
||||
title={t('tasks.runNow')}
|
||||
onClick={() => isRunning || !task.enabled ? undefined : setConfirmAction(confirmAction === 'run' ? null : 'run')}
|
||||
disabled={isRunning || !task.enabled}
|
||||
className={`${iconBtn} ${task.enabled ? 'text-[var(--color-brand)] hover:bg-[var(--color-surface-selected)]' : 'text-[var(--color-text-tertiary)] cursor-not-allowed'} disabled:opacity-50`}
|
||||
title={task.enabled ? t('tasks.runNow') : undefined}
|
||||
>
|
||||
<span className={`material-symbols-outlined text-[18px] ${isRunning ? 'animate-spin' : ''}`}>
|
||||
{isRunning ? 'sync' : 'play_arrow'}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user