Skip to content

armgit / Piik

Public Imported from GitHub
0

Free, open-source screen sharing for private live streams with friends. Watch together in a browser or self-host Piik. 免费开源的私密屏幕共享,支持游戏直播、一起看电影与自部署。

fix(ui): make invitation links selectable (#330)

AAAcc633c9af85d
diff --git a/src/client/pages/HostPage.tsx b/src/client/pages/HostPage.tsx
index dc24bb1e..a21d213e 100644
--- a/src/client/pages/HostPage.tsx
+++ b/src/client/pages/HostPage.tsx
@@ -2981,9 +2981,17 @@ export function HostPage({ onAuthorizationRequired }: HostPageProps = {}) {
/>
</RowGroup>
{room.inviteUrl ? (
- <code className="lr-invite-url" title={room.inviteUrl}>
- {room.inviteUrl}
- </code>
+ <input
+ className="lr-invite-url"
+ type="text"
+ dir="ltr"
+ value={room.inviteUrl}
+ readOnly
+ spellCheck={false}
+ aria-label={t("host.invite")}
+ title={room.inviteUrl}
+ onFocus={(event) => event.currentTarget.select()}
+ />
) : null}
<span className="lr-divider" aria-hidden="true" />
<RowGroup>
diff --git a/src/client/styles.css b/src/client/styles.css
index b3eefbe5..144d5783 100644
--- a/src/client/styles.css
+++ b/src/client/styles.css
@@ -652,11 +652,12 @@ html[data-theme="dark"] .lr-viewer-host-slot svg { color: #9bb0c5; }
border-radius: 8px;
background: var(--wall-2);
color: var(--ink);
+ cursor: text;
font-family: var(--mono);
font-size: 11px;
- text-overflow: ellipsis;
- white-space: nowrap;
- user-select: all;
+ outline: 0;
+ text-align: left;
+ user-select: text;
}
html[data-theme="dark"] .lr-invite-url { background: #1a2634; border-color: #33465c; }
.lr-status-text {