Skip to content

Commit

Permalink
fix: immediately load obs scenes in select input
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdvlpr committed Dec 20, 2024
1 parent dfa00af commit 585fc0d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/form-inputs/SelectInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ const obsState = useObsStateStore();
const { obsConnectionState, scenes } = storeToRefs(obsState);
const { dateLocale, t } = useLocale();
const filteredJwLanguages = ref(jwLanguages.value?.list || []);
const filteredLocaleAppLang = ref(localeOptions);
const filteredJwLanguages = ref([...(jwLanguages.value?.list || [])]);
const filteredLocaleAppLang = ref([...localeOptions]);
const filteredResolutions = ref<string[]>([...RESOLUTIONS]);
const filteredDays = ref(
Array.from({ length: 7 }, (_, i) => ({
Expand All @@ -102,7 +102,7 @@ const filteredDarkModes = ref([
{ description: t('dark'), label: t('dark'), value: true },
{ description: t('light'), label: t('light'), value: false },
]);
const filteredObsScenes = ref<JsonObject[]>([]);
const filteredObsScenes = ref<JsonObject[]>([...scenes.value]);
const customDisabled = computed(() => {
return (
Expand Down Expand Up @@ -210,11 +210,11 @@ const listOptions = computed(
return filteredDays.value;
} else if (props.list?.startsWith('obs')) {
return filteredObsScenes.value.map((scene) => ({
label: scene.sceneName?.toString() ?? 'Unknown scene',
label: scene.sceneName?.toString() || 'Unknown scene',
value:
configuredScenesAreAllUUIDs.value && scene.sceneUuid
? scene.sceneUuid.toString()
: (scene.sceneName?.toString() ?? 'Unknown scene'),
: scene.sceneName?.toString() || 'Unknown scene',
}));
} else {
throw new Error('List not found: ' + props.list);
Expand Down

0 comments on commit 585fc0d

Please sign in to comment.