From b218507b74922d94bdc47bebc7b857f6785425dd Mon Sep 17 00:00:00 2001 From: Elblinator <69210919+Elblinator@users.noreply.github.com> Date: Tue, 4 Jun 2024 16:42:18 +0200 Subject: [PATCH 1/4] Add `member_number` and `email` to participant-list (#3730) --- .../participant-detail-view.component.html | 31 +++++++++---------- .../participant-list.component.html | 15 ++++++--- .../participant-list.component.ts | 11 ++++--- .../participant-list-filter.service.ts | 28 +++++++++++++++++ .../participant-list-sort.service.ts | 28 +++++++++++++++-- 5 files changed, 86 insertions(+), 27 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-detail/components/participant-detail-view/participant-detail-view.component.html b/client/src/app/site/pages/meetings/pages/participants/pages/participant-detail/components/participant-detail-view/participant-detail-view.component.html index a0a83b75de..7fce1fd73c 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-detail/components/participant-detail-view/participant-detail-view.component.html +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-detail/components/participant-detail-view/participant-detail-view.component.html @@ -235,24 +235,21 @@

{{ 'Groups' | translate }}

{{ 'Default group' | translate }} -
- -
-

{{ 'Voting right delegated to (proxy)' | translate }}

- {{ user!.vote_delegated_to() }} -
- - -
-

{{ 'Voting right received from (principals)' | translate }}

- {{ user!.vote_delegations_from() }} -
+ +
+

{{ 'Voting right delegated to (proxy)' | translate }}

+ {{ user!.vote_delegated_to() }} +
- -
-

{{ 'Vote weight' | translate }}

- {{ user?.vote_weight() }} -
+ +
+

{{ 'Voting right received from (principals)' | translate }}

+ {{ user!.vote_delegations_from() }} +
+ +
+

{{ 'Vote weight' | translate }}

+ {{ user?.vote_weight() }}
diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html index 61f344a4c5..33a0bba23e 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html @@ -43,18 +43,25 @@

{{ 'Participants' | translate }}

-
+
{{ user.short_name }}
 
({{ user.pronoun }})
-
- {{ user.username }} · {{ 'Vote weight' | translate }}: {{ user.vote_weight() }} -
+ +
+ {{ user.username }} + · {{ user.email }}  + · {{ user.member_number }} +
+
{{ 'Vote weight' | translate }}: {{ user.vote_weight() }}
+
{{ user.username }} + · {{ user.email }}  + · {{ user.member_number }}
{{ 'Vote weight' | translate }}: {{ user.vote_weight() }} diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.ts b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.ts index be1472e0e7..957681caa4 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.ts +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.ts @@ -116,10 +116,13 @@ export class ParticipantListComponent extends BaseMeetingListViewComponent 0; } - /** - * Define extra filter properties - */ - public filterProps = [`full_name`, `groups`, `number`, `delegationName`, `structure_levels`]; + protected get filterProps(): string[] { + if (this.canSeeSensitiveData) { + return [`full_name`, `groups`, `number`, `delegationName`, `structure_levels`, `member_number`, `email`]; + } else { + return [`full_name`, `groups`, `number`, `delegationName`, `structure_levels`]; + } + } public get hasInteractionState(): Observable { return this.interactionService.isConfStateNone.pipe(map(isNone => !isNone)); diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-filter/participant-list-filter.service.ts b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-filter/participant-list-filter.service.ts index 8dd3ad87d7..0beaf53ccb 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-filter/participant-list-filter.service.ts +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-filter/participant-list-filter.service.ts @@ -98,6 +98,22 @@ export class ParticipantListFilterService extends BaseMeetingFilterListService { + return !this.operator.hasPerms(Permission.userCanSeeSensitiveData); + } + }, + { + property: `hasMemberNumber`, + shouldHideFn: (): boolean => { + return !this.operator.hasPerms(Permission.userCanSeeSensitiveData); + } + }, { property: `isLastEmailSent`, shouldHideFn: (): boolean => { diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-sort/participant-list-sort.service.ts b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-sort/participant-list-sort.service.ts index 2c44d1f507..49f0403505 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-sort/participant-list-sort.service.ts +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-sort/participant-list-sort.service.ts @@ -1,10 +1,12 @@ import { Injectable, ProviderToken } from '@angular/core'; import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { Permission } from 'src/app/domain/definitions/permission'; import { BaseRepository } from 'src/app/gateways/repositories/base-repository'; import { UserRepositoryService } from 'src/app/gateways/repositories/users'; import { BaseSortListService, OsHideSortingOptionSetting, OsSortingOption } from 'src/app/site/base/base-sort.service'; import { MeetingSettingsService } from 'src/app/site/pages/meetings/services/meeting-settings.service'; import { ViewUser } from 'src/app/site/pages/meetings/view-models/view-user'; +import { OperatorService } from 'src/app/site/services/operator.service'; @Injectable({ providedIn: `root` @@ -25,18 +27,20 @@ export class ParticipantListSortService extends BaseSortListService { { property: [`first_name`, `last_name`], label: _(`Given name`) }, { property: [`last_name`, `first_name`], label: _(`Surname`) }, { property: `is_present_in_meeting_ids`, label: _(`Presence`) }, + { property: `member_number`, label: _(`Membership Number`) }, { property: `is_active`, label: _(`Is active`) }, { property: `is_physical_person`, label: _(`Is a natural person`) }, { property: `number`, label: _(`Participant number`), foreignBaseKeys: { meeting_user: [`number`] } }, { property: `voteWeight`, label: _(`Vote weight`), foreignBaseKeys: { meeting_user: [`vote_weight`] } }, { property: `comment`, baseKeys: [], foreignBaseKeys: { meeting_user: [`comment`] } }, { property: `last_email_sent`, label: _(`Last email sent`) }, + { property: `hasEmail`, label: _(`Has email`) }, { property: `last_login`, label: _(`Last login`) } ]; private _voteWeightEnabled: boolean; - public constructor(private meetingSettings: MeetingSettingsService) { + public constructor(private meetingSettings: MeetingSettingsService, private operator: OperatorService) { super({ sortProperty: [`first_name`, `last_name`], sortAscending: true @@ -55,7 +59,27 @@ export class ParticipantListSortService extends BaseSortListService { return [ { property: `vote_weight`, - shouldHideFn: () => !this._voteWeightEnabled + shouldHideFn: () => !this._voteWeightEnabled && !this.operator.hasPerms(Permission.userCanUpdate) + }, + { + property: `member_number`, + shouldHideFn: () => !this.operator.hasPerms(Permission.userCanSeeSensitiveData) + }, + { + property: `hasEmail`, + shouldHideFn: () => !this.operator.hasPerms(Permission.userCanSeeSensitiveData) + }, + { + property: `is_active`, + shouldHideFn: () => !this.operator.hasPerms(Permission.userCanSeeSensitiveData) + }, + { + property: `last_email_sent`, + shouldHideFn: () => !this.operator.hasPerms(Permission.userCanSeeSensitiveData) + }, + { + property: `last_login`, + shouldHideFn: () => !this.operator.hasPerms(Permission.userCanUpdate) } ]; } From c074235c3f825f45e289ff8a44955096a3ecad55 Mon Sep 17 00:00:00 2001 From: reiterl Date: Wed, 5 Jun 2024 11:23:37 +0200 Subject: [PATCH 2/4] Add title info to chyron and add second layout option (#3691) --- .../app/domain/models/projector/projector.ts | 4 ++ .../projector-repository.service.ts | 9 +++- .../projection-dialog.component.html | 5 +- .../projection-dialog.component.ts | 22 +++++++-- .../projection-dialog/definitions.ts | 3 +- .../services/projection-dialog.service.ts | 9 +++- .../projector-button.component.ts | 12 ++++- ...urrent-speaker-chyron-slide.component.html | 32 +++++++++---- ...urrent-speaker-chyron-slide.component.scss | 47 +++++++++++++++---- .../current-speaker-chyron-slide.component.ts | 10 +++- .../current-speaker-chyron-slide-data.ts | 3 ++ .../current-speaker-chyron-slide.module.ts | 5 +- .../projector-edit-dialog.component.html | 4 +- .../projector-edit-dialog.component.ts | 22 +++++---- .../projector-detail.component.html | 1 + .../current-speaker-chyron-slide.service.ts | 16 ++++++- .../services/projector-controller.service.ts | 5 +- 17 files changed, 164 insertions(+), 45 deletions(-) diff --git a/client/src/app/domain/models/projector/projector.ts b/client/src/app/domain/models/projector/projector.ts index f11fb56865..8c44435256 100644 --- a/client/src/app/domain/models/projector/projector.ts +++ b/client/src/app/domain/models/projector/projector.ts @@ -25,6 +25,8 @@ export class Projector extends BaseModel { public header_h1_color!: string; public chyron_background_color!: string; public chyron_font_color!: string; + public chyron_background_color_2!: string; + public chyron_font_color_2!: string; public show_header_footer!: boolean; public show_title!: boolean; public show_logo!: boolean; @@ -87,7 +89,9 @@ export class Projector extends BaseModel { `header_font_color`, `header_h1_color`, `chyron_background_color`, + `chyron_background_color_2`, `chyron_font_color`, + `chyron_font_color_2`, `show_header_footer`, `show_title`, `show_logo`, diff --git a/client/src/app/gateways/repositories/projectors/projector-repository.service.ts b/client/src/app/gateways/repositories/projectors/projector-repository.service.ts index b34befe6cd..f903f9ecf8 100644 --- a/client/src/app/gateways/repositories/projectors/projector-repository.service.ts +++ b/client/src/app/gateways/repositories/projectors/projector-repository.service.ts @@ -55,6 +55,8 @@ export class ProjectorRepositoryService extends BaseMeetingRelatedRepository { const payload = this.createProjectPayload(descriptor, projectors, options); + if (mode) { + payload.mode = mode; + } + return await this.sendActionToBackend(ProjectorAction.PROJECT, payload); } diff --git a/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/components/projection-dialog/projection-dialog.component.html b/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/components/projection-dialog/projection-dialog.component.html index 8ba1ee5a7d..2610659b02 100644 --- a/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/components/projection-dialog/projection-dialog.component.html +++ b/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/components/projection-dialog/projection-dialog.component.html @@ -6,7 +6,7 @@

{{ descriptor.getDialogTitle() }}
-
+
{{ option.displayName | translate }}

- + + diff --git a/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/components/projection-dialog/projection-dialog.component.ts b/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/components/projection-dialog/projection-dialog.component.ts index f9fc573a15..476f85c17a 100644 --- a/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/components/projection-dialog/projection-dialog.component.ts +++ b/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/components/projection-dialog/projection-dialog.component.ts @@ -28,6 +28,7 @@ import { ProjectionDialogReturnType } from '../../definitions'; export interface ProjectionDialogConfig { descriptor: ProjectionBuildDescriptor; allowReferenceProjector: boolean; + projector?: ViewProjector; } @Component({ @@ -42,6 +43,7 @@ export class ProjectionDialogComponent implements OnInit, OnDestroy { public options!: SlideOptions; public descriptor: ProjectionBuildDescriptor; public allowReferenceProjector = true; + public projectorSelectable = false; private _projectorSubscription: string; private _subscriptions: Subscription[] = []; @@ -54,6 +56,10 @@ export class ProjectionDialogComponent implements OnInit, OnDestroy { ) { this.descriptor = isProjectionBuildDescriptor(data) ? data : data.descriptor; this.allowReferenceProjector = !isProjectionBuildDescriptor(data) && data.allowReferenceProjector; + this.projectorSelectable = isProjectionBuildDescriptor(data) || !data.projector; + if (!this.projectorSelectable && !isProjectionBuildDescriptor(data)) { + this.selectedProjectors = [data.projector.id]; + } } public ngOnDestroy(): void { @@ -72,14 +78,14 @@ export class ProjectionDialogComponent implements OnInit, OnDestroy { this.projectors = projectors.filter(p => this.allowReferenceProjector || !p.isReferenceProjector); // TODO: Maybe watch. But this may not be necessary for the short living time of this dialog. - if (this.selectedProjectors === null) { + if (this.selectedProjectors === null && this.projectorSelectable) { this.selectedProjectors = this.projectorService .getProjectorsWhichAreProjecting(this.descriptor) .map(p => p.id); } // Add default projector, if the projectable is not projected on it. - if (this.descriptor?.projectionDefault) { + if (this.descriptor?.projectionDefault && this.projectorSelectable) { const defaultProjectors: ViewProjector[] = this.activeMeetingService.meeting!.default_projectors( this.descriptor.projectionDefault ); @@ -141,7 +147,8 @@ export class ProjectionDialogComponent implements OnInit, OnDestroy { action: `project`, resultDescriptor: this.descriptor, projectors: this.selectedProjectors.map(id => this.projectors.find(p => p.id === id)).filter(p => p), - options: this.optionValues + options: this.optionValues, + mode: this.projectorSelectable ? `DEFAULT` : `UPDATE_ONLY_SELECTED` }); } @@ -154,6 +161,15 @@ export class ProjectionDialogComponent implements OnInit, OnDestroy { }); } + public onHide(): void { + this.dialogRef.close({ + action: `hide`, + resultDescriptor: this.descriptor, + projectors: this.selectedProjectors.map(id => this.projectors.find(p => p.id === id)).filter(p => p), + options: this.optionValues + }); + } + public onCancel(): void { this.dialogRef.close(); } diff --git a/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/definitions.ts b/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/definitions.ts index 55323b7fe6..fe6ad1275e 100644 --- a/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/definitions.ts +++ b/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/definitions.ts @@ -2,8 +2,9 @@ import { ViewProjector } from 'src/app/site/pages/meetings/pages/projectors'; import { ProjectionBuildDescriptor } from 'src/app/site/pages/meetings/view-models'; export interface ProjectionDialogReturnType { - action: 'project' | 'addToPreview'; + action: 'project' | 'addToPreview' | 'hide'; resultDescriptor: ProjectionBuildDescriptor; projectors: ViewProjector[]; options: object | null; + mode?: 'DEFAULT' | 'UPDATE_ONLY_SELECTED'; } diff --git a/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/services/projection-dialog.service.ts b/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/services/projection-dialog.service.ts index 3f84ee4c10..967fcc2d20 100644 --- a/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/services/projection-dialog.service.ts +++ b/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/services/projection-dialog.service.ts @@ -32,12 +32,17 @@ export class ProjectionDialogService { restoreFocus: false }); const response = await firstValueFrom(dialogRef.afterClosed()); + console.log(response); if (response) { - const { action, resultDescriptor, projectors, options }: ProjectionDialogReturnType = response; + const { action, resultDescriptor, projectors, options, mode }: ProjectionDialogReturnType = response; if (action === `project`) { - await this.projectorRepo.project(resultDescriptor, projectors, options); + await this.projectorRepo.project(resultDescriptor, projectors, options, mode); } else if (action === `addToPreview`) { await this.projectorRepo.addToPreview(resultDescriptor, projectors, options); + } else if (action === `hide`) { + if (this.projectorRepo.isProjectedOn(resultDescriptor, projectors[0])) { + await this.projectorRepo.toggle(resultDescriptor, projectors, options); + } } else { throw new Error(`Unknown projector action ` + action); } diff --git a/client/src/app/site/pages/meetings/modules/meetings-component-collector/projector-button/components/projector-button/projector-button.component.ts b/client/src/app/site/pages/meetings/modules/meetings-component-collector/projector-button/components/projector-button/projector-button.component.ts index dc9451394a..a704b77378 100644 --- a/client/src/app/site/pages/meetings/modules/meetings-component-collector/projector-button/components/projector-button/projector-button.component.ts +++ b/client/src/app/site/pages/meetings/modules/meetings-component-collector/projector-button/components/projector-button/projector-button.component.ts @@ -21,6 +21,7 @@ export class ProjectorButtonComponent implements OnInit, OnDestroy { /** * The object to project. */ + private _object: ProjectionBuildDescriptor | Projectable | null = null; public get object(): ProjectionBuildDescriptor | Projectable { @@ -58,6 +59,9 @@ export class ProjectorButtonComponent implements OnInit, OnDestroy { @Input() public allowReferenceProjector = true; + @Input() + public useToggleDialog = false; + /** * If this is re-defined, it will replace the usual click functionality. */ @@ -67,7 +71,13 @@ export class ProjectorButtonComponent implements OnInit, OnDestroy { return; } const descriptor = this.projectorService.ensureDescriptor(this.object); - if (this.projector) { + if (this.useToggleDialog) { + this.projectionDialogService.openProjectDialogFor({ + descriptor, + projector: this.projector, + allowReferenceProjector: true + }); + } else if (this.projector) { this.projectorService.toggle(descriptor, [this.projector]); } else { // open the projection dialog diff --git a/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/current-speaker-chyron-slide/components/current-speaker-chyron-slide.component.html b/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/current-speaker-chyron-slide/components/current-speaker-chyron-slide.component.html index 8b093ef5a3..21d4b109aa 100644 --- a/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/current-speaker-chyron-slide/components/current-speaker-chyron-slide.component.html +++ b/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/current-speaker-chyron-slide/components/current-speaker-chyron-slide.component.html @@ -1,13 +1,29 @@
- -
{{ data.data.current_speaker_name }}
-
{{ data.data.current_speaker_level }}
-
+
+ + {{ data.data.title_information?.agenda_item_number }} + {{ !!data.data.title_information?.agenda_item_number ? '·' : '' }} + {{ data.data.title_information?.number }} + {{ !!data.data.title_information?.number ? '·' : '' }} + {{ data.data.title_information?.title }} + +
+ +
+ +
{{ data.data.current_speaker_name }}
+
{{ data.data.current_speaker_level }}
+
+ + + +
diff --git a/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/current-speaker-chyron-slide/components/current-speaker-chyron-slide.component.scss b/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/current-speaker-chyron-slide/components/current-speaker-chyron-slide.component.scss index b6dc8989d4..7eb7938bdf 100644 --- a/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/current-speaker-chyron-slide/components/current-speaker-chyron-slide.component.scss +++ b/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/current-speaker-chyron-slide/components/current-speaker-chyron-slide.component.scss @@ -1,33 +1,60 @@ @import 'src/assets/styles/fonts.scss'; -#chyron { +#chyron, +#chyron_new { position: absolute; left: 50px; bottom: 20px; - right: 0; + right: 50px; z-index: 10; - height: 80px; - font-size: 32px; +} + +#chyron_agenda_item, +#chyron_speaker { text-align: left; - line-height: 1; + line-height: 1.25; opacity: 1; - #inner { + .inner { + background-color: var(--chyron-background-color); + color: var(--chyron-font-color); + display: inline-block; + vertical-align: middle; padding-left: 18px; - padding-right: 20px; + padding-right: 18px; padding-top: 10px; padding-bottom: 10px; - height: 60px; + height: 40px; display: table-cell; + } +} - #inner-name { +#chyron_agenda_item { + font-size: 24px; + .inner { + background-color: var(--chyron-background-color-2); + color: var(--chyron-font-color-2); + } + margin-bottom: -1px; +} + +#chyron_speaker { + font-size: 32px; + .inner { + .name { font-family: customChyronNameFont, $font-chyronname; } - #inner-level { + .level { margin-top: 5px; font-size: 70%; } } } + +#chyron_new { + #chyron_speaker { + min-height: 80px; + } +} diff --git a/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/current-speaker-chyron-slide/components/current-speaker-chyron-slide.component.ts b/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/current-speaker-chyron-slide/components/current-speaker-chyron-slide.component.ts index 2392421d0c..09aba3ea41 100644 --- a/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/current-speaker-chyron-slide/components/current-speaker-chyron-slide.component.ts +++ b/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/current-speaker-chyron-slide/components/current-speaker-chyron-slide.component.ts @@ -8,4 +8,12 @@ import { CurrentSpeakerChyronSlideData } from '../current-speaker-chyron-slide-d templateUrl: `./current-speaker-chyron-slide.component.html`, styleUrls: [`./current-speaker-chyron-slide.component.scss`] }) -export class CurrentSpeakerChyronSlideComponent extends BaseSlideComponent {} +export class CurrentSpeakerChyronSlideComponent extends BaseSlideComponent { + public getSpeaker(): string[] { + const parts: string[] = [this.data.data.current_speaker_name]; + if (!!this.data.data.current_speaker_level) { + parts.push(this.data.data.current_speaker_level); + } + return parts; + } +} diff --git a/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/current-speaker-chyron-slide/current-speaker-chyron-slide-data.ts b/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/current-speaker-chyron-slide/current-speaker-chyron-slide-data.ts index abcaeb68d2..9af6dc2836 100644 --- a/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/current-speaker-chyron-slide/current-speaker-chyron-slide-data.ts +++ b/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/current-speaker-chyron-slide/current-speaker-chyron-slide-data.ts @@ -3,4 +3,7 @@ export interface CurrentSpeakerChyronSlideData { current_speaker_level?: string; background_color: string; font_color: string; + background_color_2: string; + font_color_2: string; + title_information?: any; } diff --git a/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/current-speaker-chyron-slide/current-speaker-chyron-slide.module.ts b/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/current-speaker-chyron-slide/current-speaker-chyron-slide.module.ts index 95306ce9a9..c6bbdc7cf9 100644 --- a/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/current-speaker-chyron-slide/current-speaker-chyron-slide.module.ts +++ b/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/current-speaker-chyron-slide/current-speaker-chyron-slide.module.ts @@ -1,11 +1,12 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; +import { CommaSeparatedListingModule } from '../../../../../../../../../ui/modules/comma-separated-listing/comma-separated-listing.module'; import { SlideToken } from '../../definitions'; import { CurrentSpeakerChyronSlideComponent } from './components/current-speaker-chyron-slide.component'; @NgModule({ - imports: [CommonModule], declarations: [CurrentSpeakerChyronSlideComponent], - providers: [{ provide: SlideToken.token, useValue: CurrentSpeakerChyronSlideComponent }] + providers: [{ provide: SlideToken.token, useValue: CurrentSpeakerChyronSlideComponent }], + imports: [CommonModule, CommaSeparatedListingModule] }) export class CurrentSpeakerChyronSlideModule {} diff --git a/client/src/app/site/pages/meetings/pages/projectors/components/projector-edit-dialog/components/projector-edit-dialog/projector-edit-dialog.component.html b/client/src/app/site/pages/meetings/pages/projectors/components/projector-edit-dialog/components/projector-edit-dialog/projector-edit-dialog.component.html index 5fd349ab86..4b91f4bb55 100644 --- a/client/src/app/site/pages/meetings/pages/projectors/components/projector-edit-dialog/components/projector-edit-dialog/projector-edit-dialog.component.html +++ b/client/src/app/site/pages/meetings/pages/projectors/components/projector-edit-dialog/components/projector-edit-dialog/projector-edit-dialog.component.html @@ -138,9 +138,9 @@

{{ 'Projection defaults' | translate }}

diff --git a/client/src/app/site/pages/meetings/pages/projectors/components/projector-edit-dialog/components/projector-edit-dialog/projector-edit-dialog.component.ts b/client/src/app/site/pages/meetings/pages/projectors/components/projector-edit-dialog/components/projector-edit-dialog/projector-edit-dialog.component.ts index d192eac0a2..dbc4258507 100644 --- a/client/src/app/site/pages/meetings/pages/projectors/components/projector-edit-dialog/components/projector-edit-dialog/projector-edit-dialog.component.ts +++ b/client/src/app/site/pages/meetings/pages/projectors/components/projector-edit-dialog/components/projector-edit-dialog/projector-edit-dialog.component.ts @@ -100,15 +100,17 @@ export class ProjectorEditDialogComponent extends BaseUiComponent implements OnI */ public readonly projectiondefaultKeys = PROJECTIONDEFAULT; - public readonly colorFields = { - color: _(`Foreground color`), - background_color: _(`Background color`), - header_background_color: _(`Header background color`), - header_font_color: _(`Header font color`), - header_h1_color: _(`Headline color`), - chyron_background_color: _(`Chyron background color`), - chyron_font_color: _(`Chyron font color`) - }; + public readonly colorFields = [ + [`background_color`, _(`Background color`)], + [`color`, _(`Foreground color`)], + [`header_background_color`, _(`Header background color`)], + [`header_font_color`, _(`Header font color`)], + [`header_h1_color`, _(`Headline color`)], + [`chyron_background_color`, _(`Chyron background color`)], + [`chyron_font_color`, _(`Chyron font color`)], + [`chyron_background_color_2`, _(`Chyron second background color`)], + [`chyron_font_color_2`, _(`Chyron second font color`)] + ]; private get _aspectRatioControl(): AbstractControl { return this.updateForm.get(ASPECT_RATIO_FORM_KEY)!; @@ -150,6 +152,8 @@ export class ProjectorEditDialogComponent extends BaseUiComponent implements OnI header_h1_color: [``, Validators.required], chyron_background_color: [``, Validators.required], chyron_font_color: [``, Validators.required], + chyron_background_color_2: [``, Validators.required], + chyron_font_color_2: [``, Validators.required], show_header_footer: [], show_title: [], show_logo: [], diff --git a/client/src/app/site/pages/meetings/pages/projectors/modules/projector-detail/components/projector-detail/projector-detail.component.html b/client/src/app/site/pages/meetings/pages/projectors/modules/projector-detail/components/projector-detail/projector-detail.component.html index 42fcaf6dc1..c21b267685 100644 --- a/client/src/app/site/pages/meetings/pages/projectors/modules/projector-detail/components/projector-detail/projector-detail.component.html +++ b/client/src/app/site/pages/meetings/pages/projectors/modules/projector-detail/components/projector-detail/projector-detail.component.html @@ -385,6 +385,7 @@

{{ projector.name }}

{{ 'Chyron – current contribution' | translate }} diff --git a/client/src/app/site/pages/meetings/pages/projectors/modules/projector-detail/services/current-speaker-chyron-slide.service/current-speaker-chyron-slide.service.ts b/client/src/app/site/pages/meetings/pages/projectors/modules/projector-detail/services/current-speaker-chyron-slide.service/current-speaker-chyron-slide.service.ts index ac179e2d1d..29c3c8b7f1 100644 --- a/client/src/app/site/pages/meetings/pages/projectors/modules/projector-detail/services/current-speaker-chyron-slide.service/current-speaker-chyron-slide.service.ts +++ b/client/src/app/site/pages/meetings/pages/projectors/modules/projector-detail/services/current-speaker-chyron-slide.service/current-speaker-chyron-slide.service.ts @@ -1,4 +1,5 @@ import { Injectable } from '@angular/core'; +import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; import { PROJECTIONDEFAULT } from 'src/app/domain/models/projector/projection-default'; import { MeetingProjectionType } from 'src/app/gateways/repositories/meeting-repository.service'; import { ViewProjector } from 'src/app/site/pages/meetings/pages/projectors'; @@ -28,7 +29,20 @@ export class CurrentSpeakerChyronSlideService { type: MeetingProjectionType.CurrentSpeakerChyron, projectionDefault: PROJECTIONDEFAULT.currentListOfSpeakers, stable: true, - getDialogTitle: () => `Current speaker chyron` + getDialogTitle: () => `Current speaker chyron`, + slideOptions: [ + { + key: `chyron_type`, + displayName: _(`Chyron Type`), + choices: [ + { value: `old`, displayName: _(`Old Chyron`) }, + { value: `new`, displayName: _(`New Chyron`) }, + { value: `none`, displayName: _(`None`) } + ], + default: `old` + }, + { key: `agenda_item`, displayName: _(`Show Agenda Item`), default: false } + ] }; } diff --git a/client/src/app/site/pages/meetings/pages/projectors/services/projector-controller.service.ts b/client/src/app/site/pages/meetings/pages/projectors/services/projector-controller.service.ts index c6a101ea59..c1ba2ddee3 100644 --- a/client/src/app/site/pages/meetings/pages/projectors/services/projector-controller.service.ts +++ b/client/src/app/site/pages/meetings/pages/projectors/services/projector-controller.service.ts @@ -78,9 +78,10 @@ export class ProjectorControllerService extends BaseMeetingControllerService { - return this.repo.project(descriptor, projectors, options); + return this.repo.project(descriptor, projectors, options, mode); } public addToPreview( From 687cee1d58ab6e242b5b17094366ae9e3b62f6e6 Mon Sep 17 00:00:00 2001 From: "openslides-automation[bot]" <125256978+openslides-automation[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 10:54:49 +0000 Subject: [PATCH 3/4] Update meta repository (#3733) --- client/src/meta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/meta b/client/src/meta index 02a18f7498..cd9ea6b837 160000 --- a/client/src/meta +++ b/client/src/meta @@ -1 +1 @@ -Subproject commit 02a18f7498799948c352cd5aaa9f109d60f5f87e +Subproject commit cd9ea6b83752b6739aafc7a3464e5d8823c4b170 From 10373e1b573819596be5e8d86499c81bbdb326ca Mon Sep 17 00:00:00 2001 From: Bastian Rihm Date: Wed, 5 Jun 2024 16:24:15 +0200 Subject: [PATCH 4/4] Update backend attribute (#3744) --- .../repositories/projectors/projector-repository.service.ts | 6 +++--- .../projection-dialog/projection-dialog.component.ts | 2 +- .../projection-dialog/definitions.ts | 2 +- .../projection-dialog/services/projection-dialog.service.ts | 5 +++-- .../projectors/services/projector-controller.service.ts | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/client/src/app/gateways/repositories/projectors/projector-repository.service.ts b/client/src/app/gateways/repositories/projectors/projector-repository.service.ts index f903f9ecf8..8273b25787 100644 --- a/client/src/app/gateways/repositories/projectors/projector-repository.service.ts +++ b/client/src/app/gateways/repositories/projectors/projector-repository.service.ts @@ -140,11 +140,11 @@ export class ProjectorRepositoryService extends BaseMeetingRelatedRepository { const payload = this.createProjectPayload(descriptor, projectors, options); - if (mode) { - payload.mode = mode; + if (keepActiveProjections) { + payload.keep_active_projections = keepActiveProjections; } return await this.sendActionToBackend(ProjectorAction.PROJECT, payload); diff --git a/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/components/projection-dialog/projection-dialog.component.ts b/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/components/projection-dialog/projection-dialog.component.ts index 476f85c17a..caed04d17d 100644 --- a/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/components/projection-dialog/projection-dialog.component.ts +++ b/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/components/projection-dialog/projection-dialog.component.ts @@ -148,7 +148,7 @@ export class ProjectionDialogComponent implements OnInit, OnDestroy { resultDescriptor: this.descriptor, projectors: this.selectedProjectors.map(id => this.projectors.find(p => p.id === id)).filter(p => p), options: this.optionValues, - mode: this.projectorSelectable ? `DEFAULT` : `UPDATE_ONLY_SELECTED` + keepActiveProjections: !this.projectorSelectable }); } diff --git a/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/definitions.ts b/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/definitions.ts index fe6ad1275e..a3e837171b 100644 --- a/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/definitions.ts +++ b/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/definitions.ts @@ -6,5 +6,5 @@ export interface ProjectionDialogReturnType { resultDescriptor: ProjectionBuildDescriptor; projectors: ViewProjector[]; options: object | null; - mode?: 'DEFAULT' | 'UPDATE_ONLY_SELECTED'; + keepActiveProjections?: boolean; } diff --git a/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/services/projection-dialog.service.ts b/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/services/projection-dialog.service.ts index 967fcc2d20..68a6bf27b2 100644 --- a/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/services/projection-dialog.service.ts +++ b/client/src/app/site/pages/meetings/modules/meetings-component-collector/projection-dialog/services/projection-dialog.service.ts @@ -34,9 +34,10 @@ export class ProjectionDialogService { const response = await firstValueFrom(dialogRef.afterClosed()); console.log(response); if (response) { - const { action, resultDescriptor, projectors, options, mode }: ProjectionDialogReturnType = response; + const { action, resultDescriptor, projectors, options, keepActiveProjections }: ProjectionDialogReturnType = + response; if (action === `project`) { - await this.projectorRepo.project(resultDescriptor, projectors, options, mode); + await this.projectorRepo.project(resultDescriptor, projectors, options, keepActiveProjections); } else if (action === `addToPreview`) { await this.projectorRepo.addToPreview(resultDescriptor, projectors, options); } else if (action === `hide`) { diff --git a/client/src/app/site/pages/meetings/pages/projectors/services/projector-controller.service.ts b/client/src/app/site/pages/meetings/pages/projectors/services/projector-controller.service.ts index c1ba2ddee3..3bde9c71a9 100644 --- a/client/src/app/site/pages/meetings/pages/projectors/services/projector-controller.service.ts +++ b/client/src/app/site/pages/meetings/pages/projectors/services/projector-controller.service.ts @@ -79,9 +79,9 @@ export class ProjectorControllerService extends BaseMeetingControllerService { - return this.repo.project(descriptor, projectors, options, mode); + return this.repo.project(descriptor, projectors, options, keepActiveProjections); } public addToPreview(