Skip to content

Commit 382db26

Browse files
committed
minor update
1 parent f025489 commit 382db26

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

electron/main/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ import { fileURLToPath } from 'node:url';
1313
import path from 'node:path';
1414
import os, { homedir } from 'node:os';
1515
import log from 'electron-log';
16-
import installExtension, {
17-
REACT_DEVELOPER_TOOLS,
18-
} from 'electron-devtools-installer';
1916
import { update, registerUpdateIpcHandlers } from './update';
2017
import { checkToolInstalled, killProcessOnPort, startBackend } from './init';
2118
import { WebViewManager } from './webview';
@@ -1784,6 +1781,10 @@ app.whenReady().then(async () => {
17841781
if (VITE_DEV_SERVER_URL) {
17851782
try {
17861783
log.info('[DEVTOOLS] Installing React DevTools extension...');
1784+
// Dynamic import to avoid bundling in production
1785+
const { default: installExtension, REACT_DEVELOPER_TOOLS } = await import(
1786+
'electron-devtools-installer'
1787+
);
17871788
const name = await installExtension(REACT_DEVELOPER_TOOLS, {
17881789
loadExtensionOptions: { allowFileAccess: true },
17891790
});

src/pages/Login.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default function Login() {
5757

5858
if (!formData.password) {
5959
newErrors.password = t('layout.please-enter-password');
60-
} else if (formData.password.length < 6) {
60+
} else if (formData.password.length < 8) {
6161
newErrors.password = t('layout.password-must-be-at-least-8-characters');
6262
}
6363

@@ -180,6 +180,10 @@ export default function Login() {
180180
};
181181

182182
const handleReloadBtn = async (type: string) => {
183+
if (!app) {
184+
console.error('Stack app not initialized');
185+
return;
186+
}
183187
console.log('handleReloadBtn1', type);
184188
const cookies = document.cookie.split('; ');
185189
cookies.forEach((cookie) => {

0 commit comments

Comments
 (0)