From 6ec6fe259a8c7fadf7fd308f48f6116b2bd0e73b Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 26 Mar 2017 13:08:15 +0200 Subject: [PATCH] Compose form layout fixes --- .../features/compose/components/compose_form.jsx | 10 ++++++---- .../compose/components/privacy_dropdown.jsx | 13 +++++++++---- .../features/compose/components/upload_button.jsx | 7 ++++++- app/assets/javascripts/components/locales/en.jsx | 2 +- app/assets/stylesheets/components.scss | 12 +++++------- 5 files changed, 27 insertions(+), 17 deletions(-) diff --git a/app/assets/javascripts/components/features/compose/components/compose_form.jsx b/app/assets/javascripts/components/features/compose/components/compose_form.jsx index cd15e8bd2..b016d3f28 100644 --- a/app/assets/javascripts/components/features/compose/components/compose_form.jsx +++ b/app/assets/javascripts/components/features/compose/components/compose_form.jsx @@ -146,7 +146,7 @@ const ComposeForm = React.createClass({
- +
@@ -176,7 +176,7 @@ const ComposeForm = React.createClass({
-
+
@@ -184,8 +184,10 @@ const ComposeForm = React.createClass({
-
-
+
+
+
+
); diff --git a/app/assets/javascripts/components/features/compose/components/privacy_dropdown.jsx b/app/assets/javascripts/components/features/compose/components/privacy_dropdown.jsx index 3516197ea..7bbf5aef2 100644 --- a/app/assets/javascripts/components/features/compose/components/privacy_dropdown.jsx +++ b/app/assets/javascripts/components/features/compose/components/privacy_dropdown.jsx @@ -4,15 +4,20 @@ import IconButton from '../../../components/icon_button'; const messages = defineMessages({ public_short: { id: 'privacy.public.short', defaultMessage: 'Public' }, - public_long: { id: 'privacy.public.long', defaultMessage: 'Post to Public Timelines' }, + public_long: { id: 'privacy.public.long', defaultMessage: 'Post to public timelines' }, unlisted_short: { id: 'privacy.unlisted.short', defaultMessage: 'Unlisted' }, unlisted_long: { id: 'privacy.unlisted.long', defaultMessage: 'Do not show in public timelines' }, private_short: { id: 'privacy.private.short', defaultMessage: 'Private' }, - private_long: { id: 'privacy.private.long', defaultMessage: 'Post to followers only, cannot be boosted' }, + private_long: { id: 'privacy.private.long', defaultMessage: 'Post to followers only' }, direct_short: { id: 'privacy.direct.short', defaultMessage: 'Direct' }, direct_long: { id: 'privacy.direct.long', defaultMessage: 'Post to mentioned users only' } }); +const iconStyle = { + lineHeight: '27px', + height: null +}; + const PrivacyDropdown = React.createClass({ propTypes: { @@ -67,14 +72,14 @@ const PrivacyDropdown = React.createClass({ { icon: 'globe', value: 'public', shortText: intl.formatMessage(messages.public_short), longText: intl.formatMessage(messages.public_long) }, { icon: 'unlock-alt', value: 'unlisted', shortText: intl.formatMessage(messages.unlisted_short), longText: intl.formatMessage(messages.unlisted_long) }, { icon: 'lock', value: 'private', shortText: intl.formatMessage(messages.private_short), longText: intl.formatMessage(messages.private_long) }, - { icon: 'paper-plane', value: 'direct', shortText: intl.formatMessage(messages.direct_short), longText: intl.formatMessage(messages.direct_long) } + { icon: 'envelope', value: 'direct', shortText: intl.formatMessage(messages.direct_short), longText: intl.formatMessage(messages.direct_long) } ]; const valueOption = options.find(item => item.value === value); return (
-
+
{options.map(item =>
diff --git a/app/assets/javascripts/components/features/compose/components/upload_button.jsx b/app/assets/javascripts/components/features/compose/components/upload_button.jsx index 3089bde50..2ba0e8fd2 100644 --- a/app/assets/javascripts/components/features/compose/components/upload_button.jsx +++ b/app/assets/javascripts/components/features/compose/components/upload_button.jsx @@ -6,6 +6,11 @@ const messages = defineMessages({ upload: { id: 'upload_button.label', defaultMessage: 'Add media' } }); +const iconStyle = { + lineHeight: '27px', + height: null +}; + const UploadButton = React.createClass({ propTypes: { @@ -37,7 +42,7 @@ const UploadButton = React.createClass({ return (
- +
); diff --git a/app/assets/javascripts/components/locales/en.jsx b/app/assets/javascripts/components/locales/en.jsx index 3131dca1a..5af44ea4b 100644 --- a/app/assets/javascripts/components/locales/en.jsx +++ b/app/assets/javascripts/components/locales/en.jsx @@ -25,7 +25,7 @@ const en = { "getting_started.heading": "Getting started", "getting_started.about_addressing": "You can follow people if you know their username and the domain they are on by entering an e-mail-esque address into the search form.", "getting_started.about_shortcuts": "If the target user is on the same domain as you, just the username will work. The same rule applies to mentioning people in statuses.", - "getting_started.open_source_notice": "Mastodon is open source software. You can contribute or report issues on github at {github}. Various apps are available.", + "getting_started.open_source_notice": "Mastodon is open source software. You can contribute or report issues on github at {github}. {apps}.", "column.home": "Home", "column.community": "Local timeline", "column.public": "Federated timeline", diff --git a/app/assets/stylesheets/components.scss b/app/assets/stylesheets/components.scss index d47214bbb..707d688db 100644 --- a/app/assets/stylesheets/components.scss +++ b/app/assets/stylesheets/components.scss @@ -94,19 +94,19 @@ } .text-icon-button { - color: lighten($color1, 26%); + color: lighten($color1, 33%); border: none; background: transparent; cursor: pointer; font-weight: 600; - font-size: 12px; + font-size: 11px; padding: 0 3px; line-height: 27px; outline: 0; transition: all 100ms ease-in; &:hover { - color: lighten($color1, 33%); + color: lighten($color1, 26%); transition: all 200ms ease-out; } @@ -177,8 +177,6 @@ background: darken($color5, 8%); box-shadow: inset 0 5px 5px rgba($color8, 0.05); border-radius: 0 0 4px 4px; - flex: 1 1 auto; - margin-right: 16px; display: flex; .icon-button { @@ -734,7 +732,7 @@ a.status__content__spoiler-link { } .drawer { - width: 330px; + width: 300px; box-sizing: border-box; display: flex; flex-direction: column; @@ -1663,7 +1661,7 @@ button.active i.fa-retweet { position: absolute; left: 0; top: 24px; - width: 180px; + width: 230px; background: $color5; border-radius: 0 4px 4px 4px; z-index: 2;