mirror of
https://github.com/mue/mue.git
synced 2026-07-23 00:37:27 +02:00
refactor: cleanup
This commit is contained in:
@@ -29,7 +29,7 @@ export default class BackgroundSettings extends PureComponent {
|
||||
}
|
||||
|
||||
async getBackgroundCategories() {
|
||||
const data = await (await fetch(window.constants.API_URL + '/images/categories', { signal: this.controller.signal })).json();
|
||||
const data = await (await fetch(variables.constants.API_URL + '/images/categories', { signal: this.controller.signal })).json();
|
||||
|
||||
if (this.controller.signal.aborted === true) {
|
||||
return;
|
||||
|
||||
@@ -100,7 +100,7 @@ export default class ColourSettings extends PureComponent {
|
||||
return newState;
|
||||
});
|
||||
|
||||
window.stats.postEvent('setting', 'Changed backgroundtype from colour to gradient');
|
||||
variables.stats.postEvent('setting', 'Changed backgroundtype from colour to gradient');
|
||||
}
|
||||
|
||||
currentGradientSettings = () => {
|
||||
|
||||
@@ -96,7 +96,7 @@ export default class CustomSettings extends PureComponent {
|
||||
<p>{this.getMessage('modals.main.settings.sections.background.source.custom_background')} <span className='modalLink' onClick={this.resetCustom}>{this.getMessage('modals.main.settings.buttons.reset')}</span></p>
|
||||
{this.state.customBackground.map((_url, index) => (
|
||||
<Fragment key={index}>
|
||||
<input type='text' value={this.state.customBackground[index]} onChange={(e) => this.customBackground(e, true, index)} autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false'/>
|
||||
<input type='text' value={this.state.customBackground[index]} onChange={(e) => this.customBackground(e, true, index)} autoComplete='off' autoCorrect='off' autoCapitalize='off' spellCheck={false}/>
|
||||
{this.state.customBackground.length > 1 ? <button className='cleanButton' onClick={() => this.modifyCustomBackground('remove', index)}>
|
||||
<Cancel/>
|
||||
</button> : null}
|
||||
|
||||
Reference in New Issue
Block a user