diff options
author | Chocobozzz <me@florianbigard.com> | 2023-06-19 11:12:02 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-06-19 11:18:56 +0200 |
commit | 7d758898dc907b8643bab6ae2e70c3ca2a021fac (patch) | |
tree | 2c849650de3d2a49f1e26698ec6a4d7580b780b8 | |
parent | 7aacaa76ec990f6b06f3f15a5666d103f68594f1 (diff) | |
download | PeerTube-7d758898dc907b8643bab6ae2e70c3ca2a021fac.tar.gz PeerTube-7d758898dc907b8643bab6ae2e70c3ca2a021fac.tar.zst PeerTube-7d758898dc907b8643bab6ae2e70c3ca2a021fac.zip |
Alphabetical order for channels filter
-rw-r--r-- | client/src/app/+my-library/my-videos/my-videos.component.ts | 14 | ||||
-rw-r--r-- | client/src/app/core/server/server.service.ts | 2 |
2 files changed, 9 insertions, 7 deletions
diff --git a/client/src/app/+my-library/my-videos/my-videos.component.ts b/client/src/app/+my-library/my-videos/my-videos.component.ts index b618b3f88..57b8bdf7d 100644 --- a/client/src/app/+my-library/my-videos/my-videos.component.ts +++ b/client/src/app/+my-library/my-videos/my-videos.component.ts | |||
@@ -105,12 +105,14 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook { | |||
105 | this.user = this.authService.getUser() | 105 | this.user = this.authService.getUser() |
106 | this.userChannels = this.user.videoChannels | 106 | this.userChannels = this.user.videoChannels |
107 | 107 | ||
108 | const channelFilters = this.userChannels.map(c => { | 108 | const channelFilters = [ ...this.userChannels ] |
109 | return { | 109 | .sort((a, b) => a.displayName.localeCompare(b.displayName)) |
110 | value: 'channel:' + c.name, | 110 | .map(c => { |
111 | label: c.displayName | 111 | return { |
112 | } | 112 | value: 'channel:' + c.name, |
113 | }) | 113 | label: c.displayName |
114 | } | ||
115 | }) | ||
114 | 116 | ||
115 | this.inputFilters = [ | 117 | this.inputFilters = [ |
116 | { | 118 | { |
diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts index 75dbe3e60..122c3d37d 100644 --- a/client/src/app/core/server/server.service.ts +++ b/client/src/app/core/server/server.service.ts | |||
@@ -2,7 +2,7 @@ import { Observable, of, Subject } from 'rxjs' | |||
2 | import { first, map, share, shareReplay, switchMap, tap } from 'rxjs/operators' | 2 | import { first, map, share, shareReplay, switchMap, tap } from 'rxjs/operators' |
3 | import { HttpClient } from '@angular/common/http' | 3 | import { HttpClient } from '@angular/common/http' |
4 | import { Inject, Injectable, LOCALE_ID } from '@angular/core' | 4 | import { Inject, Injectable, LOCALE_ID } from '@angular/core' |
5 | import { getDevLocale, isOnDevLocale, sortBy } from '@app/helpers' | 5 | import { getDevLocale, isOnDevLocale } from '@app/helpers' |
6 | import { logger } from '@root-helpers/logger' | 6 | import { logger } from '@root-helpers/logger' |
7 | import { getCompleteLocale, isDefaultLocale, peertubeTranslate } from '@shared/core-utils/i18n' | 7 | import { getCompleteLocale, isDefaultLocale, peertubeTranslate } from '@shared/core-utils/i18n' |
8 | import { HTMLServerConfig, ServerConfig, ServerStats, VideoConstant } from '@shared/models' | 8 | import { HTMLServerConfig, ServerConfig, ServerStats, VideoConstant } from '@shared/models' |