From d911439f0f33d370e1e390e4d1009fa36187fb15 Mon Sep 17 00:00:00 2001 From: Josh Perez <60019601+josh-signal@users.noreply.github.com> Date: Thu, 22 Sep 2022 14:56:49 -0400 Subject: [PATCH] Include distribution list name on sent stories --- stylesheets/components/StoryViewer.scss | 28 ++++++++++++++++++- ts/components/StoryViewer.stories.tsx | 1 + ts/components/StoryViewer.tsx | 37 +++++++++++++++---------- ts/state/selectors/stories.ts | 25 +++++++++++++++-- ts/state/smart/StoryViewer.tsx | 3 +- 5 files changed, 76 insertions(+), 18 deletions(-) diff --git a/stylesheets/components/StoryViewer.scss b/stylesheets/components/StoryViewer.scss index c13795516..2a82ba351 100644 --- a/stylesheets/components/StoryViewer.scss +++ b/stylesheets/components/StoryViewer.scss @@ -56,13 +56,33 @@ &__meta { bottom: 0; left: 50%; + min-width: 284px; padding: 0 16px; position: absolute; transform: translateX(-50%); - min-width: 284px; width: 56.25vh; z-index: $z-index-story-meta; + &__list { + @include font-body-2; + align-items: center; + display: flex; + color: $color-white-alpha-80; + margin-left: 8px; + + &::before { + @include color-svg( + '../images/icons/v2/lock-solid-24.svg', + $color-white-alpha-80 + ); + content: ''; + display: block; + height: 14px; + margin-right: 6px; + width: 14px; + } + } + &--group-avatar { margin-left: -8px; } @@ -82,6 +102,12 @@ &__playback-bar { display: flex; justify-content: space-between; + user-select: none; + + &__container { + align-items: center; + display: flex; + } } &__playback-controls { diff --git a/ts/components/StoryViewer.stories.tsx b/ts/components/StoryViewer.stories.tsx index cbb894996..6118a853d 100644 --- a/ts/components/StoryViewer.stories.tsx +++ b/ts/components/StoryViewer.stories.tsx @@ -147,6 +147,7 @@ export const YourStory = Template.bind({}); ); YourStory.args = { + distributionListName: 'Close Friends', story: { ...storyView, sender: { diff --git a/ts/components/StoryViewer.tsx b/ts/components/StoryViewer.tsx index 0f74cb3cd..6bc999b4f 100644 --- a/ts/components/StoryViewer.tsx +++ b/ts/components/StoryViewer.tsx @@ -44,6 +44,7 @@ import { useEscapeHandling } from '../hooks/useEscapeHandling'; export type PropsType = { currentIndex: number; deleteStoryForEveryone: (story: StoryViewType) => unknown; + distributionListName?: string; getPreferredBadge: PreferredBadgeSelectorType; group?: Pick< ConversationType, @@ -104,6 +105,7 @@ enum Arrow { export const StoryViewer = ({ currentIndex, deleteStoryForEveryone, + distributionListName, getPreferredBadge, group, hasActiveCall, @@ -572,7 +574,7 @@ export const StoryViewer = ({ )}
-
+
)} -
- {(group && - i18n('Stories__from-to-group', { - name: isMe ? i18n('you') : title, - group: group.title, - })) || - (isMe ? i18n('you') : title)} +
+
+ {(group && + i18n('Stories__from-to-group', { + name: isMe ? i18n('you') : title, + group: group.title, + })) || + (isMe ? i18n('you') : title)} +
+ + {distributionListName && ( +
+ {distributionListName} +
+ )}
-