1
0
mirror of https://github.com/koloml/furbooru-tagging-assistant.git synced 2025-12-24 07:12:57 +00:00

Sort tags alphabetically

This commit is contained in:
2024-08-10 14:37:02 +04:00
parent 920804467e
commit 323fa4e2b7
2 changed files with 4 additions and 2 deletions

View File

@@ -1,6 +1,8 @@
<script>
/** @type {import('$lib/extension/entities/MaintenanceProfile.js').default} */
export let profile;
const sortedTagsList = profile.settings.tags.sort((a, b) => a.localeCompare(b));
</script>
<div class="block">
@@ -10,7 +12,7 @@
<div class="block">
<strong>Tags:</strong>
<div class="tags-list">
{#each profile.settings.tags as tagName}
{#each sortedTagsList as tagName}
<span class="tag">{tagName}</span>
{/each}
</div>

View File

@@ -28,7 +28,7 @@
if (maybeExistingProfile) {
targetProfile = maybeExistingProfile;
profileName = targetProfile.settings.name;
tagsList = [...targetProfile.settings.tags];
tagsList = [...targetProfile.settings.tags].sort((a, b) => a.localeCompare(b));
} else {
goto('/settings/maintenance');
}