OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Use different variants of loading gifs depending on the current mode. Therefor the method to detect the current mode was fixed
Henriette Dargec2fc66dcbd1c
diff --git a/frontend/src/app/features/in-app-notifications/center/in-app-notification-center.component.ts b/frontend/src/app/features/in-app-notifications/center/in-app-notification-center.component.tsindex 31224c28a91..39f55f19901 100644--- a/frontend/src/app/features/in-app-notifications/center/in-app-notification-center.component.ts+++ b/frontend/src/app/features/in-app-notifications/center/in-app-notification-center.component.ts@@ -49,6 +49,9 @@ import { ApiV3Service } from 'core-app/core/apiv3/api-v3.service';import { PathHelperService } from 'core-app/core/path-helper/path-helper.service';import { IanBellService } from 'core-app/features/in-app-notifications/bell/state/ian-bell.service';import { imagePath } from 'core-app/shared/helpers/images/path-helper';+import {+ ColorsService,+} from 'core-app/shared/components/colors/colors.service';@Component({selector: 'op-in-app-notification-center',@@ -114,7 +117,7 @@ export class InAppNotificationCenterComponent implements OnInit {image = {no_notification: imagePath('notification-center/empty-state-no-notification.svg'),no_selection: imagePath('notification-center/empty-state-no-selection.svg'),- loading: imagePath('notification-center/notification_loading.gif'),+ loading: imagePath(`notification-center/notification_loading_${this.colorsService.colorMode()}.gif`),};trackNotificationGroups = (i:number, item:INotification[]):string => item@@ -151,6 +154,7 @@ export class InAppNotificationCenterComponent implements OnInit {readonly state:StateService,readonly apiV3:ApiV3Service,readonly pathService:PathHelperService,+ readonly colorsService:ColorsService,) {}diff --git a/frontend/src/app/shared/components/colors/colors.service.ts b/frontend/src/app/shared/components/colors/colors.service.tsindex d8739273be5..8c2c99b01c5 100644--- a/frontend/src/app/shared/components/colors/colors.service.ts+++ b/frontend/src/app/shared/components/colors/colors.service.ts@@ -26,16 +26,14 @@ export class ColorsService {}public colorMode():string {- switch (document.body.getAttribute('data-light-theme')) {- case 'light_high_contrast':- return colorModes.lightHighContrast;- case 'dark':- return colorModes.dark;- case 'light':- return colorModes.light;- default: {- return colorModes.light;- }+ if (document.body.getAttribute('data-color-mode') === 'dark') {+ return colorModes.dark;}++ if (document.body.getAttribute('data-light-theme') === 'light_high_contrast') {+ return colorModes.lightHighContrast;+ }++ return colorModes.light;}}diff --git a/frontend/src/assets/images/notification-center/notification_loading_dark.gif b/frontend/src/assets/images/notification-center/notification_loading_dark.gifnew file mode 100644index 00000000000..ee378a061e1Binary files /dev/null and b/frontend/src/assets/images/notification-center/notification_loading_dark.gif differdiff --git a/frontend/src/assets/images/notification-center/notification_loading.gif b/frontend/src/assets/images/notification-center/notification_loading_light.gifsimilarity index 100%rename from frontend/src/assets/images/notification-center/notification_loading.gifrename to frontend/src/assets/images/notification-center/notification_loading_light.gif