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 GitHub
parent 97a0969583
commit 6be176b4e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -49,7 +49,7 @@ export const fontStyleOptions = [
}[];
const appSettingBaseAtom = atomWithStorage<AppSetting>('affine-settings', {
clientBorder: environment.isDesktop ? !environment.isWindows : false,
clientBorder: environment.isDesktop && globalThis.platform !== 'win32',
fullWidthLayout: false,
windowFrameStyle: 'frameless',
fontStyle: 'Sans',

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);