1use crate::{
2 components::home::Mode,
3 systemd::{UnitId, UnitWithStatus},
4};
5
6#[derive(Debug, Clone)]
7pub enum Action {
8 Quit,
9 Resume,
10 Suspend,
11 Render,
12 DebouncedRender,
13 SpinnerTick,
14 Resize(u16, u16),
15 ToggleShowLogger,
16 RefreshServices,
17 SetServices(Vec<UnitWithStatus>),
18 EnterMode(Mode),
19 EnterError(String),
20 CancelTask,
21 ToggleHelp,
22 SetUnitFilePath { unit: UnitId, path: Result<String, String> },
23 CopyUnitFilePath,
24 SetLogs { unit: UnitId, logs: Vec<String> },
25 AppendLogLine { unit: UnitId, line: String },
26 StartService(UnitId),
27 StopService(UnitId),
28 RestartService(UnitId),
29 ReloadService(UnitId),
30 EnableService(UnitId),
31 DisableService(UnitId),
32 KillService(UnitId, String),
33 ScrollUp(u16),
34 ScrollDown(u16),
35 ScrollToTop,
36 ScrollToBottom,
37 EditUnitFile { unit: UnitId, path: String },
38 Noop,
39}