diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2023-05-24 06:57:50 +0530 |
---|---|---|
committer | Vijay Aravamudhan <vraravam@users.noreply.github.com> | 2023-05-24 16:40:43 +0530 |
commit | e245b4fa229bee1e2ab97fcb42de3831b8bdbe5b (patch) | |
tree | d684777b3fde5470c9f99304a9f022422ffb8045 /src/features | |
parent | 6.3.0-nightly.9 [skip ci] (diff) | |
download | ferdium-app-e245b4fa229bee1e2ab97fcb42de3831b8bdbe5b.tar.gz ferdium-app-e245b4fa229bee1e2ab97fcb42de3831b8bdbe5b.tar.zst ferdium-app-e245b4fa229bee1e2ab97fcb42de3831b8bdbe5b.zip |
Upgrade npm modules
Diffstat (limited to 'src/features')
-rw-r--r-- | src/features/appearance/index.ts | 37 | ||||
-rw-r--r-- | src/features/quickSwitch/Component.tsx | 15 | ||||
-rw-r--r-- | src/features/todos/preload.ts | 3 | ||||
-rw-r--r-- | src/features/todos/store.ts | 9 | ||||
-rw-r--r-- | src/features/webControls/components/WebControls.tsx | 2 |
5 files changed, 43 insertions, 23 deletions
diff --git a/src/features/appearance/index.ts b/src/features/appearance/index.ts index 9c9f3e175..b6e944724 100644 --- a/src/features/appearance/index.ts +++ b/src/features/appearance/index.ts | |||
@@ -19,7 +19,7 @@ function createStyleElement() { | |||
19 | const styles = document.createElement('style'); | 19 | const styles = document.createElement('style'); |
20 | styles.id = STYLE_ELEMENT_ID; | 20 | styles.id = STYLE_ELEMENT_ID; |
21 | 21 | ||
22 | document.querySelector('head')?.appendChild(styles); | 22 | document.querySelector('head')?.append(styles); |
23 | } | 23 | } |
24 | 24 | ||
25 | function setAppearance(style) { | 25 | function setAppearance(style) { |
@@ -153,40 +153,47 @@ function generateServiceRibbonWidthStyle( | |||
153 | const verticalStyleOffset = 29; | 153 | const verticalStyleOffset = 29; |
154 | 154 | ||
155 | switch (width) { | 155 | switch (width) { |
156 | case 35: | 156 | case 35: { |
157 | fontSize = 9; | 157 | fontSize = 9; |
158 | tabItemHeightBias = 25; | 158 | tabItemHeightBias = 25; |
159 | sidebarSizeBias = 48; | 159 | sidebarSizeBias = 48; |
160 | break; | 160 | break; |
161 | case 45: | 161 | } |
162 | case 45: { | ||
162 | fontSize = 10; | 163 | fontSize = 10; |
163 | tabItemHeightBias = 21; | 164 | tabItemHeightBias = 21; |
164 | sidebarSizeBias = 44; | 165 | sidebarSizeBias = 44; |
165 | break; | 166 | break; |
166 | case 55: | 167 | } |
168 | case 55: { | ||
167 | fontSize = 11; | 169 | fontSize = 11; |
168 | tabItemHeightBias = 13; | 170 | tabItemHeightBias = 13; |
169 | sidebarSizeBias = 37; | 171 | sidebarSizeBias = 37; |
170 | break; | 172 | break; |
171 | case 80: | 173 | } |
174 | case 80: { | ||
172 | fontSize = 11; | 175 | fontSize = 11; |
173 | tabItemHeightBias = 3; | 176 | tabItemHeightBias = 3; |
174 | sidebarSizeBias = 27; | 177 | sidebarSizeBias = 27; |
175 | break; | 178 | break; |
176 | case 90: | 179 | } |
180 | case 90: { | ||
177 | fontSize = 12; | 181 | fontSize = 12; |
178 | tabItemHeightBias = 0; | 182 | tabItemHeightBias = 0; |
179 | sidebarSizeBias = 25; | 183 | sidebarSizeBias = 25; |
180 | break; | 184 | break; |
181 | case 100: | 185 | } |
186 | case 100: { | ||
182 | fontSize = 13; | 187 | fontSize = 13; |
183 | tabItemHeightBias = 2; | 188 | tabItemHeightBias = 2; |
184 | sidebarSizeBias = 25; | 189 | sidebarSizeBias = 25; |
185 | break; | 190 | break; |
186 | default: | 191 | } |
192 | default: { | ||
187 | fontSize = 11; | 193 | fontSize = 11; |
188 | tabItemHeightBias = 13; | 194 | tabItemHeightBias = 13; |
189 | sidebarSizeBias = 37; | 195 | sidebarSizeBias = 37; |
196 | } | ||
190 | } | 197 | } |
191 | 198 | ||
192 | if (!isLabelEnabled) { | 199 | if (!isLabelEnabled) { |
@@ -203,18 +210,22 @@ function generateServiceRibbonWidthStyle( | |||
203 | 210 | ||
204 | let sidebarServicesAlignment; | 211 | let sidebarServicesAlignment; |
205 | switch (sidebarServicesLocation) { | 212 | switch (sidebarServicesLocation) { |
206 | case SIDEBAR_SERVICES_LOCATION_TOPLEFT: | 213 | case SIDEBAR_SERVICES_LOCATION_TOPLEFT: { |
207 | sidebarServicesAlignment = horizontal ? 'left' : 'start'; | 214 | sidebarServicesAlignment = horizontal ? 'left' : 'start'; |
208 | break; | 215 | break; |
209 | case SIDEBAR_SERVICES_LOCATION_CENTER: | 216 | } |
217 | case SIDEBAR_SERVICES_LOCATION_CENTER: { | ||
210 | sidebarServicesAlignment = horizontal ? 'center' : 'center'; | 218 | sidebarServicesAlignment = horizontal ? 'center' : 'center'; |
211 | break; | 219 | break; |
212 | case SIDEBAR_SERVICES_LOCATION_BOTTOMRIGHT: | 220 | } |
221 | case SIDEBAR_SERVICES_LOCATION_BOTTOMRIGHT: { | ||
213 | sidebarServicesAlignment = horizontal ? 'right' : 'end'; | 222 | sidebarServicesAlignment = horizontal ? 'right' : 'end'; |
214 | break; | 223 | break; |
215 | default: | 224 | } |
225 | default: { | ||
216 | sidebarServicesAlignment = horizontal ? 'left' : 'start'; | 226 | sidebarServicesAlignment = horizontal ? 'left' : 'start'; |
217 | break; | 227 | break; |
228 | } | ||
218 | } | 229 | } |
219 | 230 | ||
220 | const graysacleServices = `filter: grayscale(1); | 231 | const graysacleServices = `filter: grayscale(1); |
@@ -268,7 +279,7 @@ function generateServiceRibbonWidthStyle( | |||
268 | ? width | 279 | ? width |
269 | : width + | 280 | : width + |
270 | sidebarSizeBias + | 281 | sidebarSizeBias + |
271 | (sizeDragArea !== 0 ? 4 - sizeDragArea : 4) | 282 | (sizeDragArea === 0 ? 4 : 4 - sizeDragArea) |
272 | }px !important; | 283 | }px !important; |
273 | } | 284 | } |
274 | .darwin .workspaces-drawer { | 285 | .darwin .workspaces-drawer { |
diff --git a/src/features/quickSwitch/Component.tsx b/src/features/quickSwitch/Component.tsx index fb85d61e1..ab07e5d4d 100644 --- a/src/features/quickSwitch/Component.tsx +++ b/src/features/quickSwitch/Component.tsx | |||
@@ -215,24 +215,29 @@ class QuickSwitchModal extends Component<IProps, IState> { | |||
215 | _handleKeyDown(event: KeyboardEvent): void { | 215 | _handleKeyDown(event: KeyboardEvent): void { |
216 | if (ModalState.isModalVisible) { | 216 | if (ModalState.isModalVisible) { |
217 | switch (event.keyCode) { | 217 | switch (event.keyCode) { |
218 | case this.ARROW_DOWN: | 218 | case this.ARROW_DOWN: { |
219 | this.changeSelected(1); | 219 | this.changeSelected(1); |
220 | break; | 220 | break; |
221 | case this.TAB: | 221 | } |
222 | case this.TAB: { | ||
222 | if (event.shiftKey) { | 223 | if (event.shiftKey) { |
223 | this.changeSelected(-1); | 224 | this.changeSelected(-1); |
224 | } else { | 225 | } else { |
225 | this.changeSelected(1); | 226 | this.changeSelected(1); |
226 | } | 227 | } |
227 | break; | 228 | break; |
228 | case this.ARROW_UP: | 229 | } |
230 | case this.ARROW_UP: { | ||
229 | this.changeSelected(-1); | 231 | this.changeSelected(-1); |
230 | break; | 232 | break; |
231 | case this.ENTER: | 233 | } |
234 | case this.ENTER: { | ||
232 | this.openService(this.state.selected); | 235 | this.openService(this.state.selected); |
233 | break; | 236 | break; |
234 | default: | 237 | } |
238 | default: { | ||
235 | break; | 239 | break; |
240 | } | ||
236 | } | 241 | } |
237 | } | 242 | } |
238 | } | 243 | } |
diff --git a/src/features/todos/preload.ts b/src/features/todos/preload.ts index 0d76efd7a..de594651b 100644 --- a/src/features/todos/preload.ts +++ b/src/features/todos/preload.ts | |||
@@ -9,9 +9,10 @@ debug('Preloading Todos Webview'); | |||
9 | 9 | ||
10 | let hostMessageListener = ({ action }) => { | 10 | let hostMessageListener = ({ action }) => { |
11 | switch (action) { | 11 | switch (action) { |
12 | case 'todos:initialize-as-service': | 12 | case 'todos:initialize-as-service': { |
13 | ipcRenderer.sendToHost('hello'); | 13 | ipcRenderer.sendToHost('hello'); |
14 | break; | 14 | break; |
15 | } | ||
15 | default: | 16 | default: |
16 | } | 17 | } |
17 | }; | 18 | }; |
diff --git a/src/features/todos/store.ts b/src/features/todos/store.ts index bff099eb1..94be4db6a 100644 --- a/src/features/todos/store.ts +++ b/src/features/todos/store.ts | |||
@@ -197,13 +197,15 @@ export default class TodoStore extends FeatureStore { | |||
197 | }) => { | 197 | }) => { |
198 | debug('_handleClientMessage', channel, message); | 198 | debug('_handleClientMessage', channel, message); |
199 | switch (message.action) { | 199 | switch (message.action) { |
200 | case 'todos:initialized': | 200 | case 'todos:initialized': { |
201 | this._onTodosClientInitialized(); | 201 | this._onTodosClientInitialized(); |
202 | break; | 202 | break; |
203 | case 'todos:goToService': | 203 | } |
204 | case 'todos:goToService': { | ||
204 | this._goToService(message.data); | 205 | this._goToService(message.data); |
205 | break; | 206 | break; |
206 | default: | 207 | } |
208 | default: { | ||
207 | debug('Other message received', channel, message); | 209 | debug('Other message received', channel, message); |
208 | if (this.stores.services.isTodosServiceAdded && this.actions) { | 210 | if (this.stores.services.isTodosServiceAdded && this.actions) { |
209 | this.actions.service.handleIPCMessage({ | 211 | this.actions.service.handleIPCMessage({ |
@@ -212,6 +214,7 @@ export default class TodoStore extends FeatureStore { | |||
212 | args: message, | 214 | args: message, |
213 | }); | 215 | }); |
214 | } | 216 | } |
217 | } | ||
215 | } | 218 | } |
216 | }; | 219 | }; |
217 | 220 | ||
diff --git a/src/features/webControls/components/WebControls.tsx b/src/features/webControls/components/WebControls.tsx index 51bf7e541..74b343948 100644 --- a/src/features/webControls/components/WebControls.tsx +++ b/src/features/webControls/components/WebControls.tsx | |||
@@ -115,7 +115,7 @@ class WebControls extends Component<IProps, IState> { | |||
115 | const { url: inputUrl } = props; | 115 | const { url: inputUrl } = props; |
116 | const { editUrl } = state; | 116 | const { editUrl } = state; |
117 | 117 | ||
118 | return !editUrl ? { inputUrl, editUrl } : null; | 118 | return editUrl ? null : { inputUrl, editUrl }; |
119 | } | 119 | } |
120 | 120 | ||
121 | constructor(props: IProps) { | 121 | constructor(props: IProps) { |