Skip to content

Commit e7d3485

Browse files
feat: copy magnet link button
1 parent 3d0ab20 commit e7d3485

2 files changed

Lines changed: 18 additions & 8 deletions

File tree

src/argo-shared-archive-list.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -437,12 +437,20 @@ export class ArgoSharedArchiveList extends LitElement {
437437
>
438438
Copy Link
439439
</md-filled-button>
440-
<md-icon-button
441-
@click=${() => this._unseed(archive.id)}
442-
aria-label="Unshare"
443-
>
444-
<md-icon>share_off</md-icon>
445-
</md-icon-button>
440+
<div style="display: flex; gap: 0.25rem;">
441+
<md-icon-button
442+
@click=${() => this._copyLink(archive.magnetURI)}
443+
aria-label="P2P"
444+
>
445+
<md-icon>p2p</md-icon>
446+
</md-icon-button>
447+
<md-icon-button
448+
@click=${() => this._unseed(archive.id)}
449+
aria-label="Unshare"
450+
>
451+
<md-icon>share_off</md-icon>
452+
</md-icon-button>
453+
</div>
446454
</div>
447455
</details>
448456
</md-elevated-card>

src/sidepanel.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,11 +501,13 @@ class ArgoViewer extends LitElement {
501501
navigator.clipboard
502502
.writeText(replayLink)
503503
.then(() => {
504-
alert(`Magnet link copied to clipboard:\n${replayLink}`);
504+
alert(
505+
`ReplayWeb.page copied to clipboard (just paste it in the address bar):\n${replayLink}`,
506+
);
505507
})
506508
.catch((err) => {
507509
console.error("Failed to copy magnet link:", err);
508-
alert(`Magnet Link Ready:\n${replayLink}`);
510+
alert(`ReplayWeb.page Ready:\n${replayLink}`);
509511
});
510512

511513
const existing = await getSharedArchives();

0 commit comments

Comments
 (0)