diff --git a/src/main/services/achievements/achievement-watcher-manager.ts b/src/main/services/achievements/achievement-watcher-manager.ts index 97746ca0..c010f984 100644 --- a/src/main/services/achievements/achievement-watcher-manager.ts +++ b/src/main/services/achievements/achievement-watcher-manager.ts @@ -281,7 +281,7 @@ export class AchievementWatcherManager { totalNewGamesWithAchievements, totalNewAchievements, userPreferences.achievementCustomNotificationPosition ?? - "top_left" + "top-left" ); } else { publishCombinedNewAchievementNotification( diff --git a/src/main/services/achievements/merge-achievements.ts b/src/main/services/achievements/merge-achievements.ts index 801b53c7..6b40ad72 100644 --- a/src/main/services/achievements/merge-achievements.ts +++ b/src/main/services/achievements/merge-achievements.ts @@ -128,7 +128,7 @@ export const mergeAchievements = async ( if (userPreferences?.achievementCustomNotificationsEnabled !== false) { WindowManager.notificationWindow?.webContents.send( "on-achievement-unlocked", - userPreferences.achievementCustomNotificationPosition ?? "top_left", + userPreferences.achievementCustomNotificationPosition ?? "top-left", achievementsInfo ); } else { diff --git a/src/main/services/window-manager.ts b/src/main/services/window-manager.ts index 1ea5ea1d..91232f6e 100644 --- a/src/main/services/window-manager.ts +++ b/src/main/services/window-manager.ts @@ -289,35 +289,35 @@ export class WindowManager { const display = screen.getPrimaryDisplay(); const { width, height } = display.workAreaSize; - if (position === "bottom_center") { + if (position === "bottom-center") { return { x: (width - this.NOTIFICATION_WINDOW_WIDTH) / 2, y: height - this.NOTIFICATION_WINDOW_HEIGHT, }; } - if (position === "bottom_right") { + if (position === "bottom-right") { return { x: width - this.NOTIFICATION_WINDOW_WIDTH, y: height - this.NOTIFICATION_WINDOW_HEIGHT, }; } - if (position === "top_center") { + if (position === "top-center") { return { x: (width - this.NOTIFICATION_WINDOW_WIDTH) / 2, y: 0, }; } - if (position === "bottom_left") { + if (position === "bottom-left") { return { x: 0, y: height - this.NOTIFICATION_WINDOW_HEIGHT, }; } - if (position === "top_right") { + if (position === "top-right") { return { x: width - this.NOTIFICATION_WINDOW_WIDTH, y: 0, @@ -375,7 +375,7 @@ export class WindowManager { setTimeout(() => { this.notificationWindow?.webContents.send( "on-achievement-unlocked", - userPreferences.achievementCustomNotificationPosition ?? "top_left", + userPreferences.achievementCustomNotificationPosition ?? "top-left", [generateAchievementCustomNotificationTest(t, language)] ); }, 1000); diff --git a/src/renderer/src/components/achievements/notification/achievement-notification.scss b/src/renderer/src/components/achievements/notification/achievement-notification.scss index e1df81d7..c1c9eb45 100644 --- a/src/renderer/src/components/achievements/notification/achievement-notification.scss +++ b/src/renderer/src/components/achievements/notification/achievement-notification.scss @@ -144,28 +144,28 @@ $margin-bottom: 28px; height: 192px; display: flex; - &.top_left { + &--top-left { align-items: start; } - &.top_center { + &--top-center { align-items: start; } - &.top_right { + &--top-right { justify-content: end; align-items: start; } - &.bottom_left { + &--bottom-left { align-items: end; } - &.bottom_center { + &--bottom-center { align-items: end; } - &.bottom_right { + &--bottom-right { justify-content: end; align-items: end; } @@ -183,27 +183,27 @@ $margin-bottom: 28px; box-shadow: 0px 2px 16px 0px rgba(0, 0, 0, 0.25); } - &.top_left &__outer-container { + &--top-left &__outer-container { margin: $margin-top 0 0 $margin-horizontal; } - &.top_center &__outer-container { + &--top-center &__outer-container { margin: $margin-top 0 0 $margin-horizontal; } - &.top_right &__outer-container { + &--top-right &__outer-container { margin: $margin-top $margin-horizontal 0 0; } - &.bottom_left &__outer-container { + &--bottom-left &__outer-container { margin: 0 0 $margin-bottom $margin-horizontal; } - &.bottom_center &__outer-container { + &--bottom-center &__outer-container { margin: 0 0 $margin-bottom $margin-horizontal; } - &.bottom_right &__outer-container { + &--bottom-right &__outer-container { margin: 0 $margin-horizontal $margin-bottom 0; } @@ -423,32 +423,32 @@ $margin-bottom: 28px; } } - &.top_left &__chip { + &--top-left &__chip { top: -12px; margin: $margin-top 0 0 $margin-horizontal; } - &.top_center &__chip { + &--top-center &__chip { top: -12px; margin: $margin-top 0 0 $margin-horizontal; } - &.top_right &__chip { + &--top-right &__chip { top: -12px; margin: $margin-top $margin-horizontal 0 0; } - &.bottom_left &__chip { + &--bottom-left &__chip { bottom: 70px; margin: 0 0 $margin-bottom $margin-horizontal; } - &.bottom_center &__chip { + &--bottom-center &__chip { bottom: 70px; margin: 0 0 $margin-bottom $margin-horizontal; } - &.bottom_right &__chip { + &--bottom-right &__chip { bottom: 70px; margin: 0 $margin-horizontal $margin-bottom 0; } diff --git a/src/renderer/src/components/achievements/notification/achievement-notification.tsx b/src/renderer/src/components/achievements/notification/achievement-notification.tsx index edd11d6a..1eefda8e 100644 --- a/src/renderer/src/components/achievements/notification/achievement-notification.tsx +++ b/src/renderer/src/components/achievements/notification/achievement-notification.tsx @@ -24,7 +24,7 @@ export function AchievementNotificationItem({ return (