lint
This commit is contained in:
parent
1797ffe20c
commit
09f6fccae1
|
@ -1,11 +1,12 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import { action } from "@ember/object";
|
||||
import { service } from "@ember/service";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import DButton from "discourse/components/d-button";
|
||||
import icon from "discourse/helpers/d-icon";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import { formatUsername } from "discourse/lib/utilities";
|
||||
import { i18n } from "discourse-i18n";
|
||||
import DTooltip from "float-kit/components/d-tooltip";
|
||||
|
||||
|
@ -51,12 +52,21 @@ export default class SolvedUnacceptAnswerButton extends Component {
|
|||
}
|
||||
|
||||
get solvedBy() {
|
||||
const username = this.args.post.topic.accepted_answer.accepter_username
|
||||
if (this.siteSettings.show_who_marked_solved && this.args.post.topic.accepted_answer.accepter_username) {
|
||||
if (!this.siteSettings.show_who_marked_solved) {
|
||||
return;
|
||||
}
|
||||
|
||||
const username = this.args.post.topic.accepted_answer.accepter_username;
|
||||
const name = this.args.post.topic.accepted_answer.accepter_name;
|
||||
const displayedName =
|
||||
this.siteSettings.display_name_on_posts && name
|
||||
? name
|
||||
: formatUsername(username);
|
||||
if (this.args.post.topic.accepted_answer.accepter_username) {
|
||||
return i18n("solved.marked_solved_by", {
|
||||
username,
|
||||
username: displayedName,
|
||||
username_lower: username,
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -99,6 +99,7 @@ aside.quote.accepted-answer {
|
|||
display: inline-block;
|
||||
}
|
||||
|
||||
.post-action-menu__solved-accepted-tooltip-content .fk-d-tooltip__inner-content {
|
||||
.post-action-menu__solved-accepted-tooltip-content
|
||||
.fk-d-tooltip__inner-content {
|
||||
display: block;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue