Skip to main content

Module profiles

Module profiles 

Source

FunctionsΒ§

create_profile
Create a brand-new profile copied from the currently active one. name must be non-empty (after trim) and not already in use.
create_profile_impl
State-mutation core for create_profile. AppHandle-free so the validation + copy + push + persist path can be unit-tested without a Tauri runtime; the command wrapper layers the profile:changed emit on top.
delete_profile
Delete a profile by name. Refuses to delete the only profile or the currently-active profile (the user must switch first).
delete_profile_impl
State-mutation core for delete_profile.
duplicate_profile
Copy source’s settings into a brand-new profile named name without flipping the active profile. Avoids the switch-then-create dance that used to fire profile:changed mid-duplication and clobber unsaved hook drafts.
duplicate_profile_impl
State-mutation core for duplicate_profile.
emit_profile_changed πŸ”’
get_active_profile
Name of the currently active profile (drives every setting tab).
list_profiles
List the names of every saved profile, in the order they appear in the tray menu and the Profiles tab.
rename_profile
Rename a profile. If the active profile is renamed, the active pointer is updated to follow it. Rejects collisions and missing sources.
rename_profile_impl
State-mutation core for rename_profile. Updates the active-name pointer if the renamed profile happens to be active.
reorder_profiles
Reorder profiles to match names exactly. The renderer sends the full list β€” the call rejects length mismatches, duplicates, and unknown names rather than try to merge.
reorder_profiles_impl
State-mutation core for reorder_profiles.
reset_profile_to_defaults
Replace name’s settings with Settings::default(). If name is the active profile, the in-memory settings are also reset so the renderer sees the change without a profile switch.
reset_profile_to_defaults_impl
State-mutation core for reset_profile_to_defaults. Replaces the named profile’s settings with Settings::default(), and also resets the in-memory live settings slot when the named profile is active.
set_active_profile
Renderer-facing set_active_profile. Thin wrapper over set_active_profile_impl.
set_active_profile_impl
Switch the active profile to name. Shared by the Tauri command, the tray-menu handler, and the local-IPC entry point. Resets the per-profile timers (keeping last_sleep) and emits profile:changed.
validate_delete πŸ”’
validate_profile_name πŸ”’
validate_rename πŸ”’
validate_reorder πŸ”’