فهرست منبع

[FIX] settings dont load

Gogs 6 سال پیش
والد
کامیت
c0e2eb6469
5فایلهای تغییر یافته به همراه3 افزوده شده و 9 حذف شده
  1. 0 0
      app.ini
  2. 0 0
      printer.png
  3. 0 6
      res/app.ini.bkp
  4. 1 1
      src/index.js
  5. 2 2
      src/settings.js

+ 0 - 0
res/app.ini → app.ini


+ 0 - 0
res/printer.png → printer.png


+ 0 - 6
res/app.ini.bkp

@@ -1,6 +0,0 @@
-appName=Servidor de Impresión
-appMode=production
-
-[server]
-host=127.0.0.1
-port=8070

+ 1 - 1
src/index.js

@@ -109,7 +109,7 @@ const exitApp = async () => {
  * Create system tray app
  */
 const createTray = async () => {
-    tray = new Tray('./res/printer.png')
+    tray = new Tray('printer.png')
     tray.setToolTip(settings.appName)
 
     const contextMenu = Menu.buildFromTemplate([

+ 2 - 2
src/settings.js

@@ -1,8 +1,8 @@
+import { app } from 'electron'
 import FileSystem from 'fs'
 import Ini from 'ini'
-import { settings } from 'cluster';
 
-const iniPath = './res/app.ini'
+const iniPath = app.getAppPath() + '/app.ini'
 
 /**
  *