style: fix issues

This commit is contained in:
David Ralph
2021-04-08 20:02:31 +01:00
parent 2670c917b7
commit eaa992ce16
8 changed files with 12 additions and 13 deletions

View File

@@ -29,7 +29,7 @@ export default class Marketplace extends React.PureComponent {
version: '1.0.0', version: '1.0.0',
icon: '' icon: ''
} }
} };
this.buttons = { this.buttons = {
uninstall: <button className='removeFromMue' onClick={() => this.manage('uninstall')}>Remove</button>, uninstall: <button className='removeFromMue' onClick={() => this.manage('uninstall')}>Remove</button>,
install: <button className='addToMue' onClick={() => this.manage('install')}>Add to Mue</button> install: <button className='addToMue' onClick={() => this.manage('install')}>Add to Mue</button>

View File

@@ -117,7 +117,6 @@ ul.sidebar {
padding-left: 0; padding-left: 0;
height: 100vh; height: 100vh;
background: var(--sidebar); background: var(--sidebar);
left: 0;
border-radius: 12px 0 0 12px; border-radius: 12px 0 0 12px;
text-align: left; text-align: left;
font-size: 24px; font-size: 24px;

View File

@@ -37,7 +37,7 @@ export default class ColourSettings extends React.PureComponent {
toast(this.language.toasts.reset); toast(this.language.toasts.reset);
} }
InitializeColorPickerState(gradientSettings) { initialiseColorPickerState(gradientSettings) {
this.GradientPickerInitalState = { this.GradientPickerInitalState = {
points: gradientSettings.gradient.map((g) => { points: gradientSettings.gradient.map((g) => {
const rgb = hexToRgb(g.colour); const rgb = hexToRgb(g.colour);
@@ -145,7 +145,7 @@ export default class ColourSettings extends React.PureComponent {
let gradientInputs; let gradientInputs;
if (gradientHasMoreThanOneColour) { if (gradientHasMoreThanOneColour) {
if (this.GradientPickerInitalState === undefined) { if (this.GradientPickerInitalState === undefined) {
this.InitializeColorPickerState(this.state.gradientSettings); this.initialiseColorPickerState(this.state.gradientSettings);
} }
gradientInputs = ( gradientInputs = (

View File

@@ -79,5 +79,5 @@ export default function Tab(props) {
</li> </li>
{(divider === true) ? <hr/> : null} {(divider === true) ? <hr/> : null}
</> </>
) );
} }

View File

@@ -26,9 +26,9 @@ export default class Search extends React.PureComponent {
voiceSearch.onresult = (event) => { voiceSearch.onresult = (event) => {
searchText.value = event.results[0][0].transcript; searchText.value = event.results[0][0].transcript;
} };
voiceSearch.onend = () =>{ voiceSearch.onend = () => {
setTimeout(() => { setTimeout(() => {
window.location.href = this.state.url + `?${this.state.query}=` + searchText.value; window.location.href = this.state.url + `?${this.state.query}=` + searchText.value;
}, 1000); }, 1000);
@@ -46,7 +46,7 @@ export default class Search extends React.PureComponent {
let microphone = null; let microphone = null;
const setting = localStorage.getItem('searchEngine'); const setting = localStorage.getItem('searchEngine');
const info = searchEngines.find(i => i.settingsName === setting); const info = searchEngines.find((i) => i.settingsName === setting);
if (info !== undefined) { if (info !== undefined) {
url = info.url; url = info.url;

View File

@@ -13,7 +13,7 @@ export default function hexToRgb(value) {
value = value.slice(1, value.length); value = value.slice(1, value.length);
} }
if (value.length === 3){ if (value.length === 3) {
value = value.replace(regexp, '$1$1$2$2$3$3'); value = value.replace(regexp, '$1$1$2$2$3$3');
} }

View File

@@ -7,7 +7,7 @@ export default function rgbToHSv({ red, green, blue }) {
const v = Math.max(rabs, gabs, babs); const v = Math.max(rabs, gabs, babs);
const diff = v - Math.min(rabs, gabs, babs); const diff = v - Math.min(rabs, gabs, babs);
const diffc = c => (v - c) / 6 / diff + 1 / 2; const diffc = (c) => (v - c) / 6 / diff + 1 / 2;
if (diff === 0) { if (diff === 0) {
h = 0; h = 0;
@@ -18,7 +18,7 @@ export default function rgbToHSv({ red, green, blue }) {
gg = diffc(gabs); gg = diffc(gabs);
bb = diffc(babs); bb = diffc(babs);
if (rabs === v){ if (rabs === v) {
h = bb - gg; h = bb - gg;
} else if (gabs === v) { } else if (gabs === v) {
h = (1 / 3) + rr - bb; h = (1 / 3) + rr - bb;

View File

@@ -1,4 +1,4 @@
import ExperimentalInit from './experimental'; import experimentalInit from './experimental';
const defaultSettings = require('../default_settings.json'); const defaultSettings = require('../default_settings.json');
const languages = require('../languages.json'); const languages = require('../languages.json');
@@ -114,7 +114,7 @@ export default class SettingsFunctions {
} }
if (localStorage.getItem('experimental') === 'true') { if (localStorage.getItem('experimental') === 'true') {
ExperimentalInit(); experimentalInit();
} }
const widgetzoom = localStorage.getItem('widgetzoom'); const widgetzoom = localStorage.getItem('widgetzoom');