diff options
Diffstat (limited to 'client')
5 files changed, 13 insertions, 2 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html index 796aa12ed..48678a194 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html | |||
@@ -271,6 +271,7 @@ | |||
271 | <option i18n value="/videos/overview">Discover videos</option> | 271 | <option i18n value="/videos/overview">Discover videos</option> |
272 | <optgroup i18n-label label="Trending pages"> | 272 | <optgroup i18n-label label="Trending pages"> |
273 | <option i18n value="/videos/trending">Default trending page</option> | 273 | <option i18n value="/videos/trending">Default trending page</option> |
274 | <option i18n value="/videos/trending?alg=best" [disabled]="!trendingVideosAlgorithmsEnabledIncludes('best')">Best videos</option> | ||
274 | <option i18n value="/videos/trending?alg=hot" [disabled]="!trendingVideosAlgorithmsEnabledIncludes('hot')">Hot videos</option> | 275 | <option i18n value="/videos/trending?alg=hot" [disabled]="!trendingVideosAlgorithmsEnabledIncludes('hot')">Hot videos</option> |
275 | <option i18n value="/videos/trending?alg=most-viewed" [disabled]="!trendingVideosAlgorithmsEnabledIncludes('most-viewed')">Most viewed videos</option> | 276 | <option i18n value="/videos/trending?alg=most-viewed" [disabled]="!trendingVideosAlgorithmsEnabledIncludes('most-viewed')">Most viewed videos</option> |
276 | <option i18n value="/videos/trending?alg=most-liked" [disabled]="!trendingVideosAlgorithmsEnabledIncludes('most-liked')">Most liked videos</option> | 277 | <option i18n value="/videos/trending?alg=most-liked" [disabled]="!trendingVideosAlgorithmsEnabledIncludes('most-liked')">Most liked videos</option> |
@@ -288,6 +289,7 @@ | |||
288 | <label i18n for="trendingVideosAlgorithmsDefault">Default trending page</label> | 289 | <label i18n for="trendingVideosAlgorithmsDefault">Default trending page</label> |
289 | <div class="peertube-select-container"> | 290 | <div class="peertube-select-container"> |
290 | <select id="trendingVideosAlgorithmsDefault" formControlName="default" class="form-control"> | 291 | <select id="trendingVideosAlgorithmsDefault" formControlName="default" class="form-control"> |
292 | <option i18n value="best">Best videos</option> | ||
291 | <option i18n value="hot">Hot videos</option> | 293 | <option i18n value="hot">Hot videos</option> |
292 | <option i18n value="most-viewed">Most viewed videos</option> | 294 | <option i18n value="most-viewed">Most viewed videos</option> |
293 | <option i18n value="most-liked">Most liked videos</option> | 295 | <option i18n value="most-liked">Most liked videos</option> |
diff --git a/client/src/app/+videos/video-list/trending/video-trending-header.component.ts b/client/src/app/+videos/video-list/trending/video-trending-header.component.ts index 33eaa2c1e..a4a1e358f 100644 --- a/client/src/app/+videos/video-list/trending/video-trending-header.component.ts +++ b/client/src/app/+videos/video-list/trending/video-trending-header.component.ts | |||
@@ -36,6 +36,13 @@ export class VideoTrendingHeaderComponent extends VideoListHeaderComponent imple | |||
36 | 36 | ||
37 | this.buttons = [ | 37 | this.buttons = [ |
38 | { | 38 | { |
39 | label: $localize`:A variant of Trending videos based on the number of recent interactions, minus user history:Best`, | ||
40 | iconName: 'award', | ||
41 | value: 'best', | ||
42 | tooltip: $localize`Videos totalizing the most interactions for recent videos, minus user history`, | ||
43 | hidden: true | ||
44 | }, | ||
45 | { | ||
39 | label: $localize`:A variant of Trending videos based on the number of recent interactions:Hot`, | 46 | label: $localize`:A variant of Trending videos based on the number of recent interactions:Hot`, |
40 | iconName: 'flame', | 47 | iconName: 'flame', |
41 | value: 'hot', | 48 | value: 'hot', |
diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts index 39739afd0..11288fc54 100644 --- a/client/src/app/core/server/server.service.ts +++ b/client/src/app/core/server/server.service.ts | |||
@@ -131,7 +131,7 @@ export class ServerService { | |||
131 | videos: { | 131 | videos: { |
132 | intervalDays: 0, | 132 | intervalDays: 0, |
133 | algorithms: { | 133 | algorithms: { |
134 | enabled: [ 'hot', 'most-viewed', 'most-liked' ], | 134 | enabled: [ 'best', 'hot', 'most-viewed', 'most-liked' ], |
135 | default: 'most-viewed' | 135 | default: 'most-viewed' |
136 | } | 136 | } |
137 | } | 137 | } |
diff --git a/client/src/app/shared/shared-icons/global-icon.component.ts b/client/src/app/shared/shared-icons/global-icon.component.ts index def488df0..3af517927 100644 --- a/client/src/app/shared/shared-icons/global-icon.component.ts +++ b/client/src/app/shared/shared-icons/global-icon.component.ts | |||
@@ -71,7 +71,8 @@ const icons = { | |||
71 | 'live': require('!!raw-loader?!../../../assets/images/feather/live.svg').default, | 71 | 'live': require('!!raw-loader?!../../../assets/images/feather/live.svg').default, |
72 | 'repeat': require('!!raw-loader?!../../../assets/images/feather/repeat.svg').default, | 72 | 'repeat': require('!!raw-loader?!../../../assets/images/feather/repeat.svg').default, |
73 | 'message-circle': require('!!raw-loader?!../../../assets/images/feather/message-circle.svg').default, | 73 | 'message-circle': require('!!raw-loader?!../../../assets/images/feather/message-circle.svg').default, |
74 | 'codesandbox': require('!!raw-loader?!../../../assets/images/feather/codesandbox.svg').default | 74 | 'codesandbox': require('!!raw-loader?!../../../assets/images/feather/codesandbox.svg').default, |
75 | 'award': require('!!raw-loader?!../../../assets/images/feather/award.svg').default | ||
75 | } | 76 | } |
76 | 77 | ||
77 | export type GlobalIconName = keyof typeof icons | 78 | export type GlobalIconName = keyof typeof icons |
diff --git a/client/src/assets/images/feather/award.svg b/client/src/assets/images/feather/award.svg new file mode 100644 index 000000000..be70d5a13 --- /dev/null +++ b/client/src/assets/images/feather/award.svg | |||
@@ -0,0 +1 @@ | |||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-award"><circle cx="12" cy="8" r="7"></circle><polyline points="8.21 13.89 7 23 12 20 17 23 15.79 13.88"></polyline></svg> \ No newline at end of file | |||