From 6a469b2e50935f717ca9d0587f539b8aa0b6c8f3 Mon Sep 17 00:00:00 2001 From: angus Date: Fri, 12 Mar 2021 19:50:03 +1100 Subject: [PATCH] Remove user fields that can't be interpolated --- .../discourse/components/wizard-text-editor.js.es6 | 9 ++++++++- assets/stylesheets/common/wizard-admin.scss | 5 +++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/assets/javascripts/discourse/components/wizard-text-editor.js.es6 b/assets/javascripts/discourse/components/wizard-text-editor.js.es6 index 6b95eee9..eef26d9c 100644 --- a/assets/javascripts/discourse/components/wizard-text-editor.js.es6 +++ b/assets/javascripts/discourse/components/wizard-text-editor.js.es6 @@ -5,6 +5,12 @@ import { scheduleOnce } from "@ember/runloop"; import Component from "@ember/component"; import I18n from "I18n"; +const excludedUserProperties = [ + 'avatar', + 'profile_background', + 'card_background' +]; + export default Component.extend({ classNames: 'wizard-text-editor', barEnabled: true, @@ -39,7 +45,8 @@ export default Component.extend({ @discourseComputed() userPropertyList() { - return userProperties.map((f) => ` u{${f}}`); + return userProperties.filter((f) => !excludedUserProperties.includes(f)) + .map((f) => ` u{${f}}`); }, @discourseComputed('wizardFields') diff --git a/assets/stylesheets/common/wizard-admin.scss b/assets/stylesheets/common/wizard-admin.scss index 389de55c..6b5ad58f 100644 --- a/assets/stylesheets/common/wizard-admin.scss +++ b/assets/stylesheets/common/wizard-admin.scss @@ -444,6 +444,11 @@ .btn { margin-right: 10px; + color: $primary; + + &:hover { + color: $secondary; + } } .wizard-editor-gutter-popover {