Browse Source

Optional suffix.

pull/346/head
Sebastian Stehle 7 years ago
parent
commit
6efa6f0373
  1. 5
      src/Squidex/Areas/Api/Controllers/Assets/AssetContentController.cs
  2. 2
      src/Squidex/Program.cs
  3. 2
      src/Squidex/app/features/dashboard/pages/dashboard-page.component.html
  4. 2
      src/Squidex/app/features/settings/pages/clients/client.component.html
  5. 4
      src/Squidex/app/features/settings/pages/clients/client.component.scss
  6. 4
      src/Squidex/app/shell/pages/internal/apps-menu.component.html

5
src/Squidex/Areas/Api/Controllers/Assets/AssetContentController.cs

@ -47,6 +47,7 @@ namespace Squidex.Areas.Api.Controllers.Assets
/// Get the asset content.
/// </summary>
/// <param name="id">The id of the asset.</param>
/// <param name="more">Optional suffix that can be used to seo-optimize the link to the image Has not effect.</param>
/// <param name="version">The optional version of the asset.</param>
/// <param name="width">The target width of the asset, if it is an image.</param>
/// <param name="height">The target height of the asset, if it is an image.</param>
@ -56,10 +57,10 @@ namespace Squidex.Areas.Api.Controllers.Assets
/// 404 => Asset or app not found.
/// </returns>
[HttpGet]
[Route("assets/{id}/")]
[Route("assets/{id}/{*more}")]
[ProducesResponseType(typeof(FileResult), 200)]
[ApiCosts(0.5)]
public async Task<IActionResult> GetAssetContent(Guid id, [FromQuery] long version = EtagVersion.Any, [FromQuery] int? width = null, [FromQuery] int? height = null, [FromQuery] string mode = null)
public async Task<IActionResult> GetAssetContent(Guid id, string more, [FromQuery] long version = EtagVersion.Any, [FromQuery] int? width = null, [FromQuery] int? height = null, [FromQuery] string mode = null)
{
var entity = await assetRepository.FindAssetAsync(id);

2
src/Squidex/Program.cs

@ -37,7 +37,7 @@ namespace Squidex
{
builder.Sources.Clear();
builder.AddJsonFile("appsettings.json", true, true);
builder.AddJsonFile($"appsettings.json", true, true);
builder.AddJsonFile($"appsettings.{hostContext.HostingEnvironment.EnvironmentName}.json", true);
builder.AddEnvironmentVariables();

2
src/Squidex/app/features/dashboard/pages/dashboard-page.component.html

@ -12,7 +12,7 @@
</div>
<div class="clearfix">
<a class="card card-href" [routerLink]="['schemas', { showDialog: true }]" *ngIf="app.permission !== 'Editor'">
<a class="card card-href" [routerLink]="['schemas', { showDialog: true }]" *sqxPermission="'squidex.apps.{app}.schemas.*.read'">
<div class="card-body">
<div class="card-image">
<img src="/images/dashboard-schema.png" />

2
src/Squidex/app/features/settings/pages/clients/client.component.html

@ -1,7 +1,7 @@
<div class="card">
<div class="card-header">
<div class="row no-gutters">
<div class="col">
<div class="col col-name">
<form *ngIf="isRenaming" class="form-inline" [formGroup]="renameForm.form" (ngSubmit)="rename()">
<div class="form-group mr-1">
<sqx-control-errors for="name"></sqx-control-errors>

4
src/Squidex/app/features/settings/pages/clients/client.component.scss

@ -15,13 +15,15 @@ $color-editor: #eceeef;
& {
margin-bottom: .5rem;
}
}
}
.col-name {
&:hover {
.client-edit {
display: inline-block;
}
}
}
}
.client {

4
src/Squidex/app/shell/pages/internal/apps-menu.component.html

@ -37,7 +37,8 @@
</li>
<ng-container *ngIf="appsState.selectedApp | async; let selectedApp">
<li class="nav-item" *ngIf="selectedApp.planUpgrade && selectedApp.planName && selectedApp.permission === 'Owner'">
<ng-container *ngIf="selectedApp.planUpgrade && selectedApp.planName">
<li class="nav-item" *sqxPermission="'squidex.apps.{app}.plans.change'">
<div class="btn-group app-upgrade">
<button type="button" class="btn btn-primary btn-plan">
You are on the <strong>{{selectedApp.planName}}</strong> plan.
@ -48,6 +49,7 @@
</div>
</li>
</ng-container>
</ng-container>
</ul>
<ng-container *sqxModalView="addAppDialog;onRoot:true">

Loading…
Cancel
Save