feat: renaming class names to BEM

This commit is contained in:
Chubby Granny Chaser
2025-05-17 23:00:33 +01:00
9 changed files with 74 additions and 34 deletions

View File

@@ -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();