mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 03:58:06 +08:00

New configure fonts section was added. Because now we have two sections completed (logos and fonts), new /branding page was introduced and old /logo and /font pages was removed. When text size is changed, modal is displayed to ask if preferences of existing users should be retrospectively updated. https://github.com/user-attachments/assets/f6b0c92a-117f-4064-bd76-30fa05acc6d3 --------- Co-authored-by: Ella <ella.estigoy@gmail.com> Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
16 lines
320 B
Ruby
16 lines
320 B
Ruby
# frozen_string_literal: true
|
|
|
|
require "enum_site_setting"
|
|
|
|
class DefaultTextSizeSetting < EnumSiteSetting
|
|
DEFAULT_TEXT_SIZES = UserOption.text_sizes.keys.map(&:to_s)
|
|
|
|
def self.valid_value?(val)
|
|
values.any? { |v| v[:value].to_s == val.to_s }
|
|
end
|
|
|
|
def self.values
|
|
@values ||= DEFAULT_TEXT_SIZES
|
|
end
|
|
end
|