Merge branch 'main' into feature/multi-entry-final

# Conflicts:
#	src/app.rs
#	src/pages/home_page.rs
#	src/pages/mod.rs
#	src/pages/provider_entry.rs
This commit is contained in:
alphafetus committed 2025-10-16 12:23:40 -04:00
commit 5178dcbffa
8 files changed
+126 -19

No files matched your search

+2 -2
View File
@@ -5,8 +5,8 @@ use aws_sdk_dynamodb::{Client, error::ProvideErrorMetadata, types::AttributeValu
#[cfg(feature = "ssr")]
use serde_dynamo::{from_item, to_item};
use crate::app::Unauthenticated;
use crate::common::{ExpandableInfo, UserClaims};
use crate::pages::UnauthenticatedPage;
use crate::components::{
ActionButton, CheckboxList, Loading, MultiEntry, OutlinedTextField, Panel, RadioList, Row,
Select,
@@ -132,7 +132,7 @@ pub fn HomePage() -> impl IntoView {
view! {
<AuthLoaded fallback=Loading>
<Authenticated unauthenticated=Unauthenticated>
<Authenticated unauthenticated=UnauthenticatedPage>
// Replace this fallback with a real loading screen.
<Suspense fallback=Loading>
{move || {
+2 -1
View File
@@ -1,4 +1,5 @@
mod about_page;
mod home_page;
mod unauthenticated_page;
pub use self::{about_page::*, home_page::*};
pub use self::{about_page::*, home_page::*, unauthenticated_page::*};
View File
Whitespace-only changes.
+33
View File
@@ -0,0 +1,33 @@
use crate::components::ActionButton;
use leptos::prelude::*;
use leptos_oidc::AuthSignal;
#[component]
pub fn UnauthenticatedPage() -> impl IntoView {
let auth = use_context::<AuthSignal>().expect("AuthSignal not present in LoginLink");
let login_url = move || {
auth.with(|auth| {
auth.unauthenticated()
.map(|unauthenticated| unauthenticated.login_url())
})
};
let navigate = leptos_router::hooks::use_navigate();
view! (
<div class="flex h-screen justify-center items-center pb-50">
<div class="bg-white p-8 border rounded-lg shadow-lg">
<h3> "You're not signed in. Please sign in with your Region 15 email." </h3>
<div class="flex pt-4 justify-center items-center">
<ActionButton on:click=move |_| {
if let Some(url) = login_url() {
navigate(&url, Default::default())
}
}>
"Sign in"
</ActionButton>
</div>
</div>
</div>
)
}