Use natural sorting in WebUI

Also change case sensitivity to the default of 'sort' mode.

PR #20264.
This commit is contained in:
Chocobo1 2024-01-15 13:12:36 +08:00 committed by GitHub
parent 6918316a3d
commit 00372dd559
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 12 deletions

View file

@ -575,7 +575,7 @@ window.addEvent('load', function() {
const sortedTags = [];
for (const key in tagList)
sortedTags.push(tagList[key].name);
sortedTags.sort();
sortedTags.sort(window.qBittorrent.Misc.naturalSortCollator.compare);
for (let i = 0; i < sortedTags.length; ++i) {
const tagName = sortedTags[i];