From 8f9452d727e359422424e8d38927292818d8dbc7 Mon Sep 17 00:00:00 2001 From: Todd Martin Date: Sat, 17 May 2025 18:38:03 -0400 Subject: [PATCH] Renamed new property --- .../services/platform-utils/browser-platform-utils.service.ts | 2 +- .../src/platform/services/electron-platform-utils.service.ts | 2 +- apps/web/src/app/core/web-file-download.service.ts | 2 +- apps/web/src/app/core/web-platform-utils.service.ts | 2 +- .../src/platform/abstractions/platform-utils.service.ts | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/browser/src/platform/services/platform-utils/browser-platform-utils.service.ts b/apps/browser/src/platform/services/platform-utils/browser-platform-utils.service.ts index 9bb4e124496..9164645fa9c 100644 --- a/apps/browser/src/platform/services/platform-utils/browser-platform-utils.service.ts +++ b/apps/browser/src/platform/services/platform-utils/browser-platform-utils.service.ts @@ -225,7 +225,7 @@ export abstract class BrowserPlatformUtilsService implements PlatformUtilsServic return true; } - supportsBlobDownloads(): boolean { + supportsFileDownloads(): boolean { return false; } diff --git a/apps/desktop/src/platform/services/electron-platform-utils.service.ts b/apps/desktop/src/platform/services/electron-platform-utils.service.ts index b5f97756f95..43b867b7a68 100644 --- a/apps/desktop/src/platform/services/electron-platform-utils.service.ts +++ b/apps/desktop/src/platform/services/electron-platform-utils.service.ts @@ -90,7 +90,7 @@ export class ElectronPlatformUtilsService implements PlatformUtilsService { return false; } - supportsBlobDownloads(): boolean { + supportsFileDownloads(): boolean { return false; } diff --git a/apps/web/src/app/core/web-file-download.service.ts b/apps/web/src/app/core/web-file-download.service.ts index dd5793a2392..3421203737a 100644 --- a/apps/web/src/app/core/web-file-download.service.ts +++ b/apps/web/src/app/core/web-file-download.service.ts @@ -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"; } diff --git a/apps/web/src/app/core/web-platform-utils.service.ts b/apps/web/src/app/core/web-platform-utils.service.ts index 54b69dba745..c3d1f5e3c1a 100644 --- a/apps/web/src/app/core/web-platform-utils.service.ts +++ b/apps/web/src/app/core/web-platform-utils.service.ts @@ -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); } diff --git a/libs/common/src/platform/abstractions/platform-utils.service.ts b/libs/common/src/platform/abstractions/platform-utils.service.ts index b85824a5dbe..7586da5a564 100644 --- a/libs/common/src/platform/abstractions/platform-utils.service.ts +++ b/libs/common/src/platform/abstractions/platform-utils.service.ts @@ -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 *