mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 17:02:45 +08:00
FIX: update topic property access in raw topic-status view (#26528)
This commit is contained in:
parent
19eb0a7055
commit
38d39b6c34
|
@ -16,13 +16,13 @@ export default EmberObject.extend({
|
|||
const results = [];
|
||||
|
||||
// TODO, custom statuses? via override?
|
||||
if (topic.get("is_warning")) {
|
||||
if (topic.is_warning) {
|
||||
results.push({ icon: "envelope", key: "warning" });
|
||||
}
|
||||
|
||||
if (topic.get("bookmarked")) {
|
||||
const postNumbers = topic.get("bookmarked_post_numbers");
|
||||
let url = topic.get("url");
|
||||
if (topic.bookmarked) {
|
||||
const postNumbers = topic.bookmarked_post_numbers;
|
||||
let url = topic.url;
|
||||
let extraClasses = "";
|
||||
if (postNumbers && postNumbers[0] > 1) {
|
||||
url += "/" + postNumbers[0];
|
||||
|
@ -38,23 +38,23 @@ export default EmberObject.extend({
|
|||
});
|
||||
}
|
||||
|
||||
if (topic.get("closed") && topic.get("archived")) {
|
||||
if (topic.closed && topic.archived) {
|
||||
results.push({ icon: "lock", key: "locked_and_archived" });
|
||||
} else if (topic.get("closed")) {
|
||||
} else if (topic.closed) {
|
||||
results.push({ icon: "lock", key: "locked" });
|
||||
} else if (topic.get("archived")) {
|
||||
} else if (topic.archived) {
|
||||
results.push({ icon: "lock", key: "archived" });
|
||||
}
|
||||
|
||||
if (topic.get("pinned")) {
|
||||
if (topic.pinned) {
|
||||
results.push({ icon: "thumbtack", key: "pinned" });
|
||||
}
|
||||
|
||||
if (topic.get("unpinned")) {
|
||||
if (topic.unpinned) {
|
||||
results.push({ icon: "thumbtack", key: "unpinned" });
|
||||
}
|
||||
|
||||
if (topic.get("invisible")) {
|
||||
if (topic.invisible) {
|
||||
results.push({ icon: "far-eye-slash", key: "unlisted" });
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user