fix(web): restore skill tab unsaved close dialog styling

This commit is contained in:
yyh 2026-03-27 15:51:30 +08:00
parent 327bbfa96a
commit 018b213ae1
No known key found for this signature in database
4 changed files with 6 additions and 4 deletions

View File

@ -46,7 +46,7 @@ describe('FileTabItem', () => {
render(<FileTabItem {...props} />)
expect(screen.getByText('readme.md')).toHaveClass('italic')
expect(screen.getByText('readme.md')).toHaveClass('italic', 'pr-[0.5px]')
})
})

View File

@ -74,7 +74,7 @@ const FileTabItem = ({
<span
className={cn(
'max-w-40 truncate text-[13px] font-normal leading-4',
isPreview && 'italic',
isPreview && 'pr-[0.5px] italic',
isActive
? 'text-text-primary'
: 'text-text-tertiary',

View File

@ -210,7 +210,9 @@ describe('FileTabs', () => {
render(<FileTabs />)
fireEvent.click(screen.getByRole('button', { name: /common\.operation\.close/i }))
fireEvent.click(screen.getByRole('button', { name: /workflow\.skillSidebar\.unsavedChanges\.confirmClose/i }))
const confirmButton = screen.getByRole('button', { name: /workflow\.skillSidebar\.unsavedChanges\.confirmClose/i })
expect(confirmButton.className).toContain('btn-destructive')
fireEvent.click(confirmButton)
expect(mocks.closeTab).toHaveBeenCalledTimes(1)
expect(mocks.closeTab).toHaveBeenCalledWith('file-1')

View File

@ -134,7 +134,7 @@ const FileTabs = () => {
<AlertDialogCancelButton>
{t('operation.cancel', { ns: 'common' })}
</AlertDialogCancelButton>
<AlertDialogConfirmButton destructive={false} onClick={handleConfirmClose}>
<AlertDialogConfirmButton onClick={handleConfirmClose}>
{t('skillSidebar.unsavedChanges.confirmClose')}
</AlertDialogConfirmButton>
</AlertDialogActions>