fix: widget order tab no longer shows disabled widgets, better font for Russian, add Baidu search engine etc

This commit is contained in:
David Ralph
2021-04-13 14:18:42 +01:00
parent a5b5ee1912
commit 1fb0af10a8
10 changed files with 57 additions and 31 deletions

View File

@@ -7,10 +7,23 @@ import DragHandleIcon from '@material-ui/icons/DragIndicator';
import { sortableContainer, sortableElement } from 'react-sortable-hoc';
import { toast } from 'react-toastify';
const enabled = (setting) => {
return (localStorage.getItem(setting) === 'true');
};
const settings = window.language.modals.main.settings.sections;
const widget_name = {
greeting: settings.greeting.title,
time: settings.time.title,
quicklinks: settings.quicklinks.title,
quote: settings.quote.title,
date: settings.time.date.title
};
const SortableItem = sortableElement(({value}) => (
<li className='sortableitem'>
<li className='sortableitem' style={{ display: enabled(value) ? 'block' : 'none' }}>
<DragHandleIcon style={{'verticalAlign': 'middle'}} />
{value.charAt(0).toUpperCase() + value.slice(1)}
{widget_name[value]}
</li>
));

View File

@@ -100,7 +100,7 @@ export default class Background extends React.PureComponent {
} else {
document.querySelector('#backgroundImage').setAttribute(
'style',
`${this.state.style}; -webkit-filter: blur(${localStorage.getItem('blur')}px) brightness(${localStorage.getItem('brightness')}%);`
`${this.state.style}; -webkit-filter: brightness(${localStorage.getItem('brightness')}%);`
);
}
}

View File

@@ -14,15 +14,30 @@
"settingsName": "bing",
"url": "https://bing.com/search"
},
{
"name": "Ecosia",
"settingsName": "ecosia",
"url": "https://ecosia.org/search"
},
{
"name": "Ask",
"settingsName": "ask",
"url": "https://ask.com/web"
},
{
"name": "Yahoo",
"settingsName": "yahoo",
"url": "https://search.yahoo.com/search"
},
{
"name": "Ecosia",
"settingsName": "ecosia",
"url": "https://ecosia.org/search"
"name": "Qwant",
"settingsName": "qwant",
"url": "https://www.qwant.com/"
},
{
"name": "Startpage",
"settingsName": "startpage",
"url": "https://www.startpage.com/sp/search"
},
{
"name": "Яндекс",
@@ -31,18 +46,8 @@
"query": "text"
},
{
"name": "Qwant",
"settingsName": "qwant",
"url": "https://www.qwant.com/"
},
{
"name": "Ask",
"settingsName": "ask",
"url": "https://ask.com/web"
},
{
"name": "Startpage",
"settingsName": "startpage",
"url": "https://www.startpage.com/sp/search"
"name": "百度",
"settingsName": "baidu",
"url": "https://www.baidu.com/s?wd="
}
]