X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Bmy-account%2Fmy-account-video-playlists%2Fmy-account-video-playlist-elements.component.scss;h=4ac89d08f4ebb74d18c1e1090c1fc8aaf410ab1a;hb=15e9d5ca39e0b792f61453fbf3885a0fc446afa7;hp=3be10078e217cc129132a614d30c522c5d1867d6;hpb=c5a1ae500e68b759f76851552be6dd10631d34f4;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.scss b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.scss index 3be10078e..4ac89d08f 100644 --- a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.scss +++ b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.scss @@ -2,95 +2,121 @@ @import '_mixins'; @import '_miniature'; -.videos { - .video { +.video, .cdk-drag-preview { + display: flex; + align-items: center; + background-color: var(--mainBackgroundColor); + cursor: pointer; + padding: 10px; + border-bottom: 1px solid $separator-border-color; + + &:hover { + background-color: rgba(0, 0, 0, 0.05); + + .more { + display: block; + } + } + + .position { + font-weight: $font-semibold; + margin-right: 10px; + color: $grey-foreground-color; + min-width: 20px; + } + + my-video-thumbnail { + display: flex; // Avoids an issue with line-height that adds space below the element + margin-right: 10px; + + /deep/ .video-thumbnail { + @include miniature-thumbnail(130px, 72px); + } + } + + .video-info { display: flex; - align-items: center; - padding: 10px; - border-bottom: 1px solid $separator-border-color; + flex-direction: column; - &:hover { - background-color: rgba(0, 0, 0, 0.05); + a { + @include disable-default-a-behaviour; - .more { - display: block; - } + color: var(--mainForegroundColor); } - .position { + .video-info-name { + font-size: 18px; font-weight: $font-semibold; - margin-right: 10px; - color: $grey-foreground-color; } - my-video-thumbnail { - display: flex; // Avoids an issue with line-height that adds space below the element - margin-right: 10px; - - /deep/ .video-thumbnail { - @include miniature-thumbnail(130px, 72px); - } + .video-info-account, .video-info-timestamp { + color: $grey-foreground-color; } + } - .video-info { - display: flex; - flex-direction: column; + .more { + justify-self: flex-end; + margin-left: auto; + cursor: pointer; + display: none; - a { - @include disable-default-a-behaviour; + &.show { + display: block; + } - color: var(--mainForegroundColor); - } + .icon-more { + @include apply-svg-color($grey-foreground-color); - .video-info-name { - font-size: 18px; - font-weight: $font-semibold; + &::after { + border: none; } + } - .video-info-account, .video-info-timestamp { - color: $grey-foreground-color; - } + .dropdown-item { + @include dropdown-with-icon-item; } - .more { - justify-self: flex-end; - margin-left: auto; - cursor: pointer; - display: none; + .timestamp-options { + padding-top: 0; + padding-left: 35px; + margin-bottom: 15px; - &.show { - display: block; + > div { + display: flex; + align-items: center; } - .icon-more { - @include apply-svg-color($grey-foreground-color); + input { + @include peertube-button; + @include orange-button; - &::after { - border: none; - } + margin-top: 10px; } + } + } +} - .dropdown-item { - @include dropdown-with-icon-item; - } +// Thanks Angular CDK <3 https://material.angular.io/cdk/drag-drop/examples +.cdk-drag-preview { + box-sizing: border-box; + border-radius: 4px; + box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), + 0 8px 10px 1px rgba(0, 0, 0, 0.14), + 0 3px 14px 2px rgba(0, 0, 0, 0.12); +} - .timestamp-options { - padding-top: 0; - padding-left: 35px; - margin-bottom: 15px; +.cdk-drag-placeholder { + opacity: 0; +} - > div { - display: flex; - align-items: center; - } +.cdk-drag-animating { + transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); +} - input { - @include peertube-button; - @include orange-button; +.video:last-child { + border: none; +} - margin-top: 10px; - } - } - } - } +.videos.cdk-drop-list-dragging .video:not(.cdk-drag-placeholder) { + transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); }