wip: refactor pt.9, 403 errors

This commit is contained in:
🪞👃🪞 2024-11-10 18:38:22 +01:00
parent a784f7a6f2
commit 8aa1ba8d0f
29 changed files with 1008 additions and 902 deletions

View file

@ -4,46 +4,18 @@ use crate::*;
pub struct PhrasePool {
/// Phrases in the pool
pub phrases: Vec<Arc<RwLock<Phrase>>>,
/// Highlighted phrase
pub phrase: usize,
}
#[derive(Clone, PartialEq)]
pub enum PhrasePoolCommand {
Prev,
Next,
MoveUp,
MoveDown,
Delete,
Append,
Insert,
Duplicate,
RandomColor,
Edit,
Import,
Export,
Rename(PhraseRenameCommand),
Length(PhraseLengthCommand),
}
#[derive(Clone, PartialEq)]
pub enum PhraseRenameCommand {
Begin,
Backspace,
Append(char),
Set(String),
Confirm,
Cancel,
}
#[derive(Clone, PartialEq)]
pub enum PhraseLengthCommand {
Begin,
Next,
Prev,
Inc,
Dec,
Set(usize),
Confirm,
Cancel,
Select(usize),
Add(usize),
Delete(usize),
Duplicate(usize),
Swap(usize),
RandomColor(usize),
Import(String),
Export(String),
SetName(String),
SetLength(String),
}