FIX: Restore automatic style preview in wizard (#17015)

Updating the homepage/style preview regressed in #16994.
This commit is contained in:
Jarek Radosz 2022-06-06 21:01:34 +02:00 committed by GitHub
parent 5109ea0cf1
commit 54e42b124a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,7 @@ import { Promise } from "rsvp";
import getUrl from "discourse-common/lib/get-url";
import { htmlSafe } from "@ember/template";
import { scheduleOnce } from "@ember/runloop";
import { observes } from "discourse-common/utils/decorators";
export const LOREM = `
Lorem ipsum dolor sit amet,
@ -54,6 +55,13 @@ export function createPreviewComponent(width, height, obj) {
this.reload();
},
@observes(
"step.fieldsById.{color_scheme,body_font,heading_font,homepage_style}.value"
)
themeChanged() {
this.triggerRepaint();
},
images() {},
loadFonts() {