mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2026-10-19 16:14:39 +00:00
fix (search): add option to disable search entirely
This commit is contained in:
@@ -237,7 +237,7 @@ function componentRight(render, { getSelectionLength$ }) {
|
||||
<form style="display: inline-block;" onsubmit="event.preventDefault()">
|
||||
<input value="${safe(search)}" class="hidden" placeholder="${t("search")}" name="q" id="searchInput" aria-label="${t("search")}" tabindex="-1" autocapitalize="none" />
|
||||
</form>
|
||||
<button data-action="search" title="${t("Search")}" aria-controls="searchInput">
|
||||
<button data-action="search" title="${t("Search")}" aria-controls="searchInput" class=${getConfig("enable_search") ? "" : "hidden"}>
|
||||
<img class="component_icon" draggable="false" src="data:image/svg+xml;base64,${ICONS.MAGNIFYING_GLASS}" alt="search" />
|
||||
</button>
|
||||
<button data-action="view" title="${t("Layout")}">
|
||||
|
||||
@@ -303,6 +303,7 @@ func (this *Configuration) Export() interface{} {
|
||||
Origin string `json:"origin"`
|
||||
Version string `json:"version"`
|
||||
EnableChromecast bool `json:"enable_chromecast"`
|
||||
EnableSearch bool `json:"enable_search"`
|
||||
EnableShare bool `json:"enable_share"`
|
||||
EnableTags bool `json:"enable_tags"`
|
||||
}{
|
||||
@@ -350,8 +351,9 @@ func (this *Configuration) Export() interface{} {
|
||||
}(),
|
||||
Version: BUILD_REF,
|
||||
EnableChromecast: this.Get("features.protection.enable_chromecast").Bool(),
|
||||
EnableSearch: Hooks.Get.SearchEngine() != nil,
|
||||
EnableShare: this.Get("features.share.enable").Bool(),
|
||||
EnableTags: Hooks.Get.Metadata() != nil,
|
||||
EnableTags: Hooks.Get.Metadata() != nil,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user