2018-05-14 04:59:57 +08:00
|
|
|
<button id="shareButton" class="nav-link btn btn-default btn-link"
|
2018-05-23 08:58:12 +08:00
|
|
|
type="button" [disabled]="!enabled" (click)="openModal(shareModal)">
|
2018-05-14 04:59:57 +08:00
|
|
|
<span class="oi oi-share"></span>
|
2017-12-25 07:42:25 +08:00
|
|
|
<ng-container i18n>Share</ng-container>
|
2017-07-08 04:54:18 +08:00
|
|
|
</button>
|
|
|
|
|
2018-05-23 08:58:12 +08:00
|
|
|
<ng-template #shareModal>
|
|
|
|
<!-- sharing Modal-->
|
|
|
|
<div class="modal-header">
|
|
|
|
<h5 class="modal-title" i18n>Share</h5>
|
|
|
|
<button type="button" class="close" (click)="hideModal()" data-dismiss="modal" aria-label="Close">
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-7 col-sm-9">
|
|
|
|
<input id="shareLink"
|
|
|
|
name="shareLink"
|
|
|
|
placeholder="link"
|
|
|
|
class="form-control input-md"
|
|
|
|
type="text"
|
|
|
|
[ngModel]="url">
|
|
|
|
</div>
|
|
|
|
<div class="col-5 col-sm-3">
|
|
|
|
<button id="copyButton" name="copyButton"
|
|
|
|
ngxClipboard [cbContent]="url"
|
|
|
|
(cbOnSuccess)="onCopy()"
|
|
|
|
class="btn btn-primary btn-block" i18n>Copy
|
2018-05-14 04:59:57 +08:00
|
|
|
</button>
|
2017-07-04 01:17:49 +08:00
|
|
|
</div>
|
2018-05-23 08:58:12 +08:00
|
|
|
</div>
|
|
|
|
<hr/>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-4">
|
|
|
|
<label class="control-label" i18n>Sharing:</label>
|
|
|
|
</div>
|
|
|
|
<div class="col-8">
|
|
|
|
<input disabled type="text"
|
|
|
|
class="full-width form-control"
|
|
|
|
[ngModel]="currentDir">
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-09 18:03:17 +08:00
|
|
|
|
2018-05-23 08:58:12 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-4">
|
|
|
|
<label class="control-label" i18n>Include subfolders:</label>
|
|
|
|
</div>
|
|
|
|
<div class="col-8">
|
|
|
|
<bSwitch
|
|
|
|
class="switch"
|
|
|
|
name="includeSubfolders"
|
|
|
|
[switch-on-color]="'success'"
|
|
|
|
[switch-inverse]="'inverse'"
|
|
|
|
[switch-off-text]="text.No"
|
|
|
|
[switch-on-text]="text.Yes"
|
|
|
|
[switch-handle-width]="'100'"
|
|
|
|
[switch-label-width]="'20'"
|
|
|
|
(change)="update()"
|
|
|
|
[(ngModel)]="input.includeSubfolders">
|
|
|
|
</bSwitch>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-09 18:03:17 +08:00
|
|
|
|
2018-05-23 08:58:12 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-4">
|
|
|
|
<label class="control-label">
|
|
|
|
<ng-container i18n>Password</ng-container>
|
|
|
|
:
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="col-8">
|
|
|
|
<input id="password"
|
|
|
|
class="form-control"
|
|
|
|
type="password"
|
|
|
|
(change)="update()"
|
|
|
|
[(ngModel)]="input.password"
|
|
|
|
i18n-placeholder
|
|
|
|
placeholder="Password">
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-09 18:03:17 +08:00
|
|
|
|
2018-05-23 08:58:12 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-4">
|
|
|
|
<label class="control-label" i18n>Valid:</label>
|
|
|
|
</div>
|
|
|
|
<div class="col-4" style="padding-right: 1px">
|
|
|
|
<input class="form-control" [(ngModel)]="input.valid.amount" (change)="update()"
|
|
|
|
name="validAmount"
|
|
|
|
type="number" min="0" step="1"/>
|
|
|
|
</div>
|
|
|
|
<div class="col-4" style="padding-left: 1px">
|
|
|
|
<select class="form-control" [(ngModel)]="input.valid.type" (change)="update()" name="validType"
|
|
|
|
required>
|
|
|
|
<option [ngValue]="ValidityTypes.Minutes" i18n>Minutes</option>
|
|
|
|
<option [ngValue]="ValidityTypes.Hours" i18n>Hours</option>
|
|
|
|
<option [ngValue]="ValidityTypes.Days" i18n>Days</option>
|
|
|
|
<option [ngValue]="ValidityTypes.Months" i18n>Months</option>
|
|
|
|
</select>
|
2017-07-04 01:17:49 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-05-23 08:58:12 +08:00
|
|
|
</ng-template>
|