Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New artwork type #331

Merged
merged 20 commits into from
Aug 3, 2020
Merged

New artwork type #331

merged 20 commits into from
Aug 3, 2020

Conversation

SBado
Copy link
Contributor

@SBado SBado commented Jun 10, 2020

I added a new artwork type to mimic stock media player card look&feel:

1

I simply "stole" the code from the stock card, all credits go to @zsarnett, as far as I know (he's the one mentioned in Home Assistant 0.107 release notes, here).
The only problem I'm facing is that for the life of me I cannot build the code using rollup. I mean, the build completes successfully, but the card doesn't work and Chrome debugger shows a "require is not defined" error upon opening the page. I had to switch to webpack to make everything work.

@kalkih If you are interested, can I ask you some support about rollup?

@kalkih kalkih added the enhancement New feature or request label Jun 10, 2020
@kalkih
Copy link
Owner

kalkih commented Jun 10, 2020

Hello,
I don't mind switching to webpack, actually prefer it.

Edit: Would however prefer if that was done in another PR.

src/components/mediaControls.js Outdated Show resolved Hide resolved
src/main.js Outdated Show resolved Hide resolved
src/main.js Outdated Show resolved Hide resolved
src/style.js Outdated Show resolved Hide resolved
src/main.js Outdated Show resolved Hide resolved
src/main.js Outdated Show resolved Hide resolved
src/main.js Outdated Show resolved Hide resolved
src/style.js Outdated Show resolved Hide resolved
src/style.js Outdated Show resolved Hide resolved
src/style.js Outdated Show resolved Hide resolved
@kalkih
Copy link
Owner

kalkih commented Jun 10, 2020

When player isn't active (paused e.t.c.) we should revert to default UI colors.

src/main.js Outdated Show resolved Hide resolved
src/main.js Outdated Show resolved Hide resolved
src/main.js Outdated Show resolved Hide resolved
src/main.js Outdated Show resolved Hide resolved
src/main.js Outdated Show resolved Hide resolved
src/style.js Outdated Show resolved Hide resolved
@kalkih
Copy link
Owner

kalkih commented Jun 13, 2020

Need to make sure the player reverts to default colors if the "idle_view" state is active.

Kapture 2020-06-13 at 17 09 02

Easily reproduce with the following config

...
idle_view:
  when_paused: true

@kalkih
Copy link
Owner

kalkih commented Jun 13, 2020

Utilizing the css variables was great, removed a lot of unnecessary code. 👍

@nagyrobi
Copy link
Contributor

+1 for this!

@kalkih kalkih merged commit b324a47 into kalkih:dev Aug 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Artwork option like in the lovelace-media player card
3 participants