mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-03 20:07:47 +08:00
This commit removes the color palette dropdown from the theme page and replaces it with a new "Colors" tab where the theme's color palette can be edited directly in that tab on the theme page. With this change, a theme's color palette is strongly tied to its theme and can't be linked to other themes and it can't be selected by users without using the theme as well. All of the changes are behind a feature flag. To enable it, turn on the `use_overhauled_theme_color_palette` setting. Co-authored-by: Ella <ella.estigoy@gmail.com>
37 lines
637 B
Ruby
37 lines
637 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Components
|
|
class AdminChangesBanner < Base
|
|
def visible?
|
|
has_css?(selector)
|
|
end
|
|
|
|
def hidden?
|
|
has_no_css?(selector)
|
|
end
|
|
|
|
def element
|
|
find(selector)
|
|
end
|
|
|
|
def click_save
|
|
element.find(".btn-primary").click
|
|
end
|
|
|
|
def click_discard
|
|
element.find(".btn-secondary").click
|
|
end
|
|
|
|
def has_label?(label)
|
|
element.has_css?(".admin-changes-banner__main-label", text: label)
|
|
end
|
|
|
|
private
|
|
|
|
def selector
|
|
".admin-changes-banner"
|
|
end
|
|
end
|
|
end
|
|
end
|