mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-22 02:13:59 +00:00
feat: renaming class names to BEM
This commit is contained in:
@@ -366,23 +366,31 @@ export class WindowManager {
|
||||
this.loadNotificationWindowURL();
|
||||
|
||||
this.notificationWindow.once("ready-to-show", () => {
|
||||
if (isStaging) {
|
||||
this.notificationWindow?.webContents.openDevTools();
|
||||
}
|
||||
|
||||
if (showTestNotification) {
|
||||
const language = userPreferences.language ?? "en";
|
||||
setTimeout(() => {
|
||||
this.notificationWindow?.webContents.send(
|
||||
"on-achievement-unlocked",
|
||||
userPreferences.achievementCustomNotificationPosition ?? "top-left",
|
||||
[generateAchievementCustomNotificationTest(t, language)]
|
||||
);
|
||||
this.showTestNotification();
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static async showTestNotification() {
|
||||
const userPreferences = await db.get<string, UserPreferences>(
|
||||
levelKeys.userPreferences,
|
||||
{
|
||||
valueEncoding: "json",
|
||||
}
|
||||
);
|
||||
|
||||
const language = userPreferences.language ?? "en";
|
||||
|
||||
this.notificationWindow?.webContents.send(
|
||||
"on-achievement-unlocked",
|
||||
userPreferences.achievementCustomNotificationPosition ?? "top_left",
|
||||
[generateAchievementCustomNotificationTest(t, language)]
|
||||
);
|
||||
}
|
||||
|
||||
public static async closeNotificationWindow() {
|
||||
if (this.notificationWindow) {
|
||||
this.notificationWindow.close();
|
||||
|
||||
Reference in New Issue
Block a user