diff --git a/app/package.json b/app/package.json index 5633ca40..0c35a3eb 100644 --- a/app/package.json +++ b/app/package.json @@ -11,7 +11,9 @@ "make": "electron-forge make", "make:sign": "SIGN=1 electron-forge make", "publish": "SIGN=1 electron-forge publish", - "lint": "eslint --ext .ts,.tsx ." + "lint": "eslint --ext .ts,.tsx .", + "format": "prettier --check . --ignore-path .gitignore", + "format:fix": "prettier --write . --ignore-path .gitignore" }, "keywords": [], "author": { diff --git a/app/src/declarations.d.ts b/app/src/declarations.d.ts index fc52f076..a97fbda7 100644 --- a/app/src/declarations.d.ts +++ b/app/src/declarations.d.ts @@ -1,4 +1,4 @@ declare module '*.svg' { - const content: string; - export default content; -} \ No newline at end of file + const content: string + export default content +} diff --git a/app/src/index.ts b/app/src/index.ts index a88afdc2..25475992 100644 --- a/app/src/index.ts +++ b/app/src/index.ts @@ -67,25 +67,25 @@ function firstRunWindow() { function createSystemtray() { let iconPath = nativeTheme.shouldUseDarkColors - ? path.join(__dirname, '..', '..', 'assets', 'ollama_icon_16x16Template.png') + ? path.join(__dirname, '..', '..', 'assets', 'ollama_icon_16x16Template.png') : path.join(__dirname, '..', '..', 'assets', 'ollama_outline_icon_16x16Template.png') if (app.isPackaged) { iconPath = nativeTheme.shouldUseDarkColors - ? path.join(process.resourcesPath, 'ollama_icon_16x16Template.png') - : path.join(process.resourcesPath, 'ollama_outline_icon_16x16Template.png') + ? path.join(process.resourcesPath, 'ollama_icon_16x16Template.png') + : path.join(process.resourcesPath, 'ollama_outline_icon_16x16Template.png') } tray = new Tray(iconPath) - nativeTheme.on('updated', function theThemeHasChanged () { + nativeTheme.on('updated', function theThemeHasChanged() { if (nativeTheme.shouldUseDarkColors) { - app.isPackaged - ? tray.setImage(path.join(process.resourcesPath, 'ollama_icon_16x16Template.png')) + app.isPackaged + ? tray.setImage(path.join(process.resourcesPath, 'ollama_icon_16x16Template.png')) : tray.setImage(path.join(__dirname, '..', '..', 'assets', 'ollama_icon_16x16Template.png')) } else { - app.isPackaged - ? tray.setImage(path.join(process.resourcesPath, 'ollama_outline_icon_16x16Template.png')) + app.isPackaged + ? tray.setImage(path.join(process.resourcesPath, 'ollama_outline_icon_16x16Template.png')) : tray.setImage(path.join(__dirname, '..', '..', 'assets', 'ollama_outline_icon_16x16Template.png')) } }) @@ -116,8 +116,7 @@ function server() { }) function restart() { - logger.info('Restarting the server...') - server() + setTimeout(server, 3000) } proc.on('exit', restart)