1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-03-17 21:18:19 +02:00

Chore: Improve tag sorting in web UI, ignore casing

This commit is contained in:
Ralph Slooten 2024-04-25 14:45:36 +12:00
parent 5f2e548ba6
commit 1af32ebf8f

View File

@ -64,9 +64,11 @@ export default {
}
for (let i in response.Data.Tags) {
if (mailbox.tags.indexOf(response.Data.Tags[i]) < 0) {
if (mailbox.tags.findIndex(e => { return e.toLowerCase() === response.Data.Tags[i].toLowerCase() }) < 0) {
mailbox.tags.push(response.Data.Tags[i])
mailbox.tags.sort()
mailbox.tags.sort((a, b) => {
return a.toLowerCase().localeCompare(b.toLowerCase())
})
}
}