feat: 봇 테이블 액션 버튼 개선
- 전체 동기화 아이콘을 RotateCcw로 변경 - YouTube 봇에만 수정(Pencil) 버튼 추가 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
6b39cf043f
commit
0c9dd44c2b
2 changed files with 15 additions and 4 deletions
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
import { memo } from 'react';
|
||||
import { motion } from 'framer-motion';
|
||||
import { Play, Square, RefreshCw, Download } from 'lucide-react';
|
||||
import { Play, Square, RefreshCw, RotateCcw, Pencil } from 'lucide-react';
|
||||
|
||||
// X 아이콘 컴포넌트
|
||||
export const XIcon = ({ size = 20, fill = 'currentColor' }) => (
|
||||
|
|
@ -195,7 +195,7 @@ export const BotMiniCard = memo(function BotMiniCard({
|
|||
});
|
||||
|
||||
/**
|
||||
* 테이블 행 봇 (X용)
|
||||
* 테이블 행 봇
|
||||
*/
|
||||
export const BotTableRow = memo(function BotTableRow({
|
||||
bot,
|
||||
|
|
@ -205,6 +205,7 @@ export const BotTableRow = memo(function BotTableRow({
|
|||
statusInfo,
|
||||
onSync,
|
||||
onToggle,
|
||||
onEdit,
|
||||
onAnimationComplete,
|
||||
formatTime,
|
||||
formatInterval,
|
||||
|
|
@ -220,7 +221,7 @@ export const BotTableRow = memo(function BotTableRow({
|
|||
<td className="px-4 py-3">
|
||||
<div className="flex items-center gap-2">
|
||||
<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>
|
||||
</td>
|
||||
<td className="px-4 py-3 text-sm text-gray-500">
|
||||
|
|
@ -249,9 +250,18 @@ export const BotTableRow = memo(function BotTableRow({
|
|||
{syncing === bot.id ? (
|
||||
<RefreshCw size={16} className="animate-spin" />
|
||||
) : (
|
||||
<Download size={16} />
|
||||
<RotateCcw size={16} />
|
||||
)}
|
||||
</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
|
||||
onClick={() => onToggle(bot.id, bot.status, bot.name)}
|
||||
className={`p-1.5 rounded transition-colors ${
|
||||
|
|
|
|||
|
|
@ -397,6 +397,7 @@ function ScheduleBots() {
|
|||
statusInfo={getStatusInfo(bot.status)}
|
||||
onSync={handleSyncAllVideos}
|
||||
onToggle={toggleBot}
|
||||
onEdit={(bot) => {/* TODO: 봇 수정 모달 */}}
|
||||
onAnimationComplete={() =>
|
||||
isInitialLoad && index === sectionBots.length - 1 && setIsInitialLoad(false)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue