FEATURE: direct link to components for admin sidebar (#26644)

To add a components link to the sidebar refactoring was required to create unique URLs for themes and components. Before the query param was used. After changes, we have two URLs `/admin/customize/themes` and `/admin/customize/components`.
This commit is contained in:
Krzysztof Kotlarek
2024-04-17 11:45:59 +10:00
committed by GitHub
parent 56c4804440
commit df373d90fe
12 changed files with 79 additions and 117 deletions

View File

@ -221,6 +221,7 @@ Discourse::Application.routes.draw do
get "customize" => "color_schemes#index", :constraints => AdminConstraint.new
get "customize/themes" => "themes#index", :constraints => AdminConstraint.new
get "customize/components" => "themes#index", :constraints => AdminConstraint.new
get "customize/theme-components" => "themes#index", :constraints => AdminConstraint.new
get "customize/colors" => "color_schemes#index", :constraints => AdminConstraint.new
get "customize/colors/:id" => "color_schemes#index", :constraints => AdminConstraint.new
@ -257,6 +258,7 @@ Discourse::Application.routes.draw do
get "themes/:id/:target/:field_name/edit" => "themes#index"
get "themes/:id" => "themes#index"
get "components/:id" => "themes#index"
get "themes/:id/export" => "themes#export"
get "themes/:id/schema/:setting_name" => "themes#schema"