mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-23 16:24:06 +00:00
feat: show ownership filter when category is selected in left nav
Show the ownership filter dropdown in AssetFilterBar when a specific category (not 'all' or 'imported') is selected, allowing users to filter by ownership within category views. Amp-Thread-ID: https://ampcode.com/threads/T-019c108b-1791-71fd-b480-cb6c5ab4a17e Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
<template #contentFilter>
|
||||
<AssetFilterBar
|
||||
:assets="categoryFilteredAssets"
|
||||
:show-ownership-filter="!shouldShowLeftPanel"
|
||||
:show-ownership-filter
|
||||
@filter-change="updateFilters"
|
||||
@click.self="focusedAsset = null"
|
||||
/>
|
||||
@@ -211,6 +211,12 @@ const shouldShowLeftPanel = computed(() => {
|
||||
return props.showLeftPanel ?? true
|
||||
})
|
||||
|
||||
const showOwnershipFilter = computed(
|
||||
() =>
|
||||
!shouldShowLeftPanel.value ||
|
||||
(selectedNavItem.value !== 'all' && selectedNavItem.value !== 'imported')
|
||||
)
|
||||
|
||||
const emptyMessage = computed(() => {
|
||||
if (!isImportedSelected.value) {
|
||||
return isUploadButtonEnabled.value
|
||||
|
||||
Reference in New Issue
Block a user