Library: shelf actions in the title row, «+ Game» for a database, read-only samples
The cards row holds only databases; «+ Add database», «✚ New database» and «🌐 Online games» stand beside «Databases» (folded to «+ ▾ 🌐» when narrow); an empty shelf shows them as large cards. A database that takes games has «+ Game» in its table header: a new game meant for it, whose Ctrl+S adds it there (the target is dropped when the base leaves the shelf or stops taking games). The chooser lists only databases that take games; with none, «✚ New database…» is the main button; the UTF-8 copy is in the card menu (also for a file not read yet). Built-in samples are read-only. An empty database has no filter panel or search; a narrow search field says «🔍 Search». The table header keeps a short database name. Task 8 closed: the quick search stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
40e5af5896
commit
1518fc5f70
10 changed files with 588 additions and 179 deletions
|
|
@ -26,6 +26,12 @@ fn dir() -> Option<PathBuf> {
|
|||
.map(|d| d.data_local_dir().join("examples"))
|
||||
}
|
||||
|
||||
/// A sample database of the program: only read (games added there would end up in a
|
||||
/// hidden data folder).
|
||||
pub fn is_example(path: &std::path::Path) -> bool {
|
||||
dir().is_some_and(|d| path.starts_with(d))
|
||||
}
|
||||
|
||||
/// Adds the samples once; `true` when the settings changed. A new library starts with
|
||||
/// them (the classics open); an existing one gets them after its own databases.
|
||||
pub fn first_run_setup(settings: &mut Settings) -> bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue