clean up file page and reactions

This commit is contained in:
zeppi 2021-10-16 16:24:52 -04:00 committed by jessopb
parent 34c0f8cd04
commit 2d008899b6
3 changed files with 20 additions and 9 deletions

View file

@ -302,7 +302,7 @@ function CommentList(props: Props) {
{readyToDisplayComments && topLevelComments && getCommentElems(topLevelComments)} {readyToDisplayComments && topLevelComments && getCommentElems(topLevelComments)}
</ul> </ul>
{!hasDefaultExpansion && ( {!hasDefaultExpansion && topLevelComments && Boolean(topLevelComments.length) && (
<div className="card__bottom-actions--comments"> <div className="card__bottom-actions--comments">
{(!expandedComments || moreBelow) && ( {(!expandedComments || moreBelow) && (
<Button <Button

View file

@ -76,7 +76,10 @@ function FileReactions(props: Props) {
title={__('I like this')} title={__('I like this')}
requiresAuth={IS_WEB} requiresAuth={IS_WEB}
authSrc="filereaction_like" authSrc="filereaction_like"
className={classnames('button--file-action', { 'button--fire': myReaction === REACTION_TYPES.LIKE })} className={classnames('button--file-action', {
'button--fire': SIMPLE_SITE && myReaction === REACTION_TYPES.LIKE,
'button--file-action-active': !SIMPLE_SITE && myReaction === REACTION_TYPES.LIKE,
})}
label={ label={
<> <>
{myReaction === REACTION_TYPES.LIKE && SIMPLE_SITE && ( {myReaction === REACTION_TYPES.LIKE && SIMPLE_SITE && (
@ -101,7 +104,10 @@ function FileReactions(props: Props) {
requiresAuth={IS_WEB} requiresAuth={IS_WEB}
authSrc={'filereaction_dislike'} authSrc={'filereaction_dislike'}
title={__('I dislike this')} title={__('I dislike this')}
className={classnames('button--file-action', { 'button--slime': myReaction === REACTION_TYPES.DISLIKE })} className={classnames('button--file-action', {
'button--slime': SIMPLE_SITE && myReaction === REACTION_TYPES.DISLIKE,
'button--file-action-active': !SIMPLE_SITE && myReaction === REACTION_TYPES.DISLIKE,
})}
label={ label={
<> <>
{myReaction === REACTION_TYPES.DISLIKE && SIMPLE_SITE && ( {myReaction === REACTION_TYPES.DISLIKE && SIMPLE_SITE && (

View file

@ -176,12 +176,12 @@
transition: background 0.2s; transition: background 0.2s;
} }
.vjs-button--autoplay-next.vjs-button[aria-checked=true] { .vjs-button--autoplay-next.vjs-button[aria-checked='true'] {
background: var(--color-primary); background: var(--color-primary);
} }
.vjs-button--autoplay-next.vjs-button::after { .vjs-button--autoplay-next.vjs-button::after {
content: ""; content: '';
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
@ -193,7 +193,7 @@
transition: transform 0.2s; transition: transform 0.2s;
} }
.vjs-button--autoplay-next.vjs-button[aria-checked=true]::after { .vjs-button--autoplay-next.vjs-button[aria-checked='true']::after {
transform: translateX(12px); transform: translateX(12px);
} }
@ -282,9 +282,7 @@
padding: 0 var(--spacing-xxs); padding: 0 var(--spacing-xxs);
.icon { .icon {
&:not(.color-override) { stroke: var(--color-text-subtitle);
stroke: #777;
}
} }
.button__label { .button__label {
@ -305,6 +303,13 @@
} }
} }
.button--file-action-active {
.icon {
fill: var(--color-primary-alt);
stroke: var(--color-primary);
}
}
.button--fire { .button--fire {
color: var(--color-fire); color: var(--color-fire);
position: relative; position: relative;