diff options
Diffstat (limited to 'src/components/services')
-rw-r--r-- | src/components/services/tabs/TabBarSortableList.tsx | 2 | ||||
-rw-r--r-- | src/components/services/tabs/TabItem.tsx | 5 | ||||
-rw-r--r-- | src/components/services/tabs/Tabbar.tsx | 1 |
3 files changed, 6 insertions, 2 deletions
diff --git a/src/components/services/tabs/TabBarSortableList.tsx b/src/components/services/tabs/TabBarSortableList.tsx index e04f6268d..bb889ebef 100644 --- a/src/components/services/tabs/TabBarSortableList.tsx +++ b/src/components/services/tabs/TabBarSortableList.tsx | |||
@@ -10,7 +10,6 @@ interface IProps { | |||
10 | showServiceNameSetting: boolean; | 10 | showServiceNameSetting: boolean; |
11 | showMessageBadgesEvenWhenMuted: boolean; | 11 | showMessageBadgesEvenWhenMuted: boolean; |
12 | services: Service[]; | 12 | services: Service[]; |
13 | |||
14 | setActive: (args: { serviceId: string }) => void; | 13 | setActive: (args: { serviceId: string }) => void; |
15 | openSettings: (args: { path: string }) => void; | 14 | openSettings: (args: { path: string }) => void; |
16 | reload: (args: { serviceId: string }) => void; | 15 | reload: (args: { serviceId: string }) => void; |
@@ -50,6 +49,7 @@ class TabBarSortableList extends Component<IProps> { | |||
50 | {services.map((service, index) => ( | 49 | {services.map((service, index) => ( |
51 | <TabItem | 50 | <TabItem |
52 | key={service.id} | 51 | key={service.id} |
52 | // @ts-ignore | ||
53 | clickHandler={() => setActive({ serviceId: service.id })} | 53 | clickHandler={() => setActive({ serviceId: service.id })} |
54 | service={service} | 54 | service={service} |
55 | index={index} | 55 | index={index} |
diff --git a/src/components/services/tabs/TabItem.tsx b/src/components/services/tabs/TabItem.tsx index fae788764..2ed595919 100644 --- a/src/components/services/tabs/TabItem.tsx +++ b/src/components/services/tabs/TabItem.tsx | |||
@@ -1,4 +1,5 @@ | |||
1 | import { app, dialog, Menu } from '@electron/remote'; | 1 | import { app, dialog, Menu } from '@electron/remote'; |
2 | import { noop } from 'lodash'; | ||
2 | import { Component } from 'react'; | 3 | import { Component } from 'react'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; |
4 | import { inject, observer } from 'mobx-react'; | 5 | import { inject, observer } from 'mobx-react'; |
@@ -6,7 +7,6 @@ import classnames from 'classnames'; | |||
6 | import { SortableElement } from 'react-sortable-hoc'; | 7 | import { SortableElement } from 'react-sortable-hoc'; |
7 | import injectSheet, { WithStylesProps } from 'react-jss'; | 8 | import injectSheet, { WithStylesProps } from 'react-jss'; |
8 | import ms from 'ms'; | 9 | import ms from 'ms'; |
9 | |||
10 | import { autorun, makeObservable, observable, reaction } from 'mobx'; | 10 | import { autorun, makeObservable, observable, reaction } from 'mobx'; |
11 | import { mdiExclamation, mdiVolumeSource } from '@mdi/js'; | 11 | import { mdiExclamation, mdiVolumeSource } from '@mdi/js'; |
12 | import Service from '../../../models/Service'; | 12 | import Service from '../../../models/Service'; |
@@ -348,6 +348,8 @@ class TabItem extends Component<IProps, IState> { | |||
348 | 'is-label-enabled': showServiceNameSetting, | 348 | 'is-label-enabled': showServiceNameSetting, |
349 | })} | 349 | })} |
350 | onClick={clickHandler} | 350 | onClick={clickHandler} |
351 | onKeyDown={noop} | ||
352 | role="presentation" | ||
351 | onContextMenu={() => menu.popup()} | 353 | onContextMenu={() => menu.popup()} |
352 | data-tip={`${service.name} ${ | 354 | data-tip={`${service.name} ${ |
353 | shortcutIndex <= 9 | 355 | shortcutIndex <= 9 |
@@ -407,5 +409,6 @@ class TabItem extends Component<IProps, IState> { | |||
407 | } | 409 | } |
408 | 410 | ||
409 | export default injectIntl( | 411 | export default injectIntl( |
412 | // @ts-ignore | ||
410 | SortableElement(injectSheet(styles, { injectTheme: true })(TabItem)), | 413 | SortableElement(injectSheet(styles, { injectTheme: true })(TabItem)), |
411 | ); | 414 | ); |
diff --git a/src/components/services/tabs/Tabbar.tsx b/src/components/services/tabs/Tabbar.tsx index 64541cc8f..e3b5a7ba9 100644 --- a/src/components/services/tabs/Tabbar.tsx +++ b/src/components/services/tabs/Tabbar.tsx | |||
@@ -97,6 +97,7 @@ class TabBar extends Component<IProps> { | |||
97 | return ( | 97 | return ( |
98 | <div> | 98 | <div> |
99 | <TabBarSortableList | 99 | <TabBarSortableList |
100 | // @ts-ignore | ||
100 | services={services} | 101 | services={services} |
101 | setActive={setActive} | 102 | setActive={setActive} |
102 | onSortEnd={this.onSortEnd} | 103 | onSortEnd={this.onSortEnd} |