fix: the web version should not display client borders (#4040)

Co-authored-by: Alex Yang <himself65@outlook.com>
This commit is contained in:
JimmFly
2023-09-01 02:15:22 +08:00
committed by LongYinan
parent de0e3ab988
commit af3abe8a68
2 changed files with 9 additions and 3 deletions
+1 -2
View File
@@ -1,4 +1,3 @@
import { isDesktop } from '@affine/env/constant';
import { atom, useAtom } from 'jotai';
import { atomWithStorage } from 'jotai/utils';
@@ -50,7 +49,7 @@ export const fontStyleOptions = [
}[];
const appSettingBaseAtom = atomWithStorage<AppSetting>('affine-settings', {
clientBorder: isDesktop,
clientBorder: environment.isDesktop && globalThis.platform !== 'win32',
fullWidthLayout: false,
windowFrameStyle: 'frameless',
fontStyle: 'Sans',
+8 -1
View File
@@ -50,10 +50,17 @@ export const HeaderItem = ({
const [open, setOpen] = useState(false);
const pushLayout = useSetAtom(pushLayoutAtom);
const deleteLayout = useSetAtom(deleteLayoutAtom);
const [container, setContainer] = useState<HTMLButtonElement | null>(null);
return (
<Tooltip content={`${open ? 'Collapse' : 'Expand'} table of contents`}>
<Tooltip
content={`${open ? 'Collapse' : 'Expand'} table of contents`}
portalOptions={{
container,
}}
>
<IconButton
ref={setContainer}
onClick={useCallback(() => {
if (!open) {
setOpen(true);