mirror of
https://github.com/discourse/discourse-solved.git
synced 2026-09-18 07:22:14 -04:00
DEV: Fix imports (#192)
This commit is contained in:
@@ -9,6 +9,7 @@ import { ajax } from "discourse/lib/ajax";
|
||||
import PostCooked from "discourse/widgets/post-cooked";
|
||||
import { formatUsername } from "discourse/lib/utilities";
|
||||
import { iconHTML, iconNode } from "discourse-common/lib/icon-library";
|
||||
import { computed } from "@ember/object";
|
||||
|
||||
function clearAccepted(topic) {
|
||||
const posts = topic.get("postStream.posts");
|
||||
@@ -216,7 +217,7 @@ export default {
|
||||
initialize() {
|
||||
Topic.reopen({
|
||||
// keeping this here cause there is complex localization
|
||||
acceptedAnswerHtml: Ember.computed("accepted_answer", "id", function () {
|
||||
acceptedAnswerHtml: computed("accepted_answer", "id", function () {
|
||||
const username = this.get("accepted_answer.username");
|
||||
const postNumber = this.get("accepted_answer.post_number");
|
||||
|
||||
@@ -236,7 +237,7 @@ export default {
|
||||
});
|
||||
|
||||
TopicStatus.reopen({
|
||||
statuses: Ember.computed(function () {
|
||||
statuses: computed(function () {
|
||||
const results = this._super(...arguments);
|
||||
|
||||
if (this.topic.has_accepted_answer) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Category from "discourse/models/category";
|
||||
import { computed } from "@ember/object";
|
||||
|
||||
export default {
|
||||
name: "extend-category-for-solved",
|
||||
@@ -7,11 +8,11 @@ export default {
|
||||
|
||||
initialize() {
|
||||
Category.reopen({
|
||||
enable_accepted_answers: Ember.computed(
|
||||
enable_accepted_answers: computed(
|
||||
"custom_fields.enable_accepted_answers",
|
||||
{
|
||||
get(fieldName) {
|
||||
return Ember.get(this.custom_fields, fieldName) === "true";
|
||||
return this.get(this.custom_fields, fieldName) === "true";
|
||||
},
|
||||
}
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user