app: open a clip view from a card and after an export
The grid answers what was exported; the view answers this one clip. It plays the file muted and looping, with a transport under it, and a panel on the right for the title and the share. The title is the file's name, because a file is the only place a clip keeps one: saving renames it, the miniature follows, and the grid shows the new name. Share puts the file itself on the clipboard, so pasting it into a chat attaches the video. The card's share button does the same now, and an export that finishes opens the view it produced.
This commit is contained in:
1 parent
146256714b
commit
9ce2b75568
8 files changed
+491
-13
No files matched your search
@@ -12,6 +12,13 @@ pub fn clock(secs: f64) -> String {
|
||||
format!("{}:{:02}", total / 60, total % 60)
|
||||
}
|
||||
|
||||
/// How long ago an exported file's stamp was: `2 hours ago`. A stamp that could not be read
|
||||
/// reads `earlier`.
|
||||
pub fn age(at: Option<std::time::SystemTime>) -> String {
|
||||
at.map(|at| relative_time(at.into()))
|
||||
.unwrap_or_else(|| "earlier".to_string())
|
||||
}
|
||||
|
||||
pub fn relative_time(when: DateTime<Utc>) -> String {
|
||||
let now = Utc::now();
|
||||
let delta = now.signed_duration_since(when);
|
||||
|
||||
Reference in new issue
Block a user