diff --git a/src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.ts b/src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.ts index 2cae59e9e..c73493770 100644 --- a/src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.ts +++ b/src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.ts @@ -51,7 +51,7 @@ export class EventConsumersPageComponent extends ResourceOwner implements OnInit this.eventConsumersState.reset(es).pipe(onErrorResumeNext()).subscribe(); } - public trackByEventConsumer(es: EventConsumerDto) { + public trackByEventConsumer(index: number, es: EventConsumerDto) { return es.name; } diff --git a/src/Squidex/app/features/content/pages/content/content-field.component.html b/src/Squidex/app/features/content/pages/content/content-field.component.html index 2d4ea03b5..25b261171 100644 --- a/src/Squidex/app/features/content/pages/content/content-field.component.html +++ b/src/Squidex/app/features/content/pages/content/content-field.component.html @@ -20,6 +20,7 @@ [field]="field" [language]="language" [languages]="languages" + [isCompact]="!!fieldFormCompare" [control]="fieldForm.controls[language.iso2Code]"> @@ -31,6 +32,7 @@ [field]="field" [language]="language" [languages]="languages" + [isCompact]="!!fieldFormCompare" [control]="selectedFormControl"> @@ -61,6 +63,7 @@ [field]="field" [language]="language" [languages]="languages" + [isCompact]="true" [control]="fieldFormCompare?.controls[language.iso2Code]"> @@ -71,6 +74,7 @@ [field]="field" [language]="language" [languages]="languages" + [isCompact]="true" [control]="selectedFormControlCompare"> diff --git a/src/Squidex/app/features/content/pages/content/content-field.component.ts b/src/Squidex/app/features/content/pages/content/content-field.component.ts index 955e75ba2..2ba3f775b 100644 --- a/src/Squidex/app/features/content/pages/content/content-field.component.ts +++ b/src/Squidex/app/features/content/pages/content/content-field.component.ts @@ -5,7 +5,7 @@ * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. */ -import { Component, DoCheck, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core'; +import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core'; import { AbstractControl, FormGroup } from '@angular/forms'; import { Observable } from 'rxjs'; import { map, startWith } from 'rxjs/operators'; @@ -14,7 +14,6 @@ import { AppLanguageDto, EditContentForm, fieldInvariant, - ImmutableArray, LocalStoreService, RootFieldDto, SchemaDto, @@ -26,7 +25,7 @@ import { styleUrls: ['./content-field.component.scss'], templateUrl: './content-field.component.html' }) -export class ContentFieldComponent implements DoCheck, OnChanges { +export class ContentFieldComponent implements OnChanges { @Input() public form: EditContentForm; @@ -46,7 +45,7 @@ export class ContentFieldComponent implements DoCheck, OnChanges { public language: AppLanguageDto; @Input() - public languages: ImmutableArray; + public languages: AppLanguageDto[]; @Output() public languageChange = new EventEmitter(); @@ -71,25 +70,7 @@ export class ContentFieldComponent implements DoCheck, OnChanges { if (changes['field']) { this.showAllControls = this.localStore.getBoolean(this.configKey()); } - } - - public changeShowAllControls(value: boolean) { - this.showAllControls = value; - - this.localStore.setBoolean(this.configKey(), this.showAllControls); - } - - public copy() { - if (this.selectedFormControlCompare && this.fieldFormCompare) { - if (this.showAllControls) { - this.fieldForm.setValue(this.fieldFormCompare.value); - } else { - this.selectedFormControl.setValue(this.selectedFormControlCompare.value); - } - } - } - public ngDoCheck() { const control = this.findControl(this.fieldForm); if (this.selectedFormControl !== control) { @@ -113,6 +94,22 @@ export class ContentFieldComponent implements DoCheck, OnChanges { } } + public changeShowAllControls(value: boolean) { + this.showAllControls = value; + + this.localStore.setBoolean(this.configKey(), this.showAllControls); + } + + public copy() { + if (this.selectedFormControlCompare && this.fieldFormCompare) { + if (this.showAllControls) { + this.fieldForm.setValue(this.fieldFormCompare.value); + } else { + this.selectedFormControl.setValue(this.selectedFormControlCompare.value); + } + } + } + private findControl(form: FormGroup) { if (this.field.isLocalizable) { return form.controls[this.language.iso2Code]; diff --git a/src/Squidex/app/features/content/pages/content/content-history-page.component.html b/src/Squidex/app/features/content/pages/content/content-history-page.component.html index 3fec6c69d..7ca0c7449 100644 --- a/src/Squidex/app/features/content/pages/content/content-history-page.component.html +++ b/src/Squidex/app/features/content/pages/content/content-history-page.component.html @@ -15,7 +15,7 @@
{{event.created | sqxFromNow}}
- Load this Version + Load · Compare diff --git a/src/Squidex/app/features/content/pages/content/content-history-page.component.ts b/src/Squidex/app/features/content/pages/content/content-history-page.component.ts index 0c79d722f..96d9fa43d 100644 --- a/src/Squidex/app/features/content/pages/content/content-history-page.component.ts +++ b/src/Squidex/app/features/content/pages/content/content-history-page.component.ts @@ -62,7 +62,11 @@ export class ContentHistoryPageComponent { } public loadVersion(version: number) { - this.messageBus.emit(new ContentVersionSelected(new Version(version.toString()))); + this.messageBus.emit(new ContentVersionSelected(new Version(version.toString()), false)); + } + + public compareVersion(version: number) { + this.messageBus.emit(new ContentVersionSelected(new Version(version.toString()), true)); } public trackByEvent(index: number, event: HistoryEventDto) { 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 f92e5b7ac..a0fb8001b 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 @@ -1,7 +1,7 @@
- + @@ -118,7 +118,7 @@ [fieldForm]="contentForm.form.get(field.name)" [fieldFormCompare]="contentFormCompare?.form.get(field.name)" [schema]="schema" - [languages]="languages" + [languages]="languages.mutableValues" [(language)]="language"> diff --git a/src/Squidex/app/features/content/pages/content/content-page.component.ts b/src/Squidex/app/features/content/pages/content/content-page.component.ts index 2e3d726ca..610094887 100644 --- a/src/Squidex/app/features/content/pages/content/content-page.component.ts +++ b/src/Squidex/app/features/content/pages/content/content-page.component.ts @@ -101,7 +101,7 @@ export class ContentPageComponent extends ResourceOwner implements CanComponentD this.own( this.messageBus.of(ContentVersionSelected) .subscribe(message => { - this.loadVersion(message.version); + this.loadVersion(message.version, message.compare); })); } @@ -209,25 +209,36 @@ export class ContentPageComponent extends ResourceOwner implements CanComponentD .subscribe(); } - private loadVersion(version: Version | null) { + private loadVersion(version: Version | null, compare: boolean) { if (!this.content || version === null || version.eq(this.content.version)) { this.contentFormCompare = null; this.contentVersion = null; + this.contentForm.load(this.content.dataDraft); } else { this.contentsState.loadVersion(this.content, version) .subscribe(dto => { - if (this.contentFormCompare === null) { - this.contentFormCompare = new EditContentForm(this.schema, this.languages); - this.contentFormCompare.form.disable(); + if (compare) { + if (this.contentFormCompare === null) { + this.contentFormCompare = new EditContentForm(this.schema, this.languages); + this.contentFormCompare.form.disable(); + } + + this.contentFormCompare.load(dto.payload); + this.contentForm.load(this.content.dataDraft); + } else { + if (this.contentFormCompare) { + this.contentFormCompare = null; + } + + this.contentForm.load(dto.payload); } - this.contentFormCompare.load(dto.payload); this.contentVersion = version; }); } } public showLatest() { - this.loadVersion(null); + this.loadVersion(null, false); } } \ No newline at end of file diff --git a/src/Squidex/app/features/content/pages/content/field-languages.component.ts b/src/Squidex/app/features/content/pages/content/field-languages.component.ts index 47246437f..aac427c15 100644 --- a/src/Squidex/app/features/content/pages/content/field-languages.component.ts +++ b/src/Squidex/app/features/content/pages/content/field-languages.component.ts @@ -7,11 +7,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; -import { - AppLanguageDto, - ImmutableArray, - RootFieldDto -} from '@app/shared'; +import { AppLanguageDto, RootFieldDto } from '@app/shared'; @Component({ selector: 'sqx-field-languages', @@ -25,7 +21,7 @@ import { + [languages]="languages"> @@ -45,7 +41,7 @@ export class FieldLanguagesComponent { public language: AppLanguageDto; @Input() - public languages: ImmutableArray; + public languages: AppLanguageDto[]; @Output() public languageChange = new EventEmitter(); diff --git a/src/Squidex/app/features/content/pages/contents/contents-page.component.html b/src/Squidex/app/features/content/pages/contents/contents-page.component.html index 87950b60a..fbeff8b1d 100644 --- a/src/Squidex/app/features/content/pages/contents/contents-page.component.html +++ b/src/Squidex/app/features/content/pages/contents/contents-page.component.html @@ -33,7 +33,7 @@
- +
- - - -
- +
diff --git a/src/Squidex/app/features/content/shared/contents-selector.component.ts b/src/Squidex/app/features/content/shared/contents-selector.component.ts index bfb764f39..f88608fba 100644 --- a/src/Squidex/app/features/content/shared/contents-selector.component.ts +++ b/src/Squidex/app/features/content/shared/contents-selector.component.ts @@ -115,7 +115,7 @@ export class ContentsSelectorComponent implements OnInit { this.isAllSelected = this.selectionCount === this.contentsState.snapshot.contents.length; } - public trackByContent(content: ContentDto): string { + public trackByContent(index: number, content: ContentDto): string { return content.id; } } diff --git a/src/Squidex/app/features/content/shared/field-editor.component.html b/src/Squidex/app/features/content/shared/field-editor.component.html index a50fe912e..12d8ca479 100644 --- a/src/Squidex/app/features/content/shared/field-editor.component.html +++ b/src/Squidex/app/features/content/shared/field-editor.component.html @@ -101,7 +101,7 @@ - + @@ -122,7 +122,7 @@ @@ -132,7 +132,8 @@ [formControl]="control" [language]="language" [languages]="languages" - [schemaId]="field.properties['schemaId']"> + [schemaId]="field.properties['schemaId']" + [isCompact]="isCompact"> diff --git a/src/Squidex/app/features/content/shared/field-editor.component.ts b/src/Squidex/app/features/content/shared/field-editor.component.ts index e15497238..e3690276c 100644 --- a/src/Squidex/app/features/content/shared/field-editor.component.ts +++ b/src/Squidex/app/features/content/shared/field-editor.component.ts @@ -11,8 +11,7 @@ import { FormControl } from '@angular/forms'; import { AppLanguageDto, EditContentForm, - FieldDto, - ImmutableArray + FieldDto } from '@app/shared'; @Component({ @@ -34,7 +33,10 @@ export class FieldEditorComponent { public language: AppLanguageDto; @Input() - public languages: ImmutableArray; + public languages: AppLanguageDto[]; + + @Input() + public isCompact = false; @Input() public displaySuffix: string; 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 2bc315e36..83a7d5553 100644 --- a/src/Squidex/app/features/content/shared/references-editor.component.html +++ b/src/Squidex/app/features/content/shared/references-editor.component.html @@ -7,13 +7,14 @@ diff --git a/src/Squidex/app/features/content/shared/references-editor.component.ts b/src/Squidex/app/features/content/shared/references-editor.component.ts index 426413e17..8cb079697 100644 --- a/src/Squidex/app/features/content/shared/references-editor.component.ts +++ b/src/Squidex/app/features/content/shared/references-editor.component.ts @@ -48,7 +48,10 @@ export class ReferencesEditorComponent extends StatefulControlComponent; + public languages: AppLanguageDto[]; + + @Input() + public isCompact = false; public selectorDialog = new DialogModel(); diff --git a/src/Squidex/app/features/settings/pages/backups/backups-page.component.ts b/src/Squidex/app/features/settings/pages/backups/backups-page.component.ts index a4474ce19..281c4f9e6 100644 --- a/src/Squidex/app/features/settings/pages/backups/backups-page.component.ts +++ b/src/Squidex/app/features/settings/pages/backups/backups-page.component.ts @@ -49,7 +49,7 @@ export class BackupsPageComponent extends ResourceOwner implements OnInit { this.backupsState.delete(backup).pipe(onErrorResumeNext()).subscribe(); } - public trackByBackup(item: BackupDto) { + public trackByBackup(index: number, item: BackupDto) { return item.id; } } diff --git a/src/Squidex/app/framework/angular/forms/autocomplete.component.ts b/src/Squidex/app/framework/angular/forms/autocomplete.component.ts index 09d576832..147199400 100644 --- a/src/Squidex/app/framework/angular/forms/autocomplete.component.ts +++ b/src/Squidex/app/framework/angular/forms/autocomplete.component.ts @@ -66,7 +66,7 @@ export class AutocompleteComponent extends StatefulControlComponent { this.callChange(query); diff --git a/src/Squidex/app/framework/angular/forms/control-errors.component.ts b/src/Squidex/app/framework/angular/forms/control-errors.component.ts index cdafba5b4..3a347ad06 100644 --- a/src/Squidex/app/framework/angular/forms/control-errors.component.ts +++ b/src/Squidex/app/framework/angular/forms/control-errors.component.ts @@ -91,7 +91,7 @@ export class ControlErrorsComponent extends StatefulComponent implements this.control = control; if (control) { - this.takeOver( + this.own( merge(control.valueChanges, control.statusChanges) .subscribe(() => { this.createMessages(); @@ -113,7 +113,7 @@ export class ControlErrorsComponent extends StatefulComponent implements } private createMessages() { - const errorMessages: string[] = []; + const errors: string[] = []; if (this.control && this.control.invalid && ((this.control.touched && !this.submitOnly) || this.submitted) && this.control.errors) { for (let key in this.control.errors) { @@ -121,12 +121,14 @@ export class ControlErrorsComponent extends StatefulComponent implements const message = formatError(this.displayFieldName, key, this.control.errors[key], this.control.value, this.errors); if (message) { - errorMessages.push(message); + errors.push(message); } } } } - this.next(s => ({ ...s, errorMessages })); + if (errors.length !== this.snapshot.errorMessages.length || errors.length > 0) { + this.next(s => ({ ...s, errorMessages: errors })); + } } } \ No newline at end of file diff --git a/src/Squidex/app/framework/angular/forms/date-time-editor.component.ts b/src/Squidex/app/framework/angular/forms/date-time-editor.component.ts index cb7c39b86..3508ee929 100644 --- a/src/Squidex/app/framework/angular/forms/date-time-editor.component.ts +++ b/src/Squidex/app/framework/angular/forms/date-time-editor.component.ts @@ -60,7 +60,7 @@ export class DateTimeEditorComponent extends StatefulControlComponent<{}, string } public ngOnInit() { - this.takeOver( + this.own( this.timeControl.valueChanges.subscribe(value => { if (!value || value.length === 0) { this.timeValue = null; @@ -71,7 +71,7 @@ export class DateTimeEditorComponent extends StatefulControlComponent<{}, string this.updateValue(); })); - this.takeOver( + this.own( this.dateControl.valueChanges.subscribe(value => { if (!value || value.length === 0) { this.dateValue = null; diff --git a/src/Squidex/app/framework/angular/forms/iframe-editor.component.ts b/src/Squidex/app/framework/angular/forms/iframe-editor.component.ts index 7573ea6a7..0a19695d5 100644 --- a/src/Squidex/app/framework/angular/forms/iframe-editor.component.ts +++ b/src/Squidex/app/framework/angular/forms/iframe-editor.component.ts @@ -50,7 +50,7 @@ export class IFrameEditorComponent extends ExternalControlComponent impleme } public ngOnInit(): void { - this.takeOver( + this.own( this.renderer.listen('window', 'message', (event: MessageEvent) => { if (event.source === this.plugin.contentWindow) { const { type } = event.data; 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 82fd874e8..9f70a8fc3 100644 --- a/src/Squidex/app/framework/angular/forms/tag-editor.component.ts +++ b/src/Squidex/app/framework/angular/forms/tag-editor.component.ts @@ -146,7 +146,7 @@ export class TagEditorComponent extends StatefulControlComponent i } public ngOnInit() { - this.takeOver( + this.own( this.addInput.valueChanges.pipe( tap(() => { this.resetSize(); diff --git a/src/Squidex/app/framework/angular/modals/dialog-renderer.component.ts b/src/Squidex/app/framework/angular/modals/dialog-renderer.component.ts index 42dff0f73..594c3fc9a 100644 --- a/src/Squidex/app/framework/angular/modals/dialog-renderer.component.ts +++ b/src/Squidex/app/framework/angular/modals/dialog-renderer.component.ts @@ -45,14 +45,14 @@ export class DialogRendererComponent extends StatefulComponent implements } public ngOnInit() { - this.takeOver( + this.own( this.dialogView.isOpen.subscribe(isOpen => { if (!isOpen) { this.finishRequest(false); } })); - this.takeOver( + this.own( this.dialogs.notifications.subscribe(notification => { this.next(s => ({ ...s, @@ -60,17 +60,19 @@ export class DialogRendererComponent extends StatefulComponent implements })); if (notification.displayTime > 0) { - this.takeOver(timer(notification.displayTime).subscribe(() => { + this.own(timer(notification.displayTime).subscribe(() => { this.close(notification); })); } })); - this.takeOver( + this.own( this.dialogs.dialogs .subscribe(dialogRequest => { this.cancel(); + this.dialogView.show(); + this.next(s => ({ ...s, dialogRequest })); })); } diff --git a/src/Squidex/app/framework/angular/modals/onboarding-tooltip.component.ts b/src/Squidex/app/framework/angular/modals/onboarding-tooltip.component.ts index 93593910e..98fc8ee3f 100644 --- a/src/Squidex/app/framework/angular/modals/onboarding-tooltip.component.ts +++ b/src/Squidex/app/framework/angular/modals/onboarding-tooltip.component.ts @@ -55,7 +55,7 @@ export class OnboardingTooltipComponent extends StatefulComponent implements OnD public ngOnInit() { if (this.for && this.helpId && Types.isFunction(this.for.addEventListener)) { - this.takeOver( + this.own( timer(this.after).subscribe(() => { if (this.onboardingService.shouldShow(this.helpId)) { const forRect = this.for.getBoundingClientRect(); @@ -68,7 +68,7 @@ export class OnboardingTooltipComponent extends StatefulComponent implements OnD if (this.isSameOrParent(fromPoint)) { this.tooltipModal.show(); - this.takeOver( + this.own( timer(10000).subscribe(() => { this.hideThis(); })); @@ -78,7 +78,7 @@ export class OnboardingTooltipComponent extends StatefulComponent implements OnD } })); - this.takeOver( + this.own( this.renderer.listen(this.for, 'mousedown', () => { this.onboardingService.disable(this.helpId); diff --git a/src/Squidex/app/framework/angular/modals/tooltip.component.ts b/src/Squidex/app/framework/angular/modals/tooltip.component.ts index 147dbe8bb..d4c3e9ec0 100644 --- a/src/Squidex/app/framework/angular/modals/tooltip.component.ts +++ b/src/Squidex/app/framework/angular/modals/tooltip.component.ts @@ -39,12 +39,12 @@ export class TooltipComponent extends StatefulComponent implements OnDestroy, On public ngOnInit() { if (this.target) { - this.takeOver( + this.own( this.renderer.listen(this.target, 'mouseenter', () => { this.modal.show(); })); - this.takeOver( + this.own( this.renderer.listen(this.target, 'mouseleave', () => { this.modal.hide(); })); diff --git a/src/Squidex/app/framework/angular/sorted.directive.ts b/src/Squidex/app/framework/angular/sorted.directive.ts index 4e15dc7e3..0951fb933 100644 --- a/src/Squidex/app/framework/angular/sorted.directive.ts +++ b/src/Squidex/app/framework/angular/sorted.directive.ts @@ -5,14 +5,14 @@ * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. */ -import { Directive, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core'; +import { Directive, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core'; import * as Sortable from 'sortablejs'; @Directive({ selector: '[sqxSortModel]' }) -export class SortedDirective implements OnDestroy, OnInit { +export class SortedDirective implements OnDestroy, OnInit, OnChanges { private sortable: Sortable.Ref; @Input() @@ -29,6 +29,13 @@ export class SortedDirective implements OnDestroy, OnInit { ) { } + public ngOnChanges(changes: SimpleChanges) { + const sortModel = changes['sortModel'].currentValue; + if (sortModel) { + console.log(JSON.stringify(sortModel.map((x: any) => x.fileName))); + } + } + public ngOnDestroy() { if (this.sortable) { this.sortable.destroy(); @@ -41,6 +48,7 @@ export class SortedDirective implements OnDestroy, OnInit { animation: 150, onSort: (event: { oldIndex: number, newIndex: number }) => { + console.log('FOO'); if (this.sortModel && event.newIndex !== event.oldIndex) { const newModel = [...this.sortModel]; diff --git a/src/Squidex/app/framework/angular/stateful.component.ts b/src/Squidex/app/framework/angular/stateful.component.ts index 161ada74f..c29ddefed 100644 --- a/src/Squidex/app/framework/angular/stateful.component.ts +++ b/src/Squidex/app/framework/angular/stateful.component.ts @@ -55,7 +55,7 @@ export abstract class StatefulComponent extends State implements OnD ) { super(state); - this.takeOver( + this.own( this.changes.pipe(skip(1)).subscribe(() => { this.changeDetector.detectChanges(); })); @@ -65,7 +65,7 @@ export abstract class StatefulComponent extends State implements OnD this.subscriptions.ngOnDestroy(); } - public takeOver(subscription: Subscription | UnsubscribeFunction | Observable) { + public own(subscription: Subscription | UnsubscribeFunction | Observable) { this.subscriptions.own(subscription); } } diff --git a/src/Squidex/app/shared/components/asset.component.html b/src/Squidex/app/shared/components/asset.component.html index 4796e3233..2e822d47e 100644 --- a/src/Squidex/app/shared/components/asset.component.html +++ b/src/Squidex/app/shared/components/asset.component.html @@ -95,39 +95,41 @@ -
-
-
- {{asset.fileName}} -
-
- - +
+ + + + + + + +
+
+ {{asset.fileName}} +
+
+ + - - -
- -
- {{asset.pixelWidth}}x{{asset.pixelHeight}}px, {{asset.fileSize | sqxFileSize}} -
-
- -
-
- - - -
-
- - -
- + + + +
+ {{asset.pixelWidth}}x{{asset.pixelHeight}}px, {{asset.fileSize | sqxFileSize}} + + + + + + + + + +
diff --git a/src/Squidex/app/shared/components/asset.component.scss b/src/Squidex/app/shared/components/asset.component.scss index 78d880e2e..58ab1e5d0 100644 --- a/src/Squidex/app/shared/components/asset.component.scss +++ b/src/Squidex/app/shared/components/asset.component.scss @@ -107,8 +107,7 @@ $list-height: 2.375rem; background: $color-dark-black; } - &-name, - &-info { + &-name, &-info { @include truncate; } @@ -187,7 +186,7 @@ $list-height: 2.375rem; .table-items-row { & { position: relative; - padding-left: $list-height + 2rem; + padding-left: $list-height + 3rem; height: $list-height + 2rem; } @@ -229,36 +228,31 @@ $list-height: 2.375rem; height: $list-height; } - &-user { - padding-top: .2rem; - } - - &-actions { - line-height: $list-height; + &-name { + width: 100%; + padding-right: .5rem; } - &-name, - &-info { - @include truncate; - padding-right: 1rem; - padding-left: 1rem; - line-height: $list-height; + &-user { + width: 3rem; } - &-actions, - &-user { - max-width: 3rem; - min-width: 3rem; + &-actions { + width: 3rem; } &-info { color: $color-text-decent; font-size: .9rem; - max-width: 12rem; - min-width: 12rem; + font-weight: normal; + width: 12rem; } } + table { + width: 100%; + } + .upload-progress { padding: .25rem 0; } diff --git a/src/Squidex/app/shared/components/asset.component.ts b/src/Squidex/app/shared/components/asset.component.ts index 36a933269..9a082df4a 100644 --- a/src/Squidex/app/shared/components/asset.component.ts +++ b/src/Squidex/app/shared/components/asset.component.ts @@ -51,6 +51,9 @@ export class AssetComponent extends StatefulComponent implements OnChange @Input() public removeMode = false; + @Input() + public isCompact = false; + @Input() public isDisabled = false; @@ -122,7 +125,7 @@ export class AssetComponent extends StatefulComponent implements OnChange }); } - this.takeOver( + this.own( this.tagInput.valueChanges.pipe( distinctUntilChanged(), debounceTime(2000) diff --git a/src/Squidex/app/shared/components/comments.component.ts b/src/Squidex/app/shared/components/comments.component.ts index 6ef6be86e..5081da228 100644 --- a/src/Squidex/app/shared/components/comments.component.ts +++ b/src/Squidex/app/shared/components/comments.component.ts @@ -73,7 +73,7 @@ export class CommentsComponent extends ResourceOwner implements OnDestroy, OnIni } } - public trackByComment(comment: CommentDto) { + public trackByComment(index: number, comment: CommentDto) { return comment.id; } } \ No newline at end of file diff --git a/src/Squidex/app/shell/pages/internal/profile-menu.component.ts b/src/Squidex/app/shell/pages/internal/profile-menu.component.ts index a80c2f773..8332fb646 100644 --- a/src/Squidex/app/shell/pages/internal/profile-menu.component.ts +++ b/src/Squidex/app/shell/pages/internal/profile-menu.component.ts @@ -44,7 +44,7 @@ export class ProfileMenuComponent extends StatefulComponent implements On }); } public ngOnInit() { - this.takeOver( + this.own( this.authService.userChanges.pipe(filter(user => !!user)) .subscribe(user => { const profileId = user!.id;