Fix group link wrapping in convo details
This commit is contained in:
parent
60d3e72e6b
commit
d66ce9ad6a
4 changed files with 30 additions and 3 deletions
|
|
@ -5659,6 +5659,10 @@
|
||||||
"messageformat": "Require an admin to approve new members joining via the group link",
|
"messageformat": "Require an admin to approve new members joining via the group link",
|
||||||
"description": "Description for the require new member admin approval select area"
|
"description": "Description for the require new member admin approval select area"
|
||||||
},
|
},
|
||||||
|
"icu:GroupLinkManagement__CopyGroupLinkButtonLabel": {
|
||||||
|
"messageformat": "Copy signal.group link to keyboard",
|
||||||
|
"description": "GroupLinkManagement > Header > Group link text > Button (looks like normal text) > Accessibility label"
|
||||||
|
},
|
||||||
"icu:PendingInvites--tab-requests": {
|
"icu:PendingInvites--tab-requests": {
|
||||||
"messageformat": "Requests ({count, number})",
|
"messageformat": "Requests ({count, number})",
|
||||||
"description": "Label for the tab to view pending requests"
|
"description": "Label for the tab to view pending requests"
|
||||||
|
|
|
||||||
|
|
@ -377,6 +377,13 @@
|
||||||
color: light-dark(variables.$color-gray-60, variables.$color-gray-25);
|
color: light-dark(variables.$color-gray-60, variables.$color-gray-25);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__info .ConversationDetails__panel-row__group-link {
|
||||||
|
@include mixins.button-reset();
|
||||||
|
& {
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&__right {
|
&__right {
|
||||||
position: relative;
|
position: relative;
|
||||||
color: variables.$color-gray-45;
|
color: variables.$color-gray-45;
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import { Select } from '../../Select';
|
||||||
import { SignalService as Proto } from '../../../protobuf';
|
import { SignalService as Proto } from '../../../protobuf';
|
||||||
|
|
||||||
import { copyGroupLink } from '../../../util/copyLinksWithToast';
|
import { copyGroupLink } from '../../../util/copyLinksWithToast';
|
||||||
|
import { drop } from '../../../util/drop';
|
||||||
import { useDelayedRestoreFocus } from '../../../hooks/useRestoreFocus';
|
import { useDelayedRestoreFocus } from '../../../hooks/useRestoreFocus';
|
||||||
import { useUniqueId } from '../../../hooks/useUniqueId';
|
import { useUniqueId } from '../../../hooks/useUniqueId';
|
||||||
|
|
||||||
|
|
@ -67,7 +68,22 @@ export function GroupLinkManagement({
|
||||||
conversation.groupLink &&
|
conversation.groupLink &&
|
||||||
conversation.accessControlAddFromInviteLink !==
|
conversation.accessControlAddFromInviteLink !==
|
||||||
AccessControlEnum.UNSATISFIABLE;
|
AccessControlEnum.UNSATISFIABLE;
|
||||||
const groupLinkInfo = hasGroupLink ? conversation.groupLink : '';
|
|
||||||
|
let groupLinkInfo: JSX.Element | undefined;
|
||||||
|
if (hasGroupLink) {
|
||||||
|
groupLinkInfo = (
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className="ConversationDetails__panel-row__group-link"
|
||||||
|
aria-label={i18n('icu:GroupLinkManagement__CopyGroupLinkButtonLabel')}
|
||||||
|
onClick={() => {
|
||||||
|
drop(copyGroupLink(conversation.groupLink ?? ''));
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{conversation.groupLink}
|
||||||
|
</button>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const [hasGenerateNewLinkDialog, setHasGenerateNewLinkDialog] =
|
const [hasGenerateNewLinkDialog, setHasGenerateNewLinkDialog] =
|
||||||
useState(false);
|
useState(false);
|
||||||
|
|
@ -138,7 +154,7 @@ export function GroupLinkManagement({
|
||||||
ref={!isAdmin ? focusRef : undefined}
|
ref={!isAdmin ? focusRef : undefined}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (conversation.groupLink) {
|
if (conversation.groupLink) {
|
||||||
void copyGroupLink(conversation.groupLink);
|
drop(copyGroupLink(conversation.groupLink));
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ export type Props = {
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
icon?: React.ReactNode;
|
icon?: React.ReactNode;
|
||||||
label: string | React.ReactNode;
|
label: string | React.ReactNode;
|
||||||
info?: string;
|
info?: string | React.ReactNode;
|
||||||
right?: string | React.ReactNode;
|
right?: string | React.ReactNode;
|
||||||
actions?: React.ReactNode;
|
actions?: React.ReactNode;
|
||||||
onClick?: () => void;
|
onClick?: () => void;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue