mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 20:56:43 +01:00
wip: refactor pt.9, 403 errors
This commit is contained in:
parent
a784f7a6f2
commit
8aa1ba8d0f
29 changed files with 1008 additions and 902 deletions
|
|
@ -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),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue