Display message in selector instead of disabling browser action

This commit is contained in:
hensm
2019-09-11 00:10:05 +01:00
parent 2050854ca7
commit 2300101695
8 changed files with 75 additions and 37 deletions

View File

@@ -152,13 +152,17 @@ class PopupApp extends Component<{}, PopupAppState> {
</div>
</div>
<ul className="receivers">
{ this.state.receivers && this.state.receivers.map(
(receiver, i) => (
<ReceiverEntry receiver={ receiver }
onCast={ this.onCast }
isLoading={ this.state.isLoading }
canCast={ canCast }
key={ i }/> ))}
{ this.state.receivers && this.state.receivers.length
? this.state.receivers.map((receiver, i) => (
<ReceiverEntry receiver={ receiver }
onCast={ this.onCast }
isLoading={ this.state.isLoading }
canCast={ canCast }
key={ i } /> ))
: (
<div className="receivers__not-found">
{ _("popupNoReceiversFound") }
</div> )}
</ul>
</div>
);

View File

@@ -33,6 +33,14 @@ body {
padding: initial;
}
.receivers__not-found {
align-items: center;
display: flex;
height: 50px;
justify-content: center;
padding: 0.75em 1em;
}
.receiver {
column-gap: 0.75em;
display: grid;