platform::timeline

This commit is contained in:
Martin Kavík 2024-06-06 22:04:57 +02:00
parent c0de520811
commit 6e85b7fa35
16 changed files with 157 additions and 217 deletions

View file

@ -9,3 +9,10 @@ publish.workspace = true
[dependencies]
wellen.workspace = true
moonlight.workspace = true
# @TODO update `futures_util_ext` - add feature `sink`, set exact `futures-util` version
futures-util = { version = "0.3.30", features = ["sink"] }
[features]
frontend = ["moonlight/frontend"]
backend = ["moonlight/backend"]

View file

@ -1 +1,25 @@
use moonlight::*;
pub mod wellen_helpers;
#[derive(Serialize, Deserialize, Debug)]
#[serde(crate = "serde")]
pub struct Timeline {
pub blocks: Vec<TimelineBlock>
}
#[derive(Serialize, Deserialize, Debug)]
#[serde(crate = "serde")]
pub struct TimelineBlock {
pub x: u32,
pub width: u32,
pub label: Option<TimeLineBlockLabel>,
}
#[derive(Serialize, Deserialize, Debug)]
#[serde(crate = "serde")]
pub struct TimeLineBlockLabel {
pub text: String,
pub x: u32,
pub y: u32,
}