app: open the clips grid

The clips screen lists the clips folder: one card per mp4 the user
exported, newest first, with the clip's 16:9 stage, the champion it
stars when its recording is in the loaded history, share, and a menu
whose Delete removes the file. The folder read runs when the screen
opens, and again when an export finishes on it.

Computed highlights were the first plan for the grid, but a real
history parses hundreds of timelines and some run to tens of MB, so
the grid now reads only what the user actually exported.
This commit is contained in:
vhaudiquet committed 2026-11-22 18:36:00 +01:00
1 parent fac1ec00da
commit 3f82f87a81
9 files changed
+577 -9

No files matched your search

+4 -2
View File
@@ -26,6 +26,8 @@ cargo run -- --snap settings.png --scene settings
cargo run -- --snap recording.png --scene recording
cargo run -- --snap audio.png --scene audio
cargo run -- --snap review.png --scene review
cargo run -- --snap clips.png --scene clips
cargo run -- --snap clips-many.png --scene clips-many --at 1 # 36 demo clips, to see the scrollbar
cargo run -- --snap many.png --scene many --at 1 # 60 sample games, to see the scrollbar
```
@@ -64,10 +66,10 @@ reading (`history::tests`), highlight clipping (`highlight::tests`) and formatti
| `src/history.rs` | Timelines from disk and the values the cards show |
| `src/portraits.rs` | Champion portraits: the Data Dragon cache and its downloads |
| `src/highlight.rs` | Highlight clips from kill events |
| `src/export.rs` | ffmpeg clip export |
| `src/export.rs` | ffmpeg clip export, and the clips folder it fills |
| `src/os.rs` | Run key, toasts, tray icon and menu |
| `src/ui.rs` | Colours, cards, switches, sliders, buttons |
| `src/screens/` | Settings, match history, game review |
| `src/screens/` | Settings, match history, clips, game review |
## Where this stands against TODO.txt
+100 -6
View File
@@ -7,7 +7,7 @@ use std::time::Duration;
use rune::tok::type_;
use rune::{Cx, El, Key, KeyEvent, Tx, col, el, row, text};
use crate::export;
use crate::export::{self, Clip};
use crate::history::{self, QueueCategory, Summary, Timeline};
use crate::ipc::{self, Daemon};
use crate::os;
@@ -21,6 +21,7 @@ use crate::ui::{self, Paint, body, heading};
pub enum Screen {
Settings,
History,
Clips,
Review,
}
@@ -138,6 +139,13 @@ pub struct App {
/// The card whose actions menu is open, if any. The card's position, not its recording:
/// demo data repeats ids across rows, and a menu opens for one card alone.
pub menu_open: Option<usize>,
/// Every clip the user exported, newest first. Read when the screen opens.
pub clips: Vec<Clip>,
pub clips_loaded: bool,
/// The clip card whose actions menu is open, if any: its position, like the history's.
pub clips_menu_open: Option<usize>,
/// The clip the delete dialog is about, by its `id@start` key.
pub confirm_clip_delete: Option<String>,
pub review: screens::review::Review,
pub portraits: Option<portraits::Portraits>,
/// The icons of the processes the audio sources name, decoded from their executables.
@@ -148,6 +156,7 @@ pub struct App {
/// When the process table was last read, in the clock `poll` gets.
pub processes_at: f64,
pub scroll: ui::ScrollBar,
pub clips_scroll: ui::ScrollBar,
pub highlights_scroll: ui::ScrollBar,
pub events_scroll: ui::ScrollBar,
pub notice: Option<Notice>,
@@ -190,6 +199,10 @@ impl App {
filter: None,
confirm_delete: None,
menu_open: None,
clips: Vec::new(),
clips_loaded: false,
clips_menu_open: None,
confirm_clip_delete: None,
review: screens::review::Review::default(),
portraits: None,
icons: None,
@@ -197,6 +210,7 @@ impl App {
processes_rx: None,
processes_at: 0.0,
scroll: ui::ScrollBar::new(),
clips_scroll: ui::ScrollBar::new(),
highlights_scroll: ui::ScrollBar::new(),
events_scroll: ui::ScrollBar::new(),
notice: None,
@@ -231,6 +245,21 @@ impl App {
}
/// State for `--scene` snapshots: sample history, a connected daemon, default settings.
/// A demo clip like one the export writes: a name, an export time, a size.
pub fn demo_clip(name: String, hours_ago: i64, bytes: u64) -> Clip {
Clip {
name,
path: PathBuf::new(),
exported: Some(
std::time::SystemTime::now()
- chrono::Duration::hours(hours_ago)
.to_std()
.unwrap_or_default(),
),
bytes,
}
}
pub fn demo(&mut self) {
self.connected = true;
self.status = Status {
@@ -239,11 +268,17 @@ impl App {
current_game_id: None,
client_connected: true,
};
self.games = history::sample()
.iter()
.map(|game| game.summary())
.collect();
let sample = history::sample();
self.games = sample.iter().map(|game| game.summary()).collect();
self.games_loaded = true;
let id = |game: &Timeline| game.recording_id.clone();
self.clips = vec![
Self::demo_clip(format!("{}-clip", id(&sample[0])), 3, 22_000_000),
Self::demo_clip("baron-steal".into(), 5, 9_400_000),
Self::demo_clip(format!("{}-clip", id(&sample[1])), 26, 15_800_000),
Self::demo_clip("pentakill".into(), 74, 31_200_000),
];
self.clips_loaded = true;
self.devices = AudioDevices {
input_devices: vec![AudioDevice {
id: "mic-1".into(),
@@ -439,6 +474,12 @@ impl App {
self.games_rx = Some(rx);
}
/// Read the clips folder into the grid. A directory read, quick enough for the UI thread.
pub fn refresh_clips(&mut self) {
self.clips = export::list_clips();
self.clips_loaded = true;
}
/// Read the next page of rows, if the list has one and none is already on its way.
///
/// Called from `poll` while the history list is scrolled near its end, and while the
@@ -713,6 +754,12 @@ impl App {
}
}
// The clips grid reads the clips folder, so it loads once it is on screen, not at launch.
if self.screen == Screen::Clips && !self.clips_loaded {
self.refresh_clips();
changed = true;
}
// Taken out of the field so the notice helpers below can borrow the app.
if let Some(rx) = self.ffmpeg_rx.take() {
let mut finished = false;
@@ -849,14 +896,22 @@ pub fn on_key(app: &mut App, event: &KeyEvent, _tx: &mut Tx) -> bool {
match (&event.key, command) {
(Key::Text(t), false) if t == "1" => {
app.menu_open = None;
app.clips_menu_open = None;
app.screen = Screen::History;
true
}
(Key::Text(t), false) if t == "2" => {
app.menu_open = None;
app.clips_menu_open = None;
app.screen = Screen::Settings;
true
}
(Key::Text(t), false) if t == "3" => {
app.menu_open = None;
app.clips_menu_open = None;
app.screen = Screen::Clips;
true
}
(Key::Escape, _) if app.form.add_open => {
app.form.close_add();
true
@@ -865,6 +920,19 @@ pub fn on_key(app: &mut App, event: &KeyEvent, _tx: &mut Tx) -> bool {
app.confirm_delete = None;
true
}
(Key::Escape, _) if app.confirm_clip_delete.is_some() => {
app.confirm_clip_delete = None;
true
}
(Key::Escape, _) if app.clips_menu_open.is_some() => {
app.clips_menu_open = None;
true
}
(Key::Escape, _) if app.screen == Screen::Clips => {
app.menu_open = None;
app.screen = Screen::History;
true
}
(Key::Escape, _) if app.screen == Screen::Review => {
screens::review::leave(app);
app.screen = Screen::History;
@@ -948,7 +1016,10 @@ fn titlebar(p: Paint, app: &App) -> El {
// Leaving a screen is on the left, where a window's back arrow lives; the app's own
// actions stay on the right.
let mut leading = row().key("leading").gap(8.0).center_y();
if matches!(app.screen, Screen::Settings | Screen::Review) {
if matches!(
app.screen,
Screen::Settings | Screen::Clips | Screen::Review
) {
leading = leading.child(ui::button(
p,
"back",
@@ -972,6 +1043,20 @@ fn titlebar(p: Paint, app: &App) -> El {
// On the settings screen the title bar has nothing to offer: refreshing and opening
// settings again would only repeat what the screen already does.
if app.screen != Screen::Settings {
if app.screen != Screen::Clips {
actions = actions.child(ui::button(
p,
"open-clips",
"Clips",
false,
|app: &mut App| {
app.menu_open = None;
app.clips_menu_open = None;
screens::review::leave(app);
app.screen = Screen::Clips;
},
));
}
actions = actions
.child(ui::button(
p,
@@ -981,6 +1066,10 @@ fn titlebar(p: Paint, app: &App) -> El {
|app: &mut App| {
app.refresh_games();
app.daemon.get_status();
if app.screen == Screen::Clips {
app.clips_loaded = false;
app.refresh_clips();
}
},
))
.child(ui::button(
@@ -1049,6 +1138,7 @@ pub fn view(app: &App, cx: &mut Cx<App>) -> El {
let content = match app.screen {
Screen::Settings => screens::settings::view(app, p),
Screen::History => screens::history::view(app, p, &mut overlays),
Screen::Clips => screens::clips::view(app, p, &mut overlays),
Screen::Review => screens::review::view(app, p),
};
let mut main = col().key("main").grow(1.0).min_h(0.0).w_full().fill(p.t.bg);
@@ -1074,6 +1164,7 @@ pub fn view(app: &App, cx: &mut Cx<App>) -> El {
)
.child(app.events_scroll.thumb(p, "events-thumb", "event-scroller")),
Screen::Review => window,
Screen::Clips => window.child(app.clips_scroll.thumb(p, "clips-thumb", "clips-scroller")),
_ => window.child(app.scroll.thumb(
p,
"scroll-thumb",
@@ -1090,6 +1181,9 @@ pub fn view(app: &App, cx: &mut Cx<App>) -> El {
if app.confirm_delete.is_some() {
screens::history::delete_dialog(app, p, &mut overlays);
}
if app.confirm_clip_delete.is_some() {
screens::clips::delete_dialog(app, p, &mut overlays);
}
rune_kit::root(content, overlays)
}
+41
View File
@@ -13,8 +13,49 @@ use ffmpeg_sidecar::download::{
use ffmpeg_sidecar::event::{FfmpegEvent, LogLevel};
use ffmpeg_sidecar::paths::{sidecar_dir, sidecar_path};
use std::time::SystemTime;
use crate::daemon;
/// A clip the user exported: one file in the clips folder.
#[derive(Debug, Clone)]
pub struct Clip {
/// The file's name without `.mp4`, as the export named it: often `{recording}-clip`.
pub name: String,
/// The file, for playing it and for deleting it.
pub path: PathBuf,
/// When the export finished: the file's modified time.
pub exported: Option<SystemTime>,
/// Bytes on disk.
pub bytes: u64,
}
/// Every clip in the clips folder, newest export first. Only `.mp4` counts: the folder is
/// where a half-finished export writes too, and a clip without its pictures is no clip.
pub fn list_clips() -> Vec<Clip> {
let Ok(entries) = std::fs::read_dir(clips_dir()) else {
return Vec::new();
};
let mut clips: Vec<Clip> = entries
.flatten()
.filter_map(|entry| {
let path = entry.path();
if path.extension().and_then(|ext| ext.to_str()) != Some("mp4") {
return None;
}
let meta = entry.metadata().ok()?;
Some(Clip {
name: path.file_stem()?.to_string_lossy().into_owned(),
path: path.clone(),
exported: meta.modified().ok(),
bytes: meta.len(),
})
})
.collect();
clips.sort_by_key(|clip| std::cmp::Reverse(clip.exported));
clips
}
/// The clips folder beside the recordings.
pub fn clips_dir() -> PathBuf {
let dir = daemon::recordings_dir().join("clips");
+10
View File
@@ -79,6 +79,16 @@ pub fn gold_per_min(stats: &crate::history::Stats) -> String {
number(value.round() as u64)
}
/// A file size in round units: `14.2 MB`, or `812 kB` under a megabyte.
pub fn bytes(n: u64) -> String {
let mb = n as f64 / (1024.0 * 1024.0);
if mb >= 1.0 {
format!("{mb:.1} MB")
} else {
format!("{:.0} kB", n as f64 / 1024.0)
}
}
pub fn number(n: u64) -> String {
if n >= 1_000_000 {
format!("{:.1}M", n as f64 / 1_000_000.0)
+7
View File
@@ -43,6 +43,13 @@ pub static CHEVRON_RIGHT: Icon = Icon {
body: r#"<path d="M6 3.6 10.6 8 6 12.4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>"#,
};
/// A box with an arrow out of the top: the button that will share a clip.
pub static SHARE: Icon = Icon {
name: "app-share",
view: 16.0,
body: r#"<path d="M8 9.4V2.4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M5.3 4.7 8 2l2.7 2.7" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M5.7 6.9H4.8c-1 0-1.8.8-1.8 1.8v3.5c0 1 .8 1.8 1.8 1.8h6.4c1 0 1.8-.8 1.8-1.8V8.7c0-1-.8-1.8-1.8-1.8h-.9" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>"#,
};
/// Three vertical dots: the button that opens a card's menu of actions.
pub static DOTS: Icon = Icon {
name: "app-dots",
+26
View File
@@ -110,6 +110,32 @@ fn main() {
app::demo_review(app);
app.review.show_details = true;
}),
("clips-empty", |app| {
app.screen = app::Screen::Clips;
app.clips.clear();
app.clips_loaded = true;
}),
("clips", |app| {
app.screen = app::Screen::Clips;
app.clips_menu_open = None;
}),
("clips-many", |app| {
app.screen = app::Screen::Clips;
app.clips = (0..12)
.flat_map(|page| {
[
app::App::demo_clip(format!("page-{page}-clip"), page, 18_000_000),
app::App::demo_clip(format!("baron-{page}"), page, 8_400_000),
app::App::demo_clip(format!("drake-{page}"), page, 11_100_000),
]
})
.collect();
app.clips_loaded = true;
}),
("clips-delete", |app| {
app.screen = app::Screen::Clips;
app.confirm_clip_delete = app.clips.first().map(|clip| clip.name.clone());
}),
("many", |app| {
app.screen = app::Screen::History;
app.games = (0..30)
+383
View File
@@ -0,0 +1,383 @@
//! Clips: every clip the user has exported, newest first, in a grid of cards.
//!
//! A card is the clip file: its pictures as the main body once they load, and under it the
//! clip's name and, when the recording is in the loaded history, the champion it stars and
//! the game it came from. Share and the actions menu sit beside.
use rune::tok::{radius, space};
use rune::{Color, El, col, el, row, text};
use crate::app::App;
use crate::export::Clip;
use crate::format;
use crate::icons;
use crate::ui::{self, Paint, body, heading};
use rune_kit::{Kit, Menu, MenuItem, Placement};
/// Cards across, at the window's current width. Reflowing at other widths comes later.
const COLS: usize = 3;
pub fn view(app: &App, p: Paint, layer: &mut Vec<El>) -> El {
let kit = rune_kit::Kit::neutral(app.dark);
// The scroll bar gets its own strip at the end, clear of the cards.
let mut grid = col().key("clips-grid").w_full().gap(space::S3).pr(14.0);
if app.clips.is_empty() {
grid = grid.child(empty(
p,
"No clips yet",
"Export a clip from a recording's page and it lands here.",
));
} else {
for (row_index, row_clips) in app.clips.chunks(COLS).enumerate() {
let mut cards = row()
.key(format!("clips-row-{row_index}"))
.w_full()
.gap(space::S3)
.items_start();
for (cell, clip) in row_clips.iter().enumerate() {
let index = row_index * COLS + cell;
cards = cards.child(clip_card(app, p, &kit, layer, clip, index));
}
// Empty cells keep the row's cards at their column width.
for cell in row_clips.len()..COLS {
cards = cards.child(el().key(format!("filler-{row_index}-{cell}")).grow(1.0));
}
grid = grid.child(cards);
}
}
col()
.key("clips")
.w_full()
.h_full()
.padding(space::S6)
.gap(space::S3)
.child(
col()
.key("clips-title")
.gap(2.0)
.child(
text("Clips")
.key("title")
.font(heading(20.0))
.color(p.t.text),
)
.child(
text(count_label(app))
.key("count")
.font(body(11.5))
.color(p.muted()),
),
)
.child(
app.clips_scroll.follow(
"clips-scroller",
col()
.w_full()
.grow(1.0)
.min_h(0.0)
.scroll(rune::ScrollSpec {
stick_bottom: false,
})
.child(grid),
),
)
}
/// How many clips the grid holds and how much disk they take.
fn count_label(app: &App) -> String {
if app.clips.is_empty() {
return "No clips".to_string();
}
let bytes = app.clips.iter().map(|clip| clip.bytes).sum::<u64>();
format!("{} clips · {}", app.clips.len(), format::bytes(bytes))
}
fn empty(p: Paint, title: &str, detail: &str) -> El {
col()
.key("empty")
.w_full()
.py(64.0)
.gap(6.0)
.center()
.child(
text(title)
.key("empty-title")
.font(heading(15.0))
.color(p.t.text),
)
.child(
text(detail)
.key("empty-detail")
.font(body(12.0))
.color(p.muted()),
)
}
/// What a card says under its stage: its position, the title, the line under it, and the
/// champion it stars when its recording is in the loaded history.
struct Card {
index: usize,
title: String,
detail: String,
champion: Option<String>,
}
impl Card {
/// The card for one clip. The game the clip was cut from, when its recording is in the
/// loaded history, names the card; otherwise the file does. Export names carry the
/// recording's id somewhere in them, so a match is a contains check away.
fn of(app: &App, clip: &Clip, index: usize) -> Card {
let game = app
.games
.iter()
.find(|game| clip.name.contains(&game.recording_id));
let when = clip
.exported
.map(|at| format::relative_time(at.into()))
.unwrap_or_else(|| "earlier".to_string());
match game {
Some(game) => Card {
index,
title: game.champion().unwrap_or_else(|| clip.name.clone()),
detail: format!("{} · {}", game.queue_label(), when),
champion: game.champion(),
},
None => Card {
index,
title: clip.name.clone(),
detail: format!("{} · {}", format::bytes(clip.bytes), when),
champion: None,
},
}
}
}
fn clip_card(app: &App, p: Paint, k: &Kit, layer: &mut Vec<El>, clip: &Clip, index: usize) -> El {
let card = Card::of(app, clip, index);
el().key(format!("clip-{index}"))
.role("button")
.label(format!("Clip {}", clip.name))
.grow(1.0)
.min_w(0.0)
.radius(radius::LG)
.clip_rounded(radius::LG)
.fill(p.t.card)
.border(p.hair, p.t.card_border)
.shadow(1.0, 2.0, p.t.shadow)
.shadow(8.0, 24.0, p.t.shadow_soft)
.hover(p.t.hover)
.child(
col()
.key("card")
.w_full()
.child(stage(p, clip))
.child(footer(app, p, k, layer, clip, &card)),
)
}
/// The clip itself: the 16:9 box the card gives, on black, with the play mark over it. The
/// clip's own pictures land here later; the layout of the card is the same with or without.
fn stage(_p: Paint, _clip: &Clip) -> El {
col()
.key("stage")
.aspect_ratio(16.0 / 9.0)
.w_full()
.fill(Color::BLACK)
.child(
el().key("play-overlay")
.absolute(0.0, 0.0)
.w_full()
.h_full()
.center()
.a11y_hidden()
.child(
el().key("play")
.size(40.0, 40.0)
.radius(20.0)
.center()
.fill(Color::WHITE.alpha(0.16))
.child(
rune::icon(&icons::PLAY, 18.0)
.color(Color::WHITE.alpha(0.9))
.a11y_hidden(),
),
),
)
}
/// Who the clip stars and what game it came from, with share and the actions menu beside.
fn footer(app: &App, p: Paint, k: &Kit, layer: &mut Vec<El>, clip: &Clip, card: &Card) -> El {
let Card {
index,
title,
detail,
champion,
} = card;
let (index, title, champion) = (*index, title.as_str(), champion.as_deref());
row()
.key("footer")
.w_full()
.px(space::S3)
.py(space::S2)
.gap(space::S2)
.center_y()
.child(ui::champion_portrait(app, p, champion, 32.0))
.child(
col()
.key("labels")
.grow(1.0)
.min_w(0.0)
.gap(1.0)
.child(
text(title)
.key("title")
.font(heading(13.0))
.color(p.t.text)
.shrink()
.truncate(),
)
.child(
text(detail)
.key("game")
.font(body(11.0))
.color(p.muted())
.shrink()
.truncate(),
),
)
// Share has nothing behind it yet; the layout holds its place.
.child(ui::menu_button(
p,
format!("share-{index}"),
&icons::SHARE,
"Share clip",
|_app: &mut App| {},
))
.child(clip_menu(app, k, layer, p, clip, index))
}
/// The dots at the end of a card: the menu of actions a clip offers, `Delete` for now. The
/// menu is drawn over this window, so it stays inside it. Keyed by the card's position, like
/// the history rows, so rows stay distinct.
fn clip_menu(app: &App, k: &Kit, layer: &mut Vec<El>, p: Paint, clip: &Clip, index: usize) -> El {
let name = clip.name.clone();
Menu::new(format!("clips-menu-{index}"))
.trigger(ui::menu_button(
p,
format!("clips-menu-{index}"),
&icons::DOTS,
"Clip options",
move |app: &mut App| app.clips_menu_open = Some(index),
))
.placement(Placement::BottomEnd)
.open(app.clips_menu_open == Some(index))
.on_close(|app: &mut App| app.clips_menu_open = None)
.item(
MenuItem::new("Delete")
.danger(true)
.on_select(move |app: &mut App| {
app.clips_menu_open = None;
app.confirm_clip_delete = Some(name.clone());
}),
)
.build(k, layer)
}
/// The confirmation the menu's Delete opens: the clip leaves the grid, and the recording and
/// its files stay. `app::view` draws it over the whole window, title bar included.
pub fn delete_dialog(app: &App, p: Paint, layer: &mut Vec<El>) {
let panel = col()
.key("clip-delete-dialog")
.role("dialog")
.label("Delete this clip")
.w(380.0)
.padding(space::S6)
.gap(space::S3)
.radius(radius::LG)
.fill(p.t.card)
.border(p.hair, p.t.card_border)
.shadow(4.0, 12.0, p.t.shadow)
.shadow(24.0, 48.0, p.t.shadow_soft)
.modal(true, |app: &mut App| app.confirm_clip_delete = None)
.child(
text("Delete this clip?")
.key("delete-question")
.font(heading(15.0))
.color(p.t.text),
)
.child(
text(format!(
"\"{}.mp4\" is deleted from disk. The recording stays.",
delete_name(app)
))
.key("delete-note")
.font(body(12.0))
.color(p.muted()),
)
.child(
row()
.key("delete-actions")
.w_full()
.gap(space::S2)
.justify_end()
.child(ui::button(p, "delete-no", "No", false, |app: &mut App| {
app.confirm_clip_delete = None;
}))
.child(ui::button_danger(
p,
"delete-yes",
"Delete",
|app: &mut App| {
delete_confirmed(app);
},
)),
);
layer.push(
el().key("delete-scrim")
.absolute(0.0, 0.0)
.w_full()
.h_full()
.fill(Color::BLACK.alpha(if app.dark { 0.55 } else { 0.28 }))
.a11y_hidden(),
);
layer.push(
el().key("delete-layer")
.absolute(0.0, 0.0)
.w_full()
.h_full()
.padding(16.0)
.center()
.child(panel),
);
}
/// Yes on the dialog: the file goes, and the card with it. The recording keeps its files.
fn delete_confirmed(app: &mut App) {
let Some(name) = app.confirm_clip_delete.take() else {
return;
};
let Some(index) = app.clips.iter().position(|clip| clip.name == name) else {
return;
};
let clip = app.clips.remove(index);
match std::fs::remove_file(&clip.path) {
Ok(()) => app.notify("Clip deleted"),
Err(error) => {
app.notify(format!("Could not delete the clip: {error}"));
app.clips.insert(index, clip);
}
}
}
/// The clip the delete dialog is about, for the dialog's wording.
fn delete_name(app: &App) -> String {
app.confirm_clip_delete
.as_ref()
.and_then(|name| app.clips.iter().find(|clip| &clip.name == name))
.map(|clip| clip.name.clone())
.unwrap_or_default()
}
+2 -1
View File
@@ -1,5 +1,6 @@
//! The three screens: settings, match history and the game review.
//! The four screens: settings, match history, the clips grid and the game review.
pub mod clips;
pub mod history;
pub mod review;
pub mod settings;
+4
View File
@@ -557,6 +557,10 @@ pub fn tick(app: &mut App, tx: &mut Tx) -> bool {
app.review.export_note = Some(format!("Clip saved to {path}"));
app.review.export = None;
changed = true;
// The clips grid lists the folder this clip just joined.
if app.screen == crate::app::Screen::Clips {
app.refresh_clips();
}
}
Ok(Err(e)) => {
app.review.export_note = Some(format!("Export failed: {e}"));