18+ tag on source/extension cards (#160)
* 18+ to source card * 18+ extensions card
This commit is contained in:
@@ -23,7 +23,7 @@ interface IProps {
|
|||||||
export default function ExtensionCard(props: IProps) {
|
export default function ExtensionCard(props: IProps) {
|
||||||
const {
|
const {
|
||||||
extension: {
|
extension: {
|
||||||
name, lang, versionName, installed, hasUpdate, obsolete, pkgName, iconUrl,
|
name, lang, versionName, installed, hasUpdate, obsolete, pkgName, iconUrl, isNsfw,
|
||||||
},
|
},
|
||||||
notifyInstall,
|
notifyInstall,
|
||||||
} = props;
|
} = props;
|
||||||
@@ -116,6 +116,11 @@ export default function ExtensionCard(props: IProps) {
|
|||||||
{langPress}
|
{langPress}
|
||||||
{' '}
|
{' '}
|
||||||
{versionName}
|
{versionName}
|
||||||
|
{isNsfw && (
|
||||||
|
<Typography variant="caption" display="inline" gutterBottom color="red">
|
||||||
|
{' 18+'}
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ interface IProps {
|
|||||||
export default function SourceCard(props: IProps) {
|
export default function SourceCard(props: IProps) {
|
||||||
const {
|
const {
|
||||||
source: {
|
source: {
|
||||||
id, name, lang, iconUrl, supportsLatest,
|
id, name, lang, iconUrl, supportsLatest, isNsfw,
|
||||||
},
|
},
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
@@ -99,6 +99,11 @@ export default function SourceCard(props: IProps) {
|
|||||||
{id !== '0' && (
|
{id !== '0' && (
|
||||||
<Typography variant="caption" display="block" gutterBottom>
|
<Typography variant="caption" display="block" gutterBottom>
|
||||||
{langCodeToName(lang)}
|
{langCodeToName(lang)}
|
||||||
|
{isNsfw && (
|
||||||
|
<Typography variant="caption" display="inline" gutterBottom color="red">
|
||||||
|
{' 18+'}
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
Reference in New Issue
Block a user