Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

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

JimmFly6be176b4e3ab
diff --git a/apps/core/src/atoms/settings.ts b/apps/core/src/atoms/settings.ts
index 10b430f003..6ea4af9177 100644
--- a/apps/core/src/atoms/settings.ts
+++ b/apps/core/src/atoms/settings.ts
@@ -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',
diff --git a/plugins/outline/src/app.tsx b/plugins/outline/src/app.tsx
index 55e6736c5f..328352df5c 100644
--- a/plugins/outline/src/app.tsx
+++ b/plugins/outline/src/app.tsx
@@ -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);