diff --git a/lib/gui/app/components/settings/settings.tsx b/lib/gui/app/components/settings/settings.tsx index aac93815..dd9473aa 100644 --- a/lib/gui/app/components/settings/settings.tsx +++ b/lib/gui/app/components/settings/settings.tsx @@ -19,10 +19,9 @@ import * as _ from 'lodash'; import * as React from 'react'; import { Box, Button, Flex, Checkbox, TextWithCopy, Txt } from 'rendition'; -import { faTimes } from '@fortawesome/free-solid-svg-icons'; +import { faTimes, faChartBar } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; - import { version, packageType } from '../../../../../package.json'; import * as settings from '../../models/settings'; import * as analytics from '../../modules/analytics'; @@ -105,9 +104,7 @@ export function SettingsModal({ toggleModal }: SettingsModalProps) { })(); }, []); - const toggleSetting = async (setting: string) => { - const value = currentSettings[setting]; analytics.logEvent('Toggle setting', { setting, value }); await settings.set(setting, !value); @@ -135,7 +132,7 @@ export function SettingsModal({ toggleModal }: SettingsModalProps) { try { unlinkSync('/usr/src/diag-data/startup.lock'); } catch (error) { - console.log("Can't remove diag lock", error) + console.log("Can't remove diag lock", error); } try { @@ -151,16 +148,15 @@ export function SettingsModal({ toggleModal }: SettingsModalProps) { 'Content-Type': 'application/json', }, }); - + if (startRes.ok) { // good } else { setErrorMessage(`${errorMessage} :: ${startRes.statusText}`); - } + } } catch (error) { - console.log("Error in starting diag", error) + console.log('Error in starting diag', error); } - }; const removeDiag = async () => { @@ -258,16 +254,21 @@ export function SettingsModal({ toggleModal }: SettingsModalProps) { {diagApiIsUp ? ( <> - - ) : ( <> -