Add context menu actions to tag list and files

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/4/head
trivernis 3 years ago
parent 251d981b04
commit bade6214a0

@ -58,37 +58,12 @@ version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544"
[[package]]
name = "arrayvec"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
[[package]] [[package]]
name = "arrayvec" name = "arrayvec"
version = "0.7.1" version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be4dc07131ffa69b8072d35f5007352af944213cde02545e2103680baed38fcd" checksum = "be4dc07131ffa69b8072d35f5007352af944213cde02545e2103680baed38fcd"
[[package]]
name = "async-io"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a811e6a479f2439f0c04038796b5cfb3d2ad56c230e0f2d3f7b04d68cfee607b"
dependencies = [
"concurrent-queue",
"futures-lite",
"libc",
"log",
"once_cell",
"parking",
"polling",
"slab",
"socket2",
"waker-fn",
"winapi",
]
[[package]] [[package]]
name = "async-trait" name = "async-trait"
version = "0.1.51" version = "0.1.51"
@ -148,12 +123,6 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
[[package]]
name = "base64"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
[[package]] [[package]]
name = "bincode" name = "bincode"
version = "1.3.3" version = "1.3.3"
@ -169,17 +138,6 @@ version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "blake2b_simd"
version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587"
dependencies = [
"arrayref",
"arrayvec 0.5.2",
"constant_time_eq",
]
[[package]] [[package]]
name = "blake3" name = "blake3"
version = "1.0.0" version = "1.0.0"
@ -187,7 +145,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcd555c66291d5f836dbb6883b48660ece810fe25a31f3bdfb911945dff2691f" checksum = "dcd555c66291d5f836dbb6883b48660ece810fe25a31f3bdfb911945dff2691f"
dependencies = [ dependencies = [
"arrayref", "arrayref",
"arrayvec 0.7.1", "arrayvec",
"cc", "cc",
"cfg-if 1.0.0", "cfg-if 1.0.0",
"constant_time_eq", "constant_time_eq",
@ -249,12 +207,6 @@ dependencies = [
"pkg-config", "pkg-config",
] ]
[[package]]
name = "cache-padded"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba"
[[package]] [[package]]
name = "cairo-rs" name = "cairo-rs"
version = "0.14.7" version = "0.14.7"
@ -401,21 +353,6 @@ dependencies = [
"syn 1.0.80", "syn 1.0.80",
] ]
[[package]]
name = "concurrent-queue"
version = "1.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3"
dependencies = [
"cache-padded",
]
[[package]]
name = "const-sha1"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb58b6451e8c2a812ad979ed1d83378caa5e927eef2622017a45f251457c2c9d"
[[package]] [[package]]
name = "constant_time_eq" name = "constant_time_eq"
version = "0.1.5" version = "0.1.5"
@ -687,17 +624,6 @@ dependencies = [
"dirs-sys", "dirs-sys",
] ]
[[package]]
name = "dirs"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901"
dependencies = [
"libc",
"redox_users 0.3.5",
"winapi",
]
[[package]] [[package]]
name = "dirs-next" name = "dirs-next"
version = "2.0.0" version = "2.0.0"
@ -715,7 +641,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780"
dependencies = [ dependencies = [
"libc", "libc",
"redox_users 0.4.0", "redox_users",
"winapi", "winapi",
] ]
@ -726,7 +652,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
dependencies = [ dependencies = [
"libc", "libc",
"redox_users 0.4.0", "redox_users",
"winapi", "winapi",
] ]
@ -763,27 +689,6 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53dd2e43a7d32952a6054141ee0d75183958620e84e5eab045de362dff13dc99" checksum = "53dd2e43a7d32952a6054141ee0d75183958620e84e5eab045de362dff13dc99"
[[package]]
name = "enumflags2"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83c8d82922337cd23a15f88b70d8e4ef5f11da38dd7cdb55e84dd5de99695da0"
dependencies = [
"enumflags2_derive",
"serde",
]
[[package]]
name = "enumflags2_derive"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce"
dependencies = [
"proc-macro2 1.0.29",
"quote 1.0.10",
"syn 1.0.80",
]
[[package]] [[package]]
name = "fastrand" name = "fastrand"
version = "1.5.0" version = "1.5.0"
@ -811,7 +716,7 @@ checksum = "975ccf83d8d9d0d84682850a38c8169027be83368805971cc4f238c2b245bc98"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
"libc", "libc",
"redox_syscall 0.2.10", "redox_syscall",
"winapi", "winapi",
] ]
@ -1519,18 +1424,6 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
[[package]]
name = "mac-notification-sys"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3dfb6b71a9a89cd38b395d994214297447e8e63b1ba5708a9a2b0b1048ceda76"
dependencies = [
"cc",
"chrono",
"dirs",
"objc-foundation",
]
[[package]] [[package]]
name = "malloc_buf" name = "malloc_buf"
version = "0.0.6" version = "0.0.6"
@ -1581,7 +1474,7 @@ checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
[[package]] [[package]]
name = "mediarepo-api" name = "mediarepo-api"
version = "0.11.0" version = "0.11.0"
source = "git+https://github.com/Trivernis/mediarepo-api.git?rev=6fbc72699a565b1ca3f76f58c3dafbe9790c758e#6fbc72699a565b1ca3f76f58c3dafbe9790c758e" source = "git+https://github.com/Trivernis/mediarepo-api.git?rev=8f19fe419203842e3e7bff130d52be90de733504#8f19fe419203842e3e7bff130d52be90de733504"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"chrono", "chrono",
@ -1632,12 +1525,6 @@ dependencies = [
"unicase", "unicase",
] ]
[[package]]
name = "minisign-verify"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db0507fe8e3c68cd62961cf9f87f6c2b21d884d3515a7150a4a3fa9d014e5c12"
[[package]] [[package]]
name = "miniz_oxide" name = "miniz_oxide"
version = "0.3.7" version = "0.3.7"
@ -1697,16 +1584,6 @@ dependencies = [
"tempfile", "tempfile",
] ]
[[package]]
name = "nb-connect"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1bb540dc6ef51cfe1916ec038ce7a620daf3a111e2502d745197cd53d6bca15"
dependencies = [
"libc",
"socket2",
]
[[package]] [[package]]
name = "ndk" name = "ndk"
version = "0.4.0" version = "0.4.0"
@ -1759,39 +1636,12 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
[[package]]
name = "nix"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363"
dependencies = [
"bitflags",
"cc",
"cfg-if 0.1.10",
"libc",
"void",
]
[[package]] [[package]]
name = "nodrop" name = "nodrop"
version = "0.1.14" version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb"
[[package]]
name = "notify-rust"
version = "4.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "825e9c9efdcb4d14920f72e2ef329b4dae0219791834c000c42c1475dad341f8"
dependencies = [
"mac-notification-sys",
"serde",
"winrt-notification",
"zbus",
"zvariant",
"zvariant_derive",
]
[[package]] [[package]]
name = "ntapi" name = "ntapi"
version = "0.3.6" version = "0.3.6"
@ -1898,16 +1748,6 @@ version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56"
[[package]]
name = "open"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b46b233de7d83bc167fe43ae2dda3b5b84e80e09cceba581e4decb958a4896bf"
dependencies = [
"pathdiff",
"winapi",
]
[[package]] [[package]]
name = "openssl" name = "openssl"
version = "0.10.36" version = "0.10.36"
@ -1941,27 +1781,6 @@ dependencies = [
"vcpkg", "vcpkg",
] ]
[[package]]
name = "os_info"
version = "3.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ac91020bfed8cc3f8aa450d4c3b5fa1d3373fc091c8a92009f3b27749d5a227"
dependencies = [
"log",
"serde",
"winapi",
]
[[package]]
name = "os_pipe"
version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb233f06c2307e1f5ce2ecad9f8121cffbbee2c95428f44ea85222e460d0d213"
dependencies = [
"libc",
"winapi",
]
[[package]] [[package]]
name = "pango" name = "pango"
version = "0.14.8" version = "0.14.8"
@ -2013,17 +1832,11 @@ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
"instant", "instant",
"libc", "libc",
"redox_syscall 0.2.10", "redox_syscall",
"smallvec", "smallvec",
"winapi", "winapi",
] ]
[[package]]
name = "pathdiff"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd"
[[package]] [[package]]
name = "percent-encoding" name = "percent-encoding"
version = "2.1.0" version = "2.1.0"
@ -2179,19 +1992,6 @@ dependencies = [
"miniz_oxide 0.3.7", "miniz_oxide 0.3.7",
] ]
[[package]]
name = "polling"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92341d779fa34ea8437ef4d82d440d5e1ce3f3ff7f824aa64424cd481f9a1f25"
dependencies = [
"cfg-if 1.0.0",
"libc",
"log",
"wepoll-ffi",
"winapi",
]
[[package]] [[package]]
name = "ppv-lite86" name = "ppv-lite86"
version = "0.2.10" version = "0.2.10"
@ -2420,12 +2220,6 @@ dependencies = [
"num_cpus", "num_cpus",
] ]
[[package]]
name = "redox_syscall"
version = "0.1.57"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
[[package]] [[package]]
name = "redox_syscall" name = "redox_syscall"
version = "0.2.10" version = "0.2.10"
@ -2435,17 +2229,6 @@ dependencies = [
"bitflags", "bitflags",
] ]
[[package]]
name = "redox_users"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d"
dependencies = [
"getrandom 0.1.16",
"redox_syscall 0.1.57",
"rust-argon2",
]
[[package]] [[package]]
name = "redox_users" name = "redox_users"
version = "0.4.0" version = "0.4.0"
@ -2453,7 +2236,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64"
dependencies = [ dependencies = [
"getrandom 0.2.3", "getrandom 0.2.3",
"redox_syscall 0.2.10", "redox_syscall",
] ]
[[package]] [[package]]
@ -2553,18 +2336,6 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "rust-argon2"
version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb"
dependencies = [
"base64",
"blake2b_simd",
"constant_time_eq",
"crossbeam-utils",
]
[[package]] [[package]]
name = "rustc_version" name = "rustc_version"
version = "0.3.3" version = "0.3.3"
@ -2779,16 +2550,6 @@ dependencies = [
"lazy_static", "lazy_static",
] ]
[[package]]
name = "shared_child"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6be9f7d5565b1483af3e72975e2dee33879b3b86bd48c0929fccf6585d79e65a"
dependencies = [
"libc",
"winapi",
]
[[package]] [[package]]
name = "signal-hook-registry" name = "signal-hook-registry"
version = "1.4.0" version = "1.4.0"
@ -2816,16 +2577,6 @@ version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309"
[[package]]
name = "socket2"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516"
dependencies = [
"libc",
"winapi",
]
[[package]] [[package]]
name = "soup-sys" name = "soup-sys"
version = "0.10.0" version = "0.10.0"
@ -2856,12 +2607,6 @@ dependencies = [
"loom", "loom",
] ]
[[package]]
name = "static_assertions"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]] [[package]]
name = "string_cache" name = "string_cache"
version = "0.8.1" version = "0.8.1"
@ -2904,9 +2649,6 @@ name = "strum"
version = "0.21.0" version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aaf86bbcfd1fa9670b7a129f64fc0c9fcbbfe4f1bc4210e9e98fe71ffc12cde2" checksum = "aaf86bbcfd1fa9670b7a129f64fc0c9fcbbfe4f1bc4210e9e98fe71ffc12cde2"
dependencies = [
"strum_macros 0.21.1",
]
[[package]] [[package]]
name = "strum_macros" name = "strum_macros"
@ -3044,7 +2786,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79a0579dcc6fb883fe90dd3c66d76b8b8f4a1786e1e915e314b2017a500ede09" checksum = "79a0579dcc6fb883fe90dd3c66d76b8b8f4a1786e1e915e314b2017a500ede09"
dependencies = [ dependencies = [
"attohttpc", "attohttpc",
"base64",
"bincode", "bincode",
"cfg_aliases", "cfg_aliases",
"dirs-next", "dirs-next",
@ -3057,12 +2798,7 @@ dependencies = [
"gtk", "gtk",
"http", "http",
"ignore", "ignore",
"minisign-verify",
"notify-rust",
"once_cell", "once_cell",
"open",
"os_info",
"os_pipe",
"percent-encoding", "percent-encoding",
"rand 0.8.4", "rand 0.8.4",
"raw-window-handle", "raw-window-handle",
@ -3071,7 +2807,6 @@ dependencies = [
"serde", "serde",
"serde_json", "serde_json",
"serde_repr", "serde_repr",
"shared_child",
"state", "state",
"tar", "tar",
"tauri-macros", "tauri-macros",
@ -3193,7 +2928,7 @@ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
"libc", "libc",
"rand 0.8.4", "rand 0.8.4",
"redox_syscall 0.2.10", "redox_syscall",
"remove_dir_all", "remove_dir_all",
"winapi", "winapi",
] ]
@ -3502,12 +3237,6 @@ version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe"
[[package]]
name = "void"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
[[package]] [[package]]
name = "waker-fn" name = "waker-fn"
version = "1.1.0" version = "1.1.0"
@ -3682,15 +3411,6 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "wepoll-ffi"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb"
dependencies = [
"cc",
]
[[package]] [[package]]
name = "widestring" name = "widestring"
version = "0.4.3" version = "0.4.3"
@ -3734,52 +3454,6 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows"
version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8f5f8d2ea79bf690bbee453fd4a1516ae426e5d5c7215d96cc0c3dc134fc4a0"
dependencies = [
"const-sha1",
"windows_gen",
"windows_macros",
"windows_reader",
]
[[package]]
name = "windows_gen"
version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e6994f42f8481387778cc608407d6703410672d57f32a66009419d7a18aa912"
dependencies = [
"windows_quote",
"windows_reader",
]
[[package]]
name = "windows_macros"
version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81cc2357b1b03c19f056cb0e6d06011f80f54beadb4e36aee2ca98493c7cfc3c"
dependencies = [
"syn 1.0.80",
"windows_gen",
"windows_quote",
"windows_reader",
]
[[package]]
name = "windows_quote"
version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7cf987b5288c15e1997226848f78f3ed3ef8b78dcfd71a201c8c8684163a7e4d"
[[package]]
name = "windows_reader"
version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "237b53e8b40766ea7db5da0d8c6c1442d21d0429f0ee7500d7b5688967bd9d7b"
[[package]] [[package]]
name = "winres" name = "winres"
version = "0.1.12" version = "0.1.12"
@ -3789,17 +3463,6 @@ dependencies = [
"toml", "toml",
] ]
[[package]]
name = "winrt-notification"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0cc832b8c66c42b3ee6b625c124fe2d0b3ff7fb2cec18b28926e9c4bfdb72da"
dependencies = [
"strum 0.21.0",
"windows",
"xml-rs",
]
[[package]] [[package]]
name = "wry" name = "wry"
version = "0.12.2" version = "0.12.2"
@ -3850,47 +3513,6 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "xml-rs"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3"
[[package]]
name = "zbus"
version = "1.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2326acc379a3ac4e34b794089f5bdb17086bf29a5fdf619b7b4cc772dc2e9dad"
dependencies = [
"async-io",
"byteorder",
"derivative",
"enumflags2",
"fastrand",
"futures",
"nb-connect",
"nix",
"once_cell",
"polling",
"scoped-tls",
"serde",
"serde_repr",
"zbus_macros",
"zvariant",
]
[[package]]
name = "zbus_macros"
version = "1.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a482c56029e48681b89b92b5db3c446db0915e8dd1052c0328a574eda38d5f93"
dependencies = [
"proc-macro-crate 0.1.5",
"proc-macro2 1.0.29",
"quote 1.0.10",
"syn 1.0.80",
]
[[package]] [[package]]
name = "zip" name = "zip"
version = "0.5.13" version = "0.5.13"
@ -3933,29 +3555,3 @@ dependencies = [
"cc", "cc",
"libc", "libc",
] ]
[[package]]
name = "zvariant"
version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1a9373dead84d640ccf5798f2928917e6aa1ab3f130751406bb13e0a9dd9913"
dependencies = [
"byteorder",
"enumflags2",
"libc",
"serde",
"static_assertions",
"zvariant_derive",
]
[[package]]
name = "zvariant_derive"
version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "46ee71e0e88747ec582d290dbe98ff7907ff28770c7a35f16da41e5e6f1f4fa3"
dependencies = [
"proc-macro-crate 1.1.0",
"proc-macro2 1.0.29",
"quote 1.0.10",
"syn 1.0.80",
]

@ -17,7 +17,7 @@ tauri-build = { version = "1.0.0-beta.4" }
[dependencies] [dependencies]
serde_json = "1.0" serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.0.0-beta.8", features = ["api-all"] } tauri = { version = "1.0.0-beta.8", features = ["dialog-all", "path-all"] }
thiserror = "1.0.30" thiserror = "1.0.30"
typemap_rev = "0.1.5" typemap_rev = "0.1.5"
@ -30,7 +30,7 @@ features = ["env-filter"]
[dependencies.mediarepo-api] [dependencies.mediarepo-api]
git = "https://github.com/Trivernis/mediarepo-api.git" git = "https://github.com/Trivernis/mediarepo-api.git"
rev = "6fbc72699a565b1ca3f76f58c3dafbe9790c758e" rev = "8f19fe419203842e3e7bff130d52be90de733504"
features = ["tauri-plugin"] features = ["tauri-plugin"]
[features] [features]

@ -49,8 +49,13 @@
"active": false "active": false
}, },
"allowlist": { "allowlist": {
"dialog": {
"all": true "all": true
}, },
"path": {
"all": true
}
},
"windows": [ "windows": [
{ {
"title": "Mediarepo", "title": "Mediarepo",

@ -58,6 +58,7 @@ import { FilterDialogComponent } from './components/file-search/filter-dialog/fi
import { TagFilterListItemComponent } from './components/file-search/filter-dialog/tag-filter-list-item/tag-filter-list-item.component'; import { TagFilterListItemComponent } from './components/file-search/filter-dialog/tag-filter-list-item/tag-filter-list-item.component';
import { TagInputComponent } from './components/inputs/tag-input/tag-input.component'; import { TagInputComponent } from './components/inputs/tag-input/tag-input.component';
import { ContextMenuComponent } from './components/context-menu/context-menu.component'; import { ContextMenuComponent } from './components/context-menu/context-menu.component';
import { FileContextMenuComponent } from './components/context-menu/file-context-menu/file-context-menu.component';
@NgModule({ @NgModule({
declarations: [ declarations: [
@ -86,6 +87,7 @@ import { ContextMenuComponent } from './components/context-menu/context-menu.com
TagFilterListItemComponent, TagFilterListItemComponent,
TagInputComponent, TagInputComponent,
ContextMenuComponent, ContextMenuComponent,
FileContextMenuComponent,
], ],
imports: [ imports: [
BrowserModule, BrowserModule,

@ -1,9 +1,6 @@
import { import {
Component, Component,
ComponentFactoryResolver,
OnInit,
ViewChild, ViewChild,
ViewContainerRef
} from '@angular/core'; } from '@angular/core';
import {MatMenuTrigger} from "@angular/material/menu"; import {MatMenuTrigger} from "@angular/material/menu";
@ -14,7 +11,6 @@ import {MatMenuTrigger} from "@angular/material/menu";
}) })
export class ContextMenuComponent { export class ContextMenuComponent {
public x: string = "0"; public x: string = "0";
public y: string = "0"; public y: string = "0";
@ -27,6 +23,7 @@ export class ContextMenuComponent {
event.preventDefault(); event.preventDefault();
this.x = event.clientX + "px"; this.x = event.clientX + "px";
this.y = event.clientY + "px"; this.y = event.clientY + "px";
this.menuTrigger.menu.focusFirstItem("mouse");
this.menuTrigger.openMenu(); this.menuTrigger.openMenu();
} }
} }

@ -0,0 +1,5 @@
<app-context-menu #contextMenu>
<button mat-menu-item (click)="this.copyFileHash()">Copy Hash</button>
<button mat-menu-item (click)="this.exportFile()">Save As...</button>
<ng-content select="mat-menu-item"></ng-content>
</app-context-menu>

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FileContextMenuComponent } from './file-context-menu.component';
describe('FileContextMenuComponent', () => {
let component: FileContextMenuComponent;
let fixture: ComponentFixture<FileContextMenuComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ FileContextMenuComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(FileContextMenuComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,72 @@
import {Component, ViewChild} from '@angular/core';
import {File} from "../../../models/File";
import {ContextMenuComponent} from "../context-menu.component";
import {clipboard, dialog} from "@tauri-apps/api";
import {FileService} from "../../../services/file/file.service";
import {ErrorBrokerService} from "../../../services/error-broker/error-broker.service";
import {downloadDir} from "@tauri-apps/api/path";
@Component({
selector: 'app-file-context-menu',
templateUrl: './file-context-menu.component.html',
styleUrls: ['./file-context-menu.component.scss']
})
export class FileContextMenuComponent {
public file!: File;
@ViewChild("contextMenu") contextMenu!: ContextMenuComponent;
constructor(private fileService: FileService, private errorBroker: ErrorBrokerService) { }
public onContextMenu(event: MouseEvent, file: File) {
this.file = file;
this.contextMenu.onContextMenu(event);
}
public async copyFileHash(): Promise<void> {
await clipboard.writeText(this.file.hash);
}
public async exportFile(): Promise<void> {
let extension;
if (this.file.mime_type) {
extension = FileContextMenuComponent.getExtensionForMime(this.file.mime_type);
}
const downloadDirectory = await downloadDir();
const suggestionPath = downloadDirectory + this.file.hash + "." + extension;
const path = await dialog.save({
defaultPath: suggestionPath,
filters: [{name: this.file.mime_type ?? "All", extensions: [extension ?? "*"]}, {name: "All", extensions: ["*"]}]
});
if (path) {
try {
await this.fileService.saveFile(this.file, path);
} catch (err) {
this.errorBroker.showError(err);
}
}
}
/**
* Returns the extension for a mime type
* @param {string} mime
* @returns {string | undefined}
* @private
*/
private static getExtensionForMime(mime: string): string | undefined {
let parts = mime.split("/");
if (parts.length === 2) {
const type = parts[0];
const subtype = parts[1];
return FileContextMenuComponent.convertMimeSubtypeToExtension(subtype);
}
return undefined;
}
private static convertMimeSubtypeToExtension(subtype: string): string {
return subtype;
}
}

@ -19,7 +19,7 @@
<div #imageDragContainer (cdkDragMoved)="this.onDragMoved($event)" *ngIf="this.fileContentUrl" <div #imageDragContainer (cdkDragMoved)="this.onDragMoved($event)" *ngIf="this.fileContentUrl"
[cdkDragFreeDragPosition]="this.imagePosition" cdkDrag class="image-drag-container"> [cdkDragFreeDragPosition]="this.imagePosition" cdkDrag class="image-drag-container">
<div #scaledImage [style]="{scale: this.imageZoom}" class="image-scale-container"> <div #scaledImage [style]="{scale: this.imageZoom}" class="image-scale-container">
<app-content-aware-image [imageSrc]="this.fileContentUrl" decoding="sync"></app-content-aware-image> <app-content-aware-image (contextmenu)="fileContextMenu.onContextMenu($event, this.selectedFile!.data)" [imageSrc]="this.fileContentUrl" decoding="sync"></app-content-aware-image>
</div> </div>
</div> </div>
</div> </div>
@ -34,3 +34,4 @@
</cdk-virtual-scroll-viewport> </cdk-virtual-scroll-viewport>
</div> </div>
</div> </div>
<app-file-context-menu #fileContextMenu></app-file-context-menu>

@ -3,11 +3,14 @@
minBufferPx="500"> minBufferPx="500">
<div *cdkVirtualFor="let rowEntry of partitionedGridEntries"> <div *cdkVirtualFor="let rowEntry of partitionedGridEntries">
<div class="file-row"> <div class="file-row">
<app-file-grid-entry (clickEvent)="setSelectedFile($event.gridEntry)" <app-file-grid-entry
*ngFor="let gridEntry of rowEntry" (clickEvent)="setSelectedFile($event.gridEntry)"
(dblClickEvent)="fileDblClickEvent.emit($event.gridEntry.file)" (dblClickEvent)="fileDblClickEvent.emit($event.gridEntry.file)"
*ngFor="let gridEntry of rowEntry" [gridEntry]="gridEntry"></app-file-grid-entry> (contextmenu)="fileContextMenu.onContextMenu($event, gridEntry.file)"
[gridEntry]="gridEntry"></app-file-grid-entry>
</div> </div>
</div> </div>
</cdk-virtual-scroll-viewport> </cdk-virtual-scroll-viewport>
</div> </div>
<app-file-context-menu #fileContextMenu></app-file-context-menu>

@ -15,7 +15,8 @@
</div> </div>
<div class="file-tag-list" fxFlex fxFlexAlign="start" fxFlexFill> <div class="file-tag-list" fxFlex fxFlexAlign="start" fxFlexFill>
<cdk-virtual-scroll-viewport itemSize="50" maxBufferPx="4000" minBufferPx="500"> <cdk-virtual-scroll-viewport itemSize="50" maxBufferPx="4000" minBufferPx="500">
<div (click)="addSearchTag(tag)" *cdkVirtualFor="let tag of tags" class="selectable-tag" matRipple> <div (click)="addSearchTag(tag)" *cdkVirtualFor="let tag of tags" class="selectable-tag" matRipple
(contextmenu)="contextMenuTag = tag; contextMenu.onContextMenu($event)">
<app-tag-item [tag]="tag"></app-tag-item> <app-tag-item [tag]="tag"></app-tag-item>
</div> </div>
</cdk-virtual-scroll-viewport> </cdk-virtual-scroll-viewport>
@ -27,3 +28,10 @@
</mat-tab> </mat-tab>
</mat-tab-group> </mat-tab-group>
</div> </div>
<app-context-menu #contextMenu>
<button *ngIf="this.contextMenuTag" mat-menu-item (click)="this.copyToClipboard(this.contextMenuTag!.getNormalizedOutput())">Copy "{{contextMenuTag!.getNormalizedOutput()}}"</button>
<button *ngIf="this.contextMenuTag?.namespace" mat-menu-item (click)="this.copyToClipboard(this.contextMenuTag!.name)">Copy "{{this.contextMenuTag!.name}}"</button>
<button *ngIf="this.contextMenuTag?.namespace" mat-menu-item
(click)="this.copyToClipboard(this.contextMenuTag!.namespace!)">Copy "{{this.contextMenuTag!.namespace!}}"
</button>
</app-context-menu>

@ -15,6 +15,7 @@ import {File} from "../../../../models/File";
import {FileSearchComponent} from "../../../../components/file-search/file-search.component"; import {FileSearchComponent} from "../../../../components/file-search/file-search.component";
import {RepositoryService} from "../../../../services/repository/repository.service"; import {RepositoryService} from "../../../../services/repository/repository.service";
import {FileEditComponent} from "../../../../components/file-edit/file-edit.component"; import {FileEditComponent} from "../../../../components/file-edit/file-edit.component";
import {clipboard} from "@tauri-apps/api";
@Component({ @Component({
selector: 'app-files-tab-sidebar', selector: 'app-files-tab-sidebar',
@ -35,6 +36,7 @@ export class FilesTabSidebarComponent implements OnInit, OnChanges {
public allTags: Tag[] = []; public allTags: Tag[] = [];
public files: File[] = []; public files: File[] = [];
public tagsOfSelection: Tag[] = []; public tagsOfSelection: Tag[] = [];
public contextMenuTag: Tag | undefined;
constructor(private repoService: RepositoryService, private tagService: TagService, private fileService: FileService) { constructor(private repoService: RepositoryService, private tagService: TagService, private fileService: FileService) {
this.fileService.displayedFiles.subscribe(async files => { this.fileService.displayedFiles.subscribe(async files => {
@ -102,4 +104,8 @@ export class FilesTabSidebarComponent implements OnInit, OnChanges {
.localeCompare(b.getNormalizedOutput())); .localeCompare(b.getNormalizedOutput()));
} }
} }
public async copyToClipboard(text: string) {
await clipboard.writeText(text);
}
} }

@ -60,4 +60,8 @@ export class FileService {
public buildContentUrl(file: File): SafeResourceUrl { public buildContentUrl(file: File): SafeResourceUrl {
return this.sanitizer.bypassSecurityTrustResourceUrl(`content://${file.hash}`) return this.sanitizer.bypassSecurityTrustResourceUrl(`content://${file.hash}`)
} }
public async saveFile(file: File, targetPath: string) {
await invoke("plugin:mediarepo|save_file_locally", {id: file.id, path: targetPath})
}
} }

Loading…
Cancel
Save