mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 17:52:45 +08:00
DEV: Remove unused wizard code (#23664)
favicons were removed in #17477 theme-preview appears to once be a `.hbs` file shared by several components, which went away with the refactor in #20282. It must have accidentally came back with some rebase error, and then got picked up by the template-only component codemod. It's unused and does nothing anyway.
This commit is contained in:
parent
f576187d78
commit
6bcb9f444e
@ -1,34 +0,0 @@
|
||||
import { observes } from "discourse-common/utils/decorators";
|
||||
import WizardPreviewBaseComponent from "./wizard-preview-base";
|
||||
|
||||
export default WizardPreviewBaseComponent.extend({
|
||||
width: 371,
|
||||
height: 124,
|
||||
tab: null,
|
||||
image: null,
|
||||
|
||||
@observes("field.value")
|
||||
imageChanged() {
|
||||
this.reload();
|
||||
},
|
||||
|
||||
images() {
|
||||
return { tab: "/images/wizard/tab.png", image: this.get("field.value") };
|
||||
},
|
||||
|
||||
paint(options) {
|
||||
const { ctx, width, height } = options;
|
||||
this.scaleImage(this.tab, 0, 0, width, height);
|
||||
this.scaleImage(this.image, 40, 25, 30, 30);
|
||||
|
||||
ctx.font = `20px 'Arial'`;
|
||||
ctx.fillStyle = "#000";
|
||||
|
||||
let title = this.wizard.getTitle();
|
||||
if (title.length > 20) {
|
||||
title = title.substring(0, 20) + "...";
|
||||
}
|
||||
|
||||
ctx.fillText(title, 80, 48);
|
||||
},
|
||||
});
|
@ -1,27 +0,0 @@
|
||||
import { observes } from "discourse-common/utils/decorators";
|
||||
import WizardPreviewBaseComponent from "./wizard-preview-base";
|
||||
|
||||
export default WizardPreviewBaseComponent.extend({
|
||||
width: 325,
|
||||
height: 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);
|
||||
},
|
||||
});
|
@ -1,3 +0,0 @@
|
||||
import Component from "@ember/component";
|
||||
|
||||
export default Component.extend({});
|
Loading…
x
Reference in New Issue
Block a user