fix(core): fix window cannot be dragged on the collection page (#5269)

close #5268
close TOV-162

https://github.com/toeverything/AFFiNE/assets/102217452/d8f606c0-4c18-4a7e-be3f-d2e611ffecbf
This commit is contained in:
JimmFly
2023-12-13 05:26:27 +00:00
parent 31dc1f5e00
commit 7d32ddf539

View File

@@ -111,7 +111,13 @@ const Placeholder = ({ collection }: { collection: Collection }) => {
}, []); }, []);
const t = useAFFiNEI18N(); const t = useAFFiNEI18N();
return ( return (
<div style={{ display: 'flex', flexDirection: 'column', height: '100%' }}> <div
style={{
display: 'flex',
flexDirection: 'column',
height: '100%',
}}
>
<div <div
style={{ style={{
display: 'flex', display: 'flex',
@@ -119,6 +125,7 @@ const Placeholder = ({ collection }: { collection: Collection }) => {
gap: 8, gap: 8,
padding: '12px 24px', padding: '12px 24px',
fontSize: 'var(--affine-font-xs)', fontSize: 'var(--affine-font-xs)',
['WebkitAppRegion' as string]: 'drag',
}} }}
> >
<div <div
@@ -127,6 +134,7 @@ const Placeholder = ({ collection }: { collection: Collection }) => {
alignItems: 'center', alignItems: 'center',
gap: 4, gap: 4,
color: 'var(--affine-text-secondary-color)', color: 'var(--affine-text-secondary-color)',
['WebkitAppRegion' as string]: 'no-drag',
}} }}
> >
<ViewLayersIcon <ViewLayersIcon
@@ -138,7 +146,11 @@ const Placeholder = ({ collection }: { collection: Collection }) => {
</div> </div>
<div <div
data-testid="collection-name" data-testid="collection-name"
style={{ fontWeight: 600, color: 'var(--affine-text-primary-color)' }} style={{
fontWeight: 600,
color: 'var(--affine-text-primary-color)',
['WebkitAppRegion' as string]: 'no-drag',
}}
> >
{collection.name} {collection.name}
</div> </div>