diff --git a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.html b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.html
index 307884c70..878772359 100644
--- a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.html
+++ b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.html
@@ -1,4 +1,6 @@
-
+
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts
index a2a12bec7..746359851 100644
--- a/client/src/app/shared/video/abstract-video-list.ts
+++ b/client/src/app/shared/video/abstract-video-list.ts
@@ -150,6 +150,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableFor
this.getVideosObservable(this.pagination.currentPage).subscribe(
({ data, total }) => {
this.pagination.totalItems = total
+ this.videos = []
this.videos = this.videos.concat(data)
if (this.groupByDate) this.buildGroupedDateLabels()
@@ -170,7 +171,6 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableFor
reloadVideos () {
this.pagination.currentPage = 1
- this.videos = []
this.loadMoreVideos()
}
diff --git a/client/src/app/shared/video/video-miniature.component.scss b/client/src/app/shared/video/video-miniature.component.scss
index 3988cc055..ac83c5dfa 100644
--- a/client/src/app/shared/video/video-miniature.component.scss
+++ b/client/src/app/shared/video/video-miniature.component.scss
@@ -100,7 +100,8 @@ $more-margin-right: 15px;
flex-direction: row;
margin-bottom: 0;
height: auto;
- width: 100%;
+ display: flex;
+ flex-grow: 1;
my-video-thumbnail {
margin-right: 10px;
diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts
index 9adf46495..2dd47d74e 100644
--- a/client/src/app/shared/video/video.service.ts
+++ b/client/src/app/shared/video/video.service.ts
@@ -121,14 +121,15 @@ export class VideoService implements VideosProvider {
.pipe(catchError(err => this.restExtractor.handleError(err)))
}
- getMyVideos (videoPagination: ComponentPagination, sort: VideoSortField): Observable> {
+ getMyVideos (videoPagination: ComponentPagination, sort: VideoSortField, search?: string): Observable> {
const pagination = this.restService.componentPaginationToRestPagination(videoPagination)
let params = new HttpParams()
params = this.restService.addRestGetParams(params, pagination, sort)
+ params = this.restService.addObjectParams(params, { search })
return this.authHttp
- .get>(UserService.BASE_USERS_URL + '/me/videos', { params })
+ .get>(UserService.BASE_USERS_URL + 'me/videos', { params })
.pipe(
switchMap(res => this.extractVideos(res)),
catchError(err => this.restExtractor.handleError(err))
diff --git a/client/src/app/videos/+video-watch/comment/video-comments.component.scss b/client/src/app/videos/+video-watch/comment/video-comments.component.scss
index 9e3682295..c02f6c21b 100644
--- a/client/src/app/videos/+video-watch/comment/video-comments.component.scss
+++ b/client/src/app/videos/+video-watch/comment/video-comments.component.scss
@@ -27,6 +27,7 @@
font-weight: 600;
text-transform: uppercase;
border: none;
+ transform: translateY(-7%);
}
my-feed {
diff --git a/client/src/sass/primeng-custom.scss b/client/src/sass/primeng-custom.scss
index 0acffef3c..9398f0adc 100644
--- a/client/src/sass/primeng-custom.scss
+++ b/client/src/sass/primeng-custom.scss
@@ -10,6 +10,12 @@
color: var(--mainForegroundColor) !important;
}
+my-edit-button,
+my-delete-button,
+my-button {
+ height: max-content;
+}
+
// data table customizations
p-table {
.ui-table-caption {
diff --git a/server/controllers/api/users/me.ts b/server/controllers/api/users/me.ts
index ba976ab03..b1f29f252 100644
--- a/server/controllers/api/users/me.ts
+++ b/server/controllers/api/users/me.ts
@@ -99,7 +99,8 @@ async function getUserVideos (req: express.Request, res: express.Response) {
user.Account.id,
req.query.start as number,
req.query.count as number,
- req.query.sort as VideoSortField
+ req.query.sort as VideoSortField,
+ req.query.search as string
)
const additionalAttributes = {
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 164122ee2..1f3c25ecb 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -1196,9 +1196,15 @@ export class VideoModel extends Model {
})
}
- static listUserVideosForApi (accountId: number, start: number, count: number, sort: string) {
+ static listUserVideosForApi (
+ accountId: number,
+ start: number,
+ count: number,
+ sort: string,
+ search?: string
+ ) {
function buildBaseQuery (): FindOptions {
- return {
+ let baseQuery = {
offset: start,
limit: count,
order: getVideoSort(sort),
@@ -1218,12 +1224,24 @@ export class VideoModel extends Model {
}
]
}
+
+ if (search) {
+ baseQuery = Object.assign(baseQuery, {
+ where: {
+ name: {
+ [ Op.iLike ]: '%' + search + '%'
+ }
+ }
+ })
+ }
+
+ return baseQuery
}
const countQuery = buildBaseQuery()
const findQuery = buildBaseQuery()
- const findScopes = [
+ const findScopes: (string | ScopeOptions)[] = [
ScopeNames.WITH_SCHEDULED_UPDATE,
ScopeNames.WITH_BLACKLISTED,
ScopeNames.WITH_THUMBNAILS