Browse Source

Fix UI bugs.

pull/1312/head
Sebastian Stehle 1 week ago
parent
commit
1851ef8680
  1. 9
      backend/src/Squidex.Infrastructure/EventSourcing/Consume/EventConsumerProcessor.cs
  2. 4
      frontend/src/app/features/schemas/pages/schema/fields/types/string-validation.component.html
  3. 2
      frontend/src/app/shared/model/custom.ts
  4. 2
      frontend/src/app/shared/model/generated.ts
  5. 2
      frontend/src/app/theme/_bootstrap.scss

9
backend/src/Squidex.Infrastructure/EventSourcing/Consume/EventConsumerProcessor.cs

@ -175,7 +175,7 @@ public class EventConsumerProcessor : IEventSubscriber<ParsedEvents>
}, State.Position); }, State.Position);
} }
private async Task DispatchAsync(IReadOnlyList<Envelope<IEvent>> events) private async Task DispatchAsync(List<Envelope<IEvent>> events)
{ {
if (events.Count > 0) if (events.Count > 0)
{ {
@ -249,11 +249,8 @@ public class EventConsumerProcessor : IEventSubscriber<ParsedEvents>
private void Unsubscribe() private void Unsubscribe()
{ {
if (currentSubscription != null) currentSubscription?.Dispose();
{ currentSubscription = null;
currentSubscription.Dispose();
currentSubscription = null;
}
} }
private void Subscribe() private void Subscribe()

4
frontend/src/app/features/schemas/pages/schema/fields/types/string-validation.component.html

@ -1,7 +1,7 @@
<div [formGroup]="fieldForm"> <div [formGroup]="fieldForm">
@if (showUnique) { @if (showUnique) {
<sqx-form-row #placeholderRow for="placeholder" hint="schemas.field.placeholderHint" label="schemas.field.placeholder" [prefix]="field.fieldId"> <sqx-form-row #isUniqueRow check for="isUnique" label="schemas.field.unique" [prefix]="field.fieldId">
<input class="form-control" [id]="placeholderRow.fieldName" formControlName="placeholder" maxlength="100" /> <input class="form-check-input" [id]="isUniqueRow.fieldName" formControlName="isUnique" type="checkbox" />
</sqx-form-row> </sqx-form-row>
} }

2
frontend/src/app/shared/model/custom.ts

@ -237,7 +237,7 @@ export class ContentDto extends generated.ContentDto {
} }
public get canDelete() { public get canDelete() {
return this.compute('canDelete', () => hasAnyLink(this._links, 'update')); return this.compute('canDelete', () => hasAnyLink(this._links, 'delete'));
} }
public get canDraftCreate() { public get canDraftCreate() {

2
frontend/src/app/shared/model/generated.ts

@ -11544,7 +11544,7 @@ export class ContentDto extends ResourceDto implements IContentDto {
} }
public get canDelete() { public get canDelete() {
return this.compute('canDelete', () => hasAnyLink(this._links, 'update')); return this.compute('canDelete', () => hasAnyLink(this._links, 'delete'));
} }
public get canDraftCreate() { public get canDraftCreate() {

2
frontend/src/app/theme/_bootstrap.scss

@ -208,7 +208,7 @@ a {
} }
} }
a { a, button {
// Special style for menu item to delete something. // Special style for menu item to delete something.
&.dropdown-item-delete { &.dropdown-item-delete {
& { & {

Loading…
Cancel
Save