move account_login_view to ui submodule

trying to keep all views and widgets in here
This commit is contained in:
William Casarin
2024-05-03 07:56:08 -05:00
parent 5b7b47aaf5
commit f9d6161500
4 changed files with 6 additions and 4 deletions

View File

@@ -4,7 +4,6 @@ mod error;
//mod note; //mod note;
//mod block; //mod block;
mod abbrev; mod abbrev;
pub mod account_login_view;
pub mod app_creation; pub mod app_creation;
mod app_style; mod app_style;
mod colors; mod colors;

View File

@@ -20,11 +20,13 @@ impl<'a> View for AccountLoginView<'a> {
if let Some(key) = self.manager.check_for_successful_login() { if let Some(key) = self.manager.check_for_successful_login() {
// TODO: route to "home" // TODO: route to "home"
println!("successful login with key: {:?}", key); println!("successful login with key: {:?}", key);
/*
return if is_mobile { return if is_mobile {
// route to "home" on mobile // route to "home" on mobile
} else { } else {
// route to "home" on desktop // route to "home" on desktop
}; };
*/
} }
if is_mobile { if is_mobile {
self.show_mobile(ui); self.show_mobile(ui);
@@ -206,7 +208,7 @@ impl<'a> AccountLoginView<'a> {
ui.add_space(48.0); ui.add_space(48.0);
let welcome_data = egui::include_image!("../assets/Welcome to Nostrdeck 2x.png"); let welcome_data = egui::include_image!("../../assets/Welcome to Nostrdeck 2x.png");
ui.add(egui::Image::new(welcome_data).max_width(528.0)); ui.add(egui::Image::new(welcome_data).max_width(528.0));
ui.add_space(12.0); ui.add_space(12.0);
@@ -323,7 +325,7 @@ fn login_textedit_info_text() -> RichText {
} }
fn logo_unformatted() -> Image<'static> { fn logo_unformatted() -> Image<'static> {
let logo_gradient_data = egui::include_image!("../assets/Logo-Gradient-2x.png"); let logo_gradient_data = egui::include_image!("../../assets/Logo-Gradient-2x.png");
return egui::Image::new(logo_gradient_data); return egui::Image::new(logo_gradient_data);
} }

View File

@@ -1,3 +1,4 @@
pub mod account_login_view;
pub mod anim; pub mod anim;
pub mod mention; pub mod mention;
pub mod note; pub mod note;

View File

@@ -1,7 +1,7 @@
use notedeck::account_login_view::AccountLoginView;
use notedeck::app_creation::{ use notedeck::app_creation::{
generate_mobile_emulator_native_options, generate_native_options, setup_cc, generate_mobile_emulator_native_options, generate_native_options, setup_cc,
}; };
use notedeck::ui::account_login_view::AccountLoginView;
use notedeck::ui::{Preview, PreviewApp, ProfilePic, ProfilePreview, RelayView}; use notedeck::ui::{Preview, PreviewApp, ProfilePic, ProfilePreview, RelayView};
use std::env; use std::env;