diff options
Diffstat (limited to 'src/components/services/content')
4 files changed, 19 insertions, 18 deletions
diff --git a/src/components/services/content/ConnectionLostBanner.tsx b/src/components/services/content/ConnectionLostBanner.tsx index 88731f3b9..7040337f0 100644 --- a/src/components/services/content/ConnectionLostBanner.tsx +++ b/src/components/services/content/ConnectionLostBanner.tsx | |||
@@ -21,10 +21,11 @@ const messages = defineMessages({ | |||
21 | }, | 21 | }, |
22 | }); | 22 | }); |
23 | 23 | ||
24 | const buttonTransition = | 24 | const buttonTransition = window?.matchMedia( |
25 | window && window.matchMedia('(prefers-reduced-motion: no-preference)') | 25 | '(prefers-reduced-motion: no-preference)', |
26 | ? 'opacity 0.25s' | 26 | ) |
27 | : 'none'; | 27 | ? 'opacity 0.25s' |
28 | : 'none'; | ||
28 | 29 | ||
29 | const styles = theme => ({ | 30 | const styles = theme => ({ |
30 | root: { | 31 | root: { |
diff --git a/src/components/services/content/ServiceView.tsx b/src/components/services/content/ServiceView.tsx index 0754bccc5..19dcdd07a 100644 --- a/src/components/services/content/ServiceView.tsx +++ b/src/components/services/content/ServiceView.tsx | |||
@@ -21,7 +21,7 @@ interface IProps { | |||
21 | reload: () => void; | 21 | reload: () => void; |
22 | edit: () => void; | 22 | edit: () => void; |
23 | enable: () => void; | 23 | enable: () => void; |
24 | // isActive?: boolean; // TODO - [TECH DEBT][PROP NOT USED IN COMPONENT] check it | 24 | // isActive?: boolean; // TODO: [TECH DEBT][PROP NOT USED IN COMPONENT] check it |
25 | stores?: RealStores; | 25 | stores?: RealStores; |
26 | isSpellcheckerEnabled: boolean; | 26 | isSpellcheckerEnabled: boolean; |
27 | } | 27 | } |
@@ -35,7 +35,7 @@ interface IState { | |||
35 | @inject('stores', 'actions') | 35 | @inject('stores', 'actions') |
36 | @observer | 36 | @observer |
37 | class ServiceView extends Component<IProps, IState> { | 37 | class ServiceView extends Component<IProps, IState> { |
38 | // hibernationTimer = null; // TODO - [TS DEBT] class property not reassigned, need to find its purpose | 38 | // hibernationTimer = null; // TODO: [TS DEBT] class property not reassigned, need to find its purpose |
39 | 39 | ||
40 | autorunDisposer: IReactionDisposer | undefined; | 40 | autorunDisposer: IReactionDisposer | undefined; |
41 | 41 | ||
@@ -65,7 +65,7 @@ class ServiceView extends Component<IProps, IState> { | |||
65 | componentWillUnmount() { | 65 | componentWillUnmount() { |
66 | this.autorunDisposer!(); | 66 | this.autorunDisposer!(); |
67 | clearTimeout(this.forceRepaintTimeout!); | 67 | clearTimeout(this.forceRepaintTimeout!); |
68 | // clearTimeout(this.hibernationTimer); // TODO - [TS DEBT] class property not reassigned, need to find its purpose | 68 | // clearTimeout(this.hibernationTimer); // TODO: [TS DEBT] class property not reassigned, need to find its purpose |
69 | } | 69 | } |
70 | 70 | ||
71 | render() { | 71 | render() { |
@@ -111,7 +111,7 @@ class ServiceView extends Component<IProps, IState> { | |||
111 | {service.hasCrashed && ( | 111 | {service.hasCrashed && ( |
112 | <WebviewCrashHandler | 112 | <WebviewCrashHandler |
113 | name={service.recipe.name} | 113 | name={service.recipe.name} |
114 | // webview={service.webview} // TODO - [TECH DEBT][PROPS NOT EXIST IN COMPONENT] check it | 114 | // webview={service.webview} // TODO: [TECH DEBT][PROPS NOT EXIST IN COMPONENT] check it |
115 | reload={reload} | 115 | reload={reload} |
116 | /> | 116 | /> |
117 | )} | 117 | )} |
@@ -177,7 +177,7 @@ class ServiceView extends Component<IProps, IState> { | |||
177 | {service.isActive && ( | 177 | {service.isActive && ( |
178 | <ServiceDisabled | 178 | <ServiceDisabled |
179 | name={service.name === '' ? service.recipe.name : service.name} | 179 | name={service.name === '' ? service.recipe.name : service.name} |
180 | // webview={service.webview} // TODO - [TECH DEBT][PROPS NOT EXIST IN COMPONENT] check it | 180 | // webview={service.webview} // TODO: [TECH DEBT][PROPS NOT EXIST IN COMPONENT] check it |
181 | enable={enable} | 181 | enable={enable} |
182 | /> | 182 | /> |
183 | )} | 183 | )} |
diff --git a/src/components/services/content/ServiceWebview.tsx b/src/components/services/content/ServiceWebview.tsx index ac8d1ea66..008e1b227 100644 --- a/src/components/services/content/ServiceWebview.tsx +++ b/src/components/services/content/ServiceWebview.tsx | |||
@@ -32,7 +32,7 @@ class ServiceWebview extends Component<IProps> { | |||
32 | reaction( | 32 | reaction( |
33 | () => this.webview, | 33 | () => this.webview, |
34 | () => { | 34 | () => { |
35 | if (this.webview && this.webview.view) { | 35 | if (this.webview?.view) { |
36 | this.webview.view.addEventListener('console-message', e => { | 36 | this.webview.view.addEventListener('console-message', e => { |
37 | debug('Service logged a message:', e.message); | 37 | debug('Service logged a message:', e.message); |
38 | }); | 38 | }); |
@@ -97,7 +97,7 @@ class ServiceWebview extends Component<IProps> { | |||
97 | <ElectronWebView | 97 | <ElectronWebView |
98 | ref={webview => { | 98 | ref={webview => { |
99 | this._setWebview(webview); | 99 | this._setWebview(webview); |
100 | if (webview && webview.view) { | 100 | if (webview?.view) { |
101 | webview.view.addEventListener( | 101 | webview.view.addEventListener( |
102 | 'did-stop-loading', | 102 | 'did-stop-loading', |
103 | this.refocusWebview, | 103 | this.refocusWebview, |
@@ -122,7 +122,7 @@ class ServiceWebview extends Component<IProps> { | |||
122 | }); | 122 | }); |
123 | }, 0); | 123 | }, 0); |
124 | }} | 124 | }} |
125 | // onUpdateTargetUrl={this.updateTargetUrl} // TODO - [TS DEBT] need to check where its from | 125 | // onUpdateTargetUrl={this.updateTargetUrl} // TODO: [TS DEBT] need to check where its from |
126 | useragent={service.userAgent} | 126 | useragent={service.userAgent} |
127 | disablewebsecurity={ | 127 | disablewebsecurity={ |
128 | service.recipe.disablewebsecurity ? true : undefined | 128 | service.recipe.disablewebsecurity ? true : undefined |
diff --git a/src/components/services/content/Services.tsx b/src/components/services/content/Services.tsx index fa26edaa6..5766e0d75 100644 --- a/src/components/services/content/Services.tsx +++ b/src/components/services/content/Services.tsx | |||
@@ -42,8 +42,8 @@ interface IProps extends WrappedComponentProps, WithStylesProps<typeof styles> { | |||
42 | services?: Service[]; | 42 | services?: Service[]; |
43 | setWebviewReference: () => void; | 43 | setWebviewReference: () => void; |
44 | detachService: () => void; | 44 | detachService: () => void; |
45 | // handleIPCMessage: () => void; // TODO - [TECH DEBT] later check it | 45 | // handleIPCMessage: () => void; // TODO: [TECH DEBT] later check it |
46 | // openWindow: () => void; // TODO - [TECH DEBT] later check it | 46 | // openWindow: () => void; // TODO: [TECH DEBT] later check it |
47 | reload: (options: { serviceId: string }) => void; | 47 | reload: (options: { serviceId: string }) => void; |
48 | openSettings: (options: { path: string }) => void; | 48 | openSettings: (options: { path: string }) => void; |
49 | update: (options: { | 49 | update: (options: { |
@@ -88,10 +88,10 @@ class Services extends Component<IProps, IState> { | |||
88 | render(): ReactElement { | 88 | render(): ReactElement { |
89 | const { | 89 | const { |
90 | services = [], | 90 | services = [], |
91 | // handleIPCMessage, // TODO - [TECH DEBT] later check it | 91 | // handleIPCMessage, // TODO: [TECH DEBT] later check it |
92 | setWebviewReference, | 92 | setWebviewReference, |
93 | detachService, | 93 | detachService, |
94 | // openWindow, // TODO - [TECH DEBT] later check it | 94 | // openWindow, // TODO: [TECH DEBT] later check it |
95 | reload, | 95 | reload, |
96 | openSettings, | 96 | openSettings, |
97 | update, | 97 | update, |
@@ -136,10 +136,10 @@ class Services extends Component<IProps, IState> { | |||
136 | <ServiceView | 136 | <ServiceView |
137 | key={service.id} | 137 | key={service.id} |
138 | service={service} | 138 | service={service} |
139 | // handleIPCMessage={handleIPCMessage} // TODO - [TECH DEBT][PROPS NOT EXIST IN COMPONENT] later check it | 139 | // handleIPCMessage={handleIPCMessage} // TODO: [TECH DEBT][PROPS NOT EXIST IN COMPONENT] later check it |
140 | setWebviewRef={setWebviewReference} | 140 | setWebviewRef={setWebviewReference} |
141 | detachService={detachService} | 141 | detachService={detachService} |
142 | // openWindow={openWindow} // TODO - [TECH DEBT][PROPS NOT EXIST IN COMPONENT] later check it | 142 | // openWindow={openWindow} // TODO: [TECH DEBT][PROPS NOT EXIST IN COMPONENT] later check it |
143 | reload={() => reload({ serviceId: service.id })} | 143 | reload={() => reload({ serviceId: service.id })} |
144 | edit={() => openSettings({ path: `services/edit/${service.id}` })} | 144 | edit={() => openSettings({ path: `services/edit/${service.id}` })} |
145 | enable={() => | 145 | enable={() => |