Procurando atualizaƧoes
+diff --git a/package.json b/package.json index 6cb748ac..b82ae700 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hydra", - "version": "1.2.2", + "version": "1.2.1", "description": "Hydra", "main": "./out/main/index.js", "author": "Los Broxas", @@ -50,6 +50,7 @@ "color.js": "^1.2.0", "date-fns": "^3.6.0", "easydl": "^1.1.1", + "electron-log": "^5.1.4", "electron-updater": "^6.1.8", "fetch-cookie": "^3.0.1", "flexsearch": "^0.7.43", diff --git a/src/main/index.ts b/src/main/index.ts index 445164b5..7b6af0df 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -7,7 +7,7 @@ import { resolveDatabaseUpdates, WindowManager } from "@main/services"; import { dataSource } from "@main/data-source"; import * as resources from "@locales"; import { userPreferencesRepository } from "@main/repository"; - +import electronLog from "electron-log"; const { autoUpdater } = updater; autoUpdater.setFeedURL({ @@ -16,6 +16,9 @@ autoUpdater.setFeedURL({ repo: "hydra", }); +autoUpdater.logger = electronLog; +autoUpdater.logger.transports.file.level = "info"; + const gotTheLock = app.requestSingleInstanceLock(); if (!gotTheLock) app.quit(); @@ -72,8 +75,8 @@ app.whenReady().then(() => { autoUpdater.checkForUpdates().then((r) => { console.log(r); - WindowManager.splashWindow?.close(); - WindowManager.createMainWindow(); + //WindowManager.splashWindow?.close(); + //WindowManager.createMainWindow(); }); }); }); diff --git a/src/main/services/window-manager.ts b/src/main/services/window-manager.ts index 6d808e46..f1e56256 100644 --- a/src/main/services/window-manager.ts +++ b/src/main/services/window-manager.ts @@ -41,42 +41,25 @@ export class WindowManager { // Load the remote URL for development or the local html file for production. if (is.dev && process.env["ELECTRON_RENDERER_URL"]) { this.splashWindow?.loadURL( - `${process.env["ELECTRON_RENDERER_URL"]}#/splash` + `${process.env["ELECTRON_RENDERER_URL"]}/splash.html` ); } else { this.splashWindow?.loadFile( - path.join(__dirname, "../renderer/index.html"), - { - hash: "splash", - } + path.join(__dirname, "../renderer/splash.html") ); } } public static createSplashScreen() { this.splashWindow = new BrowserWindow({ - width: 810, - height: 610, - minWidth: 810, - minHeight: 610, - titleBarStyle: "hidden", - ...(process.platform === "linux" ? { icon } : {}), - transparent: true, - frame: false, - alwaysOnTop: true, - trafficLightPosition: { x: 16, y: 16 }, - titleBarOverlay: { - symbolColor: "#DADBE1", - color: "#151515", - height: 34, - }, - webPreferences: { - preload: path.join(__dirname, "../preload/index.mjs"), - sandbox: false, - }, + width: 400, + height: 400, + frame: true, + alwaysOnTop: false, }); this.loadSplashURL(); + this.splashWindow.removeMenu(); } public static createMainWindow() { diff --git a/src/renderer/splash.html b/src/renderer/splash.html new file mode 100644 index 00000000..bb0b5553 --- /dev/null +++ b/src/renderer/splash.html @@ -0,0 +1,16 @@ + + +
+ + +Procurando atualizaƧoes
+