diff --git a/app/assets/javascripts/wizard/components/image-preview-apple-touch-icon-url.js.es6 b/app/assets/javascripts/wizard/components/image-preview-apple-touch-icon-url.js.es6 new file mode 100644 index 00000000000..b3ea4c14dbe --- /dev/null +++ b/app/assets/javascripts/wizard/components/image-preview-apple-touch-icon-url.js.es6 @@ -0,0 +1,35 @@ +import { observes } from 'ember-addons/ember-computed-decorators'; + +import { + createPreviewComponent, + loadImage, +} from 'wizard/lib/preview'; + +export default createPreviewComponent(325, 125, { + ios: null, + image: null, + + @observes('field.value') + imageChanged() { + this.reload(); + }, + + load() { + return Ember.RSVP.Promise.all([ + loadImage('/images/wizard/apple-mask.png'), + loadImage(this.get('field.value')) + ]).then(result => { + this.ios = result[0]; + this.image = result[1]; + }); + + return loadImage(this.get('field.value')).then(image => { + this.image = image; + }); + }, + + paint(ctx, colors, width, height) { + ctx.drawImage(this.image, 10, 8, 87, 87); + ctx.drawImage(this.ios, 0, 0, width, height); + } +}); diff --git a/app/assets/javascripts/wizard/components/image-preview-favicon-url.js.es6 b/app/assets/javascripts/wizard/components/image-preview-favicon-url.js.es6 index 7ef78e046d4..2beeb0637f1 100644 --- a/app/assets/javascripts/wizard/components/image-preview-favicon-url.js.es6 +++ b/app/assets/javascripts/wizard/components/image-preview-favicon-url.js.es6 @@ -16,8 +16,8 @@ export default createPreviewComponent(371, 124, { load() { return Ember.RSVP.Promise.all([ - loadImage('/images/wizard/tab.png'), - loadImage(this.get('field.value')) + loadImage('/images/wizard/tab.png'), + loadImage(this.get('field.value')) ]).then(result => { this.tab = result[0]; this.image = result[1]; diff --git a/public/images/wizard/apple-mask.png b/public/images/wizard/apple-mask.png new file mode 100644 index 00000000000..a3ac21f402c Binary files /dev/null and b/public/images/wizard/apple-mask.png differ