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
chore[Op#54733]: remove red dot favicon- out of scope
Kabiru Mwenja651c3e8e2d11
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 30bb76ba797..1c1f2c3801c 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@@ -26,7 +26,7 @@// See COPYRIGHT and LICENSE files for more details.//++-import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, OnInit, OnDestroy } from '@angular/core';+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, OnInit } from '@angular/core';import { I18nService } from 'core-app/core/i18n/i18n.service';import { filter, map } from 'rxjs/operators';import { StateService } from '@uirouter/angular';@@ -50,7 +50,7 @@ import {styleUrls: ['./in-app-notification-center.component.sass'],changeDetection: ChangeDetectionStrategy.OnPush,})-export class InAppNotificationCenterComponent implements OnInit, OnDestroy {+export class InAppNotificationCenterComponent implements OnInit {maxSize = NOTIFICATIONS_MAX_SIZE;hasMoreThanPageSize$ = this.storeService.hasMoreThanPageSize$;@@ -160,28 +160,6 @@ export class InAppNotificationCenterComponent implements OnInit, OnDestroy {filter: this.urlParams.get('filter'),name: this.urlParams.get('name'),});- this.setupEventListeners();- }-- ngOnDestroy():void {- this.removeEventListeners();- }-- setupEventListeners():void {- this.handleVisibilityChangeBound = () => { void this.handleVisibilityChange(); };- document.addEventListener('visibilitychange', this.handleVisibilityChangeBound);- }-- removeEventListeners():void {- document.removeEventListener('visibilitychange', this.handleVisibilityChangeBound);- }-- handleVisibilityChange() {- if (document.hidden) {- this.storeService.setCenterHidden(true);- } else {- this.storeService.setCenterHidden(false);- }}noNotificationText(hasNotifications:boolean):string {diff --git a/frontend/src/app/features/in-app-notifications/center/state/ian-center.service.ts b/frontend/src/app/features/in-app-notifications/center/state/ian-center.service.tsindex 7080c6dfa45..954000d0858 100644--- a/frontend/src/app/features/in-app-notifications/center/state/ian-center.service.ts+++ b/frontend/src/app/features/in-app-notifications/center/state/ian-center.service.ts@@ -228,14 +228,6 @@ export class IanCenterService extends UntilDestroyedMixin {this.reload.next(true);}- setCenterHidden(hidden:boolean):void {- this.store.update({ centerHidden: hidden });-- if (!hidden) {- this.removeNotificationIndicatorInIcon();- }- }-markAsRead(notifications:ID[]):void {this.actions$.dispatch(markNotificationsAsRead({ origin: this.id, notifications }),@@ -290,21 +282,11 @@ export class IanCenterService extends UntilDestroyedMixin {// decreasing the notification count could happen when the user itself// marks notifications as read in the split view or on another tabthis.onReload.pipe(take(1)).subscribe((collection) => {- // check for new notifications and inform the user via desired notification method: currently red dot in icon- const { activeCollection } = this.query.getValue();- const hasNewNotifications = !collection.ids.reduce(- (allInOldCollection, id) => allInOldCollection && activeCollection.ids.includes(id),- true,- );-- // new concept for notification center:- if (hasNewNotifications) {- this.informAboutUnreadNotification();- }// directly update the UI state in both cases (count increased or decreased)this.store.update({ activeCollection: collection });this.actions$.dispatch(centerUpdatedInPlace({ origin: this.id }));});+this.reload.next(false);}@@ -350,49 +332,10 @@ export class IanCenterService extends UntilDestroyedMixin {this.reload.next(false);}- private informAboutUnreadNotification():void {- const state = this.store.getValue();-- if (state.centerHidden) {- // notification center is not visible (as far as it can be determined - e.g. another browser tab is selected)- this.showNotificationIndicatorInIcon();- }- }-private get primerizedActivitiesEnabled():boolean {return this.configurationService.activeFeatureFlags.includes('primerizedWorkPackageActivities');}- private showNewNotificationToast():void {- this.hideNewNotifcationToast();- this.activeReloadToast = this.toastService.add({- type: 'info',- icon: 'bell',- message: this.I18n.t('js.notifications.center.new_notifications.message'),- });- }-- private hideNewNotifcationToast():void {- if (this.activeReloadToast) {- this.toastService.remove(this.activeReloadToast);- this.activeReloadToast = null;- }- }-- private showNotificationIndicatorInIcon():void {- const iconLink = window.document.querySelector("link[rel*='icon']");- if (iconLink) {- (iconLink as HTMLLinkElement).href = 'favicon_notification.ico';- }- }-- private removeNotificationIndicatorInIcon():void {- const iconLink = window.document.querySelector("link[rel*='icon']");- if (iconLink) {- (iconLink as HTMLLinkElement).href = 'favicon.ico';- }- }-/*** Reload after notifications were successfully marked as read*/diff --git a/frontend/src/app/features/in-app-notifications/center/state/ian-center.store.ts b/frontend/src/app/features/in-app-notifications/center/state/ian-center.store.tsindex 5adc94a6bee..00c3c04ef1e 100644--- a/frontend/src/app/features/in-app-notifications/center/state/ian-center.store.ts+++ b/frontend/src/app/features/in-app-notifications/center/state/ian-center.store.ts@@ -20,8 +20,6 @@ export interface IanCenterState {/** Number of elements not showing after max values loaded */notLoaded:number;-- centerHidden:boolean;}export const IAN_FACET_FILTERS:Record<InAppNotificationFacet, ApiV3ListFilter[]> = {@@ -39,7 +37,6 @@ export function createInitialState():IanCenterState {activeCollection: { ids: [] },activeFacet: 'unread',notLoaded: 0,- centerHidden: false,};}diff --git a/public/favicon_notification.ico b/public/favicon_notification.icodeleted file mode 100644index 3c97f3f2f4b..00000000000Binary files a/public/favicon_notification.ico and /dev/null differ