]> cat aescling's git repositories - mastodon.git/commitdiff
Fix settings/flavours
authorThibaut Girka <thib@sitedethib.com>
Sat, 16 Mar 2019 15:21:20 +0000 (16:21 +0100)
committerThibaut Girka <thib@sitedethib.com>
Sat, 16 Mar 2019 15:21:20 +0000 (16:21 +0100)
Update theming system to use new paths for media files

app/javascript/flavours/glitch/theme.yml
app/javascript/flavours/vanilla/theme.yml
app/views/settings/flavours/show.html.haml

index d8f3133818526118751b52a6c57232154889e67b..587cc0f1ed41172760c9e911d18a6f75b131d8ed 100644 (file)
@@ -28,10 +28,8 @@ pack:
 locales: locales
 
 #  (OPTIONAL) A file to use as the preview screenshot for the flavour,
-#  or an array thereof. These filenames must be unique across all
-#  images (regardless of path), so it's a good idea to namespace them
-#  to your theme. It's up to you to let webpack know to compile them.
-screenshot: glitch-preview.jpg
+#  or an array thereof. These are the full path from `app/javascript/`.
+screenshot: flavours/glitch/images/glitch-preview.jpg
 
 #  (OPTIONAL) The directory which contains the pack files.
 #  Defaults to the theme directory (`app/javascript/themes/[theme]`),
index a215b2625ec0339d63054e2000dc53dab7134e41..42e26daea728e3eaba3f2cf71c421b99e599043f 100644 (file)
@@ -26,10 +26,8 @@ pack:
 locales: ../../mastodon/locales
 
 #  (OPTIONAL) A file to use as the preview screenshot for the flavour,
-#  or an array thereof. These filenames must be unique across all
-#  images (regardless of path), so it's a good idea to namespace them
-#  to your theme. It's up to you to let webpack know to compile them.
-screenshot: screenshot.jpg
+#  or an array thereof. These are the full path from `app/javascript/`.
+screenshot: images/screenshot.jpg
 
 #  (OPTIONAL) The directory which contains the pack files.
 #  Defaults to this directory (`app/javascript/flavour/[flavour]`),
index a5126d9c52949fd79f462d10d0e771d83c836f39..c3f785aa03e65fcc8ff098d64aa8d80d4466d998 100644 (file)
@@ -5,7 +5,7 @@
   = render 'shared/error_messages', object: current_user
 
   - Themes.instance.flavour(@selected)['screenshot'].each do |screen|
-    %img.flavour-screen{ src: asset_pack_path(screen) }
+    %img.flavour-screen{ src: full_pack_url("media/#{screen}") }
 
   .flavour-description
     = t "flavours.#{@selected}.description", default: ''