mirror of
https://github.com/mue/mue.git
synced 2026-07-19 23:14:10 +02:00
fix: widget order tab no longer shows disabled widgets, better font for Russian, add Baidu search engine etc
This commit is contained in:
@@ -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>
|
||||
));
|
||||
|
||||
|
||||
@@ -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')}%);`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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="
|
||||
}
|
||||
]
|
||||
|
||||
@@ -9,7 +9,7 @@ import './scss/index.scss';
|
||||
import 'react-toastify/dist/ReactToastify.min.css';
|
||||
|
||||
import '@fontsource/lexend-deca/latin-400.css';
|
||||
import '@fontsource/roboto/cyrillic-400.css';
|
||||
import '@fontsource/montserrat/cyrillic-500.css';
|
||||
|
||||
// language
|
||||
import merge from '@material-ui/utils/deepmerge';
|
||||
|
||||
@@ -129,7 +129,7 @@ export default class SettingsFunctions {
|
||||
<style>
|
||||
${url}
|
||||
* {
|
||||
font-family: '${font}', 'Lexend Deca', 'Roboto' !important;
|
||||
font-family: '${font}', 'Lexend Deca', 'Montserrat' !important;
|
||||
${fontweight}
|
||||
${fontstyle}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
[
|
||||
{
|
||||
"name": "Chinese (Simplified)",
|
||||
"value": "zh_CN"
|
||||
},
|
||||
{
|
||||
"name": "Deutsch",
|
||||
"value": "de_DE"
|
||||
@@ -34,5 +30,9 @@
|
||||
{
|
||||
"name": "Pусский",
|
||||
"value": "ru"
|
||||
},
|
||||
{
|
||||
"name": "中文 (简体)",
|
||||
"value": "zh_CN"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -13,7 +13,7 @@ body {
|
||||
}
|
||||
|
||||
* {
|
||||
font-family: 'Lexend Deca', 'Roboto' !important;
|
||||
font-family: 'Lexend Deca', 'Montserrat' !important;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
outline: none;
|
||||
|
||||
@@ -21,7 +21,9 @@
|
||||
"addons": "我的插件",
|
||||
"marketplace": "插件市场"
|
||||
},
|
||||
"loading": "载入中...",
|
||||
"settings": {
|
||||
"enabled": "已启用",
|
||||
"sections": {
|
||||
"time": {
|
||||
"title": "时间",
|
||||
@@ -55,8 +57,8 @@
|
||||
"buttons": {
|
||||
"favourite": "收藏",
|
||||
"view": "查看",
|
||||
"refresh": "刷新",
|
||||
"disabled": "已禁用"
|
||||
"disabled": "已禁用",
|
||||
"download": "下载"
|
||||
},
|
||||
"effects": {
|
||||
"blur": "调整模糊",
|
||||
@@ -64,6 +66,7 @@
|
||||
},
|
||||
"source": {
|
||||
"custom_url": "自定义背景链接",
|
||||
"api": "背景背景来源",
|
||||
"custom_background": "自定义背景",
|
||||
"custom_colour": "自定义背景颜色",
|
||||
"upload": "上传",
|
||||
@@ -77,7 +80,7 @@
|
||||
"voice_search": "语音搜索"
|
||||
},
|
||||
"advanced": {
|
||||
"offline": "离线模式"
|
||||
"offline_mode": "离线模式"
|
||||
},
|
||||
"dark": "暗黑主题",
|
||||
"experimental": {
|
||||
@@ -86,6 +89,11 @@
|
||||
"animations": "动画",
|
||||
"nightmode": "夜间自动启用暗黑主题"
|
||||
},
|
||||
"appearance": {
|
||||
"navbar": {
|
||||
"refresh": "刷新按钮"
|
||||
}
|
||||
},
|
||||
"language": {
|
||||
"title": "语言"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user