Skip to content

Commit

Permalink
Merge main into stable/4.0.x. Update 20231114
Browse files Browse the repository at this point in the history
* commit 'a0229e7976ccebb74351c9659f6e28759ac14866':
  Synchronize commitUpdate (#3012)
  Updated all translations (#3005)
  • Loading branch information
m-schieder committed Nov 14, 2023
2 parents d9449f3 + a0229e7 commit d63f24b
Show file tree
Hide file tree
Showing 15 changed files with 8,380 additions and 474 deletions.
1 change: 1 addition & 0 deletions client/src/app/domain/definitions/languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export const availableTranslations = {
en: `English`,
de: `Deutsch`,
cs: `Čeština`,
fr: `Français`,
it: `Italiano`,
es: `Español`,
ru: `русский`
Expand Down
26 changes: 13 additions & 13 deletions client/src/app/domain/definitions/permission.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ export const PERMISSIONS: AppPermission[] = [
{
name: `Projector`,
permissions: [
{
display_name: _(`Can see the autopilot`),
help_text: _(
`Can see the Autopilot menu item with all content for which appropriate permissions are set.`
),
value: Permission.meetingCanSeeAutopilot
},
{
display_name: _(`Can see the projector`),
help_text: _(
Expand Down Expand Up @@ -214,23 +221,23 @@ Meeting specific information: Structure level, Group, Participant number, About
name: `Files`,
permissions: [
{
display_name: _(`Can see the list of files`),
display_name: _(`Can see files`),
help_text: _(`Can see the Files menu item and all shared folders and files.
Note: Sharing of folders and files may be restricted by group assignment.`),
value: Permission.mediafileCanSee
},
{
display_name: _(`Can manage logos and fonts`),
help_text: _(`Can activate and deactivate logos and fonts under > [Files].`),
value: Permission.meetingCanManageLogosAndFonts
},
{
display_name: _(`Can manage files`),
help_text: _(
`Can upload, modify and delete files, administrate folders and change access restrictions.`
),
value: Permission.mediafileCanManage
},
{
display_name: _(`Can manage logos and fonts`),
help_text: _(`Can activate and deactivate logos and fonts under > [Files].`),
value: Permission.meetingCanManageLogosAndFonts
}
]
},
Expand All @@ -242,13 +249,6 @@ Note: Sharing of folders and files may be restricted by group assignment.`),
help_text: _(`Can see the Home menu item.`),
value: Permission.meetingCanSeeFrontpage
},
{
display_name: _(`Can see the autopilot`),
help_text: _(
`Can see the Autopilot menu item with all content for which appropriate permissions are set.`
),
value: Permission.meetingCanSeeAutopilot
},
{
display_name: _(`Can see the live stream`),
help_text: _(
Expand Down
15 changes: 13 additions & 2 deletions client/src/app/gateways/repositories/base-repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { auditTime, BehaviorSubject, filter, Observable, Subject, Subscription }
import { HasSequentialNumber, Identifiable } from 'src/app/domain/interfaces';
import { OnAfterAppsLoaded } from 'src/app/infrastructure/definitions/hooks/after-apps-loaded';
import { ListUpdateData } from 'src/app/infrastructure/utils';
import { Deferred } from 'src/app/infrastructure/utils/promises';
import { OsSortProperty } from 'src/app/site/base/base-sort.service';
import { SortListService } from 'src/app/ui/modules/list';

Expand Down Expand Up @@ -40,6 +41,7 @@ enum PipelineActionType {
interface UpdatePipelineAction {
funct: () => Promise<void>;
type: PipelineActionType;
defer?: Deferred;
key?: string;
}

Expand Down Expand Up @@ -319,7 +321,8 @@ export abstract class BaseRepository<V extends BaseViewModel, M extends BaseMode
*
* @param ids All model ids.
*/
public changedModels(ids: Id[], changedModels: BaseModel<M>[]): void {
public changedModels(ids: Id[], changedModels: BaseModel<M>[]): Promise<void> {
const defer = new Deferred();
this.pushToPipeline({
funct: async () => {
const newViewModels: V[] = [];
Expand All @@ -344,9 +347,11 @@ export abstract class BaseRepository<V extends BaseViewModel, M extends BaseMode
await this.initChangeBasedResorting(newModels, updatedModels, newViewModels, updatedViewModels);
}
},
type: PipelineActionType.General
type: PipelineActionType.General,
defer
});
this.activatePipeline();
return defer;
}

/**
Expand Down Expand Up @@ -565,11 +570,17 @@ export abstract class BaseRepository<V extends BaseViewModel, M extends BaseMode
this.updateActionPipeline[priority][index].key ===
this.updateActionPipeline[priority][i].key)
) {
if (this.updateActionPipeline[priority][i].defer) {
this.updateActionPipeline[priority][i].defer.resolve();
}
this.updateActionPipeline[priority].splice(i, 1);
}
}
}
}
if (this.updateActionPipeline[priority][index].defer) {
this.updateActionPipeline[priority][index].defer.resolve();
}
this.updateActionPipeline[priority].splice(index, 1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class ResetPasswordComponent extends BaseComponent implements OnInit {
await this.userRepo.forgetPassword(this.resetPasswordForm.get(`email`)!.value);
this._isWaiting = false;
this.matSnackBar.open(
this.translate.instant(`An email with a password reset link has been sent`),
this.translate.instant(`An email with a password reset link has been sent.`),
this.translate.instant(`OK`),
{
duration: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,15 @@ export class DataStoreUpdateManagerService {
*
* @param slot The slot to commit
*/
public commit(slot: UpdateSlot, changedModels: ChangedModels): void {
public async commit(slot: UpdateSlot, changedModels: ChangedModels): Promise<void> {
if (!this.currentUpdateSlot || !this.currentUpdateSlot.equal(slot)) {
throw new Error(`No or wrong update slot to be finished!`);
}
this.currentUpdateSlot = null;

// notify repositories in two phases
const repositories = this.mapperService.getAllRepositories();
const modelUpdates = [];

// Phase 1: deleting and creating of view models (in this order)
for (const repo of repositories) {
Expand All @@ -184,9 +185,10 @@ export class DataStoreUpdateManagerService {

const changedModelIds = slot.getChangedModelIdsForCollection(repo.collection);
if (changedModelIds?.length) {
repo.changedModels(changedModelIds, changedModels[repo.COLLECTION]);
modelUpdates.push(repo.changedModels(changedModelIds, changedModels[repo.COLLECTION]));
}
}
await Promise.all(modelUpdates);

// Phase 2: updating all repositories
for (const repo of repositories) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class ViewModelStoreUpdateService {
await this.DS.addOrUpdate(changedModels[collection]);
}

this.DSUpdateService.commit(updateSlot, changedModels);
await this.DSUpdateService.commit(updateSlot, changedModels);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
<button mat-menu-item *ngIf="defaultOption" (click)="sortOption = defaultOption">
<mat-icon>{{ getSortIcon(defaultOption) }}</mat-icon>
<span>{{ sortService.getSortLabel(defaultOption) | translate }}&emsp;</span>
<small class="subtitle">{{ '(Default)' | translate }}</small>
<small class="subtitle">({{ 'Default' | translate }})</small>
</button>
<mat-divider *ngIf="defaultOption"></mat-divider>
<!-- </mat-list-item> -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class ChessDialogComponent extends BaseGameDialogComponent implements OnI
if (this.config?.userId) {
this.state = `waitForResponse`;
this.notifyService.sendToUsers(`chess_challenge`, { name: this.getPlayerName() }, this.config.userId);
this.caption = this.translate.instant(`Waiting for response...`);
this.caption = this.translate.instant(`Waiting for response ...`);
const handle = this.SM.waitForResponse.receivedACK.handle;
this.SM.waitForResponse.receivedACK.handle = (notify: NotifyResponse<{ name: string }>) => {
if (notify.sender_user_id === this.config.userId) {
Expand Down
Loading

0 comments on commit d63f24b

Please sign in to comment.