Even more bug fixes

This commit is contained in:
David Ralph
2020-09-23 10:48:23 +01:00
parent 66414461c4
commit 7dbd4976b7
6 changed files with 36 additions and 8 deletions

View File

@@ -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 = '';

View File

@@ -82,7 +82,7 @@ export default class Settings extends React.PureComponent {
</Section>
<Section title={this.props.language.quote.title} name='quote'>
<Checkbox name='copyButton' text={this.props.language.quote.copy} />
<Checkbox name='tweetButton' text='Tweet Button' />
<Checkbox name='tweetButton' text={this.props.language.quote.tweet} />
</Section>
<Section title={this.props.language.background.title} name='background'>
<BackgroundSettings language={this.props.language} toastLanguage={this.props.toastLanguage} />

View File

@@ -11,8 +11,10 @@ export default class Search extends React.PureComponent {
const setting = localStorage.getItem('searchEngine');
const info = searchEngines.find(i => i.settingsName === setting);
url = info.url;
if (info.query) query = info.query;
if (info !== undefined) {
url = info.url;
if (info.query) query = info.query;
}
const custom = localStorage.getItem('customSearchEngine');
if (custom) url = custom;

View File

@@ -63,8 +63,11 @@ export default class SettingsFunctions {
localStorage.setItem('customBackgroundColour', document.getElementById('customBackgroundHex').textContent);
}
if (document.getElementById('searchEngineInput').enabled === 'true') {
localStorage.setItem('searchEngine', 'custom');
localStorage.setItem('customSearchEngine', document.getElementById('customSearchEngine').value);
const input = document.getElementById('customSearchEngine').value;
if (input) {
localStorage.setItem('searchEngine', 'custom');
localStorage.setItem('customSearchEngine', input);
}
}
window.location.reload();
}

View File

@@ -160,6 +160,7 @@ li {
width: 25px;
height: 25px;
border-radius: 12px;
border: 0;
background: map-get($theme-colours, "gradient");
cursor: pointer;
}
@@ -185,6 +186,27 @@ input[type=color] {
}
}
// This is duplicated because it didn't work with a comma, need to look into it later
input[type=color]::-moz-color-swatch {
border-radius: 100%;
height: 30px;
width: 30px;
box-shadow: map-get($main-parts, "shadow");
border: none;
outline: none;
-webkit-appearance: none;
vertical-align: middle;
&::-moz-color-swatch-wrapper {
padding: 0;
}
&::-moz-color-swatch {
border: none;
border-radius: 100%;
}
}
input[type=checkbox] {
vertical-align: middle;
}
@@ -226,4 +248,4 @@ select#language {
.choices {
background-color: white;
}
}
}

View File

@@ -32,7 +32,8 @@
},
"quote": {
"title": "Quote",
"copy": "Copy Button"
"copy": "Copy Button",
"tweet": "Tweet Button"
},
"background": {
"title": "Background",