]>
cat aescling's git repositories - mastodon.git/blob - app/javascript/flavours/glitch/features/drawer/search/popout/index.js
2 import PropTypes
from 'prop-types' ;
3 import React
from 'react' ;
8 import spring
from 'react-motion/lib/spring' ;
11 import Motion
from 'flavours/glitch/util/optional_motion' ;
12 import { searchEnabled
} from 'flavours/glitch/util/initial_state' ;
15 const messages
= defineMessages ({
17 defaultMessage : 'Advanced search format' ,
18 id : 'search_popout.search_format' ,
21 defaultMessage : 'hashtag' ,
22 id : 'search_popout.tips.hashtag' ,
25 defaultMessage : 'status' ,
26 id : 'search_popout.tips.status' ,
29 defaultMessage : 'Simple text returns matching display names, usernames and hashtags' ,
30 id : 'search_popout.tips.text' ,
33 defaultMessage : 'Simple text returns statuses you have written, favourited, boosted, or have been mentioned in, as well as matching usernames, display names, and hashtags.' ,
34 id : 'search_popout.tips.full_text' ,
37 defaultMessage : 'user' ,
38 id : 'search_popout.tips.user' ,
42 // The spring used by our motion.
43 const motionSpring
= spring ( 1 , { damping : 35 , stiffness : 400 });
46 export default function DrawerSearchPopout ({ style
}) {
51 className
= 'drawer--search--popout'
65 opacity : motionSpring
,
70 {({ opacity
, scaleX
, scaleY
}) => (
74 transform : `scale( ${scaleX} , ${scaleY} )` ,
77 < h4
>< FormattedMessage
{... messages
. format
} /></ h4
>
82 < FormattedMessage
{... messages
. hashtag
} />
85 < em
>@ username
@ domain
</ em
>
87 < FormattedMessage
{... messages
. user
} />
92 < FormattedMessage
{... messages
. user
} />
97 < FormattedMessage
{... messages
. status
} />
100 { searchEnabled
? < FormattedMessage
{... messages
. full_text
} /> : < FormattedMessage
{... messages
. text
} /> }
109 DrawerSearchPopout
. propTypes
= { style : PropTypes
. object
};
This page took 0.112907 seconds and 4 git commands to generate.