mirror of https://github.com/mue/mue.git
fix: search dropdown, missing translations, overview date
This commit is contained in:
parent
333aabde1b
commit
4da82dd820
|
@ -106,6 +106,12 @@ export default class OrderSettings extends PureComponent {
|
|||
|
||||
async getNews() {
|
||||
const data = await (await fetch('https://api.muetab.com/news')).json();
|
||||
data.news.date = new window.Date(data.news.date).toLocaleDateString(variables.languagecode.replace('_', '-'), {
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric',
|
||||
});
|
||||
|
||||
this.setState({
|
||||
news: data.news,
|
||||
newsDone: true,
|
||||
|
|
|
@ -213,7 +213,12 @@ export default class QuickLinks extends PureComponent {
|
|||
category="quicklinks"
|
||||
/>
|
||||
</SettingsItem>
|
||||
<SettingsItem title="Quick Links Styling" description="Customise Quick Links Appearance.">
|
||||
<SettingsItem
|
||||
title={variables.getMessage('modals.main.settings.sections.quicklinks.styling')}
|
||||
description={variables.getMessage(
|
||||
'modals.main.settings.sections.quicklinks.styling_description',
|
||||
)}
|
||||
>
|
||||
<Dropdown label="Style" name="quickLinksStyle" category="other">
|
||||
<option value="icon">
|
||||
{variables.getMessage('modals.main.settings.sections.quicklinks.options.icon')}
|
||||
|
@ -227,7 +232,11 @@ export default class QuickLinks extends PureComponent {
|
|||
</Dropdown>
|
||||
</SettingsItem>
|
||||
|
||||
<SettingsItem title="Quick Links" subtitle="" final={true}>
|
||||
<SettingsItem
|
||||
title={variables.getMessage('modals.main.settings.sections.quicklinks.title')}
|
||||
subtitle=""
|
||||
final={true}
|
||||
>
|
||||
<button onClick={() => this.setState({ showAddModal: true })}>
|
||||
{variables.getMessage('modals.main.settings.sections.quicklinks.add_link')}{' '}
|
||||
<MdAddLink />
|
||||
|
|
|
@ -19,7 +19,7 @@ export default class Search extends PureComponent {
|
|||
query: '',
|
||||
microphone: null,
|
||||
suggestions: [],
|
||||
searchDropdown: true,
|
||||
searchDropdown: false,
|
||||
classList:
|
||||
localStorage.getItem('widgetStyle') === 'legacy' ? 'searchIcons old' : 'searchIcons',
|
||||
};
|
||||
|
@ -108,12 +108,6 @@ export default class Search extends PureComponent {
|
|||
});
|
||||
}
|
||||
|
||||
toggleDropdown() {
|
||||
this.setState({
|
||||
searchDropdown: this.state.searchDropdown === 'hidden' ? 'visible' : 'hidden',
|
||||
});
|
||||
}
|
||||
|
||||
setSearch(name, custom) {
|
||||
let url;
|
||||
let query = 'q';
|
||||
|
@ -134,7 +128,7 @@ export default class Search extends PureComponent {
|
|||
url,
|
||||
query,
|
||||
currentSearch: name,
|
||||
searchDropdown: 'hidden',
|
||||
searchDropdown: false,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -170,10 +164,10 @@ export default class Search extends PureComponent {
|
|||
<div className={this.state.classList}>
|
||||
{localStorage.getItem('searchDropdown') === 'true' ? (
|
||||
<Tooltip title={variables.getMessage('widgets.search')}>
|
||||
<button>
|
||||
<MdScreenSearchDesktop
|
||||
onClick={() => this.setState({ searchDropdown: !this.state.searchDropdown })}
|
||||
/>
|
||||
<button
|
||||
onClick={() => this.setState({ searchDropdown: !this.state.searchDropdown })}
|
||||
>
|
||||
<MdScreenSearchDesktop />
|
||||
</button>
|
||||
</Tooltip>
|
||||
) : (
|
||||
|
@ -204,13 +198,17 @@ export default class Search extends PureComponent {
|
|||
{localStorage.getItem('searchDropdown') === 'true' &&
|
||||
this.state.searchDropdown === true ? (
|
||||
<div className="searchDropdown">
|
||||
{searchEngines.map(({ name }) => {
|
||||
{searchEngines.map(({ name }, key) => {
|
||||
if (name === this.state.currentSearch) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<span className="searchDropdownList" onClick={() => this.setSearch(name)}>
|
||||
<span
|
||||
className="searchDropdownList"
|
||||
onClick={() => this.setSearch(name)}
|
||||
key={key}
|
||||
>
|
||||
{name}
|
||||
</span>
|
||||
);
|
||||
|
|
|
@ -77,7 +77,7 @@ export default class Weather extends PureComponent {
|
|||
done: true,
|
||||
});
|
||||
|
||||
document.querySelector('.tweather svg').style.fontSize = zoomWeather;
|
||||
document.querySelector('.top-weather svg').style.fontSize = zoomWeather;
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
|
|
@ -313,7 +313,9 @@
|
|||
"icon": "Icon",
|
||||
"text_only": "Text Only",
|
||||
"metro": "Metro"
|
||||
}
|
||||
},
|
||||
"styling": "Quick Links Styling",
|
||||
"styling_description": "Customise Quick Links appearance"
|
||||
},
|
||||
"message": {
|
||||
"title": "Message",
|
||||
|
|
|
@ -307,7 +307,9 @@
|
|||
"icon": "Icon",
|
||||
"text_only": "Text Only",
|
||||
"metro": "Metro"
|
||||
}
|
||||
},
|
||||
"styling": "Quick Links Styling",
|
||||
"styling_description": "Customise Quick Links appearance"
|
||||
},
|
||||
"message": {
|
||||
"title": "Message",
|
||||
|
|
|
@ -313,7 +313,9 @@
|
|||
"icon": "Icon",
|
||||
"text_only": "Text Only",
|
||||
"metro": "Metro"
|
||||
}
|
||||
},
|
||||
"styling": "Quick Links Styling",
|
||||
"styling_description": "Customise Quick Links appearance"
|
||||
},
|
||||
"message": {
|
||||
"title": "Message",
|
||||
|
|
|
@ -313,7 +313,9 @@
|
|||
"icon": "Icon",
|
||||
"text_only": "Text Only",
|
||||
"metro": "Metro"
|
||||
}
|
||||
},
|
||||
"styling": "Quick Links Styling",
|
||||
"styling_description": "Customise Quick Links appearance"
|
||||
},
|
||||
"message": {
|
||||
"title": "Mensaje",
|
||||
|
|
|
@ -313,7 +313,9 @@
|
|||
"icon": "Icon",
|
||||
"text_only": "Text Only",
|
||||
"metro": "Metro"
|
||||
}
|
||||
},
|
||||
"styling": "Quick Links Styling",
|
||||
"styling_description": "Customise Quick Links appearance"
|
||||
},
|
||||
"message": {
|
||||
"title": "Message",
|
||||
|
|
|
@ -313,7 +313,9 @@
|
|||
"icon": "Icon",
|
||||
"text_only": "Text Only",
|
||||
"metro": "Metro"
|
||||
}
|
||||
},
|
||||
"styling": "Quick Links Styling",
|
||||
"styling_description": "Customise Quick Links appearance"
|
||||
},
|
||||
"message": {
|
||||
"title": "Pesan",
|
||||
|
|
|
@ -313,7 +313,9 @@
|
|||
"icon": "Icon",
|
||||
"text_only": "Text Only",
|
||||
"metro": "Metro"
|
||||
}
|
||||
},
|
||||
"styling": "Quick Links Styling",
|
||||
"styling_description": "Customise Quick Links appearance"
|
||||
},
|
||||
"message": {
|
||||
"title": "Message",
|
||||
|
|
|
@ -313,7 +313,9 @@
|
|||
"icon": "Icon",
|
||||
"text_only": "Text Only",
|
||||
"metro": "Metro"
|
||||
}
|
||||
},
|
||||
"styling": "Quick Links Styling",
|
||||
"styling_description": "Customise Quick Links appearance"
|
||||
},
|
||||
"message": {
|
||||
"title": "Message",
|
||||
|
|
|
@ -313,7 +313,9 @@
|
|||
"icon": "Icon",
|
||||
"text_only": "Text Only",
|
||||
"metro": "Metro"
|
||||
}
|
||||
},
|
||||
"styling": "Quick Links Styling",
|
||||
"styling_description": "Customise Quick Links appearance"
|
||||
},
|
||||
"message": {
|
||||
"title": "Message",
|
||||
|
|
|
@ -313,7 +313,9 @@
|
|||
"icon": "Icon",
|
||||
"text_only": "Text Only",
|
||||
"metro": "Metro"
|
||||
}
|
||||
},
|
||||
"styling": "Quick Links Styling",
|
||||
"styling_description": "Customise Quick Links appearance"
|
||||
},
|
||||
"message": {
|
||||
"title": "Mesaj",
|
||||
|
|
|
@ -313,7 +313,9 @@
|
|||
"icon": "Icon",
|
||||
"text_only": "Text Only",
|
||||
"metro": "Metro"
|
||||
}
|
||||
},
|
||||
"styling": "Quick Links Styling",
|
||||
"styling_description": "Customise Quick Links appearance"
|
||||
},
|
||||
"message": {
|
||||
"title": "消息",
|
||||
|
|
Loading…
Reference in New Issue