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. 10
      src/Squidex/app/features/settings/pages/clients/client.component.scss
  6. 22
      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. /// Get the asset content.
/// </summary> /// </summary>
/// <param name="id">The id of the asset.</param> /// <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="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="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> /// <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. /// 404 => Asset or app not found.
/// </returns> /// </returns>
[HttpGet] [HttpGet]
[Route("assets/{id}/")] [Route("assets/{id}/{*more}")]
[ProducesResponseType(typeof(FileResult), 200)] [ProducesResponseType(typeof(FileResult), 200)]
[ApiCosts(0.5)] [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); var entity = await assetRepository.FindAssetAsync(id);

2
src/Squidex/Program.cs

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

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

@ -12,7 +12,7 @@
</div> </div>
<div class="clearfix"> <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-body">
<div class="card-image"> <div class="card-image">
<img src="/images/dashboard-schema.png" /> <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">
<div class="card-header"> <div class="card-header">
<div class="row no-gutters"> <div class="row no-gutters">
<div class="col"> <div class="col col-name">
<form *ngIf="isRenaming" class="form-inline" [formGroup]="renameForm.form" (ngSubmit)="rename()"> <form *ngIf="isRenaming" class="form-inline" [formGroup]="renameForm.form" (ngSubmit)="rename()">
<div class="form-group mr-1"> <div class="form-group mr-1">
<sqx-control-errors for="name"></sqx-control-errors> <sqx-control-errors for="name"></sqx-control-errors>

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

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

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

@ -37,16 +37,18 @@
</li> </li>
<ng-container *ngIf="appsState.selectedApp | async; let selectedApp"> <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">
<div class="btn-group app-upgrade"> <li class="nav-item" *sqxPermission="'squidex.apps.{app}.plans.change'">
<button type="button" class="btn btn-primary btn-plan"> <div class="btn-group app-upgrade">
You are on the <strong>{{selectedApp.planName}}</strong> plan. <button type="button" class="btn btn-primary btn-plan">
</button> You are on the <strong>{{selectedApp.planName}}</strong> plan.
<button type="button" class="btn btn-warning" [routerLink]="['/app', selectedApp.name, 'settings', 'plans']"> </button>
Upgrade! <button type="button" class="btn btn-warning" [routerLink]="['/app', selectedApp.name, 'settings', 'plans']">
</button> Upgrade!
</div> </button>
</li> </div>
</li>
</ng-container>
</ng-container> </ng-container>
</ul> </ul>

Loading…
Cancel
Save