2017-09-12 04:44:20 +08:00
|
|
|
import { iconHTML } from "discourse-common/lib/icon-library";
|
2019-11-06 02:43:49 +08:00
|
|
|
import Helper from "@ember/component/helper";
|
2017-09-12 04:44:20 +08:00
|
|
|
|
2019-11-06 02:43:49 +08:00
|
|
|
export default Helper.extend({
|
2017-09-12 04:44:20 +08:00
|
|
|
compute([disposition]) {
|
|
|
|
if (!disposition) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
let icon;
|
|
|
|
let title = "admin.flags.dispositions." + disposition;
|
|
|
|
switch (disposition) {
|
|
|
|
case "deferred": {
|
2019-01-23 03:42:00 +08:00
|
|
|
icon = "external-link-alt";
|
2017-09-12 04:44:20 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case "agreed": {
|
|
|
|
icon = "thumbs-o-up";
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case "disagreed": {
|
|
|
|
icon = "thumbs-o-down";
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return iconHTML(icon, { title }).htmlSafe();
|
|
|
|
}
|
|
|
|
});
|