Browse Source

Fix for save button.

pull/613/head
Sebastian 5 years ago
parent
commit
742d6563c6
  1. 13
      backend/src/Squidex.Domain.Apps.Entities/History/NotifoService.cs
  2. 2
      backend/src/Squidex.Domain.Apps.Entities/Squidex.Domain.Apps.Entities.csproj
  3. 24
      frontend/app/features/content/pages/content/content-page.component.html

13
backend/src/Squidex.Domain.Apps.Entities/History/NotifoService.cs

@ -200,7 +200,12 @@ namespace Squidex.Domain.Apps.Entities.History
} }
} }
await client.Events.PostEventsAsync(options.AppId, new PublishManyRequestDto { Requests = requests }); var request = new PublishManyRequestDto
{
Requests = requests
};
await client.Events.PostEventsAsync(options.AppId, request);
} }
foreach (var @event in events) foreach (var @event in events)
@ -220,10 +225,12 @@ namespace Squidex.Domain.Apps.Entities.History
try try
{ {
await client.Users.PostAllowedTopicAsync(options.AppId, userId, new AddAllowedTopicRequest var request = new AddAllowedTopicRequest
{ {
Prefix = GetAppPrefix(contributorAssigned) Prefix = GetAppPrefix(contributorAssigned)
}); };
await client.Users.PostAllowedTopicAsync(options.AppId, userId, request);
} }
catch (NotifoException ex) when (ex.StatusCode == 404) catch (NotifoException ex) when (ex.StatusCode == 404)
{ {

2
backend/src/Squidex.Domain.Apps.Entities/Squidex.Domain.Apps.Entities.csproj

@ -31,7 +31,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.Orleans.Core" Version="3.3.0" /> <PackageReference Include="Microsoft.Orleans.Core" Version="3.3.0" />
<PackageReference Include="Notifo.SDK" Version="1.0.0-alpha11" /> <PackageReference Include="Notifo.SDK" Version="1.0.0-alpha9" />
<PackageReference Include="RefactoringEssentials" Version="5.6.0" PrivateAssets="all" /> <PackageReference Include="RefactoringEssentials" Version="5.6.0" PrivateAssets="all" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" /> <PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
<PackageReference Include="System.Collections.Immutable" Version="5.0.0" /> <PackageReference Include="System.Collections.Immutable" Version="5.0.0" />

24
frontend/app/features/content/pages/content/content-page.component.html

@ -40,9 +40,20 @@
<ng-container menu> <ng-container menu>
<ng-container *ngIf="content; else noContent"> <ng-container *ngIf="content; else noContent">
<ng-container *ngIf="(contentTab | async) === 'fields'; else referenceHeader">
<sqx-notifo topic="apps/{{contentsState.appId}}/schemas/{{schema?.name}}/contents/{{content.id}}"></sqx-notifo> <sqx-notifo topic="apps/{{contentsState.appId}}/schemas/{{schema?.name}}/contents/{{content.id}}"></sqx-notifo>
<ng-container *ngIf="contentTab | async; let tab">
<ng-container *ngIf="tab !== 'editor'">
<button type="button" class="btn btn-primary ml-1" (click)="publish()">
{{ 'contents.publishAll' | sqxTranslate }}
</button>
<button type="button" class="btn btn-primary ml-1" (click)="validate()">
{{ 'contents.validate' | sqxTranslate }}
</button>
</ng-container>
<ng-container *ngIf="tab === 'editor'">
<sqx-preview-button [schema]="schema" [content]="content"></sqx-preview-button> <sqx-preview-button [schema]="schema" [content]="content"></sqx-preview-button>
<ng-container *ngIf="content?.canDelete"> <ng-container *ngIf="content?.canDelete">
@ -71,16 +82,7 @@
<sqx-shortcut keys="ctrl+s" (trigger)="saveAndPublish()"></sqx-shortcut> <sqx-shortcut keys="ctrl+s" (trigger)="saveAndPublish()"></sqx-shortcut>
</ng-container> </ng-container>
</ng-container> </ng-container>
</ng-container>
<ng-template #referenceHeader>
<button type="button" class="btn btn-primary ml-1" (click)="publish()">
{{ 'contents.publishAll' | sqxTranslate }}
</button>
<button type="button" class="btn btn-primary ml-1" (click)="validate()">
{{ 'contents.validate' | sqxTranslate }}
</button>
</ng-template>
</ng-container> </ng-container>
<ng-template #noContent> <ng-template #noContent>

Loading…
Cancel
Save