mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 20:35:19 +00:00
refac: hide active user count in sidebar user menu
This commit is contained in:
parent
453ea9b9a1
commit
848f3fd4d8
2 changed files with 5 additions and 1 deletions
|
|
@ -707,6 +707,7 @@
|
|||
{#if $user !== undefined && $user !== null}
|
||||
<UserMenu
|
||||
role={$user?.role}
|
||||
showActiveUsers={false}
|
||||
on:show={(e) => {
|
||||
if (e.detail === 'archived-chat') {
|
||||
showArchivedChats.set(true);
|
||||
|
|
@ -1256,6 +1257,7 @@
|
|||
{#if $user !== undefined && $user !== null}
|
||||
<UserMenu
|
||||
role={$user?.role}
|
||||
showActiveUsers={false}
|
||||
on:show={(e) => {
|
||||
if (e.detail === 'archived-chat') {
|
||||
showArchivedChats.set(true);
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@
|
|||
export let help = false;
|
||||
export let className = 'max-w-[240px]';
|
||||
|
||||
export let showActiveUsers = true;
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
let usage = null;
|
||||
|
|
@ -219,7 +221,7 @@
|
|||
<div class=" self-center truncate">{$i18n.t('Sign Out')}</div>
|
||||
</DropdownMenu.Item>
|
||||
|
||||
{#if usage}
|
||||
{#if showActiveUsers && usage}
|
||||
{#if usage?.user_ids?.length > 0}
|
||||
<hr class=" border-gray-50 dark:border-gray-800 my-1 p-0" />
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue