From b6b50bf0b4c71b3f7d72f4816442922b11eb2564 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 13 Dec 2023 15:50:34 +0100 Subject: [PATCH] Use new plugin index sort and recommended tags --- .../plugins/plugin-search/plugin-search.component.html | 6 +++++- .../+admin/plugins/plugin-search/plugin-search.component.ts | 2 +- .../src/plugins/plugin-index/peertube-plugin-index.model.ts | 1 + server/core/initializers/constants.ts | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/client/src/app/+admin/plugins/plugin-search/plugin-search.component.html b/client/src/app/+admin/plugins/plugin-search/plugin-search.component.html index 9c45ee590..189002eae 100644 --- a/client/src/app/+admin/plugins/plugin-search/plugin-search.component.html +++ b/client/src/app/+admin/plugins/plugin-search/plugin-search.component.html @@ -34,9 +34,13 @@
Installed - + Official + + + Recommended +
diff --git a/client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts b/client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts index 5539d1c13..af24c58dd 100644 --- a/client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts +++ b/client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts @@ -20,7 +20,7 @@ export class PluginSearchComponent implements OnInit { itemsPerPage: 10, totalItems: null } - sort = '-popularity' + sort = '-trending' search = '' isSearching = false diff --git a/packages/models/src/plugins/plugin-index/peertube-plugin-index.model.ts b/packages/models/src/plugins/plugin-index/peertube-plugin-index.model.ts index 36dfef943..d43a52d26 100644 --- a/packages/models/src/plugins/plugin-index/peertube-plugin-index.model.ts +++ b/packages/models/src/plugins/plugin-index/peertube-plugin-index.model.ts @@ -10,6 +10,7 @@ export interface PeerTubePluginIndex { latestVersion: string official: boolean + recommended: boolean name?: string installed?: boolean diff --git a/server/core/initializers/constants.ts b/server/core/initializers/constants.ts index 669de5a47..4ba2fb367 100644 --- a/server/core/initializers/constants.ts +++ b/server/core/initializers/constants.ts @@ -124,7 +124,7 @@ const SORTABLE_COLUMNS = { PLUGINS: [ 'name', 'createdAt', 'updatedAt' ], - AVAILABLE_PLUGINS: [ 'npmName', 'popularity' ], + AVAILABLE_PLUGINS: [ 'npmName', 'popularity', 'trending' ], VIDEO_REDUNDANCIES: [ 'name' ] }