|
1 | 1 | import { computed } from "@ember/object"; |
2 | | -import discourseComputed from "discourse/lib/decorators"; |
3 | | -import { withSilencedDeprecations } from "discourse/lib/deprecated"; |
4 | 2 | import { iconHTML } from "discourse/lib/icon-library"; |
5 | 3 | import { withPluginApi } from "discourse/lib/plugin-api"; |
6 | 4 | import { formatUsername } from "discourse/lib/utilities"; |
@@ -156,57 +154,6 @@ export default { |
156 | 154 | }), |
157 | 155 | }); |
158 | 156 |
|
159 | | - withPluginApi("2.0.0", (api) => { |
160 | | - withSilencedDeprecations("discourse.hbr-topic-list-overrides", () => { |
161 | | - let topicStatusIcons; |
162 | | - try { |
163 | | - topicStatusIcons = |
164 | | - require("discourse/helpers/topic-status-icons").default; |
165 | | - } catch {} |
166 | | - |
167 | | - topicStatusIcons?.addObject([ |
168 | | - "has_accepted_answer", |
169 | | - "far-square-check", |
170 | | - "solved", |
171 | | - ]); |
172 | | - |
173 | | - api.modifyClass( |
174 | | - "raw-view:topic-status", |
175 | | - (Superclass) => |
176 | | - class extends Superclass { |
177 | | - @discourseComputed( |
178 | | - "topic.{has_accepted_answer,accepted_answer,can_have_answer}" |
179 | | - ) |
180 | | - statuses() { |
181 | | - const results = super.statuses; |
182 | | - |
183 | | - if ( |
184 | | - this.topic.has_accepted_answer || |
185 | | - this.topic.accepted_answer |
186 | | - ) { |
187 | | - results.push({ |
188 | | - openTag: "span", |
189 | | - closeTag: "span", |
190 | | - title: i18n("topic_statuses.solved.help"), |
191 | | - icon: "far-square-check", |
192 | | - key: "solved", |
193 | | - }); |
194 | | - } else if (this.topic.can_have_answer) { |
195 | | - results.push({ |
196 | | - openTag: "span", |
197 | | - closeTag: "span", |
198 | | - title: i18n("solved.has_no_accepted_answer"), |
199 | | - icon: "far-square", |
200 | | - }); |
201 | | - } |
202 | | - |
203 | | - return results; |
204 | | - } |
205 | | - } |
206 | | - ); |
207 | | - }); |
208 | | - }); |
209 | | - |
210 | 157 | withPluginApi("1.34.0", initializeWithApi); |
211 | 158 |
|
212 | 159 | withPluginApi("0.8.10", (api) => { |
|
0 commit comments