fix: Sort themes in the /theme modal alphabetically (resolves #5217) (#5219)

Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
This commit is contained in:
Ariane Emory 2025-12-07 23:20:40 -05:00 committed by GitHub
parent c3f7a88c1c
commit 63e54541fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,10 +5,12 @@ import { onCleanup, onMount } from "solid-js"
export function DialogThemeList() {
const theme = useTheme()
const options = Object.keys(theme.all()).map((value) => ({
title: value,
value: value,
}))
const options = Object.keys(theme.all())
.sort((a, b) => a.localeCompare(b, undefined, { sensitivity: 'base' }))
.map((value) => ({
title: value,
value: value,
}))
const dialog = useDialog()
let confirmed = false
let ref: DialogSelectRef<string>