Adding snapshot_id to playlist which is required to sort tracks

This commit is contained in:
James Barnsley
2018-11-02 08:40:44 +13:00
parent 7875a26b2b
commit b83043ef4f
11 changed files with 85 additions and 375 deletions

View File

@ -497,6 +497,7 @@ export let formatPlaylist = function(data){
var playlist = {}
var fields = [
'uri',
'snapshot_id',
'provider',
'type',
'name',

View File

@ -119,10 +119,12 @@ class Settings extends React.Component {
var colour = 'grey';
var icon = 'help';
var status = 'Unknown';
var className = null;
if (this.props.mopidy.connecting || this.props.pusher.connecting){
icon = 'autorenew';
status = 'Connecting...'
status = 'Connecting...';
className = 'icon--spin';
} else if (!this.props.mopidy.connected || !this.props.pusher.connected){
colour = 'red';
icon = 'close';
@ -135,7 +137,7 @@ class Settings extends React.Component {
return (
<span className={colour+'-text'}>
<Icon name={icon} />{status}
<Icon className={className} name={icon} />{status}
</span>
);
}
@ -377,6 +379,16 @@ class Settings extends React.Component {
</div>
<h4 className="underline">Advanced<a name="advanced"></a></h4>
<div className="field button-wrapper">
<div className="name">Share configuration</div>
<div className="input">
<Link className="button" to={global.baseURL+"share-configuration"}>Share</Link>
<div className="description">
Send your authorizations and configuration to another Iris client
</div>
</div>
</div>
<div className="field">
<div className="name">Artist library URI</div>
@ -421,13 +433,12 @@ class Settings extends React.Component {
<div className="name">Version</div>
<div className="input">
<span className="text">
{this.props.pusher.version.current} installed {this.props.pusher.version.upgrade_available ? <span className="flag blue">Upgrade available</span> : <span className="flag dark"><Icon type="fontawesome" name="check" className="green-text" />&nbsp; Up-to-date</span>}
{this.props.pusher.version.current} installed {this.props.pusher.version.upgrade_available ? <span className="flag dark"><Icon name="cloud_download" className="blue-text" />&nbsp; Upgrade available</span> : <span className="flag dark"><Icon name="check" className="green-text" />&nbsp; Up-to-date</span>}
</span>
</div>
</div>
<div className="field">
<Link className="button" to={global.baseURL+"share-configuration"}>Share configuration</Link>
{upgrade_button}
<button className={"destructive"+(this.props.mopidy.restarting ? ' working' : '')} onClick={e => this.props.pusherActions.restart()}>{this.props.mopidy.restarting ? 'Restarting...' : 'Restart server'}</button>
<ConfirmationButton className="destructive" content="Reset all settings" confirmingContent="Are you sure?" onConfirm={() => this.resetAllSettings()} />

View File

@ -90,7 +90,7 @@ class LibraryBrowse extends React.Component{
<span key={uri}>
{index > 0 ? <span>&nbsp; <Icon type="fontawesome" name="angle-right" /> &nbsp;&nbsp;</span> : null}
<URILink type="browse" uri={uri}>
{uri_element}
{decodeURI(uri_element)}
</URILink>
</span>
);

View File

@ -11,16 +11,6 @@
url(../assets/fonts/MaterialIcons-Regular.ttf) format('truetype');
}
@font-face {
font-family: 'iris';
src:
url('../assets/fonts/iris.ttf?wncwx9') format('truetype'),
url('../assets/fonts/iris.woff?wncwx9') format('woff'),
url('../assets/fonts/iris.svg?wncwx9#iris') format('svg');
font-weight: normal;
font-style: normal;
}
.icon {
@include noselect();
@ -50,173 +40,9 @@
&--svg {
}
}
/*
@font-face {
font-family: 'iris';
src:
url('../assets/fonts/iris.ttf?wncwx9') format('truetype'),
url('../assets/fonts/iris.woff?wncwx9') format('woff'),
url('../assets/fonts/iris.svg?wncwx9#iris') format('svg');
font-weight: normal;
font-style: normal;
}
$icon-back: \e900;
$icon-broadcast: \e901;
$icon-cd: \e902;
$icon-chevron-left: \e903;
$icon-chevron-right: \e904;
$icon-close: \e905;
$icon-cog: \e906;
$icon-compass: \e907;
$icon-connection: \e908;
$icon-consume: \e909;
$icon-filter: \e90a;
$icon-folder: \e90b;
$icon-grid: \e90c;
$icon-leaf: \e90d;
$icon-list: \e90e;
$icon-local: \e90f;
$icon-mic: \e910;
$icon-music: \e911;
$icon-pause: \e912;
$icon-play: \e913;
$icon-play-alt: \e914;
$icon-playlist: \e915;
$icon-repeat: \e916;
$icon-search: \e917;
$icon-sections: \e918;
$icon-server: \e919;
$icon-shuffle: \e91a;
$icon-skip: \e91b;
$icon-soundcloud: \e91c;
$icon-spotify: \e91d;
$icon-star: \e91e;
$icon-stop: \e91f;
$icon-websocket: \e920;
[class^="icon-"], [class*=" icon-"] {
@include noselect();
font-family: 'iris' !important;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
display: inline-block;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-back:before {
content: "\e900";
}
.icon-broadcast:before {
content: "\e901";
}
.icon-cd:before {
content: "\e902";
}
.icon-chevron-left:before {
content: "\e903";
}
.icon-chevron-right:before {
content: "\e904";
}
.icon-close:before {
content: "\e905";
}
.icon-cog:before {
content: "\e906";
}
.icon-compass:before {
content: "\e907";
}
.icon-connection:before {
content: "\e908";
}
.icon-consume:before {
content: "\e909";
}
.icon-filter:before {
content: "\e90a";
}
.icon-folder:before {
content: "\e90b";
}
.icon-folder-open:before {
content: "\e90c";
}
.icon-grid:before {
content: "\e90d";
}
.icon-leaf:before {
content: "\e90e";
}
.icon-list:before {
content: "\e90f";
}
.icon-local:before {
content: "\e910";
}
.icon-mic:before {
content: "\e911";
}
.icon-music:before {
content: "\e912";
}
.icon-pause:before {
content: "\e913";
}
.icon-play:before {
content: "\e914";
}
.icon-play-alt:before {
content: "\e915";
}
.icon-playlist:before {
content: "\e916";
}
.icon-repeat:before {
content: "\e917";
}
.icon-search:before {
content: "\e918";
}
.icon-sections:before {
content: "\e919";
}
.icon-server:before {
content: "\e91a";
}
.icon-shuffle:before {
content: "\e91b";
}
.icon-skip:before {
content: "\e91c";
}
.icon-soundcloud:before {
content: "\e91d";
}
.icon-speaker:before {
content: "\e91e";
}
.icon-speaker-group:before {
content: "\e91f";
}
.icon-spotify:before {
content: "\e920";
}
.icon-star:before {
content: "\e921";
}
.icon-stop:before {
content: "\e922";
}
*/
&--spin {
@include spin(1s);
padding: 0 0.32em !important;
}
}

View File

@ -8,7 +8,7 @@ $parallax: 'parallax';
right: 0;
height: 100%;
max-height: 80vh;
transform: translateZ(-200px) scale(1.2);
transform: translateZ(-400px) scale(1.4);
transform-origin: top center;
z-index: -1;
background-color: lighten(colour(dark_grey), 10%);
@ -30,7 +30,7 @@ $parallax: 'parallax';
right: -10px;
background-repeat: no-repeat;
background-size: cover;
background-position: 50% 25%;
background-position: 50% 30%;
opacity: 0;
}

View File

@ -405,6 +405,12 @@ input[type="submit"] {
padding: 0;
}
&.button-wrapper {
.button {
margin-bottom: 0;
}
}
.description {
display: block;
padding: 6px 0 4px;

View File

@ -262,6 +262,11 @@
margin-bottom: 0;
}
.parallax {
height: 60vh;
opacity: 0.5;
}
.content {
padding: 40px;
color: colour(white);