diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-01 18:51:05 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-01 18:51:05 +0100 |
| commit | 8c93f69081f0012e9a97ffc59adb7129bc1593ee (patch) | |
| tree | 4dfe458ca2e76e4d9d2ad8f52c2684d5c83178c9 /src/client/view.rs | |
| parent | v4.0.4: move the client transport and TOFU into the library (diff) | |
| download | zagan-bet-8c93f69081f0012e9a97ffc59adb7129bc1593ee.tar.gz zagan-bet-8c93f69081f0012e9a97ffc59adb7129bc1593ee.zip | |
v4.0.5: login and registration as core commands
Diffstat (limited to 'src/client/view.rs')
| -rw-r--r-- | src/client/view.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/view.rs b/src/client/view.rs index 903403c..9443726 100644 --- a/src/client/view.rs +++ b/src/client/view.rs | |||
| @@ -248,6 +248,8 @@ pub struct LobbyView { | |||
| 248 | pub user: Option<String>, | 248 | pub user: Option<String>, |
| 249 | pub balance: Option<i64>, | 249 | pub balance: Option<i64>, |
| 250 | pub games: Vec<(String, String)>, | 250 | pub games: Vec<(String, String)>, |
| 251 | /// Why the last login or registration attempt failed. | ||
| 252 | pub login_error: Option<String>, | ||
| 251 | } | 253 | } |
| 252 | 254 | ||
| 253 | /// The play log, already parsed. | 255 | /// The play log, already parsed. |
| @@ -270,6 +272,9 @@ pub enum View { | |||
| 270 | /// Semantic input. Frontends turn keys and clicks into these. | 272 | /// Semantic input. Frontends turn keys and clicks into these. |
| 271 | #[derive(Debug, Clone, PartialEq, Eq)] | 273 | #[derive(Debug, Clone, PartialEq, Eq)] |
| 272 | pub enum Command { | 274 | pub enum Command { |
| 275 | /// The credential is already hashed by the frontend. | ||
| 276 | Login { user: String, credential: String }, | ||
| 277 | Register { user: String, credential: String }, | ||
| 273 | Play { game: String, bet: Option<u64> }, | 278 | Play { game: String, bet: Option<u64> }, |
| 274 | History { limit: u32 }, | 279 | History { limit: u32 }, |
| 275 | ShowLobby, | 280 | ShowLobby, |
