mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-19 19:21:12 +10:00
16 lines
358 B
TypeScript
16 lines
358 B
TypeScript
import { HardwarePlatform } from "~~/prisma/client/enums";
|
|
|
|
export function parsePlatform(platform: string) {
|
|
switch (platform.toLowerCase()) {
|
|
case "linux":
|
|
return HardwarePlatform.Linux;
|
|
case "windows":
|
|
return HardwarePlatform.Windows;
|
|
case "mac":
|
|
case "macos":
|
|
return HardwarePlatform.macOS;
|
|
}
|
|
|
|
return undefined;
|
|
}
|