fix(ui): hide clone button in model menu for models disabled by admins (#21724)
This commit is contained in:
@@ -139,16 +139,18 @@
|
|||||||
<div class="flex items-center">{$i18n.t('Copy Link')}</div>
|
<div class="flex items-center">{$i18n.t('Copy Link')}</div>
|
||||||
</DropdownMenu.Item>
|
</DropdownMenu.Item>
|
||||||
|
|
||||||
<DropdownMenu.Item
|
{#if model?.is_active ?? true}
|
||||||
class="flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
<DropdownMenu.Item
|
||||||
on:click={() => {
|
class="flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
||||||
cloneHandler();
|
on:click={() => {
|
||||||
}}
|
cloneHandler();
|
||||||
>
|
}}
|
||||||
<DocumentDuplicate />
|
>
|
||||||
|
<DocumentDuplicate />
|
||||||
|
|
||||||
<div class="flex items-center">{$i18n.t('Clone')}</div>
|
<div class="flex items-center">{$i18n.t('Clone')}</div>
|
||||||
</DropdownMenu.Item>
|
</DropdownMenu.Item>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
class="flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
class="flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
||||||
|
|||||||
Reference in New Issue
Block a user