From 0f2fbf7d05825447a0f2a1e82b6137c069cb1658 Mon Sep 17 00:00:00 2001 From: ThibG Date: Sat, 12 May 2018 17:44:15 +0200 Subject: Improvements to toots display in admin view (#7452) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Distinguish boosts from original statuses in the admin panel (fixes #7449) * Show the “show more” button in admin view to make CWs clearer (fixes #7451) * Make content warnings swag --- config/locales/en.yml | 1 + 1 file changed, 1 insertion(+) (limited to 'config') diff --git a/config/locales/en.yml b/config/locales/en.yml index 5369311ac..c074fa5b0 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -682,6 +682,7 @@ en: video: one: "%{count} video" other: "%{count} videos" + boosted_from_html: Boosted from %{acct_link} content_warning: 'Content warning: %{warning}' disallowed_hashtags: one: 'contained a disallowed hashtag: %{tags}' -- cgit From 97e43ec5f08aeafe0cb34a2e71e857f22c547f7a Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 13 May 2018 21:07:31 +0200 Subject: Add GET /api/v1/push/subscription REST API (#7471) * Add Api::V1::Push::SubscriptionsController#show * Add to routes --- app/controllers/api/v1/push/subscriptions_controller.rb | 4 ++++ config/routes.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/app/controllers/api/v1/push/subscriptions_controller.rb b/app/controllers/api/v1/push/subscriptions_controller.rb index 5038cc03c..e99f20ca0 100644 --- a/app/controllers/api/v1/push/subscriptions_controller.rb +++ b/app/controllers/api/v1/push/subscriptions_controller.rb @@ -20,6 +20,10 @@ class Api::V1::Push::SubscriptionsController < Api::BaseController render json: @web_subscription, serializer: REST::WebPushSubscriptionSerializer end + def show + render json: @web_subscription, serializer: REST::WebPushSubscriptionSerializer + end + def update raise ActiveRecord::RecordNotFound if @web_subscription.nil? diff --git a/config/routes.rb b/config/routes.rb index b7bd1a7ed..bd9d09226 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -308,7 +308,7 @@ Rails.application.routes.draw do end namespace :push do - resource :subscription, only: [:create, :update, :destroy] + resource :subscription, only: [:create, :show, :update, :destroy] end end -- cgit From 2226d987f9a5b63854a2a438d189ae953987c7ea Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Mon, 14 May 2018 19:52:25 +0900 Subject: Add Slovene language (#7475) --- app/helpers/settings_helper.rb | 1 + app/javascript/mastodon/locales/defaultMessages.json | 2 +- config/application.rb | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb index f6d86a18e..ba728eb32 100644 --- a/app/helpers/settings_helper.rb +++ b/app/helpers/settings_helper.rb @@ -33,6 +33,7 @@ module SettingsHelper 'pt-BR': 'Português do Brasil', ru: 'Русский', sk: 'Slovensky', + sl: 'Slovenščina', sr: 'Српски', 'sr-Latn': 'Srpski (latinica)', sv: 'Svenska', diff --git a/app/javascript/mastodon/locales/defaultMessages.json b/app/javascript/mastodon/locales/defaultMessages.json index 359291874..49b287928 100644 --- a/app/javascript/mastodon/locales/defaultMessages.json +++ b/app/javascript/mastodon/locales/defaultMessages.json @@ -1857,4 +1857,4 @@ ], "path": "app/javascript/mastodon/features/video/index.json" } -] +] \ No newline at end of file diff --git a/config/application.rb b/config/application.rb index b4871241a..729d4dafc 100644 --- a/config/application.rb +++ b/config/application.rb @@ -67,6 +67,7 @@ module Mastodon :'pt-BR', :ru, :sk, + :sl, :sr, :'sr-Latn', :sv, -- cgit From d8b3f5fb9a6d394257cedd1fda3f86ff64f21e5b Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Tue, 15 May 2018 00:45:37 +0900 Subject: Limit environment variables to expose to webpack (#7480) --- config/webpack/configuration.js | 5 ++++- config/webpack/production.js | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/webpack/configuration.js b/config/webpack/configuration.js index c06570944..cf8c0c7e1 100644 --- a/config/webpack/configuration.js +++ b/config/webpack/configuration.js @@ -33,7 +33,10 @@ const output = { module.exports = { settings, themes, - env, + env: { + CDN_HOST: env.CDN_HOST, + NODE_ENV: env.NODE_ENV, + }, loadersDir, output, }; diff --git a/config/webpack/production.js b/config/webpack/production.js index e1c681232..a82330791 100644 --- a/config/webpack/production.js +++ b/config/webpack/production.js @@ -6,7 +6,7 @@ const CompressionPlugin = require('compression-webpack-plugin'); const sharedConfig = require('./shared.js'); const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; const OfflinePlugin = require('offline-plugin'); -const { publicPath } = require('./configuration.js'); +const { env, publicPath } = require('./configuration.js'); const path = require('path'); let compressionAlgorithm; @@ -90,7 +90,7 @@ module.exports = merge(sharedConfig, { '**/*.woff', ], ServiceWorker: { - entry: `imports-loader?process.env=>${encodeURIComponent(JSON.stringify(process.env))}!${encodeURI(path.join(__dirname, '../../app/javascript/mastodon/service_worker/entry.js'))}`, + entry: `imports-loader?process.env=>${encodeURIComponent(JSON.stringify(env))}!${encodeURI(path.join(__dirname, '../../app/javascript/mastodon/service_worker/entry.js'))}`, cacheName: 'mastodon', output: '../assets/sw.js', publicPath: '/sw.js', -- cgit