mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-17 06:45:24 +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}
|
{#if $user !== undefined && $user !== null}
|
||||||
<UserMenu
|
<UserMenu
|
||||||
role={$user?.role}
|
role={$user?.role}
|
||||||
|
showActiveUsers={false}
|
||||||
on:show={(e) => {
|
on:show={(e) => {
|
||||||
if (e.detail === 'archived-chat') {
|
if (e.detail === 'archived-chat') {
|
||||||
showArchivedChats.set(true);
|
showArchivedChats.set(true);
|
||||||
|
|
@ -1256,6 +1257,7 @@
|
||||||
{#if $user !== undefined && $user !== null}
|
{#if $user !== undefined && $user !== null}
|
||||||
<UserMenu
|
<UserMenu
|
||||||
role={$user?.role}
|
role={$user?.role}
|
||||||
|
showActiveUsers={false}
|
||||||
on:show={(e) => {
|
on:show={(e) => {
|
||||||
if (e.detail === 'archived-chat') {
|
if (e.detail === 'archived-chat') {
|
||||||
showArchivedChats.set(true);
|
showArchivedChats.set(true);
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,8 @@
|
||||||
export let help = false;
|
export let help = false;
|
||||||
export let className = 'max-w-[240px]';
|
export let className = 'max-w-[240px]';
|
||||||
|
|
||||||
|
export let showActiveUsers = true;
|
||||||
|
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
|
|
||||||
let usage = null;
|
let usage = null;
|
||||||
|
|
@ -219,7 +221,7 @@
|
||||||
<div class=" self-center truncate">{$i18n.t('Sign Out')}</div>
|
<div class=" self-center truncate">{$i18n.t('Sign Out')}</div>
|
||||||
</DropdownMenu.Item>
|
</DropdownMenu.Item>
|
||||||
|
|
||||||
{#if usage}
|
{#if showActiveUsers && usage}
|
||||||
{#if usage?.user_ids?.length > 0}
|
{#if usage?.user_ids?.length > 0}
|
||||||
<hr class=" border-gray-50 dark:border-gray-800 my-1 p-0" />
|
<hr class=" border-gray-50 dark:border-gray-800 my-1 p-0" />
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue