Comments; Snapcast mobile
This commit is contained in:
@ -184,6 +184,7 @@ class IrisCore(object):
|
|||||||
##
|
##
|
||||||
# Send a command to the broadlink API
|
# Send a command to the broadlink API
|
||||||
# Credentials for this API are defined in Mopidy config file.
|
# Credentials for this API are defined in Mopidy config file.
|
||||||
|
# Uses https://github.com/radinsky/broadlink-http-rest
|
||||||
#
|
#
|
||||||
# @return String
|
# @return String
|
||||||
##
|
##
|
||||||
|
|||||||
@ -3910,46 +3910,46 @@ input[type="submit"] {
|
|||||||
cursor: pointer; }
|
cursor: pointer; }
|
||||||
|
|
||||||
@media (max-width: 800px) {
|
@media (max-width: 800px) {
|
||||||
.list .list__item {
|
.list__item {
|
||||||
padding: 12px !important; }
|
padding: 12px !important; }
|
||||||
.list .list__item .source {
|
.list__item .source {
|
||||||
position: static;
|
position: static;
|
||||||
float: none; }
|
float: none; }
|
||||||
.list .list__item .context-zone {
|
.list__item .context-zone {
|
||||||
top: 14px; }
|
top: 14px; }
|
||||||
.list .list__item .col.name {
|
.list__item .col.name {
|
||||||
width: auto !important;
|
width: auto !important;
|
||||||
padding-right: 10%;
|
padding-right: 10%;
|
||||||
display: block;
|
display: block;
|
||||||
float: none; }
|
float: none; }
|
||||||
.list .list__item .col.duration {
|
.list__item .col.duration {
|
||||||
width: auto !important;
|
width: auto !important;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
z-index: 1; }
|
z-index: 1; }
|
||||||
.list .list__item .col:not(.name):not(.duration):not(.album):not(.added) {
|
.list__item .col:not(.name):not(.duration):not(.album):not(.added) {
|
||||||
color: #a3a19f;
|
color: #a3a19f;
|
||||||
display: inline;
|
display: inline;
|
||||||
width: auto !important;
|
width: auto !important;
|
||||||
float: none !important;
|
float: none !important;
|
||||||
word-wrap: break-word; }
|
word-wrap: break-word; }
|
||||||
.list .list__item .col.followers_total:after {
|
.list__item .col.followers_total:after {
|
||||||
content: ' followers'; }
|
content: ' followers'; }
|
||||||
.list .list__item .col.tracks_total:after {
|
.list__item .col.tracks_total:after {
|
||||||
content: ' tracks'; }
|
content: ' tracks'; }
|
||||||
.list .list__item .col.popularity {
|
.list__item .col.popularity {
|
||||||
padding-left: 14px; }
|
padding-left: 14px; }
|
||||||
.list .list__item .col.popularity:before {
|
.list__item .col.popularity:before {
|
||||||
content: '\2022' !important;
|
content: '\2022' !important;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-left: -8px;
|
margin-left: -8px;
|
||||||
padding-right: 6px; }
|
padding-right: 6px; }
|
||||||
.list .list__item .col.popularity .popularity-bars {
|
.list__item .col.popularity .popularity-bars {
|
||||||
margin: 0.1em 0 0 0; }
|
margin: 0.1em 0 0 0; }
|
||||||
.list .list__item .col.album, .list .list__item .col.can_edit, .list .list__item .col.release_date {
|
.list__item .col.album, .list__item .col.can_edit, .list__item .col.release_date {
|
||||||
display: none; }
|
display: none; }
|
||||||
.list .list__item.header {
|
.list__item.header {
|
||||||
display: none; }
|
display: none; }
|
||||||
.list.queue-track-list .list__item .artists {
|
.list.queue-track-list .list__item .artists {
|
||||||
padding-left: 0 !important; }
|
padding-left: 0 !important; }
|
||||||
@ -5997,9 +5997,11 @@ main header {
|
|||||||
background: #ebe8e4; }
|
background: #ebe8e4; }
|
||||||
|
|
||||||
@media (max-width: 800px) {
|
@media (max-width: 800px) {
|
||||||
|
.services {
|
||||||
|
margin-left: -20px;
|
||||||
|
margin-right: -20px; }
|
||||||
.services .menu {
|
.services .menu {
|
||||||
overflow-x: auto;
|
overflow-x: auto; }
|
||||||
margin: 0 -20px; }
|
|
||||||
.services .menu::-webkit-scrollbar {
|
.services .menu::-webkit-scrollbar {
|
||||||
width: 0px;
|
width: 0px;
|
||||||
height: 0px; }
|
height: 0px; }
|
||||||
@ -6045,7 +6047,7 @@ main header {
|
|||||||
padding: 0 10px; }
|
padding: 0 10px; }
|
||||||
|
|
||||||
.snapcast__client {
|
.snapcast__client {
|
||||||
padding: 0; }
|
padding: 0 !important; }
|
||||||
.snapcast__client::after {
|
.snapcast__client::after {
|
||||||
content: '';
|
content: '';
|
||||||
clear: both;
|
clear: both;
|
||||||
@ -6126,19 +6128,7 @@ main header {
|
|||||||
.snapcast__client {
|
.snapcast__client {
|
||||||
padding-left: 0 !important;
|
padding-left: 0 !important;
|
||||||
padding-right: 0 !important;
|
padding-right: 0 !important;
|
||||||
padding-top: 0 !important; }
|
padding-top: 0 !important; } }
|
||||||
.snapcast__client .col {
|
|
||||||
clear: both;
|
|
||||||
display: block !important;
|
|
||||||
float: none !important;
|
|
||||||
width: auto !important;
|
|
||||||
padding: 0; }
|
|
||||||
.snapcast__client .col::after {
|
|
||||||
content: '';
|
|
||||||
clear: both;
|
|
||||||
display: block; }
|
|
||||||
.snapcast__client .col.volume, .snapcast__client .col.latency {
|
|
||||||
padding-top: 5px; } }
|
|
||||||
|
|
||||||
.popularity-bars {
|
.popularity-bars {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -98,7 +98,7 @@
|
|||||||
|
|
||||||
// Release details
|
// Release details
|
||||||
// These are automatically injected to built HTML
|
// These are automatically injected to built HTML
|
||||||
var build = "1537907593";
|
var build = "1538074514";
|
||||||
var version = "3.26.2";
|
var version = "3.26.2";
|
||||||
|
|
||||||
// Construct the script tag
|
// Construct the script tag
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import { bindActionCreators } from 'redux'
|
|||||||
import Icon from '../Icon'
|
import Icon from '../Icon'
|
||||||
|
|
||||||
import * as helpers from '../../helpers';
|
import * as helpers from '../../helpers';
|
||||||
|
import * as snapcastActions from '../../services/snapcast/actions';
|
||||||
|
|
||||||
class SnapcastPowerButton extends React.Component{
|
class SnapcastPowerButton extends React.Component{
|
||||||
|
|
||||||
@ -16,8 +17,9 @@ class SnapcastPowerButton extends React.Component{
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleClick(e){
|
handleClick(e){
|
||||||
var command = JSON.parse(this.props.client.commands.power_on);
|
|
||||||
$.ajax(command);
|
// Dynamic-ify the command itself
|
||||||
|
this.props.snapcastActions.sendClientCommand(this.props.client.id, 'power_on');
|
||||||
}
|
}
|
||||||
|
|
||||||
render(){
|
render(){
|
||||||
@ -38,7 +40,9 @@ const mapStateToProps = (state, ownProps) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => {
|
const mapDispatchToProps = (dispatch) => {
|
||||||
return {}
|
return {
|
||||||
|
snapcastActions: bindActionCreators(snapcastActions, dispatch)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(SnapcastPowerButton)
|
export default connect(mapStateToProps, mapDispatchToProps)(SnapcastPowerButton)
|
||||||
@ -163,30 +163,30 @@ class Snapcast extends React.Component{
|
|||||||
</div>
|
</div>
|
||||||
<div className="field">
|
<div className="field">
|
||||||
<div className="name tooltip">
|
<div className="name tooltip">
|
||||||
Power on request
|
Power off command
|
||||||
<span className="tooltip__content">
|
<span className="tooltip__content">
|
||||||
Fire this HTTP request to turn power on
|
Broadlink command to send
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="input">
|
<div className="input">
|
||||||
<TextField
|
<TextField
|
||||||
onChange={value => this.props.snapcastActions.setClientCommand(client.id, "power_on", value)}
|
onChange={value => this.props.snapcastActions.setClientCommand(client.id, "power_on", value)}
|
||||||
value={client.power_on_command ? client.power_on_command : ""}
|
value={client.commands && client.commands.power_on ? client.commands.power_on : ""}
|
||||||
placeholder="Leave empty to disable"
|
placeholder="Leave empty to disable"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="field">
|
<div className="field">
|
||||||
<div className="name tooltip">
|
<div className="name tooltip">
|
||||||
Power off request
|
Power off command
|
||||||
<span className="tooltip__content">
|
<span className="tooltip__content">
|
||||||
Fire this HTTP request to turn power off
|
Broadlink command to send
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="input">
|
<div className="input">
|
||||||
<TextField
|
<TextField
|
||||||
onChange={value => this.props.snapcastActions.setClientCommand(client.id, "power_off", value)}
|
onChange={value => this.props.snapcastActions.setClientCommand(client.id, "power_off", value)}
|
||||||
value={client.power_off_command ? client.power_off_command : ""}
|
value={client.commands && client.commands.power_off ? client.commands.power_off : ""}
|
||||||
placeholder="Leave empty to disable"
|
placeholder="Leave empty to disable"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -328,7 +328,7 @@
|
|||||||
|
|
||||||
@include responsive($bp_medium){
|
@include responsive($bp_medium){
|
||||||
|
|
||||||
.list__item {
|
&__item {
|
||||||
padding: 12px !important;
|
padding: 12px !important;
|
||||||
|
|
||||||
.source {
|
.source {
|
||||||
|
|||||||
@ -117,9 +117,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@include responsive($bp_medium){
|
@include responsive($bp_medium){
|
||||||
|
margin-left: -20px;
|
||||||
|
margin-right: -20px;
|
||||||
|
|
||||||
.menu {
|
.menu {
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
margin: 0 -20px;
|
|
||||||
|
|
||||||
&::-webkit-scrollbar{
|
&::-webkit-scrollbar{
|
||||||
width: 0px;
|
width: 0px;
|
||||||
|
|||||||
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
&__client {
|
&__client {
|
||||||
@include clearfix();
|
@include clearfix();
|
||||||
padding: 0;
|
padding: 0 !important;
|
||||||
|
|
||||||
&--expanded {
|
&--expanded {
|
||||||
background: rgba(255,255,255,0.05);
|
background: rgba(255,255,255,0.05);
|
||||||
@ -166,20 +166,6 @@
|
|||||||
padding-left: 0 !important;
|
padding-left: 0 !important;
|
||||||
padding-right: 0 !important;
|
padding-right: 0 !important;
|
||||||
padding-top: 0 !important;
|
padding-top: 0 !important;
|
||||||
|
|
||||||
.col {
|
|
||||||
@include clearfix();
|
|
||||||
clear: both;
|
|
||||||
display: block !important;
|
|
||||||
float: none !important;
|
|
||||||
width: auto !important;
|
|
||||||
padding: 0;
|
|
||||||
|
|
||||||
&.volume,
|
|
||||||
&.latency {
|
|
||||||
padding-top: 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user