Avatar set for anonymous users: new 'none' choice (that will fallback to Converse new colorized avatars).

This commit is contained in:
John Livingston
2024-07-25 15:34:27 +02:00
parent 099ff28c76
commit c6c365abf0
6 changed files with 32 additions and 18 deletions

View File

@ -13,7 +13,7 @@ import { LivechatProsodyAuth } from './prosody/auth'
import { loc } from './loc'
const escapeHTML = require('escape-html')
type AvatarSet = 'sepia' | 'cat' | 'bird' | 'fenec' | 'abstract' | 'legacy'
type AvatarSet = 'sepia' | 'cat' | 'bird' | 'fenec' | 'abstract' | 'legacy' | 'none'
async function initSettings (options: RegisterServerOptions): Promise<void> {
const { peertubeHelpers, settingsManager } = options
@ -510,7 +510,8 @@ function initThemingSettings ({ registerSetting }: RegisterServerOptions): void
{ value: 'bird', label: loc('avatar_set_option_bird') },
{ value: 'fenec', label: loc('avatar_set_option_fenec') },
{ value: 'abstract', label: loc('avatar_set_option_abstract') },
{ value: 'legacy', label: loc('avatar_set_option_legacy') }
{ value: 'legacy', label: loc('avatar_set_option_legacy') },
{ value: 'none', label: loc('avatar_set_option_none') }
] as Array<{
value: AvatarSet
label: string