refactor: import different dependencies only in the correct target binary
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				actionlint check / actionlint check (pull_request) Successful in 7s
				
			
		
			
				
	
				checkov check / checkov check (pull_request) Successful in 53s
				
			
		
			
				
	
				conventional commit messages check / conventional commit messages check (pull_request) Successful in 4s
				
			
		
			
				
	
				conventional pull request title check / conventional pull request title check (pull_request) Successful in 2s
				
			
		
			
				
	
				dotenv-linter check / dotenv-linter check (pull_request) Successful in 6s
				
			
		
			
				
	
				GitLeaks check / GitLeaks check (pull_request) Successful in 7s
				
			
		
			
				
	
				hadolint check / hadolint check (pull_request) Successful in 9s
				
			
		
			
				
	
				htmlhint check / htmlhint check (pull_request) Successful in 9s
				
			
		
			
				
	
				markdownlint check / markdownlint check (pull_request) Successful in 9s
				
			
		
			
				
	
				Prettier check / Prettier check (pull_request) Successful in 10s
				
			
		
			
				
	
				Rust check / Rust check (pull_request) Failing after 7m40s
				
			
		
			
				
	
				ShellCheck check / ShellCheck check (pull_request) Successful in 12s
				
			
		
			
				
	
				Stylelint check / Stylelint check (pull_request) Successful in 11s
				
			
		
			
				
	
				yamllint check / yamllint check (pull_request) Successful in 14s
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	actionlint check / actionlint check (pull_request) Successful in 7s
				
			checkov check / checkov check (pull_request) Successful in 53s
				
			conventional commit messages check / conventional commit messages check (pull_request) Successful in 4s
				
			conventional pull request title check / conventional pull request title check (pull_request) Successful in 2s
				
			dotenv-linter check / dotenv-linter check (pull_request) Successful in 6s
				
			GitLeaks check / GitLeaks check (pull_request) Successful in 7s
				
			hadolint check / hadolint check (pull_request) Successful in 9s
				
			htmlhint check / htmlhint check (pull_request) Successful in 9s
				
			markdownlint check / markdownlint check (pull_request) Successful in 9s
				
			Prettier check / Prettier check (pull_request) Successful in 10s
				
			Rust check / Rust check (pull_request) Failing after 7m40s
				
			ShellCheck check / ShellCheck check (pull_request) Successful in 12s
				
			Stylelint check / Stylelint check (pull_request) Successful in 11s
				
			yamllint check / yamllint check (pull_request) Successful in 14s
				
			This commit is contained in:
		
							
								
								
									
										536
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										536
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							| @@ -23,6 +23,18 @@ version = "2.0.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" | ||||
|  | ||||
| [[package]] | ||||
| name = "ahash" | ||||
| version = "0.8.11" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" | ||||
| dependencies = [ | ||||
|  "cfg-if", | ||||
|  "once_cell", | ||||
|  "version_check", | ||||
|  "zerocopy", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "aho-corasick" | ||||
| version = "1.1.3" | ||||
| @@ -32,6 +44,12 @@ dependencies = [ | ||||
|  "memchr", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "allocator-api2" | ||||
| version = "0.2.21" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" | ||||
|  | ||||
| [[package]] | ||||
| name = "android-tzdata" | ||||
| version = "0.1.1" | ||||
| @@ -64,6 +82,12 @@ dependencies = [ | ||||
|  "zbus", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "askama_escape" | ||||
| version = "0.10.3" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341" | ||||
|  | ||||
| [[package]] | ||||
| name = "async-broadcast" | ||||
| version = "0.7.1" | ||||
| @@ -312,6 +336,77 @@ version = "1.3.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" | ||||
|  | ||||
| [[package]] | ||||
| name = "axum" | ||||
| version = "0.7.9" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" | ||||
| dependencies = [ | ||||
|  "async-trait", | ||||
|  "axum-core", | ||||
|  "axum-macros", | ||||
|  "base64", | ||||
|  "bytes", | ||||
|  "futures-util", | ||||
|  "http", | ||||
|  "http-body", | ||||
|  "http-body-util", | ||||
|  "hyper", | ||||
|  "hyper-util", | ||||
|  "itoa 1.0.11", | ||||
|  "matchit", | ||||
|  "memchr", | ||||
|  "mime", | ||||
|  "multer", | ||||
|  "percent-encoding", | ||||
|  "pin-project-lite", | ||||
|  "rustversion", | ||||
|  "serde", | ||||
|  "serde_json", | ||||
|  "serde_path_to_error", | ||||
|  "serde_urlencoded", | ||||
|  "sha1", | ||||
|  "sync_wrapper", | ||||
|  "tokio", | ||||
|  "tokio-tungstenite", | ||||
|  "tower 0.5.2", | ||||
|  "tower-layer", | ||||
|  "tower-service", | ||||
|  "tracing", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "axum-core" | ||||
| version = "0.4.5" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" | ||||
| dependencies = [ | ||||
|  "async-trait", | ||||
|  "bytes", | ||||
|  "futures-util", | ||||
|  "http", | ||||
|  "http-body", | ||||
|  "http-body-util", | ||||
|  "mime", | ||||
|  "pin-project-lite", | ||||
|  "rustversion", | ||||
|  "sync_wrapper", | ||||
|  "tower-layer", | ||||
|  "tower-service", | ||||
|  "tracing", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "axum-macros" | ||||
| version = "0.4.2" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "57d123550fa8d071b7255cb0cc04dc302baa6c8c4a79f55701552684d8399bce" | ||||
| dependencies = [ | ||||
|  "proc-macro2", | ||||
|  "quote", | ||||
|  "syn 2.0.74", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "backtrace" | ||||
| version = "0.3.73" | ||||
| @@ -544,7 +639,7 @@ dependencies = [ | ||||
|  "cocoa-foundation 0.1.2", | ||||
|  "core-foundation 0.9.4", | ||||
|  "core-graphics 0.23.2", | ||||
|  "foreign-types", | ||||
|  "foreign-types 0.5.0", | ||||
|  "libc", | ||||
|  "objc", | ||||
| ] | ||||
| @@ -560,7 +655,7 @@ dependencies = [ | ||||
|  "cocoa-foundation 0.2.0", | ||||
|  "core-foundation 0.10.0", | ||||
|  "core-graphics 0.24.0", | ||||
|  "foreign-types", | ||||
|  "foreign-types 0.5.0", | ||||
|  "libc", | ||||
|  "objc", | ||||
| ] | ||||
| @@ -713,7 +808,7 @@ dependencies = [ | ||||
|  "bitflags 1.3.2", | ||||
|  "core-foundation 0.9.4", | ||||
|  "core-graphics-types 0.1.3", | ||||
|  "foreign-types", | ||||
|  "foreign-types 0.5.0", | ||||
|  "libc", | ||||
| ] | ||||
|  | ||||
| @@ -726,7 +821,7 @@ dependencies = [ | ||||
|  "bitflags 2.6.0", | ||||
|  "core-foundation 0.10.0", | ||||
|  "core-graphics-types 0.2.0", | ||||
|  "foreign-types", | ||||
|  "foreign-types 0.5.0", | ||||
|  "libc", | ||||
| ] | ||||
|  | ||||
| @@ -991,10 +1086,12 @@ dependencies = [ | ||||
|  "dioxus-history", | ||||
|  "dioxus-hooks", | ||||
|  "dioxus-html", | ||||
|  "dioxus-liveview", | ||||
|  "dioxus-logger", | ||||
|  "dioxus-mobile", | ||||
|  "dioxus-router", | ||||
|  "dioxus-signals", | ||||
|  "dioxus-ssr", | ||||
|  "dioxus-web", | ||||
|  "manganis", | ||||
|  "serde", | ||||
| @@ -1123,7 +1220,7 @@ dependencies = [ | ||||
|  "serde", | ||||
|  "serde_json", | ||||
|  "tracing", | ||||
|  "tungstenite", | ||||
|  "tungstenite 0.23.0", | ||||
|  "warnings", | ||||
| ] | ||||
|  | ||||
| @@ -1162,23 +1259,41 @@ version = "0.6.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "ffe83189fc0139a34a4cc195aa3eb917f5b6a3317bf3f4183d9e8f1e110a9bab" | ||||
| dependencies = [ | ||||
|  "async-trait", | ||||
|  "axum", | ||||
|  "base64", | ||||
|  "bytes", | ||||
|  "ciborium", | ||||
|  "dioxus-cli-config", | ||||
|  "dioxus-desktop", | ||||
|  "dioxus-devtools", | ||||
|  "dioxus-history", | ||||
|  "dioxus-interpreter-js", | ||||
|  "dioxus-isrg", | ||||
|  "dioxus-lib", | ||||
|  "dioxus-mobile", | ||||
|  "dioxus-ssr", | ||||
|  "dioxus-web", | ||||
|  "dioxus_server_macro", | ||||
|  "futures-channel", | ||||
|  "futures-util", | ||||
|  "generational-box", | ||||
|  "http", | ||||
|  "hyper", | ||||
|  "once_cell", | ||||
|  "parking_lot", | ||||
|  "pin-project", | ||||
|  "serde", | ||||
|  "server_fn", | ||||
|  "thiserror", | ||||
|  "tokio", | ||||
|  "tokio-stream", | ||||
|  "tokio-util", | ||||
|  "tower 0.4.13", | ||||
|  "tower-http", | ||||
|  "tower-layer", | ||||
|  "tracing", | ||||
|  "tracing-futures", | ||||
|  "web-sys", | ||||
| ] | ||||
|  | ||||
| @@ -1277,6 +1392,20 @@ dependencies = [ | ||||
|  "web-sys", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "dioxus-isrg" | ||||
| version = "0.6.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "8b9777b9a71c9ecede300e52d217b800c5f884654b5af2da2a534c7f8bded7d0" | ||||
| dependencies = [ | ||||
|  "chrono", | ||||
|  "http", | ||||
|  "lru", | ||||
|  "rustc-hash", | ||||
|  "thiserror", | ||||
|  "tracing", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "dioxus-lib" | ||||
| version = "0.6.0" | ||||
| @@ -1294,6 +1423,34 @@ dependencies = [ | ||||
|  "dioxus-signals", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "dioxus-liveview" | ||||
| version = "0.6.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "0df966bf26040e5875908caa4e59bb2152f3532cca97937a34dd1057168c023f" | ||||
| dependencies = [ | ||||
|  "axum", | ||||
|  "dioxus-cli-config", | ||||
|  "dioxus-core", | ||||
|  "dioxus-devtools", | ||||
|  "dioxus-document", | ||||
|  "dioxus-history", | ||||
|  "dioxus-html", | ||||
|  "dioxus-interpreter-js", | ||||
|  "futures-channel", | ||||
|  "futures-util", | ||||
|  "generational-box", | ||||
|  "rustc-hash", | ||||
|  "serde", | ||||
|  "serde_json", | ||||
|  "slab", | ||||
|  "thiserror", | ||||
|  "tokio", | ||||
|  "tokio-stream", | ||||
|  "tokio-util", | ||||
|  "tracing", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "dioxus-logger" | ||||
| version = "0.6.0" | ||||
| @@ -1389,6 +1546,18 @@ dependencies = [ | ||||
|  "warnings", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "dioxus-ssr" | ||||
| version = "0.6.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "e6cd3d309a60d654bafcf49b32b96fa72da6d9155582eba9b5c608c07ab0c850" | ||||
| dependencies = [ | ||||
|  "askama_escape", | ||||
|  "dioxus-core", | ||||
|  "dioxus-core-types", | ||||
|  "rustc-hash", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "dioxus-web" | ||||
| version = "0.6.0" | ||||
| @@ -1547,6 +1716,15 @@ version = "1.13.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" | ||||
|  | ||||
| [[package]] | ||||
| name = "encoding_rs" | ||||
| version = "0.8.35" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" | ||||
| dependencies = [ | ||||
|  "cfg-if", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "endi" | ||||
| version = "1.1.0" | ||||
| @@ -1755,6 +1933,21 @@ version = "1.0.7" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" | ||||
|  | ||||
| [[package]] | ||||
| name = "foldhash" | ||||
| version = "0.1.3" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" | ||||
|  | ||||
| [[package]] | ||||
| name = "foreign-types" | ||||
| version = "0.3.2" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" | ||||
| dependencies = [ | ||||
|  "foreign-types-shared 0.1.1", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "foreign-types" | ||||
| version = "0.5.0" | ||||
| @@ -1762,7 +1955,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" | ||||
| dependencies = [ | ||||
|  "foreign-types-macros", | ||||
|  "foreign-types-shared", | ||||
|  "foreign-types-shared 0.3.1", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| @@ -1776,6 +1969,12 @@ dependencies = [ | ||||
|  "syn 2.0.74", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "foreign-types-shared" | ||||
| version = "0.1.1" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" | ||||
|  | ||||
| [[package]] | ||||
| name = "foreign-types-shared" | ||||
| version = "0.3.1" | ||||
| @@ -2300,6 +2499,21 @@ name = "hashbrown" | ||||
| version = "0.14.5" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" | ||||
| dependencies = [ | ||||
|  "ahash", | ||||
|  "allocator-api2", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "hashbrown" | ||||
| version = "0.15.2" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" | ||||
| dependencies = [ | ||||
|  "allocator-api2", | ||||
|  "equivalent", | ||||
|  "foldhash", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "heck" | ||||
| @@ -2388,12 +2602,24 @@ dependencies = [ | ||||
|  "pin-project-lite", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "http-range-header" | ||||
| version = "0.4.2" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "9171a2ea8a68358193d15dd5d70c1c10a2afc3e7e4c5bc92bc9f025cebd7359c" | ||||
|  | ||||
| [[package]] | ||||
| name = "httparse" | ||||
| version = "1.9.4" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" | ||||
|  | ||||
| [[package]] | ||||
| name = "httpdate" | ||||
| version = "1.0.3" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" | ||||
|  | ||||
| [[package]] | ||||
| name = "hyper" | ||||
| version = "1.4.1" | ||||
| @@ -2406,6 +2632,7 @@ dependencies = [ | ||||
|  "http", | ||||
|  "http-body", | ||||
|  "httparse", | ||||
|  "httpdate", | ||||
|  "itoa 1.0.11", | ||||
|  "pin-project-lite", | ||||
|  "smallvec", | ||||
| @@ -2413,6 +2640,22 @@ dependencies = [ | ||||
|  "want", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "hyper-tls" | ||||
| version = "0.6.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" | ||||
| dependencies = [ | ||||
|  "bytes", | ||||
|  "http-body-util", | ||||
|  "hyper", | ||||
|  "hyper-util", | ||||
|  "native-tls", | ||||
|  "tokio", | ||||
|  "tokio-native-tls", | ||||
|  "tower-service", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "hyper-util" | ||||
| version = "0.1.7" | ||||
| @@ -2428,7 +2671,7 @@ dependencies = [ | ||||
|  "pin-project-lite", | ||||
|  "socket2 0.5.7", | ||||
|  "tokio", | ||||
|  "tower", | ||||
|  "tower 0.4.13", | ||||
|  "tower-service", | ||||
|  "tracing", | ||||
| ] | ||||
| @@ -2673,6 +2916,12 @@ dependencies = [ | ||||
|  "unic-langid", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "inventory" | ||||
| version = "0.3.15" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767" | ||||
|  | ||||
| [[package]] | ||||
| name = "io-lifetimes" | ||||
| version = "1.0.11" | ||||
| @@ -2913,6 +3162,15 @@ version = "0.1.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "b3bd0dd2cd90571056fdb71f6275fada10131182f84899f4b2a916e565d81d86" | ||||
|  | ||||
| [[package]] | ||||
| name = "lru" | ||||
| version = "0.12.5" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" | ||||
| dependencies = [ | ||||
|  "hashbrown 0.15.2", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "mac" | ||||
| version = "0.1.1" | ||||
| @@ -2983,6 +3241,12 @@ version = "0.1.10" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" | ||||
|  | ||||
| [[package]] | ||||
| name = "matchit" | ||||
| version = "0.7.3" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" | ||||
|  | ||||
| [[package]] | ||||
| name = "memchr" | ||||
| version = "2.7.4" | ||||
| @@ -3104,6 +3368,40 @@ dependencies = [ | ||||
|  "windows-sys 0.59.0", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "multer" | ||||
| version = "3.1.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" | ||||
| dependencies = [ | ||||
|  "bytes", | ||||
|  "encoding_rs", | ||||
|  "futures-util", | ||||
|  "http", | ||||
|  "httparse", | ||||
|  "memchr", | ||||
|  "mime", | ||||
|  "spin", | ||||
|  "version_check", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "native-tls" | ||||
| version = "0.2.12" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" | ||||
| dependencies = [ | ||||
|  "libc", | ||||
|  "log", | ||||
|  "openssl", | ||||
|  "openssl-probe", | ||||
|  "openssl-sys", | ||||
|  "schannel", | ||||
|  "security-framework", | ||||
|  "security-framework-sys", | ||||
|  "tempfile", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "ndk" | ||||
| version = "0.9.0" | ||||
| @@ -3347,6 +3645,50 @@ version = "1.19.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" | ||||
|  | ||||
| [[package]] | ||||
| name = "openssl" | ||||
| version = "0.10.68" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" | ||||
| dependencies = [ | ||||
|  "bitflags 2.6.0", | ||||
|  "cfg-if", | ||||
|  "foreign-types 0.3.2", | ||||
|  "libc", | ||||
|  "once_cell", | ||||
|  "openssl-macros", | ||||
|  "openssl-sys", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "openssl-macros" | ||||
| version = "0.1.1" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" | ||||
| dependencies = [ | ||||
|  "proc-macro2", | ||||
|  "quote", | ||||
|  "syn 2.0.74", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "openssl-probe" | ||||
| version = "0.1.5" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" | ||||
|  | ||||
| [[package]] | ||||
| name = "openssl-sys" | ||||
| version = "0.9.104" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" | ||||
| dependencies = [ | ||||
|  "cc", | ||||
|  "libc", | ||||
|  "pkg-config", | ||||
|  "vcpkg", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "option-ext" | ||||
| version = "0.2.0" | ||||
| @@ -3908,20 +4250,24 @@ dependencies = [ | ||||
|  "http-body", | ||||
|  "http-body-util", | ||||
|  "hyper", | ||||
|  "hyper-tls", | ||||
|  "hyper-util", | ||||
|  "ipnet", | ||||
|  "js-sys", | ||||
|  "log", | ||||
|  "mime", | ||||
|  "mime_guess", | ||||
|  "native-tls", | ||||
|  "once_cell", | ||||
|  "percent-encoding", | ||||
|  "pin-project-lite", | ||||
|  "rustls-pemfile", | ||||
|  "serde", | ||||
|  "serde_json", | ||||
|  "serde_urlencoded", | ||||
|  "sync_wrapper", | ||||
|  "tokio", | ||||
|  "tokio-native-tls", | ||||
|  "tokio-util", | ||||
|  "tower-service", | ||||
|  "url", | ||||
| @@ -4003,6 +4349,21 @@ dependencies = [ | ||||
|  "windows-sys 0.52.0", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "rustls-pemfile" | ||||
| version = "2.2.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" | ||||
| dependencies = [ | ||||
|  "rustls-pki-types", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "rustls-pki-types" | ||||
| version = "1.10.1" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" | ||||
|  | ||||
| [[package]] | ||||
| name = "rustversion" | ||||
| version = "1.0.17" | ||||
| @@ -4024,12 +4385,44 @@ dependencies = [ | ||||
|  "winapi-util", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "schannel" | ||||
| version = "0.1.27" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" | ||||
| dependencies = [ | ||||
|  "windows-sys 0.59.0", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "scopeguard" | ||||
| version = "1.2.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" | ||||
|  | ||||
| [[package]] | ||||
| name = "security-framework" | ||||
| version = "2.11.1" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" | ||||
| dependencies = [ | ||||
|  "bitflags 2.6.0", | ||||
|  "core-foundation 0.9.4", | ||||
|  "core-foundation-sys", | ||||
|  "libc", | ||||
|  "security-framework-sys", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "security-framework-sys" | ||||
| version = "2.13.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "1863fd3768cd83c56a7f60faa4dc0d403f1b6df0a38c3c25f44b7894e45370d5" | ||||
| dependencies = [ | ||||
|  "core-foundation-sys", | ||||
|  "libc", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "selectors" | ||||
| version = "0.22.0" | ||||
| @@ -4123,6 +4516,16 @@ dependencies = [ | ||||
|  "serde", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "serde_path_to_error" | ||||
| version = "0.1.16" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" | ||||
| dependencies = [ | ||||
|  "itoa 1.0.11", | ||||
|  "serde", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "serde_qs" | ||||
| version = "0.12.0" | ||||
| @@ -4202,12 +4605,16 @@ version = "0.6.14" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "024b400db1aca5bd4188714f7bbbf7a2e1962b9a12a80b2a21e937e509086963" | ||||
| dependencies = [ | ||||
|  "axum", | ||||
|  "bytes", | ||||
|  "const_format", | ||||
|  "dashmap", | ||||
|  "futures", | ||||
|  "gloo-net", | ||||
|  "http", | ||||
|  "http-body-util", | ||||
|  "hyper", | ||||
|  "inventory", | ||||
|  "js-sys", | ||||
|  "once_cell", | ||||
|  "reqwest", | ||||
| @@ -4217,6 +4624,8 @@ dependencies = [ | ||||
|  "serde_qs", | ||||
|  "server_fn_macro_default", | ||||
|  "thiserror", | ||||
|  "tower 0.4.13", | ||||
|  "tower-layer", | ||||
|  "url", | ||||
|  "wasm-bindgen", | ||||
|  "wasm-bindgen-futures", | ||||
| @@ -4427,6 +4836,12 @@ dependencies = [ | ||||
|  "system-deps", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "spin" | ||||
| version = "0.9.8" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" | ||||
|  | ||||
| [[package]] | ||||
| name = "stable_deref_trait" | ||||
| version = "1.2.0" | ||||
| @@ -4757,6 +5172,40 @@ dependencies = [ | ||||
|  "syn 2.0.74", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "tokio-native-tls" | ||||
| version = "0.3.1" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" | ||||
| dependencies = [ | ||||
|  "native-tls", | ||||
|  "tokio", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "tokio-stream" | ||||
| version = "0.1.17" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" | ||||
| dependencies = [ | ||||
|  "futures-core", | ||||
|  "pin-project-lite", | ||||
|  "tokio", | ||||
|  "tokio-util", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "tokio-tungstenite" | ||||
| version = "0.24.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" | ||||
| dependencies = [ | ||||
|  "futures-util", | ||||
|  "log", | ||||
|  "tokio", | ||||
|  "tungstenite 0.24.0", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "tokio-util" | ||||
| version = "0.7.11" | ||||
| @@ -4766,6 +5215,8 @@ dependencies = [ | ||||
|  "bytes", | ||||
|  "futures-core", | ||||
|  "futures-sink", | ||||
|  "futures-util", | ||||
|  "hashbrown 0.14.5", | ||||
|  "pin-project-lite", | ||||
|  "tokio", | ||||
| ] | ||||
| @@ -4828,6 +5279,48 @@ dependencies = [ | ||||
|  "tokio", | ||||
|  "tower-layer", | ||||
|  "tower-service", | ||||
|  "tracing", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "tower" | ||||
| version = "0.5.2" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" | ||||
| dependencies = [ | ||||
|  "futures-core", | ||||
|  "futures-util", | ||||
|  "pin-project-lite", | ||||
|  "sync_wrapper", | ||||
|  "tokio", | ||||
|  "tower-layer", | ||||
|  "tower-service", | ||||
|  "tracing", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "tower-http" | ||||
| version = "0.5.2" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" | ||||
| dependencies = [ | ||||
|  "bitflags 2.6.0", | ||||
|  "bytes", | ||||
|  "futures-util", | ||||
|  "http", | ||||
|  "http-body", | ||||
|  "http-body-util", | ||||
|  "http-range-header", | ||||
|  "httpdate", | ||||
|  "mime", | ||||
|  "mime_guess", | ||||
|  "percent-encoding", | ||||
|  "pin-project-lite", | ||||
|  "tokio", | ||||
|  "tokio-util", | ||||
|  "tower-layer", | ||||
|  "tower-service", | ||||
|  "tracing", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| @@ -4848,6 +5341,7 @@ version = "0.1.40" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" | ||||
| dependencies = [ | ||||
|  "log", | ||||
|  "pin-project-lite", | ||||
|  "tracing-attributes", | ||||
|  "tracing-core", | ||||
| @@ -4873,6 +5367,16 @@ dependencies = [ | ||||
|  "once_cell", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "tracing-futures" | ||||
| version = "0.2.5" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" | ||||
| dependencies = [ | ||||
|  "pin-project", | ||||
|  "tracing", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "tracing-subscriber" | ||||
| version = "0.3.18" | ||||
| @@ -4939,6 +5443,24 @@ dependencies = [ | ||||
|  "utf-8", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "tungstenite" | ||||
| version = "0.24.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a" | ||||
| dependencies = [ | ||||
|  "byteorder", | ||||
|  "bytes", | ||||
|  "data-encoding", | ||||
|  "http", | ||||
|  "httparse", | ||||
|  "log", | ||||
|  "rand 0.8.5", | ||||
|  "sha1", | ||||
|  "thiserror", | ||||
|  "utf-8", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "type-map" | ||||
| version = "0.5.0" | ||||
|   | ||||
							
								
								
									
										42
									
								
								Cargo.toml
									
									
									
									
									
								
							
							
						
						
									
										42
									
								
								Cargo.toml
									
									
									
									
									
								
							| @@ -7,30 +7,44 @@ edition = "2021" | ||||
| # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||||
|  | ||||
| [dependencies] | ||||
| dioxus = { version = "0.6.0", features = ["fullstack", "router"] } | ||||
| dioxus-query = "0.6.0" | ||||
| dioxus-i18n = "0.3.0" | ||||
|  | ||||
| async-std = "1.12.0" | ||||
| chrono = { version = "0.4.38", features = ["serde", "unstable-locales"] } | ||||
| diesel = { version = "2.2.2", features = ["chrono", "postgres", "postgres_backend", "serde_json"] } | ||||
| diesel_migrations = { version = "2.2.0", features = ["postgres"] } | ||||
| dotenvy = "0.15.7" | ||||
| feruca = "0.10.0" | ||||
| serde = "1.0.208" | ||||
| serde_json = "1.0.125" | ||||
| dioxus = { version = "0.6.0", features = ["fullstack", "router"] } | ||||
| feruca = { version = "0.10.0" } | ||||
| serde = { version = "1.0.208" } | ||||
| serde_json = { version = "1.0.125" } | ||||
| serde_with = { version = "3.9.0", features = ["chrono_0_4"] } | ||||
| time = "0.3.36" | ||||
| tracing = "0.1.40" | ||||
| unic-langid-impl = { version = "0.9.5", features = ["serde"] } | ||||
| validator = { version = "0.19.0", features = ["derive"] } | ||||
| voca_rs = "1.15.2" | ||||
|  | ||||
| diesel = { version = "2.2.2", features = ["chrono", "postgres", "postgres_backend", "serde_json"], optional = true } | ||||
| diesel_migrations = { version = "2.2.0", features = ["postgres"], optional = true } | ||||
| dotenvy = { version = "0.15.7", optional = true } | ||||
| time = { version = "0.3.36", optional = true } | ||||
|  | ||||
| async-std = { version = "1.12.0", optional = true } | ||||
| dioxus-i18n = { version = "0.3.0", optional = true } | ||||
| dioxus-query = { version = "0.6.0", optional = true } | ||||
| voca_rs = { version = "1.15.2", optional = true } | ||||
|  | ||||
| [features] | ||||
| default = ["web"] | ||||
| desktop = ["dioxus/desktop"] | ||||
| mobile = ["dioxus/mobile"] | ||||
| web = ["dioxus/web"] | ||||
| web = [ | ||||
|     "dioxus/web", | ||||
|     "dep:async-std", | ||||
|     "dep:dioxus-query", | ||||
|     "dep:dioxus-i18n", | ||||
|     "dep:voca_rs" | ||||
| ] | ||||
| server = [ | ||||
|     "dioxus/server", | ||||
|     "dep:diesel", | ||||
|     "dep:diesel_migrations", | ||||
|     "dep:dotenvy", | ||||
|     "dep:time", | ||||
| ] | ||||
|  | ||||
| [profile] | ||||
|  | ||||
|   | ||||
| @@ -7,7 +7,6 @@ use dioxus::core_macro::rsx; | ||||
| use dioxus::dioxus_core::Element; | ||||
| use dioxus::prelude::*; | ||||
| use dioxus_query::prelude::use_query_client; | ||||
| use tracing::info; | ||||
|  | ||||
| #[component] | ||||
| pub(crate) fn TaskList(tasks: Vec<TaskWithSubtasks>, class: Option<&'static str>) -> Element { | ||||
|   | ||||
| @@ -7,6 +7,7 @@ pub enum Error { | ||||
|     ServerInternal, | ||||
| } | ||||
|  | ||||
| #[cfg(feature = "server")] | ||||
| impl From<diesel::result::Error> for Error { | ||||
|     fn from(_: diesel::result::Error) -> Self { | ||||
|         Self::ServerInternal | ||||
|   | ||||
| @@ -35,6 +35,7 @@ impl From<ValidationErrors> for ErrorVec<ProjectError> { | ||||
|     } | ||||
| } | ||||
|  | ||||
| #[cfg(feature = "server")] | ||||
| impl From<diesel::result::Error> for ProjectError { | ||||
|     fn from(_: diesel::result::Error) -> Self { | ||||
|         Self::Error(Error::ServerInternal) | ||||
|   | ||||
| @@ -36,6 +36,7 @@ impl From<ValidationErrors> for ErrorVec<SubtaskError> { | ||||
|     } | ||||
| } | ||||
|  | ||||
| #[cfg(feature = "server")] | ||||
| impl From<diesel::result::Error> for SubtaskError { | ||||
|     fn from(diesel_error: diesel::result::Error) -> Self { | ||||
|         match diesel_error { | ||||
|   | ||||
| @@ -36,6 +36,7 @@ impl From<ValidationErrors> for ErrorVec<TaskError> { | ||||
|     } | ||||
| } | ||||
|  | ||||
| #[cfg(feature = "server")] | ||||
| impl From<diesel::result::Error> for TaskError { | ||||
|     fn from(diesel_error: diesel::result::Error) -> Self { | ||||
|         match diesel_error { | ||||
|   | ||||
| @@ -1,10 +1,12 @@ | ||||
| mod components; | ||||
| mod errors; | ||||
| mod internationalization; | ||||
| #[cfg(feature = "server")] | ||||
| mod migrations; | ||||
| mod models; | ||||
| mod query; | ||||
| mod route; | ||||
| #[cfg(feature = "server")] | ||||
| mod schema; | ||||
| mod server; | ||||
| mod utils; | ||||
|   | ||||
| @@ -1,19 +1,28 @@ | ||||
| #[cfg(feature = "server")] | ||||
| use crate::schema::tasks; | ||||
| use chrono::{Duration, NaiveDate, NaiveTime}; | ||||
| #[cfg(feature = "server")] | ||||
| use diesel::deserialize::FromSql; | ||||
| #[cfg(feature = "server")] | ||||
| use diesel::pg::{Pg, PgValue}; | ||||
| #[cfg(feature = "server")] | ||||
| use diesel::serialize::{Output, ToSql}; | ||||
| #[cfg(feature = "server")] | ||||
| use diesel::sql_types::{Bool, Jsonb}; | ||||
| #[cfg(feature = "server")] | ||||
| use diesel::{AsExpression, BoxableExpression, FromSqlRow, PgJsonbExpressionMethods}; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| #[cfg(feature = "server")] | ||||
| use serde_json::json; | ||||
| use serde_with::DurationSeconds; | ||||
| use std::hash::Hash; | ||||
| #[cfg(feature = "server")] | ||||
| use std::io::Write; | ||||
|  | ||||
| #[serde_with::serde_as] | ||||
| #[derive(AsExpression, FromSqlRow, Serialize, Deserialize, Clone, Debug)] | ||||
| #[diesel(sql_type = Jsonb)] | ||||
| #[derive(Serialize, Deserialize, Clone, Debug)] | ||||
| #[cfg_attr(feature = "server", derive(AsExpression, FromSqlRow))] | ||||
| #[cfg_attr(feature = "server", diesel(sql_type = Jsonb))] | ||||
| pub enum Category { | ||||
|     Inbox, | ||||
|     SomedayMaybe, | ||||
| @@ -29,6 +38,7 @@ pub enum Category { | ||||
|     Trash, | ||||
| } | ||||
|  | ||||
| #[cfg(feature = "server")] | ||||
| impl Category { | ||||
|     pub fn eq_sql_predicate(&self) -> Box<dyn BoxableExpression<tasks::table, Pg, SqlType = Bool>> { | ||||
|         use crate::schema::tasks::dsl::*; | ||||
| @@ -60,6 +70,7 @@ impl PartialEq for Category { | ||||
|  | ||||
| impl Eq for Category {} | ||||
|  | ||||
| #[cfg(feature = "server")] | ||||
| impl ToSql<Jsonb, Pg> for Category { | ||||
|     fn to_sql<'b>(&'b self, out: &mut Output<'b, '_, Pg>) -> diesel::serialize::Result { | ||||
|         let json = serde_json::to_string(self)?; | ||||
| @@ -72,6 +83,7 @@ impl ToSql<Jsonb, Pg> for Category { | ||||
|     } | ||||
| } | ||||
|  | ||||
| #[cfg(feature = "server")] | ||||
| impl FromSql<Jsonb, Pg> for Category { | ||||
|     fn from_sql(bytes: PgValue) -> diesel::deserialize::Result<Self> { | ||||
|         let bytes = bytes.as_bytes(); | ||||
|   | ||||
| @@ -1,6 +1,8 @@ | ||||
| use crate::internationalization::COLLATOR; | ||||
| #[cfg(feature = "server")] | ||||
| use crate::schema::projects; | ||||
| use chrono::NaiveDateTime; | ||||
| #[cfg(feature = "server")] | ||||
| use diesel::prelude::*; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| use std::cmp::Ordering; | ||||
| @@ -9,9 +11,12 @@ use validator::Validate; | ||||
| const TITLE_LENGTH_MIN: u64 = 1; | ||||
| const TITLE_LENGTH_MAX: u64 = 255; | ||||
|  | ||||
| #[derive(Queryable, Selectable, Identifiable, Serialize, Deserialize, PartialEq, Clone, Debug)] | ||||
| #[diesel(table_name = crate::schema::projects)] | ||||
| #[diesel(check_for_backend(diesel::pg::Pg))] | ||||
| #[derive(Serialize, Deserialize, PartialEq, Clone, Debug)] | ||||
| #[cfg_attr(feature = "server", derive(Queryable, Selectable, Identifiable))] | ||||
| #[cfg_attr( | ||||
|     feature = "server", | ||||
|     diesel(table_name = crate::schema::projects, check_for_backend(diesel::pg::Pg)) | ||||
| )] | ||||
| pub struct Project { | ||||
|     id: i32, | ||||
|     title: String, | ||||
| @@ -19,6 +24,7 @@ pub struct Project { | ||||
|     updated_at: NaiveDateTime, | ||||
| } | ||||
|  | ||||
| #[allow(dead_code)] | ||||
| impl Project { | ||||
|     pub fn id(&self) -> i32 { | ||||
|         self.id | ||||
| @@ -54,8 +60,9 @@ impl Ord for Project { | ||||
|     } | ||||
| } | ||||
|  | ||||
| #[derive(Insertable, Serialize, Deserialize, Validate, Clone, Debug)] | ||||
| #[diesel(table_name = projects)] | ||||
| #[derive(Serialize, Deserialize, Validate, Clone, Debug)] | ||||
| #[cfg_attr(feature = "server", derive(Insertable))] | ||||
| #[cfg_attr(feature = "server", diesel(table_name = projects))] | ||||
| pub struct NewProject { | ||||
|     #[validate(length( | ||||
|         min = "TITLE_LENGTH_MIN", | ||||
|   | ||||
| @@ -1,6 +1,9 @@ | ||||
| #[cfg(feature = "server")] | ||||
| use crate::models::task::Task; | ||||
| #[cfg(feature = "server")] | ||||
| use crate::schema::subtasks; | ||||
| use chrono::NaiveDateTime; | ||||
| #[cfg(feature = "server")] | ||||
| use diesel::prelude::*; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| use std::cmp::Ordering; | ||||
| @@ -9,20 +12,19 @@ use validator::Validate; | ||||
| const TITLE_LENGTH_MIN: u64 = 1; | ||||
| const TITLE_LENGTH_MAX: u64 = 255; | ||||
|  | ||||
| #[derive( | ||||
|     Queryable, | ||||
|     Selectable, | ||||
|     Identifiable, | ||||
|     Associations, | ||||
|     Serialize, | ||||
|     Deserialize, | ||||
|     PartialEq, | ||||
|     Clone, | ||||
|     Debug, | ||||
| #[derive(Serialize, Deserialize, PartialEq, Clone, Debug)] | ||||
| #[cfg_attr( | ||||
|     feature = "server", | ||||
|     derive(Queryable, Selectable, Identifiable, Associations) | ||||
| )] | ||||
| #[cfg_attr( | ||||
|     feature = "server",  | ||||
|     diesel( | ||||
|         table_name = subtasks, | ||||
|         belongs_to(Task, foreign_key = task_id), | ||||
|         check_for_backend(diesel::pg::Pg) | ||||
|     ) | ||||
| )] | ||||
| #[diesel(belongs_to(Task, foreign_key = task_id))] | ||||
| #[diesel(table_name = subtasks)] | ||||
| #[diesel(check_for_backend(diesel::pg::Pg))] | ||||
| pub struct Subtask { | ||||
|     id: i32, | ||||
|     task_id: i32, | ||||
| @@ -74,8 +76,9 @@ impl Ord for Subtask { | ||||
|     } | ||||
| } | ||||
|  | ||||
| #[derive(Insertable, Serialize, Deserialize, Validate, Clone, Debug)] | ||||
| #[diesel(table_name = subtasks)] | ||||
| #[derive(Serialize, Deserialize, Validate, Clone, Debug)] | ||||
| #[cfg_attr(feature = "server", derive(Insertable))] | ||||
| #[cfg_attr(feature = "server", diesel(table_name = subtasks))] | ||||
| pub struct NewSubtask { | ||||
|     pub task_id: i32, | ||||
|     #[validate(length( | ||||
|   | ||||
| @@ -1,8 +1,10 @@ | ||||
| use crate::models::category::Category; | ||||
| use crate::models::subtask::Subtask; | ||||
| #[cfg(feature = "server")] | ||||
| use crate::schema::tasks; | ||||
| use crate::utils::reverse_ord_option::ReverseOrdOption; | ||||
| use chrono::NaiveDateTime; | ||||
| #[cfg(feature = "server")] | ||||
| use diesel::prelude::*; | ||||
| use serde::{Deserialize, Serialize}; | ||||
| use std::cmp::Ordering; | ||||
| @@ -11,9 +13,9 @@ use validator::Validate; | ||||
| const TITLE_LENGTH_MIN: u64 = 1; | ||||
| const TITLE_LENGTH_MAX: u64 = 255; | ||||
|  | ||||
| #[derive(Queryable, Selectable, Identifiable, Serialize, Deserialize, PartialEq, Clone, Debug)] | ||||
| #[diesel(table_name = tasks)] | ||||
| #[diesel(check_for_backend(diesel::pg::Pg))] | ||||
| #[derive(Serialize, Deserialize, PartialEq, Clone, Debug)] | ||||
| #[cfg_attr(feature = "server", derive(Queryable, Selectable, Identifiable))] | ||||
| #[cfg_attr(feature = "server", diesel(table_name = tasks, check_for_backend(diesel::pg::Pg)))] | ||||
| pub struct Task { | ||||
|     id: i32, | ||||
|     title: String, | ||||
| @@ -138,8 +140,9 @@ impl Ord for TaskWithSubtasks { | ||||
|     } | ||||
| } | ||||
|  | ||||
| #[derive(Insertable, Serialize, Deserialize, Validate, Clone, Debug)] | ||||
| #[diesel(table_name = tasks)] | ||||
| #[derive(Serialize, Deserialize, Validate, Clone, Debug)] | ||||
| #[cfg_attr(feature = "server", derive(Insertable))] | ||||
| #[cfg_attr(feature = "server", diesel(table_name = tasks))] | ||||
| pub struct NewTask { | ||||
|     #[validate(length( | ||||
|         min = "TITLE_LENGTH_MIN", | ||||
|   | ||||
| @@ -9,6 +9,7 @@ pub(crate) mod projects; | ||||
| pub(crate) mod subtasks; | ||||
| pub(crate) mod tasks; | ||||
|  | ||||
| #[allow(dead_code)] | ||||
| #[derive(PartialEq, Debug)] | ||||
| pub(crate) enum QueryValue { | ||||
|     Projects(Vec<Project>), | ||||
| @@ -17,6 +18,7 @@ pub(crate) enum QueryValue { | ||||
|     Subtasks(Vec<Subtask>), | ||||
| } | ||||
|  | ||||
| #[allow(dead_code)] | ||||
| #[derive(Debug)] | ||||
| pub(crate) enum QueryErrors { | ||||
|     Error(ErrorVec<Error>), | ||||
|   | ||||
| @@ -4,6 +4,7 @@ use crate::server::tasks::{get_tasks_in_category, get_tasks_with_subtasks_in_cat | ||||
| use dioxus::prelude::ServerFnError; | ||||
| use dioxus_query::prelude::{use_get_query, QueryResult, UseQuery}; | ||||
|  | ||||
| #[allow(dead_code)] | ||||
| pub(crate) fn use_tasks_in_category_query( | ||||
|     category: Category, | ||||
| ) -> UseQuery<QueryValue, QueryErrors, QueryKey> { | ||||
|   | ||||
| @@ -1,5 +1,6 @@ | ||||
| use dioxus::prelude::ServerFnError; | ||||
| use dioxus::prelude::*; | ||||
| #[cfg(feature = "server")] | ||||
| use dotenvy::dotenv; | ||||
| use std::env; | ||||
| use unic_langid_impl::LanguageIdentifier; | ||||
|   | ||||
| @@ -1,3 +1,4 @@ | ||||
| #[cfg(feature = "server")] | ||||
| pub(crate) mod database_connection; | ||||
| pub(crate) mod internationalization; | ||||
| pub(crate) mod projects; | ||||
|   | ||||
| @@ -2,9 +2,12 @@ use crate::errors::error::Error; | ||||
| use crate::errors::error_vec::ErrorVec; | ||||
| use crate::errors::project_error::ProjectError; | ||||
| use crate::models::project::{NewProject, Project}; | ||||
| #[cfg(feature = "server")] | ||||
| use crate::server::database_connection::establish_database_connection; | ||||
| #[cfg(feature = "server")] | ||||
| use diesel::{ExpressionMethods, QueryDsl, RunQueryDsl, SelectableHelper}; | ||||
| use dioxus::prelude::*; | ||||
| #[cfg(feature = "server")] | ||||
| use validator::Validate; | ||||
|  | ||||
| #[server] | ||||
|   | ||||
| @@ -2,10 +2,14 @@ use crate::errors::error::Error; | ||||
| use crate::errors::error_vec::ErrorVec; | ||||
| use crate::errors::subtask_error::SubtaskError; | ||||
| use crate::models::subtask::{NewSubtask, Subtask}; | ||||
| #[cfg(feature = "server")] | ||||
| use crate::server::database_connection::establish_database_connection; | ||||
| #[cfg(feature = "server")] | ||||
| use crate::server::tasks::trigger_task_updated_at; | ||||
| #[cfg(feature = "server")] | ||||
| use diesel::{ExpressionMethods, QueryDsl, RunQueryDsl, SelectableHelper}; | ||||
| use dioxus::prelude::*; | ||||
| #[cfg(feature = "server")] | ||||
| use validator::Validate; | ||||
|  | ||||
| #[server] | ||||
|   | ||||
| @@ -1,16 +1,26 @@ | ||||
| use crate::errors::error::Error; | ||||
| use crate::errors::error_vec::ErrorVec; | ||||
| use crate::errors::task_error::TaskError; | ||||
| use crate::models::category::{Category, ReoccurrenceInterval}; | ||||
| use crate::models::category::Category; | ||||
| #[cfg(feature = "server")] | ||||
| use crate::models::category::ReoccurrenceInterval; | ||||
| #[cfg(feature = "server")] | ||||
| use crate::models::subtask::Subtask; | ||||
| use crate::models::task::{NewTask, Task, TaskWithSubtasks}; | ||||
| #[cfg(feature = "server")] | ||||
| use crate::server::database_connection::establish_database_connection; | ||||
| #[cfg(feature = "server")] | ||||
| use crate::server::subtasks::restore_subtasks_of_task; | ||||
| #[cfg(feature = "server")] | ||||
| use chrono::{Datelike, Days, Local, Months, NaiveDate}; | ||||
| #[cfg(feature = "server")] | ||||
| use diesel::prelude::*; | ||||
| #[cfg(feature = "server")] | ||||
| use diesel::{ExpressionMethods, OptionalExtension, QueryDsl, RunQueryDsl, SelectableHelper}; | ||||
| use dioxus::prelude::*; | ||||
| #[cfg(feature = "server")] | ||||
| use time::util::days_in_year_month; | ||||
| #[cfg(feature = "server")] | ||||
| use validator::Validate; | ||||
|  | ||||
| #[server] | ||||
| @@ -204,6 +214,7 @@ pub(crate) async fn delete_task(task_id: i32) -> Result<(), ServerFnError<ErrorV | ||||
|     Ok(()) | ||||
| } | ||||
|  | ||||
| #[cfg(feature = "server")] | ||||
| pub(crate) async fn trigger_task_updated_at(task_id: i32) -> Result<Task, ErrorVec<Error>> { | ||||
|     use crate::schema::tasks::dsl::*; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user