wip: refactor
63
Cargo.lock
generated
@@ -458,8 +458,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "async-wsocket"
|
||||
version = "0.11.0"
|
||||
source = "git+https://github.com/yukibtc/async-wsocket?rev=259c0bc372e7d60d94827b484178bf995afdcbe6#259c0bc372e7d60d94827b484178bf995afdcbe6"
|
||||
version = "0.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "34d2efbc332d581321b37a3012c942b0555483030b5cfc1325a95c386b11e27b"
|
||||
dependencies = [
|
||||
"async-utility",
|
||||
"futures",
|
||||
@@ -1140,7 +1141,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collections"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#344284e01331667c018e6ade5d791a20598a3a5c"
|
||||
source = "git+https://github.com/zed-industries/zed#eedbede939b76debb4b4fb6fe3fe8f8fe4ce2ee4"
|
||||
dependencies = [
|
||||
"rustc-hash 1.1.0",
|
||||
]
|
||||
@@ -1476,7 +1477,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "derive_refineable"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#344284e01331667c018e6ade5d791a20598a3a5c"
|
||||
source = "git+https://github.com/zed-industries/zed#eedbede939b76debb4b4fb6fe3fe8f8fe4ce2ee4"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -2188,7 +2189,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gpui"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#344284e01331667c018e6ade5d791a20598a3a5c"
|
||||
source = "git+https://github.com/zed-industries/zed#eedbede939b76debb4b4fb6fe3fe8f8fe4ce2ee4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"as-raw-xcb-connection",
|
||||
@@ -2273,7 +2274,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gpui_macros"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#344284e01331667c018e6ade5d791a20598a3a5c"
|
||||
source = "git+https://github.com/zed-industries/zed#eedbede939b76debb4b4fb6fe3fe8f8fe4ce2ee4"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -2484,7 +2485,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "http_client"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#344284e01331667c018e6ade5d791a20598a3a5c"
|
||||
source = "git+https://github.com/zed-industries/zed#eedbede939b76debb4b4fb6fe3fe8f8fe4ce2ee4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
@@ -3089,7 +3090,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "536e7c782167a2d48346ca0b2677fad19eaef20f19a4ab868e4d5b96ca879def"
|
||||
dependencies = [
|
||||
"bech32",
|
||||
"reqwest 0.12.11",
|
||||
"reqwest 0.12.12",
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
@@ -3161,7 +3162,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "media"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#344284e01331667c018e6ade5d791a20598a3a5c"
|
||||
source = "git+https://github.com/zed-industries/zed#eedbede939b76debb4b4fb6fe3fe8f8fe4ce2ee4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bindgen",
|
||||
@@ -3329,8 +3330,8 @@ checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8"
|
||||
|
||||
[[package]]
|
||||
name = "nostr"
|
||||
version = "0.37.0"
|
||||
source = "git+https://github.com/rust-nostr/nostr#5ef7353789d54931b664639c11df1aa22e9aa37c"
|
||||
version = "0.38.0"
|
||||
source = "git+https://github.com/rust-nostr/nostr#6ccc81ad3b8d9de10d14f2699db09a4c72660e6c"
|
||||
dependencies = [
|
||||
"aes",
|
||||
"async-trait",
|
||||
@@ -3347,7 +3348,7 @@ dependencies = [
|
||||
"negentropy 0.3.1",
|
||||
"negentropy 0.4.3",
|
||||
"once_cell",
|
||||
"reqwest 0.12.11",
|
||||
"reqwest 0.12.12",
|
||||
"scrypt",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -3360,8 +3361,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nostr-database"
|
||||
version = "0.37.0"
|
||||
source = "git+https://github.com/rust-nostr/nostr#5ef7353789d54931b664639c11df1aa22e9aa37c"
|
||||
version = "0.38.0"
|
||||
source = "git+https://github.com/rust-nostr/nostr#6ccc81ad3b8d9de10d14f2699db09a4c72660e6c"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"flatbuffers",
|
||||
@@ -3371,8 +3372,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nostr-lmdb"
|
||||
version = "0.37.0"
|
||||
source = "git+https://github.com/rust-nostr/nostr#5ef7353789d54931b664639c11df1aa22e9aa37c"
|
||||
version = "0.38.0"
|
||||
source = "git+https://github.com/rust-nostr/nostr#6ccc81ad3b8d9de10d14f2699db09a4c72660e6c"
|
||||
dependencies = [
|
||||
"async-utility",
|
||||
"heed",
|
||||
@@ -3383,8 +3384,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nostr-relay-pool"
|
||||
version = "0.37.0"
|
||||
source = "git+https://github.com/rust-nostr/nostr#5ef7353789d54931b664639c11df1aa22e9aa37c"
|
||||
version = "0.38.0"
|
||||
source = "git+https://github.com/rust-nostr/nostr#6ccc81ad3b8d9de10d14f2699db09a4c72660e6c"
|
||||
dependencies = [
|
||||
"async-utility",
|
||||
"async-wsocket",
|
||||
@@ -3399,8 +3400,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nostr-sdk"
|
||||
version = "0.37.0"
|
||||
source = "git+https://github.com/rust-nostr/nostr#5ef7353789d54931b664639c11df1aa22e9aa37c"
|
||||
version = "0.38.0"
|
||||
source = "git+https://github.com/rust-nostr/nostr#6ccc81ad3b8d9de10d14f2699db09a4c72660e6c"
|
||||
dependencies = [
|
||||
"async-utility",
|
||||
"lnurl-pay",
|
||||
@@ -3415,8 +3416,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nostr-zapper"
|
||||
version = "0.37.0"
|
||||
source = "git+https://github.com/rust-nostr/nostr#5ef7353789d54931b664639c11df1aa22e9aa37c"
|
||||
version = "0.38.0"
|
||||
source = "git+https://github.com/rust-nostr/nostr#6ccc81ad3b8d9de10d14f2699db09a4c72660e6c"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"nostr",
|
||||
@@ -4435,7 +4436,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "refineable"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#344284e01331667c018e6ade5d791a20598a3a5c"
|
||||
source = "git+https://github.com/zed-industries/zed#eedbede939b76debb4b4fb6fe3fe8f8fe4ce2ee4"
|
||||
dependencies = [
|
||||
"derive_refineable",
|
||||
]
|
||||
@@ -4518,9 +4519,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "reqwest"
|
||||
version = "0.12.11"
|
||||
version = "0.12.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7fe060fe50f524be480214aba758c71f99f90ee8c83c5a36b5e9e1d568eb4eb3"
|
||||
checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"bytes",
|
||||
@@ -4563,7 +4564,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "reqwest_client"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#344284e01331667c018e6ade5d791a20598a3a5c"
|
||||
source = "git+https://github.com/zed-industries/zed#eedbede939b76debb4b4fb6fe3fe8f8fe4ce2ee4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
@@ -4959,7 +4960,7 @@ checksum = "c2fdfc24bc566f839a2da4c4295b82db7d25a24253867d5c64355abb5799bdbe"
|
||||
[[package]]
|
||||
name = "semantic_version"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#344284e01331667c018e6ade5d791a20598a3a5c"
|
||||
source = "git+https://github.com/zed-industries/zed#eedbede939b76debb4b4fb6fe3fe8f8fe4ce2ee4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"serde",
|
||||
@@ -5291,7 +5292,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
||||
[[package]]
|
||||
name = "sum_tree"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#344284e01331667c018e6ade5d791a20598a3a5c"
|
||||
source = "git+https://github.com/zed-industries/zed#eedbede939b76debb4b4fb6fe3fe8f8fe4ce2ee4"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"log",
|
||||
@@ -6092,7 +6093,7 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
||||
[[package]]
|
||||
name = "util"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#344284e01331667c018e6ade5d791a20598a3a5c"
|
||||
source = "git+https://github.com/zed-industries/zed#eedbede939b76debb4b4fb6fe3fe8f8fe4ce2ee4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-fs 1.6.0",
|
||||
@@ -6707,9 +6708,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
||||
|
||||
[[package]]
|
||||
name = "winnow"
|
||||
version = "0.6.20"
|
||||
version = "0.6.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b"
|
||||
checksum = "e6f5bb5257f2407a5425c6e749bfd9692192a73e70a6060516ac04f889087d68"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
||||
<path fill="#000" fill-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm7.53-3.53a.75.75 0 0 0-1.06 1.06L10.94 12l-2.47 2.47a.75.75 0 1 0 1.06 1.06L12 13.06l2.47 2.47a.75.75 0 1 0 1.06-1.06L13.06 12l2.47-2.47a.75.75 0 0 0-1.06-1.06L12 10.94 9.53 8.47Z" clip-rule="evenodd"/>
|
||||
<path fill="currentColor" fill-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm7.53-3.53a.75.75 0 0 0-1.06 1.06L10.94 12l-2.47 2.47a.75.75 0 1 0 1.06 1.06L12 13.06l2.47 2.47a.75.75 0 1 0 1.06-1.06L13.06 12l2.47-2.47a.75.75 0 0 0-1.06-1.06L12 10.94 9.53 8.47Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 421 B After Width: | Height: | Size: 429 B |
@@ -1,3 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
||||
<path fill="#100" fill-rule="evenodd" d="M4.116 4.116a1.25 1.25 0 0 1 1.768 0L12 10.232l6.116-6.116a1.25 1.25 0 0 1 1.768 1.768L13.768 12l6.116 6.116a1.25 1.25 0 0 1-1.768 1.768L12 13.768l-6.116 6.116a1.25 1.25 0 0 1-1.768-1.768L10.232 12 4.116 5.884a1.25 1.25 0 0 1 0-1.768Z" clip-rule="evenodd"/>
|
||||
<path fill="currentColor" fill-rule="evenodd" d="M4.116 4.116a1.25 1.25 0 0 1 1.768 0L12 10.232l6.116-6.116a1.25 1.25 0 0 1 1.768 1.768L13.768 12l6.116 6.116a1.25 1.25 0 0 1-1.768 1.768L12 13.768l-6.116 6.116a1.25 1.25 0 0 1-1.768-1.768L10.232 12 4.116 5.884a1.25 1.25 0 0 1 0-1.768Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 404 B After Width: | Height: | Size: 412 B |
@@ -1,6 +1,6 @@
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g transform="translate(-120.000000, 0.000000)" fill="#000000" fill-rule="nonzero">
|
||||
<g transform="translate(-120.000000, 0.000000)" fill="currentColor" fill-rule="nonzero">
|
||||
<g id="close" transform="translate(120.000000, 0.000000)">
|
||||
<path d="M19.203125,20 C19.3125,20 19.4166667,19.9791667 19.515625,19.9375 C19.6145833,19.8958333 19.6992188,19.8385417 19.7695312,19.765625 C19.8398438,19.6927083 19.8958333,19.6067708 19.9375,19.5078125 C19.9791667,19.4088542 20,19.3046875 20,19.1953125 C20,18.9765625 19.921875,18.7890625 19.765625,18.6328125 L19.765625,18.6328125 L13.1328125,12 L19.765625,5.3671875 C19.921875,5.2109375 20,5.02083333 20,4.796875 C20,4.6875 19.9791667,4.58463542 19.9375,4.48828125 C19.8958333,4.39192708 19.8385417,4.30729167 19.765625,4.234375 C19.6927083,4.16145833 19.6080729,4.10416667 19.5117188,4.0625 C19.4153646,4.02083333 19.3125,4 19.203125,4 C18.9791667,4 18.7890625,4.078125 18.6328125,4.234375 L18.6328125,4.234375 L12,10.8671875 L5.3671875,4.234375 C5.2109375,4.078125 5.0234375,4 4.8046875,4 C4.6953125,4 4.59114583,4.02083333 4.4921875,4.0625 C4.39322917,4.10416667 4.30729167,4.16015625 4.234375,4.23046875 C4.16145833,4.30078125 4.10416667,4.38541667 4.0625,4.484375 C4.02083333,4.58333333 4,4.6875 4,4.796875 C4,5.02083333 4.078125,5.2109375 4.234375,5.3671875 L4.234375,5.3671875 L10.8671875,12 L4.234375,18.6328125 C4.078125,18.7890625 4,18.9765625 4,19.1953125 C4,19.4244792 4.07682292,19.6158854 4.23046875,19.7695312 C4.38411458,19.9231771 4.57552083,20 4.8046875,20 C5.0234375,20 5.2109375,19.921875 5.3671875,19.765625 L5.3671875,19.765625 L12,13.1328125 L18.6328125,19.765625 C18.7890625,19.921875 18.9791667,20 19.203125,20 Z"></path>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -1,6 +1,6 @@
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g transform="translate(-80.000000, 0.000000)" fill="#000000" fill-rule="nonzero">
|
||||
<g transform="translate(-80.000000, 0.000000)" fill="currentColor" fill-rule="nonzero">
|
||||
<g id="maximize" transform="translate(80.000000, 0.000000)">
|
||||
<path d="M17.640625,20 C17.953125,20 18.2526042,19.9361979 18.5390625,19.8085938 C18.8255208,19.6809896 19.0768229,19.5091146 19.2929688,19.2929688 C19.5091146,19.0768229 19.6809896,18.8255208 19.8085938,18.5390625 C19.9361979,18.2526042 20,17.953125 20,17.640625 L20,17.640625 L20,6.359375 C20,6.046875 19.9361979,5.74739583 19.8085938,5.4609375 C19.6809896,5.17447917 19.5091146,4.92317708 19.2929688,4.70703125 C19.0768229,4.49088542 18.8255208,4.31901042 18.5390625,4.19140625 C18.2526042,4.06380208 17.953125,4 17.640625,4 L17.640625,4 L6.359375,4 C6.046875,4 5.74739583,4.06380208 5.4609375,4.19140625 C5.17447917,4.31901042 4.92317708,4.49088542 4.70703125,4.70703125 C4.49088542,4.92317708 4.31901042,5.17447917 4.19140625,5.4609375 C4.06380208,5.74739583 4,6.046875 4,6.359375 L4,6.359375 L4,17.640625 C4,17.953125 4.06380208,18.2526042 4.19140625,18.5390625 C4.31901042,18.8255208 4.49088542,19.0768229 4.70703125,19.2929688 C4.92317708,19.5091146 5.17447917,19.6809896 5.4609375,19.8085938 C5.74739583,19.9361979 6.046875,20 6.359375,20 L6.359375,20 L17.640625,20 Z M17.6015625,18.3984375 L6.3984375,18.3984375 C6.2890625,18.3984375 6.18619792,18.3776042 6.08984375,18.3359375 C5.99348958,18.2942708 5.90885417,18.2369792 5.8359375,18.1640625 C5.76302083,18.0911458 5.70572917,18.0065104 5.6640625,17.9101562 C5.62239583,17.8138021 5.6015625,17.7109375 5.6015625,17.6015625 L5.6015625,17.6015625 L5.6015625,6.3984375 C5.6015625,6.2890625 5.62239583,6.18619792 5.6640625,6.08984375 C5.70572917,5.99348958 5.76302083,5.90885417 5.8359375,5.8359375 C5.90885417,5.76302083 5.99348958,5.70572917 6.08984375,5.6640625 C6.18619792,5.62239583 6.2890625,5.6015625 6.3984375,5.6015625 L6.3984375,5.6015625 L17.6015625,5.6015625 C17.7109375,5.6015625 17.8138021,5.62239583 17.9101562,5.6640625 C18.0065104,5.70572917 18.0911458,5.76302083 18.1640625,5.8359375 C18.2369792,5.90885417 18.2942708,5.99348958 18.3359375,6.08984375 C18.3776042,6.18619792 18.3984375,6.2890625 18.3984375,6.3984375 L18.3984375,6.3984375 L18.3984375,17.6015625 C18.3984375,17.7109375 18.3776042,17.8138021 18.3359375,17.9101562 C18.2942708,18.0065104 18.2369792,18.0911458 18.1640625,18.1640625 C18.0911458,18.2369792 18.0065104,18.2942708 17.9101562,18.3359375 C17.8138021,18.3776042 17.7109375,18.3984375 17.6015625,18.3984375 L17.6015625,18.3984375 Z"></path>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
@@ -1,6 +1,6 @@
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g transform="translate(-40.000000, 0.000000)" fill="#000000" fill-rule="nonzero">
|
||||
<g transform="translate(-40.000000, 0.000000)" fill="currentColor" fill-rule="nonzero">
|
||||
<g id="minimize" transform="translate(40.000000, 0.000000)">
|
||||
<path d="M19.203125,12 C19.3125,12 19.4153646,11.9791667 19.5117188,11.9375 C19.6080729,11.8958333 19.6927083,11.8385417 19.765625,11.765625 C19.8385417,11.6927083 19.8958333,11.6080729 19.9375,11.5117188 C19.9791667,11.4153646 20,11.3125 20,11.203125 C20,11.09375 19.9791667,10.9908854 19.9375,10.8945312 C19.8958333,10.7981771 19.8385417,10.7122396 19.765625,10.6367188 C19.6927083,10.5611979 19.6080729,10.5026042 19.5117188,10.4609375 C19.4153646,10.4192708 19.3125,10.3984375 19.203125,10.3984375 L19.203125,10.3984375 L4.796875,10.3984375 C4.6875,10.3984375 4.58463542,10.4192708 4.48828125,10.4609375 C4.39192708,10.5026042 4.30729167,10.5611979 4.234375,10.6367188 C4.16145833,10.7122396 4.10416667,10.7981771 4.0625,10.8945312 C4.02083333,10.9908854 4,11.09375 4,11.203125 C4,11.3125 4.02083333,11.4153646 4.0625,11.5117188 C4.10416667,11.6080729 4.16145833,11.6927083 4.234375,11.765625 C4.30729167,11.8385417 4.39192708,11.8958333 4.48828125,11.9375 C4.58463542,11.9791667 4.6875,12 4.796875,12 L4.796875,12 L19.203125,12 Z"></path>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g fill="#000000" fill-rule="nonzero">
|
||||
<g fill="currentColor" fill-rule="nonzero">
|
||||
<g id="restore">
|
||||
<path d="M18.3984375,16.6640625 C18.6380208,16.5807292 18.8567708,16.4635417 19.0546875,16.3125 C19.2526042,16.1614583 19.421875,15.9869792 19.5625,15.7890625 C19.703125,15.5911458 19.8111979,15.3736979 19.8867188,15.1367188 C19.9622396,14.8997396 20,14.6536458 20,14.3984375 L20,14.3984375 L20,8.796875 C20,8.13541667 19.8736979,7.51302083 19.6210938,6.9296875 C19.3684896,6.34635417 19.0247396,5.83854167 18.5898438,5.40625 C18.1549479,4.97395833 17.6458333,4.63151042 17.0625,4.37890625 C16.4791667,4.12630208 15.8567708,4 15.1953125,4 L15.1953125,4 L9.6015625,4 C9.34635417,4 9.10026042,4.03776042 8.86328125,4.11328125 C8.62630208,4.18880208 8.40885417,4.296875 8.2109375,4.4375 C8.01302083,4.578125 7.83854167,4.74739583 7.6875,4.9453125 C7.53645833,5.14322917 7.41927083,5.36197917 7.3359375,5.6015625 L7.3359375,5.6015625 L15.1953125,5.6015625 C15.6223958,5.6015625 16.0299479,5.68359375 16.4179688,5.84765625 C16.8059896,6.01171875 17.1471354,6.23567708 17.4414062,6.51953125 C17.7356771,6.80338542 17.96875,7.13671875 18.140625,7.51953125 C18.3125,7.90234375 18.3984375,8.30989583 18.3984375,8.7421875 L18.3984375,8.7421875 L18.3984375,16.6640625 Z M14.4375,20 C14.7552083,20 15.0559896,19.9361979 15.3398438,19.8085938 C15.6236979,19.6809896 15.8736979,19.5091146 16.0898438,19.2929688 C16.3059896,19.0768229 16.4778646,18.8268229 16.6054688,18.5429688 C16.7330729,18.2591146 16.796875,17.9583333 16.796875,17.640625 L16.796875,17.640625 L16.796875,9.5625 C16.796875,9.24479167 16.7330729,8.94270833 16.6054688,8.65625 C16.4778646,8.36979167 16.3072917,8.11979167 16.09375,7.90625 C15.8802083,7.69270833 15.6302083,7.52213542 15.34375,7.39453125 C15.0572917,7.26692708 14.7552083,7.203125 14.4375,7.203125 L14.4375,7.203125 L6.359375,7.203125 C6.04166667,7.203125 5.74088542,7.26692708 5.45703125,7.39453125 C5.17317708,7.52213542 4.92317708,7.69401042 4.70703125,7.91015625 C4.49088542,8.12630208 4.31901042,8.37630208 4.19140625,8.66015625 C4.06380208,8.94401042 4,9.24479167 4,9.5625 L4,9.5625 L4,17.640625 C4,17.953125 4.06380208,18.2526042 4.19140625,18.5390625 C4.31901042,18.8255208 4.49088542,19.0768229 4.70703125,19.2929688 C4.92317708,19.5091146 5.17447917,19.6809896 5.4609375,19.8085938 C5.74739583,19.9361979 6.046875,20 6.359375,20 L6.359375,20 L14.4375,20 Z M14.3984375,18.3984375 L6.3984375,18.3984375 C6.2890625,18.3984375 6.18619792,18.3776042 6.08984375,18.3359375 C5.99348958,18.2942708 5.90885417,18.2369792 5.8359375,18.1640625 C5.76302083,18.0911458 5.70572917,18.0065104 5.6640625,17.9101562 C5.62239583,17.8138021 5.6015625,17.7109375 5.6015625,17.6015625 L5.6015625,17.6015625 L5.6015625,9.6015625 C5.6015625,9.4921875 5.62239583,9.38932292 5.6640625,9.29296875 C5.70572917,9.19661458 5.76302083,9.11067708 5.8359375,9.03515625 C5.90885417,8.95963542 5.99348958,8.90104167 6.08984375,8.859375 C6.18619792,8.81770833 6.2890625,8.796875 6.3984375,8.796875 L6.3984375,8.796875 L14.3984375,8.796875 C14.5078125,8.796875 14.6119792,8.81770833 14.7109375,8.859375 C14.8098958,8.90104167 14.8958333,8.95833333 14.96875,9.03125 C15.0416667,9.10416667 15.0989583,9.19010417 15.140625,9.2890625 C15.1822917,9.38802083 15.203125,9.4921875 15.203125,9.6015625 L15.203125,9.6015625 L15.203125,17.6015625 C15.203125,17.7109375 15.1822917,17.8138021 15.140625,17.9101562 C15.0989583,18.0065104 15.0403646,18.0911458 14.9648438,18.1640625 C14.8893229,18.2369792 14.8033854,18.2942708 14.7070312,18.3359375 C14.6106771,18.3776042 14.5078125,18.3984375 14.3984375,18.3984375 L14.3984375,18.3984375 Z"></path>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
@@ -9,9 +9,8 @@ use serde::Deserialize;
|
||||
use std::sync::Arc;
|
||||
|
||||
use super::{
|
||||
account::Account,
|
||||
dock::{chat::ChatPanel, contact::ContactPanel, left_dock::LeftDock, welcome::WelcomePanel},
|
||||
onboarding::Onboarding,
|
||||
account::Account, chat::ChatPanel, contact::ContactPanel, onboarding::Onboarding,
|
||||
sidebar::Sidebar, welcome::WelcomePanel,
|
||||
};
|
||||
use crate::states::{account::AccountRegistry, chat::Room};
|
||||
|
||||
@@ -86,12 +85,12 @@ impl AppView {
|
||||
}
|
||||
|
||||
fn init_layout(dock_area: WeakView<DockArea>, cx: &mut WindowContext) {
|
||||
let left = DockItem::panel(Arc::new(LeftDock::new(cx)));
|
||||
let left = DockItem::panel(Arc::new(Sidebar::new(cx)));
|
||||
let center = Self::init_dock_items(&dock_area, cx);
|
||||
|
||||
_ = dock_area.update(cx, |view, cx| {
|
||||
view.set_version(DOCK_AREA.version, cx);
|
||||
view.set_left_dock(left, Some(px(260.)), true, cx);
|
||||
view.set_left_dock(left, Some(px(240.)), true, cx);
|
||||
view.set_center(center, cx);
|
||||
view.set_dock_collapsible(
|
||||
Edges {
|
||||
|
||||
@@ -45,6 +45,13 @@ impl RenderOnce for RoomMessage {
|
||||
.gap_3()
|
||||
.w_full()
|
||||
.p_2()
|
||||
.border_l_2()
|
||||
.border_color(cx.theme().background)
|
||||
.hover(|this| {
|
||||
this.bg(cx.theme().muted)
|
||||
.border_color(cx.theme().primary_active)
|
||||
.text_color(cx.theme().muted_foreground)
|
||||
})
|
||||
.child(div().flex_shrink_0().map(|this| {
|
||||
if let Some(metadata) = self.metadata.clone() {
|
||||
if let Some(picture) = metadata.picture {
|
||||
49
crates/app/src/views/contact/list.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
use std::time::Duration;
|
||||
|
||||
use gpui::*;
|
||||
use nostr_sdk::prelude::*;
|
||||
use prelude::FluentBuilder;
|
||||
|
||||
use crate::get_client;
|
||||
|
||||
pub struct ContactList {
|
||||
contacts: Model<Option<Vec<Contact>>>,
|
||||
}
|
||||
|
||||
impl ContactList {
|
||||
pub fn new(cx: &mut ViewContext<'_, Self>) -> Self {
|
||||
let contacts = cx.new_model(|_| None);
|
||||
let async_contacts = contacts.clone();
|
||||
|
||||
let mut async_cx = cx.to_async();
|
||||
|
||||
cx.foreground_executor()
|
||||
.spawn({
|
||||
let client = get_client();
|
||||
|
||||
async move {
|
||||
if let Ok(contacts) = async_cx
|
||||
.background_executor()
|
||||
.spawn(async move { client.get_contact_list(Duration::from_secs(3)).await })
|
||||
.await
|
||||
{
|
||||
_ = async_cx.update_model(&async_contacts, |model, cx| {
|
||||
*model = Some(contacts);
|
||||
cx.notify();
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
.detach();
|
||||
|
||||
Self { contacts }
|
||||
}
|
||||
}
|
||||
|
||||
impl Render for ContactList {
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
|
||||
div().when_some(self.contacts.read(cx).as_ref(), |this, contacts| {
|
||||
this.child("Total").child(contacts.len().to_string())
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -4,12 +4,17 @@ use coop_ui::{
|
||||
popup_menu::PopupMenu,
|
||||
};
|
||||
use gpui::*;
|
||||
use list::ContactList;
|
||||
|
||||
mod list;
|
||||
|
||||
pub struct ContactPanel {
|
||||
name: SharedString,
|
||||
closeable: bool,
|
||||
zoomable: bool,
|
||||
focus_handle: FocusHandle,
|
||||
// Contacts
|
||||
list: View<ContactList>,
|
||||
}
|
||||
|
||||
impl ContactPanel {
|
||||
@@ -18,11 +23,14 @@ impl ContactPanel {
|
||||
}
|
||||
|
||||
fn view(cx: &mut ViewContext<Self>) -> Self {
|
||||
let list = cx.new_view(ContactList::new);
|
||||
|
||||
Self {
|
||||
name: "Contacts".into(),
|
||||
closeable: true,
|
||||
zoomable: true,
|
||||
focus_handle: cx.focus_handle(),
|
||||
list,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -67,6 +75,6 @@ impl FocusableView for ContactPanel {
|
||||
|
||||
impl Render for ContactPanel {
|
||||
fn render(&mut self, _cx: &mut gpui::ViewContext<Self>) -> impl IntoElement {
|
||||
div().size_full().child("TODO")
|
||||
div().size_full().child(self.list.clone())
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
pub mod chat;
|
||||
pub mod contact;
|
||||
pub mod inbox;
|
||||
pub mod left_dock;
|
||||
pub mod welcome;
|
||||
@@ -1,4 +1,9 @@
|
||||
pub mod account;
|
||||
pub mod app;
|
||||
pub mod dock;
|
||||
pub mod onboarding;
|
||||
|
||||
mod account;
|
||||
mod chat;
|
||||
mod contact;
|
||||
mod inbox;
|
||||
mod onboarding;
|
||||
mod sidebar;
|
||||
mod welcome;
|
||||
|
||||
@@ -7,11 +7,10 @@ use coop_ui::{
|
||||
};
|
||||
use gpui::*;
|
||||
|
||||
use super::inbox::Inbox;
|
||||
use crate::views::app::{AddPanel, PanelKind};
|
||||
|
||||
use super::inbox::Inbox;
|
||||
|
||||
pub struct LeftDock {
|
||||
pub struct Sidebar {
|
||||
// Panel
|
||||
name: SharedString,
|
||||
closeable: bool,
|
||||
@@ -22,7 +21,7 @@ pub struct LeftDock {
|
||||
view_id: EntityId,
|
||||
}
|
||||
|
||||
impl LeftDock {
|
||||
impl Sidebar {
|
||||
pub fn new(cx: &mut WindowContext) -> View<Self> {
|
||||
cx.new_view(Self::view)
|
||||
}
|
||||
@@ -41,9 +40,9 @@ impl LeftDock {
|
||||
}
|
||||
}
|
||||
|
||||
impl Panel for LeftDock {
|
||||
impl Panel for Sidebar {
|
||||
fn panel_id(&self) -> SharedString {
|
||||
"LeftDock".into()
|
||||
"Sidebar".into()
|
||||
}
|
||||
|
||||
fn title(&self, _cx: &WindowContext) -> AnyElement {
|
||||
@@ -71,15 +70,15 @@ impl Panel for LeftDock {
|
||||
}
|
||||
}
|
||||
|
||||
impl EventEmitter<PanelEvent> for LeftDock {}
|
||||
impl EventEmitter<PanelEvent> for Sidebar {}
|
||||
|
||||
impl FocusableView for LeftDock {
|
||||
impl FocusableView for Sidebar {
|
||||
fn focus_handle(&self, _: &AppContext) -> gpui::FocusHandle {
|
||||
self.focus_handle.clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl Render for LeftDock {
|
||||
impl Render for Sidebar {
|
||||
fn render(&mut self, _cx: &mut ViewContext<Self>) -> impl IntoElement {
|
||||
v_flex()
|
||||
.scrollable(self.view_id, ScrollbarAxis::Vertical)
|
||||
@@ -96,9 +95,9 @@ impl Render for LeftDock {
|
||||
.not_centered()
|
||||
.bold()
|
||||
.icon(Icon::new(IconName::Plus))
|
||||
.label("Compose")
|
||||
.label("New")
|
||||
.on_click(|_, cx| {
|
||||
cx.open_modal(move |modal, _| modal.title("Compose").child("TODO"));
|
||||
cx.open_modal(move |modal, _| modal.child("TODO"));
|
||||
}),
|
||||
)
|
||||
.child(
|
||||
@@ -115,18 +114,6 @@ impl Render for LeftDock {
|
||||
position: coop_ui::dock::DockPlacement::Center,
|
||||
}))
|
||||
}),
|
||||
)
|
||||
.child(
|
||||
Button::new("find")
|
||||
.small()
|
||||
.ghost()
|
||||
.not_centered()
|
||||
.bold()
|
||||
.icon(Icon::new(IconName::Search))
|
||||
.label("Find")
|
||||
.on_click(|_, cx| {
|
||||
cx.open_modal(move |modal, _| modal.title("Find").child("TODO"));
|
||||
}),
|
||||
),
|
||||
)
|
||||
.child(self.inbox.clone())
|
||||
@@ -458,8 +458,8 @@ impl RenderOnce for Button {
|
||||
.items_center()
|
||||
.justify_center()
|
||||
.map(|this| match self.size {
|
||||
Size::XSmall => this.gap_1().text_xs(),
|
||||
Size::Small => this.gap_2().text_xs(),
|
||||
Size::XSmall => this.gap_0p5().text_xs(),
|
||||
Size::Small => this.gap_1().text_xs(),
|
||||
_ => this.gap_2().text_base(),
|
||||
})
|
||||
.when(!self.loading, |this| {
|
||||
|
||||