Skip to content

Commit

Permalink
Merge pull request #3558 from thematters/develop
Browse files Browse the repository at this point in the history
Release: v4.23.1
  • Loading branch information
robertu7 authored Jun 12, 2023
2 parents 451dd2c + be0cb05 commit b61c378
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 17 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "matters-web",
"version": "4.23.0",
"version": "4.23.1",
"description": "codebase of Matters' website",
"sideEffects": false,
"author": "Matters <[email protected]>",
Expand Down
6 changes: 3 additions & 3 deletions src/views/ArticleDetail/AppreciationButton/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
transform: scale(0);
}

& .iconSuperlike .superlike_svg__star {
& .iconSuperlike :global(.superlike_svg__star) {
fill-opacity: 0;
transition: fill-opacity 0.1s ease-in-out;
}
Expand All @@ -39,7 +39,7 @@
.isSuperLike {
color: var(--color-matters-gold);

& .icon-like {
& .iconLike {
opacity: 0;
transform: scale(0);
}
Expand All @@ -50,7 +50,7 @@
}

&.superLiked {
& .icon-superlike .superlike_svg__star {
& .iconSuperlike :global(.superlike_svg__star) {
fill-opacity: 1;
}
}
Expand Down
30 changes: 19 additions & 11 deletions src/views/ArticleDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,12 @@ const BaseArticleDetail = ({
const collectionCount = article.collection?.totalCount || 0
const isAuthor = viewer.id === authorId
const circle = article.access.circle
const canReadFullContent =
!!(
isAuthor ||
!circle ||
circle.isMember ||
article.access.type === ArticleAccessType.Public
) && !isSensitive
const canReadFullContent = !!(
isAuthor ||
!circle ||
circle.isMember ||
article.access.type === ArticleAccessType.Public
)

// wall
const { data: clientPreferenceData } = useQuery<ClientPreferenceQuery>(
Expand Down Expand Up @@ -303,7 +302,9 @@ const BaseArticleDetail = ({
canReadFullContent={canReadFullContent}
/>
</section>

{article?.summaryCustomized && <CustomizedSummary summary={summary} />}

{isSensitive && (
<DynamicSensitiveWall
sensitiveByAuthor={article.sensitiveByAuthor}
Expand All @@ -319,12 +320,17 @@ const BaseArticleDetail = ({
translating={translating}
/>
<License license={article.license} />

{circle && !canReadFullContent && (
<DynamicCircleWall circle={circle} />
)}

{features.payment && canReadFullContent && (
<DynamicSupportWidget article={article} />
)}
</>
)}
{circle && !canReadFullContent && <DynamicCircleWall circle={circle} />}
{features.payment && canReadFullContent && (
<DynamicSupportWidget article={article} />
)}

{collectionCount > 0 && (
<section className={styles.block}>
<DynamicCollection
Expand All @@ -333,9 +339,11 @@ const BaseArticleDetail = ({
/>
</section>
)}

<section className={styles.block}>
<DynamicResponse id={article.id} lock={!canReadFullContent} />
</section>

<Media lessThan="xl">
<RelatedArticles article={article} />
</Media>
Expand Down

0 comments on commit b61c378

Please sign in to comment.