diff --git a/src/components/settings/hostingPreferences/BaseCombobox.vue b/src/components/settings/hostingPreferences/BaseCombobox.vue index 936c112..039dbe2 100644 --- a/src/components/settings/hostingPreferences/BaseCombobox.vue +++ b/src/components/settings/hostingPreferences/BaseCombobox.vue @@ -25,18 +25,19 @@ const props = withDefaults( isLoading?: boolean isSaving?: boolean label?: string + initiallySelected?: string[] }>(), { options: () => [], isLoading: false, isSaving: false, - label: '' + label: '', + initiallySelected: () => [] } ) const isEditing = ref(false) -const initiallySelected: string[] = [] const previouslySelected = ref([]) const mappedValues: Option[] = props.options.map((label, index) => ({ @@ -45,7 +46,7 @@ const mappedValues: Option[] = props.options.map((label, index) => ({ })) const selectedOptions = ref( - mappedValues.filter((option) => initiallySelected.includes(option.label)) + mappedValues.filter((option) => props.initiallySelected.includes(option.label)) ) const visibleOptions = computed(() => { @@ -85,7 +86,10 @@ function removeOption(optionToBeRemoved: Option): void { } function save(): void { - emit('save', selectedOptions.value) + emit( + 'save', + selectedOptions.value.map((option) => option.label) + ) } function cancel(): void { @@ -156,15 +160,18 @@ watch( + None + @@ -261,6 +268,12 @@ watch( margin-left: 8px; margin-top: 4px; cursor: pointer; + + &--disabled { + opacity: 0.15; + pointer-events: none; + cursor: not-allowed; + } } &-combobox { @@ -283,6 +296,8 @@ watch( &--disabled { opacity: 0.15; + pointer-events: none; + cursor: not-allowed; } } diff --git a/src/components/settings/hostingPreferences/CategoryExclusionSelect.vue b/src/components/settings/hostingPreferences/CategoryExclusionSelect.vue deleted file mode 100644 index 6e2833c..0000000 --- a/src/components/settings/hostingPreferences/CategoryExclusionSelect.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/components/settings/hostingPreferences/ExclusionSelect.vue b/src/components/settings/hostingPreferences/ExclusionSelect.vue new file mode 100644 index 0000000..38868db --- /dev/null +++ b/src/components/settings/hostingPreferences/ExclusionSelect.vue @@ -0,0 +1,32 @@ + + + diff --git a/src/components/settings/hostingPreferences/HAppSelectionSection.vue b/src/components/settings/hostingPreferences/HAppSelectionSection.vue index 64ea0b1..1075ec1 100644 --- a/src/components/settings/hostingPreferences/HAppSelectionSection.vue +++ b/src/components/settings/hostingPreferences/HAppSelectionSection.vue @@ -1,7 +1,51 @@