mirror of
https://github.com/discourse/discourse.git
synced 2025-02-01 11:03:00 +08:00
REFACTOR: Remove Discourse.SiteSettings
from topic model
This commit is contained in:
parent
ec4024fe6d
commit
ccb36f81c4
|
@ -124,7 +124,7 @@ const Topic = RestModel.extend({
|
|||
Site.currentProp("censored_regexp")
|
||||
);
|
||||
|
||||
if (Discourse.SiteSettings.support_mixed_text_direction) {
|
||||
if (this.siteSettings.support_mixed_text_direction) {
|
||||
const titleDir = isRTL(title) ? "rtl" : "ltr";
|
||||
return `<span dir="${titleDir}">${fancyTitle}</span>`;
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ const Topic = RestModel.extend({
|
|||
|
||||
@discourseComputed("tags")
|
||||
visibleListTags(tags) {
|
||||
if (!tags || !Discourse.SiteSettings.suppress_overlapping_tags_in_list) {
|
||||
if (!tags || !this.siteSettings.suppress_overlapping_tags_in_list) {
|
||||
return tags;
|
||||
}
|
||||
|
||||
|
@ -338,13 +338,13 @@ const Topic = RestModel.extend({
|
|||
|
||||
@discourseComputed("views")
|
||||
viewsHeat(v) {
|
||||
if (v >= Discourse.SiteSettings.topic_views_heat_high) {
|
||||
if (v >= this.siteSettings.topic_views_heat_high) {
|
||||
return "heatmap-high";
|
||||
}
|
||||
if (v >= Discourse.SiteSettings.topic_views_heat_medium) {
|
||||
if (v >= this.siteSettings.topic_views_heat_medium) {
|
||||
return "heatmap-med";
|
||||
}
|
||||
if (v >= Discourse.SiteSettings.topic_views_heat_low) {
|
||||
if (v >= this.siteSettings.topic_views_heat_low) {
|
||||
return "heatmap-low";
|
||||
}
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue
Block a user