From 2b636e64ecadccb76cd02957891236b8b04fa77a Mon Sep 17 00:00:00 2001 From: evykassirer Date: Thu, 31 Oct 2024 16:20:46 -0700 Subject: [PATCH] buddy_list: Make avatar display option only visible in dev. --- web/src/settings_config.ts | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/web/src/settings_config.ts b/web/src/settings_config.ts index ea89c8bb5b..77bac3e0bf 100644 --- a/web/src/settings_config.ts +++ b/web/src/settings_config.ts @@ -68,7 +68,20 @@ export const web_channel_default_view_values = { }, }; -export const user_list_style_values = { +export const user_list_style_values: { + compact: { + code: number; + description: string; + }; + with_status: { + code: number; + description: string; + }; + with_avatar?: { + code: number; + description: string; + }; +} = { compact: { code: 1, description: $t({defaultMessage: "Compact"}), @@ -77,11 +90,14 @@ export const user_list_style_values = { code: 2, description: $t({defaultMessage: "Show status text"}), }, - with_avatar: { +}; + +if (page_params.development_environment) { + user_list_style_values.with_avatar = { code: 3, description: $t({defaultMessage: "Show avatar"}), - }, -}; + }; +} export const web_animate_image_previews_values = { always: {