system-util: Remove getOS wrapper.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-11-22 15:44:55 -08:00
parent 4c7b9cf4e3
commit 8fc41a7ca8
2 changed files with 1 additions and 25 deletions

View File

@@ -1,5 +1,3 @@
import os from "os";
import {ipcRenderer} from "../typed-ipc-renderer";
export const connectivityERR: string[] = [
@@ -13,27 +11,6 @@ export const connectivityERR: string[] = [
const userAgent = ipcRenderer.sendSync("fetch-user-agent");
export function getOS(): string {
const platform = os.platform();
if (platform === "darwin") {
return "Mac";
}
if (platform === "linux") {
return "Linux";
}
if (platform === "win32") {
if (Number.parseFloat(os.release()) < 6.2) {
return "Windows 7";
}
return "Windows 10";
}
return "";
}
export function getUserAgent(): string {
return userAgent;
}