feat(web): persist browser state
Keep settings, aliases, and recent drawings across browser sessions. Load Start-page videos from a Pages-generated snapshot.
This commit is contained in:
parent
25166b9508
commit
d4e792b2bc
15 changed files with 546 additions and 88 deletions
|
|
@ -2,11 +2,13 @@
|
|||
//! files, status-bar layout, ribbon collapse mode, …). Everything lives under
|
||||
//! `<platform-config>/OpenCADStudio` so the app keeps a single tidy folder.
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
use std::path::PathBuf;
|
||||
|
||||
/// The OpenCADStudio config directory (not created). `None` when the platform
|
||||
/// config base can't be resolved (e.g. no `HOME`). Callers `join` their own
|
||||
/// file name onto it and `create_dir_all` its parent before writing.
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub fn config_dir() -> Option<PathBuf> {
|
||||
let base: PathBuf = if cfg!(target_os = "windows") {
|
||||
std::env::var_os("APPDATA").map(PathBuf::from)?
|
||||
|
|
|
|||
Loading…
Reference in a new issue