1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 02:03:39 +00:00

feat(web): [PM-1214] add device management screen

Adds a device management tab under settings -> security that allows users to:
- View and manage their account's connected devices
- Remove/deactivate devices
- See device details like platform, last login, and trust status
- Sort and filter device list with virtual scrolling

Resolves PM-1214
This commit is contained in:
Alec Rippberger
2025-01-07 13:29:36 -06:00
committed by GitHub
parent 02556c1416
commit f99a3c4162
17 changed files with 549 additions and 27 deletions

View File

@@ -27,18 +27,40 @@ export enum DeviceType {
LinuxCLI = 25,
}
export const MobileDeviceTypes: Set<DeviceType> = new Set([
DeviceType.Android,
DeviceType.iOS,
DeviceType.AndroidAmazon,
]);
/**
* Device type metadata
* Each device type has a category corresponding to the client type and platform (Android, iOS, Chrome, Firefox, etc.)
*/
interface DeviceTypeMetadata {
category: "mobile" | "extension" | "webVault" | "desktop" | "cli" | "sdk" | "server";
platform: string;
}
export const DesktopDeviceTypes: Set<DeviceType> = new Set([
DeviceType.WindowsDesktop,
DeviceType.MacOsDesktop,
DeviceType.LinuxDesktop,
DeviceType.UWP,
DeviceType.WindowsCLI,
DeviceType.MacOsCLI,
DeviceType.LinuxCLI,
]);
export const DeviceTypeMetadata: Record<DeviceType, DeviceTypeMetadata> = {
[DeviceType.Android]: { category: "mobile", platform: "Android" },
[DeviceType.iOS]: { category: "mobile", platform: "iOS" },
[DeviceType.AndroidAmazon]: { category: "mobile", platform: "Amazon" },
[DeviceType.ChromeExtension]: { category: "extension", platform: "Chrome" },
[DeviceType.FirefoxExtension]: { category: "extension", platform: "Firefox" },
[DeviceType.OperaExtension]: { category: "extension", platform: "Opera" },
[DeviceType.EdgeExtension]: { category: "extension", platform: "Edge" },
[DeviceType.VivaldiExtension]: { category: "extension", platform: "Vivaldi" },
[DeviceType.SafariExtension]: { category: "extension", platform: "Safari" },
[DeviceType.ChromeBrowser]: { category: "webVault", platform: "Chrome" },
[DeviceType.FirefoxBrowser]: { category: "webVault", platform: "Firefox" },
[DeviceType.OperaBrowser]: { category: "webVault", platform: "Opera" },
[DeviceType.EdgeBrowser]: { category: "webVault", platform: "Edge" },
[DeviceType.IEBrowser]: { category: "webVault", platform: "IE" },
[DeviceType.SafariBrowser]: { category: "webVault", platform: "Safari" },
[DeviceType.VivaldiBrowser]: { category: "webVault", platform: "Vivaldi" },
[DeviceType.UnknownBrowser]: { category: "webVault", platform: "Unknown" },
[DeviceType.WindowsDesktop]: { category: "desktop", platform: "Windows" },
[DeviceType.MacOsDesktop]: { category: "desktop", platform: "macOS" },
[DeviceType.LinuxDesktop]: { category: "desktop", platform: "Linux" },
[DeviceType.UWP]: { category: "desktop", platform: "Windows UWP" },
[DeviceType.WindowsCLI]: { category: "cli", platform: "Windows" },
[DeviceType.MacOsCLI]: { category: "cli", platform: "macOS" },
[DeviceType.LinuxCLI]: { category: "cli", platform: "Linux" },
[DeviceType.SDK]: { category: "sdk", platform: "" },
[DeviceType.Server]: { category: "server", platform: "" },
};