lbry-desktop/ui/scss/component/_claim-list.scss
Rafael Saes 83dbe8ec7c
Playlists v2: Refactors, touch ups + Queue Mode (#1604)
* Playlists v2

* Style pass

* Change playlist items arrange icon

* Playlist card body open by default

* Refactor collectionEdit components

* Paginate & Refactor bid field

* Collection page changes

* Add Thumbnail optional

* Replace extra info for description on collection page

* Playlist card right below video on medium screen

* Allow editing private collections

* Add edit option to menus

* Allow deleting a public playlist but keeping a private version

* Add queue to Save menu, remove edit option from Builtin pages, show queue on playlists page

* Fix scroll to recent persisting on medium screen

* Fix adding to queue from menu

* Fixes for delete

* PublishList: delay mounting Items tab to prevent lock-up (#1783)

For a large list, the playlist publish form is unusable (super-slow typing) due to the entire list being mounted despite the tab is not active.
The full solution is still to paginate it, but for now, don't mount the tab until it is selected. Add a spinner to indicate something is loading. It's not prefect, but it's throwaway code anyway. At least we can fill in the fields properly now.

* Batch-resolve private collections (#1782)

* makeSelectClaimForClaimId --> selectClaimForClaimId

Move away from the problematic `makeSelect*`, especially in large loops.

* Batch-resolve private collections
1758

This alleviates the lock-up that is caused by large number of invidual resolves. There will still be some minor stutter due to the large DOM that React needs to handle -- that is logged in 1758 and will be handled separately.

At least the stutter is short (1-2s) and the app is still usable.
Private list items are being resolve individually, super slow if the list is large (>100). Published lists doesn't have this issue.
doFetchItemsInCollections contains most of the useful logic, but it isn't called for private/built-in lists because it's not an actual claim.
Tweaked doFetchItemsInCollections to handle private (UUID-based) collections.

* Use persisted state for floating player playlist card body
- I find it annoying being open everytime

* Fix removing edits from published playlist

* Fix scroll on mobile

* Allow going editing items from toast

* Fix ClaimShareButton

* Prevent edit/publish of builtin

* Fix async inside forEach

* Fix sync on queue edit

* Fix autoplayCountdown replay

* Fix deleting an item scrolling the playlist

* CreatedAt fixes

* Remove repost for now

* Anon publish fixes

* Fix mature case on floating

Co-authored-by: infinite-persistence <64950861+infinite-persistence@users.noreply.github.com>
2022-07-13 10:59:59 -03:00

1648 lines
31 KiB
SCSS

.claim-list {
// List view :not(.claim-preview__wrapper--channel)
.claim-preview__wrapper:not(.claim-preview__wrapper--small) {
padding: var(--spacing-m);
background-color: rgba(var(--color-header-background-base), 0.6);
.claim__menu-button {
// margin-right: var(--spacing-m);
right: 9px;
}
.media__thumb {
width: calc(var(--file-list-thumbnail-width) * 1.2);
}
&:hover {
background-color: rgba(var(--color-header-background-base), 0.9);
}
}
@media (max-width: $breakpoint-small) {
.media__thumb {
width: var(--file-list-thumbnail-width) !important;
}
}
}
.claim-list--no-margin {
li {
@include list-hover-effect;
margin: 0px !important;
}
}
.claim__menu-button {
.icon {
transition: transform 0.2s;
}
}
[aria-expanded='true'].claim__menu-button {
opacity: 1;
// background-color: var(--color-header-background);
background-color: rgba(var(--color-header-button-base), 0.9);
//border-radius: var(--border-radius);
border-radius: 50%;
outline: 2px solid var(--color-header-background);
.icon {
stroke: var(--color-primary) !important;
transform: rotate(-90deg);
}
}
.claim-list__header {
display: flex;
flex-wrap: wrap;
align-items: center;
margin: var(--spacing-m) 0;
margin-top: 0;
font-size: var(--font-body);
.spinner {
margin-left: var(--spacing-m);
}
@media (max-width: $breakpoint-small) {
margin-top: var(--spacing-s);
}
}
.claim-list__dropdown {
padding: 0 var(--spacing-m);
padding-right: var(--spacing-xl);
background-position: right var(--spacing-m) center;
@media (max-width: $breakpoint-small) {
margin-left: 0;
}
}
.claim-list__header-label {
position: absolute;
transform: translateY(-130%);
font-size: var(--font-body);
font-weight: var(--font-weight-bold);
margin-top: var(--spacing-m);
color: var(--color-text);
overflow: visible;
.icon {
width: var(--font-small);
height: var(--font-small);
margin-right: var(--spacing-xs);
stroke: var(--color-text);
}
@media (max-width: $breakpoint-small) {
position: static;
transform: none;
}
}
.claim-list__header-label--playlist-page {
@extend .claim-list__header-label;
position: relative;
transform: translateY(-100%);
margin-bottom: 0px;
}
.claim-list__conjuction {
color: var(--color-text-subtitle);
font-size: var(--font-small);
}
.claim-list__alt-controls {
align-self: flex-start;
display: flex;
align-items: center;
margin-left: auto;
& > * {
margin-left: var(--spacing-s);
}
.card__actions--inline:first-child {
margin-left: unset;
}
@media (max-width: $breakpoint-small) {
display: none;
}
}
.claim-list__alt-controls--wrap {
@extend .claim-list__alt-controls;
@media (max-width: $breakpoint-small) {
display: flex;
flex-wrap: wrap;
}
}
.claim-preview__wrapper {
@include font-sans;
padding: var(--spacing-m);
border-radius: var(--border-radius);
list-style: none;
position: relative;
.claim-tile__info {
padding-bottom: unset;
}
.claim__menu-button {
right: calc(var(--spacing-m) - 8px);
margin-top: var(--spacing-xxs);
}
.claim__tags {
.tag {
color: var(--color-text);
background-color: var(--color-header-button);
&:hover {
background-color: var(--color-primary);
color: var(--color-primary-contrast);
}
}
}
.claim-preview__repost-author {
width: 120px;
height: 120px;
overflow: hidden;
position: absolute;
top: var(--spacing-m);
left: var(--spacing-m);
.claim-preview__repost-ribbon {
position: absolute;
display: block;
width: 225px;
padding-top: 4px;
padding-right: 8px;
background-color: rgba(var(--color-primary-dynamic), 0.8);
color: var(--color-primary-contrast);
text-align: center;
z-index: 1;
font-size: var(--font-xxsmall);
left: -80px;
top: 10px;
transform: rotate(-45deg);
.button--uri-indicator {
top: -3px;
}
.button {
width: 80px;
text-align: center;
.button__content {
width: 100%;
.channel-name {
width: 100%;
color: var(--color-primary-contrast);
font-size: var(--font-xxsmall);
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: unset;
&:hover {
color: var(--color-secondary);
}
}
}
}
.comment__badge {
display: none;
}
}
@media (max-width: $breakpoint-small) {
top: var(--spacing-s);
left: var(--spacing-s);
height: 80px;
width: 80px;
.claim-preview__repost-ribbon {
width: 190px;
padding-top: 0;
left: -66px;
.icon {
margin-bottom: -4px;
}
.button {
width: 70px;
.button__content {
.channel-name {
font-size: var(--font-xxxsmall);
}
}
}
}
}
}
.claim-preview {
.claim-preview__text {
overflow: hidden;
}
.claim-preview-metadata {
.claim-tile__info {
.media__subtitle {
.button {
display: inline;
}
span:not(.channel-name) {
font-size: var(--font-xsmall);
}
}
}
}
}
@media (any-pointer: fine) {
&:hover {
.claim__menu-button {
opacity: 1;
}
.collection-preview-overlay__grid {
opacity: 1;
transition: 0.3s;
}
}
}
@media (max-width: $breakpoint-small) {
// padding: var(--spacing-s) !important;
.claim-preview {
.media__thumb {
width: calc(var(--file-list-thumbnail-width) * 0.8) !important;
}
.claim-preview-metadata {
.claim-tile__info {
margin-top: var(--spacing-xxxs);
}
.claim-preview__title {
margin-right: var(--spacing-m);
}
.media__subtitle {
.button__content {
height: auto;
}
.view_count {
font-size: var(--font-xsmall);
}
}
}
.claim-preview__actions {
margin-top: 0;
.claim-preview__primary-actions {
.claim-preview__channel-staked {
margin-bottom: 0;
}
}
}
}
.claim__menu-button {
opacity: 1;
}
}
}
.claim-preview__wrapper--notice {
background-color: var(--color-notice);
}
.claim-preview__wrapper--inline {
padding: 0;
}
.claim-preview__wrapper--small {
padding-top: var(--spacing-s);
padding-bottom: 0px !important;
margin-bottom: 0px !important;
padding-left: 0px;
padding-right: 0px;
.claim-preview__title {
font-size: var(--font-small);
}
@media (max-width: $breakpoint-small) {
margin-bottom: var(--spacing-xxs) !important;
padding: 0 !important;
}
.button--uri-indicator {
max-width: 12rem;
}
.claim__menu-button {
// right: -8px !important;
margin-top: 6px;
&:hover {
.icon {
stroke: var(--color-link);
}
}
}
}
.claim-preview__wrapper--channel {
position: relative;
border-radius: var(--border-radius);
background: rgba(var(--color-header-background-base), 0.6);
padding: var(--spacing-m) !important;
.channel-name {
&:hover {
color: var(--color-secondary);
}
}
.claim__menu-button {
right: 0;
margin-top: var(--spacing-xxs);
.icon {
stroke: var(--color-text);
}
&:hover {
.icon {
stroke: var(--color-primary);
}
}
}
.claim-preview__repost-author {
left: 0px;
top: 0px;
font-size: var(--font-small);
opacity: 0.8;
z-index: 5;
svg {
margin-right: 4px;
margin-bottom: -2px;
}
}
&:hover {
background: rgba(var(--color-header-background-base), 0.9);
}
}
.claim-preview {
flex: 1;
display: flex;
position: relative;
overflow: visible;
&:not(.claim-preview--inline):not(.claim-preview--pending):not(.claim-preview--inactive) {
cursor: pointer;
}
.media__thumb {
overflow: hidden;
$width: calc(var(--file-list-thumbnail-width) * 1.2);
width: var(--file-list-thumbnail-width);
@include handleClaimListGifThumbnail($width);
flex-shrink: 0;
margin-right: var(--spacing-s);
box-shadow: 0 0 0 1px rgba(var(--color-primary-dynamic), 0.1) inset;
}
.media__thumb-placeholder-text {
display: flex;
align-items: center;
padding: var(--spacing-m);
}
.channel-thumbnail {
@include handleChannelGif(6rem);
}
// any-pointer media query prevents double click hover bug on ipad
@media (any-pointer: fine) {
// show watch later button and duration divs when hovered
&:hover {
.media__thumb {
box-shadow: 0 0 0 1px rgba(var(--color-primary-dynamic), 1) inset;
}
.claim-preview__title {
color: var(--color-link);
}
.claim-preview__hover-actions {
display: block;
}
.claim-preview__file-property-overlay {
opacity: 1;
}
.button--file-action {
.icon {
stroke: #f3f4f6;
}
}
.ff-canvas {
opacity: 0 !important;
transition: opacity 1s !important;
}
.ff-image {
opacity: 1 !important;
}
}
}
@media (max-width: $breakpoint-small) {
font-size: 14px;
.channel-thumbnail {
@include handleChannelGif(4rem);
}
}
}
.claim-preview--premium-plus {
.media__thumb {
background-color: #283263;
background-image: url('~ui/component/membershipSplash/astronaut_n_friends.png');
background-size: 100%;
}
.icon {
color: var(--color-text);
width: 2.1rem;
height: 2.1rem;
float: left;
margin-right: var(--spacing-s);
}
.channel-name {
font-weight: var(--font-weight-bold);
&:hover {
color: var(--color-text);
}
}
}
.claim-preview__empty {
display: flex;
align-items: center;
justify-content: center;
}
.claim-preview--large {
border: none;
min-height: 8rem;
&:hover {
background-color: transparent;
}
@media (max-width: $breakpoint-small) {
min-height: 4rem;
}
.media__thumb {
width: 14rem;
@include handleClaimListGifThumbnail(14rem);
@media (max-width: $breakpoint-small) {
min-height: 5rem;
width: 8rem;
}
}
.channel-thumbnail {
width: 7.5rem;
@include handleChannelGif(7.5rem);
@media (max-width: $breakpoint-small) {
width: 5rem;
@include handleChannelGif(5rem);
}
}
.claim-preview__text {
height: 7.5rem;
}
@media (max-width: $breakpoint-small) {
.channel-thumbnail {
@include handleChannelGif(6rem);
}
.claim-preview__text {
height: 3.5rem;
}
}
}
.claim-preview--small {
.channel-thumbnail {
@include handleChannelGif(4rem);
}
.media__thumb {
background-size: 100%;
background-position: center;
transition: background-size 0.2s ease-in-out;
}
&:hover {
.claim-preview__title {
color: var(--color-link);
}
.media__thumb {
background-size: 108%;
}
}
.media__subtitle {
display: flex;
flex-direction: column;
}
}
.claim-preview--pending {
opacity: 0.6;
.claim-tile__info {
flex-wrap: wrap;
.claim-preview__channel-staked {
flex-basis: 2.1rem;
}
.confirming-change {
flex-basis: 100%;
}
}
.card__main-actions {
border-top: unset;
}
}
.claim-preview--padded {
padding: var(--spacing-s);
}
.claim-preview--inline {
.channel-thumbnail {
@include handleChannelGif(2.5rem);
@media (min-width: $breakpoint-small) {
@include handleChannelGif(var(--channel-thumbnail-width--small));
}
}
.claim-preview__actions {
align-self: flex-end;
margin-bottom: auto;
width: auto;
.button--alt {
color: var(--color-primary-contrast);
.icon {
stroke: var(--color-primary-contrast);
}
}
}
.claim-preview__text {
width: 100%;
flex-direction: row;
justify-content: space-between;
flex-wrap: wrap;
align-items: top;
}
@media (max-width: $breakpoint-xsmall) {
.claim-preview__actions {
.claim-preview__primary-actions {
.button {
margin-top: 0;
}
}
}
}
}
.claim-preview--channel {
.claim-preview__actions {
margin-top: 0px;
}
@media (max-width: $breakpoint-small) {
a.button--no-style:first-of-type {
.button__content {
align-items: unset;
}
}
}
}
.claim-preview__text {
width: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.claim-preview__title {
font-weight: var(--font-weight-bold);
font-size: var(--font-body);
margin-right: var(--spacing-m);
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
color: rgba(var(--color-text-base), 0.9);
.truncated-text {
display: -webkit-box;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 1 !important;
@media (max-width: $breakpoint-xsmall) {
-webkit-line-clamp: 2 !important;
}
@media (min-width: $breakpoint-medium) {
-webkit-line-clamp: 1 !important;
}
}
}
.claim-preview__channel-sub-count {
color: var(--color-text-subtitle);
font-size: var(--font-xsmall);
}
.claim-preview__custom-properties {
text-align: right;
display: flex;
flex-direction: column;
justify-content: flex-end;
}
.claim-preview-metadata {
display: flex;
flex-direction: column;
flex: 1;
}
.claim-preview-metadata-sub-upload {
position: relative;
//margin-left: 4px;
display: flex;
text-align: left;
}
.claim-preview-info {
align-items: flex-start;
a,
.claim-preview__title {
max-width: 100%;
}
}
.claim-preview-info {
&.playlist-title {
flex-direction: column;
}
}
.claim-preview-info,
.claim-preview-properties {
display: flex;
justify-content: space-between;
}
.claim-preview__actions {
align-self: flex-end;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-top: var(--spacing-xs);
width: 100%;
.button--alt {
color: white;
background-color: var(--color-primary);
}
@media (min-width: $breakpoint-small) {
flex-direction: row;
}
}
.claim-preview__primary-actions {
@extend .section__actions;
margin-right: 0;
&:first-child {
.button {
background-color: var(--color-primary);
}
}
}
.claim-preview__actions--header {
@extend .claim-preview__actions;
flex-wrap: wrap;
}
.claim-preview__button {
margin-left: 2rem;
}
.claim-preview-properties {
align-items: flex-end;
flex: 1;
font-size: var(--font-small);
color: var(--color-text-subtitle);
}
.claim-upload {
flex: 1;
display: flex;
position: relative;
overflow: visible;
padding: var(--spacing-m);
.media__thumb {
width: var(--file-list-thumbnail-width);
flex-shrink: 0;
margin-right: var(--spacing-s);
}
}
.claim-upload__progress--label {
font-size: var(--font-small);
color: var(--color-text-subtitle);
}
.claim-upload__progress--outer {
width: 100%;
border-radius: var(--border-radius);
background-color: var(--color-header-background);
}
.claim-upload__progress--inner {
border-radius: var(--border-radius);
background: var(--color-primary);
padding: var(--spacing-xxs);
height: 2.4rem;
display: flex;
align-items: center;
}
.claim-upload__progress--inner-text {
position: absolute;
color: var(--color-text);
width: 80%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
//
// The _other_ way to view claims
// A grid of tiles
// It should probably go into it's own file once we add more to it
//
.claim-grid {
display: flex;
flex-wrap: wrap;
list-style: none;
align-items: flex-start;
}
.claim-grid__wrapper {
display: flex;
flex-direction: column;
margin-top: var(--spacing-s);
padding-bottom: var(--spacing-l);
//border-bottom: 1px solid var(--color-border);
@media (max-width: $breakpoint-small) {
&:not(:first-of-type) {
margin-top: var(--spacing-s);
}
}
}
.claim-grid__header {
margin-top: var(--spacing-m);
margin-bottom: var(--spacing-m);
display: flex;
align-items: center;
.button {
&:hover {
text-decoration: none;
}
}
.icon__wrapper {
width: 0.5rem;
height: 0.5rem;
background-color: var(--color-header-background);
margin-right: var(--spacing-m);
.icon {
stroke: var(--color-text);
}
@media (min-width: $breakpoint-small) {
height: 1.5rem;
width: 1.5rem;
}
}
.button__content {
&:hover {
.claim-grid__title {
color: var(--color-primary);
}
.icon {
stroke: var(--color-primary);
}
}
}
}
.claim-grid__header--between {
justify-content: space-between;
}
.claim-grid__title {
font-weight: 300;
font-size: var(--font-large);
margin-right: var(--spacing-m);
display: flex;
color: var(--color-text);
}
.claim-grid__title-span {
display: flex;
// margin-top:var(--spacing-m);
&:hover {
color: var(--color-primary);
}
}
.claim-grid__title--empty {
margin-left: var(--spacing-s);
}
.claim-grid__title--first {
text-align: center;
width: 100%;
margin-bottom: var(--spacing-l);
.no-evil {
font-size: var(--font-heading);
}
}
.claim-grid__title--secondary {
margin-left: auto;
}
.claim-grid__help {
margin-bottom: 12px;
svg {
stroke: var(--color-text-subtitle);
}
}
.claim-preview--tile {
margin-bottom: var(--spacing-m);
margin-right: 0;
margin-top: 0;
margin-left: var(--spacing-m);
justify-content: flex-start;
list-style: none;
.media__thumb {
overflow: hidden;
background-size: 100%;
transition: background-size 0.2s ease-in-out;
}
.channel-name {
p {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.claim-tile__title {
.claim__menu-button {
right: calc(var(--spacing-xs) * -1);
}
}
.comment__badge {
display: inherit;
.icon {
margin-bottom: -1px;
padding-bottom: 4px;
}
}
@media (any-pointer: fine) {
&:hover {
cursor: pointer;
.media__thumb {
box-shadow: 0 0 0 1px rgba(var(--color-primary-dynamic), 1) inset;
background-size: 108%;
}
.claim-tile__title {
color: var(--color-link);
}
.claim__menu-button {
opacity: 1;
}
.collection-preview-overlay__grid {
opacity: 1;
transition: 0.3s;
}
}
}
a {
&:focus {
.claim-tile__title {
color: var(--color-primary);
}
.media__thumb {
box-shadow: 0 0 0 1px rgba(var(--color-primary-dynamic), 1) inset;
}
}
}
.claim__menu-button {
&:focus {
border-radius: 50%;
opacity: 1;
}
}
@media (min-width: $breakpoint-large) {
$width: calc((100% - var(--spacing-m) * 5) / 6);
width: $width;
@include handleClaimTileGifThumbnail($width);
&:first-child,
&:nth-child(6n + 1) {
margin-left: 0;
}
}
@media (max-width: $breakpoint-large) and (min-width: $breakpoint-medium) {
$width: calc((100% - var(--spacing-m) * 3) / 4);
width: $width;
@include handleClaimTileGifThumbnail($width);
&:first-child,
&:nth-child(4n + 1) {
margin-left: 0;
}
}
@media (max-width: $breakpoint-medium) and (min-width: $breakpoint-small) {
$width: calc((100% - var(--spacing-m) * 2) / 3);
width: $width;
@include handleClaimTileGifThumbnail($width);
&:first-child,
&:nth-child(3n + 1) {
margin-left: 0;
}
}
@media (max-width: $breakpoint-small) {
$width: 100%;
width: $width;
@include handleClaimTileGifThumbnail($width);
margin-left: 0;
&:not(:first-child) {
margin-top: var(--spacing-s);
}
.claim__menu-button {
opacity: 1;
}
}
}
.claim-preview--horizontal-tile {
&:not(:first-child) {
margin-top: 0;
}
}
.claim-tile__title {
position: relative;
padding: var(--spacing-xs);
padding-left: 0px;
padding-right: var(--spacing-m);
padding-bottom: var(--spacing-xxxs);
margin-bottom: 0;
font-weight: 600;
color: var(--color-text);
font-size: var(--font-small);
@media (min-width: $breakpoint-large) {
min-height: 3.2rem;
padding-bottom: unset;
}
@media (max-width: $breakpoint-small) {
min-height: unset;
}
}
.claim-tile__info {
display: flex;
margin-top: var(--spacing-xxxs);
color: var(--color-subtitle);
padding: 0px;
padding-bottom: var(--spacing-l);
.channel-thumbnail {
@include handleChannelGif(2.1rem);
margin-right: var(--spacing-s);
}
.claim-preview__overlay-properties {
color: rgba(var(--color-text-base) 0.7);
}
@media (max-width: $breakpoint-small) {
padding-bottom: 0;
}
.media__subtitle {
.button__content {
margin-top: 3px;
margin-bottom: -3px;
}
}
}
.claim-tile-collection__info {
display: flex;
color: var(--color-subtitle);
.channel-thumbnail {
@include handleChannelGif(2.1rem);
margin-right: var(--spacing-s);
}
}
.claim-tile__about {
font-size: var(--font-xsmall);
color: var(--color-text-subtitle);
overflow: hidden;
white-space: nowrap;
> * {
display: block;
}
}
.claim-tile__publishes {
font-size: var(--font-xsmall);
}
.claim-tile__about--channel {
@extend .claim-tile__about;
flex: 1;
flex-direction: row;
justify-content: space-between;
align-items: center;
font-size: var(--font-body);
}
.claim-tile__about--counts {
display: flex;
flex-wrap: wrap;
font-size: var(--font-xsmall);
margin-top: -3px;
}
.claim-preview__file-property-overlay {
position: absolute;
bottom: var(--spacing-xxs);
right: var(--spacing-xxs);
background-color: var(--color-black);
padding: 0.3rem;
border-radius: var(--border-radius);
z-index: 2;
opacity: 0.7;
// show full opacity for touch devices
@media (pointer: fine), (pointer: coarse) {
opacity: 0.85;
}
.file-properties {
color: var(--color-white);
}
.file-price {
padding: 0.1rem;
}
}
$claim-preview-progress-bar-height: 5px;
.claim-preview__progress-section {
position: absolute;
bottom: 0;
height: $claim-preview-progress-bar-height;
width: 100%;
background-color: rgba(0, 0, 0, 0.3);
}
.claim-preview__progress-bar {
height: $claim-preview-progress-bar-height;
background-color: var(--color-primary);
}
.claim-preview__claim-property-overlay {
position: absolute;
bottom: var(--spacing-xxs);
right: var(--spacing-xxs);
background-color: var(--color-black);
border-radius: var(--border-radius);
padding: 0.3rem;
opacity: 0.7;
z-index: 2;
.claim-preview__overlay-properties {
color: var(--color-white);
}
.file-price {
padding: 0.1rem;
}
}
.claim-preview__collection-wrapper {
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
z-index: 2;
overflow: hidden;
}
// show duration and watch later button when hovered
.claim-preview--tile {
&:hover {
.claim-preview__hover-actions {
display: block;
}
.claim-preview__file-property-overlay {
opacity: 1;
}
.button--file-action {
.icon {
stroke: #f3f4f6;
}
}
}
}
.claim-preview--tile {
.claim-preview__repost-author {
width: 120px;
height: 120px;
overflow: hidden;
position: absolute;
top: 0px;
left: 0px;
.claim-preview__repost-ribbon {
position: absolute;
display: block;
width: 225px;
padding-top: 4px;
padding-right: 8px;
background-color: rgba(var(--color-primary-dynamic), 0.8);
color: var(--color-primary-contrast);
text-align: center;
z-index: 1;
font-size: var(--font-xxsmall);
right: -25px;
top: 10px;
transform: rotate(-45deg);
.button--uri-indicator {
top: -3px;
}
.button {
width: 80px;
text-align: center;
.button__content {
width: 100%;
.channel-name {
width: 100%;
color: var(--color-primary-contrast);
font-size: var(--font-xxsmall);
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: unset;
&:hover {
opacity: 0.8;
}
}
}
}
.comment__badge {
display: none;
}
}
}
}
.claim-preview__repost-icon {
margin-bottom: -1px; // Offset it slightly because it doesn't look aligned next to all lowercase text + the @ from a channel
}
.claim-preview__list-index {
@extend .center-self;
width: 15px;
position: absolute;
transform: translateX(-23px);
text-align: end;
}
.claim-preview__hover-actions-grid {
display: grid;
justify-items: end;
justify-content: space-between;
.claim-preview__hover-actions {
margin: 0px var(--spacing-xxs);
margin-bottom: var(--spacing-xxs);
&.second-item {
grid-column: 2;
grid-row: 1;
}
&.third-item {
grid-column: 2;
grid-row: 2;
}
}
}
// div that displays watch later button
.claim-preview__hover-actions {
// if the user is using a mouse
@media (pointer: fine) {
display: none;
}
// if the user doesn't have a pointer (mouse etc) hide watch later button
@media (pointer: none), (pointer: coarse) {
display: none !important;
}
position: relative;
float: right;
top: var(--spacing-xxs);
margin-right: var(--spacing-xxs);
& > * {
color: var(--color-text);
background-color: var(--color-black);
padding: var(--spacing-xxs);
margin-right: 0;
&:hover {
background-color: var(--color-black);
}
}
.button--file-action,
.download-text {
display: block;
margin: 0 0;
padding: var(--spacing-xxs) var(--spacing-xxs);
height: unset;
// label (with 'Add' text) hidden by default
.button__label {
color: #f3f4f6;
font-size: var(--font-small);
display: none;
}
// show the additional watch later text (Add) when hovered
&:hover {
.button__label {
display: inline;
}
}
}
.button--file-action {
width: auto;
max-width: 25.59px;
transition: max-width 0.2s;
padding: 0.3rem !important;
.button__content {
flex-direction: row-reverse;
}
.button__label {
margin-top: -1px;
padding-top: 0px;
margin-bottom: -4px;
margin-left: 4px;
margin-right: var(--spacing-xxs);
text-overflow: ellipsis;
}
&:hover {
width: auto;
min-width: 25.59px;
max-width: 140px;
}
}
}
.claim-preview__active {
background-color: rgba(var(--color-primary-dynamic), 0.2);
.claim-preview__title {
color: var(--color-link);
}
.media__thumb {
box-shadow: 0 0 0 1px rgba(var(--color-primary-dynamic), 1) inset;
}
.media__thumb:after {
position: absolute;
top: 50%;
right: 50%;
transform: translate(50%);
top: 0px;
content: '';
z-index: 1;
font-size: 3rem;
color: #fff;
text-shadow: 0 0 3px var(--color-primary), 0 0 5px var(--color-primary);
max-height: 100%;
@media (max-width: $breakpoint-small) {
top: -2px;
left: 66px;
font-size: 3.4rem;
}
}
}
.claim-preview__live {
// margin-bottom: 0 !important;
.claim-preview__file-property-overlay {
opacity: 0.9; // The original 0.7 is not visible over bright thumbnails
color: var(--color-white-alt);
background-color: var(--color-live);
.claim-preview__overlay-properties {
color: white;
}
}
.file-properties {
font-weight: var(--font-weight-bold);
margin-top: 2px; // Even out bottom spacing due to all caps "LIVE".
}
.claim-preview__primary-actions {
margin-right: var(--spacing-xs);
}
}
.claim-link {
@include font-sans;
position: relative;
}
.claim-preview__null-label {
margin: auto;
}
.claim-preview__channel-staked {
display: flex;
align-items: center;
.channel-thumbnail {
@include handleChannelGif(2.1rem);
// margin-right: 0;
}
}
.claim-tile__header {
position: relative;
.icon {
margin-top: 1px;
&:hover {
stroke: var(--color-primary);
}
}
.claim__menu-button {
right: -8px;
}
}
.menu__button {
&.claim__menu-button {
position: absolute;
top: var(--spacing-xs);
//right: var(--spacing-xs);
}
&.claim__menu-button--inline {
position: relative;
@extend .button--alt;
width: var(--height-button);
padding: 0;
border-radius: var(--border-radius);
align-self: flex-end;
}
}
@media (min-width: $breakpoint-small) {
@media (any-pointer: fine) {
.claim-preview--tile:not(:hover),
.claim-preview__wrapper:not(:hover) {
.claim__menu-button:not(:focus):not([aria-expanded='true']) {
opacity: 0;
}
}
}
}
.claim-preview__overlay-properties {
display: flex;
position: relative;
align-items: center;
color: #dddddd;
white-space: nowrap;
font-size: var(--font-xsmall);
line-height: 1.2;
margin-left: 0;
margin-top: auto;
.icon--Heart {
color: var(--color-transparent);
}
& > *:not(:last-child) {
margin-right: var(--spacing-xxs);
}
}
.claim-preview__overlay-properties--small {
@extend .claim-preview__overlay-properties;
line-height: 0.9;
font-size: var(--font-xxsmall);
color: var(--color-text);
@media (min-width: $breakpoint-small) {
&.playlist-channel {
display: flex;
gap: 0.5rem;
.ff-container {
width: 100%;
height: 100%;
.ff-canvas {
max-width: 100%;
max-height: 100%;
}
.ff-image {
width: 100% !important;
height: 100% !important;
}
}
}
}
&.visibility-icon {
color: var(--color-text);
}
}
.claim__tags {
font-size: var(--font-xsmall);
line-height: 1.2;
margin-left: 0;
margin-top: auto;
position: relative;
.tag {
background-color: var(--color-header-background);
color: var(--color-text);
font-size: var(--font-xsmall);
@media (max-width: $breakpoint-small) {
font-size: var(--font-xxsmall);
margin-top: var(--spacing-xxs);
padding: 2px var(--spacing-xxs);
height: unset;
.button__content {
height: unset;
}
}
&:hover {
background-color: var(--color-primary);
color: var(--color-primary-contrast);
}
}
& > *:not(:last-child) {
margin-right: var(--spacing-xxs);
}
}
.claim__tags--large {
flex-wrap: wrap;
margin-left: 0;
margin-bottom: var(--spacing-m);
& > * {
margin-top: var(--spacing-s);
}
}
.web-upload-item.claim-preview {
@media (max-width: $breakpoint-small) {
display: block;
.media__thumb {
margin-bottom: var(--spacing-s);
}
.claim-preview-metadata {
display: block;
}
}
}
.claim-list__scroll-to-recent {
margin-bottom: var(--spacing-xxs);
position: absolute;
right: 50%;
transform: translateX(50%);
z-index: 1600;
font-size: var(--font-xsmall);
padding: var(--spacing-xxs) var(--spacing-s);
bottom: var(--spacing-xxs);
background-color: var(--color-header-button) !important;
-webkit-backdrop-filter: blur(4px);
backdrop-filter: blur(4px);
border: 1px solid var(--color-text);
transition: opacity 0.2s ease, visibility 0.2s ease;
}