mirror of
https://github.com/discourse/discourse.git
synced 2025-04-19 19:31:45 +08:00
prefix setting with 'desktop_' since it's only used for desktop
This commit is contained in:
parent
d06e2793aa
commit
2690ef7050
@ -19,7 +19,7 @@ export default DiscoveryController.extend({
|
|||||||
|
|
||||||
@computed("model.parentCategory")
|
@computed("model.parentCategory")
|
||||||
categoryPageStyle(parentCategory) {
|
categoryPageStyle(parentCategory) {
|
||||||
const style = this.siteSettings.category_page_style;
|
const style = this.siteSettings.desktop_category_page_style;
|
||||||
return parentCategory && style === "categories_and_latest_topics" ? "categories_only" : style;
|
return parentCategory && style === "categories_and_latest_topics" ? "categories_only" : style;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ const DiscoveryCategoriesRoute = Discourse.Route.extend(OpenComposer, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
setupController(controller, model) {
|
setupController(controller, model) {
|
||||||
const style = this.siteSettings.category_page_style;
|
const style = this.siteSettings.desktop_category_page_style;
|
||||||
if (style === "categories_and_latest_topics" && !this.get("model.parentCategory")) {
|
if (style === "categories_and_latest_topics" && !this.get("model.parentCategory")) {
|
||||||
model.set("loadingTopics", true);
|
model.set("loadingTopics", true);
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ class CategoriesController < ApplicationController
|
|||||||
|
|
||||||
include_topics = view_context.mobile_view? ||
|
include_topics = view_context.mobile_view? ||
|
||||||
params[:include_topics] ||
|
params[:include_topics] ||
|
||||||
SiteSetting.category_page_style == "categories_with_featured_topics".freeze
|
SiteSetting.desktop_category_page_style == "categories_with_featured_topics".freeze
|
||||||
|
|
||||||
category_options = {
|
category_options = {
|
||||||
is_homepage: current_homepage == "categories".freeze,
|
is_homepage: current_homepage == "categories".freeze,
|
||||||
@ -37,7 +37,7 @@ class CategoriesController < ApplicationController
|
|||||||
format.html do
|
format.html do
|
||||||
store_preloaded(@category_list.preload_key, MultiJson.dump(CategoryListSerializer.new(@category_list, scope: guardian)))
|
store_preloaded(@category_list.preload_key, MultiJson.dump(CategoryListSerializer.new(@category_list, scope: guardian)))
|
||||||
|
|
||||||
if SiteSetting.category_page_style == "categories_and_latest_topics".freeze
|
if SiteSetting.desktop_category_page_style == "categories_and_latest_topics".freeze
|
||||||
topic_options = { per_page: SiteSetting.categories_topics, no_definitions: true }
|
topic_options = { per_page: SiteSetting.categories_topics, no_definitions: true }
|
||||||
topic_list = TopicQuery.new(current_user, topic_options).list_latest
|
topic_list = TopicQuery.new(current_user, topic_options).list_latest
|
||||||
store_preloaded(topic_list.preload_key, MultiJson.dump(TopicListSerializer.new(topic_list, scope: guardian)))
|
store_preloaded(topic_list.preload_key, MultiJson.dump(TopicListSerializer.new(topic_list, scope: guardian)))
|
||||||
|
@ -1148,7 +1148,7 @@ en:
|
|||||||
min_title_similar_length: "The minimum length of a title before it will be checked for similar topics."
|
min_title_similar_length: "The minimum length of a title before it will be checked for similar topics."
|
||||||
min_body_similar_length: "The minimum length of a post's body before it will be checked for similar topics."
|
min_body_similar_length: "The minimum length of a post's body before it will be checked for similar topics."
|
||||||
|
|
||||||
category_page_style: "Visual style for the /categories page."
|
desktop_category_page_style: "Visual style for the /categories page."
|
||||||
category_colors: "A list of hexadecimal color values allowed for categories."
|
category_colors: "A list of hexadecimal color values allowed for categories."
|
||||||
category_style: "Visual style for category badges."
|
category_style: "Visual style for category badges."
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ basic:
|
|||||||
- facebook
|
- facebook
|
||||||
- google+
|
- google+
|
||||||
- email
|
- email
|
||||||
category_page_style:
|
desktop_category_page_style:
|
||||||
client: true
|
client: true
|
||||||
enum: 'CategoryPageStyle'
|
enum: 'CategoryPageStyle'
|
||||||
default: 'categories_and_latest_topics'
|
default: 'categories_and_latest_topics'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user