Add admin dashboard (#8029)
This commit is contained in:
@ -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
|
||||
|
@ -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}
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user