Compare commits
No commits in common. "fd721c53d89433956799cb1a8305986b53503d93" and "eba362a7f2f1799a7c3bb56881897426ca72958a" have entirely different histories.
fd721c53d8
...
eba362a7f2
335
Cargo.lock
generated
335
Cargo.lock
generated
@ -2,15 +2,6 @@
|
|||||||
# It is not intended for manual editing.
|
# It is not intended for manual editing.
|
||||||
version = 3
|
version = 3
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "addr2line"
|
|
||||||
version = "0.19.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97"
|
|
||||||
dependencies = [
|
|
||||||
"gimli",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "adler"
|
name = "adler"
|
||||||
version = "1.0.2"
|
version = "1.0.2"
|
||||||
@ -61,24 +52,6 @@ dependencies = [
|
|||||||
"memchr",
|
"memchr",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "android_system_properties"
|
|
||||||
version = "0.1.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
|
|
||||||
dependencies = [
|
|
||||||
"libc",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "ansi_term"
|
|
||||||
version = "0.12.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
|
|
||||||
dependencies = [
|
|
||||||
"winapi 0.3.9",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "anyhow"
|
name = "anyhow"
|
||||||
version = "1.0.69"
|
version = "1.0.69"
|
||||||
@ -158,21 +131,6 @@ version = "1.1.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "backtrace"
|
|
||||||
version = "0.3.67"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca"
|
|
||||||
dependencies = [
|
|
||||||
"addr2line",
|
|
||||||
"cc",
|
|
||||||
"cfg-if 1.0.0",
|
|
||||||
"libc",
|
|
||||||
"miniz_oxide",
|
|
||||||
"object",
|
|
||||||
"rustc-demangle",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "base64"
|
name = "base64"
|
||||||
version = "0.9.3"
|
version = "0.9.3"
|
||||||
@ -189,12 +147,6 @@ version = "0.13.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
|
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "bimap"
|
|
||||||
version = "0.6.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "bc0455254eb5c6964c4545d8bac815e1a1be4f3afe0ae695ea539c12d728d44b"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "binascii"
|
name = "binascii"
|
||||||
version = "0.1.4"
|
version = "0.1.4"
|
||||||
@ -203,9 +155,9 @@ checksum = "383d29d513d8764dcdc42ea295d979eb99c3c9f00607b3692cf68a431f7dca72"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bitflags"
|
name = "bitflags"
|
||||||
version = "1.2.1"
|
version = "1.3.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
|
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "block-buffer"
|
name = "block-buffer"
|
||||||
@ -252,21 +204,6 @@ version = "1.0.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "chrono"
|
|
||||||
version = "0.4.23"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f"
|
|
||||||
dependencies = [
|
|
||||||
"iana-time-zone",
|
|
||||||
"js-sys",
|
|
||||||
"num-integer",
|
|
||||||
"num-traits",
|
|
||||||
"time 0.1.44",
|
|
||||||
"wasm-bindgen",
|
|
||||||
"winapi 0.3.9",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cipher"
|
name = "cipher"
|
||||||
version = "0.4.3"
|
version = "0.4.3"
|
||||||
@ -277,16 +214,6 @@ dependencies = [
|
|||||||
"inout",
|
"inout",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "codespan-reporting"
|
|
||||||
version = "0.11.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e"
|
|
||||||
dependencies = [
|
|
||||||
"termcolor",
|
|
||||||
"unicode-width",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "console_error_panic_hook"
|
name = "console_error_panic_hook"
|
||||||
version = "0.1.7"
|
version = "0.1.7"
|
||||||
@ -307,12 +234,6 @@ dependencies = [
|
|||||||
"web-sys",
|
"web-sys",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "const-sha1"
|
|
||||||
version = "0.2.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "fb58b6451e8c2a812ad979ed1d83378caa5e927eef2622017a45f251457c2c9d"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "convert_case"
|
name = "convert_case"
|
||||||
version = "0.4.0"
|
version = "0.4.0"
|
||||||
@ -347,12 +268,6 @@ dependencies = [
|
|||||||
"version_check 0.9.4",
|
"version_check 0.9.4",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "core-foundation-sys"
|
|
||||||
version = "0.8.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cpufeatures"
|
name = "cpufeatures"
|
||||||
version = "0.2.5"
|
version = "0.2.5"
|
||||||
@ -505,50 +420,6 @@ dependencies = [
|
|||||||
"cipher",
|
"cipher",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "cxx"
|
|
||||||
version = "1.0.92"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "9a140f260e6f3f79013b8bfc65e7ce630c9ab4388c6a89c71e07226f49487b72"
|
|
||||||
dependencies = [
|
|
||||||
"cc",
|
|
||||||
"cxxbridge-flags",
|
|
||||||
"cxxbridge-macro",
|
|
||||||
"link-cplusplus",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "cxx-build"
|
|
||||||
version = "1.0.92"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "da6383f459341ea689374bf0a42979739dc421874f112ff26f829b8040b8e613"
|
|
||||||
dependencies = [
|
|
||||||
"cc",
|
|
||||||
"codespan-reporting",
|
|
||||||
"once_cell",
|
|
||||||
"proc-macro2 1.0.47",
|
|
||||||
"quote 1.0.21",
|
|
||||||
"scratch",
|
|
||||||
"syn 1.0.103",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "cxxbridge-flags"
|
|
||||||
version = "1.0.92"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "90201c1a650e95ccff1c8c0bb5a343213bdd317c6e600a93075bca2eff54ec97"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "cxxbridge-macro"
|
|
||||||
version = "1.0.92"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "0b75aed41bb2e6367cae39e6326ef817a851db13c13e4f3263714ca3cfb8de56"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2 1.0.47",
|
|
||||||
"quote 1.0.21",
|
|
||||||
"syn 1.0.103",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dbg"
|
name = "dbg"
|
||||||
version = "1.0.4"
|
version = "1.0.4"
|
||||||
@ -902,7 +773,7 @@ dependencies = [
|
|||||||
"libc",
|
"libc",
|
||||||
"log 0.4.17",
|
"log 0.4.17",
|
||||||
"rustversion",
|
"rustversion",
|
||||||
"windows 0.32.0",
|
"windows",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -915,16 +786,6 @@ dependencies = [
|
|||||||
"version_check 0.9.4",
|
"version_check 0.9.4",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "gethostname"
|
|
||||||
version = "0.2.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e"
|
|
||||||
dependencies = [
|
|
||||||
"libc",
|
|
||||||
"winapi 0.3.9",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "getrandom"
|
name = "getrandom"
|
||||||
version = "0.1.16"
|
version = "0.1.16"
|
||||||
@ -959,37 +820,12 @@ dependencies = [
|
|||||||
"polyval",
|
"polyval",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "gimli"
|
|
||||||
version = "0.27.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "glob"
|
name = "glob"
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
|
checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "glog"
|
|
||||||
version = "0.1.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "901ab6c92035908510ef4187d725de96ce0b637c63dc0b123da73dfa4c638492"
|
|
||||||
dependencies = [
|
|
||||||
"backtrace",
|
|
||||||
"bimap",
|
|
||||||
"chrono",
|
|
||||||
"gethostname",
|
|
||||||
"if_empty",
|
|
||||||
"log 0.4.17",
|
|
||||||
"nix",
|
|
||||||
"termcolor",
|
|
||||||
"thread_local",
|
|
||||||
"whoami",
|
|
||||||
"windows 0.11.0",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gloo-events"
|
name = "gloo-events"
|
||||||
version = "0.1.2"
|
version = "0.1.2"
|
||||||
@ -1181,30 +1017,6 @@ dependencies = [
|
|||||||
"want",
|
"want",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "iana-time-zone"
|
|
||||||
version = "0.1.53"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765"
|
|
||||||
dependencies = [
|
|
||||||
"android_system_properties",
|
|
||||||
"core-foundation-sys",
|
|
||||||
"iana-time-zone-haiku",
|
|
||||||
"js-sys",
|
|
||||||
"wasm-bindgen",
|
|
||||||
"winapi 0.3.9",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "iana-time-zone-haiku"
|
|
||||||
version = "0.1.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca"
|
|
||||||
dependencies = [
|
|
||||||
"cxx",
|
|
||||||
"cxx-build",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "idna"
|
name = "idna"
|
||||||
version = "0.1.5"
|
version = "0.1.5"
|
||||||
@ -1226,12 +1038,6 @@ dependencies = [
|
|||||||
"unicode-normalization",
|
"unicode-normalization",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "if_empty"
|
|
||||||
version = "0.2.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "472c8093cbd4f6e9e42238219c630735871563d23b2a830f5eaa5424a0f298ce"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "indexmap"
|
name = "indexmap"
|
||||||
version = "1.9.1"
|
version = "1.9.1"
|
||||||
@ -1391,15 +1197,6 @@ version = "0.2.137"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89"
|
checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "link-cplusplus"
|
|
||||||
version = "1.0.8"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5"
|
|
||||||
dependencies = [
|
|
||||||
"cc",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lock_api"
|
name = "lock_api"
|
||||||
version = "0.4.9"
|
version = "0.4.9"
|
||||||
@ -1609,19 +1406,6 @@ version = "1.0.4"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
|
checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "nix"
|
|
||||||
version = "0.21.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "77d9f3521ea8e0641a153b3cddaf008dcbf26acd4ed739a2517295e0760d12c7"
|
|
||||||
dependencies = [
|
|
||||||
"bitflags",
|
|
||||||
"cc",
|
|
||||||
"cfg-if 1.0.0",
|
|
||||||
"libc",
|
|
||||||
"memoffset",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nodrop"
|
name = "nodrop"
|
||||||
version = "0.1.14"
|
version = "0.1.14"
|
||||||
@ -1660,22 +1444,13 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num-integer"
|
name = "nu-ansi-term"
|
||||||
version = "0.1.45"
|
version = "0.46.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
|
checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"autocfg",
|
"overload",
|
||||||
"num-traits",
|
"winapi 0.3.9",
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "num-traits"
|
|
||||||
version = "0.2.15"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
|
|
||||||
dependencies = [
|
|
||||||
"autocfg",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1688,15 +1463,6 @@ dependencies = [
|
|||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "object"
|
|
||||||
version = "0.30.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439"
|
|
||||||
dependencies = [
|
|
||||||
"memchr",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "once_cell"
|
name = "once_cell"
|
||||||
version = "1.16.0"
|
version = "1.16.0"
|
||||||
@ -1718,6 +1484,12 @@ dependencies = [
|
|||||||
"winapi 0.3.9",
|
"winapi 0.3.9",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "overload"
|
||||||
|
version = "0.1.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "parking_lot"
|
name = "parking_lot"
|
||||||
version = "0.11.2"
|
version = "0.11.2"
|
||||||
@ -2385,12 +2157,6 @@ dependencies = [
|
|||||||
"uncased",
|
"uncased",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "rustc-demangle"
|
|
||||||
version = "0.1.21"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustc_version"
|
name = "rustc_version"
|
||||||
version = "0.4.0"
|
version = "0.4.0"
|
||||||
@ -2451,12 +2217,6 @@ version = "1.1.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "scratch"
|
|
||||||
version = "1.0.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sct"
|
name = "sct"
|
||||||
version = "0.7.0"
|
version = "0.7.0"
|
||||||
@ -2555,7 +2315,6 @@ dependencies = [
|
|||||||
name = "server"
|
name = "server"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"glog",
|
|
||||||
"log 0.4.17",
|
"log 0.4.17",
|
||||||
"notmuch",
|
"notmuch",
|
||||||
"rocket 0.5.0-rc.2",
|
"rocket 0.5.0-rc.2",
|
||||||
@ -2767,15 +2526,6 @@ dependencies = [
|
|||||||
"utf-8",
|
"utf-8",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "termcolor"
|
|
||||||
version = "1.1.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755"
|
|
||||||
dependencies = [
|
|
||||||
"winapi-util",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thin-slice"
|
name = "thin-slice"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
@ -2804,11 +2554,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thread_local"
|
name = "thread_local"
|
||||||
version = "1.0.1"
|
version = "1.1.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14"
|
checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"lazy_static",
|
"once_cell",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -2989,13 +2739,13 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tracing-subscriber"
|
name = "tracing-subscriber"
|
||||||
version = "0.3.6"
|
version = "0.3.16"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "77be66445c4eeebb934a7340f227bfe7b338173d3f8c00a60a5a58005c9faecf"
|
checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_term",
|
|
||||||
"lazy_static",
|
|
||||||
"matchers",
|
"matchers",
|
||||||
|
"nu-ansi-term",
|
||||||
|
"once_cell",
|
||||||
"regex",
|
"regex",
|
||||||
"sharded-slab",
|
"sharded-slab",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
@ -3097,12 +2847,6 @@ dependencies = [
|
|||||||
"tinyvec",
|
"tinyvec",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "unicode-width"
|
|
||||||
version = "0.1.10"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-xid"
|
name = "unicode-xid"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
@ -3361,16 +3105,6 @@ dependencies = [
|
|||||||
"webpki",
|
"webpki",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "whoami"
|
|
||||||
version = "1.3.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "45dbc71f0cdca27dc261a9bd37ddec174e4a0af2b900b890f378460f745426e3"
|
|
||||||
dependencies = [
|
|
||||||
"wasm-bindgen",
|
|
||||||
"web-sys",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "winapi"
|
name = "winapi"
|
||||||
version = "0.2.8"
|
version = "0.2.8"
|
||||||
@ -3414,17 +3148,6 @@ version = "0.4.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows"
|
|
||||||
version = "0.11.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "25b270ca3fa1282aa091f122551348f8186f07888dffdfe64df17206ad3b56d0"
|
|
||||||
dependencies = [
|
|
||||||
"const-sha1",
|
|
||||||
"windows_gen",
|
|
||||||
"windows_macros",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows"
|
name = "windows"
|
||||||
version = "0.32.0"
|
version = "0.32.0"
|
||||||
@ -3495,12 +3218,6 @@ version = "0.42.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7"
|
checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_gen"
|
|
||||||
version = "0.11.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "44bd40154eb69ba3c80f11752494a2a34d1b448b06b80449238edfbd00ec7eef"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_i686_gnu"
|
name = "windows_i686_gnu"
|
||||||
version = "0.32.0"
|
version = "0.32.0"
|
||||||
@ -3525,16 +3242,6 @@ version = "0.42.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605"
|
checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_macros"
|
|
||||||
version = "0.11.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "bae6942e04aa5792bbf3b3cf5ded1b7590a7ffd76d53ea179210b87911b6587f"
|
|
||||||
dependencies = [
|
|
||||||
"syn 1.0.103",
|
|
||||||
"windows_gen",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_x86_64_gnu"
|
name = "windows_x86_64_gnu"
|
||||||
version = "0.32.0"
|
version = "0.32.0"
|
||||||
|
|||||||
@ -15,7 +15,6 @@ thiserror = "1.0.37"
|
|||||||
serde = { version = "1.0.147", features = ["derive"] }
|
serde = { version = "1.0.147", features = ["derive"] }
|
||||||
log = "0.4.17"
|
log = "0.4.17"
|
||||||
tokio = "1.26.0"
|
tokio = "1.26.0"
|
||||||
glog = "0.1.0"
|
|
||||||
|
|
||||||
[dependencies.rocket_contrib]
|
[dependencies.rocket_contrib]
|
||||||
version = "0.4.11"
|
version = "0.4.11"
|
||||||
|
|||||||
@ -3,7 +3,6 @@ extern crate rocket;
|
|||||||
|
|
||||||
use std::{error::Error, io::Cursor, str::FromStr};
|
use std::{error::Error, io::Cursor, str::FromStr};
|
||||||
|
|
||||||
use glog::Flags;
|
|
||||||
use notmuch::{Notmuch, NotmuchError, SearchSummary, ThreadSet};
|
use notmuch::{Notmuch, NotmuchError, SearchSummary, ThreadSet};
|
||||||
use rocket::{
|
use rocket::{
|
||||||
http::{ContentType, Header},
|
http::{ContentType, Header},
|
||||||
@ -40,7 +39,6 @@ async fn search(
|
|||||||
) -> Result<Json<shared::SearchResult>, Debug<NotmuchError>> {
|
) -> Result<Json<shared::SearchResult>, Debug<NotmuchError>> {
|
||||||
let page = page.unwrap_or(0);
|
let page = page.unwrap_or(0);
|
||||||
let results_per_page = results_per_page.unwrap_or(10);
|
let results_per_page = results_per_page.unwrap_or(10);
|
||||||
info!(" search '{query}'");
|
|
||||||
let res = shared::SearchResult {
|
let res = shared::SearchResult {
|
||||||
summary: nm.search(query, page * results_per_page, results_per_page)?,
|
summary: nm.search(query, page * results_per_page, results_per_page)?,
|
||||||
query: query.to_string(),
|
query: query.to_string(),
|
||||||
@ -122,14 +120,6 @@ async fn original(
|
|||||||
|
|
||||||
#[rocket::main]
|
#[rocket::main]
|
||||||
async fn main() -> Result<(), Box<dyn Error>> {
|
async fn main() -> Result<(), Box<dyn Error>> {
|
||||||
glog::new()
|
|
||||||
.init(Flags {
|
|
||||||
colorlogtostderr: true,
|
|
||||||
//alsologtostderr: true, // use logtostderr to only write to stderr and not to files
|
|
||||||
logtostderr: true,
|
|
||||||
..Default::default()
|
|
||||||
})
|
|
||||||
.unwrap();
|
|
||||||
let allowed_origins = AllowedOrigins::all();
|
let allowed_origins = AllowedOrigins::all();
|
||||||
let cors = rocket_cors::CorsOptions {
|
let cors = rocket_cors::CorsOptions {
|
||||||
allowed_origins,
|
allowed_origins,
|
||||||
|
|||||||
179
web/src/lib.rs
179
web/src/lib.rs
@ -14,77 +14,41 @@ use seed::{prelude::*, *};
|
|||||||
use serde::de::Deserialize;
|
use serde::de::Deserialize;
|
||||||
use wasm_timer::Instant;
|
use wasm_timer::Instant;
|
||||||
|
|
||||||
const SEARCH_RESULTS_PER_PAGE: usize = 20;
|
|
||||||
|
|
||||||
// ------ ------
|
// ------ ------
|
||||||
// Init
|
// Init
|
||||||
// ------ ------
|
// ------ ------
|
||||||
|
|
||||||
// `init` describes what should happen when your app started.
|
// `init` describes what should happen when your app started.
|
||||||
fn init(url: Url, orders: &mut impl Orders<Msg>) -> Model {
|
fn init(url: Url, orders: &mut impl Orders<Msg>) -> Model {
|
||||||
orders
|
warn!("init called");
|
||||||
.subscribe(on_url_changed)
|
log!(url);
|
||||||
.notify(subs::UrlChanged(url.clone()));
|
let mut url = url.clone();
|
||||||
|
let mut query = "".to_string();
|
||||||
Model {
|
let hpp = url.next_hash_path_part();
|
||||||
context: Context::None,
|
log!(hpp);
|
||||||
query: "".to_string(),
|
match hpp {
|
||||||
refreshing_state: RefreshingState::None,
|
Some("t") => {
|
||||||
}
|
let tid = url.next_hash_path_part().unwrap_or("").to_string();
|
||||||
}
|
orders.send_msg(Msg::ShowPrettyRequest(tid));
|
||||||
|
|
||||||
fn on_url_changed(uc: subs::UrlChanged) -> Msg {
|
|
||||||
let mut url = uc.0;
|
|
||||||
info!(
|
|
||||||
"url changed '{}', history {}",
|
|
||||||
url,
|
|
||||||
history().length().unwrap_or(0)
|
|
||||||
);
|
|
||||||
let hpp = url.remaining_hash_path_parts();
|
|
||||||
match hpp.as_slice() {
|
|
||||||
["t", tid] => Msg::ShowPrettyRequest(tid.to_string()),
|
|
||||||
["s", query] => {
|
|
||||||
let query = Url::decode_uri_component(query).unwrap_or("".to_string());
|
|
||||||
Msg::SearchRequest {
|
|
||||||
query,
|
|
||||||
page: 0,
|
|
||||||
results_per_page: SEARCH_RESULTS_PER_PAGE,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
["s", query, page] => {
|
Some("s") => {
|
||||||
let query = Url::decode_uri_component(query).unwrap_or("".to_string());
|
query = url.next_hash_path_part().unwrap_or("").to_string();
|
||||||
let page = page[1..].parse().unwrap_or(0);
|
orders.send_msg(Msg::SearchRequest(query.clone()));
|
||||||
Msg::SearchRequest {
|
|
||||||
query,
|
|
||||||
page,
|
|
||||||
results_per_page: SEARCH_RESULTS_PER_PAGE,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
p => {
|
p => {
|
||||||
if !p.is_empty() {
|
log!(p);
|
||||||
info!("Unhandled path '{p:?}'");
|
orders.send_msg(Msg::SearchRequest("".to_string()));
|
||||||
}
|
|
||||||
Msg::SearchRequest {
|
|
||||||
query: "".to_string(),
|
|
||||||
page: 0,
|
|
||||||
results_per_page: SEARCH_RESULTS_PER_PAGE,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
}
|
orders.subscribe(|uc: subs::UrlChanged| {
|
||||||
|
info!("uc {}", uc.0);
|
||||||
|
});
|
||||||
|
|
||||||
mod urls {
|
info!("init query '{}'", query);
|
||||||
use seed::Url;
|
Model {
|
||||||
pub fn search(query: &str, page: usize) -> Url {
|
context: Context::None,
|
||||||
let query = Url::encode_uri_component(query);
|
query,
|
||||||
if page > 0 {
|
refreshing_state: RefreshingState::None,
|
||||||
Url::new().set_hash_path(["s", &query, &format!("p{page}")])
|
|
||||||
} else {
|
|
||||||
Url::new().set_hash_path(["s", &query])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pub fn thread(tid: &str) -> Url {
|
|
||||||
Url::new().set_hash_path(["t", tid])
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,11 +85,7 @@ enum Msg {
|
|||||||
Noop,
|
Noop,
|
||||||
RefreshStart,
|
RefreshStart,
|
||||||
RefreshDone(Option<FetchError>),
|
RefreshDone(Option<FetchError>),
|
||||||
SearchRequest {
|
SearchRequest(String),
|
||||||
query: String,
|
|
||||||
page: usize,
|
|
||||||
results_per_page: usize,
|
|
||||||
},
|
|
||||||
SearchResult(fetch::Result<shared::SearchResult>),
|
SearchResult(fetch::Result<shared::SearchResult>),
|
||||||
ShowRequest(String),
|
ShowRequest(String),
|
||||||
ShowResult(fetch::Result<ThreadSet>),
|
ShowResult(fetch::Result<ThreadSet>),
|
||||||
@ -151,16 +111,14 @@ fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
Msg::SearchRequest {
|
Msg::SearchRequest(query) => {
|
||||||
query,
|
info!("searching for '{query}'");
|
||||||
page,
|
|
||||||
results_per_page,
|
|
||||||
} => {
|
|
||||||
info!("searching for '{query}' pg {page} # / pg {results_per_page}");
|
|
||||||
model.query = query.clone();
|
model.query = query.clone();
|
||||||
orders.skip().perform_cmd(async move {
|
let url = Url::new().set_hash_path(["s", &query]);
|
||||||
Msg::SearchResult(search_request(&query, page, results_per_page).await)
|
orders.request_url(url);
|
||||||
});
|
orders
|
||||||
|
.skip()
|
||||||
|
.perform_cmd(async move { Msg::SearchResult(search_request(&query).await) });
|
||||||
}
|
}
|
||||||
Msg::SearchResult(Ok(response_data)) => {
|
Msg::SearchResult(Ok(response_data)) => {
|
||||||
debug!("fetch ok {:#?}", response_data);
|
debug!("fetch ok {:#?}", response_data);
|
||||||
@ -171,6 +129,8 @@ fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Msg::ShowRequest(tid) => {
|
Msg::ShowRequest(tid) => {
|
||||||
|
let url = Url::new().set_hash_path(["t", &tid]);
|
||||||
|
orders.request_url(url);
|
||||||
orders
|
orders
|
||||||
.skip()
|
.skip()
|
||||||
.perform_cmd(async move { Msg::ShowResult(show_request(&tid).await) });
|
.perform_cmd(async move { Msg::ShowResult(show_request(&tid).await) });
|
||||||
@ -184,6 +144,8 @@ fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Msg::ShowPrettyRequest(tid) => {
|
Msg::ShowPrettyRequest(tid) => {
|
||||||
|
let url = Url::new().set_hash_path(["t", &tid]);
|
||||||
|
orders.request_url(url);
|
||||||
orders
|
orders
|
||||||
.skip()
|
.skip()
|
||||||
.perform_cmd(async move { Msg::ShowPrettyResult(show_pretty_request(&tid).await) });
|
.perform_cmd(async move { Msg::ShowPrettyResult(show_pretty_request(&tid).await) });
|
||||||
@ -198,7 +160,12 @@ fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
|||||||
Msg::NextPage => {
|
Msg::NextPage => {
|
||||||
match &model.context {
|
match &model.context {
|
||||||
Context::Search(sr) => {
|
Context::Search(sr) => {
|
||||||
orders.request_url(urls::search(&sr.query, sr.page + 1));
|
orders.send_msg(Msg::SearchRequest(format!(
|
||||||
|
"{}?page={}&results_per_page={}",
|
||||||
|
Url::encode_uri_component(&sr.query),
|
||||||
|
sr.page + 1,
|
||||||
|
sr.results_per_page
|
||||||
|
)));
|
||||||
}
|
}
|
||||||
Context::Thread(_) => (), // do nothing (yet?)
|
Context::Thread(_) => (), // do nothing (yet?)
|
||||||
Context::None => (), // do nothing (yet?)
|
Context::None => (), // do nothing (yet?)
|
||||||
@ -207,7 +174,12 @@ fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
|||||||
Msg::PreviousPage => {
|
Msg::PreviousPage => {
|
||||||
match &model.context {
|
match &model.context {
|
||||||
Context::Search(sr) => {
|
Context::Search(sr) => {
|
||||||
orders.request_url(urls::search(&sr.query, sr.page.saturating_sub(1)));
|
orders.send_msg(Msg::SearchRequest(format!(
|
||||||
|
"{}?page={}&results_per_page={}",
|
||||||
|
Url::encode_uri_component(&sr.query),
|
||||||
|
sr.page.saturating_sub(1),
|
||||||
|
sr.results_per_page
|
||||||
|
)));
|
||||||
}
|
}
|
||||||
Context::Thread(_) => (), // do nothing (yet?)
|
Context::Thread(_) => (), // do nothing (yet?)
|
||||||
Context::None => (), // do nothing (yet?)
|
Context::None => (), // do nothing (yet?)
|
||||||
@ -216,12 +188,8 @@ fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn search_request(
|
async fn search_request(query: &str) -> fetch::Result<shared::SearchResult> {
|
||||||
query: &str,
|
Request::new(api::search(query))
|
||||||
page: usize,
|
|
||||||
results_per_page: usize,
|
|
||||||
) -> fetch::Result<shared::SearchResult> {
|
|
||||||
Request::new(api::search(query, page, results_per_page))
|
|
||||||
.method(Method::Get)
|
.method(Method::Get)
|
||||||
.fetch()
|
.fetch()
|
||||||
.await?
|
.await?
|
||||||
@ -231,15 +199,12 @@ async fn search_request(
|
|||||||
}
|
}
|
||||||
|
|
||||||
mod api {
|
mod api {
|
||||||
use seed::Url;
|
|
||||||
|
|
||||||
const BASE_URL: &str = "/api";
|
const BASE_URL: &str = "/api";
|
||||||
pub fn refresh() -> String {
|
pub fn refresh() -> String {
|
||||||
format!("{BASE_URL}/refresh")
|
format!("{BASE_URL}/refresh")
|
||||||
}
|
}
|
||||||
pub fn search(query: &str, page: usize, results_per_page: usize) -> String {
|
pub fn search(query: &str) -> String {
|
||||||
let query = Url::encode_uri_component(query);
|
format!("{BASE_URL}/search/{query}")
|
||||||
format!("{BASE_URL}/search/{query}?page={page}&results_per_page={results_per_page}")
|
|
||||||
}
|
}
|
||||||
pub fn show(tid: &str) -> String {
|
pub fn show(tid: &str) -> String {
|
||||||
format!("{BASE_URL}/show/{tid}")
|
format!("{BASE_URL}/show/{tid}")
|
||||||
@ -430,19 +395,14 @@ fn tags_chiclet(tags: &[String], is_mobile: bool) -> impl Iterator<Item = Node<M
|
|||||||
let classes = C!["tag", IF!(is_mobile => "is-small")];
|
let classes = C!["tag", IF!(is_mobile => "is-small")];
|
||||||
let tag = tag.clone();
|
let tag = tag.clone();
|
||||||
a![
|
a![
|
||||||
attrs! {
|
|
||||||
At::Href => urls::search(&format!("tag:{tag}"), 0)
|
|
||||||
},
|
|
||||||
match tag.as_str() {
|
match tag.as_str() {
|
||||||
"attachment" => span![classes, style, "📎"],
|
"attachment" => span![classes, style, "📎"],
|
||||||
"replied" => span![classes, style, i![C!["fa-solid", "fa-reply"]]],
|
"replied" => span![classes, style, i![C!["fa-solid", "fa-reply"]]],
|
||||||
_ => span![classes, style, &tag],
|
_ => span![classes, style, &tag],
|
||||||
},
|
},
|
||||||
ev(Ev::Click, move |_| Msg::SearchRequest {
|
ev(Ev::Click, move |_| Msg::SearchRequest(
|
||||||
query: format!("tag:{tag}"),
|
Url::encode_uri_component(format!("tag:{tag}"))
|
||||||
page: 0,
|
)),
|
||||||
results_per_page: SEARCH_RESULTS_PER_PAGE,
|
|
||||||
})
|
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -535,12 +495,9 @@ fn view_search_results(query: &str, search_results: &shared::SearchResult) -> No
|
|||||||
C!["subject"],
|
C!["subject"],
|
||||||
tags_chiclet(&r.tags, false),
|
tags_chiclet(&r.tags, false),
|
||||||
" ",
|
" ",
|
||||||
a![
|
span![
|
||||||
C!["has-text-light"],
|
|
||||||
attrs! {
|
|
||||||
At::Href => urls::thread(&tid)
|
|
||||||
},
|
|
||||||
&r.subject,
|
&r.subject,
|
||||||
|
ev(Ev::Click, move |_| Msg::ShowPrettyRequest(tid))
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
td![C!["date"], &r.date_relative]
|
td![C!["date"], &r.date_relative]
|
||||||
@ -663,17 +620,13 @@ fn view_header(query: &str, refresh_request: &RefreshingState) -> Node<Msg> {
|
|||||||
],
|
],
|
||||||
a![
|
a![
|
||||||
C!["navbar-item", "button"],
|
C!["navbar-item", "button"],
|
||||||
attrs! {
|
|
||||||
At::Href => urls::search("is:unread", 0)
|
|
||||||
},
|
|
||||||
"Unread",
|
"Unread",
|
||||||
|
ev(Ev::Click, |_| Msg::SearchRequest("is:unread".to_string())),
|
||||||
],
|
],
|
||||||
a![
|
a![
|
||||||
C!["navbar-item", "button"],
|
C!["navbar-item", "button"],
|
||||||
attrs! {
|
|
||||||
At::Href => urls::search("", 0)
|
|
||||||
},
|
|
||||||
"All",
|
"All",
|
||||||
|
ev(Ev::Click, |_| Msg::SearchRequest("".to_string())),
|
||||||
],
|
],
|
||||||
input![
|
input![
|
||||||
C!["navbar-item", "input"],
|
C!["navbar-item", "input"],
|
||||||
@ -682,18 +635,12 @@ fn view_header(query: &str, refresh_request: &RefreshingState) -> Node<Msg> {
|
|||||||
At::AutoFocus => true.as_at_value();
|
At::AutoFocus => true.as_at_value();
|
||||||
At::Value => query,
|
At::Value => query,
|
||||||
},
|
},
|
||||||
input_ev(Ev::Input, |q| Msg::SearchRequest {
|
input_ev(Ev::Input, |q| Msg::SearchRequest(
|
||||||
query: Url::encode_uri_component(q),
|
Url::encode_uri_component(q)
|
||||||
page: 0,
|
)),
|
||||||
results_per_page: SEARCH_RESULTS_PER_PAGE,
|
|
||||||
}),
|
|
||||||
// Resend search on enter.
|
// Resend search on enter.
|
||||||
keyboard_ev(Ev::KeyUp, move |e| if e.key_code() == 0x0d {
|
keyboard_ev(Ev::KeyUp, move |e| if e.key_code() == 0x0d {
|
||||||
Msg::SearchRequest {
|
Msg::SearchRequest(Url::encode_uri_component(query))
|
||||||
query: Url::encode_uri_component(query),
|
|
||||||
page: 0,
|
|
||||||
results_per_page: SEARCH_RESULTS_PER_PAGE,
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
Msg::Noop
|
Msg::Noop
|
||||||
}),
|
}),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user