Skip to content

Commit

Permalink
Merge branch 'main' into fix-speaking-times-widget
Browse files Browse the repository at this point in the history
  • Loading branch information
Elblinator authored Nov 18, 2024
2 parents a320eac + 05b33aa commit fc62aba
Show file tree
Hide file tree
Showing 54 changed files with 909 additions and 605 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20.18 as build
FROM node:22.11 as build
ENV NODE_VERSION=20.14.0

WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20.18-alpine
FROM node:22.11-alpine
ENV NODE_VERSION=20.14.0

RUN apk add --no-cache git
Expand Down
934 changes: 481 additions & 453 deletions client/package-lock.json

Large diffs are not rendered by default.

84 changes: 42 additions & 42 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,44 +36,44 @@
"get-available-languages": "npm run ts -- cli/get-available-languages.ts"
},
"dependencies": {
"@angular/animations": "^18.2.8",
"@angular/cdk": "^18.2.8",
"@angular/common": "^18.2.8",
"@angular/compiler": "^18.2.8",
"@angular/core": "^18.2.8",
"@angular/forms": "^18.2.8",
"@angular/material": "^18.2.8",
"@angular/material-date-fns-adapter": "^18.2.8",
"@angular/platform-browser": "^18.2.8",
"@angular/platform-browser-dynamic": "^18.2.8",
"@angular/router": "^18.2.8",
"@angular/service-worker": "^18.2.8",
"@angular/animations": "^18.2.11",
"@angular/cdk": "^18.2.12",
"@angular/common": "^18.2.11",
"@angular/compiler": "^18.2.11",
"@angular/core": "^18.2.11",
"@angular/forms": "^18.2.11",
"@angular/material": "^18.2.12",
"@angular/material-date-fns-adapter": "^18.2.12",
"@angular/platform-browser": "^18.2.11",
"@angular/platform-browser-dynamic": "^18.2.11",
"@angular/router": "^18.2.11",
"@angular/service-worker": "^18.2.11",
"@material/typography": "^14.0.0",
"@ngx-pwa/local-storage": "^18.0.0",
"@ngx-translate/core": "^15.0.0",
"@ngx-translate/http-loader": "^8.0.0",
"@tiptap/core": "^2.8.0",
"@tiptap/extension-color": "^2.8.0",
"@tiptap/extension-highlight": "^2.8.0",
"@tiptap/extension-image": "^2.8.0",
"@tiptap/extension-link": "^2.8.0",
"@tiptap/extension-subscript": "^2.8.0",
"@tiptap/extension-superscript": "^2.8.0",
"@tiptap/extension-table": "^2.8.0",
"@tiptap/extension-table-cell": "^2.8.0",
"@tiptap/extension-table-header": "^2.8.0",
"@tiptap/extension-table-row": "^2.8.0",
"@tiptap/extension-text-align": "^2.8.0",
"@tiptap/extension-text-style": "^2.8.0",
"@tiptap/extension-underline": "^2.8.0",
"@tiptap/pm": "^2.8.0",
"@tiptap/starter-kit": "^2.8.0",
"@tiptap/core": "^2.9.1",
"@tiptap/extension-color": "^2.9.1",
"@tiptap/extension-highlight": "^2.9.1",
"@tiptap/extension-image": "^2.9.1",
"@tiptap/extension-link": "^2.9.1",
"@tiptap/extension-subscript": "^2.9.1",
"@tiptap/extension-superscript": "^2.9.1",
"@tiptap/extension-table": "^2.9.1",
"@tiptap/extension-table-cell": "^2.9.1",
"@tiptap/extension-table-header": "^2.9.1",
"@tiptap/extension-table-row": "^2.9.1",
"@tiptap/extension-text-align": "^2.9.1",
"@tiptap/extension-text-style": "^2.9.1",
"@tiptap/extension-underline": "^2.9.1",
"@tiptap/pm": "^2.9.1",
"@tiptap/starter-kit": "^2.9.1",
"@tsparticles/angular": "^3.0.0",
"@tsparticles/engine": "^3.5.0",
"@tsparticles/plugin-emitters": "^3.5.0",
"@tsparticles/shape-text": "^3.5.0",
"@tsparticles/slim": "^3.5.0",
"chart.js": "^4.4.4",
"chart.js": "^4.4.6",
"cm-chess": "^3.5.1",
"cm-chessboard": "^8.7.4",
"date-fns": "^3.6.0",
Expand All @@ -83,36 +83,36 @@
"jszip": "^3.10.1",
"material-design-icons-iconfont": "^6.7.0",
"ng2-charts": "^6.0.1",
"ng2-pdf-viewer": "^10.3.3",
"ng2-pdf-viewer": "^10.3.4",
"ngx-cookie-service": "^18.0.0",
"ngx-date-fns": "^11.0.0",
"ngx-device-detector": "^8.0.0",
"ngx-file-drop": "^16.0.0",
"ngx-material-timepicker": "^13.1.1",
"ngx-papaparse": "^8.0.0",
"pdfjs-dist": "^4.6.82",
"pdfmake": "^0.2.14",
"pdfmake": "^0.2.15",
"pofile": "^1.1.4",
"qrcode": "^1.5.4",
"rxjs": "^7.8.1",
"tinycolor2": "1.6.0",
"video.js": "^8.18.1",
"video.js": "^8.19.1",
"zone.js": "^0.14.10"
},
"devDependencies": {
"@angular-devkit/build-angular": "^18.2.8",
"@angular-eslint/builder": "^18.3.1",
"@angular-eslint/eslint-plugin": "^18.3.1",
"@angular-eslint/eslint-plugin-template": "^18.3.1",
"@angular-eslint/schematics": "^18.3.1",
"@angular-eslint/template-parser": "^18.3.1",
"@angular/cli": "^18.2.8",
"@angular/compiler-cli": "^18.2.8",
"@colsen1991/ngx-translate-extract-marker": "^2.0.8",
"@angular-devkit/build-angular": "^18.2.11",
"@angular-eslint/builder": "^18.4.0",
"@angular-eslint/eslint-plugin": "^18.4.0",
"@angular-eslint/eslint-plugin-template": "^18.4.0",
"@angular-eslint/schematics": "^18.4.0",
"@angular-eslint/template-parser": "^18.4.0",
"@angular/cli": "^18.2.11",
"@angular/compiler-cli": "^18.2.11",
"@colsen1991/ngx-translate-extract-marker": "^3.0.1",
"@types/file-saver": "^2.0.7",
"@types/jasmine": "~5.1.4",
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.16.11",
"@types/node": "^20.17.6",
"@types/pdfmake": "^0.2.9",
"@types/qrcode": "^1.5.5",
"@types/tinycolor2": "^1.4.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { Fieldsets } from 'src/app/site/services/model-request-builder';
import { TypedFieldset } from '../../../site/services/model-request-builder/model-request-builder.service';
import { BaseRepository } from '../base-repository';
import { MeetingMediafileRepositoryService } from '../meeting-mediafile/meeting-mediafile-repository.service';
import { ProjectionRepositoryService } from '../projections/projection-repository.service';
import { RepositoryServiceCollectorService } from '../repository-service-collector.service';
import { MediafileAction } from './mediafile.action';

Expand All @@ -26,7 +25,6 @@ export class MediafileRepositoryService extends BaseRepository<ViewMediafile, Me
public constructor(
repositoryServiceCollector: RepositoryServiceCollectorService,
private activeMeetingService: ActiveMeetingService,
private projectionRepo: ProjectionRepositoryService,
private meetingMediaRepo: MeetingMediafileRepositoryService
) {
super(repositoryServiceCollector, Mediafile);
Expand Down Expand Up @@ -146,8 +144,6 @@ export class MediafileRepositoryService extends BaseRepository<ViewMediafile, Me
const viewModel = super.createViewModel(model);
viewModel.getEnsuredActiveMeetingId = (): number => this.activeMeetingId;
viewModel.getEnsuredActiveMeeting = (): ViewMeeting => this.activeMeetingService.meeting;
viewModel.getProjectedContentObjects = (): string[] =>
this.projectionRepo.getViewModelList().map(p => p.content_object_id);
viewModel.getMeetingMediafile = (): ViewMeetingMediafile => this.getMeetingMediafile(model);
return viewModel;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { ViewMeetingMediafile } from 'src/app/site/pages/meetings/pages/mediafil

import { ActiveMeetingIdService } from '../../../site/pages/meetings/services/active-meeting-id.service';
import { BaseRepository } from '../base-repository';
import { ProjectionRepositoryService } from '../projections/projection-repository.service';
import { RepositoryServiceCollectorService } from '../repository-service-collector.service';

@Injectable({
Expand All @@ -16,8 +15,7 @@ export class MeetingMediafileRepositoryService extends BaseRepository<ViewMeetin

public constructor(
repositoryServiceCollector: RepositoryServiceCollectorService,
private activeMeetingIdService: ActiveMeetingIdService,
private projectionRepo: ProjectionRepositoryService
private activeMeetingIdService: ActiveMeetingIdService
) {
super(repositoryServiceCollector, MeetingMediafile);

Expand Down Expand Up @@ -66,8 +64,6 @@ export class MeetingMediafileRepositoryService extends BaseRepository<ViewMeetin
protected override createViewModel(model: MeetingMediafile): ViewMeetingMediafile {
const viewModel = super.createViewModel(model);
viewModel.getEnsuredActiveMeetingId = (): number => this.activeMeetingIdService.meetingId;
viewModel.getProjectedContentObjects = (): string[] =>
this.projectionRepo.getViewModelList().map(p => p.content_object_id);
return viewModel;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@ export class UserRepositoryService extends BaseRepository<ViewUser, User> {
viewModel.getEnsuredActiveMeetingId = (): Id => this.activeMeetingIdService.meetingId;
viewModel.getDelegationSettingEnabled = (): boolean =>
this.meetingSettingsService.instant(`users_enable_vote_delegations`);
viewModel.isSelfVotingAllowedDespiteDelegation = (): boolean =>
!this.meetingSettingsService.instant(`users_enable_vote_delegations`) ||
!this.meetingSettingsService.instant(`users_forbid_delegator_to_vote`);
return viewModel;
}

Expand Down
1 change: 1 addition & 0 deletions client/src/app/site/base/base-view-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export interface BaseViewModel extends Displayable, Identifiable, HasCollection
getTitle: () => string;
getListTitle: () => string;
getDelegationSettingEnabled: () => boolean;
isSelfVotingAllowedDespiteDelegation: () => boolean;

/**
* Returns the verbose name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@
<div class="search-results-entry divider-bottom">
<div class="breadcrumb">
@if (result.committee) {
<span>{{ result.committee.name }}</span>
<span>{{ removeMark(result.committee.name) }}</span>
<span class="sep">&gt;</span>
}
@if (currentFilters.value.meetingFilter === 'all' && result.meeting) {
<span>{{ result.meeting.name }}</span>
<span>{{ removeMark(result.meeting.name) }}</span>
<span class="sep">&gt;</span>
}
@if (currentFilters.value.meetingFilter === 'all' && result.collection === 'user') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,13 @@ export class GlobalSearchComponent implements OnDestroy {
return resultText;
}

/**
* helper to remove <mark> and </mark> from the text
*/
public removeMark(text: string): string {
return text.replace(/<\/mark>/g, ``).replace(/<mark>/g, ``);
}

private getPermissionByFilter(filter: string): Permission {
if (filter === `topic`) {
return Permission.agendaItemCanSee;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
@if (poll && isReady) {
<!-- own voting -->
<ng-container [ngTemplateOutlet]="votingArea"></ng-container>
@if (isUserPresent) {
<ng-container [ngTemplateOutlet]="votingArea"></ng-container>
} @else {
<div class="text-center">
{{ 'You have to be present to vote.' | translate }}
</div>
}
<!-- Delegations -->
@if (isUserPresent && (voteDelegationEnabled | async)) {
@for (delegation of delegations; track delegation.id) {
Expand Down Expand Up @@ -202,7 +208,7 @@ <h4 class="poll-delegation-title">
</div>
}
@if (!settings.isSplitSingleOption && option.isListOption) {
<div class="vote-option-title" id="name">
<div class="vote-option-title grid-name-area">
@if (option.content_object) {
<span>
<span>{{ option.content_object.getTitle() | translate }}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
@if (projector!.show_clock) {
<os-projector-clock [color]="projector!.header_font_color"></os-projector-clock>
}
@for (slide of slides | async; track slide) {
@for (slide of slides | async; track slide.id) {
<div>
<os-slide-container
[projector]="projector!"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
mergeMap,
Observable
} from 'rxjs';
import { UnsafeHtml } from 'src/app/domain/definitions/key-types';
import { Id, UnsafeHtml } from 'src/app/domain/definitions/key-types';
import { ViewProjector } from 'src/app/site/pages/meetings/pages/projectors';
import { MediaManageService } from 'src/app/site/pages/meetings/services/media-manage.service';
import { MeetingSettingsService } from 'src/app/site/pages/meetings/services/meeting-settings.service';
Expand Down Expand Up @@ -101,7 +101,9 @@ export class ProjectorComponent extends BaseUiComponent implements OnDestroy {
/**
* All slides to show on this projector
*/
public slides: Observable<SlideData<object>[]> = new Observable<SlideData<object>[]>();
public slides: Observable<(SlideData<object> & { id: Id })[]> = new Observable<
(SlideData<object> & { id: Id })[]
>();

/**
* Info about if the user is offline.
Expand Down Expand Up @@ -160,13 +162,14 @@ export class ProjectorComponent extends BaseUiComponent implements OnDestroy {
(projector?.current_projections || []).map(
projection =>
({
id: projection.id,
collection: projection.content?.collection,
data: projection.content,
stable: !!projection.stable,
type: projection.type || ``,
options: projection.options || {},
...(!!projection.content?.[`error`] && { error: projection.content[`error`] })
}) as SlideData
}) as SlideData & { id: Id }
)
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ export const listOfSpeakersSpeakerCountSubscription = {
follow: [
{
idField: `speaker_ids`,
fieldset: [`begin_time`, `end_time`],
follow: [
{
idField: `point_of_order_category_id`,
fieldset: FULL_FIELDSET
}
],
fieldset: [`begin_time`, `end_time`]
]
}
]
};
Expand All @@ -151,11 +151,11 @@ export const getListOfSpeakersDetailSubscriptionConfig: SubscriptionConfigGenera
follow: [
{
idField: `meeting_user_id`,
fieldset: [`number`, `vote_weight`],
follow: [
{ idField: `user_id`, ...UserFieldsets.FullNameSubscription },
{ idField: `structure_level_ids`, fieldset: [`name`] }
],
fieldset: [`number`, `vote_weight`]
]
},
{
idField: `structure_level_list_of_speakers_id`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
max-width: 1000px;
max-height: calc(100vh - 160px); // 160px is almost the summary of top bar and livestream header
height: 95%;
margin-bottom: 350px !important;

&.fit-height {
height: fit-content;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const getMediafilesListMinimalSubscriptionConfig: SubscriptionConfigGener
modelRequest: {
viewModelCtor: ViewMeeting,
ids: [id],
follow: [`mediafile_ids`, `meeting_mediafile_ids`]
follow: [{ idField: `mediafile_ids` }, { idField: `meeting_mediafile_ids` }]
},
subscriptionName: MEDIAFILES_LIST_MINIMAL_SUBSCRIPTION
});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Fqid, Id } from 'src/app/domain/definitions/key-types';
import { Id } from 'src/app/domain/definitions/key-types';
import { HasProperties } from 'src/app/domain/interfaces/has-properties';
import { ViewMediafileMeetingUsageKey } from 'src/app/domain/models/mediafiles/mediafile.constants';
import { Meeting } from 'src/app/domain/models/meetings/meeting';
Expand Down Expand Up @@ -74,7 +74,6 @@ export class ViewMediafile extends BaseProjectableViewModel<Mediafile> {
*/
public getEnsuredActiveMeetingId!: () => Id;
public getEnsuredActiveMeeting!: () => ViewMeeting;
public getProjectedContentObjects!: () => Fqid[];
public getMeetingMediafile!: (meetingId?: Id) => ViewMeetingMediafile;

public override canAccess(): boolean {
Expand All @@ -87,11 +86,7 @@ export class ViewMediafile extends BaseProjectableViewModel<Mediafile> {
}

return !this.getEnsuredActiveMeetingId();
} else if (
this.meeting_mediafiles.some(
mm => this.getProjectedContentObjects().indexOf(`meeting_mediafile/${mm.id}`) !== -1
)
) {
} else if (this.meeting_mediafiles.some(mm => !!mm.projection_ids?.length)) {
return true;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Fqid, Id } from 'src/app/domain/definitions/key-types';
import { Id } from 'src/app/domain/definitions/key-types';
import { HasProperties } from 'src/app/domain/interfaces/has-properties';
import { ViewMediafileMeetingUsageKey } from 'src/app/domain/models/mediafiles/mediafile.constants';
import { PROJECTIONDEFAULT, ProjectiondefaultValue } from 'src/app/domain/models/projector/projection-default';
Expand Down Expand Up @@ -42,7 +42,6 @@ export class ViewMeetingMediafile extends BaseProjectableViewModel<MeetingMediaf
* @returns The id of the currently active meeting
*/
public getEnsuredActiveMeetingId!: () => Id;
public getProjectedContentObjects!: () => Fqid[];

public override canAccess(): boolean {
return this.getEnsuredActiveMeetingId() === this.meeting_id || !this.getEnsuredActiveMeetingId();
Expand Down
Loading

0 comments on commit fc62aba

Please sign in to comment.