fix: Adjust layout and prevent default behavior in action buttons

This commit is contained in:
twwu 2024-12-17 16:42:11 +08:00
parent f2c087b805
commit a099e0a7e6
3 changed files with 3 additions and 3 deletions

View File

@ -135,7 +135,7 @@ const ChildSegmentList: FC<IChildSegmentCardProps> = ({
</div> </div>
{isLoading ? <FullDocListSkeleton /> : null} {isLoading ? <FullDocListSkeleton /> : null}
{((isFullDocMode && !isLoading) || !collapsed) {((isFullDocMode && !isLoading) || !collapsed)
? <div className={classNames('flex items-center gap-x-0.5', isFullDocMode ? 'grow' : '')}> ? <div className={classNames('flex items-center gap-x-0.5', isFullDocMode ? 'grow mb-6' : '')}>
{isParagraphMode && ( {isParagraphMode && (
<div className='self-stretch my-0.5'> <div className='self-stretch my-0.5'>
<Divider type='vertical' className='w-[2px] mx-[7px] bg-text-accent-secondary' /> <Divider type='vertical' className='w-[2px] mx-[7px] bg-text-accent-secondary' />

View File

@ -31,9 +31,9 @@ const ActionButtons: FC<IActionButtonsProps> = ({
}) })
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.s`, (e) => { useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.s`, (e) => {
e.preventDefault()
if (loading) if (loading)
return return
e.preventDefault()
handleSave() handleSave()
} }
, { exactMatch: true, useCapture: true }) , { exactMatch: true, useCapture: true })

View File

@ -538,7 +538,7 @@ const Completed: FC<ICompletedProps> = ({
{ {
isFullDocMode isFullDocMode
? <div className={cn( ? <div className={cn(
'flex flex-col grow relative overflow-x-hidden', 'flex flex-col grow overflow-x-hidden',
(isLoadingSegmentList || isLoadingChildSegmentList) ? 'overflow-y-hidden' : 'overflow-y-auto', (isLoadingSegmentList || isLoadingChildSegmentList) ? 'overflow-y-hidden' : 'overflow-y-auto',
)}> )}>
<SegmentCard <SegmentCard