Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Framasoft
PeerTube
PeerTube
Commits
4d5e572f
Verified
Commit
4d5e572f
authored
Apr 01, 2021
by
Chocobozzz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Account/channel videos display as rows
parent
0f7407d9
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
12 deletions
+26
-12
client/src/app/+accounts/account-videos/account-videos.component.ts
.../app/+accounts/account-videos/account-videos.component.ts
+4
-0
client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.scss
...-channel-playlists/video-channel-playlists.component.scss
+2
-3
client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts
...ls/video-channel-videos/video-channel-videos.component.ts
+4
-0
client/src/app/shared/shared-video-miniature/abstract-video-list.html
...pp/shared/shared-video-miniature/abstract-video-list.html
+2
-2
client/src/app/shared/shared-video-miniature/abstract-video-list.scss
...pp/shared/shared-video-miniature/abstract-video-list.scss
+9
-0
client/src/app/shared/shared-video-miniature/abstract-video-list.ts
.../app/shared/shared-video-miniature/abstract-video-list.ts
+5
-0
client/src/sass/include/_miniature.scss
client/src/sass/include/_miniature.scss
+0
-7
No files found.
client/src/app/+accounts/account-videos/account-videos.component.ts
View file @
4d5e572f
...
...
@@ -93,4 +93,8 @@ export class AccountVideosComponent extends AbstractVideoList implements OnInit,
generateSyndicationList
()
{
this
.
syndicationItems
=
this
.
videoService
.
getAccountFeedUrls
(
this
.
account
.
id
)
}
displayAsRow
()
{
return
this
.
screenService
.
isInMobileView
()
}
}
client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.scss
View file @
4d5e572f
...
...
@@ -24,10 +24,9 @@
}
.playlists
{
text-align
:
left
!
important
;
justify-content
:
left
!
important
;
justify-content
:
left
;
margin-left
:
pvar
(
--
horizontalMarginContent
)
!
important
;
margin-right
:
var
(
--
horizontalMarginContent
)
!
important
;
margin-right
:
p
var
(
--
horizontalMarginContent
)
!
important
;
}
}
client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts
View file @
4d5e572f
...
...
@@ -112,4 +112,8 @@ export class VideoChannelVideosComponent extends AbstractVideoList implements On
this
.
reloadVideos
()
}
displayAsRow
()
{
return
this
.
screenService
.
isInMobileView
()
}
}
client/src/app/shared/shared-video-miniature/abstract-video-list.html
View file @
4d5e572f
...
...
@@ -43,7 +43,7 @@
<div
class=
"no-results"
i18n
*ngIf=
"hasDoneFirstQuery && videos.length === 0"
>
No results.
</div>
<div
myInfiniteScroller
(nearOfBottom)=
"onNearOfBottom()"
[autoInit]=
"true"
[dataObservable]=
"onDataSubject.asObservable()"
class=
"videos"
class=
"videos"
[ngClass]=
"{ 'display-as-row': displayAsRow() }"
>
<ng-container
*ngFor=
"let video of videos; trackBy: videoById;"
>
<h2
class=
"date-title"
*ngIf=
"getCurrentGroupedDateLabel(video)"
>
...
...
@@ -52,7 +52,7 @@
<div
class=
"video-wrapper"
>
<my-video-miniature
[video]=
"video"
[user]=
"userMiniature"
[video]=
"video"
[user]=
"userMiniature"
[displayAsRow]=
"displayAsRow()"
[displayVideoActions]=
"displayVideoActions"
[displayOptions]=
"displayOptions"
(videoBlocked)=
"removeVideoFromArray(video)"
(videoRemoved)=
"removeVideoFromArray(video)"
>
...
...
client/src/app/shared/shared-video-miniature/abstract-video-list.scss
View file @
4d5e572f
...
...
@@ -72,6 +72,15 @@ $iconSize: 16px;
@include
grid-videos-miniature-layout
;
}
.display-as-row.videos
{
margin-left
:
pvar
(
--
horizontalMarginContent
);
margin-right
:
pvar
(
--
horizontalMarginContent
);
.video-wrapper
{
margin-bottom
:
15px
;
}
}
@media
screen
and
(
max-width
:
$mobile-view
)
{
.videos-header
{
flex-direction
:
column
;
...
...
client/src/app/shared/shared-video-miniature/abstract-video-list.ts
View file @
4d5e572f
...
...
@@ -319,6 +319,11 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, AfterConte
viewContainerRef
.
createComponent
(
componentFactory
,
0
,
injector
)
}
// Can be redefined by child
displayAsRow
()
{
return
false
}
// On videos hook for children that want to do something
protected
onMoreVideos
()
{
/* empty */
}
...
...
client/src/sass/include/_miniature.scss
View file @
4d5e572f
...
...
@@ -157,11 +157,4 @@
}
}
}
@media
screen
and
(
max-width
:
$mobile-view
)
{
.videos
,
.playlists
{
text-align
:
center
;
}
}
}
Write
Preview
Markdown
is supported
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