bitwarden-estensione-browser/src/app/vault/attachments.component.html

69 lines
4.4 KiB
HTML
Raw Normal View History

2019-10-11 17:47:41 +02:00
<div class="modal fade" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="attachmentsTitle">
<div class="modal-dialog modal-dialog-scrollable" role="document">
<form class="modal-content" #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate>
2018-06-08 18:04:03 +02:00
<div class="modal-header">
2019-10-11 17:47:41 +02:00
<h2 class="modal-title" id="attachmentsTitle">
2018-06-08 18:04:03 +02:00
{{'attachments' | i18n}}
2018-06-08 18:45:31 +02:00
<small *ngIf="cipher">{{cipher.name}}</small>
2018-06-08 18:04:03 +02:00
</h2>
2019-10-11 17:22:21 +02:00
<button type="button" class="close" data-dismiss="modal" appA11yTitle="{{'close' | i18n}}">
2018-06-08 18:04:03 +02:00
<span aria-hidden="true">&times;</span>
</button>
</div>
2018-06-06 23:25:57 +02:00
<div class="modal-body">
2018-06-08 18:04:03 +02:00
<table class="table table-hover table-list" *ngIf="cipher && cipher.hasAttachments">
<tbody>
<tr *ngFor="let a of cipher.attachments">
2018-06-08 18:45:31 +02:00
<td class="table-list-icon">
2019-10-11 17:22:21 +02:00
<i class="fa fa-fw fa-lg fa-file-o" *ngIf="!a.downloading" aria-hidden="true"></i>
<i class="fa fa-spinner fa-lg fa-fw fa-spin" *ngIf="a.downloading"
aria-hidden="true"></i>
2018-06-08 18:45:31 +02:00
</td>
<td class="wrap">
<div class="d-flex">
<a href="#" appStopClick (click)="download(a)">{{a.fileName}}</a>
<div *ngIf="showFixOldAttachments(a)" class="ml-2">
2018-11-26 18:25:27 +01:00
<a href="https://help.bitwarden.com/article/attachments/#fixing-old-attachments"
2018-11-16 15:17:33 +01:00
target="_blank" rel="noopener">
2019-02-21 22:50:37 +01:00
<i class="fa fa-exclamation-triangle text-warning"
2019-10-11 16:35:24 +02:00
title="{{'attachmentFixDesc' | i18n}}" aria-hidden="true"></i>
<span class="sr-only">{{'attachmentFixDesc' | i18n}}</span></a>
<button type="button" class="btn btn-outline-primary btn-sm m-0 py-0 px-2"
(click)="reupload(a)" #reuploadBtn [appApiAction]="reuploadPromises[a.id]"
[disabled]="reuploadBtn.loading">{{'fix' | i18n}}</button>
</div>
</div>
2018-06-08 18:04:03 +02:00
<small>{{a.sizeName}}</small>
</td>
<td class="table-list-options" *ngIf="!viewOnly">
2019-02-21 22:50:37 +01:00
<button class="btn btn-outline-danger" type="button" appStopClick
2019-10-11 16:35:24 +02:00
appA11yTitle="{{'delete' | i18n}}" (click)="delete(a)" #deleteBtn
2019-02-21 22:50:37 +01:00
[appApiAction]="deletePromises[a.id]" [disabled]="deleteBtn.loading">
2019-10-11 16:35:24 +02:00
<i class="fa fa-trash-o fa-lg fa-fw" [hidden]="deleteBtn.loading"
aria-hidden="true"></i>
2019-02-21 22:50:37 +01:00
<i class="fa fa-spinner fa-spin fa-lg fa-fw" [hidden]="!deleteBtn.loading"
2019-10-11 16:35:24 +02:00
title="{{'loading' | i18n}}" aria-hidden="true"></i>
2018-06-06 23:25:57 +02:00
</button>
2018-06-08 18:04:03 +02:00
</td>
</tr>
</tbody>
</table>
<div *ngIf="!viewOnly">
<h3>{{'newAttachment' | i18n}}</h3>
<label for="file" class="sr-only">{{'file' | i18n}}</label>
<input type="file" id="file" class="form-control-file" name="file" required>
<small class="form-text text-muted">{{'maxFileSize' | i18n}}</small>
</div>
2018-06-06 23:25:57 +02:00
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading" *ngIf="!viewOnly">
2019-10-11 16:35:24 +02:00
<i class="fa fa-spinner fa-spin" title="{{'loading' | i18n}}" aria-hidden="true"></i>
2018-06-21 16:06:32 +02:00
<span>{{'save' | i18n}}</span>
2018-06-06 23:25:57 +02:00
</button>
2019-10-11 16:35:24 +02:00
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">{{'close'
| i18n}}</button>
2018-06-06 23:25:57 +02:00
</div>
</form>
</div>
</div>