Permalink
Browse files

fix(Service Tabs): Remove "delete service" context menu when not in d…

…evelopment mode
  • Loading branch information...
adlk committed Mar 18, 2018
1 parent 47885bb commit 3a5c3f016bfa20cb2b0c7108aa19350cdaec6085
Showing with 8 additions and 4 deletions.
  1. +8 −4 src/components/services/tabs/TabItem.js
@@ -7,7 +7,7 @@ import classnames from 'classnames';
import { SortableElement } from 'react-sortable-hoc';
import ServiceModel from '../../../models/Service';
import { ctrlKey } from '../../../environment';
import { isDevMode, ctrlKey } from '../../../environment';
const { Menu } = remote;
@@ -119,10 +119,14 @@ class TabItem extends Component {
click: () => (service.isEnabled ? disableService() : enableService()),
}, {
type: 'separator',
}, {
label: intl.formatMessage(messages.deleteService),
click: () => deleteService(),
}];
if (isDevMode) {
menuTemplate.push({
label: intl.formatMessage(messages.deleteService),
click: () => deleteService(),
});
}
const menu = Menu.buildFromTemplate(menuTemplate);
let notificationBadge = null;

0 comments on commit 3a5c3f0

Please sign in to comment.