chore: Changes UI design.
This commit is contained in:
parent
118e4a8f09
commit
7bc190eabb
2 changed files with 11 additions and 12 deletions
|
@ -6,7 +6,8 @@ use crate::ApplicationState;
|
|||
|
||||
pub fn main(state: &mut ApplicationState, api: &api::NextAPIClient, ctx: &eframe::egui::Context) {
|
||||
egui::Window::new("Log In").show(ctx, move |ui| {
|
||||
ui.heading("Login");
|
||||
ui.set_max_width(275.0);
|
||||
|
||||
ui.horizontal(|ui| {
|
||||
ui.label("Email: ");
|
||||
ui.text_edit_singleline(&mut state.username);
|
||||
|
@ -33,14 +34,5 @@ pub fn main(state: &mut ApplicationState, api: &api::NextAPIClient, ctx: &eframe
|
|||
}
|
||||
}));
|
||||
}
|
||||
|
||||
match state.token.lock() {
|
||||
Ok(x) => {
|
||||
ui.label(format!("Token: {:?}", *x));
|
||||
},
|
||||
Err(_) => {
|
||||
ui.label(format!("No token."));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
|
@ -32,7 +32,14 @@ fn main() -> Result<(), eframe::Error> {
|
|||
|
||||
eframe::run_simple_native("NextNet GUI", options, move |ctx, _frame| {
|
||||
egui::CentralPanel::default().show(ctx, |_ui| {
|
||||
let token_clone = Arc::clone(&app_state.token);
|
||||
let token = token_clone.lock().unwrap();
|
||||
|
||||
if *token == "".to_string() {
|
||||
components::log_in::main(&mut app_state, &api, ctx);
|
||||
} else {
|
||||
// ...
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue