mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
chore: merge with main
This commit is contained in:
commit
498a889f1d
47 changed files with 1337 additions and 451 deletions
|
@ -2,6 +2,7 @@ import { app, BrowserWindow } from "electron";
|
|||
import { init } from "@sentry/electron/main";
|
||||
import i18n from "i18next";
|
||||
import path from "node:path";
|
||||
import { electronApp, optimizer } from "@electron-toolkit/utils";
|
||||
import { resolveDatabaseUpdates, WindowManager } from "@main/services";
|
||||
import { dataSource } from "@main/data-source";
|
||||
import * as resources from "@locales";
|
||||
|
@ -49,8 +50,10 @@ if (process.defaultApp) {
|
|||
// initialization and is ready to create browser windows.
|
||||
// Some APIs can only be used after this event occurs.
|
||||
app.whenReady().then(() => {
|
||||
electronApp.setAppUserModelId("site.hydralauncher.hydra");
|
||||
|
||||
dataSource.initialize().then(async () => {
|
||||
// await resolveDatabaseUpdates();
|
||||
await resolveDatabaseUpdates();
|
||||
|
||||
await import("./main");
|
||||
|
||||
|
@ -59,10 +62,14 @@ app.whenReady().then(() => {
|
|||
});
|
||||
|
||||
WindowManager.createMainWindow();
|
||||
// WindowManager.createSystemTray(userPreferences?.language || "en");
|
||||
WindowManager.createSystemTray(userPreferences?.language || "en");
|
||||
});
|
||||
});
|
||||
|
||||
app.on("browser-window-created", (_, window) => {
|
||||
optimizer.watchWindowShortcuts(window);
|
||||
});
|
||||
|
||||
app.on("second-instance", (_event, commandLine) => {
|
||||
// Someone tried to run a second instance, we should focus our window.
|
||||
if (WindowManager.mainWindow) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue