From ba08c08e35b23c44b7de94fb39c4fffe19d5ceb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Wo=C5=BAniak?= Date: Mon, 10 Aug 2020 16:45:30 +0200 Subject: [PATCH] Add missing RTE features, add focus after RTE change, fix handle change. Add Epic as issue type. --- Cargo.lock | 916 +++++++++--------- Cargo.toml | 9 + jirs-client/Cargo.toml | 16 +- jirs-client/jirs.nginx | 6 +- jirs-client/js/css/styledIcon.css | 4 + jirs-client/js/css/styledRte.css | 41 +- jirs-client/js/css/variables.css | 8 + jirs-client/scripts/dev.sh | 3 +- jirs-client/src/lib.rs | 7 +- jirs-client/src/modal/add_issue.rs | 14 +- jirs-client/src/model.rs | 4 +- jirs-client/src/project_settings/update.rs | 2 +- jirs-client/src/shared/styled_editor.rs | 25 +- jirs-client/src/shared/styled_icon.rs | 9 +- jirs-client/src/shared/styled_input.rs | 47 +- jirs-client/src/shared/styled_rte.rs | 143 ++- jirs-client/static/index.js | 1 + jirs-data/src/lib.rs | 12 +- jirs-data/src/sql.rs | 2 + .../down.sql | 20 + .../up.sql | 17 + jirs-server/src/db/issues.rs | 22 +- jirs-server/src/schema.rs | 96 +- 23 files changed, 826 insertions(+), 598 deletions(-) create mode 100644 jirs-server/migrations/2020-08-10-133733_add_epic_issue_type/down.sql create mode 100644 jirs-server/migrations/2020-08-10-133733_add_epic_issue_type/up.sql diff --git a/Cargo.lock b/Cargo.lock index 82b13bd4..c0862e9e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6,23 +6,23 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4af87564ff659dee8f9981540cac9418c45e910c8072fdedd643a262a38fcaf" dependencies = [ - "actix-http", - "actix-rt", - "actix_derive", - "bitflags", - "bytes", - "crossbeam-channel", - "derive_more", - "futures 0.3.5", - "lazy_static", - "log", - "parking_lot", - "pin-project", - "smallvec", - "tokio", - "tokio-util 0.2.0", - "trust-dns-proto", - "trust-dns-resolver", + "actix-http", + "actix-rt", + "actix_derive", + "bitflags", + "bytes", + "crossbeam-channel", + "derive_more", + "futures 0.3.5", + "lazy_static", + "log", + "parking_lot 0.10.2", + "pin-project", + "smallvec", + "tokio", + "tokio-util 0.2.0", + "trust-dns-proto", + "trust-dns-resolver", ] [[package]] @@ -242,17 +242,17 @@ dependencies = [ [[package]] name = "actix-threadpool" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91164716d956745c79dcea5e66d2aa04506549958accefcede5368c70f2fd4ff" +checksum = "d209f04d002854b9afd3743032a27b066158817965bf5d036824d19ac2cc0e30" dependencies = [ - "derive_more", - "futures-channel", - "lazy_static", - "log", - "num_cpus", - "parking_lot", - "threadpool", + "derive_more", + "futures-channel", + "lazy_static", + "log", + "num_cpus", + "parking_lot 0.11.0", + "threadpool", ] [[package]] @@ -364,18 +364,18 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.12.2" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "602d785912f476e480434627e8732e6766b760c045bbf897d9dfaa9f4fbd399c" +checksum = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072" dependencies = [ - "gimli", + "gimli", ] [[package]] -name = "adler32" -version = "1.1.0" +name = "adler" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b077b825e468cc974f0020d4082ee6e03132512f207ef1a02fd5d00d1f32d" +checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" [[package]] name = "aho-corasick" @@ -392,7 +392,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" dependencies = [ - "winapi 0.3.8", + "winapi 0.3.9", ] [[package]] @@ -436,9 +436,9 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", - "libc", - "winapi 0.3.8", + "hermit-abi", + "libc", + "winapi 0.3.9", ] [[package]] @@ -478,16 +478,16 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.49" +version = "0.3.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05100821de9e028f12ae3d189176b41ee198341eb8f369956407fea2f5cc666c" +checksum = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293" dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", ] [[package]] @@ -523,9 +523,9 @@ checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" [[package]] name = "base64" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e223af0dc48c96d4f8342ec01a4974f139df863896b316681efd36742f22cc67" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" [[package]] name = "bigdecimal" @@ -632,12 +632,9 @@ checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" [[package]] name = "bytes" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "118cf036fbb97d0816e3c34b2d7a1e8cfc60f68fcf63d550ddbe9bd5f59c213b" -dependencies = [ - "loom", -] +checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" [[package]] name = "bytestring" @@ -656,9 +653,9 @@ checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" [[package]] name = "cc" -version = "1.0.54" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bbb73db36c1246e9034e307d0fba23f9a2e251faa47ade70c1bd252220c8311" +checksum = "f9a06fb2e53271d7c279ec1efea6ab691c35a2ae67ec0d91d7acec0caf13b518" [[package]] name = "cfg-if" @@ -668,16 +665,16 @@ checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "chrono" -version = "0.4.11" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80094f509cf8b5ae86a4966a39b3ff66cd7e2a3e594accec3743ff3fabeab5b2" +checksum = "c74d84029116787153e02106bf53e66828452a4b325cc8652b788b5967c0a0b6" dependencies = [ - "js-sys", - "num-integer", - "num-traits", - "serde", - "time 0.1.43", - "wasm-bindgen", + "js-sys", + "num-integer", + "num-traits", + "serde", + "time 0.1.43", + "wasm-bindgen", ] [[package]] @@ -701,24 +698,33 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" dependencies = [ - "bitflags", + "bitflags", +] + +[[package]] +name = "cloudabi" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467" +dependencies = [ + "bitflags", ] [[package]] name = "comrak" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17058cc536cf290563e88787d7b9e6030ce4742943017cc2ffb71f88034021c" +checksum = "b818732a109eeabbe99fee28030ff8ecbd606889fcd25509ed933e6c69b7aa69" dependencies = [ - "clap", - "entities", - "lazy_static", - "pest", - "pest_derive", - "regex", - "twoway", - "typed-arena", - "unicode_categories", + "clap", + "entities", + "lazy_static", + "pest", + "pest_derive", + "regex", + "twoway", + "typed-arena", + "unicode_categories", ] [[package]] @@ -780,12 +786,12 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cced8691919c02aac3cb0a1bc2e9b73d89e832bf9a06fc579d4e71b68a2da061" +checksum = "09ee0cc8804d5393478d743b035099520087a5186f3b93fa58cec08fa62407b6" dependencies = [ - "crossbeam-utils", - "maybe-uninit", + "cfg-if", + "crossbeam-utils", ] [[package]] @@ -820,13 +826,13 @@ dependencies = [ [[package]] name = "derive_more" -version = "0.99.8" +version = "0.99.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc655351f820d774679da6cdc23355a93de496867d8203496675162e17b1d671" +checksum = "298998b1cf6b5b2c8a7b023dfd45821825ce3ba8a8af55c921a0e734e4653f76" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -889,9 +895,9 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e93d7f5705de3e49895a2b5e0b8855a1c27f080192ae9c32a6432d50741a57a" dependencies = [ - "libc", - "redox_users", - "winapi 0.3.8", + "libc", + "redox_users", + "winapi 0.3.9", ] [[package]] @@ -1082,26 +1088,26 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "affc17579b132fc2461adf7c575cc6e8b134ebca52c51f5411388965227dc695" +checksum = "e500da2fab70bdc43f8f0e0b350a227f31c72311c56aba48f01d5cd62bb0345b" dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "winapi 0.3.8", + "cfg-if", + "libc", + "redox_syscall", + "winapi 0.3.9", ] [[package]] name = "flate2" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cfff41391129e0a856d6d822600b8d71179d46879e310417eb9c762eb178b42" +checksum = "68c90b0fc46cf89d227cc78b40e494ff81287a92dd07631e5af0d06fe3cf885e" dependencies = [ - "cfg-if", - "crc32fast", - "libc", - "miniz_oxide", + "cfg-if", + "crc32fast", + "libc", + "miniz_oxide", ] [[package]] @@ -1276,19 +1282,6 @@ dependencies = [ "byteorder", ] -[[package]] -name = "generator" -version = "0.6.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add72f17bb81521258fcc8a7a3245b1e184e916bfbe34f0ea89558f440df5c68" -dependencies = [ - "cc", - "libc", - "log", - "rustc_version", - "winapi 0.3.8", -] - [[package]] name = "generic-array" version = "0.12.3" @@ -1321,9 +1314,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc8e0c9bce37868955864dbecd2b1ab2bdf967e6f28066d65aaac620444b65c" +checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" [[package]] name = "glob" @@ -1369,21 +1362,30 @@ dependencies = [ [[package]] name = "h2" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79b7246d7e4b979c03fa093da39cfb3617a96bbeee6310af63991668d7e843ff" +checksum = "993f9e0baeed60001cf565546b0d3dbe6a6ad23f2bd31644a133c641eccf6d53" dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "log", - "slab", - "tokio", - "tokio-util 0.3.1", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util 0.3.1", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34f595585f103464d8d2f6e9864682d74c1601fed5e07d62b1c9058dba8246fb" +dependencies = [ + "autocfg 1.0.0", ] [[package]] @@ -1392,16 +1394,16 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" dependencies = [ - "unicode-segmentation", + "unicode-segmentation", ] [[package]] name = "hermit-abi" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9586eedd4ce6b3c498bc3b4dd92fc9f11166aa908a914071953768066c67909" +checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" dependencies = [ - "libc", + "libc", ] [[package]] @@ -1436,9 +1438,9 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" dependencies = [ - "libc", - "match_cfg", - "winapi 0.3.8", + "libc", + "match_cfg", + "winapi 0.3.9", ] [[package]] @@ -1479,39 +1481,39 @@ dependencies = [ [[package]] name = "hyper" -version = "0.13.6" +version = "0.13.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6e7655b9594024ad0ee439f3b5a7299369dc2a3f459b47c696f9ff676f9aa1f" +checksum = "3e68a8dd9716185d9e64ea473ea6ef63529252e3e27623295a0378a19665d5eb" dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "itoa", - "log", - "pin-project", - "socket2", - "time 0.1.43", - "tokio", - "tower-service", - "want", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "itoa", + "pin-project", + "socket2", + "time 0.1.43", + "tokio", + "tower-service", + "tracing", + "want", ] [[package]] name = "hyper-tls" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3adcd308402b9553630734e9c36b77a7e48b3821251ca2493e8cd596763aafaa" +checksum = "d979acc56dcb5b8dddba3917601745e877576475aa046df3226eabdecef78eed" dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-tls", + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-tls", ] [[package]] @@ -1527,11 +1529,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c398b2b113b55809ceb9ee3e753fcbac793f1956663f3c36549c1346015c2afe" +checksum = "5b88cd59ee5f71fea89a62248fc8f387d44400cefe05ef548466d61ced9029a7" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.0", + "hashbrown", ] [[package]] @@ -1551,16 +1554,22 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e74a1aa87c59aeff6ef2cc2fa62d41bc43f54952f55652656b18a02fd5e356c0" dependencies = [ - "libc", + "libc", ] +[[package]] +name = "instant" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b141fdc7836c525d4d594027d318c84161ca17aaf8113ab1f81ab93ae897485" + [[package]] name = "iovec" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" dependencies = [ - "libc", + "libc", ] [[package]] @@ -1569,10 +1578,10 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7" dependencies = [ - "socket2", - "widestring", - "winapi 0.3.8", - "winreg", + "socket2", + "widestring", + "winapi 0.3.9", + "winreg", ] [[package]] @@ -1686,7 +1695,6 @@ dependencies = [ "js-sys", "seed", "serde", - "serde_json", "uuid 0.8.1", "wasm-bindgen", "wasm-bindgen-test", @@ -1696,11 +1704,11 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.40" +version = "0.3.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce10c23ad2ea25ceca0093bd3192229da4c5b3c0f2de499c1ecac0d98d452177" +checksum = "85a7e2c92a4804dd459b86c339278d0fe87cf93757fae222c3fa3ae75458bc73" dependencies = [ - "wasm-bindgen", + "wasm-bindgen", ] [[package]] @@ -1765,9 +1773,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.71" +version = "0.2.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49" +checksum = "a2f02823cf78b754822df5f7f268fb59822e7296276d3e069d8e8cb26a14bd10" [[package]] name = "linked-hash-map" @@ -1785,23 +1793,21 @@ dependencies = [ ] [[package]] -name = "log" -version = "0.4.8" +name = "lock_api" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +checksum = "28247cc5a5be2f05fbcd76dd0cf2c7d3b5400cb978a28042abcd4fa0b3f8261c" dependencies = [ - "cfg-if", + "scopeguard", ] [[package]] -name = "loom" -version = "0.3.4" +name = "log" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ecc775857611e1df29abba5c41355cdf540e7e9d4acfdf0f355eefee82330b7" +checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" dependencies = [ - "cfg-if", - "generator", - "scoped-tls 0.1.2", + "cfg-if", ] [[package]] @@ -1831,12 +1837,6 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - [[package]] name = "md5" version = "0.7.0" @@ -1873,11 +1873,11 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.3.7" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435" +checksum = "be0f75932c1f6cfae3c04000e40114adf955636e19040f9c0a2c380702aa1c7f" dependencies = [ - "adler32", + "adler", ] [[package]] @@ -1913,14 +1913,14 @@ dependencies = [ [[package]] name = "mio-named-pipes" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5e374eff525ce1c5b7687c4cef63943e7686524a387933ad27ca7ec43779cb3" +checksum = "0840c1c50fd55e521b247f949c241c9997709f23bd7f023b9762cd561e935656" dependencies = [ - "log", - "mio", - "miow 0.3.5", - "winapi 0.3.8", + "log", + "mio", + "miow 0.3.5", + "winapi 0.3.9", ] [[package]] @@ -1952,8 +1952,8 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07b88fb9795d4d36d62a012dfbf49a8f5cf12751f36d31a9dbe66d528e58979e" dependencies = [ - "socket2", - "winapi 0.3.8", + "socket2", + "winapi 0.3.9", ] [[package]] @@ -1980,9 +1980,9 @@ version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7" dependencies = [ - "cfg-if", - "libc", - "winapi 0.3.8", + "cfg-if", + "libc", + "winapi 0.3.9", ] [[package]] @@ -2001,16 +2001,16 @@ version = "4.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80ae4a7688d1fab81c5bf19c64fc8db920be8d519ce6336ed4e7efe024724dbd" dependencies = [ - "bitflags", - "filetime", - "fsevent", - "fsevent-sys", - "inotify", - "libc", - "mio", - "mio-extras", - "walkdir", - "winapi 0.3.8", + "bitflags", + "filetime", + "fsevent", + "fsevent-sys", + "inotify", + "libc", + "mio", + "mio-extras", + "walkdir", + "winapi 0.3.9", ] [[package]] @@ -2079,16 +2079,16 @@ checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] name = "openssl" -version = "0.10.29" +version = "0.10.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee6d85f4cb4c4f59a6a85d5b68a233d280c82e29e822913b9c8b129fbf20bdd" +checksum = "8d575eff3665419f9b83678ff2815858ad9d11567e082f5ac1814baba4e2bcb4" dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "lazy_static", - "libc", - "openssl-sys", + "bitflags", + "cfg-if", + "foreign-types", + "lazy_static", + "libc", + "openssl-sys", ] [[package]] @@ -2106,8 +2106,8 @@ dependencies = [ "autocfg 1.0.0", "cc", "libc", - "pkg-config", - "vcpkg", + "pkg-config", + "vcpkg", ] [[package]] @@ -2116,8 +2116,19 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" dependencies = [ - "lock_api", - "parking_lot_core", + "lock_api 0.3.4", + "parking_lot_core 0.7.2", +] + +[[package]] +name = "parking_lot" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4893845fa2ca272e647da5d0e46660a314ead9c2fdd9a883aabc32e481a8733" +dependencies = [ + "instant", + "lock_api 0.4.1", + "parking_lot_core 0.8.0", ] [[package]] @@ -2126,12 +2137,27 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" dependencies = [ - "cfg-if", - "cloudabi", - "libc", - "redox_syscall", - "smallvec", - "winapi 0.3.8", + "cfg-if", + "cloudabi 0.0.3", + "libc", + "redox_syscall", + "smallvec", + "winapi 0.3.9", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b" +dependencies = [ + "cfg-if", + "cloudabi 0.1.0", + "instant", + "libc", + "redox_syscall", + "smallvec", + "winapi 0.3.9", ] [[package]] @@ -2185,22 +2211,22 @@ dependencies = [ [[package]] name = "pin-project" -version = "0.4.22" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12e3a6cdbfe94a5e4572812a0201f8c0ed98c1c452c7b8563ce2276988ef9c17" +checksum = "ca4433fff2ae79342e497d9f8ee990d174071408f28f726d6d83af93e58e48aa" dependencies = [ - "pin-project-internal", + "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "0.4.22" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a0ffd45cf79d88737d7cc85bfd5d2894bee1139b356e616fe85dc389c61aaf7" +checksum = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -2217,9 +2243,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" +checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" [[package]] name = "ppv-lite86" @@ -2248,9 +2274,9 @@ dependencies = [ [[package]] name = "proc-macro-hack" -version = "0.5.16" +version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e0456befd48169b9f13ef0f0ad46d492cf9d2dbb918bcf38e01eed4ce3ec5e4" +checksum = "99c605b9a0adc77b7211c6b1f722dcb613d68d66859a44f3d485a6da332b0598" [[package]] name = "proc-macro-nested" @@ -2260,23 +2286,23 @@ checksum = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a" [[package]] name = "proc-macro2" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beae6331a816b1f65d04c45b078fd8e6c93e8071771f41b8163255bbd8d7c8fa" +checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" dependencies = [ - "unicode-xid", + "unicode-xid", ] [[package]] name = "pulldown-cmark" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e142c3b8f49d2200605ee6ba0b1d757310e9e7a72afe78c36ee2ef67300ee00" +checksum = "ca36dea94d187597e104a5c8e4b07576a8a45aa5db48a65e12940d3eb7461f55" dependencies = [ - "bitflags", - "getopts", - "memchr", - "unicase", + "bitflags", + "getopts", + "memchr", + "unicase", ] [[package]] @@ -2296,13 +2322,13 @@ dependencies = [ [[package]] name = "r2d2" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1497e40855348e4a8a40767d8e55174bce1e445a3ac9254ad44ad468ee0485af" +checksum = "545c5bc2b880973c9c10e4067418407a0ccaa3091781d1671d46eb35107cb26f" dependencies = [ - "log", - "parking_lot", - "scheduled-thread-pool", + "log", + "parking_lot 0.11.0", + "scheduled-thread-pool", ] [[package]] @@ -2311,11 +2337,11 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" dependencies = [ - "fuchsia-cprng", - "libc", - "rand_core 0.3.1", - "rdrand", - "winapi 0.3.8", + "fuchsia-cprng", + "libc", + "rand_core 0.3.1", + "rdrand", + "winapi 0.3.9", ] [[package]] @@ -2324,17 +2350,17 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" dependencies = [ - "autocfg 0.1.7", - "libc", - "rand_chacha 0.1.1", - "rand_core 0.4.2", - "rand_hc 0.1.0", - "rand_isaac", - "rand_jitter", - "rand_os", - "rand_pcg 0.1.2", - "rand_xorshift", - "winapi 0.3.8", + "autocfg 0.1.7", + "libc", + "rand_chacha 0.1.1", + "rand_core 0.4.2", + "rand_hc 0.1.0", + "rand_isaac", + "rand_jitter", + "rand_os", + "rand_pcg 0.1.2", + "rand_xorshift", + "winapi 0.3.9", ] [[package]] @@ -2428,9 +2454,9 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" dependencies = [ - "libc", - "rand_core 0.4.2", - "winapi 0.3.8", + "libc", + "rand_core 0.4.2", + "winapi 0.3.9", ] [[package]] @@ -2439,12 +2465,12 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" dependencies = [ - "cloudabi", - "fuchsia-cprng", - "libc", - "rand_core 0.4.2", - "rdrand", - "winapi 0.3.8", + "cloudabi 0.0.3", + "fuchsia-cprng", + "libc", + "rand_core 0.4.2", + "rdrand", + "winapi 0.3.9", ] [[package]] @@ -2486,9 +2512,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" +checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "redox_termios" @@ -2534,7 +2560,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi 0.3.8", + "winapi 0.3.9", ] [[package]] @@ -2553,18 +2579,18 @@ version = "0.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a8d624cb48fcaca612329e4dd544380aa329ef338e83d3a90f5b7897e631971" dependencies = [ - "async-trait", - "base64 0.12.2", - "bytes", - "futures 0.3.5", - "hmac", - "http", - "hyper", - "hyper-tls", - "lazy_static", - "log", - "md5", - "percent-encoding", + "async-trait", + "base64 0.12.3", + "bytes", + "futures 0.3.5", + "hmac", + "http", + "hyper", + "hyper-tls", + "lazy_static", + "log", + "md5", + "percent-encoding", "pin-project", "rusoto_credential", "rusoto_signature", @@ -2615,17 +2641,17 @@ version = "0.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62940a2bd479900a1bf8935b8f254d3e19368ac3ac4570eb4bd48eb46551a1b7" dependencies = [ - "base64 0.12.2", - "bytes", - "futures 0.3.5", - "hex", - "hmac", - "http", - "hyper", - "log", - "md5", - "percent-encoding", - "pin-project", + "base64 0.12.3", + "bytes", + "futures 0.3.5", + "hex", + "hmac", + "http", + "hyper", + "log", + "md5", + "percent-encoding", + "pin-project", "rusoto_credential", "rustc_version", "serde", @@ -2688,25 +2714,19 @@ version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" dependencies = [ - "lazy_static", - "winapi 0.3.8", + "lazy_static", + "winapi 0.3.9", ] [[package]] name = "scheduled-thread-pool" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0988d7fdf88d5e5fcf5923a0f1e8ab345f3e98ab4bc6bc45a2d5ff7f7458fbf6" +checksum = "dc6f74fd1204073fa02d5d5d68bec8021be4c38690b61264b2fdb48083d0e7d7" dependencies = [ - "parking_lot", + "parking_lot 0.11.0", ] -[[package]] -name = "scoped-tls" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28" - [[package]] name = "scoped-tls" version = "1.0.0" @@ -2805,13 +2825,13 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.55" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec2c5d7e739bc07a3e73381a39d61fdb5f671c60c1df26a130690665803d8226" +checksum = "164eacbdb13512ec2745fb09d51fd5b22b0d65ed294a1dcf7285a360c80a675c" dependencies = [ - "itoa", - "ryu", - "serde", + "itoa", + "ryu", + "serde", ] [[package]] @@ -2880,9 +2900,9 @@ checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] name = "smallvec" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7cb5678e1615754284ec264d9bb5b4c27d2018577fd90ac0ceb578591ed5ee4" +checksum = "3757cb9d89161a2f24e1cf78efa0c1fcff485d18e3f55e0aa3480824ddaa0f3f" [[package]] name = "socket2" @@ -2890,10 +2910,10 @@ version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918" dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "winapi 0.3.8", + "cfg-if", + "libc", + "redox_syscall", + "winapi 0.3.9", ] [[package]] @@ -2968,13 +2988,13 @@ checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" [[package]] name = "syn" -version = "1.0.33" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d5d96e8cbb005d6959f119f773bfaebb5684296108fb32600c00cde305b2cd" +checksum = "4cdb98bcb1f9d81d07b536179c269ea15999b5d14ea958196413869445bb5250" dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", + "proc-macro2", + "quote", + "unicode-xid", ] [[package]] @@ -2995,12 +3015,12 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" dependencies = [ - "cfg-if", - "libc", - "rand 0.7.3", - "redox_syscall", - "remove_dir_all", - "winapi 0.3.8", + "cfg-if", + "libc", + "rand 0.7.3", + "redox_syscall", + "remove_dir_all", + "winapi 0.3.9", ] [[package]] @@ -3057,8 +3077,8 @@ version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" dependencies = [ - "libc", - "winapi 0.3.8", + "libc", + "winapi 0.3.9", ] [[package]] @@ -3067,13 +3087,13 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a51cadc5b1eec673a685ff7c33192ff7b7603d0b75446fb354939ee615acb15" dependencies = [ - "cfg-if", - "libc", - "standback", - "stdweb", - "time-macros", - "version_check 0.9.2", - "winapi 0.3.8", + "cfg-if", + "libc", + "standback", + "stdweb", + "time-macros", + "version_check 0.9.2", + "winapi 0.3.9", ] [[package]] @@ -3107,25 +3127,25 @@ checksum = "53953d2d3a5ad81d9f844a32f14ebb121f50b650cd59d0ee2a07cf13c617efed" [[package]] name = "tokio" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d099fa27b9702bed751524694adbe393e18b36b204da91eb1cbbbbb4a5ee2d58" +checksum = "5d34ca54d84bf2b5b4d7d31e901a8464f7b60ac145a284fba25ceb801f2ddccd" dependencies = [ - "bytes", - "fnv", - "futures-core", - "iovec", - "lazy_static", - "libc", - "memchr", - "mio", - "mio-named-pipes", - "mio-uds", - "pin-project-lite", - "signal-hook-registry", - "slab", - "tokio-macros", - "winapi 0.3.8", + "bytes", + "fnv", + "futures-core", + "iovec", + "lazy_static", + "libc", + "memchr", + "mio", + "mio-named-pipes", + "mio-uds", + "pin-project-lite", + "signal-hook-registry", + "slab", + "tokio-macros", + "winapi 0.3.9", ] [[package]] @@ -3183,7 +3203,7 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" dependencies = [ - "serde", + "serde", ] [[package]] @@ -3192,15 +3212,35 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" +[[package]] +name = "tracing" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbdf4ccd1652592b01286a5dbe1e2a77d78afaa34beadd9872a5f7396f92aaa9" +dependencies = [ + "cfg-if", + "log", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94ae75f0d28ae10786f3b1895c55fe72e79928fd5ccdebb5438c75e93fec178f" +dependencies = [ + "lazy_static", +] + [[package]] name = "trust-dns-proto" version = "0.18.0-alpha.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a7f3a2ab8a919f5eca52a468866a67ed7d3efa265d48a652a9a3452272b413f" dependencies = [ - "async-trait", - "enum-as-inner", - "failure", + "async-trait", + "enum-as-inner", + "failure", "futures 0.3.5", "idna", "lazy_static", @@ -3233,9 +3273,9 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" +checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "tui" @@ -3321,9 +3361,9 @@ checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" [[package]] name = "unicode-width" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" +checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" [[package]] name = "unicode-xid" @@ -3438,9 +3478,9 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" dependencies = [ - "same-file", - "winapi 0.3.8", - "winapi-util", + "same-file", + "winapi 0.3.9", + "winapi-util", ] [[package]] @@ -3461,104 +3501,104 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasm-bindgen" -version = "0.2.63" +version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2dc4aa152834bc334f506c1a06b866416a8b6697d5c9f75b9a689c8486def0" +checksum = "f0563a9a4b071746dd5aedbc3a28c6fe9be4586fb3fbadb67c400d4f53c6b16c" dependencies = [ - "cfg-if", - "serde", - "serde_json", - "wasm-bindgen-macro", + "cfg-if", + "serde", + "serde_json", + "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.63" +version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded84f06e0ed21499f6184df0e0cb3494727b0c5da89534e0fcc55c51d812101" +checksum = "bc71e4c5efa60fb9e74160e89b93353bc24059999c0ae0fb03affc39770310b0" dependencies = [ - "bumpalo", - "lazy_static", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", + "bumpalo", + "lazy_static", + "log", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.13" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64487204d863f109eb77e8462189d111f27cb5712cc9fdb3461297a76963a2f6" +checksum = "95f8d235a77f880bcef268d379810ea6c0af2eacfa90b1ad5af731776e0c4699" dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.63" +version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "838e423688dac18d73e31edce74ddfac468e37b1506ad163ffaf0a46f703ffe3" +checksum = "97c57cefa5fa80e2ba15641578b44d36e7a64279bc5ed43c6dbaf329457a2ed2" dependencies = [ - "quote", - "wasm-bindgen-macro-support", + "quote", + "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.63" +version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3156052d8ec77142051a533cdd686cba889537b213f948cd1d20869926e68e92" +checksum = "841a6d1c35c6f596ccea1f82504a192a60378f64b3bb0261904ad8f2f5657556" dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.63" +version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9ba19973a58daf4db6f352eda73dc0e289493cd29fb2632eb172085b6521acd" +checksum = "93b162580e34310e5931c4b792560108b10fd14d64915d7fff8ff00180e70092" [[package]] name = "wasm-bindgen-test" -version = "0.3.13" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f0dfda4d3b3f8acbc3c291b09208081c203af457fb14a229783b06e2f128aa7" +checksum = "7d92df9d5715606f9e48f85df3b78cb77ae44a2ea9a5f2a785a97bd0066b9300" dependencies = [ - "console_error_panic_hook", - "js-sys", - "scoped-tls 1.0.0", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-bindgen-test-macro", + "console_error_panic_hook", + "js-sys", + "scoped-tls", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-bindgen-test-macro", ] [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.13" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c2e18093f11c19ca4e188c177fecc7c372304c311189f12c2f9bea5b7324ac7" +checksum = "51611ce8e84cba89379d91fc5074bacc5530f69da1c09a2853d906129d12b3b8" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2", + "quote", ] [[package]] name = "web-sys" -version = "0.3.40" +version = "0.3.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b72fe77fd39e4bd3eaa4412fd299a0be6b3dfe9d2597e2f1c20beb968f41d17" +checksum = "dda38f4e5ca63eda02c059d243aa25b5f35ab98451e518c51612cd0f1bd19a47" dependencies = [ - "js-sys", - "wasm-bindgen", + "js-sys", + "wasm-bindgen", ] [[package]] @@ -3567,10 +3607,10 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" dependencies = [ - "cfg-if", - "libc", - "memory_units", - "winapi 0.3.8", + "cfg-if", + "libc", + "memory_units", + "winapi 0.3.9", ] [[package]] @@ -3587,12 +3627,12 @@ checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" [[package]] name = "winapi" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] @@ -3613,7 +3653,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi 0.3.8", + "winapi 0.3.9", ] [[package]] @@ -3628,7 +3668,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" dependencies = [ - "winapi 0.3.8", + "winapi 0.3.9", ] [[package]] @@ -3637,7 +3677,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7daf138b6b14196e3830a588acf1e86966c694d3e8fb026fb105b8b5dca07e6e" dependencies = [ - "winapi 0.3.8", + "winapi 0.3.9", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 27262af3..466deff1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,15 @@ #license = "MPL-2.0" #license-file = "./LICENSE" +[profile.dev] +opt-level = 0 # Use slightly better optimizations. +overflow-checks = false # Disable integer overflow checks. +debug = 2 + +[profile.release] +lto = true +opt-level = 's' + [workspace] members = [ "./jirs-cli", diff --git a/jirs-client/Cargo.toml b/jirs-client/Cargo.toml index 03090c69..889daa0b 100644 --- a/jirs-client/Cargo.toml +++ b/jirs-client/Cargo.toml @@ -13,6 +13,10 @@ crate-type = ["cdylib", "rlib"] name = "jirs_client" path = "./src/lib.rs" +[profile.dev] +opt-level = 0 # Use slightly better optimizations. +overflow-checks = false # Disable integer overflow checks. + [profile.release] lto = true opt-level = 's' @@ -21,20 +25,24 @@ opt-level = 's' jirs-data = { path = "../jirs-data" } seed = { version = "0.7.0" } serde = "*" -serde_json = "*" bincode = "1.2.1" -chrono = { version = "0.4", features = [ "serde", "wasmbind" ] } -uuid = { version = "0.8.1", features = [ "serde" ] } -wasm-bindgen = "0.2.60" +chrono = { version = "0.4", features = ["serde", "wasmbind"] } +uuid = { version = "0.8.1", features = ["serde"] } futures = "^0.1.26" comrak = "*" wee_alloc = "*" +[dependencies.wasm-bindgen] +version = "0.2.66" +features = ["enable-interning"] + [dependencies.js-sys] version = "*" +default-features = false [dependencies.web-sys] version = "0.3.22" +default-features = false features = [ # elements "Window", diff --git a/jirs-client/jirs.nginx b/jirs-client/jirs.nginx index f6c75596..7c8213fe 100644 --- a/jirs-client/jirs.nginx +++ b/jirs-client/jirs.nginx @@ -1,13 +1,13 @@ server { listen 80; - listen 443 ssl http2; + # listen 443 ssl http2; server_name jirs.lvh.me; charset utf-8; root /home/eraden/code/eraden/jirs/jirs-client/tmp; - ssl_certificate /home/eraden/code/eraden/jirs/jirs-client/js/nginx-selfsigned.crt; - ssl_certificate_key /home/eraden/code/eraden/jirs/jirs-client/js/nginx-selfsigned.key; + # ssl_certificate /home/eraden/code/eraden/jirs/jirs-client/js/nginx-selfsigned.crt; + # ssl_certificate_key /home/eraden/code/eraden/jirs/jirs-client/js/nginx-selfsigned.key; # if ($scheme != "https") { # return 301 https://$host$request_uri; diff --git a/jirs-client/js/css/styledIcon.css b/jirs-client/js/css/styledIcon.css index 278ea9b6..eadd3ea9 100644 --- a/jirs-client/js/css/styledIcon.css +++ b/jirs-client/js/css/styledIcon.css @@ -41,6 +41,10 @@ i.styledIcon.story:before { content: "\ef2d"; } +i.styledIcon.epic:before { + content: '\ef30'; +} + i.styledIcon.arrowDown:before { content: "\ea92"; } diff --git a/jirs-client/js/css/styledRte.css b/jirs-client/js/css/styledRte.css index 5792b0cc..1205e6f0 100644 --- a/jirs-client/js/css/styledRte.css +++ b/jirs-client/js/css/styledRte.css @@ -11,12 +11,17 @@ } .styledRte > .bar > .row { - padding: 5px 0; + padding: 0 0 var(--rte-indent) 0; display: flex; + margin: 0 var(--rte-indent); +} + +.styledRte > .bar > .row:first-child { + padding: var(--rte-indent) 0; } .styledRte > .bar > .row > .group { - padding: 0 5px 0 0; + padding: 0 var(--rte-indent) 0 0; } .styledRte > .bar > .row > .group:first-child { @@ -30,7 +35,21 @@ .styledRte > .bar > .row > .group > .styledRteButton > .styledButton, .styledRte > .bar > .row > .group > .styledButton, .styledRte > .bar > .row > .group > span.headingList { - margin: 0 5px; + margin-right: var(--rte-indent); + font-size: var(--small-font-size); +} + +.styledRte > .bar > .row > .group.font > span.headingList > .headingOption { + margin-right: var(--rte-indent); +} + +.styledRte > .bar > .row > .group > .styledRteButton > .styledButton, +.styledRte > .bar > .row > .group > .styledRteButton > .styledButton > .styledIcon, +.styledRte > .bar > .row > .group > span.headingList > .headingOption > .styledButton, +.styledRte > .bar > .row > .group > span.headingList > .headingOption > .styledButton > span { + font-size: var(--small-font-size); + line-height: calc(2 * var(--small-font-size)); + height: calc(2 * var(--small-font-size)); } .styledRte > .bar > .row > .group > .headingList { @@ -64,6 +83,14 @@ margin-left: 25px; } +.styledRte > .editorWrapper > .editor ul > li { + list-style: square; +} + +.styledRte > .editorWrapper > .editor ol > li { + list-style: decimal; +} + .styledRte > .editorWrapper > .editor table { table-layout: fixed; border-spacing: 0; @@ -74,13 +101,17 @@ min-width: 24px; min-height: 24px; text-align: center; - padding: 5px; + padding: var(--rte-indent); border-bottom: 1px solid var(--borderLight); border-right: 1px solid var(--borderLight); border-left: 1px solid var(--borderLight); border-top: 1px solid var(--borderLight); } +.styledRte > .editorWrapper > .editor *:focus { + background: var(--secondary); +} + /**********************************************************/ /* Table tooltip */ /**********************************************************/ @@ -113,7 +144,7 @@ width: 24px; height: 24px; text-align: center; - padding: 5px; + padding: var(--rte-indent); border-bottom: 1px solid var(--borderLight); border-right: 1px solid var(--borderLight); border-left: 1px solid var(--borderLight); diff --git a/jirs-client/js/css/variables.css b/jirs-client/js/css/variables.css index 76398bc1..08151c07 100644 --- a/jirs-client/js/css/variables.css +++ b/jirs-client/js/css/variables.css @@ -25,6 +25,7 @@ --task: rgb(79, 173, 230); /* blue */ --bug: rgb(228, 77, 66); /* red */ --story: rgb(101, 186, 67); /* green */ + --epic: rgb(186, 142, 67); /* gold */ } :root { @@ -66,6 +67,13 @@ --font-medium: "CircularStdMedium"; --font-bold: "CircularStdBold"; --font-black: "CircularStdBlack"; + --normal-font-size: 1rem; + --small-font-size: .8rem; +} + +:root /* margin & padding */ +{ + --rte-indent: 5px; } :root { /* user without avatar */ diff --git a/jirs-client/scripts/dev.sh b/jirs-client/scripts/dev.sh index bf937727..0e17b989 100755 --- a/jirs-client/scripts/dev.sh +++ b/jirs-client/scripts/dev.sh @@ -6,7 +6,8 @@ rm -Rf tmp mkdir -p tmp mkdir -p target -wasm-pack build --mode normal --dev --out-name jirs --out-dir ./tmp --target web -- --verbose +wasm-pack build --mode force --dev --out-name jirs --out-dir ./tmp --target web -- --verbose + ../target/debug/jirs-css -i ./js/styles.css -O ./tmp/styles.css cp -r ./static/* ./tmp diff --git a/jirs-client/src/lib.rs b/jirs-client/src/lib.rs index 012d3873..dd41c629 100644 --- a/jirs-client/src/lib.rs +++ b/jirs-client/src/lib.rs @@ -288,17 +288,18 @@ fn window_events(_model: &Model) -> Vec> { .active_element() .map(|el| el.tag_name()) .unwrap_or_default(); + let key = match tag_name.to_lowercase().as_str() { - "input" | "textarea" => "".to_string(), + "" | "input" | "textarea" => return None, _ => event.key(), }; - Msg::GlobalKeyDown { + Some(Msg::GlobalKeyDown { key, shift: event.shift_key(), ctrl: event.ctrl_key(), alt: event.alt_key(), - } + }) }, )] } diff --git a/jirs-client/src/modal/add_issue.rs b/jirs-client/src/modal/add_issue.rs index 7a006766..35a13d44 100644 --- a/jirs-client/src/modal/add_issue.rs +++ b/jirs-client/src/modal/add_issue.rs @@ -26,6 +26,7 @@ pub fn update(msg: &Msg, model: &mut crate::model::Model, orders: &mut impl Orde _ => return, }; + modal.title_state.update(msg); modal.assignees_state.update(msg, orders); modal.reporter_state.update(msg, orders); modal.type_state.update(msg, orders); @@ -37,7 +38,7 @@ pub fn update(msg: &Msg, model: &mut crate::model::Model, orders: &mut impl Orde let project_id = model.project.as_ref().map(|p| p.id).unwrap_or_default(); let payload = jirs_data::CreateIssuePayload { - title: modal.title.clone(), + title: modal.title_state.value.clone(), issue_type: modal.issue_type, issue_status_id: modal.issue_status_id, priority: modal.priority, @@ -64,9 +65,6 @@ pub fn update(msg: &Msg, model: &mut crate::model::Model, orders: &mut impl Orde Msg::StrInputChanged(FieldId::AddIssueModal(IssueFieldId::Description), value) => { modal.description = Some(value.clone()); } - Msg::StrInputChanged(FieldId::AddIssueModal(IssueFieldId::Title), value) => { - modal.title = value.clone(); - } // IssueTypeAddIssueModal Msg::StyledSelectChanged( @@ -144,7 +142,7 @@ pub fn view(model: &Model, modal: &AddIssueModal) -> Node { .into_node(); let short_summary = StyledInput::build(FieldId::AddIssueModal(IssueFieldId::Title)) - .valid(true) + .state(&modal.title_state) .build() .into_node(); let short_summary_field = StyledField::build() @@ -269,7 +267,8 @@ pub fn view(model: &Model, modal: &AddIssueModal) -> Node { .add_class("ActionButton") .on_click(mouse_ev(Ev::Click, |ev| { ev.stop_propagation(); - Msg::AddIssue + ev.prevent_default(); + Some(Msg::AddIssue) })) .build() .into_node(); @@ -281,7 +280,8 @@ pub fn view(model: &Model, modal: &AddIssueModal) -> Node { .text("Cancel") .on_click(mouse_ev(Ev::Click, |ev| { ev.stop_propagation(); - Msg::ModalDropped + ev.prevent_default(); + Some(Msg::ModalDropped) })) .build() .into_node(); diff --git a/jirs-client/src/model.rs b/jirs-client/src/model.rs index 00a026de..a8d863f1 100644 --- a/jirs-client/src/model.rs +++ b/jirs-client/src/model.rs @@ -154,7 +154,6 @@ impl EditIssueModal { #[derive(Clone, Debug, PartialOrd, PartialEq)] pub struct AddIssueModal { - pub title: String, pub issue_type: IssueType, pub priority: IssuePriority, pub description: Option, @@ -168,6 +167,7 @@ pub struct AddIssueModal { pub issue_status_id: i32, // modal fields + pub title_state: StyledInputState, pub type_state: StyledSelectState, pub reporter_state: StyledSelectState, pub assignees_state: StyledSelectState, @@ -177,7 +177,6 @@ pub struct AddIssueModal { impl Default for AddIssueModal { fn default() -> Self { Self { - title: Default::default(), issue_type: Default::default(), priority: Default::default(), description: Default::default(), @@ -189,6 +188,7 @@ impl Default for AddIssueModal { user_ids: Default::default(), reporter_id: Default::default(), issue_status_id: Default::default(), + title_state: StyledInputState::new(FieldId::AddIssueModal(IssueFieldId::Title), ""), type_state: StyledSelectState::new(FieldId::AddIssueModal(IssueFieldId::Type), vec![]), reporter_state: StyledSelectState::new( FieldId::AddIssueModal(IssueFieldId::Reporter), diff --git a/jirs-client/src/project_settings/update.rs b/jirs-client/src/project_settings/update.rs index 5ea6c50f..928f85c3 100644 --- a/jirs-client/src/project_settings/update.rs +++ b/jirs-client/src/project_settings/update.rs @@ -54,7 +54,7 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders) { page.project_category_state.update(&msg, orders); page.time_tracking.update(&msg); page.name.update(&msg); - page.description_rte.update(&msg); + page.description_rte.update(&msg, orders); match msg { Msg::StrInputChanged(FieldId::ProjectSettings(ProjectFieldId::Name), text) => { diff --git a/jirs-client/src/shared/styled_editor.rs b/jirs-client/src/shared/styled_editor.rs index 0d35d5d6..90472889 100644 --- a/jirs-client/src/shared/styled_editor.rs +++ b/jirs-client/src/shared/styled_editor.rs @@ -108,26 +108,7 @@ pub fn render(values: StyledEditor) -> Node { .build() .into_node(); - let parsed = comrak::markdown_to_html( - text.as_str(), - &comrak::ComrakOptions { - hardbreaks: false, - smart: true, - github_pre_lang: true, - width: 0, - default_info_string: None, - unsafe_: false, - ext_strikethrough: true, - ext_tagfilter: true, - ext_table: true, - ext_autolink: true, - ext_tasklist: true, - ext_superscript: true, - ext_header_ids: None, - ext_footnotes: true, - ext_description_lists: true, - }, - ); + let parsed = comrak::markdown_to_html(text.as_str(), &comrak::ComrakOptions::default()); let parsed_node = Node::from_html(parsed.as_str()); let (editor_radio_node, view_radio_node) = match mode { @@ -169,9 +150,9 @@ pub fn render(values: StyledEditor) -> Node { ], label![ if mode == Mode::Editor { - class!["navbar editorTab activeTab"] + C!["navbar editorTab activeTab"] } else { - class!["navbar editorTab"] + C!["navbar editorTab"] }, attrs![At::For => editor_id.as_str()], "Editor", diff --git a/jirs-client/src/shared/styled_icon.rs b/jirs-client/src/shared/styled_icon.rs index cf31be06..797ea57e 100644 --- a/jirs-client/src/shared/styled_icon.rs +++ b/jirs-client/src/shared/styled_icon.rs @@ -8,10 +8,13 @@ use crate::Msg; #[allow(dead_code)] #[derive(Copy, Clone, Debug)] pub enum Icon { - Bug, Stopwatch, + + Bug, Task, Story, + Epic, + ArrowDown, ArrowLeftCircle, ArrowUp, @@ -96,7 +99,7 @@ pub enum Icon { impl Icon { pub fn to_color(self) -> Option { match self { - Icon::Bug | Icon::Task | Icon::Story => Some(format!("var(--{})", self)), + Icon::Bug | Icon::Task | Icon::Story | Icon::Epic => Some(format!("var(--{})", self)), _ => None, } } @@ -192,6 +195,7 @@ impl std::fmt::Display for Icon { Icon::Undo => "undo", Icon::ListingDots => "listing-dots", Icon::ListingNumber => "listing-number", + Icon::Epic => "epic", }; f.write_str(code) } @@ -203,6 +207,7 @@ impl From for Icon { IssueType::Task => Icon::Task, IssueType::Bug => Icon::Bug, IssueType::Story => Icon::Story, + IssueType::Epic => Icon::Epic, } } } diff --git a/jirs-client/src/shared/styled_input.rs b/jirs-client/src/shared/styled_input.rs index efe14eed..1f58c3f0 100644 --- a/jirs-client/src/shared/styled_input.rs +++ b/jirs-client/src/shared/styled_input.rs @@ -196,17 +196,15 @@ pub fn render(values: StyledInput) -> Node { mut wrapper_class_list, variant, auto_focus, - mut input_handlers, + input_handlers, } = values; - wrapper_class_list.push("styledInput".to_string()); wrapper_class_list.push(variant.to_string()); wrapper_class_list.push(format!("{}", id)); if !valid { wrapper_class_list.push("invalid".to_string()); } - input_class_list.push("inputElement".to_string()); input_class_list.push(variant.to_string()); if icon.is_some() { input_class_list.push("withIcon".to_string()); @@ -216,27 +214,37 @@ pub fn render(values: StyledInput) -> Node { Some(icon) => StyledIcon::build(icon).build().into_node(), _ => empty![], }; - let field_id = id.clone(); - input_handlers.push(ev(Ev::Input, move |event| { - event.stop_propagation(); - let target = event.target().unwrap(); - let input = seed::to_input(&target); - let value = input.value(); - Msg::StrInputChanged(field_id, value) - })); - input_handlers.push(ev(Ev::KeyUp, move |event| { - event.stop_propagation(); - None as Option - })); - input_handlers.push(ev(Ev::Click, move |event| { - event.stop_propagation(); - None as Option - })); + let on_input = { + let field_id = id.clone(); + ev(Ev::Input, move |event| { + event.stop_propagation(); + let target = event.target().unwrap(); + let input = seed::to_input(&target); + let value = input.value(); + Msg::StrInputChanged(field_id, value) + }) + }; + let on_keyup = { + ev(Ev::KeyUp, move |event| { + event.stop_propagation(); + None as Option + }) + }; + let on_click = { + ev(Ev::Click, move |event| { + event.stop_propagation(); + None as Option + }) + }; div![ + C!["styledInput"], attrs!(At::Class => wrapper_class_list.join(" ")), icon, + on_click, + on_keyup, seed::input![ + C!["inputElement"], attrs![ At::Id => format!("{}", id), At::Class => input_class_list.join(" "), @@ -249,6 +257,7 @@ pub fn render(values: StyledInput) -> Node { } else { vec![] }, + on_input, input_handlers, ], ] diff --git a/jirs-client/src/shared/styled_rte.rs b/jirs-client/src/shared/styled_rte.rs index a2f3c882..219964e4 100644 --- a/jirs-client/src/shared/styled_rte.rs +++ b/jirs-client/src/shared/styled_rte.rs @@ -8,6 +8,7 @@ use crate::{FieldId, Msg}; #[derive(Debug, Clone, Copy)] pub enum HeadingSize { + Normal, H1, H2, H3, @@ -16,20 +17,37 @@ pub enum HeadingSize { H6, } +impl HeadingSize { + fn all() -> Vec { + use HeadingSize::*; + + vec![Normal, H1, H2, H3, H4, H5, H6] + } +} + impl ToString for HeadingSize { fn to_string(&self) -> String { + use HeadingSize::*; + match self { - HeadingSize::H1 => "H1", - HeadingSize::H2 => "H2", - HeadingSize::H3 => "H3", - HeadingSize::H4 => "H4", - HeadingSize::H5 => "H5", - HeadingSize::H6 => "H6", + Normal => "Normal", + H1 => "H1", + H2 => "H2", + H3 => "H3", + H4 => "H4", + H5 => "H5", + H6 => "H6", } .to_string() } } +#[derive(Debug)] +pub enum RteIndentMsg { + Increase, + Decrease, +} + #[derive(Debug)] pub enum RteMsg { Bold, @@ -56,6 +74,9 @@ pub enum RteMsg { TableSetColumns(u16), TableSetVisibility(bool), InsertTable { rows: u16, cols: u16 }, + ChangeIndent(RteIndentMsg), + + RequestFocus(uuid::Uuid), } #[derive(Debug)] @@ -101,19 +122,42 @@ impl RteMsg { RteMsg::JustifyLeft => Some(ExecCommand::new("justifyLeft")), RteMsg::JustifyRight => Some(ExecCommand::new("justifyRight")), RteMsg::InsertParagraph => Some(ExecCommand::new("insertParagraph")), - RteMsg::InsertHeading(heading) => { - Some(ExecCommand::new_with_param("heading", heading.to_string())) - } + RteMsg::InsertHeading(heading) => match heading { + HeadingSize::H1 + | HeadingSize::H2 + | HeadingSize::H3 + | HeadingSize::H4 + | HeadingSize::H5 + | HeadingSize::H6 => { + Some(ExecCommand::new_with_param("heading", heading.to_string())) + } + HeadingSize::Normal => Some(ExecCommand::new_with_param("formatBlock", "div")), + }, RteMsg::InsertUnorderedList => Some(ExecCommand::new("insertUnorderedList")), RteMsg::InsertOrderedList => Some(ExecCommand::new("insertOrderedList")), RteMsg::RemoveFormat => Some(ExecCommand::new("removeFormat")), RteMsg::Subscript => Some(ExecCommand::new("subscript")), RteMsg::Superscript => Some(ExecCommand::new("superscript")), RteMsg::InsertTable { .. } => None, + + // indent + RteMsg::ChangeIndent(RteIndentMsg::Increase) => Some(ExecCommand::new("indent")), + RteMsg::ChangeIndent(RteIndentMsg::Decrease) => Some(ExecCommand::new("outdent")), + // outer RteMsg::TableSetColumns(..) | RteMsg::TableSetRows(..) | RteMsg::TableSetVisibility(..) => None, + + RteMsg::RequestFocus(identifier) => { + let res = seed::document().query_selector(format!("#{}", identifier).as_str()); + if let Ok(Some(el)) = res { + if let Ok(el) = el.dyn_into::() { + el.focus().is_ok(); + } + } + None + } } } } @@ -131,6 +175,7 @@ pub struct StyledRteState { pub field_id: FieldId, pub table_tooltip: StyledRteTableState, range: Option, + identifier: uuid::Uuid, } impl StyledRteState { @@ -144,10 +189,11 @@ impl StyledRteState { cols: 3, }, range: None, + identifier: uuid::Uuid::new_v4(), } } - pub fn update(&mut self, msg: &Msg) { + pub fn update(&mut self, msg: &Msg, orders: &mut impl Orders) { let m = match msg { Msg::Rte(m, field) if field == &self.field_id => m, _ => return, @@ -166,6 +212,7 @@ impl StyledRteState { if self.restore_range().is_err() { return; } + self.schedule_focus(orders); } _ => match m { RteMsg::TableSetRows(n) => { @@ -209,6 +256,7 @@ impl StyledRteState { if let Err(e) = r.insert_node(&table) { log!(e); } + self.schedule_focus(orders); } _ => log!(m), }, @@ -241,11 +289,20 @@ impl StyledRteState { })?; Ok(()) } + + fn schedule_focus(&self, orders: &mut impl Orders) { + let field_id = self.field_id.clone(); + let identifier = self.identifier.clone(); + orders.perform_cmd(cmds::timeout(200, move || { + Msg::Rte(RteMsg::RequestFocus(identifier), field_id) + })); + } } pub struct StyledRte { field_id: FieldId, table_tooltip: StyledRteTableState, + identifier: Option, // value: String, } @@ -259,6 +316,7 @@ impl StyledRte { rows: 0, cols: 0, }, + identifier: None, } } } @@ -273,12 +331,14 @@ pub struct StyledRteBuilder { field_id: FieldId, value: String, table_tooltip: StyledRteTableState, + identifier: Option, } impl StyledRteBuilder { pub fn state(mut self, state: &StyledRteState) -> Self { self.value = state.value.clone(); self.table_tooltip = state.table_tooltip.clone(); + self.identifier = Some(state.identifier.clone()); self } @@ -287,6 +347,7 @@ impl StyledRteBuilder { field_id: self.field_id, // value: self.value, table_tooltip: self.table_tooltip, + identifier: self.identifier, } } } @@ -373,13 +434,14 @@ pub fn render(values: StyledRte) -> Node { ev.stop_propagation(); None as Option }); - let id = values.field_id.to_string(); + + let id = values.identifier.unwrap_or_default().to_string(); div![ - class!["styledRte"], + C!["styledRte"], attrs![At::Id => id], div![ - class!["bar"], + C!["bar"], first_row(&values), second_row(&values), // brush_button, @@ -392,9 +454,9 @@ pub fn render(values: StyledRte) -> Node { // text_width_button, ], div![ - class!["editorWrapper"], + C!["editorWrapper"], div![ - class!["editor"], + C!["editor"], attrs![At::ContentEditable => true], capture_event ], @@ -633,29 +695,22 @@ fn second_row(values: &StyledRte) -> Node { None as Option }), ); - let options: Vec> = vec![ - HeadingSize::H1, - HeadingSize::H2, - HeadingSize::H3, - HeadingSize::H4, - HeadingSize::H5, - HeadingSize::H6, - ] - .into_iter() - .map(|h| { - let field_id = values.field_id.clone(); - let button = StyledButton::build() - .text(h.to_string()) - .on_click(mouse_ev(Ev::Click, move |ev| { - ev.prevent_default(); - Some(Msg::Rte(RteMsg::InsertHeading(h), field_id)) - })) - .empty() - .build() - .into_node(); - span![class!["headingOption"], button] - }) - .collect(); + let options: Vec> = HeadingSize::all() + .into_iter() + .map(|h| { + let field_id = values.field_id.clone(); + let button = StyledButton::build() + .text(h.to_string()) + .on_click(mouse_ev(Ev::Click, move |ev| { + ev.prevent_default(); + Some(Msg::Rte(RteMsg::InsertHeading(h), field_id)) + })) + .empty() + .build() + .into_node(); + span![class!["headingOption"], button] + }) + .collect(); let heading_button = span![class!["headingList"], options]; /*let _field_id = values.field_id.clone(); @@ -757,20 +812,28 @@ fn second_row(values: &StyledRte) -> Node { }; let indent_outdent = { + let field_id = values.field_id.clone(); let indent_button = styled_rte_button( "Indent", Icon::Indent, mouse_ev(Ev::Click, move |ev| { ev.prevent_default(); - None as Option + Some(Msg::Rte( + RteMsg::ChangeIndent(RteIndentMsg::Increase), + field_id, + )) }), ); + let field_id = values.field_id.clone(); let outdent_button = styled_rte_button( "Outdent", Icon::Outdent, mouse_ev(Ev::Click, move |ev| { ev.prevent_default(); - None as Option + Some(Msg::Rte( + RteMsg::ChangeIndent(RteIndentMsg::Decrease), + field_id, + )) }), ); div![class!["group indentOutdent"], indent_button, outdent_button] diff --git a/jirs-client/static/index.js b/jirs-client/static/index.js index a077f6bd..12956325 100644 --- a/jirs-client/static/index.js +++ b/jirs-client/static/index.js @@ -8,3 +8,4 @@ import("/jirs.js").then(async module => { const host_url = `${location.protocol}//${process.env.JIRS_SERVER_BIND}:${process.env.JIRS_SERVER_PORT}`; module.render(host_url, wsUrl()); }); + diff --git a/jirs-data/src/lib.rs b/jirs-data/src/lib.rs index 65844f94..e8cf7664 100644 --- a/jirs-data/src/lib.rs +++ b/jirs-data/src/lib.rs @@ -41,13 +41,19 @@ pub enum IssueType { Task, Bug, Story, + Epic, } impl ToVec for IssueType { type Item = IssueType; fn ordered() -> Vec { - vec![IssueType::Task, IssueType::Bug, IssueType::Story] + vec![ + IssueType::Task, + IssueType::Bug, + IssueType::Story, + IssueType::Epic, + ] } } @@ -63,6 +69,7 @@ impl IssueType { IssueType::Task => "Task", IssueType::Bug => "Bug", IssueType::Story => "Story", + IssueType::Epic => "Epic", } } } @@ -73,6 +80,7 @@ impl Into for IssueType { IssueType::Task => 1, IssueType::Bug => 2, IssueType::Story => 3, + IssueType::Epic => 4, } } } @@ -83,6 +91,7 @@ impl Into for u32 { 1 => IssueType::Task, 2 => IssueType::Bug, 3 => IssueType::Story, + 4 => IssueType::Epic, _ => IssueType::Task, } } @@ -94,6 +103,7 @@ impl std::fmt::Display for IssueType { IssueType::Task => f.write_str("task"), IssueType::Bug => f.write_str("bug"), IssueType::Story => f.write_str("story"), + IssueType::Epic => f.write_str("epic"), } } } diff --git a/jirs-data/src/sql.rs b/jirs-data/src/sql.rs index 5b3da0e3..574910be 100644 --- a/jirs-data/src/sql.rs +++ b/jirs-data/src/sql.rs @@ -55,6 +55,7 @@ fn issue_type_from_sql(bytes: Option<&[u8]>) -> deserialize::Result { b"task" => Ok(IssueType::Task), b"bug" => Ok(IssueType::Bug), b"story" => Ok(IssueType::Story), + b"epic" => Ok(IssueType::Epic), _ => Ok(IssueType::Task), } } @@ -77,6 +78,7 @@ impl ToSql for IssueType { IssueType::Task => out.write_all(b"task")?, IssueType::Story => out.write_all(b"story")?, IssueType::Bug => out.write_all(b"bug")?, + IssueType::Epic => out.write_all(b"epic")?, } Ok(IsNull::No) } diff --git a/jirs-server/migrations/2020-08-10-133733_add_epic_issue_type/down.sql b/jirs-server/migrations/2020-08-10-133733_add_epic_issue_type/down.sql new file mode 100644 index 00000000..0f8135ef --- /dev/null +++ b/jirs-server/migrations/2020-08-10-133733_add_epic_issue_type/down.sql @@ -0,0 +1,20 @@ +ALTER TABLE "issues" + ALTER COLUMN "issue_type" + SET DATA TYPE TEXT + USING "issue_type"::TEXT; + +UPDATE "issues" +SET "issue_type" = 'task' +WHERE "issue_type" = 'epic'; + +DROP TYPE IF EXISTS "IssueTypeType" CASCADE; +CREATE TYPE "IssueTypeType" AS ENUM ( + 'task', + 'bug', + 'story' + ); + +ALTER TABLE "issues" + ALTER COLUMN "issue_type" + SET DATA TYPE "IssueTypeType" + USING "issue_type"::"IssueTypeType"; diff --git a/jirs-server/migrations/2020-08-10-133733_add_epic_issue_type/up.sql b/jirs-server/migrations/2020-08-10-133733_add_epic_issue_type/up.sql new file mode 100644 index 00000000..7f23f2a9 --- /dev/null +++ b/jirs-server/migrations/2020-08-10-133733_add_epic_issue_type/up.sql @@ -0,0 +1,17 @@ +ALTER TABLE "issues" + ALTER COLUMN "issue_type" + SET DATA TYPE TEXT + USING "issue_type"::TEXT; + +DROP TYPE IF EXISTS "IssueTypeType" CASCADE; +CREATE TYPE "IssueTypeType" AS ENUM ( + 'task', + 'bug', + 'story', + 'epic' + ); + +ALTER TABLE "issues" + ALTER COLUMN "issue_type" + SET DATA TYPE "IssueTypeType" + USING "issue_type"::"IssueTypeType"; diff --git a/jirs-server/src/db/issues.rs b/jirs-server/src/db/issues.rs index c9d5ff56..3e3f741e 100644 --- a/jirs-server/src/db/issues.rs +++ b/jirs-server/src/db/issues.rs @@ -226,7 +226,7 @@ impl Message for CreateIssue { impl Handler for DbExecutor { type Result = Result; - fn handle(&mut self, msg: CreateIssue, _ctx: &mut Self::Context) -> Self::Result { + fn handle(&mut self, msg: CreateIssue, ctx: &mut Self::Context) -> Self::Result { use crate::schema::issue_assignees::dsl; use crate::schema::issues::dsl::issues; @@ -241,10 +241,28 @@ impl Handler for DbExecutor { .get_result::(conn) .map_err(|_| ServiceErrors::DatabaseConnectionLost)?; + info!("{:?}", msg.issue_type); + info!("msg.issue_status_id {:?}", msg.issue_status_id); + + let issue_status_id = if msg.issue_status_id == 0 { + self.handle( + crate::db::issue_statuses::LoadIssueStatuses { + project_id: msg.project_id, + }, + ctx, + ) + .map_err(|_| ServiceErrors::DatabaseConnectionLost)? + .get(0) + .ok_or_else(|| ServiceErrors::DatabaseConnectionLost)? + .id + } else { + msg.issue_status_id + }; + let form = crate::models::CreateIssueForm { title: msg.title, issue_type: msg.issue_type, - issue_status_id: msg.issue_status_id, + issue_status_id, priority: msg.priority, list_position, description: msg.description, diff --git a/jirs-server/src/schema.rs b/jirs-server/src/schema.rs index 6db503d6..15f67a4a 100644 --- a/jirs-server/src/schema.rs +++ b/jirs-server/src/schema.rs @@ -159,6 +159,53 @@ table! { } } +table! { + use diesel::sql_types::*; + use jirs_data::sql::*; + + /// Representation of the `issue_statuses` table. + /// + /// (Automatically generated by Diesel.) + issue_statuses (id) { + /// The `id` column of the `issue_statuses` table. + /// + /// Its SQL type is `Int4`. + /// + /// (Automatically generated by Diesel.) + id -> Int4, + /// The `name` column of the `issue_statuses` table. + /// + /// Its SQL type is `Varchar`. + /// + /// (Automatically generated by Diesel.) + name -> Varchar, + /// The `position` column of the `issue_statuses` table. + /// + /// Its SQL type is `Int4`. + /// + /// (Automatically generated by Diesel.) + position -> Int4, + /// The `project_id` column of the `issue_statuses` table. + /// + /// Its SQL type is `Int4`. + /// + /// (Automatically generated by Diesel.) + project_id -> Int4, + /// The `created_at` column of the `issue_statuses` table. + /// + /// Its SQL type is `Timestamp`. + /// + /// (Automatically generated by Diesel.) + created_at -> Timestamp, + /// The `updated_at` column of the `issue_statuses` table. + /// + /// Its SQL type is `Timestamp`. + /// + /// (Automatically generated by Diesel.) + updated_at -> Timestamp, + } +} + table! { use diesel::sql_types::*; use jirs_data::sql::*; @@ -260,53 +307,6 @@ table! { } } -table! { - use diesel::sql_types::*; - use jirs_data::sql::*; - - /// Representation of the `issue_statuses` table. - /// - /// (Automatically generated by Diesel.) - issue_statuses (id) { - /// The `id` column of the `issue_statuses` table. - /// - /// Its SQL type is `Int4`. - /// - /// (Automatically generated by Diesel.) - id -> Int4, - /// The `name` column of the `issue_statuses` table. - /// - /// Its SQL type is `Varchar`. - /// - /// (Automatically generated by Diesel.) - name -> Varchar, - /// The `position` column of the `issue_statuses` table. - /// - /// Its SQL type is `Int4`. - /// - /// (Automatically generated by Diesel.) - position -> Int4, - /// The `project_id` column of the `issue_statuses` table. - /// - /// Its SQL type is `Int4`. - /// - /// (Automatically generated by Diesel.) - project_id -> Int4, - /// The `created_at` column of the `issue_statuses` table. - /// - /// Its SQL type is `Timestamp`. - /// - /// (Automatically generated by Diesel.) - created_at -> Timestamp, - /// The `updated_at` column of the `issue_statuses` table. - /// - /// Its SQL type is `Timestamp`. - /// - /// (Automatically generated by Diesel.) - updated_at -> Timestamp, - } -} - table! { use diesel::sql_types::*; use jirs_data::sql::*; @@ -608,8 +608,8 @@ allow_tables_to_appear_in_same_query!( comments, invitations, issue_assignees, - issues, issue_statuses, + issues, messages, projects, tokens,