Commit 985e1458 authored by mgabdev's avatar mgabdev

Removed unused/old/pre-refactor settings

•Removed:
- unused/old/pre-refactor settings
parent 250e6a43
......@@ -43,14 +43,11 @@ class Settings::PreferencesController < Settings::BaseController
:setting_auto_play_gif,
:setting_display_media,
:setting_expand_spoilers,
:setting_reduce_motion,
:setting_system_font_ui,
:setting_noindex,
:setting_theme,
:setting_hide_network,
:setting_aggregate_reblogs,
:setting_show_application,
:setting_advanced_layout,
:setting_group_in_home_feed,
notification_emails: %i(follow follow_request reblog favourite mention digest report pending_account emails_from_gabcom),
interactions: %i(must_be_follower must_be_following)
......
......@@ -96,8 +96,6 @@ module ApplicationHelper
def body_classes
output = (@body_classes || '').split(' ')
output << "theme-#{current_theme.parameterize}"
output << 'system-font' if current_account&.user&.setting_system_font_ui
output << (current_account&.user&.setting_reduce_motion ? 'reduce-motion' : 'no-reduce-motion')
output << 'rtl' if locale_direction == 'rtl'
output.reject(&:blank?).join(' ')
end
......
import { reduceMotion } from '../../../initial_state';
import ReducedMotion from './reduced_motion';
import Motion from 'react-motion/lib/Motion';
export default reduceMotion ? ReducedMotion : Motion;
export default ReducedMotion
......@@ -5,7 +5,6 @@ const initialState = element && JSON.parse(element.textContent);
const getMeta = (prop) => initialState && initialState.meta && initialState.meta[prop];
export const reduceMotion = getMeta('reduce_motion');
export const autoPlayGif = getMeta('auto_play_gif');
export const displayMedia = getMeta('display_media');
export const expandSpoilers = getMeta('expand_spoilers');
......@@ -21,7 +20,6 @@ export const source_url = getMeta('source_url');
export const version = getMeta('version');
export const profile_directory = getMeta('profile_directory');
export const isStaff = getMeta('is_staff');
export const forceSingleColumn = !getMeta('advanced_layout');
export const promotions = initialState && initialState.promotions;
export const unreadCount = getMeta('unread_count');
export const lastReadNotificationId = getMeta('last_read_notification_id');
......
......@@ -26,14 +26,11 @@ class UserSettingsDecorator
user.settings['auto_play_gif'] = auto_play_gif_preference if change?('setting_auto_play_gif')
user.settings['display_media'] = display_media_preference if change?('setting_display_media')
user.settings['expand_spoilers'] = expand_spoilers_preference if change?('setting_expand_spoilers')
user.settings['reduce_motion'] = reduce_motion_preference if change?('setting_reduce_motion')
user.settings['system_font_ui'] = system_font_ui_preference if change?('setting_system_font_ui')
user.settings['noindex'] = noindex_preference if change?('setting_noindex')
user.settings['theme'] = theme_preference if change?('setting_theme')
user.settings['hide_network'] = hide_network_preference if change?('setting_hide_network')
user.settings['aggregate_reblogs'] = aggregate_reblogs_preference if change?('setting_aggregate_reblogs')
user.settings['show_application'] = show_application_preference if change?('setting_show_application')
user.settings['advanced_layout'] = advanced_layout_preference if change?('setting_advanced_layout')
user.settings['group_in_home_feed'] = group_in_home_feed_preference if change?('setting_group_in_home_feed')
end
......@@ -65,10 +62,6 @@ class UserSettingsDecorator
boolean_cast_setting 'setting_delete_modal'
end
def system_font_ui_preference
boolean_cast_setting 'setting_system_font_ui'
end
def auto_play_gif_preference
boolean_cast_setting 'setting_auto_play_gif'
end
......@@ -81,10 +74,6 @@ class UserSettingsDecorator
boolean_cast_setting 'setting_expand_spoilers'
end
def reduce_motion_preference
boolean_cast_setting 'setting_reduce_motion'
end
def noindex_preference
boolean_cast_setting 'setting_noindex'
end
......@@ -109,10 +98,6 @@ class UserSettingsDecorator
boolean_cast_setting 'setting_aggregate_reblogs'
end
def advanced_layout_preference
boolean_cast_setting 'setting_advanced_layout'
end
def group_in_home_feed_preference
boolean_cast_setting 'setting_group_in_home_feed'
end
......
......@@ -107,9 +107,9 @@ class User < ApplicationRecord
has_many :session_activations, dependent: :destroy
delegate :auto_play_gif, :default_sensitive, :unfollow_modal, :boost_modal, :delete_modal,
:reduce_motion, :system_font_ui, :noindex, :theme, :display_media, :hide_network,
:noindex, :theme, :display_media, :hide_network,
:expand_spoilers, :default_language, :aggregate_reblogs, :show_application,
:advanced_layout, :group_in_home_feed, to: :settings, prefix: :setting, allow_nil: false
:group_in_home_feed, to: :settings, prefix: :setting, allow_nil: false
attr_reader :invite_code
attr_writer :external
......
......@@ -32,8 +32,6 @@ class InitialStateSerializer < ActiveModel::Serializer
store[:auto_play_gif] = object.current_account.user.setting_auto_play_gif
store[:display_media] = object.current_account.user.setting_display_media
store[:expand_spoilers] = object.current_account.user.setting_expand_spoilers
store[:reduce_motion] = object.current_account.user.setting_reduce_motion
store[:advanced_layout] = object.current_account.user.setting_advanced_layout
store[:group_in_home_feed] = object.current_account.user.setting_group_in_home_feed
store[:is_staff] = object.current_account.user.staff?
store[:unread_count] = unread_count object.current_account
......
......@@ -44,9 +44,6 @@
.fields-group.fields-row__column.fields-row__column-6
= f.input :setting_display_media, collection: ['default', 'show_all', 'hide_all'], wrapper: :with_label, include_blank: false, label_method: lambda { |item| t("simple_form.hints.defaults.setting_display_media_#{item}") }, hint: false
.fields-group
= f.input :setting_advanced_layout, as: :boolean, wrapper: :with_label
.fields-group
= f.input :setting_unfollow_modal, as: :boolean, wrapper: :with_label
= f.input :setting_boost_modal, as: :boolean, wrapper: :with_label
......@@ -58,8 +55,6 @@
.fields-group
= f.input :setting_auto_play_gif, as: :boolean, wrapper: :with_label
= f.input :setting_expand_spoilers, as: :boolean, wrapper: :with_label
= f.input :setting_reduce_motion, as: :boolean, wrapper: :with_label
= f.input :setting_system_font_ui, as: :boolean, wrapper: :with_label
= f.input :setting_group_in_home_feed, as: :boolean, wrapper: :with_label
.actions
......
......@@ -9,7 +9,6 @@ SimpleNavigation::Configuration.run do |navigation|
end
n.item :preferences, safe_join([fa_icon('cog fw'), t('settings.preferences')]), settings_preferences_url, highlights_on: %r{/settings/preferences|/settings/notifications}
n.item :relationships, safe_join([fa_icon('users fw'), t('settings.relationships')]), relationships_url
n.item :filters, safe_join([fa_icon('filter fw'), t('filters.index.title')]), filters_path, highlights_on: %r{/filters}
n.item :security, safe_join([fa_icon('lock fw'), t('settings.account')]), edit_user_registration_url do |s|
......@@ -24,16 +23,10 @@ SimpleNavigation::Configuration.run do |navigation|
n.item :requests, safe_join([fa_icon('id-card-o fw'), t('verifications.requests.title')]), settings_verifications_requests_url
n.item :billing, safe_join([fa_icon('usd fw'), t('settings.billing')]), settings_billing_transactions_url do |s|
s.item :transactions, safe_join([fa_icon('bars fw'), t('settings.transactions')]), settings_billing_transactions_url
s.item :upgrade, safe_join([fa_icon('usd fw'), t('settings.upgrade')]), 'https://pro.gab.com'
end
n.item :data, safe_join([fa_icon('cloud-download fw'), t('settings.import_and_export')]), settings_export_url do |s|
s.item :export, safe_join([fa_icon('cloud-download fw'), t('settings.export')]), settings_export_url
end
n.item :invites, safe_join([fa_icon('user-plus fw'), t('invites.title')]), invites_path, if: proc { Setting.min_invite_role == 'user' }
n.item :development, safe_join([fa_icon('code fw'), t('settings.development')]), settings_applications_url
n.item :moderation, safe_join([fa_icon('gavel fw'), t('moderation.title')]), admin_reports_url, if: proc { current_user.staff? } do |s|
......
......@@ -141,9 +141,9 @@ Rails.application.routes.draw do
end
resources :emojis, only: [:show]
resources :invites, only: [:index, :create, :destroy]
# resources :invites, only: [:index, :create, :destroy]
resources :filters, except: [:show]
resource :relationships, only: [:show, :update]
# resource :relationships, only: [:show, :update]
get '/public', to: redirect('/home'), as: :public_timeline # homehack
get '/media_proxy/:id/(*any)', to: 'media_proxy#show', as: :media_proxy
......
......@@ -27,11 +27,9 @@ defaults: &defaults
preview_sensitive_media: false
reduce_motion: false
show_application: true
system_font_ui: false
noindex: false
theme: 'default'
aggregate_reblogs: true
advanced_layout: false
notification_emails:
follow: false
reblog: false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment