mirror of
https://github.com/bitwarden/browser
synced 2026-02-20 19:34:03 +00:00
Renamed new property
This commit is contained in:
@@ -225,7 +225,7 @@ export abstract class BrowserPlatformUtilsService implements PlatformUtilsServic
|
||||
return true;
|
||||
}
|
||||
|
||||
supportsBlobDownloads(): boolean {
|
||||
supportsFileDownloads(): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ export class ElectronPlatformUtilsService implements PlatformUtilsService {
|
||||
return false;
|
||||
}
|
||||
|
||||
supportsBlobDownloads(): boolean {
|
||||
supportsFileDownloads(): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ export class WebFileDownloadService implements FileDownloadService {
|
||||
download(request: FileDownloadRequest): void {
|
||||
const builder = new FileDownloadBuilder(request);
|
||||
const a = window.document.createElement("a");
|
||||
if (!this.platformUtilsService.supportsBlobDownloads()) {
|
||||
if (!this.platformUtilsService.supportsFileDownloads()) {
|
||||
a.rel = "noreferrer";
|
||||
a.target = "_blank";
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ export class WebPlatformUtilsService implements PlatformUtilsService {
|
||||
}
|
||||
|
||||
// Safari support for blob downloads is inconsistent and requires workarounds
|
||||
supportsBlobDownloads(): boolean {
|
||||
supportsFileDownloads(): boolean {
|
||||
return !(this.getDevice() === DeviceType.SafariBrowser);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,10 +33,10 @@ export abstract class PlatformUtilsService {
|
||||
*/
|
||||
abstract supportsAutofill(): boolean;
|
||||
/**
|
||||
* Returns true if the device supports native blob downloads without
|
||||
* Returns true if the device supports native file downloads without
|
||||
* the need for `target="_blank"`
|
||||
*/
|
||||
abstract supportsBlobDownloads(): boolean;
|
||||
abstract supportsFileDownloads(): boolean;
|
||||
/**
|
||||
* @deprecated use `@bitwarden/components/ToastService.showToast` instead
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user