about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-08-11 23:15:32 +0200
committerThibG <thib@sitedethib.com>2020-08-12 00:00:42 +0200
commit7c20530fb70439710ac1e0c8ad8544409506c93a (patch)
treebdcb6e1e4be2b22bfa80e558f491e31791fe7107 /app/views
parent0376b6b92bb80394341ae648d646a508484aa154 (diff)
Fix embedded player
(broken because I forgot to adapt it to glitch-soc's theming system)
Diffstat (limited to 'app/views')
-rw-r--r--app/views/media/player.html.haml9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/views/media/player.html.haml b/app/views/media/player.html.haml
index ae47750e9..bd5610a0b 100644
--- a/app/views/media/player.html.haml
+++ b/app/views/media/player.html.haml
@@ -1,6 +1,13 @@
 - content_for :header_tags do
   = render_initial_state
-  = javascript_pack_tag 'public', integrity: true, crossorigin: 'anonymous'
+  = javascript_pack_tag "locales", integrity: true, crossorigin: 'anonymous'
+  - if @theme
+    - if @theme[:supported_locales].include? I18n.locale.to_s
+      = javascript_pack_tag "locales/#{@theme[:flavour]}/#{I18n.locale}", integrity: true, crossorigin: 'anonymous'
+    - elsif @theme[:supported_locales].include? 'en'
+      = javascript_pack_tag "locales/#{@theme[:flavour]}/en", integrity: true, crossorigin: 'anonymous'
+  = render partial: 'layouts/theme', object: @core
+  = render partial: 'layouts/theme', object: @theme
 
 - if @media_attachment.video?
   = react_component :video, src: @media_attachment.file.url(:original), preview: @media_attachment.thumbnail.present? ? @media_attachment.thumbnail.url : @media_attachment.file.url(:small), blurhash: @media_attachment.blurhash, width: 670, height: 380, editable: true, detailed: true, inline: true, alt: @media_attachment.description do