Browse Source

Fix settings/flavours

Update theming system to use new paths for media files
closed-social-glitch-2
Thibaut Girka 5 years ago
parent
commit
0fbe90e2d3
3 changed files with 5 additions and 9 deletions
  1. +2
    -4
      app/javascript/flavours/glitch/theme.yml
  2. +2
    -4
      app/javascript/flavours/vanilla/theme.yml
  3. +1
    -1
      app/views/settings/flavours/show.html.haml

+ 2
- 4
app/javascript/flavours/glitch/theme.yml View 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]`),

+ 2
- 4
app/javascript/flavours/vanilla/theme.yml View 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]`),

+ 1
- 1
app/views/settings/flavours/show.html.haml View 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: ''

Loading…
Cancel
Save