mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Compare commits
1 Commits
feat/previ
...
better-sto
Author | SHA1 | Date | |
---|---|---|---|
![]() |
08ddaf35ae |
@@ -11,6 +11,7 @@ import { CorsAwareImage } from '../UI/CorsAwareImage';
|
||||
import CheckeredBackground from '../ResourcesList/CheckeredBackground';
|
||||
import AuthorizedAssetImage from './PrivateAssets/AuthorizedAssetImage';
|
||||
import { textEllipsisStyle } from '../UI/TextEllipsis';
|
||||
import { capitalize } from 'lodash';
|
||||
|
||||
const paddingSize = 10;
|
||||
const styles = {
|
||||
@@ -99,7 +100,7 @@ export const AssetCard = ({ id, assetShortHeader, size }: Props) => {
|
||||
}}
|
||||
>
|
||||
<Text noMargin style={styles.title} color="inherit">
|
||||
{assetShortHeader.name}
|
||||
{capitalize(assetShortHeader.name)}
|
||||
</Text>
|
||||
{assetShortHeader.shortDescription && (
|
||||
<Text noMargin style={styles.title} size="body2" color="inherit">
|
||||
|
@@ -41,6 +41,7 @@ import { getPixelatedImageRendering } from '../Utils/CssHelpers';
|
||||
import ArrowRight from '../UI/CustomSvgIcons/ArrowRight';
|
||||
import ArrowLeft from '../UI/CustomSvgIcons/ArrowLeft';
|
||||
import PublicProfileDialog from '../Profile/PublicProfileDialog';
|
||||
import { capitalize } from 'lodash';
|
||||
|
||||
const FIXED_HEIGHT = 250;
|
||||
const FIXED_WIDTH = 300;
|
||||
@@ -75,9 +76,6 @@ const styles = {
|
||||
},
|
||||
};
|
||||
|
||||
const makeFirstLetterUppercase = (str: string) =>
|
||||
str.charAt(0).toUpperCase() + str.slice(1);
|
||||
|
||||
type Props = {|
|
||||
onTagSelection: (tag: string) => void,
|
||||
assetShortHeader: AssetShortHeader,
|
||||
@@ -298,7 +296,7 @@ export const AssetDetails = React.forwardRef<Props, AssetDetailsInterface>(
|
||||
<Column>
|
||||
<LineStackLayout alignItems="baseline" noMargin>
|
||||
<Text size="block-title" displayInlineAsSpan>
|
||||
{assetShortHeader.name}
|
||||
{capitalize(assetShortHeader.name)}
|
||||
</Text>
|
||||
{!areAuthorsLoading && (
|
||||
<LineStackLayout noMargin>
|
||||
@@ -350,7 +348,7 @@ export const AssetDetails = React.forwardRef<Props, AssetDetailsInterface>(
|
||||
<Chip
|
||||
size="small"
|
||||
style={styles.chip}
|
||||
label={makeFirstLetterUppercase(tag)}
|
||||
label={capitalize(tag)}
|
||||
onClick={() => {
|
||||
onTagSelection(tag);
|
||||
}}
|
||||
@@ -468,7 +466,7 @@ export const AssetDetails = React.forwardRef<Props, AssetDetailsInterface>(
|
||||
value={animation.name}
|
||||
label={
|
||||
!isAnimationNameEmpty
|
||||
? makeFirstLetterUppercase(animation.name)
|
||||
? capitalize(animation.name)
|
||||
: t`Default` // Display default for animations with no name.
|
||||
}
|
||||
shouldNotTranslate={!isAnimationNameEmpty}
|
||||
|
Reference in New Issue
Block a user