mirror of
https://github.com/bitwarden/browser
synced 2026-02-18 10:23:52 +00:00
Apply feedback
This commit is contained in:
@@ -329,22 +329,22 @@ export abstract class BrowserPlatformUtilsService implements PlatformUtilsServic
|
||||
return autofillCommand;
|
||||
}
|
||||
|
||||
packageType(): Promise<string> {
|
||||
async packageType(): Promise<string | null> {
|
||||
switch (this.getDevice()) {
|
||||
case DeviceType.ChromeExtension:
|
||||
return Promise.resolve("Chrome Extension");
|
||||
return "Chrome Extension";
|
||||
case DeviceType.FirefoxExtension:
|
||||
return Promise.resolve("Firefox Extension");
|
||||
return "Firefox Extension";
|
||||
case DeviceType.OperaExtension:
|
||||
return Promise.resolve("Opera Extension");
|
||||
return "Opera Extension";
|
||||
case DeviceType.EdgeExtension:
|
||||
return Promise.resolve("Edge Extension");
|
||||
return "Edge Extension";
|
||||
case DeviceType.VivaldiExtension:
|
||||
return Promise.resolve("Vivaldi Extension");
|
||||
return "Vivaldi Extension";
|
||||
case DeviceType.SafariExtension:
|
||||
return Promise.resolve("Safari Extension");
|
||||
return "Safari Extension";
|
||||
default:
|
||||
return Promise.resolve("Browser Extension");
|
||||
return "Unknown Browser Extension";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ export class CliPlatformUtilsService implements PlatformUtilsService {
|
||||
return null;
|
||||
}
|
||||
|
||||
packageType(): Promise<string> {
|
||||
return Promise.resolve("Cli");
|
||||
async packageType(): Promise<string | null> {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,18 +153,18 @@ export class ElectronPlatformUtilsService implements PlatformUtilsService {
|
||||
}
|
||||
|
||||
async packageType(): Promise<string> {
|
||||
let packageType = "Unknown";
|
||||
if (ipc.platform.isMacAppStore) {
|
||||
packageType = "MacAppStore";
|
||||
return "MacAppStore";
|
||||
} else if (ipc.platform.isWindowsStore) {
|
||||
packageType = "WindowsStore";
|
||||
return "WindowsStore";
|
||||
} else if (ipc.platform.isAppImage) {
|
||||
packageType = "AppImage";
|
||||
return "AppImage";
|
||||
} else if (ipc.platform.isSnapStore) {
|
||||
packageType = "Snap";
|
||||
return "Snap";
|
||||
} else if (ipc.platform.isFlatpak) {
|
||||
packageType = "Flatpak";
|
||||
return "Flatpak";
|
||||
} else {
|
||||
return "Unknown";
|
||||
}
|
||||
return `Bitwarden-Desktop/${await this.getApplicationVersion()} (${packageType})`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ export class WebPlatformUtilsService implements PlatformUtilsService {
|
||||
return null;
|
||||
}
|
||||
|
||||
packageType(): Promise<string> {
|
||||
return Promise.resolve("Web");
|
||||
packageType(): Promise<string | null> {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,5 +55,5 @@ export abstract class PlatformUtilsService {
|
||||
abstract readFromClipboard(): Promise<string>;
|
||||
abstract supportsSecureStorage(): boolean;
|
||||
abstract getAutofillKeyboardShortcut(): Promise<string>;
|
||||
abstract packageType(): Promise<string>;
|
||||
abstract packageType(): Promise<string | null>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user