Skip to content

Commit

Permalink
[feat]fix models contains workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Of-qinhai committed Jan 15, 2025
1 parent 2ce11b9 commit 44abc39
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/community/modules/ModelFilterBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,16 @@
sort: 'Recently'
}
}
if (
props.page === 'mainContent' &&
store[props.page].filterState.selected_model_types.length === 0
props.page === 'mainContent'
) {
store[props.page].filterState.model_types = store.modelTypes.map(type => type.value)
if(store[props.page].filterState.selected_model_types.length === 0){
store[props.page].filterState.model_types = store.modelTypes
.filter(type => type.value !== 'Workflow')
.map(type => type.value)
}
}
if ((props.page === 'posts' || props.page === 'forked') && store.modelTypes.length > 0) {
const hasWorkflow = store.modelTypes.some(type => type.value === 'Workflow')
Expand Down

0 comments on commit 44abc39

Please sign in to comment.