UX: Add in:docs quick tip in search widget (#61)
This commit is contained in:
parent
ac9d01dc18
commit
bfed4ba324
|
@ -32,13 +32,21 @@ export default {
|
||||||
|
|
||||||
initialize(container) {
|
initialize(container) {
|
||||||
withPluginApi("0.8", (api) => initialize(api, container));
|
withPluginApi("0.8", (api) => initialize(api, container));
|
||||||
withPluginApi("0.11.7", (api) => {
|
withPluginApi("0.12.6", (api) => {
|
||||||
const siteSettings = container.lookup("site-settings:main");
|
const siteSettings = container.lookup("site-settings:main");
|
||||||
if (!siteSettings.docs_enabled) {
|
if (!siteSettings.docs_enabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
api.addSearchSuggestion("in:docs");
|
api.addSearchSuggestion("in:docs");
|
||||||
|
|
||||||
|
const tip = {
|
||||||
|
label: "in:docs",
|
||||||
|
description: I18n.t("docs.search.tip_description"),
|
||||||
|
clickable: true,
|
||||||
|
searchTopics: true,
|
||||||
|
};
|
||||||
|
api.addQuickSearchRandomTip(tip);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -17,6 +17,7 @@ en:
|
||||||
other: "%{count} results found"
|
other: "%{count} results found"
|
||||||
placeholder: "Search for topics"
|
placeholder: "Search for topics"
|
||||||
clear: "Clear"
|
clear: "Clear"
|
||||||
|
tip_description: "Search in docs"
|
||||||
topic:
|
topic:
|
||||||
back: "Go back"
|
back: "Go back"
|
||||||
navigate_to_topic: "View the discussion on this topic"
|
navigate_to_topic: "View the discussion on this topic"
|
||||||
|
|
Loading…
Reference in New Issue