Skip to content

Commit fbb4b45

Browse files
committed
update files
1 parent ab500b3 commit fbb4b45

File tree

4 files changed

+19
-12
lines changed

4 files changed

+19
-12
lines changed

apps/desktop/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"build:mac": "npm run build && electron-builder --mac",
1212
"build:unpack": "npm run build && electron-builder --dir",
1313
"build:win": "npm run build && electron-builder --win",
14-
"dev": "electron-vite dev",
14+
"electron:dev": "electron-vite dev",
1515
"electron:run": "electron .",
1616
"format": "prettier --write ",
1717
"postinstall": "electron-builder install-app-deps",
@@ -26,9 +26,9 @@
2626
"next-electron-rsc": "^0.2.3"
2727
},
2828
"devDependencies": {
29-
"@electron-toolkit/preload": "^3.0.1",
3029
"@electron-toolkit/eslint-config-prettier": "^3.0.0",
3130
"@electron-toolkit/eslint-config-ts": "^3.0.0",
31+
"@electron-toolkit/preload": "^3.0.1",
3232
"@electron-toolkit/tsconfig": "^1.0.1",
3333
"electron": "^34.2.0",
3434
"electron-builder": "^25.1.8",

apps/desktop/src/main/index.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ let mainWindow;
1010
let stopIntercept;
1111

1212
// Next.js handler
13-
const standaloneDir = path.join(appPath,'out', 'standalone');
13+
const standaloneDir = path.join(appPath, 'out', 'standalone');
1414
const { createInterceptor } = createHandler({
1515
debug: true,
1616
localhostUrl,
@@ -23,6 +23,7 @@ const createWindow = async () => {
2323
mainWindow = new BrowserWindow({
2424
autoHideMenuBar: true,
2525
height: 800,
26+
titleBarStyle: 'hidden',
2627
webPreferences: {
2728
contextIsolation: true, // protect against prototype pollution
2829
preload: join(__dirname, '../preload/index.js'),
@@ -59,8 +60,6 @@ app.on('ready', createWindow);
5960

6061
app.on('window-all-closed', () => app.quit());
6162

62-
// if (process.platform !== 'darwin')
63-
6463
app.on(
6564
'activate',
6665
() => BrowserWindow.getAllWindows().length === 0 && !mainWindow && createWindow(),

src/app/[variants]/(main)/_layout/Desktop/SideBar/index.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ const Nav = memo(() => {
3131
<SideNav
3232
avatar={<Avatar />}
3333
bottomActions={<BottomActions />}
34-
style={{ height: '100%', paddingTop: isDesktop ? 24 : undefined, zIndex: 100 }}
34+
style={{
35+
height: '100%',
36+
zIndex: 100,
37+
...(isDesktop ? { background: 'transparent', paddingTop: 24 } : {}),
38+
}}
3539
topActions={
3640
<Suspense>
3741
<Top />

src/features/User/UserPanel/index.tsx

+10-6
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,20 @@ import { Popover } from 'antd';
44
import { createStyles } from 'antd-style';
55
import { PropsWithChildren, memo, useState } from 'react';
66

7+
import { isDesktop } from '@/const/version';
8+
79
import PanelContent from './PanelContent';
810
import UpgradeBadge from './UpgradeBadge';
911
import { useNewVersion } from './useNewVersion';
1012

11-
const useStyles = createStyles(({ css }) => ({
12-
popover: css`
13-
inset-block-start: 8px !important;
14-
inset-inline-start: 8px !important;
15-
`,
16-
}));
13+
const useStyles = createStyles(({ css }) => {
14+
return {
15+
popover: css`
16+
inset-block-start: ${isDesktop ? 24 : 8}px !important;
17+
inset-inline-start: 8px !important;
18+
`,
19+
};
20+
});
1721

1822
const UserPanel = memo<PropsWithChildren>(({ children }) => {
1923
const hasNewVersion = useNewVersion();

0 commit comments

Comments
 (0)