fix(quick actions): don't show projects when searching for labels or tasks

This commit is contained in:
kolaente 2023-08-29 12:38:59 +02:00
parent d57e1909c4
commit 4e6b99544e
Signed by: konrad
GPG Key ID: F40E70337AB24C9B

View File

@ -148,12 +148,18 @@ function closeQuickActions() {
}
const foundProjects = computed(() => {
const {project, text} = parsedQuery.value
if (
searchMode.value === SEARCH_MODE.ALL ||
searchMode.value === SEARCH_MODE.PROJECTS ||
text === ''
) {
const {project, text, labels, assignees} = parsedQuery.value
if (project !== null) {
return projectStore.searchProject(project ?? text)
.filter(p => Boolean(p))
}
if (labels.length > 0 || assignees.length > 0) {
return []
}
if (text === '') {
const history = getHistory()
return history.map((p) => projectStore.projects[p.id])
.filter(p => Boolean(p))