From 2354b10eb5e9c7382726bc5e6e041ea30a903c90 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 16 Jul 2018 01:11:53 +0200 Subject: Add admin dashboard (#8029) --- config/locales/en.yml | 20 ++++++++++++++++++++ config/navigation.rb | 3 ++- config/routes.rb | 10 +++------- 3 files changed, 25 insertions(+), 8 deletions(-) (limited to 'config') diff --git a/config/locales/en.yml b/config/locales/en.yml index ec08f0d78..e0a2c9f82 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -206,6 +206,26 @@ en: update_failed_msg: Could not update that emoji updated_msg: Emoji successfully updated! upload: Upload + dashboard: + backlog: backlogged jobs + config: Configuration + feature_deletions: Account deletions + feature_invites: Invite links + feature_registrations: Registrations + feature_relay: Federation relay + features: Features + hidden_service: Federation with hidden services + open_reports: open reports + recent_users: Recent users + search: Full-text search + single_user_mode: Single user mode + software: Software + space: Space usage + title: Dashboard + total_users: users in total + week_interactions: interactions this week + week_users_active: active this week + week_users_new: users this week domain_blocks: add_new: Add new created_msg: Domain block is now being processed diff --git a/config/navigation.rb b/config/navigation.rb index a13ad6f43..99d227f11 100644 --- a/config/navigation.rb +++ b/config/navigation.rb @@ -33,7 +33,8 @@ SimpleNavigation::Configuration.run do |navigation| admin.item :email_domain_blocks, safe_join([fa_icon('envelope fw'), t('admin.email_domain_blocks.title')]), admin_email_domain_blocks_url, highlights_on: %r{/admin/email_domain_blocks}, if: -> { current_user.admin? } end - primary.item :admin, safe_join([fa_icon('cogs fw'), t('admin.title')]), proc { current_user.admin? ? edit_admin_settings_url : admin_custom_emojis_url }, if: proc { current_user.staff? } do |admin| + primary.item :admin, safe_join([fa_icon('cogs fw'), t('admin.title')]), admin_dashboard_url, if: proc { current_user.staff? } do |admin| + admin.item :dashboard, safe_join([fa_icon('tachometer fw'), t('admin.dashboard.title')]), admin_dashboard_url admin.item :settings, safe_join([fa_icon('cogs fw'), t('admin.settings.title')]), edit_admin_settings_url, if: -> { current_user.admin? } admin.item :custom_emojis, safe_join([fa_icon('smile-o fw'), t('admin.custom_emojis.title')]), admin_custom_emojis_url, highlights_on: %r{/admin/custom_emojis} admin.item :relays, safe_join([fa_icon('exchange fw'), t('admin.relays.title')]), admin_relays_url, if: -> { current_user.admin? }, highlights_on: %r{/admin/relays} diff --git a/config/routes.rb b/config/routes.rb index 3d0da1a85..1c97f5a82 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -124,6 +124,8 @@ Rails.application.routes.draw do resource :share, only: [:show, :create] namespace :admin do + get '/dashboard', to: 'dashboard#index' + resources :subscriptions, only: [:index] resources :domain_blocks, only: [:index, :new, :create, :show, :destroy] resources :email_domain_blocks, only: [:index, :new, :create, :destroy] @@ -196,13 +198,7 @@ Rails.application.routes.draw do resources :account_moderation_notes, only: [:create, :destroy] end - authenticate :user, lambda { |u| u.admin? } do - get '/admin', to: redirect('/admin/settings/edit', status: 302) - end - - authenticate :user, lambda { |u| u.moderator? } do - get '/admin', to: redirect('/admin/reports', status: 302) - end + get '/admin', to: redirect('/admin/dashboard', status: 302) namespace :api do # PubSubHubbub outgoing subscriptions -- cgit From daacf15d72e284eef9172a15bd2629a5b6514f32 Mon Sep 17 00:00:00 2001 From: Marcin Mikołajczak Date: Mon, 16 Jul 2018 12:23:27 +0200 Subject: i18n: Update Polish translation (#8032) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcin Mikołajczak --- app/javascript/mastodon/locales/pl.json | 2 +- config/locales/pl.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/app/javascript/mastodon/locales/pl.json b/app/javascript/mastodon/locales/pl.json index 4f1290121..bcb015968 100644 --- a/app/javascript/mastodon/locales/pl.json +++ b/app/javascript/mastodon/locales/pl.json @@ -166,7 +166,7 @@ "navigation_bar.domain_blocks": "Ukryte domeny", "navigation_bar.edit_profile": "Edytuj profil", "navigation_bar.favourites": "Ulubione", - "navigation_bar.filters": "Muted words", + "navigation_bar.filters": "Wyciszone słowa", "navigation_bar.follow_requests": "Prośby o śledzenie", "navigation_bar.info": "Szczegółowe informacje", "navigation_bar.keyboard_shortcuts": "Skróty klawiszowe", diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 061c07b64..62e2b59ae 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -206,6 +206,26 @@ pl: update_failed_msg: Nie udało się zaktualizować emoji updated_msg: Pomyślnie zaktualizowano emoji! upload: Dodaj + dashboard: + backlog: zaległe zadania + config: Konfiguracja + feature_deletions: Usuwanie kont + feature_invites: Zaproszenia + feature_registrations: Rejestracja + feature_relay: Przekazywanie federacji + features: Możliwości + hidden_service: Federowanie z ukrytymi usługami + open_reports: otwarte zgłoszenia + recent_users: Ostatni użytkownicy + search: Wyszukiwanie pełnego tekstu + single_user_mode: Tryb jednego użytkownika + software: Oprogramowanie + space: Używana powierzchnia + title: Panel administracyjny + total_users: łącznie użytkowników + week_interactions: interakcje w tym tygodniu + week_users_active: aktywni w tym tygodniu + week_users_new: rejestracje w tym tygodniu domain_blocks: add_new: Dodaj nową created_msg: Blokada domen jest przetwarzana @@ -262,6 +282,14 @@ pl: expired: Wygasłe title: Filtruj title: Zaproszenia + relays: + add_new: Dodaj nowy + description_html: "Przekaźnik federacji jest pośredniczącym serwerem wymieniającym duże ilości publicznych wpisów pomiędzy serwerami które subskrybują je i publikują na nich. Pomaga to małym i średnim instancją poznawać nową zawartość z Fediwersum, co w innym przypadku wymagałoby od użytkowników ręcznego śledzenia osób z innych serwerów." + enable_hint: Jeżeli włączone, Twój serwer zasubskrybuje wszystkie publiczne wpisy z tego przekaźnika i zacznie wysyłać tam publiczne wpisy z tego serwera. + inbox_url: Adres przekaźnika + setup: Skonfiguruj połączenie z przekaźnikiem + status: Stan + title: Przekaźniki report_notes: created_msg: Pomyslnie utworzono notatkę moderacyjną. destroyed_msg: Pomyślnie usunięto notatkę moderacyjną. -- cgit From 2bcdfcdee3551a81a5e23b30d3f5bc54c2dcf39e Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 17 Jul 2018 00:15:17 +0200 Subject: Add missing translation for admin dashboard trends section (#8040) --- 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 e0a2c9f82..f89f89959 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -223,6 +223,7 @@ en: space: Space usage title: Dashboard total_users: users in total + trends: Trends week_interactions: interactions this week week_users_active: active this week week_users_new: users this week -- cgit From 3c3cf7e208576266436b311945e57e8d64faee39 Mon Sep 17 00:00:00 2001 From: abcang Date: Tue, 17 Jul 2018 22:29:33 +0900 Subject: Update supported Node.js version (#8041) --- config/webpack/production.js | 2 +- package.json | 5 ++--- yarn.lock | 20 +------------------- 3 files changed, 4 insertions(+), 23 deletions(-) (limited to 'config') diff --git a/config/webpack/production.js b/config/webpack/production.js index 58c7fa69a..4966807a1 100644 --- a/config/webpack/production.js +++ b/config/webpack/production.js @@ -8,7 +8,7 @@ const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPl const OfflinePlugin = require('offline-plugin'); const { publicPath } = require('./configuration.js'); const path = require('path'); -const { URL } = require('whatwg-url'); +const { URL } = require('url'); let compressionAlgorithm; try { diff --git a/package.json b/package.json index fdd8c3642..b0cdf562d 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "mastodon", "license": "AGPL-3.0-or-later", "engines": { - "node": ">=6" + "node": ">=8" }, "scripts": { "postversion": "git push --tags", @@ -122,8 +122,7 @@ "webpack-cli": "^3.0.8", "webpack-manifest-plugin": "^2.0.3", "webpack-merge": "^4.1.3", - "websocket.js": "^0.1.12", - "whatwg-url": "^6.4.1" + "websocket.js": "^0.1.12" }, "devDependencies": { "babel-eslint": "^8.2.6", diff --git a/yarn.lock b/yarn.lock index 423623300..2c257ff0a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4858,10 +4858,6 @@ lodash.mergewith@^4.6.0: version "4.6.1" resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz#639057e726c3afbdb3e7d42741caa8d6e4335927" -lodash.sortby@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" - lodash.tail@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.tail/-/lodash.tail-4.1.1.tgz#d2333a36d9e7717c8ad2f7cacafec7c32b444664" @@ -8173,12 +8169,6 @@ tough-cookie@~2.3.0, tough-cookie@~2.3.3: dependencies: punycode "^1.4.1" -tr46@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" - dependencies: - punycode "^2.1.0" - tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" @@ -8469,7 +8459,7 @@ webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" -webidl-conversions@^4.0.0, webidl-conversions@^4.0.2: +webidl-conversions@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" @@ -8645,14 +8635,6 @@ whatwg-url@^4.3.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" -whatwg-url@^6.4.1: - version "6.5.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8" - dependencies: - lodash.sortby "^4.7.0" - tr46 "^1.0.1" - webidl-conversions "^4.0.2" - whet.extend@~0.9.9: version "0.9.9" resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" -- cgit