diff --git a/client/src/app/settings/settings.component.html b/client/src/app/settings/settings.component.html index 7b3c537..fc74881 100644 --- a/client/src/app/settings/settings.component.html +++ b/client/src/app/settings/settings.component.html @@ -144,22 +144,36 @@
-

- {{ - canRegisterMagnetHandler - ? "This will attempt to register the client as your browser's default handler for magnet links and automatically open them in the new torrent screen for downloading." - : "Magnet link registration is unavailable because either your browser does not support it or the client is not being served to you in a secure context." - }} + @if (canRegisterMagnetHandler) { + This will attempt to register the client as your browser's default handler for magnet links and automatically open + them in the new torrent screen for downloading. + } @else { + Magnet link registration is unavailable. Your + + browser may not support this feature + + , or the client is not being served in a + + secure context + + . + }

diff --git a/client/src/app/settings/settings.component.ts b/client/src/app/settings/settings.component.ts index 1d8f946..0ef3186 100644 --- a/client/src/app/settings/settings.component.ts +++ b/client/src/app/settings/settings.component.ts @@ -145,10 +145,10 @@ export class SettingsComponent implements OnInit { public registerMagnetHandler(): void { try { - navigator.registerProtocolHandler("magnet", `${window.location.origin}/add?magnet=%s`); - alert("Success! Your browser will now prompt you to confirm and add the client as the default handler for magnet links."); + navigator.registerProtocolHandler('magnet', `${window.location.origin}/add?magnet=%s`); + alert('Success! Your browser will now prompt you to confirm and add the client as the default handler for magnet links.'); } catch (error) { - alert("Magnet link registration failed."); + alert('Magnet link registration failed.'); } } }