mirror of
https://github.com/mue/mue.git
synced 2026-06-08 14:10:42 +02:00
fix: welcome modal is now responsive, fix close button with other languages, codacy fixes etc
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const merge = require('@eartharoid/deep-merge');
|
const merge = require('@eartharoid/deep-merge');
|
||||||
|
|
||||||
fs.readdirSync('../src/translations').forEach(file => {
|
fs.readdirSync('../src/translations').forEach((file) => {
|
||||||
if (file === 'en_GB.json') {
|
if (file === 'en_GB.json') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export default function ResetModal(props) {
|
|||||||
window.stats.postEvent('setting', 'Reset');
|
window.stats.postEvent('setting', 'Reset');
|
||||||
SettingsFunctions.setDefaultSettings('reset');
|
SettingsFunctions.setDefaultSettings('reset');
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ export default class Changelog extends React.PureComponent {
|
|||||||
lightboxImg: img.src
|
lightboxImg: img.src
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
for (let link = 0; link < links.length; link++) {
|
for (let link = 0; link < links.length; link++) {
|
||||||
links[link].target = '_blank';
|
links[link].target = '_blank';
|
||||||
|
|||||||
@@ -35,16 +35,16 @@ export default class QuoteSettings extends React.PureComponent {
|
|||||||
// api
|
// api
|
||||||
customSettings = (
|
customSettings = (
|
||||||
<>
|
<>
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
<Dropdown label={background.interval.title} name='quotechange'>
|
<Dropdown label={background.interval.title} name='quotechange'>
|
||||||
<option value='refresh'>{window.language.tabname}</option>
|
<option value='refresh'>{window.language.tabname}</option>
|
||||||
<option value='60000'>{background.interval.minute}</option>
|
<option value='60000'>{background.interval.minute}</option>
|
||||||
<option value='1800000'>{background.interval.half_hour}</option>
|
<option value='1800000'>{background.interval.half_hour}</option>
|
||||||
<option value='3600000'>{background.interval.hour}</option>
|
<option value='3600000'>{background.interval.hour}</option>
|
||||||
<option value='86400000'>{background.interval.day}</option>
|
<option value='86400000'>{background.interval.day}</option>
|
||||||
<option value='604800000'>{window.language.widgets.date.week}</option>
|
<option value='604800000'>{window.language.widgets.date.week}</option>
|
||||||
<option value='2628000000'>{background.interval.month}</option>
|
<option value='2628000000'>{background.interval.month}</option>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import EventBus from '../../../../../modules/helpers/eventbus';
|
|||||||
import { toast } from 'react-toastify';
|
import { toast } from 'react-toastify';
|
||||||
|
|
||||||
const searchEngines = require('../../../../widgets/search/search_engines.json');
|
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 {
|
export default class SearchSettings extends React.PureComponent {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export default function ProgressBar(props) {
|
|||||||
className = 'step active';
|
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>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -15,7 +15,14 @@ export default class WelcomeModal extends React.PureComponent {
|
|||||||
buttonText: 'Next'
|
buttonText: 'Next'
|
||||||
};
|
};
|
||||||
this.language = window.language.modals.welcome;
|
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) {
|
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();
|
return this.props.modalClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -148,3 +148,25 @@ a.privacy {
|
|||||||
width: 350px;
|
width: 350px;
|
||||||
height: auto;
|
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({
|
this.setState({
|
||||||
suggestions: window.searchResults[1].splice(0, 3)
|
suggestions: window.searchResults[1].splice(0, 3)
|
||||||
});
|
});
|
||||||
// ignore error if empty
|
} catch (e) {
|
||||||
} catch (e) {}
|
// ignore error if empty
|
||||||
|
}
|
||||||
|
|
||||||
document.head.removeChild(script);
|
document.head.removeChild(script);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user