diff --git a/src/Squidex/app/features/apps/pages/apps-page.component.html b/src/Squidex/app/features/apps/pages/apps-page.component.html index 3acadfa07..abd6252d9 100644 --- a/src/Squidex/app/features/apps/pages/apps-page.component.html +++ b/src/Squidex/app/features/apps/pages/apps-page.component.html @@ -14,7 +14,7 @@

You are not collaborating to any app yet

-
+

{{app.name}}

diff --git a/src/Squidex/app/features/apps/pages/apps-page.component.ts b/src/Squidex/app/features/apps/pages/apps-page.component.ts index d5eba2e0a..631592433 100644 --- a/src/Squidex/app/features/apps/pages/apps-page.component.ts +++ b/src/Squidex/app/features/apps/pages/apps-page.component.ts @@ -9,6 +9,7 @@ import { Component, OnInit } from '@angular/core'; import { take } from 'rxjs/operators'; import { + AppDto, AppsState, AuthService, DialogModel, @@ -77,4 +78,8 @@ export class AppsPageComponent implements OnInit { public stop(event: Event) { event.stopPropagation(); } + + public trackByApp(index: number, app: AppDto) { + return app.id; + } } \ No newline at end of file diff --git a/src/Squidex/app/features/apps/pages/news-dialog.component.html b/src/Squidex/app/features/apps/pages/news-dialog.component.html index 3b8e5dc4f..70c0f1625 100644 --- a/src/Squidex/app/features/apps/pages/news-dialog.component.html +++ b/src/Squidex/app/features/apps/pages/news-dialog.component.html @@ -7,7 +7,7 @@

What's new?

-
+

{{feature.name}}

diff --git a/src/Squidex/app/features/apps/pages/news-dialog.component.ts b/src/Squidex/app/features/apps/pages/news-dialog.component.ts index 01d0ce8d9..1871e0594 100644 --- a/src/Squidex/app/features/apps/pages/news-dialog.component.ts +++ b/src/Squidex/app/features/apps/pages/news-dialog.component.ts @@ -24,4 +24,8 @@ export class NewsDialogComponent { public emitClose() { this.close.emit(); } + + public trackByFeature(index: number, feature: FeatureDto) { + return feature; + } } \ No newline at end of file diff --git a/src/Squidex/app/features/content/pages/content/content-page.component.html b/src/Squidex/app/features/content/pages/content/content-page.component.html index 44168b5cf..48bfeb3d3 100644 --- a/src/Squidex/app/features/content/pages/content/content-page.component.html +++ b/src/Squidex/app/features/content/pages/content/content-page.component.html @@ -111,7 +111,7 @@ Viewing version {{version.value}}.
-
+

Saved queries

- {{query.name}} diff --git a/src/Squidex/app/features/content/shared/content-item.component.html b/src/Squidex/app/features/content/shared/content-item.component.html index 0ae1e664b..985056255 100644 --- a/src/Squidex/app/features/content/shared/content-item.component.html +++ b/src/Squidex/app/features/content/shared/content-item.component.html @@ -10,7 +10,7 @@ - + diff --git a/src/Squidex/app/features/content/shared/content-item.component.ts b/src/Squidex/app/features/content/shared/content-item.component.ts index f97f9baab..6e9abe81c 100644 --- a/src/Squidex/app/features/content/shared/content-item.component.ts +++ b/src/Squidex/app/features/content/shared/content-item.component.ts @@ -187,5 +187,9 @@ export class ContentItemComponent implements OnChanges { return undefined; } + + public trackByField(index: number, field: FieldDto) { + return field.fieldId + this.schema.id; + } } diff --git a/src/Squidex/app/features/content/shared/references-editor.component.html b/src/Squidex/app/features/content/shared/references-editor.component.html index 2ca51947a..312c46e7f 100644 --- a/src/Squidex/app/features/content/shared/references-editor.component.html +++ b/src/Squidex/app/features/content/shared/references-editor.component.html @@ -9,7 +9,7 @@ - +
diff --git a/src/Squidex/app/features/rules/pages/rules/triggers/content-changed-trigger.component.ts b/src/Squidex/app/features/rules/pages/rules/triggers/content-changed-trigger.component.ts index d9644c4fa..a3e1f140b 100644 --- a/src/Squidex/app/features/rules/pages/rules/triggers/content-changed-trigger.component.ts +++ b/src/Squidex/app/features/rules/pages/rules/triggers/content-changed-trigger.component.ts @@ -103,4 +103,8 @@ export class ContentChangedTriggerComponent implements OnInit { this.schemasToAdd = this.schemas.filter(schema => !this.triggerSchemas.find(s => s.schema.id === schema.id)).sortByStringAsc(x => x.name); this.schemaToAdd = this.schemasToAdd.at(0); } + + public trackBySchema(index: number, schema: SchemaDto) { + return schema.id; + } } \ No newline at end of file diff --git a/src/Squidex/app/features/settings/pages/clients/client.component.html b/src/Squidex/app/features/settings/pages/clients/client.component.html index 9ebb54ab5..70ae8e22a 100644 --- a/src/Squidex/app/features/settings/pages/clients/client.component.html +++ b/src/Squidex/app/features/settings/pages/clients/client.component.html @@ -71,7 +71,7 @@
diff --git a/src/Squidex/app/features/settings/pages/clients/client.component.ts b/src/Squidex/app/features/settings/pages/clients/client.component.ts index 35437867a..e9d3d67d4 100644 --- a/src/Squidex/app/features/settings/pages/clients/client.component.ts +++ b/src/Squidex/app/features/settings/pages/clients/client.component.ts @@ -111,6 +111,10 @@ export class ClientComponent implements OnChanges { this.dialogs.notifyError(error); }); } + + public trackByRole(index: number, role: RoleDto) { + return role.name; + } } function connectHttpText(apiUrl: ApiUrlConfig, app: string, client: { id: string, secret: string }) { diff --git a/src/Squidex/app/framework/angular/forms/tag-editor.component.ts b/src/Squidex/app/framework/angular/forms/tag-editor.component.ts index 4e049dc45..df703254b 100644 --- a/src/Squidex/app/framework/angular/forms/tag-editor.component.ts +++ b/src/Squidex/app/framework/angular/forms/tag-editor.component.ts @@ -5,6 +5,8 @@ * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. */ +// tslint:disable:template-use-track-by-function + import { AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, forwardRef, Input, OnInit, ViewChild } from '@angular/core'; import { FormControl, NG_VALUE_ACCESSOR } from '@angular/forms'; import { distinctUntilChanged, map, tap } from 'rxjs/operators'; @@ -362,32 +364,36 @@ export class TagEditorComponent extends StatefulControlComponent i public onCopy(event: ClipboardEvent) { if (!this.hasSelection()) { - event.clipboardData.setData('text/plain', this.snapshot.items.filter(x => !!x).join(',')); + if (event.clipboardData) { + event.clipboardData.setData('text/plain', this.snapshot.items.filter(x => !!x).join(',')); + } event.preventDefault(); } } public onPaste(event: ClipboardEvent) { - const value = event.clipboardData.getData('text/plain'); + if (event.clipboardData) { + const value = event.clipboardData.getData('text/plain'); - if (value) { - this.resetForm(); + if (value) { + this.resetForm(); - const values = [...this.snapshot.items]; + const values = [...this.snapshot.items]; - for (let part of value.split(',')) { - const converted = this.converter.convert(part); + for (let part of value.split(',')) { + const converted = this.converter.convert(part); - if (converted) { - values.push(converted); + if (converted) { + values.push(converted); + } } + + this.updateItems(values); } - this.updateItems(values); + event.preventDefault(); } - - event.preventDefault(); } private hasSelection() { diff --git a/src/Squidex/app/shared/components/language-selector.component.html b/src/Squidex/app/shared/components/language-selector.component.html index 995a4302f..d56354bce 100644 --- a/src/Squidex/app/shared/components/language-selector.component.html +++ b/src/Squidex/app/shared/components/language-selector.component.html @@ -1,5 +1,5 @@
-
@@ -9,7 +9,7 @@ {{selectedLanguage.iso2Code}}