Show reference-data update time, location filter UI, and tile fixes
- Status gains reference_updated_at (sourced from reference.db's file mtime, so it needs no separate persisted state) and the sidebar's "Your library" panel shows it as a relative "Updated Xh ago" stamp that self-refreshes every minute. - Add a Location field to the Library tab's filters panel, wired to the new LibraryFilter.location. - Bump every font-size in the stylesheet up one step for a slightly larger, easier-to-read UI overall. - Fix the library/deck tile view's +/- quantity overlay permanently covering the card art's own printed mana cost (top-right corner) — it now only fades in on hover/focus, like the other row actions. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -21,14 +21,23 @@ pub struct Status {
|
||||
pub reference_path: String,
|
||||
pub reference_ready: bool,
|
||||
pub card_count: usize,
|
||||
/// Unix timestamp (seconds) of reference.db's last modification — i.e.
|
||||
/// when "Update card data" last completed. `None` if unavailable.
|
||||
pub reference_updated_at: Option<i64>,
|
||||
}
|
||||
|
||||
fn status_of(s: &AppState) -> Status {
|
||||
let reference_updated_at = std::fs::metadata(&s.reference_path)
|
||||
.and_then(|m| m.modified())
|
||||
.ok()
|
||||
.and_then(|t| t.duration_since(std::time::UNIX_EPOCH).ok())
|
||||
.map(|d| d.as_secs() as i64);
|
||||
Status {
|
||||
library_path: s.library_path.display().to_string(),
|
||||
reference_path: s.reference_path.display().to_string(),
|
||||
reference_ready: s.catalog.is_some(),
|
||||
card_count: s.index.as_ref().map(|i| i.len()).unwrap_or(0),
|
||||
reference_updated_at,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user