Sort thumbnails in editor

This sorts the thumbnail by name.
pull/331/head
ElementalAlchemist 2 years ago committed by Mike Lang
parent 988b1265ab
commit dd747416e0

@ -242,6 +242,7 @@ window.addEventListener("DOMContentLoaded", async (event) => {
const thumbnailTemplatesListResponse = await fetch("/thumbnail-templates"); const thumbnailTemplatesListResponse = await fetch("/thumbnail-templates");
if (thumbnailTemplatesListResponse.ok) { if (thumbnailTemplatesListResponse.ok) {
const thumbnailTemplatesList = await thumbnailTemplatesListResponse.json(); const thumbnailTemplatesList = await thumbnailTemplatesListResponse.json();
thumbnailTemplatesList.sort();
for (const templateName of thumbnailTemplatesList) { for (const templateName of thumbnailTemplatesList) {
const templateOption = document.createElement("option"); const templateOption = document.createElement("option");
templateOption.innerText = templateName; templateOption.innerText = templateName;

Loading…
Cancel
Save