2019-11-08 05:38:28 +08:00
|
|
|
import { observes } from "discourse-common/utils/decorators";
|
2023-02-14 22:20:15 +08:00
|
|
|
import WizardPreviewBaseComponent from "./wizard-preview-base";
|
2016-09-20 02:24:37 +08:00
|
|
|
|
2023-02-14 22:20:15 +08:00
|
|
|
export default WizardPreviewBaseComponent.extend({
|
|
|
|
width: 325,
|
|
|
|
height: 125,
|
2016-09-20 02:24:37 +08:00
|
|
|
ios: null,
|
|
|
|
image: null,
|
|
|
|
|
|
|
|
@observes("field.value")
|
|
|
|
imageChanged() {
|
|
|
|
this.reload();
|
|
|
|
},
|
|
|
|
|
2016-09-22 04:09:18 +08:00
|
|
|
images() {
|
|
|
|
return {
|
|
|
|
ios: "/images/wizard/apple-mask.png",
|
|
|
|
image: this.get("field.value"),
|
|
|
|
};
|
2016-09-20 02:24:37 +08:00
|
|
|
},
|
|
|
|
|
2020-10-06 01:40:41 +08:00
|
|
|
paint(options) {
|
|
|
|
const { width, height } = options;
|
2016-09-22 04:48:48 +08:00
|
|
|
this.scaleImage(this.image, 10, 8, 87, 87);
|
|
|
|
this.scaleImage(this.ios, 0, 0, width, height);
|
2016-09-20 02:24:37 +08:00
|
|
|
},
|
|
|
|
});
|