pub enum ScreenAction {
Show 29 variants
None,
Navigate(Screen),
NavigateWithMessage {
screen: Screen,
title: String,
message: String,
},
ShowMessage {
title: String,
content: String,
},
ShowToast {
message: String,
variant: ToastVariant,
},
Quit,
Refresh,
SetHasChanges(bool),
ConfigUpdated,
ShowHelp,
SaveLocalRepoConfig {
repo_path: PathBuf,
profiles: Vec<String>,
},
StartGitHubSetup {
token: String,
repo_name: String,
is_private: bool,
},
UpdateGitHubToken {
token: String,
},
ShowProfileSelection {
profiles: Vec<String>,
},
CreateAndActivateProfile {
name: String,
},
ActivateProfile {
name: String,
},
ScanDotfiles,
RefreshFileBrowser,
ToggleFileSync {
file_index: usize,
is_synced: bool,
},
AddCustomFileToSync {
full_path: PathBuf,
relative_path: String,
},
SetBackupEnabled {
enabled: bool,
},
RemoveCustomFile {
file_index: usize,
},
MoveToCommon {
file_index: usize,
is_common: bool,
profiles_to_cleanup: Vec<String>,
},
CreateProfile {
name: String,
description: Option<String>,
inherits: Option<String>,
copy_from: Option<usize>,
},
SwitchProfile {
name: String,
},
RenameProfile {
old_name: String,
new_name: String,
},
DeleteProfile {
name: String,
},
InstallMissingPackages,
UpdateSetting {
setting: String,
option_index: usize,
},
}Expand description
Actions that a screen can return after handling an event.
This enum allows screens to signal navigation and state changes without directly mutating global state.
Variants§
None
No action needed, stay on current screen.
Navigate to a different screen.
Navigate to a screen and pass data.
ShowMessage
Show a message popup.
ShowToast
Show a toast notification (non-blocking, auto-dismisses).
Quit
Request to quit the application.
Refresh
Trigger a data refresh (e.g., reload dotfiles).
SetHasChanges(bool)
Mark that there are changes to push.
ConfigUpdated
Update the config (signals app to reload).
ShowHelp
Open help overlay.
SaveLocalRepoConfig
Save local repository configuration and navigate to profile selection or main menu.
Fields
StartGitHubSetup
Start the GitHub setup state machine.
Fields
UpdateGitHubToken
Update the GitHub token only (for already configured repos).
ShowProfileSelection
Navigate to profile selection screen with profiles.
CreateAndActivateProfile
Create a new profile and activate it (used during initial setup).
ActivateProfile
Activate an existing profile (used during initial setup).
ScanDotfiles
Scan for dotfiles and refresh the list.
RefreshFileBrowser
Refresh the file browser entries.
ToggleFileSync
Toggle file sync status (add or remove from sync).
Fields
AddCustomFileToSync
Add a custom file to sync after confirmation.
Fields
SetBackupEnabled
Update backup enabled setting.
RemoveCustomFile
Remove a custom file entry from the config (not synced, user-added).
MoveToCommon
Move a file to/from common (shared across all profiles).
Fields
CreateProfile
Create a new profile.
Fields
SwitchProfile
Switch to a different profile by name.
RenameProfile
Rename a profile.
DeleteProfile
Delete a profile.
InstallMissingPackages
Trigger installation of all missing packages.
UpdateSetting
Update a setting value.
Trait Implementations§
Source§impl Clone for ScreenAction
impl Clone for ScreenAction
Source§impl Debug for ScreenAction
impl Debug for ScreenAction
Auto Trait Implementations§
impl Forget for ScreenAction
impl Freeze for ScreenAction
impl Move for ScreenAction
impl RefUnwindSafe for ScreenAction
impl Send for ScreenAction
impl Sync for ScreenAction
impl Unpin for ScreenAction
impl UnsafeUnpin for ScreenAction
impl UnwindSafe for ScreenAction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more