Enable power search for power users via ui settings

A different search bar is presented if enabled in ui settings that
allows to search via the new query language.
This commit is contained in:
Eike Kettner
2021-03-01 22:45:17 +01:00
parent 168f5a1a98
commit b4b5acde13
6 changed files with 102 additions and 33 deletions

View File

@ -52,6 +52,7 @@ type ItemQuery
| ItemName AttrMatch String
| AllNames String
| Contents String
| Fragment String
and : List (Maybe ItemQuery) -> Maybe ItemQuery
@ -176,6 +177,9 @@ render q =
Contents str ->
"content:" ++ quoteStr str
Fragment str ->
"(& " ++ str ++ " )"
attrMatch : AttrMatch -> String
attrMatch am =