Removed all occurances of "theme" from backend, settings

• Removed:
- all occurances of "theme" from backend, settings

Theme is set in WebSettings through client. And set in <Display />.
This commit is contained in:
mgabdev 2021-01-15 14:35:50 -05:00
parent 75dbf58311
commit 7bc93ff98f
8 changed files with 12 additions and 27 deletions

View File

@ -44,7 +44,6 @@ class Settings::PreferencesController < Settings::BaseController
:setting_display_media, :setting_display_media,
:setting_expand_spoilers, :setting_expand_spoilers,
:setting_noindex, :setting_noindex,
:setting_theme,
:setting_hide_network, :setting_hide_network,
:setting_aggregate_reblogs, :setting_aggregate_reblogs,
:setting_group_in_home_feed, :setting_group_in_home_feed,

View File

@ -100,11 +100,6 @@ module ApplicationHelper
text.split("\n").map { |line| '> ' + line }.join("\n") text.split("\n").map { |line| '> ' + line }.join("\n")
end end
def theme
# : todo : remove
return 'white'
end
def open_registrations? def open_registrations?
Setting.registrations_mode == 'open' Setting.registrations_mode == 'open'
end end

View File

@ -2,9 +2,7 @@
module Settings module Settings
class ScopedSettings class ScopedSettings
DEFAULTING_TO_UNSCOPED = %w( DEFAULTING_TO_UNSCOPED = %w().freeze
theme
).freeze
def initialize(object) def initialize(object)
@object = object @object = object

View File

@ -27,7 +27,6 @@ class UserSettingsDecorator
user.settings['display_media'] = display_media_preference if change?('setting_display_media') 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['expand_spoilers'] = expand_spoilers_preference if change?('setting_expand_spoilers')
user.settings['noindex'] = noindex_preference if change?('setting_noindex') 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['hide_network'] = hide_network_preference if change?('setting_hide_network')
user.settings['aggregate_reblogs'] = aggregate_reblogs_preference if change?('setting_aggregate_reblogs') user.settings['aggregate_reblogs'] = aggregate_reblogs_preference if change?('setting_aggregate_reblogs')
user.settings['group_in_home_feed'] = group_in_home_feed_preference if change?('setting_group_in_home_feed') user.settings['group_in_home_feed'] = group_in_home_feed_preference if change?('setting_group_in_home_feed')
@ -81,10 +80,6 @@ class UserSettingsDecorator
boolean_cast_setting 'setting_hide_network' boolean_cast_setting 'setting_hide_network'
end end
def theme_preference
settings['setting_theme']
end
def default_language_preference def default_language_preference
settings['setting_default_language'] settings['setting_default_language']
end end

View File

@ -11,7 +11,6 @@ class Form::AdminSettings
site_description site_description
registrations_mode registrations_mode
bootstrap_timeline_accounts bootstrap_timeline_accounts
theme
min_invite_role min_invite_role
preview_sensitive_media preview_sensitive_media
thumbnail thumbnail

View File

@ -102,7 +102,7 @@ class User < ApplicationRecord
has_many :session_activations, dependent: :destroy has_many :session_activations, dependent: :destroy
delegate :auto_play_gif, :default_sensitive, :unfollow_modal, :boost_modal, :delete_modal, delegate :auto_play_gif, :default_sensitive, :unfollow_modal, :boost_modal, :delete_modal,
:noindex, :theme, :display_media, :hide_network, :noindex, :display_media, :hide_network,
:expand_spoilers, :default_language, :aggregate_reblogs, :expand_spoilers, :default_language, :aggregate_reblogs,
:group_in_home_feed, to: :settings, prefix: :setting, allow_nil: false :group_in_home_feed, to: :settings, prefix: :setting, allow_nil: false

View File

@ -15,16 +15,16 @@
%link{ rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' }/ %link{ rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' }/
%link{ rel: 'mask-icon', href: '/mask-icon.svg', color: '#2B90D9' }/ %link{ rel: 'mask-icon', href: '/mask-icon.svg', color: '#2B90D9' }/
%link{ href: "splash/#{theme}/iphone5_splash.png", media: '(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/ %link{ href: "splash/light/iphone5_splash.png", media: '(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/
%link{ href: "splash/#{theme}/iphone6_splash.png", media: '(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/ %link{ href: "splash/light/iphone6_splash.png", media: '(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/
%link{ href: "splash/#{theme}/iphoneplus_splash.png", media: '(device-width: 621px) and (device-height: 1104px) and (-webkit-device-pixel-ratio: 3)', rel: 'apple-touch-startup-image' }/ %link{ href: "splash/light/iphoneplus_splash.png", media: '(device-width: 621px) and (device-height: 1104px) and (-webkit-device-pixel-ratio: 3)', rel: 'apple-touch-startup-image' }/
%link{ href: "splash/#{theme}/iphonex_splash.png", media: '(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3)', rel: 'apple-touch-startup-image' }/ %link{ href: "splash/light/iphonex_splash.png", media: '(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3)', rel: 'apple-touch-startup-image' }/
%link{ href: "splash/#{theme}/iphonexr_splash.png", media: '(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/ %link{ href: "splash/light/iphonexr_splash.png", media: '(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/
%link{ href: "splash/#{theme}/iphonexsmax_splash.png", media: '(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3)', rel: 'apple-touch-startup-image' }/ %link{ href: "splash/light/iphonexsmax_splash.png", media: '(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3)', rel: 'apple-touch-startup-image' }/
%link{ href: "splash/#{theme}/ipad_splash.png", media: '(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/ %link{ href: "splash/light/ipad_splash.png", media: '(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/
%link{ href: "splash/#{theme}/ipadpro1_splash.png", media: '(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/ %link{ href: "splash/light/ipadpro1_splash.png", media: '(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/
%link{ href: "splash/#{theme}/ipadpro3_splash.png", media: '(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/ %link{ href: "splash/light/ipadpro3_splash.png", media: '(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/
%link{ href: "splash/#{theme}/ipadpro2_splash.png", media: '(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/ %link{ href: "splash/light/ipadpro2_splash.png", media: '(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/
%link{ rel: 'manifest', href: '/manifest.json' }/ %link{ rel: 'manifest', href: '/manifest.json' }/
%meta{ name: 'msapplication-config', content: '/browserconfig.xml' }/ %meta{ name: 'msapplication-config', content: '/browserconfig.xml' }/

View File

@ -20,7 +20,6 @@ defaults: &defaults
preview_sensitive_media: false preview_sensitive_media: false
group_in_home_feed: true group_in_home_feed: true
noindex: false noindex: false
theme: 'default'
aggregate_reblogs: true aggregate_reblogs: true
chat_messages: chat_messages:
restrict_non_followers: true restrict_non_followers: true