mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-07 02:58:21 +00:00
fix: update the user menu pin button icon and tooltip when it is clicked (#31843)
This commit is contained in:
parent
571dafae36
commit
ecaa1a1bbc
1 changed files with 10 additions and 10 deletions
|
|
@ -264,7 +264,7 @@
|
|||
</a>
|
||||
{#if shiftKey}
|
||||
<Tooltip
|
||||
content={isPinned('workspace')
|
||||
content={pinnedItems.includes('workspace')
|
||||
? $i18n.t('Unpin from Sidebar')
|
||||
: $i18n.t('Pin to Sidebar')}
|
||||
>
|
||||
|
|
@ -273,7 +273,7 @@
|
|||
class="p-1 mr-1 rounded-lg hover:bg-gray-100/60 dark:hover:bg-gray-700/60 transition"
|
||||
on:click|preventDefault|stopPropagation={() => togglePin('workspace')}
|
||||
>
|
||||
{#if isPinned('workspace')}
|
||||
{#if pinnedItems.includes('workspace')}
|
||||
<PinSlashIcon className="size-3.5" strokeWidth="1.5" />
|
||||
{:else}
|
||||
<PinIcon className="size-3.5" strokeWidth="1.5" />
|
||||
|
|
@ -310,7 +310,7 @@
|
|||
</a>
|
||||
{#if shiftKey}
|
||||
<Tooltip
|
||||
content={isPinned('notes')
|
||||
content={pinnedItems.includes('notes')
|
||||
? $i18n.t('Unpin from Sidebar')
|
||||
: $i18n.t('Pin to Sidebar')}
|
||||
>
|
||||
|
|
@ -319,7 +319,7 @@
|
|||
class="p-1 mr-1 rounded-lg hover:bg-gray-100/60 dark:hover:bg-gray-700/60 transition"
|
||||
on:click|preventDefault|stopPropagation={() => togglePin('notes')}
|
||||
>
|
||||
{#if isPinned('notes')}
|
||||
{#if pinnedItems.includes('notes')}
|
||||
<PinSlashIcon className="size-3.5" strokeWidth="1.5" />
|
||||
{:else}
|
||||
<PinIcon className="size-3.5" strokeWidth="1.5" />
|
||||
|
|
@ -356,7 +356,7 @@
|
|||
</a>
|
||||
{#if shiftKey}
|
||||
<Tooltip
|
||||
content={isPinned('calendar')
|
||||
content={pinnedItems.includes('calendar')
|
||||
? $i18n.t('Unpin from Sidebar')
|
||||
: $i18n.t('Pin to Sidebar')}
|
||||
>
|
||||
|
|
@ -365,7 +365,7 @@
|
|||
class="p-1 mr-1 rounded-lg hover:bg-gray-100/60 dark:hover:bg-gray-700/60 transition"
|
||||
on:click|preventDefault|stopPropagation={() => togglePin('calendar')}
|
||||
>
|
||||
{#if isPinned('calendar')}
|
||||
{#if pinnedItems.includes('calendar')}
|
||||
<PinSlashIcon className="size-3.5" strokeWidth="1.5" />
|
||||
{:else}
|
||||
<PinIcon className="size-3.5" strokeWidth="1.5" />
|
||||
|
|
@ -402,7 +402,7 @@
|
|||
</a>
|
||||
{#if shiftKey}
|
||||
<Tooltip
|
||||
content={isPinned('automations')
|
||||
content={pinnedItems.includes('automations')
|
||||
? $i18n.t('Unpin from Sidebar')
|
||||
: $i18n.t('Pin to Sidebar')}
|
||||
>
|
||||
|
|
@ -411,7 +411,7 @@
|
|||
class="p-1 mr-1 rounded-lg hover:bg-gray-100/60 dark:hover:bg-gray-700/60 transition"
|
||||
on:click|preventDefault|stopPropagation={() => togglePin('automations')}
|
||||
>
|
||||
{#if isPinned('automations')}
|
||||
{#if pinnedItems.includes('automations')}
|
||||
<PinSlashIcon className="size-3.5" strokeWidth="1.5" />
|
||||
{:else}
|
||||
<PinIcon className="size-3.5" strokeWidth="1.5" />
|
||||
|
|
@ -448,7 +448,7 @@
|
|||
</a>
|
||||
{#if shiftKey}
|
||||
<Tooltip
|
||||
content={isPinned('playground')
|
||||
content={pinnedItems.includes('playground')
|
||||
? $i18n.t('Unpin from Sidebar')
|
||||
: $i18n.t('Pin to Sidebar')}
|
||||
>
|
||||
|
|
@ -457,7 +457,7 @@
|
|||
class="p-1 mr-1 rounded-lg hover:bg-gray-100/60 dark:hover:bg-gray-700/60 transition"
|
||||
on:click|preventDefault|stopPropagation={() => togglePin('playground')}
|
||||
>
|
||||
{#if isPinned('playground')}
|
||||
{#if pinnedItems.includes('playground')}
|
||||
<PinSlashIcon className="size-3.5" strokeWidth="1.5" />
|
||||
{:else}
|
||||
<PinIcon className="size-3.5" strokeWidth="1.5" />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue