Fix build errors and update to latest tauri version

main
trivernis 4 months ago
parent 7047dc7903
commit db01332c15
Signed by: Trivernis
GPG Key ID: 7E6D18B61C8D2F4B

@ -0,0 +1,11 @@
[language-server.rust-analyzer]
command = "rust-analyzer"
[language-server.rust-analyzer.config]
inlayHints.bindingModeHints.enable = false
inlayHints.closingBraceHints.minLines = 10
inlayHints.closureReturnTypeHints.enable = "with_block"
inlayHints.discriminantHints.enable = "fieldless"
inlayHints.lifetimeElisionHints.enable = "skip_trivial"
inlayHints.typeHints.hideClosureInitialization = false
cargo.features = "all"

@ -1,6 +1,6 @@
[package] [package]
name = "mediarepo-api" name = "mediarepo-api"
version = "0.32.1" version = "0.33.0"
edition = "2018" edition = "2018"
license = "gpl-3" license = "gpl-3"
@ -20,7 +20,7 @@ url = { version = "2.2.2", optional = true }
pathsearch = { version = "0.2.0", optional = true } pathsearch = { version = "0.2.0", optional = true }
[dependencies.bromine] [dependencies.bromine]
version = "0.20.1" version = "0.22.1"
optional = true optional = true
features = ["serialize_bincode", "encryption_layer"] features = ["serialize_bincode", "encryption_layer"]
@ -33,7 +33,7 @@ version = "0.4.19"
features = ["serde"] features = ["serde"]
[dependencies.tauri] [dependencies.tauri]
version = "1.0.0-rc.4" version = "1.5.4"
optional = true optional = true
default-features = false default-features = false
features = [] features = []

@ -1,22 +1,22 @@
pub mod error; pub mod error;
pub mod file; pub mod file;
pub mod job; pub mod job;
pub mod preset;
pub mod protocol; pub mod protocol;
pub mod repo; pub mod repo;
pub mod tag; pub mod tag;
pub mod preset;
use crate::client_api::error::{ApiError, ApiResult}; use crate::client_api::error::{ApiError, ApiResult};
use crate::client_api::file::FileApi; use crate::client_api::file::FileApi;
use crate::client_api::job::JobApi; use crate::client_api::job::JobApi;
use crate::client_api::preset::PresetApi;
use crate::client_api::repo::RepoApi; use crate::client_api::repo::RepoApi;
use crate::client_api::tag::TagApi; use crate::client_api::tag::TagApi;
use crate::types::misc::{check_apis_compatible, get_api_version, InfoResponse}; use crate::types::misc::{check_apis_compatible, get_api_version, InfoResponse};
use async_trait::async_trait; use async_trait::async_trait;
use bromine::prelude::*;
use bromine::prelude::emit_metadata::EmitMetadata; use bromine::prelude::emit_metadata::EmitMetadata;
use bromine::prelude::*;
use tokio::time::Duration; use tokio::time::Duration;
use crate::client_api::preset::PresetApi;
#[async_trait] #[async_trait]
pub trait IPCApi { pub trait IPCApi {

@ -57,7 +57,10 @@ fn once_scheme<R: Runtime>(app: &AppHandle<R>, request: &Request) -> Result<Resp
#[tracing::instrument(level = "debug", skip_all)] #[tracing::instrument(level = "debug", skip_all)]
async fn content_scheme<R: Runtime>(app: &AppHandle<R>, request: &Request) -> Result<Response> { async fn content_scheme<R: Runtime>(app: &AppHandle<R>, request: &Request) -> Result<Response> {
let buf_state = app.state::<BufferState>(); let buf_state = app.state::<BufferState>();
let hash = request.uri().trim_start_matches("content://"); let hash = request
.uri()
.trim_start_matches("content://")
.trim_end_matches("/");
if let Some(buffer) = buf_state.get_entry(hash) { if let Some(buffer) = buf_state.get_entry(hash) {
tracing::debug!("Fetching content from cache"); tracing::debug!("Fetching content from cache");

@ -5,8 +5,9 @@ use std::time::{SystemTime, UNIX_EPOCH};
pub fn system_time_to_naive_date_time(system_time: SystemTime) -> NaiveDateTime { pub fn system_time_to_naive_date_time(system_time: SystemTime) -> NaiveDateTime {
let epoch_duration = system_time.duration_since(UNIX_EPOCH).unwrap(); let epoch_duration = system_time.duration_since(UNIX_EPOCH).unwrap();
NaiveDateTime::from_timestamp( NaiveDateTime::from_timestamp_opt(
epoch_duration.as_secs() as i64, epoch_duration.as_secs() as i64,
epoch_duration.subsec_nanos(), epoch_duration.subsec_nanos(),
) )
.unwrap()
} }

@ -25,10 +25,11 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
[[package]] [[package]]
name = "aead" name = "aead"
version = "0.4.3" version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0"
dependencies = [ dependencies = [
"crypto-common",
"generic-array", "generic-array",
] ]
@ -38,7 +39,7 @@ version = "0.7.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd"
dependencies = [ dependencies = [
"getrandom 0.2.12", "getrandom",
"once_cell", "once_cell",
"version_check", "version_check",
] ]
@ -418,9 +419,9 @@ dependencies = [
[[package]] [[package]]
name = "bromine" name = "bromine"
version = "0.20.2" version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a16eab2259221f3b27c892f2b3cd7481411acab516fcaacc00993d44eebe6fbf" checksum = "ef32f4f5be30cb2bad004d6ba32ce3347cbd4724356b169f80f4a72d676fd608"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"bincode", "bincode",
@ -432,7 +433,7 @@ dependencies = [
"lazy_static", "lazy_static",
"num_enum", "num_enum",
"rand", "rand",
"rand_core 0.6.4", "rand_core",
"serde", "serde",
"sha2", "sha2",
"thiserror", "thiserror",
@ -518,21 +519,20 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
[[package]] [[package]]
name = "chacha20" name = "chacha20"
version = "0.8.2" version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c80e5460aa66fe3b91d40bcbdab953a597b60053e34d684ac6903f863b680a6" checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
"cipher", "cipher",
"cpufeatures", "cpufeatures",
"zeroize",
] ]
[[package]] [[package]]
name = "chacha20poly1305" name = "chacha20poly1305"
version = "0.9.1" version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a18446b09be63d457bbec447509e85f662f32952b035ce892290396bc0b0cff5" checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35"
dependencies = [ dependencies = [
"aead", "aead",
"chacha20", "chacha20",
@ -558,11 +558,13 @@ dependencies = [
[[package]] [[package]]
name = "cipher" name = "cipher"
version = "0.3.0" version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
dependencies = [ dependencies = [
"generic-array", "crypto-common",
"inout",
"zeroize",
] ]
[[package]] [[package]]
@ -790,22 +792,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
dependencies = [ dependencies = [
"generic-array", "generic-array",
"rand_core",
"typenum", "typenum",
] ]
[[package]] [[package]]
name = "curve25519-dalek" name = "curve25519-dalek"
version = "3.2.1" version = "4.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c"
dependencies = [ dependencies = [
"byteorder", "cfg-if 1.0.0",
"digest 0.9.0", "cpufeatures",
"rand_core 0.5.1", "curve25519-dalek-derive",
"fiat-crypto",
"platforms",
"rustc_version 0.4.0",
"subtle", "subtle",
"zeroize", "zeroize",
] ]
[[package]]
name = "curve25519-dalek-derive"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
dependencies = [
"proc-macro2 1.0.78",
"quote 1.0.35",
"syn 2.0.48",
]
[[package]] [[package]]
name = "dashmap" name = "dashmap"
version = "5.5.3" version = "5.5.3"
@ -854,15 +871,6 @@ dependencies = [
"powerfmt", "powerfmt",
] ]
[[package]]
name = "digest"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
dependencies = [
"generic-array",
]
[[package]] [[package]]
name = "digest" name = "digest"
version = "0.10.7" version = "0.10.7"
@ -950,6 +958,12 @@ dependencies = [
"simd-adler32", "simd-adler32",
] ]
[[package]]
name = "fiat-crypto"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7"
[[package]] [[package]]
name = "finl_unicode" name = "finl_unicode"
version = "1.2.0" version = "1.2.0"
@ -1139,17 +1153,6 @@ dependencies = [
"version_check", "version_check",
] ]
[[package]]
name = "getrandom"
version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
dependencies = [
"cfg-if 1.0.0",
"libc",
"wasi 0.9.0+wasi-snapshot-preview1",
]
[[package]] [[package]]
name = "getrandom" name = "getrandom"
version = "0.2.12" version = "0.2.12"
@ -1158,7 +1161,7 @@ checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
"libc", "libc",
"wasi 0.11.0+wasi-snapshot-preview1", "wasi",
] ]
[[package]] [[package]]
@ -1459,6 +1462,15 @@ dependencies = [
"hashbrown 0.14.3", "hashbrown 0.14.3",
] ]
[[package]]
name = "inout"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5"
dependencies = [
"generic-array",
]
[[package]] [[package]]
name = "instant" name = "instant"
version = "0.1.12" version = "0.1.12"
@ -1620,7 +1632,7 @@ checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94"
[[package]] [[package]]
name = "mediarepo-api" name = "mediarepo-api"
version = "0.32.1" version = "0.33.0"
dependencies = [ dependencies = [
"bromine", "bromine",
"chrono", "chrono",
@ -1659,7 +1671,7 @@ dependencies = [
[[package]] [[package]]
name = "mediarepo-daemon" name = "mediarepo-daemon"
version = "1.0.4" version = "1.0.5"
dependencies = [ dependencies = [
"console-subscriber", "console-subscriber",
"glob", "glob",
@ -1788,7 +1800,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09"
dependencies = [ dependencies = [
"libc", "libc",
"wasi 0.11.0+wasi-snapshot-preview1", "wasi",
"windows-sys 0.48.0", "windows-sys 0.48.0",
] ]
@ -1819,7 +1831,7 @@ dependencies = [
"blake2s_simd", "blake2s_simd",
"blake3", "blake3",
"core2", "core2",
"digest 0.10.7", "digest",
"multihash-derive", "multihash-derive",
"sha2", "sha2",
"sha3", "sha3",
@ -1920,23 +1932,23 @@ dependencies = [
[[package]] [[package]]
name = "num_enum" name = "num_enum"
version = "0.5.11" version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845"
dependencies = [ dependencies = [
"num_enum_derive", "num_enum_derive",
] ]
[[package]] [[package]]
name = "num_enum_derive" name = "num_enum_derive"
version = "0.5.11" version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b"
dependencies = [ dependencies = [
"proc-macro-crate 1.1.3", "proc-macro-crate 3.1.0",
"proc-macro2 1.0.78", "proc-macro2 1.0.78",
"quote 1.0.35", "quote 1.0.35",
"syn 1.0.109", "syn 2.0.48",
] ]
[[package]] [[package]]
@ -2247,6 +2259,12 @@ version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb"
[[package]]
name = "platforms"
version = "3.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c"
[[package]] [[package]]
name = "png" name = "png"
version = "0.17.11" version = "0.17.11"
@ -2262,9 +2280,9 @@ dependencies = [
[[package]] [[package]]
name = "poly1305" name = "poly1305"
version = "0.7.2" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede" checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf"
dependencies = [ dependencies = [
"cpufeatures", "cpufeatures",
"opaque-debug", "opaque-debug",
@ -2449,7 +2467,7 @@ checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [ dependencies = [
"libc", "libc",
"rand_chacha", "rand_chacha",
"rand_core 0.6.4", "rand_core",
] ]
[[package]] [[package]]
@ -2459,16 +2477,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [ dependencies = [
"ppv-lite86", "ppv-lite86",
"rand_core 0.6.4", "rand_core",
]
[[package]]
name = "rand_core"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
dependencies = [
"getrandom 0.1.16",
] ]
[[package]] [[package]]
@ -2477,7 +2486,7 @@ version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [ dependencies = [
"getrandom 0.2.12", "getrandom",
] ]
[[package]] [[package]]
@ -2658,7 +2667,16 @@ version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
dependencies = [ dependencies = [
"semver", "semver 0.9.0",
]
[[package]]
name = "rustc_version"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
dependencies = [
"semver 1.0.21",
] ]
[[package]] [[package]]
@ -2827,6 +2845,12 @@ dependencies = [
"semver-parser", "semver-parser",
] ]
[[package]]
name = "semver"
version = "1.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0"
[[package]] [[package]]
name = "semver-parser" name = "semver-parser"
version = "0.7.0" version = "0.7.0"
@ -2918,7 +2942,7 @@ checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
"cpufeatures", "cpufeatures",
"digest 0.10.7", "digest",
] ]
[[package]] [[package]]
@ -2927,7 +2951,7 @@ version = "0.10.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60"
dependencies = [ dependencies = [
"digest 0.10.7", "digest",
"keccak", "keccak",
] ]
@ -3113,7 +3137,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5"
dependencies = [ dependencies = [
"discard", "discard",
"rustc_version", "rustc_version 0.2.3",
"stdweb-derive", "stdweb-derive",
"stdweb-internal-macros", "stdweb-internal-macros",
"stdweb-internal-runtime", "stdweb-internal-runtime",
@ -3198,9 +3222,9 @@ dependencies = [
[[package]] [[package]]
name = "subtle" name = "subtle"
version = "2.4.1" version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc"
[[package]] [[package]]
name = "syn" name = "syn"
@ -3877,11 +3901,11 @@ checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e"
[[package]] [[package]]
name = "universal-hash" name = "universal-hash"
version = "0.4.1" version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea"
dependencies = [ dependencies = [
"generic-array", "crypto-common",
"subtle", "subtle",
] ]
@ -3914,7 +3938,7 @@ version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
dependencies = [ dependencies = [
"getrandom 0.2.12", "getrandom",
"serde", "serde",
] ]
@ -3924,7 +3948,7 @@ 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 = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a"
dependencies = [ dependencies = [
"getrandom 0.2.12", "getrandom",
] ]
[[package]] [[package]]
@ -3960,12 +3984,6 @@ dependencies = [
"try-lock", "try-lock",
] ]
[[package]]
name = "wasi"
version = "0.9.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
[[package]] [[package]]
name = "wasi" name = "wasi"
version = "0.11.0+wasi-snapshot-preview1" version = "0.11.0+wasi-snapshot-preview1"
@ -4225,12 +4243,13 @@ dependencies = [
[[package]] [[package]]
name = "x25519-dalek" name = "x25519-dalek"
version = "1.2.0" version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2392b6b94a576b4e2bf3c5b2757d63f10ada8020a2e4d08ac849ebcf6ea8e077" checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96"
dependencies = [ dependencies = [
"curve25519-dalek", "curve25519-dalek",
"rand_core 0.5.1", "rand_core",
"serde",
"zeroize", "zeroize",
] ]
@ -4245,9 +4264,9 @@ dependencies = [
[[package]] [[package]]
name = "zeroize" name = "zeroize"
version = "1.3.0" 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 = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d"
dependencies = [ dependencies = [
"zeroize_derive", "zeroize_derive",
] ]

@ -4,7 +4,7 @@ default-members = ["mediarepo-core", "mediarepo-database", "mediarepo-logic", "m
[package] [package]
name = "mediarepo-daemon" name = "mediarepo-daemon"
version = "1.0.4" version = "1.0.5"
edition = "2018" edition = "2018"
license = "gpl-3" license = "gpl-3"
repository = "https://github.com/Trivernis/mediarepo-daemon" repository = "https://github.com/Trivernis/mediarepo-daemon"

@ -1,17 +1,11 @@
{ {
"root": true, "root": true,
"ignorePatterns": [ "ignorePatterns": ["projects/**/*"],
"projects/**/*"
],
"overrides": [ "overrides": [
{ {
"files": [ "files": ["*.ts"],
"*.ts"
],
"parserOptions": { "parserOptions": {
"project": [ "project": ["tsconfig.json"],
"tsconfig.json"
],
"createDefaultProgram": true "createDefaultProgram": true
}, },
"extends": [ "extends": [
@ -50,16 +44,13 @@
} }
], ],
"no-unused-expressions": "warn", "no-unused-expressions": "warn",
"no-extraneous-class": "off",
"semi": "error" "semi": "error"
} }
}, },
{ {
"files": [ "files": ["*.html"],
"*.html" "extends": ["plugin:@angular-eslint/template/recommended"],
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {} "rules": {}
} }
] ]

@ -0,0 +1,15 @@
[language-server.biome]
command = "biome"
args = ["lsp-proxy"]
[[language]]
name = "typescript"
language-servers = ["typescript-language-server"]
auto-format = true
formatter = { command = "biome" , args = ["format", "--stdin-file-path=file.ts"] }
[[language]]
name = "javascript"
language-servers = ["typescript-language-server", "biome"]
auto-format = true
formatter = { command = "biome" , args = ["format", "--stdin-file-path=file.js"] }

@ -3,7 +3,8 @@
"version": 1, "version": 1,
"cli": { "cli": {
"packageManager": "yarn", "packageManager": "yarn",
"defaultCollection": "@angular-eslint/schematics" "defaultCollection": "@angular-eslint/schematics",
"analytics": "dc09bab7-b1ef-4661-8d46-1da5b61c8e44"
}, },
"newProjectRoot": "projects", "newProjectRoot": "projects",
"projects": { "projects": {

@ -0,0 +1,15 @@
{
"$schema": "https://biomejs.dev/schemas/1.3.3/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"noStaticOnlyClass": "off"
}
}
}
}

@ -1,6 +1,6 @@
{ {
"name": "mediarepo-ui", "name": "mediarepo-ui",
"version": "1.0.4", "version": "1.0.5",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve", "start": "ng serve",
@ -27,7 +27,7 @@
"@ng-icons/core": "^15.1.0", "@ng-icons/core": "^15.1.0",
"@ng-icons/feather-icons": "^15.1.0", "@ng-icons/feather-icons": "^15.1.0",
"@ng-icons/material-icons": "^15.1.0", "@ng-icons/material-icons": "^15.1.0",
"@tauri-apps/api": "^1.0.0-rc.3", "@tauri-apps/api": "^1.5.3",
"chart.js": "^3.7.1", "chart.js": "^3.7.1",
"primeicons": "^5.0.0", "primeicons": "^5.0.0",
"primeng": "^13.3.2", "primeng": "^13.3.2",
@ -45,7 +45,8 @@
"@angular-eslint/template-parser": "^13.2.0", "@angular-eslint/template-parser": "^13.2.0",
"@angular/cli": "~13.3.2", "@angular/cli": "~13.3.2",
"@angular/compiler-cli": "~13.3.2", "@angular/compiler-cli": "~13.3.2",
"@tauri-apps/cli": "^1.0.0-rc.8", "@angular/language-service": "^17.1.1",
"@tauri-apps/cli": "^1.5.4",
"@types/file-saver": "^2.0.4", "@types/file-saver": "^2.0.4",
"@types/jasmine": "~4.0.2", "@types/jasmine": "~4.0.2",
"@types/node": "^17.0.23", "@types/node": "^17.0.23",

File diff suppressed because it is too large Load Diff

@ -1,16 +1,16 @@
[package] [package]
name = "app" name = "app"
version = "1.0.4" version = "1.0.5"
description = "The UI for the mediarepo media management tool" description = "The UI for the mediarepo media management tool"
authors = ["you"] authors = ["you"]
license = "" license = ""
repository = "" repository = ""
default-run = "app" default-run = "app"
edition = "2018" edition = "2021"
build = "src/build.rs" build = "src/build.rs"
[build-dependencies] [build-dependencies]
tauri-build = { version = "1.0.0-rc.5", features = [] } tauri-build = { version = "1.5.1", features = [] }
[dependencies] [dependencies]
serde_json = "1.0.79" serde_json = "1.0.79"
@ -19,7 +19,7 @@ thiserror = "1.0.30"
typemap_rev = "0.1.5" typemap_rev = "0.1.5"
[dependencies.tauri] [dependencies.tauri]
version = "1.0.0-rc.6" version = "1.5.4"
features = ["dialog-all", "path-all", "shell-all"] features = ["dialog-all", "path-all", "shell-all"]
[dependencies.tracing-subscriber] [dependencies.tracing-subscriber]

@ -12,7 +12,7 @@
"tauri": { "tauri": {
"bundle": { "bundle": {
"active": true, "active": true,
"targets": "all", "targets": ["msi", "app", "dmg", "updater"],
"identifier": "net.trivernis.mediarepo", "identifier": "net.trivernis.mediarepo",
"icon": [ "icon": [
"icons/32x32.png", "icons/32x32.png",
@ -29,13 +29,11 @@
"shortDescription": "A media management tool", "shortDescription": "A media management tool",
"longDescription": "", "longDescription": "",
"deb": { "deb": {
"depends": [], "depends": []
"useBootstrapper": false
}, },
"macOS": { "macOS": {
"frameworks": [], "frameworks": [],
"minimumSystemVersion": "", "minimumSystemVersion": "",
"useBootstrapper": false,
"exceptionDomain": "", "exceptionDomain": "",
"signingIdentity": null, "signingIdentity": null,
"entitlements": null "entitlements": null

@ -21,7 +21,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.menu?.focusFirstItem("mouse");
this.menuTrigger.openMenu(); this.menuTrigger.openMenu();
this.changeDetector.markForCheck(); this.changeDetector.markForCheck();
} }

@ -23,11 +23,11 @@ export class AddRepositoryDialogComponent {
public async checkLocalRepoExists() { public async checkLocalRepoExists() {
this.repositoryForm.localRepoExists = await this.repoService.checkLocalRepositoryExists( this.repositoryForm.localRepoExists = await this.repoService.checkLocalRepositoryExists(
this.repositoryForm.formGroup.value.path); this.repositoryForm.formGroup.value.path as unknown as string);
} }
public async initLocalRepository() { public async initLocalRepository() {
const path = this.repositoryForm.formGroup.value.path; const path = this.repositoryForm.formGroup.value.path as unknown as string;
try { try {
await this.repoService.initRepository(path); await this.repoService.initRepository(path);
} catch (err: any) { } catch (err: any) {
@ -37,7 +37,7 @@ export class AddRepositoryDialogComponent {
} }
public async addRepository() { public async addRepository() {
let { name, repositoryType, path, address } = this.repositoryForm.formGroup.value; let { name, repositoryType, path, address } = this.repositoryForm.formGroup.value as unknown as any;
path = repositoryType === "local" ? path : undefined; path = repositoryType === "local" ? path : undefined;
address = repositoryType === "remote" ? address : undefined; address = repositoryType === "remote" ? address : undefined;
try { try {

@ -1,14 +1,15 @@
import {downloadDir} from "@tauri-apps/api/path"; import { downloadDir } from "@tauri-apps/api/path";
import {dialog} from "@tauri-apps/api"; import { dialog } from "@tauri-apps/api";
import {File} from "../../../api/models/File"; import type { File } from "../../../api/models/File";
export class FileHelper { export class FileHelper {
/** /**
* Opens a dialog to get a download location for the given file * Opens a dialog to get a download location for the given file
* @param {File} file * @param {File} file
*/ */
public static async getFileDownloadLocation(file: File): Promise<string | undefined> { public static async getFileDownloadLocation(
file: File,
): Promise<string | null> {
let extension = FileHelper.getExtensionForMime(file.mimeType); let extension = FileHelper.getExtensionForMime(file.mimeType);
const downloadDirectory = await downloadDir(); const downloadDirectory = await downloadDir();
@ -16,10 +17,13 @@ export class FileHelper {
return await dialog.save({ return await dialog.save({
defaultPath: suggestionPath, defaultPath: suggestionPath,
filters: [{ filters: [
{
name: file.mimeType, name: file.mimeType,
extensions: [extension ?? "*"] extensions: [extension ?? "*"],
}, { name: "All", extensions: ["*"] }] },
{ name: "All", extensions: ["*"] },
],
}); });
} }
@ -28,7 +32,9 @@ export class FileHelper {
* @param {string | undefined} mimeType * @param {string | undefined} mimeType
* @returns {[string, string] | undefined} * @returns {[string, string] | undefined}
*/ */
public static parseMime(mimeType: string | undefined): [string, string] | undefined { public static parseMime(
mimeType: string | undefined,
): [string, string] | undefined {
if (!mimeType) { if (!mimeType) {
return undefined; return undefined;
} }

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save