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"> |
<sqx-panel desiredWidth="61rem"> |
||||
<ng-container title> |
<div class="panel-header"> |
||||
Contributors |
<div class="panel-title-row"> |
||||
</ng-container> |
<div class="float-right"> |
||||
|
<button class="btn btn-link btn-secondary" (click)="load(true)" title="Refresh Plans (CTRL + SHIFT + R)"> |
||||
<ng-container menu> |
<i class="icon-reset"></i> Refresh |
||||
<button class="btn btn-link btn-secondary" (click)="load(true)" title="Refresh Plans (CTRL + SHIFT + R)"> |
</button> |
||||
<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="text-muted text-center empty" *ngIf="plans.plans.length === 0"> |
<sqx-shortcut keys="ctrl+shift+r" (trigger)="load(true)"></sqx-shortcut> |
||||
No plan configured, this app has unlimited usage. |
|
||||
</div> |
</div> |
||||
|
|
||||
<div class="clearfix"> |
<h3 class="panel-title">Update Plan</h3> |
||||
<div class="card plan float-left" *ngFor="let plan of plans.plans"> |
</div> |
||||
<div class="card-body plan-header text-center"> |
|
||||
<h4 class="card-title">{{plan.name}}</h4> |
|
||||
<h5 class="plan-price">{{plan.costs}}</h5> |
|
||||
|
|
||||
<small class="text-muted">Per Month</small> |
<a class="panel-close" sqxParentLink> |
||||
</div> |
<i class="icon-close"></i> |
||||
<div class="card-body"> |
</a> |
||||
<div class="plan-fact"> |
</div> |
||||
{{plan.maxApiCalls | sqxKNumber}} API Calls |
|
||||
|
<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> |
||||
<div class="plan-fact"> |
<div class="card-body"> |
||||
{{plan.maxAssetSize | sqxFileSize}} Storage |
<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> |
||||
<div class="plan-fact"> |
<div class="card-footer" *ngIf="plan.yearlyId"> |
||||
{{plan.maxContributors}} Contributors |
<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> |
</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> |
|
||||
|
|
||||
<div *ngIf="plans.hasPortal" class="billing-portal-link"> |
<div *ngIf="plans.hasPortal" class="billing-portal-link"> |
||||
Go to <a target="_blank" href="{{portalUrl}}">Billing Portal</a> for payment history and subscription overview. |
Go to <a target="_blank" href="{{portalUrl}}">Billing Portal</a> for payment history and subscription overview. |
||||
|
</div> |
||||
</div> |
</div> |
||||
</ng-container> |
</div> |
||||
</ng-container> |
</div> |
||||
</sqx-panel> |
</sqx-panel> |
||||
Loading…
Reference in new issue