Eugenio Romano 2761626f55
[ADF-ADF-2528] share directive (#3102)
* share file directive

* share link phase 2

* share dialog

* share dialog test

* more documentation

* add more meaningfully specification

* Add  description in the dialog
2018-03-20 22:32:56 +00:00

33 lines
1.1 KiB
HTML

<h1 mat-dialog-title id="adf-share-title" >{{ 'SHARE.TITLE' | translate }} {{fileName}}</h1>
<mat-dialog-content>
<span class="spacer"></span>
<mat-slide-toggle [checked]="isFileShared" [disabled]="isDisabled" (change)="onSlideShareChange($event)">
{{ 'SHARE.ACTIONS.SHARE' | translate }}
</mat-slide-toggle>
<span class="spacer"></span>
.
<h2 *ngIf="isFileShared">{{ 'SHARE.DESCRIPTION' | translate }}</h2>
<div *ngIf="isFileShared">{{ 'SHARE.ALERT' | translate }}</div>
<form *ngIf="isFileShared">
<mat-form-field class="full-width">
<input class="adf-share-link" matInput placeholder="{{ 'SHARE.PUBLIC-LINK' | translate }}" [value]="baseShareUrl + sharedId">
<mat-icon matPrefix>link</mat-icon>
</mat-form-field>
</form>
<h2 *ngIf="!isFileShared">{{ 'SHARE.UNSHARED' | translate }}</h2>
</mat-dialog-content>
<mat-dialog-actions>
<button mat-button color="primary" (click)="cancelShare()">
{{ 'SHARE.ACTIONS.CLOSE' | translate }}
</button>
</mat-dialog-actions>