Skip to content

Commit

Permalink
Add auth status indicator and credential editing screen (#430)
Browse files Browse the repository at this point in the history
* Add indicators of scores/portal credential validity

* Add screen to change auth parameters

* Clippy fixes
  • Loading branch information
TristanDebrunner authored Nov 20, 2024
1 parent 50a7d19 commit 966a411
Show file tree
Hide file tree
Showing 9 changed files with 748 additions and 78 deletions.
49 changes: 49 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 15 additions & 1 deletion refbox/src/app/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ pub enum Message {
ParameterSelected(ListableParameter, usize),
ToggleBoolParameter(BoolGameParameter),
CycleParameter(CyclingParameter),
TextParameterChanged(TextParameter, String),
ApplyAuthChanges,
RequestRemoteId,
GotRemoteId(u32),
DeleteRemote(usize),
Expand All @@ -99,6 +101,7 @@ pub enum Message {
RecvGame(GameInfo),
StopClock,
StartClock,
UwhScoresAuthChecked(Vec<u32>),
NoAction, // TODO: Remove once UI is functional
}

Expand Down Expand Up @@ -148,6 +151,8 @@ impl Message {
| Self::SelectParameter(_)
| Self::ParameterEditComplete { .. }
| Self::ParameterSelected(_, _)
| Self::TextParameterChanged(_, _)
| Self::ApplyAuthChanges
| Self::RequestRemoteId
| Self::GotRemoteId(_)
| Self::DeleteRemote(_)
Expand All @@ -159,7 +164,8 @@ impl Message {
| Self::ConfirmScores(_)
| Self::ScoreConfirmation { .. }
| Self::StopClock
| Self::StartClock => false,
| Self::StartClock
| Self::UwhScoresAuthChecked(_) => false,
}
}
}
Expand All @@ -171,6 +177,7 @@ pub enum ConfigPage {
Sound,
Display,
App,
Credentials,
Remotes(usize, bool),
}

Expand Down Expand Up @@ -220,6 +227,13 @@ pub enum CyclingParameter {
Mode,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum TextParameter {
UwhscoresEmail,
UwhscoresPassword,
UwhportalToken,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ScrollOption {
Black,
Expand Down
Loading

0 comments on commit 966a411

Please sign in to comment.