mirror of
https://github.com/pawelmalak/flame.git
synced 2025-08-06 03:15:18 +02:00
parent
6d8ce5361a
commit
c4722ae884
6 changed files with 18 additions and 0 deletions
|
@ -105,6 +105,7 @@ export const SearchBar = (props: Props): JSX.Element => {
|
||||||
const url = `${query.template}${search}`;
|
const url = `${query.template}${search}`;
|
||||||
redirectUrl(url, sameTab);
|
redirectUrl(url, sameTab);
|
||||||
}
|
}
|
||||||
|
if(config.autoClearSearch) clearSearch();
|
||||||
} else if (e.code === 'Escape') {
|
} else if (e.code === 'Escape') {
|
||||||
clearSearch();
|
clearSearch();
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,6 +130,19 @@ export const SearchSettings = (): JSX.Element => {
|
||||||
</select>
|
</select>
|
||||||
</InputGroup>
|
</InputGroup>
|
||||||
|
|
||||||
|
<InputGroup>
|
||||||
|
<label htmlFor={"autoClearSearch"}>Automatically clear the search bar</label>
|
||||||
|
<select
|
||||||
|
id={"autoClearSearch"}
|
||||||
|
name={"autoClearSearch"}
|
||||||
|
value={formData.autoClearSearch ? 1 : 0}
|
||||||
|
onChange={(e) => inputChangeHandler(e, { isBool: true })}
|
||||||
|
>
|
||||||
|
<option value={1}>True</option>
|
||||||
|
<option value={0}>False</option>
|
||||||
|
</select>
|
||||||
|
</InputGroup>
|
||||||
|
|
||||||
<Button>Save changes</Button>
|
<Button>Save changes</Button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ export interface Config {
|
||||||
hideCategories: boolean;
|
hideCategories: boolean;
|
||||||
hideSearch: boolean;
|
hideSearch: boolean;
|
||||||
defaultSearchProvider: string;
|
defaultSearchProvider: string;
|
||||||
|
autoClearSearch: boolean;
|
||||||
dockerApps: boolean;
|
dockerApps: boolean;
|
||||||
dockerHost: string;
|
dockerHost: string;
|
||||||
kubernetesApps: boolean;
|
kubernetesApps: boolean;
|
||||||
|
|
|
@ -13,6 +13,7 @@ export interface SearchForm {
|
||||||
defaultSearchProvider: string;
|
defaultSearchProvider: string;
|
||||||
searchSameTab: boolean;
|
searchSameTab: boolean;
|
||||||
disableAutofocus: boolean;
|
disableAutofocus: boolean;
|
||||||
|
autoClearSearch: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface OtherSettingsForm {
|
export interface OtherSettingsForm {
|
||||||
|
|
|
@ -17,6 +17,7 @@ export const configTemplate: Config = {
|
||||||
hideCategories: false,
|
hideCategories: false,
|
||||||
hideSearch: false,
|
hideSearch: false,
|
||||||
defaultSearchProvider: 'l',
|
defaultSearchProvider: 'l',
|
||||||
|
autoClearSearch: false,
|
||||||
dockerApps: false,
|
dockerApps: false,
|
||||||
dockerHost: 'localhost',
|
dockerHost: 'localhost',
|
||||||
kubernetesApps: false,
|
kubernetesApps: false,
|
||||||
|
|
|
@ -38,6 +38,7 @@ export const searchSettingsTemplate: SearchForm = {
|
||||||
searchSameTab: false,
|
searchSameTab: false,
|
||||||
defaultSearchProvider: 'l',
|
defaultSearchProvider: 'l',
|
||||||
disableAutofocus: false,
|
disableAutofocus: false,
|
||||||
|
autoClearSearch: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const dockerSettingsTemplate: DockerSettingsForm = {
|
export const dockerSettingsTemplate: DockerSettingsForm = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue