Changed hideSearchSuggestions to showSearchSuggestions.

This makes the search suggestions opt-in.
This commit is contained in:
Flo2410 2024-01-28 19:47:50 +00:00
parent fda908a65c
commit d7fd48b5ad
No known key found for this signature in database
GPG Key ID: 8ECB00AC5216DC7F
2 changed files with 6 additions and 6 deletions

View File

@ -359,14 +359,14 @@ There are a few optional settings for the Quick Launch feature:
- `searchDescriptions`: which lets you control whether item descriptions are included in searches. This is off by default. When enabled, results that match the item name will be placed above those that only match the description.
- `hideInternetSearch`: disable automatically including the currently-selected web search (e.g. from the widget) as a Quick Launch option. This is false by default, enabling the feature.
- `hideSearchSuggestions`: disables search suggestions for the internet search. This is false by default, enabling the feature.
- `showSearchSuggestions`: shows search suggestions for the internet search. This is false by default.
- `hideVisitURL`: disable detecting and offering an option to open URLs. This is false by default, enabling the feature.
```yaml
quicklaunch:
searchDescriptions: true
hideInternetSearch: true
hideSearchSuggestions: true
showSearchSuggestions: true
hideVisitURL: true
```

View File

@ -16,9 +16,9 @@ export default function QuickLaunch({
}) {
const { t } = useTranslation();
const { settings } = useContext(SettingsContext);
const { searchDescriptions, hideVisitURL, hideSearchSuggestions } = settings?.quicklaunch
const { searchDescriptions, hideVisitURL, showSearchSuggestions } = settings?.quicklaunch
? settings.quicklaunch
: { searchDescriptions: false, hideVisitURL: false, hideSearchSuggestions: false };
: { searchDescriptions: false, hideVisitURL: false, showSearchSuggestions: false };
const searchField = useRef();
@ -117,7 +117,7 @@ export default function QuickLaunch({
type: "search",
});
if (!hideSearchSuggestions && searchProvider.suggestionUrl) {
if (showSearchSuggestions && searchProvider.suggestionUrl) {
if (searchString.trim() !== searchSuggestions[0]) {
fetch(
`/api/search/searchSuggestion?query=${encodeURIComponent(searchString)}&providerName=${
@ -180,7 +180,7 @@ export default function QuickLaunch({
servicesAndBookmarks,
searchDescriptions,
hideVisitURL,
hideSearchSuggestions,
showSearchSuggestions,
searchSuggestions,
searchProvider,
url,