Changed texts, hiding the position option when disabled

This commit is contained in:
koloml committed 2024-08-07 03:55:04 +04:00
1 parent 56f397c2d8
commit 5bb6055aee
1 file changed
+12 -4
+12 -4
View File
@@ -9,6 +9,11 @@
} from "$stores/search-preferences.js";
import CheckboxField from "$components/ui/forms/CheckboxField.svelte";
import SelectField from "$components/ui/forms/SelectField.svelte";
const propertiesPositions = {
start: "At the start of the list",
end: "At the end of the list",
}
</script>
<Menu>
@@ -18,10 +23,13 @@
<FormContainer>
<FormControl>
<CheckboxField bind:checked={$searchPropertiesSuggestionsEnabled}>
Enable auto-completion for properties
Auto-complete properties
</CheckboxField>
</FormControl>
<FormControl label="Location of properties suggestions">
<SelectField bind:value={$searchPropertiesSuggestionsPosition} options="{['start', 'end']}"></SelectField>
</FormControl>
{#if $searchPropertiesSuggestionsEnabled}
<FormControl label="Show completed properties:">
<SelectField bind:value={$searchPropertiesSuggestionsPosition}
options="{propertiesPositions}"></SelectField>
</FormControl>
{/if}
</FormContainer>