Skip to content

Commit c0edb94

Browse files
committed
feat: simplify sort options
- Remove Name (Z-A) sort - Rename "Name (A-Z)" to "Name" - Rename "Last Updated" to "Updated Date"
1 parent de5c441 commit c0edb94

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

src/pages/plugins/index.astro

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,6 @@ function applySort(): void {
254254
return firstB - firstA;
255255
}
256256

257-
case PLUGIN_SORTS.NAME_DESC.value: {
258-
const titleA = a.querySelector(".name")!.textContent!.trim().toLowerCase();
259-
const titleB = b.querySelector(".name")!.textContent!.trim().toLowerCase();
260-
return titleB.localeCompare(titleA);
261-
}
262-
263257
case PLUGIN_SORTS.NAME_ASC.value:
264258
default: {
265259
const titleA = a.querySelector(".name")!.textContent!.trim().toLowerCase();

src/pages/plugins/pluginSortOptions.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
export const PLUGIN_SORTS = {
22
NAME_ASC: {
33
value: "name-asc",
4-
label: "Name (A-Z)",
5-
},
6-
NAME_DESC: {
7-
value: "name-desc",
8-
label: "Name (Z-A)",
4+
label: "Name",
95
},
106
FIRST_RELEASE_DESC: {
117
value: "first-release-desc",
128
label: "Release Date",
139
},
1410
LATEST_RELEASE_DESC: {
1511
value: "latest-release-desc",
16-
label: "Last Updated",
12+
label: "Updated Date",
1713
},
1814
} as const;
1915

0 commit comments

Comments
 (0)