feat: add model title to details box

This commit is contained in:
Tautvydas Derzinskas committed 2026-09-21 21:09:53 +02:00
1 parent 8e4f7ddf47
commit 8f1ca1fc4a
3 files changed
+16 -1

No files matched your search

+1
View File
@@ -1150,6 +1150,7 @@
"addToFavorites": "Add to Favourites",
"removeFromFavorites": "Remove from Favourites",
"favoriteFailed": "Failed to update favourites. Please try again.",
"title": "Title",
"category": "Category",
"author": "Author",
"downloadModelFiles": "Download model files",
+1
View File
@@ -1151,6 +1151,7 @@
"addToFavorites": "Pridėti prie mėgstamų",
"removeFromFavorites": "Pašalinti iš mėgstamų",
"favoriteFailed": "Nepavyko atnaujinti mėgstamų. Bandykite dar kartą.",
"title": "Pavadinimas",
"category": "Kategorija",
"author": "Autorius",
"downloadModelFiles": "Atsisiųsti modelio failus",
@@ -38,7 +38,7 @@ type Props = {
};
/** The model detail page's right-hand summary card, sticky so it stays in view while the
* description/tags column scrolls: author (jumps to their author page), category (jumps back
* description/tags column scrolls: the full title, author (jumps to their author page), category (jumps back
* to the Models grid filtered to it), "Open in {Slicer}" (only when both a preference is set
* and this print has a slicer_url -- same condition ModelActionsMenu's menu item uses),
* "Download model files" (the same picker-or-direct-download flow as ModelActionsMenu's
@@ -97,6 +97,19 @@ export default function ModelSidePanel({ print, onSelectCategory, onUnauthorized
}}
>
<Stack spacing={2}>
<Box>
<Typography variant="caption" color="text.secondary" sx={{ display: "block", mb: 0.5 }}>
{t("models:detail.title")}
</Typography>
{/* Full title, wrapped -- unlike the page header, this box never truncates it. */}
<Typography
variant="body2"
sx={{ color: (muiTheme) => muiTheme.thingport.headingText, overflowWrap: "anywhere" }}
>
{print.title || print.name}
</Typography>
</Box>
<Box>
<Typography variant="caption" color="text.secondary" sx={{ display: "block", mb: 0.5 }}>
{t("models:detail.author")}