Skip to content

Commit

Permalink
feat: Add created_time_utc field to LibraryItem and update index.html…
Browse files Browse the repository at this point in the history
… table layout
  • Loading branch information
rgwood committed Sep 22, 2024
1 parent 88c6a9a commit 2176411
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions reitunes-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ impl Library {
let item = LibraryItem {
id: event.aggregate_id,
name: name.clone(),
created_time_utc: event.created_time_utc,
file_path: file_path.clone(),
artist: String::new(),
album: String::new(),
Expand Down Expand Up @@ -354,6 +355,7 @@ pub enum Event {
pub struct LibraryItem {
pub id: Uuid,
pub name: String,
pub created_time_utc: DateTime,
pub file_path: String,
pub artist: String,
pub album: String,
Expand Down
10 changes: 6 additions & 4 deletions reitunes-rs/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,14 @@
columns: [
{ title: "Name", field: "name", editor: "input", width: "30%" },
{ title: "Artist", field: "artist", editor: "input", width: "20%" },
{ title: "Album", field: "album", editor: "input", width: "20%" },
{ title: "Play Count", field: "play_count", width: "15%", sorter: "number" },
{ title: "Bookmarks", field: "bookmarks", formatter: bookmarkFormatter, width: "15%" }
{ title: "Album", field: "album", editor: "input", width: "10%" },
{ title: "Play Count", field: "play_count", sorter: "number" },
{ title: "Bookmarks", field: "bookmarks", formatter: bookmarkFormatter, width: "15%" },
{ title: "Created At (UTC)", field: "created_time_utc" },

],
initialSort: [
{ column: "play_count", dir: "desc" }
{ column: "created_time_utc", dir: "desc" }
],
});

Expand Down

0 comments on commit 2176411

Please sign in to comment.