FEATURE: Add hot as a homepage option (#25325)

This commit is contained in:
Blake Erickson 2024-01-18 16:36:18 -07:00 committed by GitHub
parent 6ec4ffdee1
commit 561851b104
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 13 additions and 0 deletions

View File

@ -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")

View File

@ -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

View File

@ -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>'

View File

@ -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