Add bunker login for desktop via QR code

This commit is contained in:
2026-04-19 16:01:45 +04:00
parent 99d8ca9174
commit 6cfe2b40b9
6 changed files with 172 additions and 4 deletions

View File

@@ -62,6 +62,10 @@ export default class NostrAuthService extends Service {
}
}
get isMobile() {
return /Mobi|Android|iPhone|iPad/i.test(navigator.userAgent);
}
get isConnected() {
return (
!!this.pubkey &&
@@ -153,8 +157,10 @@ export default class NostrAuthService extends Service {
icons: [],
});
// Trigger the deep link intent immediately for the user
window.location.href = this.connectUri;
// Trigger the deep link intent immediately for the user if on mobile
if (this.isMobile) {
window.location.href = this.connectUri;
}
// Start listening to the relay
await this._signerInstance.open();