Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/chat-e2e/src/testData/expectedConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const ExpectedConstants = {
regenerateResponseToContinueTooltip:
'Please regenerate response to continue working with chat',
regenerateResponseTooltip: 'Regenerate response',
sharedConversationTooltip: 'Shared',
sharedConversationTooltip: 'Shared by me',
sharedConversationName: (name: string) => `Share: ${name}`,
sharedLink: (invitationLink: string) => {
const invitationPath = '/v1/invitations/';
Expand Down
14 changes: 9 additions & 5 deletions apps/chat/src/components/Common/ShareIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export default function ShareIcon({
iconClassName,
iconWrapperClassName,
isMyEntity,
sharedWithMe,
}: ShareIconProps) {
const { t } = useTranslation(Translation.SideBar);
const isApplication = featureType === FeatureType.Application;
Expand All @@ -54,7 +55,7 @@ export default function ShareIcon({
);

if (
(!isSharingEnabled || !isShared) &&
(!isSharingEnabled || (!isShared && (!sharedWithMe || !isApplication))) &&
(!isPublishingEnabled || !isPublished) &&
!isMyEntity
) {
Expand All @@ -64,7 +65,7 @@ export default function ShareIcon({
const AdditionalIcon =
isPublished && isPublishingEnabled
? World
: isShared
: isShared || sharedWithMe
? ArrowUpRight
: IconPencil;

Expand All @@ -89,10 +90,12 @@ export default function ShareIcon({
<Tooltip
tooltip={
isPublished
? t('Published')
? t('Published by me')
: isShared
? t('Shared')
: t('Created by me')
? t('Shared by me')
: sharedWithMe
? t('Shared with me')
: t('Created by me')
}
>
<AdditionalIcon
Expand All @@ -107,6 +110,7 @@ export default function ShareIcon({
? 'rounded-none rounded-tr-[4px] stroke-[0.6]'
: 'rounded-sm stroke-[1.5]',
isMyEntityIcon && '!stroke-[1.5]',
sharedWithMe && !isShared && 'rotate-180',
iconClassName,
)}
/>
Expand Down