style: more items by creator cards

- show display name for language on marketplace item information
This commit is contained in:
alexsparkes
2024-05-20 22:27:33 +01:00
parent 1ab9e3b679
commit 634026e2e6
3 changed files with 23 additions and 2 deletions

View File

@@ -4,6 +4,22 @@
@import 'modules/lightbox';
@import 'scss/variables';
.creatorItems {
.item {
flex-flow: row !important;
}
.item-back {
margin: 0 !important;
}
.item-icon {
margin: 0 !important;
}
.card-details {
margin: 0 !important;
text-align: left;
}
}
.items {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));

View File

@@ -127,6 +127,9 @@ class Item extends PureComponent {
</div>
);
const locale = localStorage.getItem('language');
let languageNames = new Intl.DisplayNames(["en"], { type: "language" });
return (
<div id="item">
<Modal
@@ -275,7 +278,7 @@ class Item extends PureComponent {
? moreInfoItem(
<MdTranslate />,
variables.getMessage('modals.main.settings.sections.language.title'),
this.props.data.data.language,
languageNames.of(this.props.data.data.language),
)
: null}
{moreInfoItem(
@@ -369,6 +372,7 @@ class Item extends PureComponent {
toggleFunction={(input) => this.props.toggleFunction('item', input)}
collectionFunction={(input) => this.props.toggleFunction('collection', input)}
filter={''}
moreByCreator={true}
/>
</div>
</div>

View File

@@ -68,6 +68,7 @@ function Items({
collectionFunction,
onCollection,
filter,
moreByCreator,
}) {
const shouldShowCollection =
(collection && !onCollection && (filter === null || filter === '')) ||
@@ -110,7 +111,7 @@ function Items({
)}
</div>
)}
<div className="items">
<div className={`items ${moreByCreator ? 'creatorItems' : ''}`}>
{items
?.filter((item) => filterItems(item, filter))
.map((item) => (