mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-01 01:52:42 +03:00
fix: the web version should not display client borders (#4040)
Co-authored-by: Alex Yang <himself65@outlook.com>
This commit is contained in:
parent
97a0969583
commit
6be176b4e3
@ -49,7 +49,7 @@ export const fontStyleOptions = [
|
|||||||
}[];
|
}[];
|
||||||
|
|
||||||
const appSettingBaseAtom = atomWithStorage<AppSetting>('affine-settings', {
|
const appSettingBaseAtom = atomWithStorage<AppSetting>('affine-settings', {
|
||||||
clientBorder: environment.isDesktop ? !environment.isWindows : false,
|
clientBorder: environment.isDesktop && globalThis.platform !== 'win32',
|
||||||
fullWidthLayout: false,
|
fullWidthLayout: false,
|
||||||
windowFrameStyle: 'frameless',
|
windowFrameStyle: 'frameless',
|
||||||
fontStyle: 'Sans',
|
fontStyle: 'Sans',
|
||||||
|
@ -50,10 +50,17 @@ export const HeaderItem = ({
|
|||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
const pushLayout = useSetAtom(pushLayoutAtom);
|
const pushLayout = useSetAtom(pushLayoutAtom);
|
||||||
const deleteLayout = useSetAtom(deleteLayoutAtom);
|
const deleteLayout = useSetAtom(deleteLayoutAtom);
|
||||||
|
const [container, setContainer] = useState<HTMLButtonElement | null>(null);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip content={`${open ? 'Collapse' : 'Expand'} table of contents`}>
|
<Tooltip
|
||||||
|
content={`${open ? 'Collapse' : 'Expand'} table of contents`}
|
||||||
|
portalOptions={{
|
||||||
|
container,
|
||||||
|
}}
|
||||||
|
>
|
||||||
<IconButton
|
<IconButton
|
||||||
|
ref={setContainer}
|
||||||
onClick={useCallback(() => {
|
onClick={useCallback(() => {
|
||||||
if (!open) {
|
if (!open) {
|
||||||
setOpen(true);
|
setOpen(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user