mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-10-31 20:13:43 +00:00
Reformat all code with Prettier.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
@@ -1,38 +1,38 @@
|
||||
import {ipcRenderer} from 'electron';
|
||||
import os from 'os';
|
||||
import {ipcRenderer} from "electron";
|
||||
import os from "os";
|
||||
|
||||
export const connectivityERR: string[] = [
|
||||
'ERR_INTERNET_DISCONNECTED',
|
||||
'ERR_PROXY_CONNECTION_FAILED',
|
||||
'ERR_CONNECTION_RESET',
|
||||
'ERR_NOT_CONNECTED',
|
||||
'ERR_NAME_NOT_RESOLVED',
|
||||
'ERR_NETWORK_CHANGED'
|
||||
"ERR_INTERNET_DISCONNECTED",
|
||||
"ERR_PROXY_CONNECTION_FAILED",
|
||||
"ERR_CONNECTION_RESET",
|
||||
"ERR_NOT_CONNECTED",
|
||||
"ERR_NAME_NOT_RESOLVED",
|
||||
"ERR_NETWORK_CHANGED",
|
||||
];
|
||||
|
||||
const userAgent = ipcRenderer.sendSync('fetch-user-agent');
|
||||
const userAgent = ipcRenderer.sendSync("fetch-user-agent");
|
||||
|
||||
export function getOS(): string {
|
||||
const platform = os.platform();
|
||||
if (platform === 'darwin') {
|
||||
return 'Mac';
|
||||
}
|
||||
const platform = os.platform();
|
||||
if (platform === "darwin") {
|
||||
return "Mac";
|
||||
}
|
||||
|
||||
if (platform === 'linux') {
|
||||
return 'Linux';
|
||||
}
|
||||
if (platform === "linux") {
|
||||
return "Linux";
|
||||
}
|
||||
|
||||
if (platform === 'win32') {
|
||||
if (Number.parseFloat(os.release()) < 6.2) {
|
||||
return 'Windows 7';
|
||||
}
|
||||
if (platform === "win32") {
|
||||
if (Number.parseFloat(os.release()) < 6.2) {
|
||||
return "Windows 7";
|
||||
}
|
||||
|
||||
return 'Windows 10';
|
||||
}
|
||||
return "Windows 10";
|
||||
}
|
||||
|
||||
return '';
|
||||
return "";
|
||||
}
|
||||
|
||||
export function getUserAgent(): string {
|
||||
return userAgent;
|
||||
return userAgent;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user