Display Game/Groups in Dropdown Title

This commit is contained in:
Neshura 2023-08-13 03:34:46 +02:00
parent f801c96ddf
commit ab6ff1c994
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C
2 changed files with 3 additions and 4 deletions

View file

@ -16,7 +16,6 @@
ethics: [],
portraits: []
};
let store: string | null;
// Chellaris Data Code
const updateGameGroups = () => {
@ -33,7 +32,7 @@
gameGroups = tmpData.groups;
}
}
ChellarisDataStore.subscribe((data) => {
chellarisData = data;
@ -79,7 +78,7 @@
const dropdownId = crypto.randomUUID();
</script>
<DropDown {dropdownId} dropdownTitle="Group Selection">
<DropDown {dropdownId} dropdownTitle={(selectedGameGroups.length > 1 ? "Groups " : "Group ") + selectedGameGroups.map((selection) => gameGroups.get(selection)?.name).join(", ")}>
{#each gameGroups as group}
<DropDownElement {dropdownId}>
<input

View file

@ -30,7 +30,7 @@
const dropdownId = crypto.randomUUID();
</script>
<DropDown {dropdownId} dropdownTitle="Game Selection">
<DropDown {dropdownId} dropdownTitle={gameList.get(selectedGame)?.name}>
{#each gameList as game}
<DropDownElement {dropdownId}>
<input