mirror of
https://github.com/mue/mue.git
synced 2026-06-08 22:18:40 +02:00
fix: only show features in settings that are compatible with the browser and fix date widget
This commit is contained in:
@@ -21,6 +21,7 @@
|
|||||||
"react-clock": "^3.0.0",
|
"react-clock": "^3.0.0",
|
||||||
"react-color-gradient-picker": "^0.1.2",
|
"react-color-gradient-picker": "^0.1.2",
|
||||||
"react-day-picker": "^7.4.10",
|
"react-day-picker": "^7.4.10",
|
||||||
|
"react-device-detect": "^1.17.0",
|
||||||
"react-dom": "17.0.2",
|
"react-dom": "17.0.2",
|
||||||
"react-modal": "3.12.1",
|
"react-modal": "3.12.1",
|
||||||
"react-sortable-hoc": "^2.0.0",
|
"react-sortable-hoc": "^2.0.0",
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
import { engineName } from 'react-device-detect';
|
||||||
|
|
||||||
import Checkbox from '../Checkbox';
|
import Checkbox from '../Checkbox';
|
||||||
import Dropdown from '../Dropdown';
|
import Dropdown from '../Dropdown';
|
||||||
import Radio from '../Radio';
|
import Radio from '../Radio';
|
||||||
@@ -57,7 +59,9 @@ export default function AppearanceSettings() {
|
|||||||
|
|
||||||
<h3>{appearance.accessibility.title}</h3>
|
<h3>{appearance.accessibility.title}</h3>
|
||||||
<Checkbox name='animations' text={appearance.animations} betaFeature={true} />
|
<Checkbox name='animations' text={appearance.animations} betaFeature={true} />
|
||||||
<Slider title={appearance.accessibility.widget_zoom} name='widgetzoom' default='100' min='50' max='200' display='%'/>
|
{(engineName === 'Blink') ?
|
||||||
|
<Slider title={appearance.accessibility.widget_zoom} name='widgetzoom' default='100' min='50' max='200' display='%'/>
|
||||||
|
: null}
|
||||||
<Slider title={appearance.accessibility.toast_duration} name='toastDisplayTime' default='2500' min='500' max='5000' display={' ' + appearance.accessibility.milliseconds} />
|
<Slider title={appearance.accessibility.toast_duration} name='toastDisplayTime' default='2500' min='500' max='5000' display={' ' + appearance.accessibility.milliseconds} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
import { isChrome } from 'react-device-detect';
|
||||||
import { toast } from 'react-toastify';
|
import { toast } from 'react-toastify';
|
||||||
|
|
||||||
import Dropdown from '../Dropdown';
|
import Dropdown from '../Dropdown';
|
||||||
@@ -61,7 +62,7 @@ export default class SearchSettings extends React.PureComponent {
|
|||||||
<>
|
<>
|
||||||
<h2>{search.title}</h2>
|
<h2>{search.title}</h2>
|
||||||
<Switch name='searchBar' text={language.enabled} />
|
<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)}>
|
<Dropdown label={search.search_engine} name='searchEngine' onChange={(value) => this.setSearchEngine(value)}>
|
||||||
{searchEngines.map((engine) =>
|
{searchEngines.map((engine) =>
|
||||||
<option key={engine.name} value={engine.settingsName}>{engine.name}</option>
|
<option key={engine.name} value={engine.settingsName}>{engine.name}</option>
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export default class DateWidget extends React.PureComponent {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// Long date
|
// Long date
|
||||||
const lang = localStorage.getItem('language');
|
const lang = localStorage.getItem('language').split('_')[0];
|
||||||
|
|
||||||
const nth = (localStorage.getItem('datenth') === 'true') ? dtf.nth(date.getDate()) : date.getDate();
|
const nth = (localStorage.getItem('datenth') === 'true') ? dtf.nth(date.getDate()) : date.getDate();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user