From 7e244879feaa8de9894e1147ff49a7e762fe462a Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 3 May 2022 09:09:09 +0200 Subject: [PATCH] Change "Conversations" back to "Direct messages" and add warning in web UI (#18289) Partially reverts #18146 --- app/javascript/mastodon/components/status_action_bar.js | 1 + .../mastodon/features/account/components/header.js | 1 + app/javascript/mastodon/features/direct_timeline/index.js | 5 +++-- app/javascript/mastodon/features/getting_started/index.js | 2 +- app/javascript/mastodon/features/keyboard_shortcuts/index.js | 2 +- .../mastodon/features/ui/components/navigation_panel.js | 2 +- app/javascript/styles/mastodon/components.scss | 2 +- 7 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/javascript/mastodon/components/status_action_bar.js b/app/javascript/mastodon/components/status_action_bar.js index a21b066a5..1d8fe23da 100644 --- a/app/javascript/mastodon/components/status_action_bar.js +++ b/app/javascript/mastodon/components/status_action_bar.js @@ -266,6 +266,7 @@ class StatusActionBar extends ImmutablePureComponent { menu.push({ text: intl.formatMessage(messages.redraft), action: this.handleRedraftClick }); } else { menu.push({ text: intl.formatMessage(messages.mention, { name: account.get('username') }), action: this.handleMentionClick }); + menu.push({ text: intl.formatMessage(messages.direct, { name: account.get('username') }), action: this.handleDirectClick }); menu.push(null); if (relationship && relationship.get('muting')) { diff --git a/app/javascript/mastodon/features/account/components/header.js b/app/javascript/mastodon/features/account/components/header.js index 83dc8d9b8..2830bee29 100644 --- a/app/javascript/mastodon/features/account/components/header.js +++ b/app/javascript/mastodon/features/account/components/header.js @@ -177,6 +177,7 @@ class Header extends ImmutablePureComponent { if (account.get('id') !== me) { menu.push({ text: intl.formatMessage(messages.mention, { name: account.get('username') }), action: this.props.onMention }); + menu.push({ text: intl.formatMessage(messages.direct, { name: account.get('username') }), action: this.props.onDirect }); menu.push(null); } diff --git a/app/javascript/mastodon/features/direct_timeline/index.js b/app/javascript/mastodon/features/direct_timeline/index.js index 46a56e942..debb2d721 100644 --- a/app/javascript/mastodon/features/direct_timeline/index.js +++ b/app/javascript/mastodon/features/direct_timeline/index.js @@ -10,7 +10,7 @@ import { connectDirectStream } from '../../actions/streaming'; import ConversationsListContainer from './containers/conversations_list_container'; const messages = defineMessages({ - title: { id: 'column.conversations', defaultMessage: 'Conversations' }, + title: { id: 'column.direct', defaultMessage: 'Direct messages' }, }); export default @connect() @@ -91,7 +91,8 @@ class DirectTimeline extends React.PureComponent { scrollKey={`direct_timeline-${columnId}`} timelineId='direct' onLoadMore={this.handleLoadMore} - emptyMessage={} + prepend={
} + emptyMessage={} /> ); diff --git a/app/javascript/mastodon/features/getting_started/index.js b/app/javascript/mastodon/features/getting_started/index.js index 678fb089c..65cee7498 100644 --- a/app/javascript/mastodon/features/getting_started/index.js +++ b/app/javascript/mastodon/features/getting_started/index.js @@ -22,7 +22,7 @@ const messages = defineMessages({ settings_subheading: { id: 'column_subheading.settings', defaultMessage: 'Settings' }, community_timeline: { id: 'navigation_bar.community_timeline', defaultMessage: 'Local timeline' }, explore: { id: 'navigation_bar.explore', defaultMessage: 'Explore' }, - direct: { id: 'column.conversations', defaultMessage: 'Conversations' }, + direct: { id: 'navigation_bar.direct', defaultMessage: 'Direct messages' }, bookmarks: { id: 'navigation_bar.bookmarks', defaultMessage: 'Bookmarks' }, preferences: { id: 'navigation_bar.preferences', defaultMessage: 'Preferences' }, follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' }, diff --git a/app/javascript/mastodon/features/keyboard_shortcuts/index.js b/app/javascript/mastodon/features/keyboard_shortcuts/index.js index 5f38e2f4e..8f1631d82 100644 --- a/app/javascript/mastodon/features/keyboard_shortcuts/index.js +++ b/app/javascript/mastodon/features/keyboard_shortcuts/index.js @@ -122,7 +122,7 @@ class KeyboardShortcuts extends ImmutablePureComponent { g+d - + g+s diff --git a/app/javascript/mastodon/features/ui/components/navigation_panel.js b/app/javascript/mastodon/features/ui/components/navigation_panel.js index 9a3940b5b..fe4ed5d77 100644 --- a/app/javascript/mastodon/features/ui/components/navigation_panel.js +++ b/app/javascript/mastodon/features/ui/components/navigation_panel.js @@ -16,7 +16,7 @@ const NavigationPanel = () => ( - + diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index c04b30420..472fa9407 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -4053,7 +4053,7 @@ a.status-card.compact:hover { } & > span { - max-width: 400px; + max-width: 500px; } a {