mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 18:02:46 +08:00
FEATURE: Add hot as a homepage option (#25325)
This commit is contained in:
parent
6ec4ffdee1
commit
561851b104
|
@ -44,6 +44,10 @@ export default Controller.extend({
|
|||
this._super(...arguments);
|
||||
|
||||
this.set("selectedDarkColorSchemeId", this.session.userDarkSchemeId);
|
||||
|
||||
if (this.siteSettings.experimental_hot_topics) {
|
||||
USER_HOMES[8] = "hot";
|
||||
}
|
||||
},
|
||||
|
||||
@discourseComputed("makeThemeDefault")
|
||||
|
|
|
@ -185,6 +185,12 @@ class UserOption < ActiveRecord::Base
|
|||
"bookmarks"
|
||||
when 7
|
||||
"unseen"
|
||||
when 8
|
||||
if SiteSetting.experimental_hot_topics
|
||||
"hot"
|
||||
else
|
||||
SiteSetting.homepage
|
||||
end
|
||||
else
|
||||
SiteSetting.homepage
|
||||
end
|
||||
|
|
|
@ -2956,6 +2956,7 @@ en:
|
|||
bookmarks: "You have no bookmarked topics yet."
|
||||
category: "There are no %{category} topics."
|
||||
top: "There are no top topics."
|
||||
hot: "There are no hot topics."
|
||||
filter: "There are no topics."
|
||||
educate:
|
||||
new: '<p>Your new topics will appear here. By default, topics are considered new and will show a <span class="badge new-topic badge-notification" style="vertical-align:middle;line-height:inherit;"></span> indicator if they were created in the last 2 days.</p><p>Visit your <a href="%{userPrefsUrl}">preferences</a> to change this.</p>'
|
||||
|
|
|
@ -189,6 +189,7 @@ basic:
|
|||
- read
|
||||
- posted
|
||||
- bookmarks
|
||||
- hot
|
||||
post_menu:
|
||||
client: true
|
||||
type: list
|
||||
|
@ -3121,6 +3122,7 @@ dashboard:
|
|||
experimental_hot_topics:
|
||||
hidden: true
|
||||
default: false
|
||||
client: true
|
||||
hot_topics_gravity:
|
||||
hidden: true
|
||||
default: 1.2
|
||||
|
|
Loading…
Reference in New Issue
Block a user