From: Thibaut Girka Date: Tue, 7 Jul 2020 13:34:00 +0000 (+0200) Subject: Merge branch 'master' into glitch-soc/merge-upstream X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=e9ad99bc93b6f65277956d997792ec40f08165cb;p=mastodon.git Merge branch 'master' into glitch-soc/merge-upstream Conflicts: - `package.json`: Not really a conflict, just some glitch-soc-specific dependency too close to an upstream-updated one. --- e9ad99bc93b6f65277956d997792ec40f08165cb diff --cc app/controllers/home_controller.rb index efdb1d226,702889cd0..c9b840881 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@@ -1,9 -1,8 +1,10 @@@ # frozen_string_literal: true class HomeController < ApplicationController + before_action :redirect_unauthenticated_to_permalinks! before_action :authenticate_user! + + before_action :set_pack before_action :set_referrer_policy_header def index diff --cc app/views/layouts/application.html.haml index 92edaea3c,e32cdcabb..3336cf391 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@@ -20,13 -20,12 +20,14 @@@ %title= content_for?(:page_title) ? safe_join([yield(:page_title).chomp.html_safe, title], ' - ') : title - = stylesheet_pack_tag 'common', media: 'all' - = stylesheet_pack_tag current_theme, media: 'all' - = javascript_pack_tag 'common', integrity: true, crossorigin: 'anonymous' - = javascript_pack_tag "locale_#{I18n.locale}", 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' = csrf_meta_tags + %meta{ name: 'style-nonce', content: request.content_security_policy_nonce } = stylesheet_link_tag '/inert.css', skip_pipeline: true, media: 'all', id: 'inert-style' diff --cc package.json index fbf5fb673,fc151a5fc..bbf436fdb --- a/package.json +++ b/package.json @@@ -72,8 -71,7 +72,8 @@@ "@gamestdio/websocket": "^0.3.2", "@rails/ujs": "^6.0.3", "array-includes": "^3.1.1", - "arrow-key-navigation": "^1.1.0", + "atrament": "0.2.4", + "arrow-key-navigation": "^1.2.0", "autoprefixer": "^9.8.0", "axios": "^0.19.2", "babel-loader": "^8.1.0",