File tree Expand file tree Collapse file tree 5 files changed +694
-249
lines changed Expand file tree Collapse file tree 5 files changed +694
-249
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ jobs:
138138 set +e
139139 rm -rf release/github
140140 rm -rf release/linux-unpacked
141+ rm release/builder-debug.yml
141142 - persist_to_workspace :
142143 root : ~/simplenote
143144 paths :
@@ -171,6 +172,7 @@ jobs:
171172 set +e
172173 rm -rf release/github
173174 rm -rf release/mac
175+ rm release/builder-debug.yml
174176 - persist_to_workspace :
175177 root : /Users/distiller/simplenote
176178 paths :
@@ -209,6 +211,10 @@ jobs:
209211 # package.json's `certificateSubjectName` to find the imported cert.
210212 Import-PfxCertificate -FilePath C:\Users\circleci\simplenote-electron\resources\certificates\win.p12 -CertStoreLocation Cert:\LocalMachine\Root -Password (ConvertTo-SecureString -String $env:WIN_CSC_KEY_PASSWORD -AsPlainText -Force)
211213 npx electron-builder --win -p onTag
214+ - run :
215+ name : Release cleanup
216+ command : |
217+ rm release/builder-debug.yml
212218 - persist_to_workspace :
213219 root : C:\Users\circleci\simplenote-electron
214220 paths :
Original file line number Diff line number Diff line change @@ -37,6 +37,11 @@ module.exports = function main() {
3737 shouldQuit = true ;
3838 } ) ;
3939
40+ // Fixes rendering bug on Linux when sandbox === true (Electron 11.0)
41+ if ( process . platform === 'linux' ) {
42+ app . disableHardwareAcceleration ( ) ;
43+ }
44+
4045 app . on ( 'will-finish-launching' , function ( ) {
4146 setTimeout ( updater . ping . bind ( updater ) , config . updater . delay ) ;
4247 app . on ( 'open-url' , function ( event , url ) {
@@ -96,7 +101,9 @@ module.exports = function main() {
96101 'test' !== process . env . NODE_ENV &&
97102 ( isDev || process . argv . includes ( '--devtools' ) )
98103 ) {
99- mainWindow . openDevTools ( { mode : 'detach' } ) ;
104+ mainWindow . openDevTools ( {
105+ mode : 'detach' ,
106+ } ) ;
100107 }
101108
102109 // Configure and set the application menu
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { parse } from 'cookie';
55import getConfig from '../get-config' ;
66import { boot as bootWithoutAuth } from './boot-without-auth' ;
77import { boot as bootLoggingOut } from './logging-out' ;
8+ import { isElectron } from './utils/platform' ;
89
910const config = getConfig ( ) ;
1011
@@ -59,7 +60,13 @@ const clearStorage = (): Promise<void> =>
5960 . catch ( ( ) => resolveStorage ( ) ) ;
6061 } ) ;
6162
62- const forceReload = ( ) => history . go ( ) ;
63+ const forceReload = ( ) => {
64+ if ( isElectron ) {
65+ window . electron ?. send ( 'reload' ) ;
66+ } else {
67+ window . history . go ( ) ;
68+ }
69+ } ;
6370
6471const loadAccount = ( ) => {
6572 const storedUserData = localStorage . getItem ( 'stored_user' ) ;
You can’t perform that action at this time.
0 commit comments