From d41cec90cfa92f6969cd51ff230e24eff8b382b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Fri, 7 Jul 2017 09:30:25 +0200 Subject: [PATCH] Added toot visibility icons and removed Boost btn changing icon --- .../mastodon/components/status_action_bar.js | 2 ++ app/javascript/styles/boost.scss | 14 ++++++++++++++ app/javascript/styles/components.scss | 16 ++++++++++++++++ 3 files changed, 32 insertions(+) diff --git a/app/javascript/mastodon/components/status_action_bar.js b/app/javascript/mastodon/components/status_action_bar.js index 6693548c70..c26261d1a4 100644 --- a/app/javascript/mastodon/components/status_action_bar.js +++ b/app/javascript/mastodon/components/status_action_bar.js @@ -122,11 +122,13 @@ export default class StatusActionBar extends ImmutablePureComponent { menu.push({ text: intl.formatMessage(messages.report, { name: status.getIn(['account', 'username']) }), action: this.handleReport }); } + /* if (status.get('visibility') === 'direct') { reblogIcon = 'envelope'; } else if (status.get('visibility') === 'private') { reblogIcon = 'lock'; } + */ if (status.get('in_reply_to_id', null) === null) { replyIcon = 'reply'; diff --git a/app/javascript/styles/boost.scss b/app/javascript/styles/boost.scss index 7589828c67..9cad7a4f54 100644 --- a/app/javascript/styles/boost.scss +++ b/app/javascript/styles/boost.scss @@ -9,3 +9,17 @@ button.icon-button i.fa-retweet { background-image: url("data:image/svg+xml;utf8,"); } } + +// Disabled variant +button.icon-button.disabled i.fa-retweet { + &, &:hover { + background-image: url("data:image/svg+xml;utf8,"); + } +} + +// Darker disabled variant for DMs +.status-direct button.icon-button.disabled i.fa-retweet { + &, &:hover { + background-image: url("data:image/svg+xml;utf8,"); + } +} diff --git a/app/javascript/styles/components.scss b/app/javascript/styles/components.scss index 60dfc041a5..72d7aae688 100644 --- a/app/javascript/styles/components.scss +++ b/app/javascript/styles/components.scss @@ -611,6 +611,22 @@ .notification__message { margin: -10px 0 10px; } + + // Visibility icons + &::before { + float: right; + padding-top: 5px; + margin-left: 8px; + font-family: "FontAwesome"; + color: lighten($ui-base-color, 26%); + text-align: center; + width: 16px; + } + + &.status-public::before { content: "\F0AC" } + &.status-unlisted::before { content: "\F13E" } + &.status-private::before { content: "\F023" } + &.status-direct::before { content: "\F0E0" } } .notification-favourite {