discourse/app/assets/javascripts/wizard/components/image-preview-large-icon.js
Penar Musaraj a4356b99af
FEATURE: Separate base and heading font site_settings (#10807)
Allows site administrators to pick different fonts for headings in the wizard and in their site settings. Also correctly displays the header logos in wizard previews.
2020-10-05 13:40:41 -04:00

26 lines
562 B
JavaScript

import { observes } from "discourse-common/utils/decorators";
import { createPreviewComponent } from "wizard/lib/preview";
export default createPreviewComponent(325, 125, {
ios: null,
image: null,
@observes("field.value")
imageChanged() {
this.reload();
},
images() {
return {
ios: "/images/wizard/apple-mask.png",
image: this.get("field.value"),
};
},
paint(options) {
const { width, height } = options;
this.scaleImage(this.image, 10, 8, 87, 87);
this.scaleImage(this.ios, 0, 0, width, height);
},
});