-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
373 additions
and
314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.58.3 | ||
3.59.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"manifest_version": "3.58.3", | ||
"manifest_version": "3.59.0", | ||
"short_name": "Iris", | ||
"name": "Iris", | ||
"icons": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "mopidy-iris", | ||
"version": "3.58.3", | ||
"version": "3.59.0", | ||
"description": "Mopidy HTTP interface", | ||
"repository": "https://github.com/jaedb/iris", | ||
"author": "James Barnsley <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[metadata] | ||
name = Mopidy-Iris | ||
version = 3.58.3 | ||
version = 3.59.0 | ||
url = https://github.com/jaedb/iris | ||
author = James Barnsley | ||
author_email = [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import React, { useEffect } from 'react'; | ||
import { useSelector, useDispatch } from 'react-redux'; | ||
import URILink from './URILink'; | ||
import { I18n, i18n } from '../locale'; | ||
import { | ||
getFromUri, | ||
titleCase, | ||
uriType, | ||
} from '../util/helpers'; | ||
import { | ||
makeItemSelector, | ||
makeLoadingSelector, | ||
} from '../util/selectors'; | ||
import { loadUri } from '../services/core/actions'; | ||
|
||
export default ({ | ||
by, | ||
uri, | ||
className = '', | ||
inline, | ||
}) => { | ||
if (!uri) return null; | ||
|
||
const dispatch = useDispatch(); | ||
const from = useSelector(makeItemSelector(uri)); | ||
const loading = useSelector(makeLoadingSelector([`(.*)${uri}(.*)`])); | ||
|
||
useEffect(() => { | ||
if (uri && !from && !loading) { | ||
dispatch(loadUri(uri)); | ||
} | ||
}, []); | ||
|
||
const type = from?.type || uriType(uri); | ||
let link = null; | ||
switch (type) { | ||
case 'discover': | ||
link = ( | ||
<URILink type="recommendations" uri={getFromUri('seeds', uri)}> | ||
<I18n path="discover.title" /> | ||
</URILink> | ||
); | ||
break; | ||
|
||
case 'browse': | ||
link = ( | ||
<URILink type={from?.type} uri={uri}> | ||
<I18n path="library.browse.title" /> | ||
</URILink> | ||
); | ||
break; | ||
|
||
case 'search': | ||
link = ( | ||
<URILink type={from?.type} uri={uri}> | ||
<I18n path="search.title" /> | ||
</URILink> | ||
); | ||
break; | ||
|
||
case 'radio': | ||
link = <I18n path="modal.edit_radio.title" />; | ||
break; | ||
|
||
case 'queue-history': | ||
link = <I18n path="queue_history.title" />; | ||
break; | ||
|
||
default: | ||
link = <URILink type={type} uri={uri}>{from?.name || titleCase(type)}</URILink>; | ||
} | ||
|
||
if (inline) { | ||
return ( | ||
<div className={className}> | ||
{i18n('specs.added_from')} | ||
{link} | ||
</div> | ||
); | ||
} | ||
|
||
return ( | ||
<div className={`${className} tooltip`}> | ||
{link} | ||
<span className="tooltip__content"> | ||
{i18n('specs.added_by', { by })} | ||
</span> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.