mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 14:10:45 +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._super(...arguments);
|
||||||
|
|
||||||
this.set("selectedDarkColorSchemeId", this.session.userDarkSchemeId);
|
this.set("selectedDarkColorSchemeId", this.session.userDarkSchemeId);
|
||||||
|
|
||||||
|
if (this.siteSettings.experimental_hot_topics) {
|
||||||
|
USER_HOMES[8] = "hot";
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@discourseComputed("makeThemeDefault")
|
@discourseComputed("makeThemeDefault")
|
||||||
|
|
|
@ -185,6 +185,12 @@ class UserOption < ActiveRecord::Base
|
||||||
"bookmarks"
|
"bookmarks"
|
||||||
when 7
|
when 7
|
||||||
"unseen"
|
"unseen"
|
||||||
|
when 8
|
||||||
|
if SiteSetting.experimental_hot_topics
|
||||||
|
"hot"
|
||||||
|
else
|
||||||
|
SiteSetting.homepage
|
||||||
|
end
|
||||||
else
|
else
|
||||||
SiteSetting.homepage
|
SiteSetting.homepage
|
||||||
end
|
end
|
||||||
|
|
|
@ -2956,6 +2956,7 @@ en:
|
||||||
bookmarks: "You have no bookmarked topics yet."
|
bookmarks: "You have no bookmarked topics yet."
|
||||||
category: "There are no %{category} topics."
|
category: "There are no %{category} topics."
|
||||||
top: "There are no top topics."
|
top: "There are no top topics."
|
||||||
|
hot: "There are no hot topics."
|
||||||
filter: "There are no topics."
|
filter: "There are no topics."
|
||||||
educate:
|
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>'
|
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
|
- read
|
||||||
- posted
|
- posted
|
||||||
- bookmarks
|
- bookmarks
|
||||||
|
- hot
|
||||||
post_menu:
|
post_menu:
|
||||||
client: true
|
client: true
|
||||||
type: list
|
type: list
|
||||||
|
@ -3121,6 +3122,7 @@ dashboard:
|
||||||
experimental_hot_topics:
|
experimental_hot_topics:
|
||||||
hidden: true
|
hidden: true
|
||||||
default: false
|
default: false
|
||||||
|
client: true
|
||||||
hot_topics_gravity:
|
hot_topics_gravity:
|
||||||
hidden: true
|
hidden: true
|
||||||
default: 1.2
|
default: 1.2
|
||||||
|
|
Loading…
Reference in New Issue
Block a user