Skip to content

Commit

Permalink
Minor fixes for 1.27
Browse files Browse the repository at this point in the history
  • Loading branch information
fondberg committed Jul 3, 2020
1 parent 23e16d7 commit c4519db
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 66 deletions.
62 changes: 31 additions & 31 deletions dist/spotify-card.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/spotify-card.js.map

Large diffs are not rendered by default.

62 changes: 31 additions & 31 deletions dist/spotify-card.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "spotify-card",
"author": "Niklas Fondberg <[email protected]>",
"version": "1.26.0",
"version": "1.27.0",
"browser": "dist/spotify-card.js",
"dependencies": {
"home-assistant-js-websocket": "^4.4.0",
Expand Down
31 changes: 31 additions & 0 deletions src/PlaylistType.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { h, Component } from 'preact';
import { useState } from 'preact/hooks';

const PlaylistType = () => {
const [state, setState] = useState('All');
const [showSelect, setShowSelect] = useState(false);
const options = ['Users playlists', 'Featured playlists', 'Daily Mixes playlists'];

const closeSelect = (e) => {
(e) => setState(e.target.value);
setShowSelect(false);
};

return (
<div>
{!showSelect && <div onClick={() => setShowSelect(true)}></div>}

{showSelect && (
<select class="playlist-type" onChange={closeSelect} onBlur={closeSelect}>
{options.map((item) => (
<option key={item} value={item}>
{item}
</option>
))}
</select>
)}
</div>
);
};

export default PlaylistType;
1 change: 0 additions & 1 deletion src/SpotifyCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export default class SpotifyCard extends Component {
playingPlaylist: null,
authenticationRequired: true,
};
// playlist-read-collaborative
this.scopes = [
'playlist-read-private',
'playlist-read-collaborative',
Expand Down
4 changes: 2 additions & 2 deletions track.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"spotify-card": {
"version": "1.26",
"remote_location": "https://raw.githubusercontent.com/custom-cards/spotify-card/v1.26/dist/spotify-card.js",
"version": "1.27.0",
"remote_location": "https://raw.githubusercontent.com/custom-cards/spotify-card/v1.27.0/dist/spotify-card.js",
"visit_repo": "https://github.com/custom-cards/spotify-card",
"changelog": "https://github.com/custom-cards/spotify-card/releases/latest"
}
Expand Down

0 comments on commit c4519db

Please sign in to comment.