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 Component from "@ember/component";
|
||||||
import { iconHTML } from "discourse-common/lib/icon-library";
|
import { iconHTML } from "discourse-common/lib/icon-library";
|
||||||
import { bufferedRender } from "discourse-common/lib/buffered-render";
|
|
||||||
import { escapeExpression } from "discourse/lib/utilities";
|
import { escapeExpression } from "discourse/lib/utilities";
|
||||||
|
|
||||||
export default Component.extend(
|
export default Component.extend({
|
||||||
bufferedRender({
|
|
||||||
classNames: ["watched-word"],
|
classNames: ["watched-word"],
|
||||||
|
watchedWord: null,
|
||||||
|
xIcon: iconHTML("times").htmlSafe(),
|
||||||
|
|
||||||
buildBuffer(buffer) {
|
init() {
|
||||||
buffer.push(iconHTML("times"));
|
this._super(...arguments);
|
||||||
buffer.push(` ${escapeExpression(this.get("word.word"))}`);
|
this.set("watchedWord", `${escapeExpression(this.get("word.word"))}`);
|
||||||
},
|
},
|
||||||
|
|
||||||
click() {
|
click() {
|
||||||
|
@ -26,5 +26,4 @@ export default Component.extend(
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
);
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
{{xIcon}} {{watchedWord}}
|
Loading…
Reference in New Issue