mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 02:42:25 +08:00
fix(core): add margin to scrollbar when clientBorder has no style (#6867)
close #6684 https://github.com/toeverything/AFFiNE/assets/102217452/9de18009-c718-4bdd-88fd-caafdb5b419c
This commit is contained in:
@@ -32,3 +32,7 @@ export const affineDocViewport = style({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const scrollbar = style({
|
||||||
|
marginRight: '4px',
|
||||||
|
});
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { Scrollable } from '@affine/component';
|
import { Scrollable } from '@affine/component';
|
||||||
import { PageDetailSkeleton } from '@affine/component/page-detail-skeleton';
|
import { PageDetailSkeleton } from '@affine/component/page-detail-skeleton';
|
||||||
import { PageAIOnboarding } from '@affine/core/components/affine/ai-onboarding';
|
import { PageAIOnboarding } from '@affine/core/components/affine/ai-onboarding';
|
||||||
|
import { useAppSettingHelper } from '@affine/core/hooks/affine/use-app-setting-helper';
|
||||||
import type { PageRootService } from '@blocksuite/blocks';
|
import type { PageRootService } from '@blocksuite/blocks';
|
||||||
import {
|
import {
|
||||||
BookmarkService,
|
BookmarkService,
|
||||||
@@ -90,6 +91,7 @@ const DetailPageImpl = memo(function DetailPageImpl() {
|
|||||||
const rightSidebar = useService(RightSidebarService).rightSidebar;
|
const rightSidebar = useService(RightSidebarService).rightSidebar;
|
||||||
const docCollection = workspace.docCollection;
|
const docCollection = workspace.docCollection;
|
||||||
const mode = useLiveData(doc.mode$);
|
const mode = useLiveData(doc.mode$);
|
||||||
|
const { appSettings } = useAppSettingHelper();
|
||||||
|
|
||||||
const isActiveView = useIsActiveView();
|
const isActiveView = useIsActiveView();
|
||||||
// TODO: remove jotai here
|
// TODO: remove jotai here
|
||||||
@@ -252,7 +254,11 @@ const DetailPageImpl = memo(function DetailPageImpl() {
|
|||||||
docCollection={docCollection}
|
docCollection={docCollection}
|
||||||
/>
|
/>
|
||||||
</Scrollable.Viewport>
|
</Scrollable.Viewport>
|
||||||
<Scrollable.Scrollbar />
|
<Scrollable.Scrollbar
|
||||||
|
className={clsx({
|
||||||
|
[styles.scrollbar]: !appSettings.clientBorder,
|
||||||
|
})}
|
||||||
|
/>
|
||||||
</Scrollable.Root>
|
</Scrollable.Root>
|
||||||
</AffineErrorBoundary>
|
</AffineErrorBoundary>
|
||||||
{isInTrash ? <TrashPageFooter /> : null}
|
{isInTrash ? <TrashPageFooter /> : null}
|
||||||
|
|||||||
Reference in New Issue
Block a user