2bcd04d4f4
* Bringing back the OP * Removed reason why topic appears (again) in topic list (="activity") * Removed likes * New layout with indention + moved all elements left (on desktop) | Mobile | Desktop | |--------|--------| |  |  | |  |  | |  |  | |  |  | |  |  | --------- Co-authored-by: Jordan Vidrine <jordan@jordanvidrine.com>
37 lines
844 B
Plaintext
37 lines
844 B
Plaintext
import Component from "@glimmer/component";
|
|
import { service } from "@ember/service";
|
|
import icon from "discourse/helpers/d-icon";
|
|
import { i18n } from "discourse-i18n";
|
|
|
|
export default class TopicStatusColumn extends Component {
|
|
@service siteSettings;
|
|
|
|
get badge() {
|
|
if (this.args.topic.is_hot) {
|
|
return {
|
|
icon: "fire",
|
|
text: "topic_hot",
|
|
className: "--hot",
|
|
};
|
|
}
|
|
|
|
if (this.args.topic.pinned) {
|
|
return {
|
|
icon: "thumbtack",
|
|
text: "topic_pinned",
|
|
className: "--pinned",
|
|
};
|
|
}
|
|
|
|
return null;
|
|
}
|
|
|
|
<template>
|
|
{{#if this.badge}}
|
|
<span class="topic-status-card {{this.badge.className}}">{{icon
|
|
this.badge.icon
|
|
}}<p class="topic-status-card__name">{{i18n (themePrefix this.badge.text)}}</p></span>
|
|
{{/if}}
|
|
</template>
|
|
}
|