From 8bbbd012d4da638a2bf71808d672718d1e105671 Mon Sep 17 00:00:00 2001 From: Stanislas Signoud Date: Tue, 17 Oct 2023 14:59:07 +0200 Subject: [PATCH] [Glitch] Fix missing redirections to make sure /home redirect to the advanced UI Port 935d54124e80e9fe5365c724e5c8827a2b3ed5b3 to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/features/ui/index.jsx | 2 ++ app/javascript/flavours/glitch/initial_state.js | 1 + 2 files changed, 3 insertions(+) diff --git a/app/javascript/flavours/glitch/features/ui/index.jsx b/app/javascript/flavours/glitch/features/ui/index.jsx index 6f80509577..44f394657a 100644 --- a/app/javascript/flavours/glitch/features/ui/index.jsx +++ b/app/javascript/flavours/glitch/features/ui/index.jsx @@ -191,7 +191,9 @@ class SwitchingColumnsArea extends PureComponent { {singleColumn ? : null} {singleColumn && pathName.startsWith('/deck/') ? : null} + {/* Redirect old bookmarks (without /deck) with home-like routes to the advanced interface */} {!singleColumn && pathName === '/getting-started' ? : null} + {!singleColumn && pathName === '/home' ? : null} diff --git a/app/javascript/flavours/glitch/initial_state.js b/app/javascript/flavours/glitch/initial_state.js index 8d277f8c18..6b16384ab9 100644 --- a/app/javascript/flavours/glitch/initial_state.js +++ b/app/javascript/flavours/glitch/initial_state.js @@ -94,6 +94,7 @@ const initialPath = document.querySelector("head meta[name=initialPath]")?.getAt /** @type {boolean} */ export const hasMultiColumnPath = initialPath === '/' || initialPath === '/getting-started' + || initialPath === '/home' || initialPath.startsWith('/deck'); /**