Skip to content

A platform for community discussion. Free, open, simple.

DEV: Remove unused wizard code (#23664)

Godfrey Chan6bcb9f444e45
diff --git a/app/assets/javascripts/wizard/addon/components/image-preview-favicon.js b/app/assets/javascripts/wizard/addon/components/image-preview-favicon.js
deleted file mode 100644
index bfb6ec4bf46..00000000000
--- a/app/assets/javascripts/wizard/addon/components/image-preview-favicon.js
+++ /dev/null
@@ -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);
- },
-});
diff --git a/app/assets/javascripts/wizard/addon/components/image-preview-large-icon.js b/app/assets/javascripts/wizard/addon/components/image-preview-large-icon.js
deleted file mode 100644
index dad7e02fc43..00000000000
--- a/app/assets/javascripts/wizard/addon/components/image-preview-large-icon.js
+++ /dev/null
@@ -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);
- },
-});
diff --git a/app/assets/javascripts/wizard/addon/components/theme-preview.js b/app/assets/javascripts/wizard/addon/components/theme-preview.js
deleted file mode 100644
index 87d5ddb040f..00000000000
--- a/app/assets/javascripts/wizard/addon/components/theme-preview.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import Component from "@ember/component";
-
-export default Component.extend({});