From 2bdd4e555ab7b660457fe8d792b5e7ebaae2390b Mon Sep 17 00:00:00 2001 From: akarras Date: Sat, 13 Jan 2024 11:25:40 -0700 Subject: [PATCH] missing alt text on images --- ultros-frontend/ultros-app/src/components/item_icon.rs | 8 ++++++-- .../ultros-app/src/components/profile_display.rs | 2 +- ultros-frontend/ultros-app/src/routes/item_explorer.rs | 1 - 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ultros-frontend/ultros-app/src/components/item_icon.rs b/ultros-frontend/ultros-app/src/components/item_icon.rs index 260d9bcd..e5261787 100644 --- a/ultros-frontend/ultros-app/src/components/item_icon.rs +++ b/ultros-frontend/ultros-app/src/components/item_icon.rs @@ -14,9 +14,13 @@ pub fn ItemIcon(#[prop(into)] item_id: MaybeSignal, icon_size: IconSize) -> }; let (failed, set_failed) = create_signal(0); let failed_item = move || failed() == item_id(); + let data = xiv_gen_db::data(); + let item_name = move || { + let item = data.items.get(&ItemId(item_id())); + format!("Image for item {}", item.as_ref().map(|i| i.name.as_str()).unwrap_or_default()) + }; view! { - - impl IntoView { {move || user.get().map(|user| match user { Some(auth) => view! { - &auth.username/ + User profile picture "Logout" diff --git a/ultros-frontend/ultros-app/src/routes/item_explorer.rs b/ultros-frontend/ultros-app/src/routes/item_explorer.rs index a0455304..0183702d 100644 --- a/ultros-frontend/ultros-app/src/routes/item_explorer.rs +++ b/ultros-frontend/ultros-app/src/routes/item_explorer.rs @@ -9,7 +9,6 @@ use crate::CheapestPrices; use itertools::Itertools; use leptos::*; use leptos_icons::*; -use leptos_meta::Title; use leptos_router::*; use log::info; use paginate::Pages;