Fix identifier wrapping
Fixes https://github.com/matrix-org/matrix.to/issues/153
This commit is contained in:
parent
11fd9e1c0f
commit
0e770d81d6
@ -40,7 +40,10 @@ const Nheko: TextClient = {
|
|||||||
<span>
|
<span>
|
||||||
Type{' '}
|
Type{' '}
|
||||||
<code>
|
<code>
|
||||||
/join <b>{link.identifier}</b>
|
/join{' '}
|
||||||
|
<b className="matrixIdentifier">
|
||||||
|
{link.identifier}
|
||||||
|
</b>
|
||||||
</code>
|
</code>
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
@ -49,7 +52,10 @@ const Nheko: TextClient = {
|
|||||||
<span>
|
<span>
|
||||||
Type{' '}
|
Type{' '}
|
||||||
<code>
|
<code>
|
||||||
/invite <b>{link.identifier}</b>
|
/invite{' '}
|
||||||
|
<b className="matrixIdentifier">
|
||||||
|
{link.identifier}
|
||||||
|
</b>
|
||||||
</code>
|
</code>
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
@ -40,7 +40,10 @@ const Weechat: TextClient = {
|
|||||||
<span>
|
<span>
|
||||||
Type{' '}
|
Type{' '}
|
||||||
<code>
|
<code>
|
||||||
/join <b>{link.identifier}</b>
|
/join{' '}
|
||||||
|
<b className="matrixIdentifier">
|
||||||
|
{link.identifier}
|
||||||
|
</b>
|
||||||
</code>
|
</code>
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
@ -49,7 +52,10 @@ const Weechat: TextClient = {
|
|||||||
<span>
|
<span>
|
||||||
Type{' '}
|
Type{' '}
|
||||||
<code>
|
<code>
|
||||||
/invite <b>{link.identifier}</b>
|
/invite{' '}
|
||||||
|
<b className="matrixIdentifier">
|
||||||
|
{link.identifier}
|
||||||
|
</b>
|
||||||
</code>
|
</code>
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
@ -35,10 +35,6 @@ limitations under the License.
|
|||||||
color: $foreground;
|
color: $foreground;
|
||||||
}
|
}
|
||||||
|
|
||||||
.linkHeader h1 {
|
|
||||||
word-break: break-all;
|
|
||||||
}
|
|
||||||
|
|
||||||
.createLinkReset {
|
.createLinkReset {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
|
@ -128,7 +128,7 @@ const LinkCreatedTile: React.FC<ILinkCreatedTileProps> = (props) => {
|
|||||||
<div>New link</div>
|
<div>New link</div>
|
||||||
<img src={refreshIcon} alt="Go back to matrix.to home page" />
|
<img src={refreshIcon} alt="Go back to matrix.to home page" />
|
||||||
</button>
|
</button>
|
||||||
<h1 className="linkHeader">{props.link}</h1>
|
<h1 className="linkHeader matrixIdentifier">{props.link}</h1>
|
||||||
<Button
|
<Button
|
||||||
flashChildren={'Copied'}
|
flashChildren={'Copied'}
|
||||||
icon={copyIcon}
|
icon={copyIcon}
|
||||||
|
@ -19,8 +19,4 @@ limitations under the License.
|
|||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
|
||||||
word-break: break-all;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ const DefaultPreview: React.FC<IProps> = ({ link }: IProps) => {
|
|||||||
avatarUrl={genericRoomPreview}
|
avatarUrl={genericRoomPreview}
|
||||||
label={`Generic icon representing ${link.identifier}`}
|
label={`Generic icon representing ${link.identifier}`}
|
||||||
/>
|
/>
|
||||||
<h1>{link.identifier}</h1>
|
<h1 className="matrixIdentifier">{link.identifier}</h1>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -91,7 +91,12 @@ const HomeserverOptions: React.FC<IProps> = ({ link }: IProps) => {
|
|||||||
<Tile className="homeserverOptions">
|
<Tile className="homeserverOptions">
|
||||||
<div className="homeserverOptionsDescription">
|
<div className="homeserverOptionsDescription">
|
||||||
<div>
|
<div>
|
||||||
<h3>About {link.identifier}</h3>
|
<h3>
|
||||||
|
About
|
||||||
|
<span className="matrixIdentifier">
|
||||||
|
{link.identifier}
|
||||||
|
</span>
|
||||||
|
</h3>
|
||||||
<p>
|
<p>
|
||||||
A homeserver will show you metadata about the link, like
|
A homeserver will show you metadata about the link, like
|
||||||
a description. Homeservers will be able to relate your
|
a description. Homeservers will be able to relate your
|
||||||
|
@ -53,7 +53,7 @@ const InviteTile: React.FC<IProps> = ({ children, client, link }: IProps) => {
|
|||||||
Accept invite
|
Accept invite
|
||||||
</LinkButton>
|
</LinkButton>
|
||||||
);
|
);
|
||||||
inviteUseString = `Accepting will open ${link.identifier} in ${client.name}.`;
|
inviteUseString = `Accepting will open this link in ${client.name}.`;
|
||||||
break;
|
break;
|
||||||
case ClientKind.TEXT_CLIENT:
|
case ClientKind.TEXT_CLIENT:
|
||||||
// TODO: copy to clipboard
|
// TODO: copy to clipboard
|
||||||
|
@ -137,7 +137,12 @@ const LinkPreview: React.FC<IProps> = ({ link }: IProps) => {
|
|||||||
checked={showHSOptions}
|
checked={showHSOptions}
|
||||||
onChange={(): void => setShowHSOPtions(!showHSOptions)}
|
onChange={(): void => setShowHSOPtions(!showHSOptions)}
|
||||||
>
|
>
|
||||||
About {link.identifier}
|
<span>
|
||||||
|
About
|
||||||
|
<span className="matrixIdentifier">
|
||||||
|
{link.identifier}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
</Toggle>
|
</Toggle>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -38,9 +38,11 @@ const RoomPreview: React.FC<IProps> = ({ room }: IProps) => {
|
|||||||
return (
|
return (
|
||||||
<div className="roomPreview">
|
<div className="roomPreview">
|
||||||
<RoomAvatar room={room} />
|
<RoomAvatar room={room} />
|
||||||
<h1>{room.name ? room.name : roomAlias}</h1>
|
<h1 className="matrixIdentifier">
|
||||||
|
{room.name ? room.name : roomAlias}
|
||||||
|
</h1>
|
||||||
{members}
|
{members}
|
||||||
<p>{roomAlias}</p>
|
<p className="matrixIdentifier">{roomAlias}</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -67,9 +67,12 @@ export const InviterPreview: React.FC<InviterPreviewProps> = ({
|
|||||||
<div className={className}>
|
<div className={className}>
|
||||||
<div>
|
<div>
|
||||||
<h1>
|
<h1>
|
||||||
Invited by <b>{user ? user.displayname : userId}</b>
|
Invited by{' '}
|
||||||
|
<b className="matrixIdentifier">
|
||||||
|
{user ? user.displayname : userId}
|
||||||
|
</b>
|
||||||
</h1>
|
</h1>
|
||||||
{user ? <p>{userId}</p> : null}
|
{user ? <p className="matrixIdentifier">{userId}</p> : null}
|
||||||
</div>
|
</div>
|
||||||
{avatar}
|
{avatar}
|
||||||
</div>
|
</div>
|
||||||
|
@ -64,3 +64,7 @@ hr {
|
|||||||
border: 1px solid lighten($grey, 50);
|
border: 1px solid lighten($grey, 50);
|
||||||
margin: 0 40px;
|
margin: 0 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.matrixIdentifier {
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user