From 65b6184b2e45bc081b8afb773f0736aa082ae95c Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Tue, 12 May 2026 10:46:36 +0200 Subject: [PATCH] Fix UI bugs. (#1312) --- .../EventSourcing/Consume/EventConsumerProcessor.cs | 9 +++------ .../schema/fields/types/string-validation.component.html | 4 ++-- frontend/src/app/shared/model/custom.ts | 2 +- frontend/src/app/shared/model/generated.ts | 2 +- frontend/src/app/theme/_bootstrap.scss | 2 +- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/Consume/EventConsumerProcessor.cs b/backend/src/Squidex.Infrastructure/EventSourcing/Consume/EventConsumerProcessor.cs index 0c1303207..66e3db23d 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/Consume/EventConsumerProcessor.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/Consume/EventConsumerProcessor.cs @@ -175,7 +175,7 @@ public class EventConsumerProcessor : IEventSubscriber }, State.Position); } - private async Task DispatchAsync(IReadOnlyList> events) + private async Task DispatchAsync(List> events) { if (events.Count > 0) { @@ -249,11 +249,8 @@ public class EventConsumerProcessor : IEventSubscriber private void Unsubscribe() { - if (currentSubscription != null) - { - currentSubscription.Dispose(); - currentSubscription = null; - } + currentSubscription?.Dispose(); + currentSubscription = null; } private void Subscribe() diff --git a/frontend/src/app/features/schemas/pages/schema/fields/types/string-validation.component.html b/frontend/src/app/features/schemas/pages/schema/fields/types/string-validation.component.html index 4a947c06a..b9ecae5bb 100644 --- a/frontend/src/app/features/schemas/pages/schema/fields/types/string-validation.component.html +++ b/frontend/src/app/features/schemas/pages/schema/fields/types/string-validation.component.html @@ -1,7 +1,7 @@
@if (showUnique) { - - + + } diff --git a/frontend/src/app/shared/model/custom.ts b/frontend/src/app/shared/model/custom.ts index 4d1540b8c..b18a62d48 100644 --- a/frontend/src/app/shared/model/custom.ts +++ b/frontend/src/app/shared/model/custom.ts @@ -237,7 +237,7 @@ export class ContentDto extends generated.ContentDto { } public get canDelete() { - return this.compute('canDelete', () => hasAnyLink(this._links, 'update')); + return this.compute('canDelete', () => hasAnyLink(this._links, 'delete')); } public get canDraftCreate() { diff --git a/frontend/src/app/shared/model/generated.ts b/frontend/src/app/shared/model/generated.ts index 83cb49599..9d9060e65 100644 --- a/frontend/src/app/shared/model/generated.ts +++ b/frontend/src/app/shared/model/generated.ts @@ -11544,7 +11544,7 @@ export class ContentDto extends ResourceDto implements IContentDto { } public get canDelete() { - return this.compute('canDelete', () => hasAnyLink(this._links, 'update')); + return this.compute('canDelete', () => hasAnyLink(this._links, 'delete')); } public get canDraftCreate() { diff --git a/frontend/src/app/theme/_bootstrap.scss b/frontend/src/app/theme/_bootstrap.scss index 09ed115d0..3770e3237 100644 --- a/frontend/src/app/theme/_bootstrap.scss +++ b/frontend/src/app/theme/_bootstrap.scss @@ -208,7 +208,7 @@ a { } } - a { + a, button { // Special style for menu item to delete something. &.dropdown-item-delete { & {