56 lines
1.5 KiB
Rust
56 lines
1.5 KiB
Rust
// This file is part of Deja-vu.
|
|
//
|
|
// Deja-vu is free software: you can redistribute it and/or modify it
|
|
// under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// Deja-vu is distributed in the hope that it will be useful, but
|
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
// See the GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with Deja-vu. If not, see <https://www.gnu.org/licenses/>.
|
|
//
|
|
use serde::{Deserialize, Serialize};
|
|
use strum::Display;
|
|
|
|
use crate::{
|
|
app::Mode,
|
|
components::popup::Type,
|
|
system::{
|
|
disk::{Disk, PartitionTableType},
|
|
drivers::Driver,
|
|
},
|
|
};
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Display, Serialize, Deserialize)]
|
|
pub enum Action {
|
|
// App
|
|
InstallDriver,
|
|
Process,
|
|
ScanDisks,
|
|
Select(Option<usize>, Option<usize>), // indicies for (source, dest) or (boot, os)
|
|
SelectDriver(Driver),
|
|
SelectTableType(PartitionTableType),
|
|
UpdateDiskList(Vec<Disk>),
|
|
// Screens
|
|
DismissPopup,
|
|
DisplayPopup(Type, String),
|
|
NextScreen,
|
|
PrevScreen,
|
|
SetMode(Mode),
|
|
// TUI
|
|
ClearScreen,
|
|
Error(String),
|
|
Help,
|
|
KeyDown,
|
|
KeyUp,
|
|
Quit,
|
|
Render,
|
|
Resize(u16, u16),
|
|
Resume,
|
|
Suspend,
|
|
Tick,
|
|
}
|