mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 18:30:36 +08:00
FEATURE: rebranded admin logos settings (#31554)
Redesigned page to update site logos. `AdminBrandingLogoFormComponent` is attached to the old logos page and the new branding page. In the next steps, branding will replace the logos page. A new `AdminConfigAreaCardSection` component was added hidden and less frequently used settings. An image placeholder was also needed because many additional logos have a fallback to the site logo. Finally, `twitter_summary_large_image` was renamed to `x_summary_large_image`. Desktop  Mobile 
This commit is contained in:

committed by
GitHub

parent
76e58a55ed
commit
dbba838ef4
@ -0,0 +1,34 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class XSummaryLargeImageBasedOnDeprecatedSetting < ActiveRecord::Migration[7.2]
|
||||
def up
|
||||
old_setting =
|
||||
DB.query_single(
|
||||
"SELECT value FROM site_settings WHERE name = 'twitter_summary_large_image' LIMIT 1",
|
||||
).first
|
||||
|
||||
if old_setting.present?
|
||||
DB.exec(
|
||||
"INSERT INTO site_settings(name, value, data_type, created_at, updated_at)
|
||||
VALUES('x_summary_large_image', :setting, '18', NOW(), NOW())",
|
||||
setting: old_setting,
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
old_setting =
|
||||
DB.query_single(
|
||||
"SELECT value FROM site_settings WHERE name = 'x_summary_large_image' LIMIT 1",
|
||||
).first
|
||||
|
||||
if old_setting.present?
|
||||
DB.exec(
|
||||
"INSERT INTO site_settings(name, value, data_type, created_at, updated_at)
|
||||
VALUES('twitter_summary_large_image', :setting, '18', NOW(), NOW())
|
||||
ON CONFLICT DO UPDATE",
|
||||
setting: old_setting,
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user