mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Add Styling step to wizard (#14132)
Refactors three wizard steps (colors, fonts, homepage style) into one new step called Styling.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row";
|
||||
import { computed } from "@ember/object";
|
||||
import { escapeExpression } from "discourse/lib/utilities";
|
||||
import layout from "select-kit/templates/components/color-palettes/color-palettes-row";
|
||||
|
||||
export default SelectKitRowComponent.extend({
|
||||
@@ -10,7 +9,7 @@ export default SelectKitRowComponent.extend({
|
||||
palettes: computed("item.colors.[]", function () {
|
||||
return (this.item.colors || [])
|
||||
.filter((color) => color.name !== "secondary")
|
||||
.map((color) => `#${escapeExpression(color.hex)}`)
|
||||
.map((color) => `#${escape(color.hex)}`)
|
||||
.map(
|
||||
(hex) => `<span class="palette" style="background-color:${hex}"></span>`
|
||||
)
|
||||
@@ -22,7 +21,7 @@ export default SelectKitRowComponent.extend({
|
||||
const secondary = (this.item.colors || []).findBy("name", "secondary");
|
||||
|
||||
if (secondary && secondary.hex) {
|
||||
return `background-color:#${escapeExpression(secondary.hex)}`.htmlSafe();
|
||||
return `background-color:#${escape(secondary.hex)}`.htmlSafe();
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user