This commit introduces a change to prevent showing the load more button,
if the length of existing results is not equal to the requested limit (which implies
it is less than because we never expect it to be more)
Additionally, there is an enhancment to override provider filders passed to the find method.
This would improve speed.
Signed-off-by: nfebe <fenn25.fn@gmail.com>
We hide **if** there is **no** notification.
We *do not* hide and *show the label* **if** there are notifications for
that application.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
The unified search modal was intended to be cleared when closed.
However, "UnifiedSearchModal" did not emit "update:query" when its
internal query value ("searchQuery") changed, so "UnifiedSearch.query"
was kept as an empty string. When the modal was closed "update:query"
was emitted with an empty string, which should have cleared
"UnifiedSearch.query" and that, in turn, should have cleared the modal.
However as "UnifiedSearch.query" was already an empty string the watcher
that updates "UnifiedSearchModal.searchQuery" from "UnifiedSearch.query"
was not triggered and the modal was not cleared.
As "UnifiedSearch.query" is now updated with the value of
"UnifiedSearchModal.searchQuery" the latter can not be trimmed when
updated from the former, as that would in turn also trim
"UnifiedSearchModal.searchQuery" and prevent to search for anything with
spaces at the beginning or end (even if those trailing spaces are just
temporary while writing something like "searched value").
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Ensure that the display name is shown instead of the filename (important for public shares).
Fixed in the library but the legacy wrapper still uses it.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Maintain existing non-provider filters (like date and person filters) while
loading more results for a specific provider.
This now works as the provider data passed to the `newResults` array after search
is built dynamically and not manually, the result of a manual build was that the
`provider.filters` properpy which is used in the `find` method was being left out
in the providers pushed into the results array.
Fixes#52081
Signed-off-by: nfebe <fenn25.fn@gmail.com>
This commit changes the CSRF error message displayed in the login form to
provide more specific information to the user. Instead of the generic less helpful error.
Signed-off-by: nfebe <fenn25.fn@gmail.com>
The main providers come from both the backend and client side plugins such as `in-folder` search.
The main providers may carry callbacks functions and other information that should be passed to the `filteredProviders`.
This is important because the current code does not make a distinction between `filteredProviders` and `providers`
rightly so, becuase they are the same thing!
Without the mentioned distinction above, sooner or later, we try to access a property on the `filteredProviders` which we
did not transfer with the manual property copy.
----
This fix prevents in-folder search from searching everywhere when "load more results" is clicked; Essentially ignoring the in-folder
search filter.
Signed-off-by: nfebe <fenn25.fn@gmail.com>
The client-side plugin `in-folder` uses the `files` provider, this makes it
overlap with the main files provider itself.
This change follows eecda06f1a after it was discovered
that some apps/providers like `dav` use providers from another app like `contacts`
Signed-off-by: nfebe <fenn25.fn@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Each provider may search from a particular app so we should use that for searching.
Before this commit, we used `provider.id` instead of `provider.appId` the problem with the previous
approach is that it forces the provider id to be a valid search provider (an app that supports search)
limiting the developers ability to use unique IDs to identify the different providers (especially plugin providers)
inside the places filter.
For example the Files search plugin "In folder" (search in folder plugin) was required to have id as `files` while the
files provider itself already has id as `files`.
Signed-off-by: nfebe <fenn25.fn@gmail.com>
Ensure that the if a preview is available the maximum sizes are
respected (clickable area).
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
- Add default value to non-required Vue props
- Reformat function to async function if needed
- Add some documentation
- Allow `any` in places where it makes sense (tests)
- Order vue component sections as required
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Some filters are only available for certain providers, the UI should give the user
a hint to what providers such filters are available in.
Currently, if a filter (date or person) is not support by an a provider, the provider is
blurred out in the places dropdown.
Signed-off-by: nfebe <fenn25.fn@gmail.com>
If a session timed out or was closed in another tab,
then currently the user gets random error messages.
This intercepts 401 responses (should only happen if logged out, or the
users does something wrong).
If we get a 401, we make sure its because of the session,
by checking if the user can access the files app.
If that is also the case we forward the user to the login page
and set the redirect URL to the last used URL.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
The content that can be renderered does *not* include HTML (see
`recommended` object).
But `v-html` was used, this is potentially dangerous, even though we
sanitize the translation values, so no urgent harm but better safe than
sorry.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>