File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,9 +13,6 @@ import { fileURLToPath } from 'node:url';
1313import path from 'node:path' ;
1414import os , { homedir } from 'node:os' ;
1515import log from 'electron-log' ;
16- import installExtension , {
17- REACT_DEVELOPER_TOOLS ,
18- } from 'electron-devtools-installer' ;
1916import { update , registerUpdateIpcHandlers } from './update' ;
2017import { checkToolInstalled , killProcessOnPort , startBackend } from './init' ;
2118import { 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 } ) ;
Original file line number Diff line number Diff 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 ) => {
You can’t perform that action at this time.
0 commit comments