mirror of https://github.com/mue/mue.git
fix: welcome modal is now responsive, fix close button with other languages, codacy fixes etc
This commit is contained in:
parent
59a888c861
commit
99993720f2
|
@ -1,7 +1,7 @@
|
|||
const fs = require('fs');
|
||||
const merge = require('@eartharoid/deep-merge');
|
||||
|
||||
fs.readdirSync('../src/translations').forEach(file => {
|
||||
fs.readdirSync('../src/translations').forEach((file) => {
|
||||
if (file === 'en_GB.json') {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ export default function ResetModal(props) {
|
|||
window.stats.postEvent('setting', 'Reset');
|
||||
SettingsFunctions.setDefaultSettings('reset');
|
||||
window.location.reload();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
|
@ -53,7 +53,7 @@ export default class Changelog extends React.PureComponent {
|
|||
lightboxImg: img.src
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
for (let link = 0; link < links.length; link++) {
|
||||
links[link].target = '_blank';
|
||||
|
|
|
@ -35,16 +35,16 @@ export default class QuoteSettings extends React.PureComponent {
|
|||
// api
|
||||
customSettings = (
|
||||
<>
|
||||
<br/><br/>
|
||||
<Dropdown label={background.interval.title} name='quotechange'>
|
||||
<option value='refresh'>{window.language.tabname}</option>
|
||||
<option value='60000'>{background.interval.minute}</option>
|
||||
<option value='1800000'>{background.interval.half_hour}</option>
|
||||
<option value='3600000'>{background.interval.hour}</option>
|
||||
<option value='86400000'>{background.interval.day}</option>
|
||||
<option value='604800000'>{window.language.widgets.date.week}</option>
|
||||
<option value='2628000000'>{background.interval.month}</option>
|
||||
</Dropdown>
|
||||
<br/><br/>
|
||||
<Dropdown label={background.interval.title} name='quotechange'>
|
||||
<option value='refresh'>{window.language.tabname}</option>
|
||||
<option value='60000'>{background.interval.minute}</option>
|
||||
<option value='1800000'>{background.interval.half_hour}</option>
|
||||
<option value='3600000'>{background.interval.hour}</option>
|
||||
<option value='86400000'>{background.interval.day}</option>
|
||||
<option value='604800000'>{window.language.widgets.date.week}</option>
|
||||
<option value='2628000000'>{background.interval.month}</option>
|
||||
</Dropdown>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import EventBus from '../../../../../modules/helpers/eventbus';
|
|||
import { toast } from 'react-toastify';
|
||||
|
||||
const searchEngines = require('../../../../widgets/search/search_engines.json');
|
||||
const autocompleteProviders = require('../../../../widgets/search/autocomplete_providers.json')
|
||||
const autocompleteProviders = require('../../../../widgets/search/autocomplete_providers.json');
|
||||
|
||||
export default class SearchSettings extends React.PureComponent {
|
||||
constructor() {
|
||||
|
|
|
@ -9,7 +9,7 @@ export default function ProgressBar(props) {
|
|||
className = 'step active';
|
||||
}
|
||||
|
||||
return <div className={className} key={index} onClick={() => props.switchTab(index)}></div>
|
||||
return <div className={className} key={index} onClick={() => props.switchTab(index)}></div>;
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -15,7 +15,14 @@ export default class WelcomeModal extends React.PureComponent {
|
|||
buttonText: 'Next'
|
||||
};
|
||||
this.language = window.language.modals.welcome;
|
||||
this.images = ['./././icons/undraw_celebration.svg', './././icons/undraw_around_the_world_modified.svg', './././icons/undraw_add_files_modified.svg', './././icons/undraw_dark_mode.svg', './././icons/undraw_private_data_modified.svg', './././icons/undraw_upgrade_modified.svg']
|
||||
this.images = [
|
||||
'./././icons/undraw_celebration.svg',
|
||||
'./././icons/undraw_around_the_world_modified.svg',
|
||||
'./././icons/undraw_add_files_modified.svg',
|
||||
'./././icons/undraw_dark_mode.svg',
|
||||
'./././icons/undraw_private_data_modified.svg',
|
||||
'./././icons/undraw_upgrade_modified.svg'
|
||||
];
|
||||
}
|
||||
|
||||
changeTab(minus) {
|
||||
|
@ -27,7 +34,7 @@ export default class WelcomeModal extends React.PureComponent {
|
|||
});
|
||||
}
|
||||
|
||||
if (this.state.buttonText === 'Close') {
|
||||
if (this.state.buttonText === this.language.buttons.close) {
|
||||
return this.props.modalClose();
|
||||
}
|
||||
|
||||
|
|
|
@ -147,4 +147,26 @@ a.privacy {
|
|||
.showcaseimg {
|
||||
width: 350px;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1440px) {
|
||||
.buttons {
|
||||
position: relative !important;
|
||||
bottom: 0rem !important;
|
||||
}
|
||||
|
||||
.examples img {
|
||||
width: 15rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1600px) {
|
||||
.examples img {
|
||||
width: 20rem !important;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
position: relative !important;
|
||||
bottom: 1rem !important;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,8 +75,9 @@ export default class Search extends React.PureComponent {
|
|||
this.setState({
|
||||
suggestions: window.searchResults[1].splice(0, 3)
|
||||
});
|
||||
// ignore error if empty
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
// ignore error if empty
|
||||
}
|
||||
|
||||
document.head.removeChild(script);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue