summaryrefslogtreecommitdiff
path: root/app/helpers/preferences_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/preferences_helper.rb')
-rw-r--r--app/helpers/preferences_helper.rb25
1 files changed, 2 insertions, 23 deletions
diff --git a/app/helpers/preferences_helper.rb b/app/helpers/preferences_helper.rb
index ea774e28ecf..b294ddc9d72 100644
--- a/app/helpers/preferences_helper.rb
+++ b/app/helpers/preferences_helper.rb
@@ -1,25 +1,5 @@
# Helper methods for per-User preferences
module PreferencesHelper
- COLOR_SCHEMES = {
- 1 => 'white',
- 2 => 'dark',
- 3 => 'solarized-light',
- 4 => 'solarized-dark',
- 5 => 'monokai',
- }
- COLOR_SCHEMES.default = 'white'
-
- # Helper method to access the COLOR_SCHEMES
- #
- # The keys are the `color_scheme_ids`
- # The values are the `name` of the scheme.
- #
- # The preview images are `name-scheme-preview.png`
- # The stylesheets should use the css class `.name`
- def color_schemes
- COLOR_SCHEMES.freeze
- end
-
# Maps `dashboard` values to more user-friendly option text
DASHBOARD_CHOICES = {
projects: 'Your Projects (default)',
@@ -50,12 +30,11 @@ module PreferencesHelper
end
def user_application_theme
- theme = Gitlab::Themes.by_id(current_user.try(:theme_id))
- theme.css_class
+ Gitlab::Themes.by_id(current_user.try(:theme_id)).css_class
end
def user_color_scheme_class
- COLOR_SCHEMES[current_user.try(:color_scheme_id)] if defined?(current_user)
+ Gitlab::ColorSchemes.by_id(current_user.try(:color_scheme_id)).css_class
end
def prefer_readme?