Ship to Desktop and /Applications; restructure Settings; add reset
Version pinned to 0.0.1 and staying on 0.x while this is in beta. `npm run ship` now exports twice from one build: /Applications/Work.app to test here, and ~/Desktop/Work-<version>.zip to send someone. One build, so a tester runs byte for byte what was verified rather than a second build that drifted. Packed with ditto rather than zip - a plain zip mangles the bundle's symlinks and it will not open on the far end. Settings: groups move up under apps, and the hidden-element list moves into its own window behind a one-line summary. It had grown to 21 selectors of framework class names and was most of the page, in front of the things people actually open Settings for. Reset puts apps, groups, hidden elements and zoom back to defaults, and leaves sessions alone - those live in WebKit's own store, and throwing them away would mean signing back into every tool to undo a change to the nav.
This commit is contained in:
@@ -767,6 +767,26 @@ pub fn app_reports(state: State<'_, AppState>) -> Vec<(String, String)> {
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// Puts the app list, groups, hidden elements and zoom back to defaults.
|
||||
///
|
||||
/// Settings only. Sessions are left alone — they live in WebKit's own store,
|
||||
/// not in `apps.json`, and throwing them away would mean signing back into
|
||||
/// every tool to undo a change to the nav.
|
||||
#[tauri::command]
|
||||
pub fn reset_config(app: AppHandle, state: State<'_, AppState>) -> Result<Config, String> {
|
||||
let old = state.cfg();
|
||||
for a in &old.apps {
|
||||
webviews::destroy(&app, &a.id);
|
||||
}
|
||||
|
||||
*state.config.lock().unwrap() = config::seed();
|
||||
*state.active.lock().unwrap() = None;
|
||||
*state.booted.lock().unwrap() = false;
|
||||
state.unread.lock().unwrap().clear();
|
||||
state.persist()?;
|
||||
Ok(state.cfg())
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------ passwords
|
||||
|
||||
/// Writes the offered login to the macOS Keychain.
|
||||
|
||||
Reference in New Issue
Block a user