2017-07-09 18:03:17 +08:00
|
|
|
<button id="shareButton" class="btn btn-default navbar-btn btn-link"
|
|
|
|
type="button" [disabled]="!enabled" (click)="showModal()">
|
2017-07-08 04:54:18 +08:00
|
|
|
<span class="glyphicon glyphicon-share-alt"></span>
|
|
|
|
Share
|
|
|
|
</button>
|
|
|
|
|
2017-07-04 01:17:49 +08:00
|
|
|
<!-- sharing Modal-->
|
2017-07-09 18:03:17 +08:00
|
|
|
<div bsModal #shareModal="bs-modal"
|
|
|
|
class="modal fade" id="shareModal"
|
|
|
|
tabindex="-1" role="dialog" aria-labelledby="shareModalLabel"
|
|
|
|
[config]="{ backdrop: false }"
|
2017-07-04 01:17:49 +08:00
|
|
|
aria-hidden="true">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
2017-07-09 18:03:17 +08:00
|
|
|
<button type="button" class="close" (click)="shareModal.hide()" aria-label="Close"><span
|
2017-07-04 01:17:49 +08:00
|
|
|
aria-hidden="true">×</span></button>
|
|
|
|
<h4 class="modal-title" id="shareModalLabel">Share</h4>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-10">
|
2017-07-09 18:03:17 +08:00
|
|
|
<input id="shareLink"
|
|
|
|
name="shareLink"
|
|
|
|
placeholder="link"
|
|
|
|
class="form-control input-md"
|
|
|
|
type="text"
|
2017-07-04 01:17:49 +08:00
|
|
|
[ngModel]="url">
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-2 pull-right">
|
2017-07-09 18:03:17 +08:00
|
|
|
<button id="copyButton" name="copyButton"
|
|
|
|
ngxClipboard [cbContent]="url"
|
|
|
|
(cbOnSuccess)="onCopy()"
|
|
|
|
class="btn btn-primary">Copy
|
2017-07-04 01:17:49 +08:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr/>
|
2017-07-09 18:03:17 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-2">
|
|
|
|
<label class="control-label">Sharing:</label>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-10">
|
|
|
|
<input disabled type="text"
|
|
|
|
class="full-width form-control"
|
|
|
|
[ngModel]="currentDir">
|
2017-07-04 01:17:49 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-09 18:03:17 +08:00
|
|
|
|
2017-07-04 01:17:49 +08:00
|
|
|
<div class="row">
|
2017-07-09 18:03:17 +08:00
|
|
|
<div class="col-sm-2">
|
|
|
|
<label class="control-label">Include subfolders:</label>
|
|
|
|
</div>
|
2017-07-04 01:17:49 +08:00
|
|
|
<div class="col-sm-4">
|
2017-07-09 18:03:17 +08:00
|
|
|
<input id="recursiveShareBox"
|
|
|
|
type="checkbox"
|
|
|
|
(change)="update()"
|
|
|
|
[(ngModel)]="input.includeSubfolders"
|
|
|
|
checked="checked"
|
|
|
|
value="remember-me">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-2">
|
|
|
|
<label class="control-label">Password:</label>
|
2017-07-04 01:17:49 +08:00
|
|
|
</div>
|
|
|
|
<div class="col-sm-4">
|
2017-07-09 18:03:17 +08:00
|
|
|
<input id="password"
|
|
|
|
class="form-control"
|
|
|
|
type="password"
|
|
|
|
(change)="update()"
|
|
|
|
[(ngModel)]="input.password"
|
|
|
|
placeholder="Password">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-2">
|
|
|
|
<label class="control-label">Valid:</label>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-3" style="padding-right: 1px">
|
|
|
|
<input class="form-control" [(ngModel)]="input.valid.amount" (change)="update()"
|
2017-07-04 01:17:49 +08:00
|
|
|
name="validAmount"
|
|
|
|
type="number" min="0" step="1"/>
|
|
|
|
</div>
|
2017-07-09 18:03:17 +08:00
|
|
|
<div class="col-sm-3" style="padding-left: 1px">
|
|
|
|
<select class="form-control col-md-3" [(ngModel)]="input.valid.type" (change)="update()" name="validType"
|
|
|
|
required>
|
2017-07-04 01:17:49 +08:00
|
|
|
<option *ngFor="let repository of validityTypes" [value]="repository.key">{{repository.value}}
|
|
|
|
</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-09 18:03:17 +08:00
|
|
|
|
2017-07-04 01:17:49 +08:00
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|