diff options
Diffstat (limited to 'app/javascript/flavours/glitch/util')
-rw-r--r-- | app/javascript/flavours/glitch/util/async-components.js | 4 | ||||
-rw-r--r-- | app/javascript/flavours/glitch/util/initial_state.js | 1 | ||||
-rw-r--r-- | app/javascript/flavours/glitch/util/is_mobile.js | 3 |
3 files changed, 7 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/util/async-components.js b/app/javascript/flavours/glitch/util/async-components.js index 094952204..f2aeda834 100644 --- a/app/javascript/flavours/glitch/util/async-components.js +++ b/app/javascript/flavours/glitch/util/async-components.js @@ -149,3 +149,7 @@ export function GettingStartedMisc () { export function ListAdder () { return import(/* webpackChunkName: "features/glitch/async/list_adder" */'flavours/glitch/features/list_adder'); } + +export function Search () { + return import(/*webpackChunkName: "features/glitch/async/search" */'flavours/glitch/features/search'); +} diff --git a/app/javascript/flavours/glitch/util/initial_state.js b/app/javascript/flavours/glitch/util/initial_state.js index 99d8a4dbc..f42c06a3a 100644 --- a/app/javascript/flavours/glitch/util/initial_state.js +++ b/app/javascript/flavours/glitch/util/initial_state.js @@ -28,5 +28,6 @@ export const version = getMeta('version'); export const mascot = getMeta('mascot'); export const isStaff = getMeta('is_staff'); export const defaultContentType = getMeta('default_content_type'); +export const forceSingleColumn = getMeta('advanced_layout') === false; export default initialState; diff --git a/app/javascript/flavours/glitch/util/is_mobile.js b/app/javascript/flavours/glitch/util/is_mobile.js index 80e8e0a8a..db3c8bd80 100644 --- a/app/javascript/flavours/glitch/util/is_mobile.js +++ b/app/javascript/flavours/glitch/util/is_mobile.js @@ -1,4 +1,5 @@ import detectPassiveEvents from 'detect-passive-events'; +import { forceSingleColumn } from 'flavours/glitch/util/initial_state'; const LAYOUT_BREAKPOINT = 630; @@ -9,7 +10,7 @@ export function isMobile(width, columns) { case 'single': return true; default: - return width <= LAYOUT_BREAKPOINT; + return forceSingleColumn || width <= LAYOUT_BREAKPOINT; } }; |