mirror of https://github.com/Squidex/squidex.git
committed by
GitHub
26 changed files with 411 additions and 272 deletions
@ -0,0 +1,43 @@ |
|||||
|
<div class="card card-href card-app" [routerLink]="['/app', app.name]"> |
||||
|
<div class="card-body"> |
||||
|
<div class="row no-gutters"> |
||||
|
<div class="col-auto card-left"> |
||||
|
<sqx-avatar [image]="app.image" [identifier]="app.name"></sqx-avatar> |
||||
|
</div> |
||||
|
<div class="col card-right"> |
||||
|
<h3 class="card-title">{{app.displayName}}</h3> |
||||
|
|
||||
|
<div class="card-text card-links truncate"> |
||||
|
<a [routerLink]="['/app', app.name]" sqxStopClick>{{ 'common.edit' | sqxTranslate }}</a> |
||||
|
|
||||
|
<span class="deeplinks"> |
||||
|
| |
||||
|
<a [routerLink]="['/app', app.name, 'content']" sqxStopClick>{{ 'common.content' | sqxTranslate }}</a> · |
||||
|
<a [routerLink]="['/app', app.name, 'assets']" sqxStopClick>{{ 'common.assets' | sqxTranslate }}</a> · |
||||
|
<a [routerLink]="['/app', app.name, 'settings']" sqxStopClick>{{ 'common.settings' | sqxTranslate }}</a> |
||||
|
</span> |
||||
|
</div> |
||||
|
|
||||
|
<div class="card-text" *ngIf="app.description"> |
||||
|
{{app.description}} |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<button type="button" class="btn btn-sm btn-text-secondary" (click)="dropdown.toggle()" sqxStopClick [class.active]="dropdown.isOpen | async" #buttonOptions> |
||||
|
<i class="icon-dots"></i> |
||||
|
</button> |
||||
|
|
||||
|
<ng-container *sqxModal="dropdown;closeAlways:true"> |
||||
|
<div class="dropdown-menu" [sqxAnchoredTo]="buttonOptions" @fade> |
||||
|
<a class="dropdown-item dropdown-item-delete" |
||||
|
(sqxConfirmClick)="leave.emit(app)" |
||||
|
confirmTitle="i18n:apps.leaveConfirmTitle" |
||||
|
confirmText="i18n:apps.leaveConfirmText" |
||||
|
confirmRememberKey="leaveApp"> |
||||
|
{{ 'apps.leave' | sqxTranslate }} |
||||
|
</a> |
||||
|
</div> |
||||
|
</ng-container> |
||||
|
</div> |
||||
|
</div> |
||||
@ -0,0 +1,11 @@ |
|||||
|
.btn { |
||||
|
@include absolute(1rem, 1rem); |
||||
|
} |
||||
|
|
||||
|
.card-body { |
||||
|
position: relative; |
||||
|
} |
||||
|
|
||||
|
.card-title { |
||||
|
padding-right: 2rem; |
||||
|
} |
||||
@ -0,0 +1,28 @@ |
|||||
|
/* |
||||
|
* Squidex Headless CMS |
||||
|
* |
||||
|
* @license |
||||
|
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. |
||||
|
*/ |
||||
|
|
||||
|
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core'; |
||||
|
import { AppDto, fadeAnimation, ModalModel } from '@app/shared'; |
||||
|
|
||||
|
@Component({ |
||||
|
selector: 'sqx-app', |
||||
|
styleUrls: ['./app.component.scss'], |
||||
|
templateUrl: './app.component.html', |
||||
|
animations: [ |
||||
|
fadeAnimation |
||||
|
], |
||||
|
changeDetection: ChangeDetectionStrategy.OnPush |
||||
|
}) |
||||
|
export class AppComponent { |
||||
|
@Input() |
||||
|
public app: AppDto; |
||||
|
|
||||
|
@Output() |
||||
|
public leave = new EventEmitter<AppDto>(); |
||||
|
|
||||
|
public dropdown = new ModalModel(); |
||||
|
} |
||||
Loading…
Reference in new issue