From 6123c8d0ba6ac33548b7eff786e87ee500a5ac5c Mon Sep 17 00:00:00 2001 From: Felix Riehm Date: Mon, 15 Apr 2024 15:51:15 +0200 Subject: [PATCH] fix circle event text plural typo, temporarily disabled mixed visualisation --- web/src/service_event/event_buffer_data.ts | 31 ++++++++++++++++++---- web/src/theme/visualisationDirector.ts | 13 +++++---- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/web/src/service_event/event_buffer_data.ts b/web/src/service_event/event_buffer_data.ts index 6795bf9..5703967 100644 --- a/web/src/service_event/event_buffer_data.ts +++ b/web/src/service_event/event_buffer_data.ts @@ -62,21 +62,42 @@ export class EventBufferData { private generateSingleCircleSubTitle(titleInput: string, serviceEvent: ServiceEvent) : string{ let title = titleInput; let eventCirclesNumber = this.eventCirclesArray.length; + let isPlural: boolean = eventCirclesNumber > 1 if(serviceEvent === ServiceEvent.keeper_file_edit || serviceEvent === ServiceEvent.keeper_file_create) { - title = title + ' [' + eventCirclesNumber + ' files]' + if(isPlural) { + title = title + ' [' + eventCirclesNumber + ' files]' + } else { + title = title + ' [' + eventCirclesNumber + ' file]' + } } if(serviceEvent === ServiceEvent.keeper_new_library) { - title = title + ' [' + eventCirclesNumber + ' libraries]' + if(isPlural) { + title = title + ' [' + eventCirclesNumber + ' libraries]' + } else { + title = title + ' [' + eventCirclesNumber + ' library]' + } } if(serviceEvent === ServiceEvent.minerva_public_message || serviceEvent === ServiceEvent.minerva_direct_message || serviceEvent === ServiceEvent.minerva_private_message || serviceEvent === ServiceEvent.minerva_group_message) { - title = title + ' [' + eventCirclesNumber + ' messages]' + if(isPlural) { + title = title + ' [' + eventCirclesNumber + ' messages]' + } else { + title = title + ' [' + eventCirclesNumber + ' message]' + } } if(serviceEvent === ServiceEvent.bloxberg_confirmed_transaction) { - title = title + ' [' + eventCirclesNumber + ' transactions]' + if(isPlural) { + title = title + ' [' + eventCirclesNumber + ' transactions]' + } else { + title = title + ' [' + eventCirclesNumber + ' transaction]' + } } if(serviceEvent === ServiceEvent.bloxberg_block) { - title = title + ' [' + eventCirclesNumber + ' blocks]' + if(isPlural) { + title = title + ' [' + eventCirclesNumber + ' blocks]' + } else { + title = title + ' [' + eventCirclesNumber + ' block]' + } } return title; diff --git a/web/src/theme/visualisationDirector.ts b/web/src/theme/visualisationDirector.ts index a604b27..3be717d 100644 --- a/web/src/theme/visualisationDirector.ts +++ b/web/src/theme/visualisationDirector.ts @@ -63,11 +63,14 @@ export class VisualisationDirector { getNextVisualisation(): Visualisation{ let vis: Visualisation = this.current_visualisation if(this.settings_data.mixed) { - if(vis === Visualisation.listenTo){ - vis = Visualisation.geo - } else { - vis = Visualisation.listenTo - } + vis = Visualisation.listenTo + + // temporarily disabled (requested from feedback) + // if(vis === Visualisation.listenTo){ + // vis = Visualisation.geo + // } else { + // vis = Visualisation.listenTo + // } } return vis }