🐛 fix: add back a couple of major fixes (#5469) (#5470)

This commit is contained in:
Louis 2025-06-24 14:50:40 +07:00 committed by GitHub
parent 64a7822cc8
commit e389011b48
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 31 additions and 29 deletions

View File

@ -101,9 +101,7 @@ const SortableItem = memo(({ thread }: { thread: Thread }) => {
)}
>
<div className="py-1 pr-2 truncate">
<span
dangerouslySetInnerHTML={{ __html: thread.title || t('common:newThread') }}
/>
<span>{thread.title || t('common:newThread')}</span>
</div>
<div className="flex items-center">
<DropdownMenu

View File

@ -374,33 +374,37 @@ function Hardware() {
)}
{/* GPU Information */}
<Card title={t('settings:hardware.gpus')}>
{hardwareData.gpus.length > 0 ? (
<DndContext
sensors={sensors}
collisionDetection={closestCenter}
onDragEnd={handleDragEnd}
>
<SortableContext
items={hardwareData.gpus.map((gpu) => gpu.id)}
strategy={verticalListSortingStrategy}
{!IS_MACOS ? (
<Card title={t('settings:hardware.gpus')}>
{hardwareData.gpus.length > 0 ? (
<DndContext
sensors={sensors}
collisionDetection={closestCenter}
onDragEnd={handleDragEnd}
>
{hardwareData.gpus.map((gpu, index) => (
<SortableGPUItem
key={gpu.id || index}
gpu={gpu}
index={index}
/>
))}
</SortableContext>
</DndContext>
) : (
<CardItem
title={t('settings:hardware.noGpus')}
actions={<></>}
/>
)}
</Card>
<SortableContext
items={hardwareData.gpus.map((gpu) => gpu.id)}
strategy={verticalListSortingStrategy}
>
{hardwareData.gpus.map((gpu, index) => (
<SortableGPUItem
key={gpu.id || index}
gpu={gpu}
index={index}
/>
))}
</SortableContext>
</DndContext>
) : (
<CardItem
title={t('settings:hardware.noGpus')}
actions={<></>}
/>
)}
</Card>
) : (
<></>
)}
</div>
</div>
</div>