mirror of https://github.com/mue/mue.git
fix: re-implement quote settings that weren't working (see #638)
This commit is contained in:
parent
f0fbb71f25
commit
e100513b37
|
@ -220,7 +220,7 @@ class Quote extends PureComponent {
|
||||||
? customQuote[Math.floor(Math.random() * customQuote.length)]
|
? customQuote[Math.floor(Math.random() * customQuote.length)]
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
if (customQuote !== undefined) {
|
if (customQuote !== undefined && customQuote !== null) {
|
||||||
return this.setState({
|
return this.setState({
|
||||||
quote: '"' + customQuote.quote + '"',
|
quote: '"' + customQuote.quote + '"',
|
||||||
author: customQuote.author,
|
author: customQuote.author,
|
||||||
|
@ -467,12 +467,14 @@ class Quote extends PureComponent {
|
||||||
) : (
|
) : (
|
||||||
<div className="author-holder">
|
<div className="author-holder">
|
||||||
<div className="author">
|
<div className="author">
|
||||||
<div
|
{localStorage.getItem('authorImg') !== 'false' ? (
|
||||||
className="author-img"
|
<div
|
||||||
style={{ backgroundImage: `url(${this.state.authorimg})` }}
|
className="author-img"
|
||||||
>
|
style={{ backgroundImage: `url(${this.state.authorimg})` }}
|
||||||
{this.state.authorimg === undefined || this.state.authorimg ? '' : <MdPerson />}
|
>
|
||||||
</div>
|
{this.state.authorimg === undefined || this.state.authorimg ? '' : <MdPerson />}
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
{this.state.author !== null ? (
|
{this.state.author !== null ? (
|
||||||
<div className="author-content" ref={this.quoteauthor}>
|
<div className="author-content" ref={this.quoteauthor}>
|
||||||
<span className="title">{this.state.author}</span>
|
<span className="title">{this.state.author}</span>
|
||||||
|
@ -492,7 +494,7 @@ class Quote extends PureComponent {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="quote-buttons">
|
<div className="quote-buttons">
|
||||||
{this.state.authorOccupation !== 'Unknown' && this.state.authorlink !== '' ? (
|
{this.state.authorOccupation !== 'Unknown' && this.state.authorlink !== null ? (
|
||||||
<Tooltip title={variables.getMessage('widgets.quote.link_tooltip')}>
|
<Tooltip title={variables.getMessage('widgets.quote.link_tooltip')}>
|
||||||
<a
|
<a
|
||||||
href={this.state.authorlink}
|
href={this.state.authorlink}
|
||||||
|
|
Loading…
Reference in New Issue