mirror of https://github.com/Squidex/squidex.git
Browse Source
# Conflicts: # src/Squidex/app/features/administration/pages/users/user-page.component.ts # src/Squidex/app/features/settings/pages/contributors/contributors-page.component.html # src/Squidex/app/features/settings/pages/contributors/contributors-page.component.ts # src/Squidex/app/features/settings/pages/plans/plans-page.component.html # src/Squidex/app/shared/components/pipes.ts # src/Squidex/app/shared/services/users.service.spec.ts # src/Squidex/app/shared/services/users.service.tspull/271/head
57 changed files with 849 additions and 288 deletions
@ -0,0 +1,20 @@ |
|||
// ==========================================================================
|
|||
// Squidex Headless CMS
|
|||
// ==========================================================================
|
|||
// Copyright (c) Squidex UG (haftungsbeschraenkt)
|
|||
// All rights reserved. Licensed under the MIT license.
|
|||
// ==========================================================================
|
|||
|
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace Squidex.Areas.Api.Controllers.Apps.Models |
|||
{ |
|||
public sealed class ContributorAssignedDto |
|||
{ |
|||
/// <summary>
|
|||
/// The id of the user that has been assigned as contributor.
|
|||
/// </summary>
|
|||
[Required] |
|||
public string ContributorId { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,26 @@ |
|||
// ==========================================================================
|
|||
// Squidex Headless CMS
|
|||
// ==========================================================================
|
|||
// Copyright (c) Squidex UG (haftungsbeschränkt)
|
|||
// All rights reserved. Licensed under the MIT license.
|
|||
// ==========================================================================
|
|||
|
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace Squidex.Areas.Api.Controllers.Users.Models |
|||
{ |
|||
public sealed class PublicUserDto |
|||
{ |
|||
/// <summary>
|
|||
/// The id of the user.
|
|||
/// </summary>
|
|||
[Required] |
|||
public string Id { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// The display name (usually first name and last name) of the user.
|
|||
/// </summary>
|
|||
[Required] |
|||
public string DisplayName { get; set; } |
|||
} |
|||
} |
|||
@ -1,62 +1,86 @@ |
|||
<sqx-title message="{app} | Plans | Settings" parameter1="app" [value1]="appsState.appName"></sqx-title> |
|||
<sqx-title message="{app} | Plans | Settings" parameter1="app" [value1]="ctx.appName"></sqx-title> |
|||
|
|||
<sqx-panel desiredWidth="61rem"> |
|||
<ng-container title> |
|||
Contributors |
|||
</ng-container> |
|||
|
|||
<ng-container menu> |
|||
<button class="btn btn-link btn-secondary" (click)="load(true)" title="Refresh Plans (CTRL + SHIFT + R)"> |
|||
<i class="icon-reset"></i> Refresh |
|||
</button> |
|||
|
|||
<sqx-shortcut keys="ctrl+shift+r" (trigger)="load(true)"></sqx-shortcut> |
|||
</ng-container> |
|||
|
|||
<ng-container content> |
|||
<ng-container *ngIf="plans"> |
|||
<div class="panel-alert panel-alert-danger" *ngIf="!planOwned"> |
|||
You have not created the subscription. Therefore you cannot change the plan. |
|||
</div> |
|||
<div class="panel-header"> |
|||
<div class="panel-title-row"> |
|||
<div class="float-right"> |
|||
<button class="btn btn-link btn-secondary" (click)="load(true)" title="Refresh Plans (CTRL + SHIFT + R)"> |
|||
<i class="icon-reset"></i> Refresh |
|||
</button> |
|||
|
|||
<div class="text-muted text-center empty" *ngIf="plans.plans.length === 0"> |
|||
No plan configured, this app has unlimited usage. |
|||
<sqx-shortcut keys="ctrl+shift+r" (trigger)="load(true)"></sqx-shortcut> |
|||
</div> |
|||
|
|||
<div class="clearfix"> |
|||
<div class="card plan float-left" *ngFor="let plan of plans.plans"> |
|||
<div class="card-body plan-header text-center"> |
|||
<h4 class="card-title">{{plan.name}}</h4> |
|||
<h5 class="plan-price">{{plan.costs}}</h5> |
|||
<h3 class="panel-title">Update Plan</h3> |
|||
</div> |
|||
|
|||
<small class="text-muted">Per Month</small> |
|||
</div> |
|||
<div class="card-body"> |
|||
<div class="plan-fact"> |
|||
{{plan.maxApiCalls | sqxKNumber}} API Calls |
|||
<a class="panel-close" sqxParentLink> |
|||
<i class="icon-close"></i> |
|||
</a> |
|||
</div> |
|||
|
|||
<div class="panel-main"> |
|||
<div class="panel-content"> |
|||
<div *ngIf="plans"> |
|||
<div class="panel-alert panel-alert-danger" *ngIf="!planOwned"> |
|||
You have not created the subscription. Therefore you cannot change the plan. |
|||
</div> |
|||
|
|||
<div class="text-muted text-center empty" *ngIf="plans.plans.length === 0"> |
|||
No plan configured, this app has unlimited usage. |
|||
</div> |
|||
|
|||
<div class="clearfix"> |
|||
<div class="card plan float-left" *ngFor="let plan of plans.plans"> |
|||
<div class="card-header text-center"> |
|||
<h4 class="card-title">{{plan.name}}</h4> |
|||
<h5 class="plan-price">{{plan.costs}}</h5> |
|||
|
|||
<small class="text-muted">Per Month</small> |
|||
</div> |
|||
<div class="plan-fact"> |
|||
{{plan.maxAssetSize | sqxFileSize}} Storage |
|||
<div class="card-body"> |
|||
<div class="plan-fact text-center"> |
|||
<div> |
|||
<strong>{{plan.maxApiCalls | sqxKNumber}}</strong> API Calls |
|||
</div> |
|||
<div> |
|||
{{plan.maxAssetSize | sqxFileSize}} Storage |
|||
</div> |
|||
<div> |
|||
{{plan.maxContributors}} Contributors |
|||
</div> |
|||
</div> |
|||
|
|||
<button *ngIf="plan.id === plans.currentPlanId" class="btn btn-block btn-link btn-success plan-selected"> |
|||
✓ Selected |
|||
</button> |
|||
|
|||
<button *ngIf="plan.id !== plans.currentPlanId" class="btn btn-block btn-success" [disabled]="isDisabled || !planOwned" (click)="changePlan(plan.id)"> |
|||
Change |
|||
</button> |
|||
</div> |
|||
<div class="plan-fact"> |
|||
{{plan.maxContributors}} Contributors |
|||
<div class="card-footer" *ngIf="plan.yearlyId"> |
|||
<div class="text-center"> |
|||
<h5 class="plan-price">{{plan.yearlyCosts}}</h5> |
|||
|
|||
<small class="text-muted">Per Year</small> |
|||
</div> |
|||
|
|||
<button *ngIf="plan.yearlyId === plans.currentPlanId" class="btn btn-block btn-link btn-success plan-selected"> |
|||
✓ Selected |
|||
</button> |
|||
|
|||
<button *ngIf="plan.yearlyId !== plans.currentPlanId" class="btn btn-block btn-success" [disabled]="isDisabled || !planOwned" (click)="changePlan(plan.yearlyId)"> |
|||
Change |
|||
</button> |
|||
</div> |
|||
</div> |
|||
<div class="card-body"> |
|||
<button *ngIf="plan.id === plans.currentPlanId" class="btn btn-block btn-link btn-success plan-selected"> |
|||
✓ Selected |
|||
</button> |
|||
|
|||
<button *ngIf="plan.id !== plans.currentPlanId" class="btn btn-block btn-success" [disabled]="isDisabled || !planOwned" (click)="changePlan(plan.id)"> |
|||
Change |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div *ngIf="plans.hasPortal" class="billing-portal-link"> |
|||
Go to <a target="_blank" href="{{portalUrl}}">Billing Portal</a> for payment history and subscription overview. |
|||
<div *ngIf="plans.hasPortal" class="billing-portal-link"> |
|||
Go to <a target="_blank" href="{{portalUrl}}">Billing Portal</a> for payment history and subscription overview. |
|||
</div> |
|||
</div> |
|||
</ng-container> |
|||
</ng-container> |
|||
</div> |
|||
</div> |
|||
</sqx-panel> |
|||
Loading…
Reference in new issue