Skip to content

Commit acb4c3e

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 d1c7a68 commit acb4c3e

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
@@ -253,12 +253,6 @@ function applySort(): void {
253253
return firstB - firstA;
254254
}
255255

256-
case PLUGIN_SORTS.NAME_DESC.value: {
257-
const titleA = a.querySelector(".name")!.textContent!.trim().toLowerCase();
258-
const titleB = b.querySelector(".name")!.textContent!.trim().toLowerCase();
259-
return titleB.localeCompare(titleA);
260-
}
261-
262256
case PLUGIN_SORTS.NAME_ASC.value:
263257
default: {
264258
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)