Use name (not display name) on saving

This commit is contained in:
Adria Navarro 2024-07-22 16:40:00 +02:00
parent b7fc1cddb7
commit d01bd54fd1
2 changed files with 4 additions and 4 deletions

View File

@ -89,7 +89,7 @@
on:contextmenu={openContextMenu}
{icon}
iconColor={"var(--spectrum-global-color-gray-900)"}
text={automation.name}
text={automation.displayName}
selected={automation._id === $selectedAutomation?._id}
hovering={automation._id === $contextMenuStore.id}
on:click={() => automationStore.actions.select(automation._id)}

View File

@ -19,13 +19,13 @@
})
.map(automation => ({
...automation,
name:
displayName:
$automationStore.automationDisplayData[automation._id].displayName ||
automation.name,
}))
.sort((a, b) => {
const lowerA = a.name.toLowerCase()
const lowerB = b.name.toLowerCase()
const lowerA = a.displayName.toLowerCase()
const lowerB = b.displayName.toLowerCase()
return lowerA > lowerB ? 1 : -1
})