From 70c308c4aa97acaaf6354420bee7d843ddf97d13 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Fri, 31 Aug 2018 13:31:45 +0200 Subject: [PATCH] [Glitch] When search enabled, display hint in search popout Port 7901f9f63e156732ab10154c34f3c2d188471a9d to glitch-soc --- .../flavours/glitch/features/drawer/search/popout/index.js | 7 ++++++- .../flavours/glitch/features/ui/components/tabs_bar.js | 2 +- app/javascript/flavours/glitch/util/initial_state.js | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/javascript/flavours/glitch/features/drawer/search/popout/index.js b/app/javascript/flavours/glitch/features/drawer/search/popout/index.js index 6219f46ca23..fec090b641c 100644 --- a/app/javascript/flavours/glitch/features/drawer/search/popout/index.js +++ b/app/javascript/flavours/glitch/features/drawer/search/popout/index.js @@ -9,6 +9,7 @@ import spring from 'react-motion/lib/spring'; // Utils. import Motion from 'flavours/glitch/util/optional_motion'; +import { searchEnabled } from 'flavours/glitch/util/initial_state'; // Messages. const messages = defineMessages({ @@ -28,6 +29,10 @@ const messages = defineMessages({ defaultMessage: 'Simple text returns matching display names, usernames and hashtags', id: 'search_popout.tips.text', }, + full_text: { + defaultMessage: 'Simple text returns statuses you have written, favourited, boosted, or have been mentioned in, as well as matching usernames, display names, and hashtags.', + id: 'search_popout.tips.full_text', + }, user: { defaultMessage: 'user', id: 'search_popout.tips.user', @@ -92,7 +97,7 @@ export default function DrawerSearchPopout ({ style }) { - + { searchEnabled ? : } )} diff --git a/app/javascript/flavours/glitch/features/ui/components/tabs_bar.js b/app/javascript/flavours/glitch/features/ui/components/tabs_bar.js index 89b455dd879..2571784396f 100644 --- a/app/javascript/flavours/glitch/features/ui/components/tabs_bar.js +++ b/app/javascript/flavours/glitch/features/ui/components/tabs_bar.js @@ -13,7 +13,7 @@ export const links = [ , , - , + , ]; export function getIndex (path) { diff --git a/app/javascript/flavours/glitch/util/initial_state.js b/app/javascript/flavours/glitch/util/initial_state.js index 2c4ab90916c..236ea1c3a25 100644 --- a/app/javascript/flavours/glitch/util/initial_state.js +++ b/app/javascript/flavours/glitch/util/initial_state.js @@ -19,6 +19,7 @@ export const boostModal = getMeta('boost_modal'); export const favouriteModal = getMeta('favourite_modal'); export const deleteModal = getMeta('delete_modal'); export const me = getMeta('me'); +export const searchEnabled = getMeta('search_enabled'); export const maxChars = (initialState && initialState.max_toot_chars) || 500; export default initialState;