mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-05-19 13:55:40 -04:00
Merge with main
This commit is contained in:
37
.vscode/i18n-ally-reviews.yml
vendored
37
.vscode/i18n-ally-reviews.yml
vendored
@@ -12,6 +12,13 @@ reviews:
|
||||
type: approve
|
||||
comment: 疑似翻译腔。这个地方不太好译。
|
||||
time: '2024-04-16T02:03:55.931Z'
|
||||
- user:
|
||||
name: Lkhsss
|
||||
email: 89461157+Lkhsss@users.noreply.github.com
|
||||
id: q2RWeijQlSW9n8OkzwnqK
|
||||
type: request_change
|
||||
comment: 我来
|
||||
time: '2024-08-11T01:47:24.517Z'
|
||||
all_jobs_have_been_cleared:
|
||||
locales:
|
||||
zh-CN:
|
||||
@@ -23,6 +30,13 @@ reviews:
|
||||
type: comment
|
||||
comment: 要不要把“清除”改为“完成”?
|
||||
time: '2024-04-16T10:56:22.929Z'
|
||||
- user:
|
||||
name: Lkhsss
|
||||
email: 89461157+Lkhsss@users.noreply.github.com
|
||||
id: GhuW9AvY_ZO-TiwjLKlEi
|
||||
type: approve
|
||||
comment: 确实
|
||||
time: '2024-08-11T01:54:48.602Z'
|
||||
archive_info:
|
||||
locales:
|
||||
zh-CN:
|
||||
@@ -127,3 +141,26 @@ reviews:
|
||||
type: request_change
|
||||
comment: ''
|
||||
time: '2024-07-16T18:02:10.188Z'
|
||||
alpha_release_description:
|
||||
locales:
|
||||
zh-CN:
|
||||
comments:
|
||||
- user:
|
||||
name: Lkhsss
|
||||
email: 89461157+Lkhsss@users.noreply.github.com
|
||||
id: tYCDVVyNv_eUVpMQJifHm
|
||||
type: request_change
|
||||
comment: 最后的“有助于极大增强用户体验”很拗口,直接删减法改为“有助于提升用户体验”
|
||||
time: '2024-08-11T01:57:47.644Z'
|
||||
collection:
|
||||
locales:
|
||||
zh-CN:
|
||||
comments:
|
||||
- user:
|
||||
name: Lkhsss
|
||||
email: 89461157+Lkhsss@users.noreply.github.com
|
||||
id: d4GmnxySaJIsAY8vVYY1B
|
||||
type: approve
|
||||
comment: 这玩意是什么文件类型?
|
||||
time: '2024-08-11T02:13:46.747Z'
|
||||
resolved: true
|
||||
|
||||
BIN
Cargo.lock
generated
BIN
Cargo.lock
generated
Binary file not shown.
@@ -1,57 +1,54 @@
|
||||
[package]
|
||||
name = "sd-desktop"
|
||||
name = "sd-desktop"
|
||||
version = "0.4.1"
|
||||
|
||||
authors = ["Spacedrive Technology Inc <support@spacedrive.com>"]
|
||||
default-run = "sd-desktop"
|
||||
description = "The universal file manager."
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
authors = ["Spacedrive Technology Inc <support@spacedrive.com>"]
|
||||
default-run = "sd-desktop"
|
||||
description = "The universal file manager."
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
|
||||
[dependencies]
|
||||
# Spacedrive Sub-crates
|
||||
sd-core = { path = "../../../core", features = ["ffmpeg", "heif"] }
|
||||
sd-fda = { path = "../../../crates/fda" }
|
||||
sd-core = { path = "../../../core", features = ["ffmpeg", "heif"] }
|
||||
sd-fda = { path = "../../../crates/fda" }
|
||||
sd-prisma = { path = "../../../crates/prisma" }
|
||||
|
||||
# Workspace dependencies
|
||||
axum = { workspace = true, features = ["headers", "query"] }
|
||||
directories = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
http = { workspace = true }
|
||||
hyper = { workspace = true }
|
||||
axum = { workspace = true, features = ["headers", "query"] }
|
||||
directories = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
http = { workspace = true }
|
||||
hyper = { workspace = true }
|
||||
prisma-client-rust = { workspace = true }
|
||||
rand = { workspace = true }
|
||||
rspc = { workspace = true, features = ["tauri", "tracing"] }
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
specta = { workspace = true }
|
||||
specta-typescript = { workspace = true }
|
||||
strum = { workspace = true, features = ["derive"] }
|
||||
thiserror = { workspace = true }
|
||||
tokio = { workspace = true, features = ["sync"] }
|
||||
tracing = { workspace = true }
|
||||
uuid = { workspace = true, features = ["serde"] }
|
||||
rand = { workspace = true }
|
||||
rspc = { workspace = true, features = ["tauri", "tracing"] }
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
specta = { workspace = true }
|
||||
specta-typescript = { workspace = true }
|
||||
strum = { workspace = true, features = ["derive"] }
|
||||
thiserror = { workspace = true }
|
||||
tokio = { workspace = true, features = ["sync"] }
|
||||
tracing = { workspace = true }
|
||||
uuid = { workspace = true, features = ["serde"] }
|
||||
|
||||
# Specific Desktop dependencies
|
||||
# WARNING: Do NOT enable default features, as that vendors dbus (see below)
|
||||
opener = { version = "0.7.1", features = ["reveal"], default-features = false }
|
||||
tauri = { version = "=2.0.0-rc.2", features = [
|
||||
"linux-libxdo",
|
||||
"macos-private-api",
|
||||
"unstable",
|
||||
] }
|
||||
tauri-plugin-dialog = "=2.0.0-rc.0"
|
||||
tauri-plugin-os = "=2.0.0-rc.0"
|
||||
tauri-plugin-shell = "=2.0.0-rc.0"
|
||||
opener = { version = "0.7.1", features = ["reveal"], default-features = false }
|
||||
tauri = { version = "=2.0.0-rc.2", features = ["linux-libxdo", "macos-private-api", "unstable"] }
|
||||
tauri-plugin-dialog = "=2.0.0-rc.0"
|
||||
tauri-plugin-os = "=2.0.0-rc.0"
|
||||
tauri-plugin-shell = "=2.0.0-rc.0"
|
||||
tauri-plugin-updater = "=2.0.0-rc.0"
|
||||
tauri-runtime = { version = "=2.0.0-rc.2" }
|
||||
tauri-specta = { git = "https://github.com/spacedriveapp/tauri-specta", rev = "6069a05029", features = [
|
||||
"derive",
|
||||
"typescript",
|
||||
] }
|
||||
tauri-utils = { version = "=2.0.0-rc.2" }
|
||||
tauri-runtime = { version = "=2.0.0-rc.2" }
|
||||
tauri-utils = { version = "=2.0.0-rc.2" }
|
||||
|
||||
[dependencies.tauri-specta]
|
||||
features = ["derive", "typescript"]
|
||||
git = "https://github.com/spacedriveapp/tauri-specta"
|
||||
rev = "6069a05029"
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
# Spacedrive Sub-crates
|
||||
@@ -76,7 +73,7 @@ sd-desktop-windows = { path = "../crates/windows" }
|
||||
tauri-build = "=2.0.0-rc.2"
|
||||
|
||||
[features]
|
||||
ai-models = ["sd-core/ai"]
|
||||
ai-models = ["sd-core/ai"]
|
||||
custom-protocol = ["tauri/custom-protocol"]
|
||||
default = ["custom-protocol"]
|
||||
devtools = ["tauri/devtools"]
|
||||
default = ["custom-protocol"]
|
||||
devtools = ["tauri/devtools"]
|
||||
|
||||
109
core/Cargo.toml
109
core/Cargo.toml
@@ -1,13 +1,12 @@
|
||||
[package]
|
||||
name = "sd-core"
|
||||
version = "0.4.1"
|
||||
|
||||
authors = ["Spacedrive Technology Inc <support@spacedrive.com>"]
|
||||
description = "Virtual distributed filesystem engine that powers Spacedrive."
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
rust-version.workspace = true
|
||||
authors = ["Spacedrive Technology Inc <support@spacedrive.com>"]
|
||||
description = "Virtual distributed filesystem engine that powers Spacedrive."
|
||||
edition = { workspace = true }
|
||||
license = { workspace = true }
|
||||
name = "sd-core"
|
||||
repository = { workspace = true }
|
||||
rust-version = "1.78"
|
||||
version = "0.4.1"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
@@ -46,56 +45,54 @@ sd-task-system = { path = "../crates/task-system" }
|
||||
sd-utils = { path = "../crates/utils" }
|
||||
|
||||
# Workspace dependencies
|
||||
async-channel = { workspace = true }
|
||||
async-stream = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
axum = { workspace = true, features = ["ws"] }
|
||||
base64 = { workspace = true }
|
||||
base91 = { workspace = true }
|
||||
blake3 = { workspace = true }
|
||||
chrono = { workspace = true, features = ["serde"] }
|
||||
directories = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
async-channel = { workspace = true }
|
||||
async-stream = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
axum = { workspace = true, features = ["ws"] }
|
||||
base64 = { workspace = true }
|
||||
base91 = { workspace = true }
|
||||
blake3 = { workspace = true }
|
||||
chrono = { workspace = true, features = ["serde"] }
|
||||
directories = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
futures-concurrency = { workspace = true }
|
||||
gix-ignore = { workspace = true }
|
||||
hyper = { workspace = true, features = ["client", "http1", "server"] }
|
||||
image = { workspace = true }
|
||||
itertools = { workspace = true }
|
||||
libc = { workspace = true }
|
||||
normpath = { workspace = true, features = ["localization"] }
|
||||
once_cell = { workspace = true }
|
||||
pin-project-lite = { workspace = true }
|
||||
prisma-client-rust = { workspace = true, features = ["rspc"] }
|
||||
regex = { workspace = true }
|
||||
reqwest = { workspace = true, features = ["json", "native-tls-vendored"] }
|
||||
rmp = { workspace = true }
|
||||
rmp-serde = { workspace = true }
|
||||
rmpv = { workspace = true }
|
||||
rspc = { workspace = true, features = ["alpha", "axum", "chrono", "tracing", "unstable", "uuid"] }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json = { workspace = true }
|
||||
specta = { workspace = true }
|
||||
static_assertions = { workspace = true }
|
||||
strum = { workspace = true, features = ["derive"] }
|
||||
strum_macros = { workspace = true }
|
||||
tempfile = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
tokio = { workspace = true, features = [
|
||||
"io-util",
|
||||
"macros",
|
||||
"process",
|
||||
"rt-multi-thread",
|
||||
"sync",
|
||||
"time"
|
||||
] }
|
||||
tokio-stream = { workspace = true, features = ["fs"] }
|
||||
tokio-util = { workspace = true, features = ["io"] }
|
||||
tracing = { workspace = true }
|
||||
tracing-subscriber = { workspace = true, features = ["env-filter"] }
|
||||
uuid = { workspace = true, features = ["serde", "std", "v4", "v7"] }
|
||||
webp = { workspace = true }
|
||||
gix-ignore = { workspace = true }
|
||||
hyper = { workspace = true, features = ["client", "http1", "server"] }
|
||||
image = { workspace = true }
|
||||
itertools = { workspace = true }
|
||||
libc = { workspace = true }
|
||||
normpath = { workspace = true, features = ["localization"] }
|
||||
once_cell = { workspace = true }
|
||||
pin-project-lite = { workspace = true }
|
||||
prisma-client-rust = { workspace = true, features = ["rspc"] }
|
||||
regex = { workspace = true }
|
||||
reqwest = { workspace = true, features = ["json", "native-tls-vendored"] }
|
||||
rmp = { workspace = true }
|
||||
rmp-serde = { workspace = true }
|
||||
rmpv = { workspace = true }
|
||||
rspc = { workspace = true, features = ["alpha", "axum", "chrono", "tracing", "unstable", "uuid"] }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json = { workspace = true }
|
||||
specta = { workspace = true }
|
||||
static_assertions = { workspace = true }
|
||||
strum = { workspace = true, features = ["derive"] }
|
||||
strum_macros = { workspace = true }
|
||||
tempfile = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
tokio-stream = { workspace = true, features = ["fs"] }
|
||||
tokio-util = { workspace = true, features = ["io"] }
|
||||
tracing = { workspace = true }
|
||||
tracing-subscriber = { workspace = true, features = ["env-filter"] }
|
||||
uuid = { workspace = true, features = ["serde", "std", "v4", "v7"] }
|
||||
webp = { workspace = true }
|
||||
|
||||
[dependencies.tokio]
|
||||
features = ["io-util", "macros", "process", "rt-multi-thread", "sync", "time"]
|
||||
workspace = true
|
||||
|
||||
# Specific Core dependencies
|
||||
async-recursion = "1.1"
|
||||
async-stream = "0.3.5"
|
||||
bytes = "1.6"
|
||||
ctor = "0.2.8"
|
||||
flate2 = "1.0"
|
||||
|
||||
@@ -76,8 +76,8 @@ pub(crate) fn mount() -> AlphaRouter<Ctx> {
|
||||
// Reports provides the client with a list of JobReports
|
||||
// - we query with a custom select! to avoid returning paused job cache `job.data`
|
||||
// - results must include running jobs, and be combined with the in-memory state
|
||||
// this is to ensure the client will always get the correct initial state
|
||||
// - jobs are sorted in to groups by their action
|
||||
// this is to ensure the client will always get the correct initial state
|
||||
// - jobs are sorted into groups by their action
|
||||
// - TODO: refactor grouping system to a many-to-many table
|
||||
#[derive(Debug, Clone, Serialize, Type)]
|
||||
pub struct JobGroup {
|
||||
@@ -91,6 +91,15 @@ pub(crate) fn mount() -> AlphaRouter<Ctx> {
|
||||
|
||||
R.with2(library())
|
||||
.query(|(node, library), _: ()| async move {
|
||||
// Check if the job system is active
|
||||
let is_active = node
|
||||
.job_system
|
||||
.has_active_jobs(NodeContext {
|
||||
node: Arc::clone(&node),
|
||||
library: library.clone(),
|
||||
})
|
||||
.await || node.old_jobs.has_active_workers(library.id).await;
|
||||
|
||||
let mut groups: HashMap<String, JobGroup> = HashMap::new();
|
||||
|
||||
let job_reports: Vec<Report> = library
|
||||
@@ -106,7 +115,7 @@ pub(crate) fn mount() -> AlphaRouter<Ctx> {
|
||||
if let Ok(report) = Report::try_from(job.clone()) {
|
||||
Some(report)
|
||||
} else {
|
||||
// TODO(fogodev): this is a temporary fix for the old job system
|
||||
// TODO: this is a temporary fix for the old job system
|
||||
OldJobReport::try_from(job).map(Into::into).ok()
|
||||
}
|
||||
})
|
||||
@@ -122,6 +131,11 @@ pub(crate) fn mount() -> AlphaRouter<Ctx> {
|
||||
);
|
||||
|
||||
for job in job_reports {
|
||||
// Skip running jobs if the job system is not active. Temporary fix
|
||||
if !is_active && job.status == report::Status::Running {
|
||||
continue;
|
||||
}
|
||||
|
||||
// action name and group key are computed from the job data
|
||||
let (action_name, group_key) = job.get_action_name_and_group_key();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "sd-crypto"
|
||||
version = "0.0.0"
|
||||
version = "0.0.1"
|
||||
|
||||
authors = ["Ericson Soares <ericson@spacedrive.com>", "Jake Robinson <jake@spacedrive.com>"]
|
||||
description = """
|
||||
@@ -34,20 +34,15 @@ hex = "0.4.3"
|
||||
rand = "0.9.0-alpha.2"
|
||||
rand_chacha = "0.9.0-alpha.2"
|
||||
rand_core = "0.9.0-alpha.2"
|
||||
serde-big-array = { version = "0.5.1" }
|
||||
serdect = { version = "0.3.0-pre.0" }
|
||||
serde-big-array = "0.5.1"
|
||||
serdect = "0.3.0-pre.0"
|
||||
typenum = "1.17.0"
|
||||
zeroize = { version = "1.7.0", features = ["aarch64", "derive"] }
|
||||
|
||||
|
||||
|
||||
[dev-dependencies]
|
||||
paste = "1.0.14"
|
||||
tempfile = "3.10.1"
|
||||
|
||||
|
||||
|
||||
paste = "1.0.14"
|
||||
tempfile = "3.10.1"
|
||||
|
||||
[[example]]
|
||||
path = "examples/secure_erase.rs"
|
||||
name = "secure_erase"
|
||||
path = "examples/secure_erase.rs"
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
name = "sd-utils"
|
||||
version = "0.1.0"
|
||||
|
||||
edition = "2021"
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
# Spacedrive Sub-crates
|
||||
@@ -12,5 +15,5 @@ sd-prisma = { path = "../prisma" }
|
||||
prisma-client-rust = { workspace = true }
|
||||
rspc = { workspace = true, features = ["unstable"] }
|
||||
thiserror = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
BIN
pnpm-lock.yaml
generated
BIN
pnpm-lock.yaml
generated
Binary file not shown.
Reference in New Issue
Block a user