mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-03 18:28:13 +01:00
send improvements and bug fixes (#757)
* send improvements and bug fixes * update jslib * update jslib * update jslib * update jslib ref * Hide match uri overflow (#758) match descriptions are overflowing in german and causing the uri delete button to overflow off of the cipher view modal * update jslib * jslib ref * update jslib Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
This commit is contained in:
parent
577cab24c4
commit
c43012a5f2
@ -25,6 +25,12 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="card-body" *ngIf="!loading && unavailable">
|
||||||
|
{{'sendAccessUnavailable' | i18n}}
|
||||||
|
</div>
|
||||||
|
<div class="card-body" *ngIf="!loading && error">
|
||||||
|
{{'unexpectedError' | i18n}}
|
||||||
|
</div>
|
||||||
<div class="card-body" *ngIf="!loading && !passwordRequired && send">
|
<div class="card-body" *ngIf="!loading && !passwordRequired && send">
|
||||||
<p class="text-center"><b>{{send.name}}</b></p>
|
<p class="text-center"><b>{{send.name}}</b></p>
|
||||||
<hr>
|
<hr>
|
||||||
@ -33,7 +39,7 @@
|
|||||||
<app-callout *ngIf="send.text.hidden" type="tip">{{'sendHiddenByDefault' | i18n}}</app-callout>
|
<app-callout *ngIf="send.text.hidden" type="tip">{{'sendHiddenByDefault' | i18n}}</app-callout>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<textarea id="text" rows="8" name="Text" [(ngModel)]="sendText" class="form-control"
|
<textarea id="text" rows="8" name="Text" [(ngModel)]="sendText" class="form-control"
|
||||||
readonly (click)="selectText()"></textarea>
|
readonly></textarea>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-block btn-link" type="button" (click)="toggleText()"
|
<button class="btn btn-block btn-link" type="button" (click)="toggleText()"
|
||||||
*ngIf="send.text.hidden">
|
*ngIf="send.text.hidden">
|
||||||
|
@ -37,6 +37,8 @@ export class AccessComponent implements OnInit {
|
|||||||
formPromise: Promise<SendAccessResponse>;
|
formPromise: Promise<SendAccessResponse>;
|
||||||
password: string;
|
password: string;
|
||||||
showText = false;
|
showText = false;
|
||||||
|
unavailable = false;
|
||||||
|
error = false;
|
||||||
|
|
||||||
private id: string;
|
private id: string;
|
||||||
private key: string;
|
private key: string;
|
||||||
@ -93,10 +95,6 @@ export class AccessComponent implements OnInit {
|
|||||||
this.downloading = false;
|
this.downloading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
selectText() {
|
|
||||||
(document.getElementById('text') as HTMLInputElement).select();
|
|
||||||
}
|
|
||||||
|
|
||||||
copyText() {
|
copyText() {
|
||||||
this.platformUtilsService.copyToClipboard(this.send.text.text);
|
this.platformUtilsService.copyToClipboard(this.send.text.text);
|
||||||
this.platformUtilsService.showToast('success', null,
|
this.platformUtilsService.showToast('success', null,
|
||||||
@ -108,6 +106,8 @@ export class AccessComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async load() {
|
async load() {
|
||||||
|
this.unavailable = false;
|
||||||
|
this.error = false;
|
||||||
const keyArray = Utils.fromUrlB64ToArray(this.key);
|
const keyArray = Utils.fromUrlB64ToArray(this.key);
|
||||||
const accessRequest = new SendAccessRequest();
|
const accessRequest = new SendAccessRequest();
|
||||||
if (this.password != null) {
|
if (this.password != null) {
|
||||||
@ -131,6 +131,10 @@ export class AccessComponent implements OnInit {
|
|||||||
if (e instanceof ErrorResponse) {
|
if (e instanceof ErrorResponse) {
|
||||||
if (e.statusCode === 401) {
|
if (e.statusCode === 401) {
|
||||||
this.passwordRequired = true;
|
this.passwordRequired = true;
|
||||||
|
} else if (e.statusCode === 404) {
|
||||||
|
this.unavailable = true;
|
||||||
|
} else {
|
||||||
|
this.error = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
<div class="col-6 form-group">
|
<div class="col-6 form-group">
|
||||||
<label for="maxAccessCount">{{'maxAccessCount' | i18n}}</label>
|
<label for="maxAccessCount">{{'maxAccessCount' | i18n}}</label>
|
||||||
<input id="maxAccessCount" class="form-control" type="number" name="MaxAccessCount"
|
<input id="maxAccessCount" class="form-control" type="number" name="MaxAccessCount"
|
||||||
[(ngModel)]="send.maxAccessCount">
|
[(ngModel)]="send.maxAccessCount" min="1">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 form-group" *ngIf="editMode">
|
<div class="col-6 form-group" *ngIf="editMode">
|
||||||
<label for="accessCount">{{'currentAccessCount' | i18n}}</label>
|
<label for="accessCount">{{'currentAccessCount' | i18n}}</label>
|
||||||
@ -98,7 +98,7 @@
|
|||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" type="checkbox" [(ngModel)]="send.disabled" id="disabled"
|
<input class="form-check-input" type="checkbox" [(ngModel)]="send.disabled" id="disabled"
|
||||||
name="Disabled">
|
name="Disabled">
|
||||||
<label class="form-check-label" for="disabled">{{'disabled' | i18n}}</label>
|
<label class="form-check-label" for="disabled">{{'disableThisSend' | i18n}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" *ngIf="link">
|
<div class="form-group" *ngIf="link">
|
||||||
|
@ -62,10 +62,27 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="reduced-lh wrap">
|
<td class="reduced-lh wrap">
|
||||||
<a href="#" appStopClick appStopProp (click)="editSend(s)">{{s.name}}</a>
|
<a href="#" appStopClick appStopProp (click)="editSend(s)">{{s.name}}</a>
|
||||||
|
<span appStopClick class="badge badge-secondary" *ngIf="s.disabled">
|
||||||
|
{{'disabled' | i18n}}
|
||||||
|
</span>
|
||||||
<ng-container *ngIf="s.password">
|
<ng-container *ngIf="s.password">
|
||||||
<i class="fa fa-key" appStopProp title="{{'password' | i18n}}" aria-hidden="true"></i>
|
<i class="fa fa-key" appStopProp title="{{'password' | i18n}}" aria-hidden="true"></i>
|
||||||
<span class="sr-only">{{'password' | i18n}}</span>
|
<span class="sr-only">{{'password' | i18n}}</span>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
<ng-container *ngIf="s.maxAccessCountReached">
|
||||||
|
<i class="fa fa-ban" appStopProp title="{{'maxAccessCountReached' | i18n}}"
|
||||||
|
aria-hidden="true"></i>
|
||||||
|
<span class="sr-only">{{'maxAccessCountReached' | i18n}}</span>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="s.expired">
|
||||||
|
<i class="fa fa-clock-o" appStopProp title="{{'expired' | i18n}}" aria-hidden="true"></i>
|
||||||
|
<span class="sr-only">{{'expired' | i18n}}</span>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="s.pendingDelete">
|
||||||
|
<i class="fa fa-trash" appStopProp title="{{'pendingDeletion' | i18n}}"
|
||||||
|
aria-hidden="true"></i>
|
||||||
|
<span class="sr-only">{{'pendingDeletion' | i18n}}</span>
|
||||||
|
</ng-container>
|
||||||
<br>
|
<br>
|
||||||
<small appStopProp>{{s.deletionDate | date:'medium'}}</small>
|
<small appStopProp>{{s.deletionDate | date:'medium'}}</small>
|
||||||
</td>
|
</td>
|
||||||
|
@ -143,7 +143,7 @@ export class SendComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.actionPromise = this.apiService.putSendRemovePassword(s.id);
|
this.actionPromise = this.sendService.removePasswordWithServer(s.id);
|
||||||
await this.actionPromise;
|
await this.actionPromise;
|
||||||
this.platformUtilsService.showToast('success', null, this.i18nService.t('removedPassword'));
|
this.platformUtilsService.showToast('success', null, this.i18nService.t('removedPassword'));
|
||||||
await this.load();
|
await this.load();
|
||||||
@ -164,7 +164,7 @@ export class SendComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.actionPromise = this.apiService.deleteSend(s.id);
|
this.actionPromise = this.sendService.deleteWithServer(s.id);
|
||||||
await this.actionPromise;
|
await this.actionPromise;
|
||||||
this.platformUtilsService.showToast('success', null, this.i18nService.t('deletedSend'));
|
this.platformUtilsService.showToast('success', null, this.i18nService.t('deletedSend'));
|
||||||
await this.load();
|
await this.load();
|
||||||
|
@ -3348,9 +3348,22 @@
|
|||||||
"removePasswordConfirmation": {
|
"removePasswordConfirmation": {
|
||||||
"message": "Are you sure you want to remove the password?"
|
"message": "Are you sure you want to remove the password?"
|
||||||
},
|
},
|
||||||
|
"disableThisSend": {
|
||||||
|
"message": "Disable this Send so that no one can access it.",
|
||||||
|
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
|
||||||
|
},
|
||||||
"allSends": {
|
"allSends": {
|
||||||
"message": "All Sends"
|
"message": "All Sends"
|
||||||
},
|
},
|
||||||
|
"maxAccessCountReached": {
|
||||||
|
"message": "Max access count reached"
|
||||||
|
},
|
||||||
|
"pendingDeletion": {
|
||||||
|
"message": "Pending deletion"
|
||||||
|
},
|
||||||
|
"expired": {
|
||||||
|
"message": "Expired"
|
||||||
|
},
|
||||||
"searchSends": {
|
"searchSends": {
|
||||||
"message": "Search Sends",
|
"message": "Search Sends",
|
||||||
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
|
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
|
||||||
@ -3370,6 +3383,10 @@
|
|||||||
"downloadFile": {
|
"downloadFile": {
|
||||||
"message": "Download File"
|
"message": "Download File"
|
||||||
},
|
},
|
||||||
|
"sendAccessUnavailable": {
|
||||||
|
"message": "The Send you are trying to access does not exist or is no longer available.",
|
||||||
|
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
|
||||||
|
},
|
||||||
"noSendsInList": {
|
"noSendsInList": {
|
||||||
"message": "There are no Sends to list.",
|
"message": "There are no Sends to list.",
|
||||||
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
|
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
|
||||||
|
Loading…
Reference in New Issue
Block a user