File tree Expand file tree Collapse file tree 5 files changed +16
-12
lines changed Expand file tree Collapse file tree 5 files changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,11 @@ function preventMultipleAppInstances(): void {
77 }
88}
99
10- function openMinimizedIfAlreadyExists ( { win } : { win : BrowserWindow } ) : void {
10+ function openMinimizedIfAlreadyExists ( {
11+ win
12+ } : {
13+ win : BrowserWindow | null ;
14+ } ) : void {
1115 app . on ( "second-instance" , ( ) => {
1216 if ( win ) {
1317 if ( win . isMinimized ( ) ) {
@@ -24,15 +28,15 @@ function quitOnWindowsAllClosed(): void {
2428 } ) ;
2529}
2630
27- function createWindowOnActivate ( { win } : { win : BrowserWindow } ) : void {
31+ function createWindowOnActivate ( { win } : { win : BrowserWindow | null } ) : void {
2832 app . on ( "activate" , ( ) => {
2933 if ( ! win ) {
3034 win = createMainWindow ( ) ;
3135 }
3236 } ) ;
3337}
3438
35- export function setupApp ( { win } : { win : BrowserWindow } ) : void {
39+ export function setupApp ( { win } : { win : BrowserWindow | null } ) : void {
3640 preventMultipleAppInstances ( ) ;
3741 openMinimizedIfAlreadyExists ( { win : win } ) ;
3842 quitOnWindowsAllClosed ( ) ;
Original file line number Diff line number Diff line change @@ -6,10 +6,10 @@ if (is.development && module.hot) {
66 module . hot . accept ( ) ;
77}
88
9- const { app } = require ( "electron" ) ;
10- const { setupMenu } = require ( "./menu" ) ;
11- const { init } = require ( "./init" ) ;
12- const { createMainWindow, setupMainWindow } = require ( "./window_setup" ) ;
9+ import { app } from "electron" ;
10+ import { setupMenu } from "./menu" ;
11+ import { init } from "./init" ;
12+ import { createMainWindow , setupMainWindow } from "./window_setup" ;
1313
1414// Maintain reference to window to
1515// prevent it from being garbage collected
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ function setupUserModelId(): void {
1717 app . setAppUserModelId ( packageJson . build . appId ) ;
1818}
1919
20- export function init ( { win } : { win : BrowserWindow } ) : void {
20+ export function init ( { win } : { win : BrowserWindow | null } ) : void {
2121 setupErrorHandling ( ) ;
2222 setupContextMenu ( ) ;
2323 setupUserModelId ( ) ;
Original file line number Diff line number Diff line change 11import { BrowserWindow , app } from "electron" ;
2- const { is } = require ( "electron-util" ) ;
3- const url = require ( "url" ) ;
4- const path = require ( "path" ) ;
2+ import { is } from "electron-util" ;
3+ import url from "url" ;
4+ import path from "path" ;
55
66const DEFAULT_WINDOW_WIDTH = 580 ;
77const DEFAULT_WINDOW_HEIGHT = 312 ;
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ function cleanExifData(exifHash: any): any {
115115// When finished working with it, it should be closed,
116116// when -stay_open False will be written to its stdin to exit the process.
117117//
118- // const exiftool = require(' node-exiftool')
118+ // import exiftool from " node-exiftool"
119119// const ep = new exiftool.ExiftoolProcess()
120120//
121121// ep
You can’t perform that action at this time.
0 commit comments