File tree Expand file tree Collapse file tree 3 files changed +32
-13
lines changed Expand file tree Collapse file tree 3 files changed +32
-13
lines changed Original file line number Diff line number Diff line change @@ -63,29 +63,33 @@ export class PreferenceView {
63
63
this . navItem = navItem ;
64
64
this . nav . select ( navItem ) ;
65
65
switch ( navItem ) {
66
- case "AddServer" :
66
+ case "AddServer" : {
67
67
initServersSection ( {
68
68
$root : this . $settingsContainer ,
69
69
} ) ;
70
70
break ;
71
+ }
71
72
72
- case "General" :
73
+ case "General" : {
73
74
initGeneralSection ( {
74
75
$root : this . $settingsContainer ,
75
76
} ) ;
76
77
break ;
78
+ }
77
79
78
- case "Organizations" :
80
+ case "Organizations" : {
79
81
initConnectedOrgSection ( {
80
82
$root : this . $settingsContainer ,
81
83
} ) ;
82
84
break ;
85
+ }
83
86
84
- case "Network" :
87
+ case "Network" : {
85
88
initNetworkSection ( {
86
89
$root : this . $settingsContainer ,
87
90
} ) ;
88
91
break ;
92
+ }
89
93
90
94
case "Shortcuts" : {
91
95
initShortcutsSection ( {
@@ -94,8 +98,9 @@ export class PreferenceView {
94
98
break ;
95
99
}
96
100
97
- default :
101
+ default : {
98
102
( ( n : never ) => n ) ( navItem ) ;
103
+ }
99
104
}
100
105
101
106
window . location . hash = `#${ navItem } ` ;
Original file line number Diff line number Diff line change @@ -36,14 +36,21 @@ let unread = 0;
36
36
37
37
const trayIconSize = ( ) : number => {
38
38
switch ( process . platform ) {
39
- case "darwin" :
39
+ case "darwin" : {
40
40
return 20 ;
41
- case "win32" :
41
+ }
42
+
43
+ case "win32" : {
42
44
return 100 ;
43
- case "linux" :
45
+ }
46
+
47
+ case "linux" : {
44
48
return 100 ;
45
- default :
49
+ }
50
+
51
+ default : {
46
52
return 80 ;
53
+ }
47
54
}
48
55
} ;
49
56
Original file line number Diff line number Diff line change @@ -30,18 +30,25 @@ function getAppDataDir() {
30
30
let base ;
31
31
32
32
switch ( process . platform ) {
33
- case "darwin" :
33
+ case "darwin" : {
34
34
base = path . join ( process . env . HOME , "Library" , "Application Support" ) ;
35
35
break ;
36
- case "linux" :
36
+ }
37
+
38
+ case "linux" : {
37
39
base =
38
40
process . env . XDG_CONFIG_HOME ?? path . join ( process . env . HOME , ".config" ) ;
39
41
break ;
40
- case "win32" :
42
+ }
43
+
44
+ case "win32" : {
41
45
base = process . env . APPDATA ;
42
46
break ;
43
- default :
47
+ }
48
+
49
+ default : {
44
50
throw new Error ( "Could not detect app data dir base." ) ;
51
+ }
45
52
}
46
53
47
54
console . log ( "Detected App Data Dir base:" , base ) ;
You can’t perform that action at this time.
0 commit comments