diff --git a/Cargo.lock b/Cargo.lock
index be5cfa25..90fd9477 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -197,7 +197,7 @@ dependencies = [
"url",
"wayland-backend",
"wayland-client",
- "wayland-protocols 0.32.9",
+ "wayland-protocols",
"zbus",
]
@@ -1050,9 +1050,9 @@ dependencies = [
[[package]]
name = "cmake"
-version = "0.1.56"
+version = "0.1.57"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b042e5d8a74ae91bb0961acd039822472ec99f8ab0948cbf6d1369588f8be586"
+checksum = "75443c44cd6b379beb8c5b45d85d0773baf31cce901fe7bb252f4eff3008ef7d"
dependencies = [
"cc",
]
@@ -1131,7 +1131,7 @@ dependencies = [
[[package]]
name = "collections"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
+source = "git+https://github.com/zed-industries/zed#6976208e21436e88a4a5a094b440d41c482c5c84"
dependencies = [
"indexmap",
"rustc-hash 2.1.1",
@@ -1520,7 +1520,7 @@ dependencies = [
[[package]]
name = "derive_refineable"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
+source = "git+https://github.com/zed-industries/zed#6976208e21436e88a4a5a094b440d41c482c5c84"
dependencies = [
"proc-macro2",
"quote",
@@ -1684,7 +1684,7 @@ dependencies = [
"cc",
"memchr",
"rustc_version",
- "toml 0.9.8",
+ "toml 0.9.10+spec-1.1.0",
"vswhom",
"winreg",
]
@@ -2402,7 +2402,7 @@ dependencies = [
[[package]]
name = "gpui"
version = "0.2.2"
-source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
+source = "git+https://github.com/zed-industries/zed#6976208e21436e88a4a5a094b440d41c482c5c84"
dependencies = [
"anyhow",
"as-raw-xcb-connection",
@@ -2484,7 +2484,7 @@ dependencies = [
"wayland-backend",
"wayland-client",
"wayland-cursor",
- "wayland-protocols 0.31.2",
+ "wayland-protocols",
"wayland-protocols-plasma",
"wayland-protocols-wlr",
"windows 0.61.3",
@@ -2502,7 +2502,7 @@ dependencies = [
[[package]]
name = "gpui-component"
version = "0.5.0"
-source = "git+https://github.com/longbridge/gpui-component#749c69c159edff3a7f5f216647816f9ebb1ce970"
+source = "git+https://github.com/longbridge/gpui-component#88fda3635111d9e9928d3838fea71852e137bda5"
dependencies = [
"aho-corasick",
"anyhow",
@@ -2540,7 +2540,7 @@ dependencies = [
[[package]]
name = "gpui-component-macros"
version = "0.5.0"
-source = "git+https://github.com/longbridge/gpui-component#749c69c159edff3a7f5f216647816f9ebb1ce970"
+source = "git+https://github.com/longbridge/gpui-component#88fda3635111d9e9928d3838fea71852e137bda5"
dependencies = [
"proc-macro2",
"quote",
@@ -2562,7 +2562,7 @@ dependencies = [
[[package]]
name = "gpui_macros"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
+source = "git+https://github.com/zed-industries/zed#6976208e21436e88a4a5a094b440d41c482c5c84"
dependencies = [
"heck 0.5.0",
"proc-macro2",
@@ -2573,7 +2573,7 @@ dependencies = [
[[package]]
name = "gpui_tokio"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
+source = "git+https://github.com/zed-industries/zed#6976208e21436e88a4a5a094b440d41c482c5c84"
dependencies = [
"anyhow",
"gpui",
@@ -2800,7 +2800,7 @@ dependencies = [
[[package]]
name = "http_client"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
+source = "git+https://github.com/zed-industries/zed#6976208e21436e88a4a5a094b440d41c482c5c84"
dependencies = [
"anyhow",
"async-compression",
@@ -2825,7 +2825,7 @@ dependencies = [
[[package]]
name = "http_client_tls"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
+source = "git+https://github.com/zed-industries/zed#6976208e21436e88a4a5a094b440d41c482c5c84"
dependencies = [
"rustls",
"rustls-platform-verifier",
@@ -3522,6 +3522,7 @@ dependencies = [
"nostr-connect",
"nostr-sdk",
"person",
+ "qrcode",
"reqwest_client",
"serde",
"serde_json",
@@ -3529,6 +3530,7 @@ dependencies = [
"smol",
"state",
"tracing-subscriber",
+ "webbrowser",
]
[[package]]
@@ -3666,7 +3668,7 @@ dependencies = [
[[package]]
name = "media"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
+source = "git+https://github.com/zed-industries/zed#6976208e21436e88a4a5a094b440d41c482c5c84"
dependencies = [
"anyhow",
"bindgen",
@@ -3828,6 +3830,12 @@ dependencies = [
"tempfile",
]
+[[package]]
+name = "ndk-context"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b"
+
[[package]]
name = "negentropy"
version = "0.5.0"
@@ -3902,7 +3910,7 @@ dependencies = [
[[package]]
name = "nostr"
version = "0.44.1"
-source = "git+https://github.com/rust-nostr/nostr#577390dd1ffd7bc1fc577a96b9334b7894212dea"
+source = "git+https://github.com/rust-nostr/nostr#8eafecf1151110b698a51c674caa3d23ddd61368"
dependencies = [
"aes",
"base64",
@@ -3915,7 +3923,7 @@ dependencies = [
"hex",
"instant",
"once_cell",
- "rand 0.8.5",
+ "rand 0.9.2",
"scrypt",
"secp256k1",
"serde",
@@ -3927,7 +3935,7 @@ dependencies = [
[[package]]
name = "nostr-connect"
version = "0.44.0"
-source = "git+https://github.com/rust-nostr/nostr#577390dd1ffd7bc1fc577a96b9334b7894212dea"
+source = "git+https://github.com/rust-nostr/nostr#8eafecf1151110b698a51c674caa3d23ddd61368"
dependencies = [
"async-utility",
"nostr",
@@ -3939,7 +3947,7 @@ dependencies = [
[[package]]
name = "nostr-database"
version = "0.44.0"
-source = "git+https://github.com/rust-nostr/nostr#577390dd1ffd7bc1fc577a96b9334b7894212dea"
+source = "git+https://github.com/rust-nostr/nostr#8eafecf1151110b698a51c674caa3d23ddd61368"
dependencies = [
"btreecap",
"flatbuffers",
@@ -3951,7 +3959,7 @@ dependencies = [
[[package]]
name = "nostr-gossip"
version = "0.44.0"
-source = "git+https://github.com/rust-nostr/nostr#577390dd1ffd7bc1fc577a96b9334b7894212dea"
+source = "git+https://github.com/rust-nostr/nostr#8eafecf1151110b698a51c674caa3d23ddd61368"
dependencies = [
"nostr",
]
@@ -3959,7 +3967,7 @@ dependencies = [
[[package]]
name = "nostr-gossip-memory"
version = "0.44.0"
-source = "git+https://github.com/rust-nostr/nostr#577390dd1ffd7bc1fc577a96b9334b7894212dea"
+source = "git+https://github.com/rust-nostr/nostr#8eafecf1151110b698a51c674caa3d23ddd61368"
dependencies = [
"indexmap",
"lru",
@@ -3971,7 +3979,7 @@ dependencies = [
[[package]]
name = "nostr-lmdb"
version = "0.44.0"
-source = "git+https://github.com/rust-nostr/nostr#577390dd1ffd7bc1fc577a96b9334b7894212dea"
+source = "git+https://github.com/rust-nostr/nostr#8eafecf1151110b698a51c674caa3d23ddd61368"
dependencies = [
"async-utility",
"flume 0.11.1",
@@ -3985,7 +3993,7 @@ dependencies = [
[[package]]
name = "nostr-relay-pool"
version = "0.44.0"
-source = "git+https://github.com/rust-nostr/nostr#577390dd1ffd7bc1fc577a96b9334b7894212dea"
+source = "git+https://github.com/rust-nostr/nostr#8eafecf1151110b698a51c674caa3d23ddd61368"
dependencies = [
"async-utility",
"async-wsocket",
@@ -4002,7 +4010,7 @@ dependencies = [
[[package]]
name = "nostr-sdk"
version = "0.44.1"
-source = "git+https://github.com/rust-nostr/nostr#577390dd1ffd7bc1fc577a96b9334b7894212dea"
+source = "git+https://github.com/rust-nostr/nostr#8eafecf1151110b698a51c674caa3d23ddd61368"
dependencies = [
"async-utility",
"nostr",
@@ -4545,7 +4553,7 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
[[package]]
name = "perf"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
+source = "git+https://github.com/zed-industries/zed#6976208e21436e88a4a5a094b440d41c482c5c84"
dependencies = [
"collections",
"serde",
@@ -4787,7 +4795,7 @@ version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983"
dependencies = [
- "toml_edit 0.23.9",
+ "toml_edit 0.23.10+spec-1.0.0",
]
[[package]]
@@ -4868,6 +4876,15 @@ dependencies = [
"bytemuck",
]
+[[package]]
+name = "qrcode"
+version = "0.14.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d68782463e408eb1e668cf6152704bd856c78c5b6417adaee3203d8f4c1fc9ec"
+dependencies = [
+ "image",
+]
+
[[package]]
name = "quick-error"
version = "2.0.1"
@@ -5186,7 +5203,7 @@ dependencies = [
[[package]]
name = "refineable"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
+source = "git+https://github.com/zed-industries/zed#6976208e21436e88a4a5a094b440d41c482c5c84"
dependencies = [
"derive_refineable",
]
@@ -5267,7 +5284,7 @@ dependencies = [
[[package]]
name = "reqwest_client"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
+source = "git+https://github.com/zed-industries/zed#6976208e21436e88a4a5a094b440d41c482c5c84"
dependencies = [
"anyhow",
"bytes",
@@ -5508,9 +5525,9 @@ dependencies = [
[[package]]
name = "rustls-pki-types"
-version = "1.13.1"
+version = "1.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "708c0f9d5f54ba0272468c1d306a52c495b31fa155e91bc25371e6df7996908c"
+checksum = "21e6f2ab2928ca4291b86736a8bd920a277a399bba1589409d72154ff87c1282"
dependencies = [
"web-time",
"zeroize",
@@ -5878,9 +5895,9 @@ dependencies = [
[[package]]
name = "serde_spanned"
-version = "1.0.3"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e24345aa0fe688594e73770a5f6d1b216508b4f93484c0026d521acd30134392"
+checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776"
dependencies = [
"serde_core",
]
@@ -6245,7 +6262,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]]
name = "sum_tree"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
+source = "git+https://github.com/zed-industries/zed#6976208e21436e88a4a5a094b440d41c482c5c84"
dependencies = [
"arrayvec",
"log",
@@ -6741,14 +6758,14 @@ dependencies = [
[[package]]
name = "toml"
-version = "0.9.8"
+version = "0.9.10+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0dc8b1fb61449e27716ec0e1bdf0f6b8f3e8f6b05391e8497b8b6d7804ea6d8"
+checksum = "0825052159284a1a8b4d6c0c86cbc801f2da5afd2b225fa548c72f2e74002f48"
dependencies = [
"indexmap",
"serde_core",
- "serde_spanned 1.0.3",
- "toml_datetime 0.7.3",
+ "serde_spanned 1.0.4",
+ "toml_datetime 0.7.5+spec-1.1.0",
"toml_parser",
"toml_writer",
"winnow",
@@ -6765,9 +6782,9 @@ dependencies = [
[[package]]
name = "toml_datetime"
-version = "0.7.3"
+version = "0.7.5+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533"
+checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347"
dependencies = [
"serde_core",
]
@@ -6788,21 +6805,21 @@ dependencies = [
[[package]]
name = "toml_edit"
-version = "0.23.9"
+version = "0.23.10+spec-1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d7cbc3b4b49633d57a0509303158ca50de80ae32c265093b24c414705807832"
+checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269"
dependencies = [
"indexmap",
- "toml_datetime 0.7.3",
+ "toml_datetime 0.7.5+spec-1.1.0",
"toml_parser",
"winnow",
]
[[package]]
name = "toml_parser"
-version = "1.0.4"
+version = "1.0.6+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e"
+checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44"
dependencies = [
"winnow",
]
@@ -6815,9 +6832,9 @@ checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801"
[[package]]
name = "toml_writer"
-version = "1.0.4"
+version = "1.0.6+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2"
+checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607"
[[package]]
name = "tower"
@@ -6866,9 +6883,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
[[package]]
name = "tracing"
-version = "0.1.43"
+version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2d15d90a0b5c19378952d479dc858407149d7bb45a14de0142f6c534b16fc647"
+checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
dependencies = [
"log",
"pin-project-lite",
@@ -6889,9 +6906,9 @@ dependencies = [
[[package]]
name = "tracing-core"
-version = "0.1.35"
+version = "0.1.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a04e24fab5c89c6a36eb8558c9656f30d81de51dfa4d3b45f26b21d61fa0a6c"
+checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a"
dependencies = [
"once_cell",
"valuable",
@@ -7201,7 +7218,7 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
[[package]]
name = "util"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
+source = "git+https://github.com/zed-industries/zed#6976208e21436e88a4a5a094b440d41c482c5c84"
dependencies = [
"anyhow",
"async-fs",
@@ -7237,7 +7254,7 @@ dependencies = [
[[package]]
name = "util_macros"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
+source = "git+https://github.com/zed-industries/zed#6976208e21436e88a4a5a094b440d41c482c5c84"
dependencies = [
"perf",
"quote",
@@ -7490,18 +7507,6 @@ dependencies = [
"xcursor",
]
-[[package]]
-name = "wayland-protocols"
-version = "0.31.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4"
-dependencies = [
- "bitflags 2.10.0",
- "wayland-backend",
- "wayland-client",
- "wayland-scanner",
-]
-
[[package]]
name = "wayland-protocols"
version = "0.32.9"
@@ -7516,14 +7521,14 @@ dependencies = [
[[package]]
name = "wayland-protocols-plasma"
-version = "0.2.0"
+version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479"
+checksum = "a07a14257c077ab3279987c4f8bb987851bf57081b93710381daea94f2c2c032"
dependencies = [
"bitflags 2.10.0",
"wayland-backend",
"wayland-client",
- "wayland-protocols 0.31.2",
+ "wayland-protocols",
"wayland-scanner",
]
@@ -7536,7 +7541,7 @@ dependencies = [
"bitflags 2.10.0",
"wayland-backend",
"wayland-client",
- "wayland-protocols 0.32.9",
+ "wayland-protocols",
"wayland-scanner",
]
@@ -7583,6 +7588,22 @@ dependencies = [
"wasm-bindgen",
]
+[[package]]
+name = "webbrowser"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "00f1243ef785213e3a32fa0396093424a3a6ea566f9948497e5a2309261a4c97"
+dependencies = [
+ "core-foundation 0.10.0",
+ "jni",
+ "log",
+ "ndk-context",
+ "objc2",
+ "objc2-foundation",
+ "url",
+ "web-sys",
+]
+
[[package]]
name = "webpki-root-certs"
version = "0.26.11"
@@ -8720,7 +8741,7 @@ dependencies = [
[[package]]
name = "zlog"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
+source = "git+https://github.com/zed-industries/zed#6976208e21436e88a4a5a094b440d41c482c5c84"
dependencies = [
"anyhow",
"chrono",
@@ -8731,7 +8752,7 @@ dependencies = [
[[package]]
name = "ztracing"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
+source = "git+https://github.com/zed-industries/zed#6976208e21436e88a4a5a094b440d41c482c5c84"
dependencies = [
"tracing",
"tracing-subscriber",
@@ -8742,7 +8763,7 @@ dependencies = [
[[package]]
name = "ztracing_macro"
version = "0.1.0"
-source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
+source = "git+https://github.com/zed-industries/zed#6976208e21436e88a4a5a094b440d41c482c5c84"
[[package]]
name = "zune-core"
diff --git a/assets/icons/arrow-right.svg b/assets/icons/arrow-right.svg
new file mode 100644
index 00000000..25355abd
--- /dev/null
+++ b/assets/icons/arrow-right.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/icons/circle-x.svg b/assets/icons/circle-x.svg
new file mode 100644
index 00000000..93c88e96
--- /dev/null
+++ b/assets/icons/circle-x.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/icons/close.svg b/assets/icons/close.svg
new file mode 100644
index 00000000..dc3855b4
--- /dev/null
+++ b/assets/icons/close.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/crates/account/src/lib.rs b/crates/account/src/lib.rs
index 8cddf4f8..0159eaee 100644
--- a/crates/account/src/lib.rs
+++ b/crates/account/src/lib.rs
@@ -112,6 +112,12 @@ impl Account {
self._tasks.push(task);
}
+ /// Set the public key of the account
+ pub fn set_public_key(&mut self, public_key: PublicKey, cx: &mut Context) {
+ self.public_key = Some(public_key);
+ cx.notify();
+ }
+
/// Check if the account entity has a public key
pub fn has_account(&self) -> bool {
self.public_key.is_some()
diff --git a/crates/common/src/constants.rs b/crates/common/src/constants.rs
index 68c87b76..e91fe4e7 100644
--- a/crates/common/src/constants.rs
+++ b/crates/common/src/constants.rs
@@ -16,5 +16,8 @@ pub const BOOTSTRAP_RELAYS: [&str; 5] = [
/// Default relay for Nostr Connect
pub const NOSTR_CONNECT_RELAY: &str = "wss://relay.nsec.app";
+/// Default timeout for Nostr Connect (seconds)
+pub const NOSTR_CONNECT_TIMEOUT: u64 = 30;
+
/// Default width of the sidebar.
pub const DEFAULT_SIDEBAR_WIDTH: f32 = 240.;
diff --git a/crates/lume/Cargo.toml b/crates/lume/Cargo.toml
index 2c03b368..56bb8784 100644
--- a/crates/lume/Cargo.toml
+++ b/crates/lume/Cargo.toml
@@ -34,3 +34,5 @@ futures.workspace = true
flume.workspace = true
tracing-subscriber = { version = "0.3.18", features = ["fmt"] }
+qrcode = "0.14.1"
+webbrowser = "1.0.6"
diff --git a/crates/lume/src/actions.rs b/crates/lume/src/actions.rs
index 1c8a1705..ed8f2e15 100644
--- a/crates/lume/src/actions.rs
+++ b/crates/lume/src/actions.rs
@@ -1,9 +1,24 @@
use std::sync::Mutex;
use gpui::{actions, App};
+use nostr_connect::prelude::*;
actions!(lume, [Quit, About, Open]);
+#[derive(Debug, Clone)]
+pub struct LumeAuthUrlHandler;
+
+impl AuthUrlHandler for LumeAuthUrlHandler {
+ #[allow(mismatched_lifetime_syntaxes)]
+ fn on_auth_url(&self, auth_url: Url) -> BoxedFuture> {
+ Box::pin(async move {
+ log::info!("Received Auth URL: {auth_url}");
+ webbrowser::open(auth_url.as_str())?;
+ Ok(())
+ })
+ }
+}
+
pub fn load_embedded_fonts(cx: &App) {
let asset_source = cx.asset_source();
let font_paths = asset_source.list("fonts").unwrap();
diff --git a/crates/lume/src/panels/login.rs b/crates/lume/src/panels/login.rs
new file mode 100644
index 00000000..fb563353
--- /dev/null
+++ b/crates/lume/src/panels/login.rs
@@ -0,0 +1,384 @@
+use std::time::Duration;
+
+use account::Account;
+use anyhow::{anyhow, Error};
+use common::NOSTR_CONNECT_TIMEOUT;
+use gpui::prelude::FluentBuilder;
+use gpui::{
+ div, relative, App, AppContext, Context, Entity, EventEmitter, FocusHandle, Focusable,
+ IntoElement, ParentElement, Render, SharedString, Styled, Subscription, Window,
+};
+use gpui_component::button::{Button, ButtonVariants};
+use gpui_component::dock::{Panel, PanelEvent};
+use gpui_component::input::{Input, InputEvent, InputState};
+use gpui_component::notification::Notification;
+use gpui_component::{v_flex, ActiveTheme, Disableable, StyledExt, WindowExt};
+use nostr_connect::prelude::*;
+use smallvec::{smallvec, SmallVec};
+use state::client;
+
+use crate::actions::LumeAuthUrlHandler;
+
+pub fn init(window: &mut Window, cx: &mut App) -> Entity {
+ cx.new(|cx| Login::new(window, cx))
+}
+
+pub struct Login {
+ focus_handle: FocusHandle,
+
+ /// Input for nsec for bunker uri
+ key_input: Entity,
+
+ /// Input for decryption password when available
+ pass_input: Entity,
+
+ /// Error message
+ error: Entity