]> cat aescling's git repositories - mastodon.git/commitdiff
Content-Type Dropdown: use the selected option icon for the menu
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Fri, 1 Mar 2019 10:45:16 +0000 (11:45 +0100)
committerThibG <thib@sitedethib.com>
Fri, 17 May 2019 21:51:14 +0000 (23:51 +0200)
Signed-off-by: Thibaut Girka <thib@sitedethib.com>
app/javascript/flavours/glitch/features/compose/components/options.js

index 908126c6f83a750d5108f5df59cda98c7c6ee101..9bec36a7def8e560b6d28110893fa74bb60de335 100644 (file)
@@ -230,17 +230,17 @@ class ComposerOptions extends ImmutablePureComponent {
 
     const contentTypeItems = {
       plain: {
-        icon: 'file',
+        icon: 'align-left',
         name: 'text/plain',
         text: <FormattedMessage {...messages.plain} />,
       },
       html: {
-        icon: 'file-text',
+        icon: 'code',
         name: 'text/html',
         text: <FormattedMessage {...messages.html} />,
       },
       markdown: {
-        icon: 'file-text',
+        icon: 'arrow-circle-down',
         name: 'text/markdown',
         text: <FormattedMessage {...messages.markdown} />,
       },
@@ -311,7 +311,8 @@ class ComposerOptions extends ImmutablePureComponent {
           value={privacy}
         />
         <Dropdown
-          icon="code"
+          disabled={disabled}
+          icon={(contentTypeItems[contentType.split('/')[1]] || {}).icon}
           items={[
             contentTypeItems.plain,
             contentTypeItems.html,