|
@@ -41,7 +41,7 @@ const MessageActions = ({
|
|
|
icon={<RefreshCw size={styleState.isMobile ? 12 : 14} />}
|
|
icon={<RefreshCw size={styleState.isMobile ? 12 : 14} />}
|
|
|
onClick={() => !shouldDisableActions && onMessageReset(message)}
|
|
onClick={() => !shouldDisableActions && onMessageReset(message)}
|
|
|
disabled={shouldDisableActions}
|
|
disabled={shouldDisableActions}
|
|
|
- className={`!rounded-md ${shouldDisableActions ? '!text-gray-300 !cursor-not-allowed' : '!text-gray-400 hover:!text-blue-600 hover:!bg-blue-50'} ${styleState.isMobile ? '!w-6 !h-6' : '!w-7 !h-7'} !p-0 transition-all`}
|
|
|
|
|
|
|
+ className={`!rounded-full ${shouldDisableActions ? '!text-gray-300 !cursor-not-allowed' : '!text-gray-400 hover:!text-blue-600 hover:!bg-blue-50'} ${styleState.isMobile ? '!w-6 !h-6' : '!w-7 !h-7'} !p-0 transition-all`}
|
|
|
aria-label={t('重试')}
|
|
aria-label={t('重试')}
|
|
|
/>
|
|
/>
|
|
|
</Tooltip>
|
|
</Tooltip>
|
|
@@ -55,7 +55,7 @@ const MessageActions = ({
|
|
|
size="small"
|
|
size="small"
|
|
|
icon={<Copy size={styleState.isMobile ? 12 : 14} />}
|
|
icon={<Copy size={styleState.isMobile ? 12 : 14} />}
|
|
|
onClick={() => onMessageCopy(message)}
|
|
onClick={() => onMessageCopy(message)}
|
|
|
- className={`!rounded-md !text-gray-400 hover:!text-green-600 hover:!bg-green-50 ${styleState.isMobile ? '!w-6 !h-6' : '!w-7 !h-7'} !p-0 transition-all`}
|
|
|
|
|
|
|
+ className={`!rounded-full !text-gray-400 hover:!text-green-600 hover:!bg-green-50 ${styleState.isMobile ? '!w-6 !h-6' : '!w-7 !h-7'} !p-0 transition-all`}
|
|
|
aria-label={t('复制')}
|
|
aria-label={t('复制')}
|
|
|
/>
|
|
/>
|
|
|
</Tooltip>
|
|
</Tooltip>
|
|
@@ -70,7 +70,7 @@ const MessageActions = ({
|
|
|
icon={<Edit size={styleState.isMobile ? 12 : 14} />}
|
|
icon={<Edit size={styleState.isMobile ? 12 : 14} />}
|
|
|
onClick={() => !shouldDisableActions && onMessageEdit(message)}
|
|
onClick={() => !shouldDisableActions && onMessageEdit(message)}
|
|
|
disabled={shouldDisableActions}
|
|
disabled={shouldDisableActions}
|
|
|
- className={`!rounded-md ${shouldDisableActions ? '!text-gray-300 !cursor-not-allowed' : '!text-gray-400 hover:!text-yellow-600 hover:!bg-yellow-50'} ${styleState.isMobile ? '!w-6 !h-6' : '!w-7 !h-7'} !p-0 transition-all`}
|
|
|
|
|
|
|
+ className={`!rounded-full ${shouldDisableActions ? '!text-gray-300 !cursor-not-allowed' : '!text-gray-400 hover:!text-yellow-600 hover:!bg-yellow-50'} ${styleState.isMobile ? '!w-6 !h-6' : '!w-7 !h-7'} !p-0 transition-all`}
|
|
|
aria-label={t('编辑')}
|
|
aria-label={t('编辑')}
|
|
|
/>
|
|
/>
|
|
|
</Tooltip>
|
|
</Tooltip>
|
|
@@ -94,7 +94,7 @@ const MessageActions = ({
|
|
|
icon={<UserCheck size={styleState.isMobile ? 12 : 14} />}
|
|
icon={<UserCheck size={styleState.isMobile ? 12 : 14} />}
|
|
|
onClick={() => !shouldDisableActions && onRoleToggle && onRoleToggle(message)}
|
|
onClick={() => !shouldDisableActions && onRoleToggle && onRoleToggle(message)}
|
|
|
disabled={shouldDisableActions}
|
|
disabled={shouldDisableActions}
|
|
|
- className={`!rounded-md ${shouldDisableActions ? '!text-gray-300 !cursor-not-allowed' : message.role === 'system' ? '!text-purple-500 hover:!text-purple-700 hover:!bg-purple-50' : '!text-gray-400 hover:!text-purple-600 hover:!bg-purple-50'} ${styleState.isMobile ? '!w-6 !h-6' : '!w-7 !h-7'} !p-0 transition-all`}
|
|
|
|
|
|
|
+ className={`!rounded-full ${shouldDisableActions ? '!text-gray-300 !cursor-not-allowed' : message.role === 'system' ? '!text-purple-500 hover:!text-purple-700 hover:!bg-purple-50' : '!text-gray-400 hover:!text-purple-600 hover:!bg-purple-50'} ${styleState.isMobile ? '!w-6 !h-6' : '!w-7 !h-7'} !p-0 transition-all`}
|
|
|
aria-label={message.role === 'assistant' ? t('切换为System角色') : t('切换为Assistant角色')}
|
|
aria-label={message.role === 'assistant' ? t('切换为System角色') : t('切换为Assistant角色')}
|
|
|
/>
|
|
/>
|
|
|
</Tooltip>
|
|
</Tooltip>
|
|
@@ -109,7 +109,7 @@ const MessageActions = ({
|
|
|
icon={<Trash2 size={styleState.isMobile ? 12 : 14} />}
|
|
icon={<Trash2 size={styleState.isMobile ? 12 : 14} />}
|
|
|
onClick={() => !shouldDisableActions && onMessageDelete(message)}
|
|
onClick={() => !shouldDisableActions && onMessageDelete(message)}
|
|
|
disabled={shouldDisableActions}
|
|
disabled={shouldDisableActions}
|
|
|
- className={`!rounded-md ${shouldDisableActions ? '!text-gray-300 !cursor-not-allowed' : '!text-gray-400 hover:!text-red-600 hover:!bg-red-50'} ${styleState.isMobile ? '!w-6 !h-6' : '!w-7 !h-7'} !p-0 transition-all`}
|
|
|
|
|
|
|
+ className={`!rounded-full ${shouldDisableActions ? '!text-gray-300 !cursor-not-allowed' : '!text-gray-400 hover:!text-red-600 hover:!bg-red-50'} ${styleState.isMobile ? '!w-6 !h-6' : '!w-7 !h-7'} !p-0 transition-all`}
|
|
|
aria-label={t('删除')}
|
|
aria-label={t('删除')}
|
|
|
/>
|
|
/>
|
|
|
</Tooltip>
|
|
</Tooltip>
|