Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Framasoft
PeerTube
PeerTube
Commits
62eacb42
Verified
Commit
62eacb42
authored
Apr 11, 2020
by
Rigel Kent
☕
Browse files
Place private/unlisted labels in thumbnail instead of miniature
parent
58e1765a
Changes
3
Hide whitespace changes
Inline
Side-by-side
client/src/app/shared/video/video-miniature.component.html
View file @
62eacb42
...
...
@@ -2,7 +2,10 @@
<my-video-thumbnail
[video]=
"video"
[nsfw]=
"isVideoBlur"
[displayWatchLaterPlaylist]=
"isWatchLaterPlaylistDisplayed()"
[inWatchLaterPlaylist]=
"inWatchLaterPlaylist"
(watchLaterClick)=
"onWatchLaterClick($event)"
></my-video-thumbnail>
>
<ng-container
ngProjectAs=
"label-warning"
*ngIf=
"displayOptions.privacyLabel && isUnlistedVideo()"
i18n
>
Unlisted
</ng-container>
<ng-container
ngProjectAs=
"label-danger"
*ngIf=
"displayOptions.privacyLabel && isPrivateVideo()"
i18n
>
Private
</ng-container>
</my-video-thumbnail>
<div
class=
"video-bottom"
>
<div
class=
"video-miniature-information"
>
...
...
@@ -19,11 +22,6 @@
<ng-container
*ngIf=
"displayOptions.date && displayOptions.views"
>
•
</ng-container>
<ng-container
i18n
*ngIf=
"displayOptions.views"
>
{video.views, plural, =1 {1 view} other {{{ video.views | myNumberFormatter }} views}}
</ng-container>
</span>
<ng-container
*ngIf=
"displayOptions.privacyLabel"
>
<span
*ngIf=
"isUnlistedVideo()"
class=
"badge badge-warning ml-1"
i18n
>
Unlisted
</span>
<span
*ngIf=
"isPrivateVideo()"
class=
"badge badge-danger ml-1"
i18n
>
Private
</span>
</ng-container>
</span>
<a
tabindex=
"-1"
*ngIf=
"displayOptions.by && displayOwnerAccount()"
class=
"video-miniature-account"
[routerLink]=
"[ '/accounts', video.byAccount ]"
>
...
...
client/src/app/shared/video/video-thumbnail.component.html
View file @
62eacb42
...
...
@@ -18,6 +18,9 @@
</ng-container>
</div>
<div
class=
"video-thumbnail-label-overlay warning"
><ng-content
select=
"label-warning"
></ng-content></div>
<div
class=
"video-thumbnail-label-overlay danger"
><ng-content
select=
"label-danger"
></ng-content></div>
<div
class=
"video-thumbnail-duration-overlay"
>
{{ video.durationLabel }}
</div>
<div
class=
"play-overlay"
>
...
...
client/src/app/shared/video/video-thumbnail.component.scss
View file @
62eacb42
...
...
@@ -19,6 +19,7 @@
}
.video-thumbnail-watch-later-overlay
,
.video-thumbnail-label-overlay
,
.video-thumbnail-duration-overlay
{
@include
static-thumbnail-overlay
;
...
...
@@ -28,6 +29,16 @@
z-index
:
z
(
miniature
);
}
.video-thumbnail-label-overlay
{
position
:
absolute
;
padding
:
0
5px
;
left
:
5px
;
top
:
5px
;
&
.warning
{
background-color
:
orange
;
}
&
.danger
{
background-color
:
red
;
}
}
.video-thumbnail-duration-overlay
{
position
:
absolute
;
padding
:
0
5px
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment