this.user = this.authService.getUser()
this.userChannels = this.user.videoChannels
- const channelFilters = this.userChannels.map(c => {
- return {
- value: 'channel:' + c.name,
- label: c.displayName
- }
- })
+ const channelFilters = [ ...this.userChannels ]
+ .sort((a, b) => a.displayName.localeCompare(b.displayName))
+ .map(c => {
+ return {
+ value: 'channel:' + c.name,
+ label: c.displayName
+ }
+ })
this.inputFilters = [
{
import { first, map, share, shareReplay, switchMap, tap } from 'rxjs/operators'
import { HttpClient } from '@angular/common/http'
import { Inject, Injectable, LOCALE_ID } from '@angular/core'
-import { getDevLocale, isOnDevLocale, sortBy } from '@app/helpers'
+import { getDevLocale, isOnDevLocale } from '@app/helpers'
import { logger } from '@root-helpers/logger'
import { getCompleteLocale, isDefaultLocale, peertubeTranslate } from '@shared/core-utils/i18n'
import { HTMLServerConfig, ServerConfig, ServerStats, VideoConstant } from '@shared/models'