feat: auto install default false on linux and friend request notification

This commit is contained in:
Zamitto
2025-03-10 18:57:13 -03:00
parent 497f5e7742
commit b344a1850a
6 changed files with 92 additions and 15 deletions

View File

@@ -12,6 +12,7 @@ import { logger } from "../logger";
import { WindowManager } from "../window-manager";
import type { Game, UserPreferences } from "@types";
import { db, levelKeys } from "@main/level";
import { restartAndInstallUpdate } from "@main/events/autoupdater/restart-and-install-update";
async function downloadImage(url: string | null) {
if (!url) return undefined;
@@ -72,10 +73,24 @@ export const publishNotificationUpdateReadyToInstall = async (
ns: "notifications",
}),
icon: trayIcon,
}).show();
})
.on("click", () => {
restartAndInstallUpdate();
})
.show();
};
export const publishNewFriendRequestNotification = async () => {};
export const publishNewFriendRequestNotification = async () => {
new Notification({
title: t("new_friend_request", {
ns: "notifications",
}),
body: t("You have received a new friend request", {
ns: "notifications",
}),
icon: trayIcon,
});
};
export const publishCombinedNewAchievementNotification = async (
achievementCount,