bug fixes

This commit is contained in:
David Ralph
2020-08-27 11:49:30 +01:00
parent 736a589b59
commit 92495ce6ce
8 changed files with 24 additions and 22 deletions

View File

@@ -3,7 +3,7 @@
"offline_enabled": true, "offline_enabled": true,
"name": "Mue", "name": "Mue",
"description": "Fast, open and free-to-use new tab page for most modern browsers.", "description": "Fast, open and free-to-use new tab page for most modern browsers.",
"version": "4.0.0", "version": "4.0.2",
"browser_action": { "browser_action": {
"default_icon": "./icons/extension-icon.png" "default_icon": "./icons/extension-icon.png"
}, },
@@ -14,8 +14,5 @@
"16": "./icons/16x16-circle.png", "16": "./icons/16x16-circle.png",
"48": "./icons/48x48-circle.png", "48": "./icons/48x48-circle.png",
"128": "./icons/128x128-circle.png" "128": "./icons/128x128-circle.png"
},
"background": {
"scripts": ["background-chrome.js"]
} }
} }

View File

@@ -2,7 +2,7 @@
"manifest_version": 2, "manifest_version": 2,
"name": "Mue", "name": "Mue",
"description": "Fast, open and free-to-use new tab page for most modern browsers.", "description": "Fast, open and free-to-use new tab page for most modern browsers.",
"version": "4.0.0", "version": "4.0.2",
"browser_action": { "browser_action": {
"default_icon": "./icons/extension-icon.png" "default_icon": "./icons/extension-icon.png"
}, },

View File

@@ -2,7 +2,7 @@
"manifest_version": 2, "manifest_version": 2,
"name": "Mue", "name": "Mue",
"description": "Fast, open and free-to-use new tab page for most modern browsers.", "description": "Fast, open and free-to-use new tab page for most modern browsers.",
"version": "4.0.0", "version": "4.0.2",
"browser_action": { "browser_action": {
"default_icon": "./icons/extension-icon.png" "default_icon": "./icons/extension-icon.png"
}, },

View File

@@ -13,7 +13,7 @@
"homepage": "https://muetab.xyz", "homepage": "https://muetab.xyz",
"bugs": "https://github.com/mue/mue/issues/new?assignees=&labels=bug&template=bug-report.md&title=%5BBUG%5D", "bugs": "https://github.com/mue/mue/issues/new?assignees=&labels=bug&template=bug-report.md&title=%5BBUG%5D",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"version": "4.0.0", "version": "4.0.2",
"dependencies": { "dependencies": {
"@material-ui/core": "^4.11.0", "@material-ui/core": "^4.11.0",
"@material-ui/icons": "^4.9.1", "@material-ui/icons": "^4.9.1",

View File

@@ -168,7 +168,7 @@ export default class Settings extends React.PureComponent {
<div className='section'> <div className='section'>
<h4 onClick={() => SettingsFunctions.toggleExtra(document.getElementsByClassName('extraSettings')[3], document.getElementsByClassName('expandIcons')[3])}>{this.props.language.background.title}</h4> <h4 onClick={() => SettingsFunctions.toggleExtra(document.getElementsByClassName('extraSettings')[3], document.getElementsByClassName('expandIcons')[3])}>{this.props.language.background.title}</h4>
<ExpandMore style={{ 'transition': 'all 0.5s ease 0s' }} className='expandIcons' onClick={() => SettingsFunctions.toggleExtra(document.getElementsByClassName('extraSettings')[3], document.getElementsByClassName('expandIcons')[3])} /> <ExpandMore style={{ 'transition': 'all 0.5s ease 0s' }} className='expandIcons' onClick={() => SettingsFunctions.toggleExtra(document.getElementsByClassName('extraSettings')[3], document.getElementsByClassName('expandIcons')[3])} />
<Slider name='background' override='customBackground' /> <Slider name='background' />
<li className='extraSettings'> <li className='extraSettings'>
<ul> <ul>
<label htmlFor='8'>{this.props.language.background.API} </label> <label htmlFor='8'>{this.props.language.background.API} </label>

View File

@@ -50,10 +50,9 @@ export default class Background extends React.PureComponent {
try { // First we try and get an image from the API... try { // First we try and get an image from the API...
let requestURL; let requestURL;
const enabled = localStorage.getItem('webp'); const enabled = localStorage.getItem('webp');
const backgroundAPI = localStorage.getItem('backgroundAPI');
let data; let data;
switch (backgroundAPI) { switch (localStorage.getItem('backgroundAPI')) {
case 'mue': case 'mue':
if (await supportsWebP && enabled === 'true') requestURL = Constants.API_URL + '/getImage?webp=true'; if (await supportsWebP && enabled === 'true') requestURL = Constants.API_URL + '/getImage?webp=true';
else requestURL = Constants.API_URL + '/getImage?category=Outdoors'; else requestURL = Constants.API_URL + '/getImage?category=Outdoors';
@@ -73,7 +72,8 @@ export default class Background extends React.PureComponent {
document.getElementById('backgroundImage').setAttribute('style', `-webkit-filter:blur(${localStorage.getItem('blur')}px); background-image: url(${data.file})`); // Set background and blur etc document.getElementById('backgroundImage').setAttribute('style', `-webkit-filter:blur(${localStorage.getItem('blur')}px); background-image: url(${data.file})`); // Set background and blur etc
let credit = document.getElementById('photographer'); let credit = document.getElementById('photographer');
credit.innerText = `${credit.innerText} ${data.photographer}`; // Set the credit credit.innerText = `${credit.innerText} ${data.photographer}`; // Set the credit
document.getElementById('location').innerText = `${data.location}`; // Set the location tooltip if (data.location.replace(/[null]+/g, '') === ' ') return document.getElementById('backgroundCredits').style.display = 'none';
document.getElementById('location').innerText = `${data.location.replace('null', '')}`; // Set the location tooltip
} catch (e) { // ..and if that fails we load one locally } catch (e) { // ..and if that fails we load one locally
this.doOffline(); this.doOffline();
} }
@@ -81,7 +81,10 @@ export default class Background extends React.PureComponent {
} }
componentDidMount() { componentDidMount() {
if (localStorage.getItem('background') === 'false') return document.getElementById('backgroundCredits').style.display = 'none'; if (localStorage.getItem('background') === 'false') {
document.getElementById('photographer').style.display = 'none';
return document.getElementById('backgroundCredits').style.display = 'none';
}
if (localStorage.getItem('animations') === 'true') document.getElementById('backgroundImage').classList.add('fade-in'); if (localStorage.getItem('animations') === 'true') document.getElementById('backgroundImage').classList.add('fade-in');
this.setBackground(); this.setBackground();
} }

View File

@@ -13,6 +13,8 @@
-moz-user-select: none; -moz-user-select: none;
-webkit-user-select: none; -webkit-user-select: none;
user-select: none; user-select: none;
scrollbar-width: thin;
scrollbar-color: #34495e #bdc3c7;
&:focus { &:focus {
outline: 0; outline: 0;
@@ -183,4 +185,14 @@
width: 100%; width: 100%;
height: auto; height: auto;
} }
}
::-webkit-scrollbar {
width: 5px;
background: #bdc3c7;
height: auto;
}
::-webkit-scrollbar-thumb {
background: #34495e;
} }

View File

@@ -69,16 +69,6 @@ input {
} }
} }
::-webkit-scrollbar {
width: 5px;
background: #bdc3c7;
height: auto;
}
::-webkit-scrollbar-thumb {
background: #34495e;
}
h4, h4,
.switch, .switch,
.expandIcons { .expandIcons {