mirror of https://github.com/mue/mue.git
style: codacy fixes
This commit is contained in:
parent
ef2f666ccf
commit
490f42a9ad
|
@ -47,4 +47,4 @@
|
|||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,4 +34,4 @@ select {
|
|||
.dark select {
|
||||
background: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>") right center no-repeat, var(--sidebar) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,11 +17,11 @@ input {
|
|||
-webkit-appearance: none;
|
||||
vertical-align: middle;
|
||||
background: none;
|
||||
|
||||
|
||||
&::-webkit-color-swatch-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
&::-webkit-color-swatch {
|
||||
border: none;
|
||||
border-radius: 100%;
|
||||
|
@ -37,11 +37,11 @@ input {
|
|||
-moz-appearance: none;
|
||||
vertical-align: middle;
|
||||
background: none;
|
||||
|
||||
|
||||
&::-moz-color-swatch-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
&::-moz-color-swatch {
|
||||
border: none;
|
||||
border-radius: 100%;
|
||||
|
@ -176,7 +176,7 @@ legend {
|
|||
li {
|
||||
cursor: initial;
|
||||
font-size: 1rem;
|
||||
list-style-type:disc;
|
||||
list-style-type: disc;
|
||||
padding: 0;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
@ -223,9 +223,13 @@ input[type=number] {
|
|||
h2 {
|
||||
font-size: 2rem !important;
|
||||
}
|
||||
h2, span, svg {
|
||||
|
||||
h2,
|
||||
span,
|
||||
svg {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
svg {
|
||||
vertical-align: sub;
|
||||
font-size: 1.4rem;
|
||||
|
|
|
@ -153,7 +153,8 @@ export default class Background extends PureComponent {
|
|||
photographerURL: photographerURL,
|
||||
photoURL: photoURL
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this.setState(object);
|
||||
|
||||
localStorage.setItem('currentBackground', JSON.stringify(object));
|
||||
|
|
|
@ -52,7 +52,7 @@ export default function PhotoInformation(props) {
|
|||
img.onload = (event) => {
|
||||
setWidth(event.target.width);
|
||||
setHeight(event.target.height);
|
||||
}
|
||||
};
|
||||
img.src = (localStorage.getItem('ddgProxy') === 'true' && !props.info.offline && !props.url.startsWith('data:')) ? window.constants.DDG_IMAGE_PROXY + props.url : props.url;
|
||||
|
||||
// info is still there because we want the favourite button to work
|
||||
|
|
|
@ -16,7 +16,7 @@ export default class Navbar extends PureComponent {
|
|||
const navbarIcons = document.querySelectorAll('.navbar-container');
|
||||
for (let i = 0; i < navbarIcons.length; i++) {
|
||||
navbarIcons[i].style.fontSize = `${zoomNavbar}em`;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
|
|
@ -142,7 +142,7 @@ export default class Quote extends PureComponent {
|
|||
author: data.author,
|
||||
authorlink: this.getAuthorLink(data.author),
|
||||
quoteLanguage: quotelanguage
|
||||
}
|
||||
};
|
||||
|
||||
this.setState(object);
|
||||
localStorage.setItem('currentQuote', JSON.stringify(object));
|
||||
|
|
|
@ -71,4 +71,4 @@
|
|||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,4 +44,4 @@
|
|||
vertical-align: middle;
|
||||
font-size: 35px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ if (localStorage.getItem('stats') === 'true') {
|
|||
window.stats = {
|
||||
tabLoad: () => '',
|
||||
postEvent: () => ''
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
render(
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// since there is so much code in the component, we have moved it to a separate file
|
||||
export function videoCheck(url) {
|
||||
return url.startsWith('data:video/') || url.endsWith('.mp4') || url.endsWith('.webm') || url.endsWith('.ogg');
|
||||
};
|
||||
}
|
||||
|
||||
export function offlineBackground() {
|
||||
const offlineImages = require('./offlineImages.json');
|
||||
|
@ -20,7 +20,7 @@ export function offlineBackground() {
|
|||
offline: true,
|
||||
credit: photographer
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
localStorage.setItem('currentBackground', JSON.stringify(object));
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ export function nth(d) {
|
|||
default:
|
||||
return d + 'th';
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function convertTimezone(date, tz) {
|
||||
return new Date((typeof date === 'string' ? new Date(date) : date).toLocaleString('en-US', { timeZone: tz }));
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// based on https://stackoverflow.com/a/47009962
|
||||
export default function Interval(callback, interval, name) {
|
||||
export default function interval(callback, interval, name) {
|
||||
const key = name + 'interval';
|
||||
const timeInMs = localStorage.getItem(key);
|
||||
|
||||
|
@ -8,7 +8,7 @@ export default function Interval(callback, interval, name) {
|
|||
const executeCallback = () => {
|
||||
localStorage.setItem(key, Date.now());
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
if (timeInMs) {
|
||||
const delta = now - parseInt(timeInMs);
|
||||
|
|
|
@ -25,7 +25,7 @@ export function setDefaultSettings(reset) {
|
|||
|
||||
// Finally we set this to true so it doesn't run the function on every load
|
||||
localStorage.setItem('firstRun', true);
|
||||
};
|
||||
}
|
||||
|
||||
export function loadSettings(hotreload) {
|
||||
document.getElementById('widgets').style.zoom = localStorage.getItem('widgetzoom') + '%';
|
||||
|
|
|
@ -15,7 +15,7 @@ export function saveFile(data, filename = 'file') {
|
|||
|
||||
e.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
||||
a.dispatchEvent(e);
|
||||
};
|
||||
}
|
||||
|
||||
export function exportSettings() {
|
||||
let settings = {};
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background: var(--tab-active);
|
||||
background: var(--tab-active);
|
||||
}
|
||||
|
||||
svg {
|
||||
|
|
Loading…
Reference in New Issue