Opening the login server section no longer shifts the card (space is kept, section only shows)
Browse files at this commit56a15dbfe7d4a841cf6219f8f0f968d46abb012dParent: c2a2d84- style
- opening the login server section no longer shifts the card (space is kept, section only shows)
- connection notice sits right under Log in
1 changed file +6 -4
crates/client/src/gui/auth.rsmodified+6 -4
| @@ -1,3 +1,4 @@ | |||
| 1 | +use gpui_kit::prelude::FluentBuilder as _; | ||
| 1 | use gpui_kit::{ | 2 | use gpui_kit::{ |
| 2 | AnyElement, Context, Div, Entity, FontWeight, IntoElement, ParentElement, | 3 | AnyElement, Context, Div, Entity, FontWeight, IntoElement, ParentElement, |
| 3 | StatefulInteractiveElement, Styled, Window, | 4 | StatefulInteractiveElement, Styled, Window, |
| @@ -220,14 +221,16 @@ impl Yumush { | |||
| 220 | .child(password_field(palette, &self.auth.password_input)) | 221 | .child(password_field(palette, &self.auth.password_input)) |
| 221 | .children(invite) | 222 | .children(invite) |
| 222 | .child(action_button) | 223 | .child(action_button) |
| 224 | + .children(connection_notice(&self.connection, palette)) | ||
| 223 | .child(server_toggle( | 225 | .child(server_toggle( |
| 224 | &entity, | 226 | &entity, |
| 225 | &self.network.server().address, | 227 | &self.network.server().address, |
| 226 | self.auth.server_open, | 228 | self.auth.server_open, |
| 227 | palette, | 229 | palette, |
| 228 | )) | 230 | )) |
| 229 | - .children(self.auth.server_open.then(|| { | 231 | + .child( |
| 230 | div() | 232 | div() |
| 233 | + .when(!self.auth.server_open, |this| this.invisible()) | ||
| 231 | .flex() | 234 | .flex() |
| 232 | .flex_col() | 235 | .flex_col() |
| 233 | .gap(px(space::SM)) | 236 | .gap(px(space::SM)) |
| @@ -255,9 +258,8 @@ impl Yumush { | |||
| 255 | } | 258 | } |
| 256 | }, | 259 | }, |
| 257 | )), | 260 | )), |
| 258 | - ) | 261 | + ), |
| 259 | - })) | 262 | + ), |
| 260 | - .children(connection_notice(&self.connection, palette)), | ||
| 261 | ) | 263 | ) |
| 262 | } | 264 | } |
| 263 | 265 | ||