feat: 봇 테이블 액션 버튼 개선

- 전체 동기화 아이콘을 RotateCcw로 변경
- YouTube 봇에만 수정(Pencil) 버튼 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
caadiq 2026-02-06 18:12:22 +09:00
parent 6b39cf043f
commit 0c9dd44c2b
2 changed files with 15 additions and 4 deletions

View file

@ -3,7 +3,7 @@
*/ */
import { memo } from 'react'; import { memo } from 'react';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import { Play, Square, RefreshCw, Download } from 'lucide-react'; import { Play, Square, RefreshCw, RotateCcw, Pencil } from 'lucide-react';
// X // X
export const XIcon = ({ size = 20, fill = 'currentColor' }) => ( export const XIcon = ({ size = 20, fill = 'currentColor' }) => (
@ -195,7 +195,7 @@ export const BotMiniCard = memo(function BotMiniCard({
}); });
/** /**
* 테이블 (X용) * 테이블
*/ */
export const BotTableRow = memo(function BotTableRow({ export const BotTableRow = memo(function BotTableRow({
bot, bot,
@ -205,6 +205,7 @@ export const BotTableRow = memo(function BotTableRow({
statusInfo, statusInfo,
onSync, onSync,
onToggle, onToggle,
onEdit,
onAnimationComplete, onAnimationComplete,
formatTime, formatTime,
formatInterval, formatInterval,
@ -220,7 +221,7 @@ export const BotTableRow = memo(function BotTableRow({
<td className="px-4 py-3"> <td className="px-4 py-3">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<span className={`w-2 h-2 rounded-full ${statusInfo.dot} ${bot.status === 'running' ? 'animate-pulse' : ''}`} /> <span className={`w-2 h-2 rounded-full ${statusInfo.dot} ${bot.status === 'running' ? 'animate-pulse' : ''}`} />
<span className="font-medium text-gray-900">{bot.name}</span> <span className="font-medium text-gray-900 truncate">{bot.name}</span>
</div> </div>
</td> </td>
<td className="px-4 py-3 text-sm text-gray-500"> <td className="px-4 py-3 text-sm text-gray-500">
@ -249,9 +250,18 @@ export const BotTableRow = memo(function BotTableRow({
{syncing === bot.id ? ( {syncing === bot.id ? (
<RefreshCw size={16} className="animate-spin" /> <RefreshCw size={16} className="animate-spin" />
) : ( ) : (
<Download size={16} /> <RotateCcw size={16} />
)} )}
</button> </button>
{bot.type === 'youtube' && onEdit && (
<button
onClick={() => onEdit(bot)}
className="p-1.5 text-gray-400 hover:text-amber-600 hover:bg-amber-50 rounded transition-colors"
title="수정"
>
<Pencil size={16} />
</button>
)}
<button <button
onClick={() => onToggle(bot.id, bot.status, bot.name)} onClick={() => onToggle(bot.id, bot.status, bot.name)}
className={`p-1.5 rounded transition-colors ${ className={`p-1.5 rounded transition-colors ${

View file

@ -397,6 +397,7 @@ function ScheduleBots() {
statusInfo={getStatusInfo(bot.status)} statusInfo={getStatusInfo(bot.status)}
onSync={handleSyncAllVideos} onSync={handleSyncAllVideos}
onToggle={toggleBot} onToggle={toggleBot}
onEdit={(bot) => {/* TODO: 봇 수정 모달 */}}
onAnimationComplete={() => onAnimationComplete={() =>
isInitialLoad && index === sectionBots.length - 1 && setIsInitialLoad(false) isInitialLoad && index === sectionBots.length - 1 && setIsInitialLoad(false)
} }