Browse Source

Fix UI bugs. (#1312)

pull/1314/head
Sebastian Stehle 1 week ago
committed by GitHub
parent
commit
65b6184b2e
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  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);
}
private async Task DispatchAsync(IReadOnlyList<Envelope<IEvent>> events)
private async Task DispatchAsync(List<Envelope<IEvent>> events)
{
if (events.Count > 0)
{
@ -249,11 +249,8 @@ public class EventConsumerProcessor : IEventSubscriber<ParsedEvents>
private void Unsubscribe()
{
if (currentSubscription != null)
{
currentSubscription.Dispose();
currentSubscription = null;
}
currentSubscription?.Dispose();
currentSubscription = null;
}
private void Subscribe()

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

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

2
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() {

2
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() {

2
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 {
& {

Loading…
Cancel
Save