From: Thibaut Girka Date: Tue, 30 Jul 2019 10:22:33 +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=24968d20a07d483cd36b4747bd1db8bd512002c2;p=mastodon.git Merge branch 'master' into glitch-soc/merge-upstream Conflicts: - app/controllers/directories_controller.rb - package.json - yarn.lock --- 24968d20a07d483cd36b4747bd1db8bd512002c2 diff --cc app/controllers/about_controller.rb index 179f013b5,d276e8fe5..f41e52aae --- a/app/controllers/about_controller.rb +++ b/app/controllers/about_controller.rb @@@ -1,9 -1,9 +1,10 @@@ # frozen_string_literal: true class AboutController < ApplicationController + before_action :set_pack layout 'public' + before_action :require_open_federation!, only: [:show, :more] before_action :set_body_classes, only: :show before_action :set_instance_presenter before_action :set_expires_in diff --cc app/controllers/application_controller.rb index 4a6b96982,0d3913ee0..19efc8838 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@@ -14,10 -15,10 +15,11 @@@ class ApplicationController < ActionCon helper_method :current_account helper_method :current_session - helper_method :current_theme + helper_method :current_flavour + helper_method :current_skin helper_method :single_user_mode? helper_method :use_seamless_external_login? + helper_method :whitelist_mode? rescue_from ActionController::RoutingError, with: :not_found rescue_from ActiveRecord::RecordNotFound, with: :not_found diff --cc app/controllers/directories_controller.rb index 59247a21f,d2ef76f06..0702ebc04 --- a/app/controllers/directories_controller.rb +++ b/app/controllers/directories_controller.rb @@@ -20,11 -20,7 +21,11 @@@ class DirectoriesController < Applicati private + def set_pack + use_pack 'share' + end + - def check_enabled + def require_enabled! return not_found unless Setting.profile_directory end diff --cc app/controllers/public_timelines_controller.rb index a5c981c7f,324bdc508..940b2f7cd --- a/app/controllers/public_timelines_controller.rb +++ b/app/controllers/public_timelines_controller.rb @@@ -1,10 -1,10 +1,11 @@@ # frozen_string_literal: true class PublicTimelinesController < ApplicationController + before_action :set_pack layout 'public' - before_action :check_enabled + before_action :authenticate_user!, if: :whitelist_mode? + before_action :require_enabled! before_action :set_body_classes before_action :set_instance_presenter diff --cc app/views/admin/settings/edit.html.haml index 854f4cf87,1e2ed3f77..efe6ea56b --- a/app/views/admin/settings/edit.html.haml +++ b/app/views/admin/settings/edit.html.haml @@@ -54,30 -55,19 +55,31 @@@ .fields-group = f.input :open_deletion, as: :boolean, wrapper: :with_label, label: t('admin.settings.registrations.deletion.title'), hint: t('admin.settings.registrations.deletion.desc_html') - .fields-group - = f.input :activity_api_enabled, as: :boolean, wrapper: :with_label, label: t('admin.settings.activity_api_enabled.title'), hint: t('admin.settings.activity_api_enabled.desc_html') + - unless whitelist_mode? + .fields-group + = f.input :activity_api_enabled, as: :boolean, wrapper: :with_label, label: t('admin.settings.activity_api_enabled.title'), hint: t('admin.settings.activity_api_enabled.desc_html') - .fields-group - = f.input :peers_api_enabled, as: :boolean, wrapper: :with_label, label: t('admin.settings.peers_api_enabled.title'), hint: t('admin.settings.peers_api_enabled.desc_html') + .fields-group + = f.input :peers_api_enabled, as: :boolean, wrapper: :with_label, label: t('admin.settings.peers_api_enabled.title'), hint: t('admin.settings.peers_api_enabled.desc_html') - .fields-group - = f.input :preview_sensitive_media, as: :boolean, wrapper: :with_label, label: t('admin.settings.preview_sensitive_media.title'), hint: t('admin.settings.preview_sensitive_media.desc_html') + .fields-group + = f.input :preview_sensitive_media, as: :boolean, wrapper: :with_label, label: t('admin.settings.preview_sensitive_media.title'), hint: t('admin.settings.preview_sensitive_media.desc_html') - .fields-group - = f.input :profile_directory, as: :boolean, wrapper: :with_label, label: t('admin.settings.profile_directory.title'), hint: t('admin.settings.profile_directory.desc_html') + .fields-group + = f.input :profile_directory, as: :boolean, wrapper: :with_label, label: t('admin.settings.profile_directory.title'), hint: t('admin.settings.profile_directory.desc_html') + .fields-group + = f.input :hide_followers_count, as: :boolean, wrapper: :with_label, label: t('admin.settings.hide_followers_count.title'), hint: t('admin.settings.hide_followers_count.desc_html') + + .fields-group + = f.input :enable_keybase, as: :boolean, wrapper: :with_label, label: t('admin.settings.enable_keybase.title'), hint: t('admin.settings.enable_keybase.desc_html') + + .fields-group + = f.input :show_reblogs_in_public_timelines, as: :boolean, wrapper: :with_label, label: t('admin.settings.show_reblogs_in_public_timelines.title'), hint: t('admin.settings.show_reblogs_in_public_timelines.desc_html') + + .fields-group + = f.input :show_replies_in_public_timelines, as: :boolean, wrapper: :with_label, label: t('admin.settings.show_replies_in_public_timelines.title'), hint: t('admin.settings.show_replies_in_public_timelines.desc_html') + .fields-group = f.input :spam_check_enabled, as: :boolean, wrapper: :with_label, label: t('admin.settings.spam_check_enabled.title'), hint: t('admin.settings.spam_check_enabled.desc_html') diff --cc package.json index b6d2a514b,ab35f9e0b..677523508 --- a/package.json +++ b/package.json @@@ -74,8 -73,7 +74,8 @@@ "@babel/runtime": "^7.5.4", "@clusterws/cws": "^0.15.0", "array-includes": "^3.0.3", + "atrament": "^0.2.3", - "autoprefixer": "^9.6.0", + "autoprefixer": "^9.6.1", "axios": "^0.19.0", "babel-loader": "^8.0.6", "babel-plugin-lodash": "^3.3.4", @@@ -96,8 -94,7 +96,8 @@@ "escape-html": "^1.0.3", "exif-js": "^2.3.0", "express": "^4.17.1", + "favico.js": "^0.3.10", - "file-loader": "^4.0.0", + "file-loader": "^4.1.0", "font-awesome": "^4.7.0", "glob": "^7.1.1", "http-link-header": "^1.0.2", diff --cc yarn.lock index ff520ad78,b9aef376e..6707f2d8d --- a/yarn.lock +++ b/yarn.lock @@@ -1628,17 -1704,13 +1704,17 @@@ atob@^2.1.1 resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== +atrament@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/atrament/-/atrament-0.2.3.tgz#6ccbc0daa6d3f25e5aeaeb31befeb78e86980348" + - autoprefixer@^9.6.0: - version "9.6.0" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.0.tgz#0111c6bde2ad20c6f17995a33fad7cf6854b4c87" - integrity sha512-kuip9YilBqhirhHEGHaBTZKXL//xxGnzvsD0FtBQa6z+A69qZD6s/BAX9VzDF1i9VKDquTJDQaPLSEhOnL6FvQ== + autoprefixer@^9.6.1: + version "9.6.1" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.1.tgz#51967a02d2d2300bb01866c1611ec8348d355a47" + integrity sha512-aVo5WxR3VyvyJxcJC3h4FKfwCQvQWb1tSI5VHNibddCVWrcD1NvlxEweg3TSgiPztMnWfjpy2FURKA2kvDE+Tw== dependencies: - browserslist "^4.6.1" - caniuse-lite "^1.0.30000971" + browserslist "^4.6.3" + caniuse-lite "^1.0.30000980" chalk "^2.4.2" normalize-range "^0.1.2" num2fraction "^1.2.2"