mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-12 14:16:12 +01:00
Content-Type Dropdown: use the selected option icon for the menu
Signed-off-by: Thibaut Girka <thib@sitedethib.com>
This commit is contained in:
parent
93d98f62a8
commit
c2fa36bbae
@ -230,17 +230,17 @@ class ComposerOptions extends ImmutablePureComponent {
|
|||||||
|
|
||||||
const contentTypeItems = {
|
const contentTypeItems = {
|
||||||
plain: {
|
plain: {
|
||||||
icon: 'file',
|
icon: 'align-left',
|
||||||
name: 'text/plain',
|
name: 'text/plain',
|
||||||
text: <FormattedMessage {...messages.plain} />,
|
text: <FormattedMessage {...messages.plain} />,
|
||||||
},
|
},
|
||||||
html: {
|
html: {
|
||||||
icon: 'file-text',
|
icon: 'code',
|
||||||
name: 'text/html',
|
name: 'text/html',
|
||||||
text: <FormattedMessage {...messages.html} />,
|
text: <FormattedMessage {...messages.html} />,
|
||||||
},
|
},
|
||||||
markdown: {
|
markdown: {
|
||||||
icon: 'file-text',
|
icon: 'arrow-circle-down',
|
||||||
name: 'text/markdown',
|
name: 'text/markdown',
|
||||||
text: <FormattedMessage {...messages.markdown} />,
|
text: <FormattedMessage {...messages.markdown} />,
|
||||||
},
|
},
|
||||||
@ -311,7 +311,8 @@ class ComposerOptions extends ImmutablePureComponent {
|
|||||||
value={privacy}
|
value={privacy}
|
||||||
/>
|
/>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
icon="code"
|
disabled={disabled}
|
||||||
|
icon={(contentTypeItems[contentType.split('/')[1]] || {}).icon}
|
||||||
items={[
|
items={[
|
||||||
contentTypeItems.plain,
|
contentTypeItems.plain,
|
||||||
contentTypeItems.html,
|
contentTypeItems.html,
|
||||||
|
Loading…
Reference in New Issue
Block a user