mirror of
https://github.com/mue/mue.git
synced 2026-07-02 12:43:35 +02:00
codacy
This commit is contained in:
@@ -5,7 +5,7 @@ import NewReleases from '@material-ui/icons/NewReleases';
|
||||
|
||||
export default class Navbar extends React.PureComponent {
|
||||
render() {
|
||||
let refreshHTML = <div className='navbar2' ><RefreshIcon className='refreshicon' onClick={() => window.location.reload()} /></div>
|
||||
let refreshHTML = <div className='navbar2' ><RefreshIcon className='refreshicon' onClick={() => window.location.reload()} /></div>;
|
||||
const refresh = localStorage.getItem('refresh');
|
||||
if (refresh === 'false') refreshHTML = '';
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ export default class Addons extends React.PureComponent {
|
||||
<h1>{this.props.language.added}</h1>
|
||||
<div className='items'>
|
||||
{this.state.installed.map((item) =>
|
||||
<div className='item' onClick={()=> this.toggle('item', item.type, item.name)}>
|
||||
<div className='item' onClick={() => this.toggle('item', item.type, item.name)}>
|
||||
<img alt='icon' src={item.content.data.icon_url} />
|
||||
<div className='details'>
|
||||
<h4>{item.content.data.name}</h4>
|
||||
|
||||
@@ -83,7 +83,7 @@ export default class Settings extends React.PureComponent {
|
||||
for (const key of Object.keys(content)) localStorage.setItem(key, content[key]);
|
||||
toast(this.props.toastLanguage.imported_settings);
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
document.getElementById('bg-input').onchange = (e) => {
|
||||
const reader = new FileReader();
|
||||
|
||||
@@ -27,12 +27,14 @@ export default class Search extends React.PureComponent {
|
||||
window.location.href = url + '?q=' + value;
|
||||
};
|
||||
|
||||
return <div id='searchBar' className='searchbar'>
|
||||
return (
|
||||
<div id='searchBar' className='searchbar'>
|
||||
<form id='searchBar' className='searchbarform' action={url}>
|
||||
<SearchIcon onClick={() => searchButton()} />
|
||||
<input type='text' placeholder={this.props.language} name={query} id='searchtext' className='searchtext'/>
|
||||
<div className='blursearcbBG'/>
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ import { toast } from 'react-toastify';
|
||||
|
||||
export default class MarketplaceFunctions {
|
||||
static urlParser (input) { // based on https://stackoverflow.com/questions/37684/how-to-replace-plain-urls-with-links
|
||||
let urlPattern = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()!@:%_+.~#?&//=]*)/;
|
||||
const urlPattern = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()!@:%_+.~#?&//=]*)/;
|
||||
return input.replace(urlPattern, '<a href="$&" target="_blank">$&</a>');
|
||||
}
|
||||
|
||||
@@ -17,11 +17,11 @@ export default class MarketplaceFunctions {
|
||||
}
|
||||
}
|
||||
localStorage.setItem('installed', JSON.stringify(installed));
|
||||
}
|
||||
};
|
||||
|
||||
switch (type) {
|
||||
case 'settings':
|
||||
let oldSettings = JSON.parse(localStorage.getItem('backup_settings'));
|
||||
const oldSettings = JSON.parse(localStorage.getItem('backup_settings'));
|
||||
localStorage.clear();
|
||||
oldSettings.forEach(item => localStorage.setItem(item.name, item.value));
|
||||
uninstallStuff();
|
||||
|
||||
@@ -26,7 +26,7 @@ export default class SettingsFunctions {
|
||||
}
|
||||
|
||||
static setItem(key, value) {
|
||||
let old = localStorage.getItem(key);
|
||||
const old = localStorage.getItem(key);
|
||||
let val = true;
|
||||
|
||||
if (old !== null && !value) {
|
||||
|
||||
@@ -48,7 +48,6 @@ button.tablinks {
|
||||
}
|
||||
|
||||
.dark {
|
||||
|
||||
.tab,
|
||||
button.tablinks {
|
||||
color: white;
|
||||
@@ -146,8 +145,8 @@ p.author {
|
||||
}
|
||||
}
|
||||
|
||||
#item>h1,
|
||||
#item>.MuiSvgIcon-root {
|
||||
#item > h1,
|
||||
#item > .MuiSvgIcon-root {
|
||||
display: inline;
|
||||
font-size: 35px !important;
|
||||
}
|
||||
@@ -207,7 +206,7 @@ p.description {
|
||||
background: #2d3436;
|
||||
}
|
||||
|
||||
#item>img {
|
||||
#item > img {
|
||||
border-radius: 24px;
|
||||
height: 200px;
|
||||
width: auto;
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
text-align: right;
|
||||
min-width: 50px;
|
||||
cursor: pointer;
|
||||
-webkit-filter: drop-shadow(0 0 6px rgba(0,0,0,.3));
|
||||
filter: drop-shadow(0 0 6px rgba(0,0,0,.3));
|
||||
-webkit-filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.3));
|
||||
filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.3));
|
||||
top: 20px;
|
||||
|
||||
svg {
|
||||
@@ -23,11 +23,12 @@
|
||||
.navbar1 {
|
||||
@extend %navbar;
|
||||
right: 20px;
|
||||
|
||||
svg {
|
||||
-webkit-backface-visibility: hidden;
|
||||
-webkit-transform: translateZ(0) scale(1.0, 1.0);
|
||||
-webkit-transform: translateZ(0) scale(1, 1);
|
||||
backface-visibility: hidden;
|
||||
transform: translateZ(0) scale(1.0, 1.0);
|
||||
transform: translateZ(0) scale(1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
margin: 0 auto;
|
||||
text-align: right;
|
||||
transition: ease 0.2s !important;
|
||||
|
||||
&:hover {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
.welcomeModalText {
|
||||
line-height: 2px;
|
||||
|
||||
h2.subtitle {
|
||||
font-size: 24px;
|
||||
color: #535353;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
h1.welcometitle {
|
||||
font-size: 50px;
|
||||
}
|
||||
@@ -13,6 +15,7 @@
|
||||
.welcomeContent {
|
||||
text-align: center;
|
||||
padding: 25px;
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
line-height: 20px !important;
|
||||
@@ -22,6 +25,7 @@
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
img.icon, svg {
|
||||
margin-top: -12px;
|
||||
padding: 10px;
|
||||
@@ -31,10 +35,12 @@
|
||||
transform: scale(1.1);
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0.7rem;
|
||||
line-height: 1em;
|
||||
}
|
||||
|
||||
img, svg {
|
||||
height: 24px;
|
||||
width: auto;
|
||||
|
||||
Reference in New Issue
Block a user