DEV: Fix imports (#192)
This commit is contained in:
parent
6007395cfb
commit
7c50330e04
|
@ -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";
|
||||
},
|
||||
}
|
||||
),
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
"author": "Discourse",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"eslint-config-discourse": "^1.1.8"
|
||||
"eslint-config-discourse": "^2.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { acceptance, queryAll } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { fixturesByUrl } from "discourse/tests/helpers/create-pretender";
|
||||
import { test } from "qunit";
|
||||
import { click, visit } from "@ember/test-helpers";
|
||||
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||
|
||||
acceptance("Discourse Solved Plugin", function (needs) {
|
||||
needs.user();
|
||||
|
|
|
@ -498,10 +498,10 @@ escape-string-regexp@^1.0.5:
|
|||
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
|
||||
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
|
||||
|
||||
eslint-config-discourse@^1.1.8:
|
||||
version "1.1.8"
|
||||
resolved "https://registry.yarnpkg.com/eslint-config-discourse/-/eslint-config-discourse-1.1.8.tgz#c297831876811ea08203aa348d1ba2a963b2ae78"
|
||||
integrity sha512-ZSQfhliiO5Cfa7WcKoMkN4wW/1rBJpecpMJpfjiFsElfgPj4EV4Pzksi5CvFnRbJDoZh6DYYrQfO+tW062VOUA==
|
||||
eslint-config-discourse@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-config-discourse/-/eslint-config-discourse-2.0.0.tgz#811ab2cf4e32c1f0d41bd57d9736d578fe80b741"
|
||||
integrity sha512-enjsLU++iibJXM64YM6Y/yUM5580wKtkti9fQdrJDFkfLJnvv8/f2j7QmNbX//MoqWfIQfY2RkHH6VTfRUg4Mw==
|
||||
dependencies:
|
||||
babel-eslint "^10.1.0"
|
||||
ember-template-lint "^2.11.0"
|
||||
|
|
Loading…
Reference in New Issue