Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

fix adding dark mode to select options

Behrokh Satarnejadce57c66358fb
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index a0ae456cd6e..661e0403c51 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -278,11 +278,12 @@ module ApplicationHelper
end
def theme_options_for_select
- [
+ options = [
[t("themes.light"), "light"],
- [t("themes.light_high_contrast"), "light_high_contrast"],
- ([t("themes.dark"), "dark"] if OpenProject::FeatureDecisions.dark_mode_active?)
+ [t("themes.light_high_contrast"), "light_high_contrast"]
]
+ options.push([t("themes.dark"), "dark"]) if OpenProject::FeatureDecisions.dark_mode_active?
+ options
end
def user_theme_data_attributes