mirror of
https://github.com/discourse/discourse.git
synced 2025-10-03 17:21:20 +08:00
FEATURE: Enable system Horizon (#33374)
Enable Horizon theme for everyone.
This commit is contained in:
parent
5ddc23b030
commit
912c4f855a
4 changed files with 13 additions and 1 deletions
|
@ -4045,7 +4045,7 @@ experimental:
|
|||
default: false
|
||||
experimental_system_themes:
|
||||
type: list
|
||||
default: ""
|
||||
default: "horizon"
|
||||
hidden: true
|
||||
allow_any: false
|
||||
choices:
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
# frozen_string_literal: true
|
||||
class EnableHorizonForExistingSites < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
execute <<~SQL if Migration::Helpers.existing_site?
|
||||
INSERT INTO site_settings(name, data_type, value, created_at, updated_at)
|
||||
VALUES('experimental_system_themes', 8, 'horizon', NOW(), NOW())
|
||||
ON CONFLICT (name) DO NOTHING
|
||||
SQL
|
||||
end
|
||||
end
|
|
@ -33,6 +33,7 @@ RSpec.describe Admin::ColorSchemesController do
|
|||
end
|
||||
|
||||
it "filters colors belonging to experimental system themes" do
|
||||
SiteSetting.experimental_system_themes = ""
|
||||
get "/admin/color_schemes.json"
|
||||
expect(response.status).to eq(200)
|
||||
scheme_names = response.parsed_body.map { |scheme| scheme["name"] }
|
||||
|
|
|
@ -478,6 +478,7 @@ RSpec.describe Admin::ThemesController do
|
|||
end
|
||||
|
||||
it "filters experimental system themes" do
|
||||
SiteSetting.experimental_system_themes = ""
|
||||
get "/admin/themes.json"
|
||||
expect(response.status).to eq(200)
|
||||
theme_names = response.parsed_body["themes"].map { |theme| theme[:name] }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue