1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-12-28 17:18:24 +01:00

Block save button when uploading a send (#871)

* Block save button when uploading a send

* Add overflow hidden to prevent scrollbar appearing
This commit is contained in:
Oscar Hinton 2021-05-04 23:36:57 +02:00 committed by GitHub
parent 3a342be095
commit 2bdd7413aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 5 deletions

2
jslib

@ -1 +1 @@
Subproject commit a72c8a60c1b7a6980bceee456c53a9ea7b9b3451
Subproject commit e2cb9b6bef54a1bc04174aa9eec02ea800962887

View File

@ -1,4 +1,4 @@
<form (ngSubmit)="submit()" [appApiAction]="formPromise">
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise">
<div class="content">
<div class="inner-content" *ngIf="send">
<div class="box">
@ -182,10 +182,11 @@
</div>
</div>
<div class="footer">
<button appBlurClick type="submit" class="primary" appA11yTitle="{{'save' | i18n}}" *ngIf="!disableSend">
<i class="fa fa-save fa-lg fa-fw" aria-hidden="true"></i>
<button appBlurClick type="submit" class="primary btn-submit" appA11yTitle="{{'save' | i18n}}" [disabled]="form.loading" *ngIf="!disableSend">
<i class="fa fa-spinner fa-spin" title="{{'loading' | i18n}}" aria-hidden="true"></i>
<span><i class="fa fa-save fa-lg fa-fw" aria-hidden="true"></i></span>
</button>
<button appBlurClick type="button" (click)="cancel()">
<button appBlurClick type="button" (click)="cancel()" [disabled]="form.loading">
{{'cancel' | i18n}}
</button>
<div class="right">

View File

@ -86,3 +86,29 @@
}
}
}
.btn-submit {
position: relative;
overflow: hidden;
.fa-spinner {
position: absolute;
display: none;
align-items: center;
justify-content: center;
bottom: 0;
top: 0;
left: 0;
right: 0;
}
&:disabled:not(.manual), &.loading {
.fa-spinner {
display: flex;
}
span {
visibility: hidden;
}
}
}