diff --git a/app/assets/javascripts/discourse/app/components/input-tip.gjs b/app/assets/javascripts/discourse/app/components/input-tip.gjs new file mode 100644 index 00000000000..b663ce0f02d --- /dev/null +++ b/app/assets/javascripts/discourse/app/components/input-tip.gjs @@ -0,0 +1,16 @@ +import icon from "discourse-common/helpers/d-icon"; + +const InputTip = ; + +export default InputTip; diff --git a/app/assets/javascripts/discourse/app/components/input-tip.hbs b/app/assets/javascripts/discourse/app/components/input-tip.hbs deleted file mode 100644 index af02c408564..00000000000 --- a/app/assets/javascripts/discourse/app/components/input-tip.hbs +++ /dev/null @@ -1,4 +0,0 @@ -{{#if this.tipReason}} - {{this.tipIcon}} - {{this.tipReason}} -{{/if}} \ No newline at end of file diff --git a/app/assets/javascripts/discourse/app/components/input-tip.js b/app/assets/javascripts/discourse/app/components/input-tip.js deleted file mode 100644 index 406fff61ffb..00000000000 --- a/app/assets/javascripts/discourse/app/components/input-tip.js +++ /dev/null @@ -1,30 +0,0 @@ -import Component from "@ember/component"; -import { alias, not } from "@ember/object/computed"; -import { htmlSafe } from "@ember/template"; -import { iconHTML } from "discourse-common/lib/icon-library"; - -export default Component.extend({ - classNameBindings: [":tip", "good", "bad"], - tipIcon: null, - tipReason: null, - - bad: alias("validation.failed"), - good: not("bad"), - - tipIconHTML() { - let icon = iconHTML(this.good ? "check" : "times"); - return htmlSafe(`${icon}`); - }, - - didReceiveAttrs() { - this._super(...arguments); - let reason = this.get("validation.reason"); - if (reason) { - this.set("tipIcon", this.tipIconHTML()); - this.set("tipReason", reason); - } else { - this.set("tipIcon", null); - this.set("tipReason", null); - } - }, -}); diff --git a/app/assets/javascripts/discourse/app/components/modal/create-account.hbs b/app/assets/javascripts/discourse/app/components/modal/create-account.hbs index f99c90b10e4..e7fe6850b05 100644 --- a/app/assets/javascripts/discourse/app/components/modal/create-account.hbs +++ b/app/assets/javascripts/discourse/app/components/modal/create-account.hbs @@ -58,7 +58,7 @@ {{i18n "user.email.instructions"}} @@ -84,7 +84,7 @@ {{i18n "user.username.instructions"}} @@ -112,7 +112,7 @@ {{this.nameInstructions}} {{/if}} @@ -152,7 +152,7 @@