diff --git a/CHANGELOG.md b/CHANGELOG.md index 6198fae..e3db374 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ Change are listed in reverse chronological order (newest to oldest). +###### [ 1.0.6 ] - 2024/10/24 + + * Updated `fav-browser-base` to check for the existance of `search-input-outlined` and `ha-md-button-menu` controls in the `customElements` array, and force a load of the controls if they are not present. These controls may not be loaded by default when a page refresh (F5) occurs, so they must be forced to load in order to render correctly on the page. + * Updated README documentation. + * Cleaned up documentation images, and re-organized the media files in the `images` folder. + ###### [ 1.0.5 ] - 2024/10/23 * Updated README.md with lastest form examples. diff --git a/README.md b/README.md index f1d994b..d50a4ac 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ![Project Maintenance][maintenance-shield] [![BuyMeCoffee][buymecoffee-shield]][buymecoffee] _Home Assistant UI card that supports features unique to the [SpotifyPlus](https://github.com/thlucas1/homeassistantcomponent_spotifyplus) custom integration._ -Extended support for the SpotifyPlus product for use in Home Assistant. +Extended support for the Spotify Service for use in Home Assistant. ## Features @@ -24,42 +24,42 @@ and more! Here's a quick overview on what the card can look like. The card is highly customizable when it comes to the information displayed. Check out the [UI Dashboards wiki](https://github.com/thlucas1/spotifyplus_card/wiki/UI-Dashboards) page for more examples and YAML configuration. #### Media Player Control / Actions (Masonry Mode) -![masonry_player_track](./images/masonry_player_track.png?v20241023) -![masonry_player_track_actions](./images/masonry_player_track_actions.png?v20241023) -![masonry_player_audiobook](./images/masonry_player_audiobook.png?v20241023) -![masonry_player_audiobook_actions](./images/masonry_player_audiobook_actions.png?v20241023) -![masonry_player_show](./images/masonry_player_show.png?v20241023) -![masonry_player_show_actions](./images/masonry_player_show_actions.png?v20241023) +![masonry_player_track](./images/ui/masonry/player_track.png?v20241024) +![masonry_player_track_actions](./images/ui/masonry/player_track_actions.png?v20241024) +![masonry_player_audiobook](./images/ui/masonry/player_audiobook.png?v20241024) +![masonry_player_audiobook_actions](./images/ui/masonry/player_audiobook_actions.png?v20241024) +![masonry_player_show](./images/ui/masonry/player_show.png?v20241024) +![masonry_player_show_actions](./images/ui/masonry/player_show_actions.png?v20241024) #### Media Favorites (Masonry Mode) -![masonry_playlist_favorites](./images/masonry_playlist_favorites.png?v20241023) -![masonry_album_favorites](./images/masonry_album_favorites.png?v20241023) -![masonry_artist_favorites](./images/masonry_artist_favorites.png?v20241023) -![masonry_track_favorites](./images/masonry_track_favorites.png?v20241023) -![masonry_audiobook_favorites](./images/masonry_audiobook_favorites.png?v20241023) -![masonry_show_favorites](./images/masonry_show_favorites.png?v20241023) -![masonry_episode_favorites](./images/masonry_episode_favorites.png?v20241023) -![masonry_recently_played](./images/masonry_recents.png?v20241023) -![masonry_userpresets](./images/masonry_userpresets.png?v20241023) +![masonry_playlist_favorites](./images/ui/masonry/playlist_favorites.png?v20241024) +![masonry_album_favorites](./images/ui/masonry/album_favorites.png?v20241024) +![masonry_artist_favorites](./images/ui/masonry/artist_favorites.png?v20241024) +![masonry_track_favorites](./images/ui/masonry/track_favorites.png?v20241024) +![masonry_audiobook_favorites](./images/ui/masonry/audiobook_favorites.png?v20241024) +![masonry_show_favorites](./images/ui/masonry/show_favorites.png?v20241024) +![masonry_episode_favorites](./images/ui/masonry/episode_favorites.png?v20241024) +![masonry_recently_played](./images/ui/masonry/recents.png?v20241024) +![masonry_userpresets](./images/ui/masonry/userpresets.png?v20241024) #### Spotify Media Search (Masonry Mode) -![masonry_search_playlists](./images/masonry_search_playlists.png?v20241023) -![masonry_search_albums](./images/masonry_search_albums.png?v20241023) -![masonry_search_artists](./images/masonry_search_artists.png?v20241023) -![masonry_search_tracks](./images/masonry_search_tracks.png?v20241023) -![masonry_search_audiobooks](./images/masonry_search_audiobooks.png?v20241023) -![masonry_search_shows](./images/masonry_search_shows.png?v20241023) -![masonry_search_episodes](./images/masonry_search_episodes.png ?v20241023) +![masonry_search_playlists](./images/ui/masonry/search_playlists.png?v20241024) +![masonry_search_albums](./images/ui/masonry/search_albums.png?v20241024) +![masonry_search_artists](./images/ui/masonry/search_artists.png?v20241024) +![masonry_search_tracks](./images/ui/masonry/search_tracks.png?v20241024) +![masonry_search_audiobooks](./images/ui/masonry/search_audiobooks.png?v20241024) +![masonry_search_shows](./images/ui/masonry/search_shows.png?v20241024) +![masonry_search_episodes](./images/ui/masonry/search_episodes.png?v20241024) #### Devices / Actions (Masonry Mode) -![masonry_devices](./images/masonry_devices.png?v20241023) -![masonry_devices_actions](./images/masonry_devices_actions.png?v20241023) +![masonry_devices](./images/ui/masonry/devices.png?v20241024) +![masonry_devices_actions](./images/ui/masonry/devices_actions.png?v20241024) #### Editor UI -![config_editor_general](./images/config_editor_general.png) +![config_editor_general](./images/config/editor_general.png?v20241024) #### Card Picker -![config_cardpicker](./images/config_cardpicker.png?v20241023) +![config_cardpicker](./images/config/cardpicker.png?v20241024) ## HACS Installation Instructions (recommended) @@ -100,11 +100,11 @@ Check out the following links for more information: ## Reporting a Problem -Submit a [Bug Report](https://github.com/thlucas1/spotifyplus_card/issues/new?assignees=&labels=Bug&projects=&template=bug.yml) to bring the issue to my attention. I receive a notification when a new issue is opened, and will do my best to address it in a prompt and professional manner. +Submit a [Bug Report](https://github.com/thlucas1/spotifyplus_card/issues/new?assignees=&labels=bug&projects=&template=bug.yml) to bring the issue to my attention. I receive a notification when a new issue is opened, and will do my best to address it in a prompt and professional manner. ## Request a New Feature -Do you have an idea for a new feature that could be added to the integration? Submit a [Feature Request](https://github.com/thlucas1/spotifyplus_card/issues/new?assignees=&labels=Feature%2BRequest&projects=&template=feature_request.yml) to get your idea into the queue. I receive a notification when a new request is opened, and will do my best to turn your idea into the latest and greatest feature. +Do you have an idea for a new feature that could be added to the integration? Submit a [Feature Request](https://github.com/thlucas1/spotifyplus_card/issues/new?assignees=&labels=enhancement&projects=&template=feature_request.yml) to get your idea into the queue. I receive a notification when a new request is opened, and will do my best to turn your idea into the latest and greatest feature. *** diff --git a/SpotifyPlusCard.njsproj b/SpotifyPlusCard.njsproj index 8291269..dd63b48 100644 --- a/SpotifyPlusCard.njsproj +++ b/SpotifyPlusCard.njsproj @@ -6,7 +6,8 @@ {0777490A-BB48-44FB-941D-4758EA1310C6} . ProjectFiles - dist\spotifyplus-card.js + + . . {3AF33F2E-1136-4D97-BBB7-1795711AC8B8};{349c5851-65df-11da-9384-00065b846f21};{9092AA53-FB77-4645-B42D-1CCCA6BD08BD} @@ -34,6 +35,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -68,6 +100,9 @@ + + + diff --git a/images/config/cardpicker.png b/images/config/cardpicker.png new file mode 100644 index 0000000..d4af287 Binary files /dev/null and b/images/config/cardpicker.png differ diff --git a/images/config/editor_general.png b/images/config/editor_general.png new file mode 100644 index 0000000..acf1500 Binary files /dev/null and b/images/config/editor_general.png differ diff --git a/images/config_cardpicker.png b/images/config_cardpicker.png deleted file mode 100644 index 82b7fd2..0000000 Binary files a/images/config_cardpicker.png and /dev/null differ diff --git a/images/config_editor_albums.png b/images/config_editor_albums.png deleted file mode 100644 index 564014d..0000000 Binary files a/images/config_editor_albums.png and /dev/null differ diff --git a/images/config_editor_artists.png b/images/config_editor_artists.png deleted file mode 100644 index bd5472d..0000000 Binary files a/images/config_editor_artists.png and /dev/null differ diff --git a/images/config_editor_audiobooks.png b/images/config_editor_audiobooks.png deleted file mode 100644 index ec73fb4..0000000 Binary files a/images/config_editor_audiobooks.png and /dev/null differ diff --git a/images/config_editor_devices.png b/images/config_editor_devices.png deleted file mode 100644 index b39172c..0000000 Binary files a/images/config_editor_devices.png and /dev/null differ diff --git a/images/config_editor_episodes.png b/images/config_editor_episodes.png deleted file mode 100644 index 7afd8d9..0000000 Binary files a/images/config_editor_episodes.png and /dev/null differ diff --git a/images/config_editor_general.png b/images/config_editor_general.png deleted file mode 100644 index 1ffa8b2..0000000 Binary files a/images/config_editor_general.png and /dev/null differ diff --git a/images/config_editor_player_controls.png b/images/config_editor_player_controls.png deleted file mode 100644 index 40e4f90..0000000 Binary files a/images/config_editor_player_controls.png and /dev/null differ diff --git a/images/config_editor_player_header.png b/images/config_editor_player_header.png deleted file mode 100644 index 3e4363b..0000000 Binary files a/images/config_editor_player_header.png and /dev/null differ diff --git a/images/config_editor_player_volume.png b/images/config_editor_player_volume.png deleted file mode 100644 index 871460c..0000000 Binary files a/images/config_editor_player_volume.png and /dev/null differ diff --git a/images/config_editor_playlists.png b/images/config_editor_playlists.png deleted file mode 100644 index 4bccc38..0000000 Binary files a/images/config_editor_playlists.png and /dev/null differ diff --git a/images/config_editor_recents.png b/images/config_editor_recents.png deleted file mode 100644 index fb1d8de..0000000 Binary files a/images/config_editor_recents.png and /dev/null differ diff --git a/images/config_editor_search.png b/images/config_editor_search.png deleted file mode 100644 index 14706b0..0000000 Binary files a/images/config_editor_search.png and /dev/null differ diff --git a/images/config_editor_shows.png b/images/config_editor_shows.png deleted file mode 100644 index 5e66f88..0000000 Binary files a/images/config_editor_shows.png and /dev/null differ diff --git a/images/config_editor_tracks.png b/images/config_editor_tracks.png deleted file mode 100644 index e64a778..0000000 Binary files a/images/config_editor_tracks.png and /dev/null differ diff --git a/images/config_editor_userpresets.png b/images/config_editor_userpresets.png deleted file mode 100644 index 9cf6e26..0000000 Binary files a/images/config_editor_userpresets.png and /dev/null differ diff --git a/images/masonry_album_favorites.png b/images/masonry_album_favorites.png deleted file mode 100644 index 6615789..0000000 Binary files a/images/masonry_album_favorites.png and /dev/null differ diff --git a/images/masonry_album_favorites_actions.png b/images/masonry_album_favorites_actions.png deleted file mode 100644 index 943ca3c..0000000 Binary files a/images/masonry_album_favorites_actions.png and /dev/null differ diff --git a/images/masonry_artist_favorites.png b/images/masonry_artist_favorites.png deleted file mode 100644 index 95f87e8..0000000 Binary files a/images/masonry_artist_favorites.png and /dev/null differ diff --git a/images/masonry_artist_favorites_actions.png b/images/masonry_artist_favorites_actions.png deleted file mode 100644 index e9d1cb2..0000000 Binary files a/images/masonry_artist_favorites_actions.png and /dev/null differ diff --git a/images/masonry_audiobook_favorites.png b/images/masonry_audiobook_favorites.png deleted file mode 100644 index 6eaee61..0000000 Binary files a/images/masonry_audiobook_favorites.png and /dev/null differ diff --git a/images/masonry_audiobook_favorites_actions.png b/images/masonry_audiobook_favorites_actions.png deleted file mode 100644 index 1f871c8..0000000 Binary files a/images/masonry_audiobook_favorites_actions.png and /dev/null differ diff --git a/images/masonry_devices.png b/images/masonry_devices.png deleted file mode 100644 index 51d2cce..0000000 Binary files a/images/masonry_devices.png and /dev/null differ diff --git a/images/masonry_devices_actions.png b/images/masonry_devices_actions.png deleted file mode 100644 index 03c6c6b..0000000 Binary files a/images/masonry_devices_actions.png and /dev/null differ diff --git a/images/masonry_episode_favorites.png b/images/masonry_episode_favorites.png deleted file mode 100644 index 27dd6ad..0000000 Binary files a/images/masonry_episode_favorites.png and /dev/null differ diff --git a/images/masonry_episode_favorites_actions.png b/images/masonry_episode_favorites_actions.png deleted file mode 100644 index de793fc..0000000 Binary files a/images/masonry_episode_favorites_actions.png and /dev/null differ diff --git a/images/masonry_player_audiobook.png b/images/masonry_player_audiobook.png deleted file mode 100644 index 3c4c866..0000000 Binary files a/images/masonry_player_audiobook.png and /dev/null differ diff --git a/images/masonry_player_audiobook_actions.png b/images/masonry_player_audiobook_actions.png deleted file mode 100644 index 4c7af88..0000000 Binary files a/images/masonry_player_audiobook_actions.png and /dev/null differ diff --git a/images/masonry_player_show.png b/images/masonry_player_show.png deleted file mode 100644 index 6caad3b..0000000 Binary files a/images/masonry_player_show.png and /dev/null differ diff --git a/images/masonry_player_show_actions.png b/images/masonry_player_show_actions.png deleted file mode 100644 index 05abf23..0000000 Binary files a/images/masonry_player_show_actions.png and /dev/null differ diff --git a/images/masonry_player_track.png b/images/masonry_player_track.png deleted file mode 100644 index 97243a0..0000000 Binary files a/images/masonry_player_track.png and /dev/null differ diff --git a/images/masonry_player_track_actions.png b/images/masonry_player_track_actions.png deleted file mode 100644 index 9676896..0000000 Binary files a/images/masonry_player_track_actions.png and /dev/null differ diff --git a/images/masonry_playlist_favorites.png b/images/masonry_playlist_favorites.png deleted file mode 100644 index 2cec75f..0000000 Binary files a/images/masonry_playlist_favorites.png and /dev/null differ diff --git a/images/masonry_playlist_favorites_actions.png b/images/masonry_playlist_favorites_actions.png deleted file mode 100644 index 77d0e24..0000000 Binary files a/images/masonry_playlist_favorites_actions.png and /dev/null differ diff --git a/images/masonry_recents.png b/images/masonry_recents.png deleted file mode 100644 index 66b8dfa..0000000 Binary files a/images/masonry_recents.png and /dev/null differ diff --git a/images/masonry_recents_actions.png b/images/masonry_recents_actions.png deleted file mode 100644 index cee0995..0000000 Binary files a/images/masonry_recents_actions.png and /dev/null differ diff --git a/images/masonry_search_albums.png b/images/masonry_search_albums.png deleted file mode 100644 index ff4e08a..0000000 Binary files a/images/masonry_search_albums.png and /dev/null differ diff --git a/images/masonry_search_albums_actions.png b/images/masonry_search_albums_actions.png deleted file mode 100644 index 0c9ad32..0000000 Binary files a/images/masonry_search_albums_actions.png and /dev/null differ diff --git a/images/masonry_search_artists.png b/images/masonry_search_artists.png deleted file mode 100644 index ba0e236..0000000 Binary files a/images/masonry_search_artists.png and /dev/null differ diff --git a/images/masonry_search_artists_actions.png b/images/masonry_search_artists_actions.png deleted file mode 100644 index 25a3d08..0000000 Binary files a/images/masonry_search_artists_actions.png and /dev/null differ diff --git a/images/masonry_search_audiobooks.png b/images/masonry_search_audiobooks.png deleted file mode 100644 index 14eda8d..0000000 Binary files a/images/masonry_search_audiobooks.png and /dev/null differ diff --git a/images/masonry_search_audiobooks_actions.png b/images/masonry_search_audiobooks_actions.png deleted file mode 100644 index 9534d8c..0000000 Binary files a/images/masonry_search_audiobooks_actions.png and /dev/null differ diff --git a/images/masonry_search_episodes.png b/images/masonry_search_episodes.png deleted file mode 100644 index 60324bf..0000000 Binary files a/images/masonry_search_episodes.png and /dev/null differ diff --git a/images/masonry_search_episodes_actions.png b/images/masonry_search_episodes_actions.png deleted file mode 100644 index ca056ea..0000000 Binary files a/images/masonry_search_episodes_actions.png and /dev/null differ diff --git a/images/masonry_search_playlists.png b/images/masonry_search_playlists.png deleted file mode 100644 index 545ded7..0000000 Binary files a/images/masonry_search_playlists.png and /dev/null differ diff --git a/images/masonry_search_playlists_actions.png b/images/masonry_search_playlists_actions.png deleted file mode 100644 index 2479823..0000000 Binary files a/images/masonry_search_playlists_actions.png and /dev/null differ diff --git a/images/masonry_search_shows.png b/images/masonry_search_shows.png deleted file mode 100644 index 7974e16..0000000 Binary files a/images/masonry_search_shows.png and /dev/null differ diff --git a/images/masonry_search_shows_actions.png b/images/masonry_search_shows_actions.png deleted file mode 100644 index 83f8bc1..0000000 Binary files a/images/masonry_search_shows_actions.png and /dev/null differ diff --git a/images/masonry_search_tracks.png b/images/masonry_search_tracks.png deleted file mode 100644 index fba33dc..0000000 Binary files a/images/masonry_search_tracks.png and /dev/null differ diff --git a/images/masonry_search_tracks_actions.png b/images/masonry_search_tracks_actions.png deleted file mode 100644 index 86a712d..0000000 Binary files a/images/masonry_search_tracks_actions.png and /dev/null differ diff --git a/images/masonry_show_favorites.png b/images/masonry_show_favorites.png deleted file mode 100644 index 49478f4..0000000 Binary files a/images/masonry_show_favorites.png and /dev/null differ diff --git a/images/masonry_show_favorites_actions.png b/images/masonry_show_favorites_actions.png deleted file mode 100644 index 6bbdfff..0000000 Binary files a/images/masonry_show_favorites_actions.png and /dev/null differ diff --git a/images/masonry_track_favorites.png b/images/masonry_track_favorites.png deleted file mode 100644 index b86d14e..0000000 Binary files a/images/masonry_track_favorites.png and /dev/null differ diff --git a/images/masonry_track_favorites_actions.png b/images/masonry_track_favorites_actions.png deleted file mode 100644 index 75a1183..0000000 Binary files a/images/masonry_track_favorites_actions.png and /dev/null differ diff --git a/images/masonry_userpresets.png b/images/masonry_userpresets.png deleted file mode 100644 index e946d85..0000000 Binary files a/images/masonry_userpresets.png and /dev/null differ diff --git a/images/masonry_userpresets_actions.png b/images/masonry_userpresets_actions.png deleted file mode 100644 index 6856a9c..0000000 Binary files a/images/masonry_userpresets_actions.png and /dev/null differ diff --git a/images/ui/masonry/album_favorites.png b/images/ui/masonry/album_favorites.png new file mode 100644 index 0000000..38f478c Binary files /dev/null and b/images/ui/masonry/album_favorites.png differ diff --git a/images/ui/masonry/artist_favorites.png b/images/ui/masonry/artist_favorites.png new file mode 100644 index 0000000..ad8d8f7 Binary files /dev/null and b/images/ui/masonry/artist_favorites.png differ diff --git a/images/ui/masonry/audiobook_favorites.png b/images/ui/masonry/audiobook_favorites.png new file mode 100644 index 0000000..826417e Binary files /dev/null and b/images/ui/masonry/audiobook_favorites.png differ diff --git a/images/ui/masonry/devices.png b/images/ui/masonry/devices.png new file mode 100644 index 0000000..781f61a Binary files /dev/null and b/images/ui/masonry/devices.png differ diff --git a/images/ui/masonry/devices_actions.png b/images/ui/masonry/devices_actions.png new file mode 100644 index 0000000..272ea41 Binary files /dev/null and b/images/ui/masonry/devices_actions.png differ diff --git a/images/ui/masonry/episode_favorites.png b/images/ui/masonry/episode_favorites.png new file mode 100644 index 0000000..59fd561 Binary files /dev/null and b/images/ui/masonry/episode_favorites.png differ diff --git a/images/ui/masonry/player_audiobook.png b/images/ui/masonry/player_audiobook.png new file mode 100644 index 0000000..745f2d9 Binary files /dev/null and b/images/ui/masonry/player_audiobook.png differ diff --git a/images/ui/masonry/player_audiobook_actions.png b/images/ui/masonry/player_audiobook_actions.png new file mode 100644 index 0000000..f132bd3 Binary files /dev/null and b/images/ui/masonry/player_audiobook_actions.png differ diff --git a/images/ui/masonry/player_show.png b/images/ui/masonry/player_show.png new file mode 100644 index 0000000..4cefad5 Binary files /dev/null and b/images/ui/masonry/player_show.png differ diff --git a/images/ui/masonry/player_show_actions.png b/images/ui/masonry/player_show_actions.png new file mode 100644 index 0000000..6d576f2 Binary files /dev/null and b/images/ui/masonry/player_show_actions.png differ diff --git a/images/ui/masonry/player_track.png b/images/ui/masonry/player_track.png new file mode 100644 index 0000000..e25c364 Binary files /dev/null and b/images/ui/masonry/player_track.png differ diff --git a/images/ui/masonry/player_track_actions.png b/images/ui/masonry/player_track_actions.png new file mode 100644 index 0000000..1ee65a3 Binary files /dev/null and b/images/ui/masonry/player_track_actions.png differ diff --git a/images/ui/masonry/playlist_favorites.png b/images/ui/masonry/playlist_favorites.png new file mode 100644 index 0000000..ad470be Binary files /dev/null and b/images/ui/masonry/playlist_favorites.png differ diff --git a/images/ui/masonry/recents.png b/images/ui/masonry/recents.png new file mode 100644 index 0000000..4a0e771 Binary files /dev/null and b/images/ui/masonry/recents.png differ diff --git a/images/ui/masonry/search_albums.png b/images/ui/masonry/search_albums.png new file mode 100644 index 0000000..cf14ca8 Binary files /dev/null and b/images/ui/masonry/search_albums.png differ diff --git a/images/ui/masonry/search_artists.png b/images/ui/masonry/search_artists.png new file mode 100644 index 0000000..18c3909 Binary files /dev/null and b/images/ui/masonry/search_artists.png differ diff --git a/images/ui/masonry/search_audiobooks.png b/images/ui/masonry/search_audiobooks.png new file mode 100644 index 0000000..bf0467b Binary files /dev/null and b/images/ui/masonry/search_audiobooks.png differ diff --git a/images/ui/masonry/search_episodes.png b/images/ui/masonry/search_episodes.png new file mode 100644 index 0000000..bb6771a Binary files /dev/null and b/images/ui/masonry/search_episodes.png differ diff --git a/images/ui/masonry/search_playlists.png b/images/ui/masonry/search_playlists.png new file mode 100644 index 0000000..583bccd Binary files /dev/null and b/images/ui/masonry/search_playlists.png differ diff --git a/images/ui/masonry/search_shows.png b/images/ui/masonry/search_shows.png new file mode 100644 index 0000000..5ab3f80 Binary files /dev/null and b/images/ui/masonry/search_shows.png differ diff --git a/images/ui/masonry/search_tracks.png b/images/ui/masonry/search_tracks.png new file mode 100644 index 0000000..7e9e8e7 Binary files /dev/null and b/images/ui/masonry/search_tracks.png differ diff --git a/images/ui/masonry/show_favorites.png b/images/ui/masonry/show_favorites.png new file mode 100644 index 0000000..094e6d2 Binary files /dev/null and b/images/ui/masonry/show_favorites.png differ diff --git a/images/ui/masonry/track_favorites.png b/images/ui/masonry/track_favorites.png new file mode 100644 index 0000000..ef9afe0 Binary files /dev/null and b/images/ui/masonry/track_favorites.png differ diff --git a/images/ui/masonry/userpresets.png b/images/ui/masonry/userpresets.png new file mode 100644 index 0000000..b8b45d2 Binary files /dev/null and b/images/ui/masonry/userpresets.png differ diff --git a/images/ui/player_controls.png b/images/ui/player_controls.png new file mode 100644 index 0000000..47c80ce Binary files /dev/null and b/images/ui/player_controls.png differ diff --git a/images/ui/player_header.png b/images/ui/player_header.png new file mode 100644 index 0000000..977c3bc Binary files /dev/null and b/images/ui/player_header.png differ diff --git a/images/ui/player_volume.png b/images/ui/player_volume.png new file mode 100644 index 0000000..16f2ca5 Binary files /dev/null and b/images/ui/player_volume.png differ diff --git a/src/constants.ts b/src/constants.ts index 6571183..feb4a73 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,7 +1,7 @@ import { css } from 'lit'; /** current version of the card. */ -export const CARD_VERSION = '1.0.5'; +export const CARD_VERSION = '1.0.6'; /** SpotifyPlus integration domain identifier. */ export const DOMAIN_SPOTIFYPLUS = 'spotifyplus'; diff --git a/src/sections/fav-browser-base.ts b/src/sections/fav-browser-base.ts index 4b65193..1e8f642 100644 --- a/src/sections/fav-browser-base.ts +++ b/src/sections/fav-browser-base.ts @@ -15,7 +15,7 @@ import { MediaPlayer } from '../model/media-player'; import { SpotifyPlusService } from '../services/spotifyplus-service'; import { storageService } from '../decorators/storage'; import { truncateMediaList } from '../utils/media-browser-utils'; -import { isCardInEditPreview } from '../utils/utils'; +import { isCardInEditPreview, loadHaFormLazyControls } from '../utils/utils'; import { ProgressEndedEvent } from '../events/progress-ended'; import { ProgressStartedEvent } from '../events/progress-started'; import { DOMAIN_SPOTIFYPLUS } from '../constants'; @@ -255,6 +255,10 @@ export class FavBrowserBase extends LitElement { // JSON.stringify(Array.from(changedProperties.keys())), //); + // ensure "" and "" HA customElements are + // loaded so that the controls are rendered properly. + (async () => await loadHaFormLazyControls())(); + // set storage cache key for the media player user. // the prefix will include our domain, the Spotify user name, and the storage key. // this allows us to maintain preferences for multiple Spotify accounts. diff --git a/src/utils/utils.ts b/src/utils/utils.ts index 86d3d3d..8021fe2 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -3,6 +3,12 @@ import { CardConfig } from '../types/card-config'; import { ConfigArea } from '../types/config-area'; import { Section } from '../types/section'; +// debug logging. +import Debug from 'debug/src/browser.js'; +import { DEBUG_APP_NAME } from '../constants'; +const debuglog = Debug(DEBUG_APP_NAME + ":utils"); + + export function cardDoesNotContainAllSections(config: CardConfig) { return config.sections && config.sections.length < Object.keys(Section).length; } @@ -420,3 +426,51 @@ export function closestElement(selector: string, base: Element) { export function isTouchDevice(): boolean { return 'ontouchstart' in window || navigator.maxTouchPoints > 0; } + + +/** + * Determines if the following lazily-loaded controls are defined to customElements, and + * forces a page load to load the controls if not. Controls checked for are: + * - + * - + * - + * + * This can happen when the user presses F5 to refresh the page, and the above controls + * are not loaded. If they are used on the form, then they will not render correctly! + * + * To find out what custom elements are available on a dashboard, bring up the console (in + * Chrome) and run the following command: + * > Array.from(customElements.l.keys()).sort().join(", "); + */ +export const loadHaFormLazyControls = async () => { + + // if specified customElements already exist then we are done. + if (customElements.get("search-input-outlined") && customElements.get("ha-md-button-menu") && customElements.get("ha-alert")) { + return; + } + + if (debuglog.enabled) { + debuglog("loadHaFormLazyControls - loading lazy controls via partial-panel-resolver"); + } + + // create partial panel resolver element. + await customElements.whenDefined("partial-panel-resolver"); + const ppr = document.createElement('partial-panel-resolver') as any; + ppr.hass = { + panels: [{ + url_path: "tmp", + component_name: "config", + }] + }; + ppr._updateRoutes(); + await ppr.routerOptions.routes.tmp.load(); + + await customElements.whenDefined("ha-panel-config"); + const cpr = document.createElement("ha-panel-config") as any; + await cpr.routerOptions.routes.automation.load(); + + if (debuglog.enabled) { + debuglog("loadHaFormLazyControls - done; lazy controls should now be loaded"); + } + +}