mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-02 21:13:32 +00:00
xo: Fix unicorn/switch-case-braces.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
@@ -63,29 +63,33 @@ export class PreferenceView {
|
||||
this.navItem = navItem;
|
||||
this.nav.select(navItem);
|
||||
switch (navItem) {
|
||||
case "AddServer":
|
||||
case "AddServer": {
|
||||
initServersSection({
|
||||
$root: this.$settingsContainer,
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
case "General":
|
||||
case "General": {
|
||||
initGeneralSection({
|
||||
$root: this.$settingsContainer,
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
case "Organizations":
|
||||
case "Organizations": {
|
||||
initConnectedOrgSection({
|
||||
$root: this.$settingsContainer,
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
case "Network":
|
||||
case "Network": {
|
||||
initNetworkSection({
|
||||
$root: this.$settingsContainer,
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
case "Shortcuts": {
|
||||
initShortcutsSection({
|
||||
@@ -94,8 +98,9 @@ export class PreferenceView {
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
default: {
|
||||
((n: never) => n)(navItem);
|
||||
}
|
||||
}
|
||||
|
||||
window.location.hash = `#${navItem}`;
|
||||
|
||||
@@ -36,14 +36,21 @@ let unread = 0;
|
||||
|
||||
const trayIconSize = (): number => {
|
||||
switch (process.platform) {
|
||||
case "darwin":
|
||||
case "darwin": {
|
||||
return 20;
|
||||
case "win32":
|
||||
}
|
||||
|
||||
case "win32": {
|
||||
return 100;
|
||||
case "linux":
|
||||
}
|
||||
|
||||
case "linux": {
|
||||
return 100;
|
||||
default:
|
||||
}
|
||||
|
||||
default: {
|
||||
return 80;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -30,18 +30,25 @@ function getAppDataDir() {
|
||||
let base;
|
||||
|
||||
switch (process.platform) {
|
||||
case "darwin":
|
||||
case "darwin": {
|
||||
base = path.join(process.env.HOME, "Library", "Application Support");
|
||||
break;
|
||||
case "linux":
|
||||
}
|
||||
|
||||
case "linux": {
|
||||
base =
|
||||
process.env.XDG_CONFIG_HOME ?? path.join(process.env.HOME, ".config");
|
||||
break;
|
||||
case "win32":
|
||||
}
|
||||
|
||||
case "win32": {
|
||||
base = process.env.APPDATA;
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
default: {
|
||||
throw new Error("Could not detect app data dir base.");
|
||||
}
|
||||
}
|
||||
|
||||
console.log("Detected App Data Dir base:", base);
|
||||
|
||||
Reference in New Issue
Block a user