DEV: Remove buffered rendering from watched words
This is another refactoring in the multi-step process to remove all uses
of our custom Render Buffer.
Previous commit: 2673cad142
in this
series.
This commit affects the display of watched words on the admin watched
word page. It is just a refactor and does not change any functionality.
This commit is contained in:
parent
481c8314f0
commit
bb31e7f5b6
|
@ -1,15 +1,15 @@
|
|||
import Component from "@ember/component";
|
||||
import { iconHTML } from "discourse-common/lib/icon-library";
|
||||
import { bufferedRender } from "discourse-common/lib/buffered-render";
|
||||
import { escapeExpression } from "discourse/lib/utilities";
|
||||
|
||||
export default Component.extend(
|
||||
bufferedRender({
|
||||
export default Component.extend({
|
||||
classNames: ["watched-word"],
|
||||
watchedWord: null,
|
||||
xIcon: iconHTML("times").htmlSafe(),
|
||||
|
||||
buildBuffer(buffer) {
|
||||
buffer.push(iconHTML("times"));
|
||||
buffer.push(` ${escapeExpression(this.get("word.word"))}`);
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
this.set("watchedWord", `${escapeExpression(this.get("word.word"))}`);
|
||||
},
|
||||
|
||||
click() {
|
||||
|
@ -26,5 +26,4 @@ export default Component.extend(
|
|||
);
|
||||
});
|
||||
}
|
||||
})
|
||||
);
|
||||
});
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
{{xIcon}} {{watchedWord}}
|
Loading…
Reference in New Issue