mirror of
https://github.com/mue/mue.git
synced 2026-07-09 13:35:35 +02:00
fix: search bar and add quote pack api support back
This commit is contained in:
@@ -19,8 +19,9 @@ export default class Item extends React.PureComponent {
|
||||
|
||||
let warningHTML;
|
||||
// For some reason it breaks sometimes so we use try/catch
|
||||
console.log(this.props.data)
|
||||
try {
|
||||
if (this.props.content.content.data.quote_api) {
|
||||
if (this.props.data.quote_api) {
|
||||
warningHTML = (
|
||||
<div className='productInformation'>
|
||||
<ul>
|
||||
@@ -64,6 +65,7 @@ export default class Item extends React.PureComponent {
|
||||
<li>{this.props.data.author}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<br/>
|
||||
{warningHTML}
|
||||
</div>
|
||||
<Modal closeTimeoutMS={100} onRequestClose={() => this.setState({ showLightbox: false })} isOpen={this.state.showLightbox} className='Modal lightboxmodal' overlayClassName='Overlay resetoverlay' ariaHideApp={false}>
|
||||
|
||||
@@ -48,7 +48,8 @@ export default class Added extends React.PureComponent {
|
||||
description: MarketplaceFunctions.urlParser(info.description.replace(/\n/g, '<br>')),
|
||||
//updated: info.updated,
|
||||
version: info.version,
|
||||
icon: info.screenshot_url
|
||||
icon: info.screenshot_url,
|
||||
quote_api: info.quote_api || null
|
||||
},
|
||||
button: this.buttons.uninstall,
|
||||
display: {
|
||||
|
||||
@@ -73,8 +73,8 @@ export default class Quote extends React.PureComponent {
|
||||
try {
|
||||
const data = await (await fetch(quotePackAPI.url)).json();
|
||||
return this.setState({
|
||||
quote: '"' + data.quote + '"',
|
||||
author: quotePackAPI.author || data.author,
|
||||
quote: '"' + data[quotePackAPI.quote] + '"',
|
||||
author: data[quotePackAPI.author] || quotePackAPI.author,
|
||||
type: 'quote_pack'
|
||||
});
|
||||
} catch (e) {
|
||||
|
||||
@@ -61,5 +61,13 @@
|
||||
&:focus {
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
&::-webkit-input-placeholder {
|
||||
color: white;
|
||||
}
|
||||
|
||||
&::-moz-placeholder {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user