From 1fb0af10a8559cca3e99b910bce8fd5a9dd566b4 Mon Sep 17 00:00:00 2001 From: David Ralph Date: Tue, 13 Apr 2021 14:18:42 +0100 Subject: [PATCH] fix: widget order tab no longer shows disabled widgets, better font for Russian, add Baidu search engine etc --- README.md | 2 +- package.json | 2 +- .../modals/main/settings/sections/Order.jsx | 17 ++++++++- .../widgets/background/Background.jsx | 2 +- .../widgets/search/search_engines.json | 37 +++++++++++-------- src/index.js | 2 +- src/modules/helpers/settings.js | 2 +- src/modules/languages.json | 8 ++-- src/scss/index.scss | 2 +- src/translations/zh_CN.json | 14 +++++-- 10 files changed, 57 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index b9f0e5b1..b2aafbb0 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,7 @@ Please note that we have dropped support for Opera as of Mue 5.0 [Austin Huang](https://github.com/austinhuang0131) - Chinese (Simplified)
[FreeFun](https://github.com/xXFreeFunXx) - German
### Contributors -Many thanks to [Highholding](https://discord.bio/p/highholding), [Noa Shapira](#), [Roee Lupo](https://github.com/RoeeLupo), [Jeroen](#), [Glasvegas](https://twitter.com/_glasvegas), [Anders](https://github.com/FuryingFox), [Oded Shapira](https://twitter.com/dondishdev), Jacob Tyrrell and [Nikka Lai](#) for letting us use their wonderful photographs. +Many thanks to [Highholding](https://discord.bio/p/highholding), [Noa Shapira](#), [Roee Lupo](https://github.com/RoeeLupo), [Jeroen](#), [Gio](#), [Anders](https://github.com/FuryingFox), [Oded Shapira](https://twitter.com/dondishdev), Jacob Tyrrell and [Nikka Lai](#) for letting us use their wonderful photographs. And finally, a big thank you to all the other [contributors](https://github.com/mue/mue/graphs/contributors)! ### Resources diff --git a/package.json b/package.json index 50f00d95..539f65f8 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "version": "5.0.0", "dependencies": { "@fontsource/lexend-deca": "^4.2.3", - "@fontsource/roboto": "^4.2.3", + "@fontsource/montserrat": "^4.2.2", "@material-ui/core": "4.11.3", "@material-ui/icons": "4.11.2", "react": "17.0.2", diff --git a/src/components/modals/main/settings/sections/Order.jsx b/src/components/modals/main/settings/sections/Order.jsx index e53736e6..402b6747 100644 --- a/src/components/modals/main/settings/sections/Order.jsx +++ b/src/components/modals/main/settings/sections/Order.jsx @@ -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}) => ( -
  • +
  • - {value.charAt(0).toUpperCase() + value.slice(1)} + {widget_name[value]}
  • )); diff --git a/src/components/widgets/background/Background.jsx b/src/components/widgets/background/Background.jsx index 3613524d..e3766665 100644 --- a/src/components/widgets/background/Background.jsx +++ b/src/components/widgets/background/Background.jsx @@ -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')}%);` ); } } diff --git a/src/components/widgets/search/search_engines.json b/src/components/widgets/search/search_engines.json index 1033ebdc..4bed59cc 100644 --- a/src/components/widgets/search/search_engines.json +++ b/src/components/widgets/search/search_engines.json @@ -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=" } ] diff --git a/src/index.js b/src/index.js index cfe1bcf6..5d414eb5 100644 --- a/src/index.js +++ b/src/index.js @@ -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'; diff --git a/src/modules/helpers/settings.js b/src/modules/helpers/settings.js index 41dee99a..c8139bc3 100644 --- a/src/modules/helpers/settings.js +++ b/src/modules/helpers/settings.js @@ -129,7 +129,7 @@ export default class SettingsFunctions {