diff --git a/src/components/Elements/MainModal/scss/marketplace/_main.scss b/src/components/Elements/MainModal/scss/marketplace/_main.scss index b14d33e9..471c69cc 100644 --- a/src/components/Elements/MainModal/scss/marketplace/_main.scss +++ b/src/components/Elements/MainModal/scss/marketplace/_main.scss @@ -69,6 +69,7 @@ display: flex; flex-flow: column; gap: 5px; + align-items: center; .card-title { font-size: 18px; @@ -92,7 +93,7 @@ } border-radius: 150px; - padding: 2px 8px; + padding: 2px 15px; background-color: rgb(255 255 255 / 10%); border: 1px solid rgb(209 213 219 / 30%); } @@ -126,7 +127,7 @@ table-layout: fixed; width: 100%; max-width: 650px !important; - word-wrap: break-word !important; + word-wrap: break-word !important; } } @@ -136,7 +137,7 @@ background-size: cover; border-radius: 15px; width: 30%; - max-width: 300px; + max-width: 250px; max-height: 600px; .front { @@ -450,7 +451,9 @@ p.author { .title:hover { cursor: pointer; + text-decoration: underline; } + } .createYourOwn { diff --git a/src/components/Elements/MainModal/scss/marketplace/modules/_item.scss b/src/components/Elements/MainModal/scss/marketplace/modules/_item.scss index 57f38a79..df18c231 100644 --- a/src/components/Elements/MainModal/scss/marketplace/modules/_item.scss +++ b/src/components/Elements/MainModal/scss/marketplace/modules/_item.scss @@ -33,11 +33,10 @@ p.description { svg { @include themed { background-image: t($slightGradient); + box-shadow: t($boxShadow); } - background-clip: text; - -webkit-text-fill-color: transparent; - font-size: 20px; + padding: 7px; border-radius: 100%; } diff --git a/src/components/Elements/ShareModal/ShareModal.jsx b/src/components/Elements/ShareModal/ShareModal.jsx index 61e68355..fa0b294f 100644 --- a/src/components/Elements/ShareModal/ShareModal.jsx +++ b/src/components/Elements/ShareModal/ShareModal.jsx @@ -7,6 +7,8 @@ import { SiTencentqq } from 'react-icons/si'; import Tooltip from '../Tooltip/Tooltip'; import { toast } from 'react-toastify'; +import { Button } from 'components/Elements'; + import './sharemodal.scss'; function ShareModal({ modalClose, data }) { @@ -43,81 +45,77 @@ function ShareModal({ modalClose, data }) {
- - - - - - - - - - - - - - - +
- - - +
); diff --git a/src/components/Elements/ShareModal/sharemodal.scss b/src/components/Elements/ShareModal/sharemodal.scss index 09b477c3..6815cef3 100644 --- a/src/components/Elements/ShareModal/sharemodal.scss +++ b/src/components/Elements/ShareModal/sharemodal.scss @@ -38,6 +38,9 @@ justify-content: space-between; display: flex; gap: 15px; + button { + width: 40px; + } } .copy { @@ -45,6 +48,10 @@ flex-flow: row; gap: 15px; + button { + width: 40px; + } + input[type='text'] { @include themed { background: t($modal-sidebar); diff --git a/src/features/marketplace/components/Items/Item.jsx b/src/features/marketplace/components/Items/Item.jsx index 9089622e..978e2848 100644 --- a/src/features/marketplace/components/Items/Item.jsx +++ b/src/features/marketplace/components/Items/Item.jsx @@ -158,17 +158,9 @@ class Item extends PureComponent {
this.incrementCount('quotes')}> - {this.state.count !== this.props.data.data.quotes.length ? ( - <> - {' '} - {variables.getMessage('modals.main.marketplace.product.show_all')} - - ) : ( - <> - {' '} - {variables.getMessage('modals.main.marketplace.product.show_less')} - - )} + {this.state.count !== this.props.data.data.quotes.length + ? variables.getMessage('modals.main.marketplace.product.show_all') + : variables.getMessage('modals.main.marketplace.product.show_less')}
@@ -193,17 +185,9 @@ class Item extends PureComponent {
this.incrementCount('settings')}> - {this.state.count !== this.props.data.data.settings.length ? ( - <> - {' '} - {variables.getMessage('modals.main.marketplace.product.show_all')} - - ) : ( - <> - {' '} - {variables.getMessage('modals.main.marketplace.product.show_less')} - - )} + {this.state.count !== this.props.data.data.settings.length + ? variables.getMessage('modals.main.marketplace.product.show_all') + : variables.getMessage('modals.main.marketplace.product.show_less')}
@@ -248,10 +232,10 @@ class Item extends PureComponent { )} {this.props.data.data.quotes && this.props.data.data.language !== '' ? moreInfoItem( - , - variables.getMessage('modals.main.settings.sections.language.title'), - this.props.data.data.language, - ) + , + variables.getMessage('modals.main.settings.sections.language.title'), + this.props.data.data.language, + ) : null} {moreInfoItem( , @@ -289,7 +273,7 @@ class Item extends PureComponent { onClick={() => window.open( variables.constants.REPORT_ITEM + - this.props.data.data.display_name.split(' ').join('+'), + this.props.data.data.display_name.split(' ').join('+'), '_blank', ) } @@ -306,7 +290,9 @@ class Item extends PureComponent { {variables.getMessage('modals.main.marketplace.product.part_of')} - {this.props.data.data.in_collections[0].display_name} + + {this.props.data.data.in_collections[0].display_name} + )} diff --git a/src/features/marketplace/components/Items/Items.jsx b/src/features/marketplace/components/Items/Items.jsx index 79f45740..d752c9ab 100644 --- a/src/features/marketplace/components/Items/Items.jsx +++ b/src/features/marketplace/components/Items/Items.jsx @@ -4,6 +4,35 @@ import { MdAutoFixHigh, MdOutlineArrowForward, MdOutlineOpenInNew } from 'react- import { Button } from 'components/Elements'; +function filterItems(item, filter) { + const lowerCaseFilter = filter.toLowerCase(); + return ( + item.name?.toLowerCase().includes(lowerCaseFilter) || + filter === '' || + item.author?.toLowerCase().includes(lowerCaseFilter) || + item.type?.toLowerCase().includes(lowerCaseFilter) + ); +} +function Item({ item, toggleFunction, type, onCollection }) { + return ( +
toggleFunction(item)} key={item.name}> + + icon +
+ {item.display_name || item.name} + + {variables.getMessage('modals.main.marketplace.by', { author: item.author })} + + {type === 'all' && !onCollection ? ( + + {variables.getMessage('modals.main.marketplace.' + item.type)} + + ) : null} +
+
+ ); +} + function Items({ type, items, @@ -13,30 +42,32 @@ function Items({ onCollection, filter, }) { + const shouldShowCollection = + (!onCollection && (filter === null || filter === '')) || + (type === 'collections' && !onCollection && (filter === null || filter === '')); + return ( <> - {(!onCollection && - (filter === null || filter === '')) || - (type === 'collections' && !onCollection && (filter === null || filter === '')) ? ( + {shouldShowCollection && ( <>
- {collection.display_name} - {collection.description} + {collection?.display_name} + {collection?.description}
- {collection.news === true ? ( + {collection?.news === true ? ( @@ -45,7 +76,7 @@ function Items({ ) : (
- ) : null} + )}
{items - ?.filter( - (item) => - item.name?.toLowerCase().includes(filter.toLowerCase()) || - filter === '' || - item.author?.toLowerCase().includes(filter.toLowerCase()) || - item.type?.toLowerCase().includes(filter.toLowerCase()), - ) + ?.filter((item) => filterItems(item, filter)) .map((item) => ( -
toggleFunction(item)} key={item.name}> - - icon -
- {item.display_name || item.name} - - {variables.getMessage('modals.main.marketplace.by', { author: item.author })} - - {type === 'all' && !onCollection ? ( - - {variables.getMessage('modals.main.marketplace.' + item.type)} - - ) : null} -
-
+ ))}