diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2020-07-05 18:28:25 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2020-07-05 20:18:51 +0200 |
commit | 69cddc3909924b5a2ce02f85932fb41f88faf0db (patch) | |
tree | 8c41900d4f4c8a94cb5a2feee1af2080ae2dec15 /app/javascript/flavours/glitch/features/ui | |
parent | ad73e05f464bac6ef52c2a2fd0a472dd6b8c14ce (diff) |
[Glitch] Add color extraction for audio thumbnails
Port 99f3a5554074d9a12619797c474b3de4c6085f02 to glitch-soc Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/ui')
-rw-r--r-- | app/javascript/flavours/glitch/features/ui/components/audio_modal.js | 4 | ||||
-rw-r--r-- | app/javascript/flavours/glitch/features/ui/components/focal_point_modal.js | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/ui/components/audio_modal.js b/app/javascript/flavours/glitch/features/ui/components/audio_modal.js index 90428d883..f0c3b3bcc 100644 --- a/app/javascript/flavours/glitch/features/ui/components/audio_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/audio_modal.js @@ -38,7 +38,9 @@ export default class AudioModal extends ImmutablePureComponent { duration={media.getIn(['meta', 'original', 'duration'], 0)} height={150} poster={media.get('preview_url') || status.getIn(['account', 'avatar_static'])} - blurhash={media.get('blurhash')} + backgroundColor={media.getIn(['meta', 'colors', 'background'])} + foregroundColor={media.getIn(['meta', 'colors', 'foreground'])} + accentColor={media.getIn(['meta', 'colors', 'accent'])} /> </div> diff --git a/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.js b/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.js index 17f74bd03..2f4200e10 100644 --- a/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.js @@ -329,7 +329,9 @@ class FocalPointModal extends ImmutablePureComponent { duration={media.getIn(['meta', 'original', 'duration'], 0)} height={150} poster={media.get('preview_url') || account.get('avatar_static')} - blurhash={media.get('blurhash')} + backgroundColor={media.getIn(['meta', 'colors', 'background'])} + foregroundColor={media.getIn(['meta', 'colors', 'foreground'])} + accentColor={media.getIn(['meta', 'colors', 'accent'])} editable /> )} |