Add review page

This commit is contained in:
Rūdolfs Ošiņš
2025-02-18 12:06:03 -06:00
parent a918981ea7
commit 4add00d682
20 changed files with 736 additions and 271 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ tauri-build = { version = "2.0.1", features = ["isolation"] }
anyhow = { version = "1.0.90" }
base64 = { version = "0.22.1" }
log = { version = "0.4.22" }
radicle = { version = "0.14.0" }
radicle = { git = "https://ash.radicle.garden/z3gqcJUoA1n9HaHKufZs5FCSGazv5.git", package = "radicle", rev = "7c902b6905724345ba850eb6cca8f8becc9a9c72" }
radicle-types = { version = "0.1.0", path = "../radicle-types" }
radicle-surf = { version = "0.22.1", features = ["serde"] }
serde = { version = "1.0.210", features = ["derive"] }
+1 -1
View File
@@ -11,7 +11,7 @@ localtime = { version = "1.3.1" }
log = { version = "0.4.22" }
infer = { version = "0.3" }
mime-infer = { version = "3.0.0" }
radicle = { version = "0.14.0", features = ["test"] }
radicle = { git = "https://ash.radicle.garden/z3gqcJUoA1n9HaHKufZs5FCSGazv5.git", package = "radicle", rev = "7c902b6905724345ba850eb6cca8f8becc9a9c72", features = ["test"] }
radicle-surf = { version = "0.22.1", features = ["serde"] }
serde = { version = "1.0.210", features = ["derive"] }
serde_json = { version = "1.0.132" }
@@ -11,4 +11,5 @@ export type Review = {
summary?: string;
comments: Array<Comment<CodeLocation>>;
timestamp: number;
labels: Array<string>;
};
@@ -253,6 +253,8 @@ pub struct Review {
comments: Vec<cobs::thread::Comment<cobs::thread::CodeLocation>>,
#[ts(type = "number")]
timestamp: cob::common::Timestamp,
#[ts(as = "Vec<String>")]
labels: Vec<cob::Label>,
}
impl Review {
@@ -262,6 +264,7 @@ impl Review {
author: cobs::Author::new(&review.author().id, aliases),
verdict: review.verdict().map(|v| v.into()),
summary: review.summary().map(|s| s.to_string()),
labels: review.labels().cloned().collect::<Vec<_>>(),
comments: review
.comments()
.map(|(id, c)| {
+1 -1
View File
@@ -10,7 +10,7 @@ anyhow = { version = "1.0.90" }
axum = { version = "0.7.5", default-features = false, features = ["json", "query", "tokio", "http1"] }
hyper = { version = "1.4", default-features = false }
lexopt = { version = "0.3.0" }
radicle = { version = "0.14.0" }
radicle = { git = "https://ash.radicle.garden/z3gqcJUoA1n9HaHKufZs5FCSGazv5.git", package = "radicle", rev = "7c902b6905724345ba850eb6cca8f8becc9a9c72" }
radicle-surf = { version = "0.22.1", default-features = false, features = ["serde"] }
radicle-types = { path = "../radicle-types" }
serde = { version = "1", features = ["derive"] }