fix: only show features in settings that are compatible with the browser and fix date widget

This commit is contained in:
David Ralph
2021-03-31 19:53:26 +01:00
parent 4ad3c3142a
commit a5b2dd39cb
4 changed files with 9 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
import React from 'react';
import { isChrome } from 'react-device-detect';
import { toast } from 'react-toastify';
import Dropdown from '../Dropdown';
@@ -61,7 +62,7 @@ export default class SearchSettings extends React.PureComponent {
<>
<h2>{search.title}</h2>
<Switch name='searchBar' text={language.enabled} />
<Checkbox name='voiceSearch' text={search.voice_search} />
{isChrome ? <Checkbox name='voiceSearch' text={search.voice_search} /> : null}
<Dropdown label={search.search_engine} name='searchEngine' onChange={(value) => this.setSearchEngine(value)}>
{searchEngines.map((engine) =>
<option key={engine.name} value={engine.settingsName}>{engine.name}</option>