From f75c253b9596738f6f2f31facf29eb71e078fb47 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Sat, 27 Apr 2024 14:26:29 +0200 Subject: [PATCH] DEV: Inline cancel-link code (#26778) No need for this small component (and its unused and empty admin component twin) --- .../javascripts/admin/addon/components/cancel-link.js | 5 ----- .../javascripts/discourse/app/components/cancel-link.hbs | 3 --- .../javascripts/discourse/app/components/cancel-link.js | 3 --- .../discourse/app/templates/preferences-email.hbs | 9 ++++++--- .../app/templates/preferences-second-factor.hbs | 9 ++++++--- 5 files changed, 12 insertions(+), 17 deletions(-) delete mode 100644 app/assets/javascripts/admin/addon/components/cancel-link.js delete mode 100644 app/assets/javascripts/discourse/app/components/cancel-link.hbs delete mode 100644 app/assets/javascripts/discourse/app/components/cancel-link.js diff --git a/app/assets/javascripts/admin/addon/components/cancel-link.js b/app/assets/javascripts/admin/addon/components/cancel-link.js deleted file mode 100644 index c023fb8cf97..00000000000 --- a/app/assets/javascripts/admin/addon/components/cancel-link.js +++ /dev/null @@ -1,5 +0,0 @@ -import Component from "@ember/component"; -import { tagName } from "@ember-decorators/component"; - -@tagName("") -export default class CancelLink extends Component {} diff --git a/app/assets/javascripts/discourse/app/components/cancel-link.hbs b/app/assets/javascripts/discourse/app/components/cancel-link.hbs deleted file mode 100644 index 5f19f44a601..00000000000 --- a/app/assets/javascripts/discourse/app/components/cancel-link.hbs +++ /dev/null @@ -1,3 +0,0 @@ - - {{i18n "cancel"}} - \ No newline at end of file diff --git a/app/assets/javascripts/discourse/app/components/cancel-link.js b/app/assets/javascripts/discourse/app/components/cancel-link.js deleted file mode 100644 index 87d5ddb040f..00000000000 --- a/app/assets/javascripts/discourse/app/components/cancel-link.js +++ /dev/null @@ -1,3 +0,0 @@ -import Component from "@ember/component"; - -export default Component.extend({}); diff --git a/app/assets/javascripts/discourse/app/templates/preferences-email.hbs b/app/assets/javascripts/discourse/app/templates/preferences-email.hbs index 0a9307be39f..43d3287b798 100644 --- a/app/assets/javascripts/discourse/app/templates/preferences-email.hbs +++ b/app/assets/javascripts/discourse/app/templates/preferences-email.hbs @@ -43,10 +43,13 @@ type="submit" class="btn-primary" /> - + @model={{this.model.username}} + class="cancel" + > + {{i18n "cancel"}} + {{/if}} diff --git a/app/assets/javascripts/discourse/app/templates/preferences-second-factor.hbs b/app/assets/javascripts/discourse/app/templates/preferences-second-factor.hbs index 08e69013270..5a4e4d81a15 100644 --- a/app/assets/javascripts/discourse/app/templates/preferences-second-factor.hbs +++ b/app/assets/javascripts/discourse/app/templates/preferences-second-factor.hbs @@ -146,10 +146,13 @@ @label="user.second_factor.disable_all" class="btn-danger" /> - + @model={{this.model.username}} + class="cancel" + > + {{i18n "cancel"}} + {{/unless}}