File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " react-explorer" ,
3- "version" : " 2.3 .1" ,
3+ "version" : " 3.0.0-beta .1" ,
44 "description" : " Plugin-based file explorer written with React" ,
55 "main" : " build/main.js" ,
66 "build" : {
3636 "server" : " pm2 start \" npx ws -d ./build-e2e -p 8080\" --name cy-server" ,
3737 "server:stop" : " pm2 --silent stop cy-server || true" ,
3838 "dist" : " webpack --config webpack.config.production.ts && electron-builder -mwl" ,
39- "dist-win" : " webpack --config webpack.config.production.ts && electron-builder -w" ,
40- "dist-mac" : " webpack --config webpack.config.production.ts && electron-builder -m" ,
41- "dist-linux" : " webpack --config webpack.config.production.ts && electron-builder -l" ,
39+ "dist-win" : " webpack --config webpack.config.production.ts && electron-builder -w --x64 --arm64 " ,
40+ "dist-mac" : " webpack --config webpack.config.production.ts && electron-builder -m --universal " ,
41+ "dist-linux" : " webpack --config webpack.config.production.ts && electron-builder -l --x64 --arm64 " ,
4242 "postinstall" : " electron-builder install-app-deps && npm run install:e2e" ,
4343 "install:e2e" : " cd e2e && npm install"
4444 },
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ export class FileState {
4141 status : TStatus = 'ok'
4242
4343 error = false
44+ previousError = false
4445
4546 cmd = ''
4647
@@ -81,7 +82,16 @@ export class FileState {
8182
8283 setStatus ( status : TStatus , error = false ) : void {
8384 this . status = status
84- this . error = error
85+ if ( ! error ) {
86+ this . previousError = this . error
87+ this . error = false
88+ } else {
89+ if ( this . history . length === 0 || this . previousError ) {
90+ this . error = true
91+ }
92+ }
93+ // this.error = error
94+ // this.history.length === 0 || this.error
8595 }
8696
8797 addPathToHistory ( path : string ) : void {
@@ -393,7 +403,7 @@ export class FileState {
393403 console . log ( 'handleError' , error )
394404 // we want to show the error on first nav
395405 // otherwise we keep previous
396- this . setStatus ( 'ok' , this . history . length === 0 || this . error )
406+ this . setStatus ( 'ok' , true )
397407 const niceError = getLocalizedError ( error )
398408 console . log ( 'orignalCode' , error . code , 'newCode' , niceError . code )
399409 AppAlert . show ( i18n . i18next . t ( 'ERRORS.GENERIC' , { error } ) , {
You can’t perform that action at this time.
0 commit comments