mirror of https://github.com/mue/mue.git
experimental: rework of widget visibility uI
This commit is contained in:
parent
79261a6ab4
commit
2972d9f76e
|
@ -2,7 +2,12 @@ import variables from 'modules/variables';
|
||||||
|
|
||||||
import { PureComponent } from 'react';
|
import { PureComponent } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { /*MdHelpOutline,*/ MdFlag, MdArrowBack } from 'react-icons/md';
|
import {
|
||||||
|
/*MdHelpOutline,*/ MdFlag,
|
||||||
|
MdArrowBack,
|
||||||
|
MdOutlineVisibilityOff,
|
||||||
|
MdOutlineVisibility,
|
||||||
|
} from 'react-icons/md';
|
||||||
|
|
||||||
import Slider from './Slider';
|
import Slider from './Slider';
|
||||||
import Switch from './Switch';
|
import Switch from './Switch';
|
||||||
|
@ -15,7 +20,7 @@ class Header extends PureComponent {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="flexTopMarketplace">
|
<div className="flexTopMarketplace topAddons">
|
||||||
{this.props.backButton ? (
|
{this.props.backButton ? (
|
||||||
<div className="returnButton" onClick={this.props.clickEffect}>
|
<div className="returnButton" onClick={this.props.clickEffect}>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
|
@ -27,6 +32,30 @@ class Header extends PureComponent {
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
<span className="mainTitle">{this.props.title}</span>
|
<span className="mainTitle">{this.props.title}</span>
|
||||||
|
{this.props.switch && (
|
||||||
|
<button
|
||||||
|
className="sideload"
|
||||||
|
onClick={() => {
|
||||||
|
if (localStorage.getItem(this.props.settings) === 'true') {
|
||||||
|
localStorage.setItem(this.props.setting, false);
|
||||||
|
} else {
|
||||||
|
localStorage.setItem(this.props.setting, true);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{localStorage.getItem(this.props.setting) === 'true' ? (
|
||||||
|
<>
|
||||||
|
Hide
|
||||||
|
<MdOutlineVisibilityOff />
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
Show
|
||||||
|
<MdOutlineVisibility />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="headerExtras">
|
<div className="headerExtras">
|
||||||
{/*<span
|
{/*<span
|
||||||
|
|
|
@ -1,4 +1,12 @@
|
||||||
[
|
[
|
||||||
|
{
|
||||||
|
"name": "Bahasa Indonesia",
|
||||||
|
"value": "id_ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "বাংলা",
|
||||||
|
"value": "bn"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Deutsch",
|
"name": "Deutsch",
|
||||||
"value": "de_DE"
|
"value": "de_DE"
|
||||||
|
@ -46,13 +54,5 @@
|
||||||
{
|
{
|
||||||
"name": "Portuguese (Brazil)",
|
"name": "Portuguese (Brazil)",
|
||||||
"value": "pt_BR"
|
"value": "pt_BR"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "বাংলা",
|
|
||||||
"value": "bn"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "bahasa Indonesia",
|
|
||||||
"value": "id_ID"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue