Skip to content

[UI] Add options to sort games by title and status #1249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
May 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"plugins": ["react", "@typescript-eslint"],
"settings": {
"react": {
"version": "17.0"
"version": "detect"
}
},
"rules": {
Expand Down
9 changes: 2 additions & 7 deletions electron/legendary/library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,8 @@ export class LegendaryLibrary {
} catch (error) {
logError(`${error}`, LogPrefix.Legendary)
}
const arr = Array.from(this.library.values()).sort(
(a: { title: string }, b: { title: string }) => {
const gameA = a.title.toUpperCase().replace('THE ', '')
const gameB = b.title.toUpperCase().replace('THE ', '')
return gameA < gameB ? -1 : 1
}
)
const arr = Array.from(this.library.values())

if (format === 'info') {
if (libraryStore.has('library')) {
libraryStore.delete('library')
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"@fontsource/rubik": "^4.5.6",
"@fortawesome/fontawesome-svg-core": "^6.1.1",
"@fortawesome/free-brands-svg-icons": "^6.1.1",
"@fortawesome/free-regular-svg-icons": "^6.1.1",
"@fortawesome/free-solid-svg-icons": "^6.1.1",
"@fortawesome/react-fontawesome": "^0.1.18",
"@mui/icons-material": "^5.6.2",
Expand Down
5 changes: 4 additions & 1 deletion public/locales/bg/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "Изглед във вид на решетка",
"listView": "Изглед във вид на списък",
"refresh": "Опресняване"
"refresh": "Опресняване",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Библиотека",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/ca/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "",
"listView": "",
"refresh": ""
"refresh": "",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Biblioteca",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/cs/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "",
"listView": "",
"refresh": ""
"refresh": "",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Knihovna",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/de/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "Rasteransicht",
"listView": "Listenansicht",
"refresh": "Aktualisieren"
"refresh": "Aktualisieren",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Bibliothek",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/el/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "Προβολή Πλέγματος",
"listView": "Προβολή Λίστας",
"refresh": "Ανανέωση"
"refresh": "Ανανέωση",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Βιβλιοθήκη",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "Grid view",
"listView": "List view",
"refresh": "Refresh"
"refresh": "Refresh",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Library",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "Vista de cuadrícula",
"listView": "Vista de lista",
"refresh": "Actualizar"
"refresh": "Actualizar",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Biblioteca",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/et/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "Ruudustikvaade",
"listView": "Loendivaade",
"refresh": "Värskenda"
"refresh": "Värskenda",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Varamu",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/fa/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "",
"listView": "",
"refresh": ""
"refresh": "",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "کتابخانه",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/fi/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "",
"listView": "",
"refresh": ""
"refresh": "",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Kirjasto",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "",
"listView": "",
"refresh": ""
"refresh": "",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Bibliothèque",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/gl/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "Vista de cadrícula",
"listView": "Vista de lista",
"refresh": "Actualizar"
"refresh": "Actualizar",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Biblioteca",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/hr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "",
"listView": "",
"refresh": ""
"refresh": "",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/hu/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "Rács nézet",
"listView": "Lista nézet",
"refresh": "Frissítés"
"refresh": "Frissítés",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Könyvtár",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/id/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "Tampilan bergaris",
"listView": "Tampilan daftar",
"refresh": "Segarkan"
"refresh": "Segarkan",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Perpustakaan",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/it/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "",
"listView": "",
"refresh": ""
"refresh": "",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Libreria",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/ja/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "",
"listView": "",
"refresh": ""
"refresh": "",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "ライブラリ",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/ko/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "그리드 보기",
"listView": "목록 보기",
"refresh": "새로고침"
"refresh": "새로고침",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "라이브러리",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/ml/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "",
"listView": "",
"refresh": ""
"refresh": "",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "കളിശാല",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/nl/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "",
"listView": "",
"refresh": ""
"refresh": "",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Bibliotheek",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/pl/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "",
"listView": "",
"refresh": ""
"refresh": "",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Biblioteka",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/pt/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "",
"listView": "",
"refresh": ""
"refresh": "",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Biblioteca",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/pt_BR/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "Visualização em grade",
"listView": "Visto por último",
"refresh": "Atualizar"
"refresh": "Atualizar",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Biblioteca",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/ru/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "В виде сетки",
"listView": "В виде списка",
"refresh": "Обновить"
"refresh": "Обновить",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Библиотека",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/sv/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "",
"listView": "Listvy",
"refresh": "Uppdatera"
"refresh": "Uppdatera",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Bibliotek",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/ta/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "",
"listView": "",
"refresh": ""
"refresh": "",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "விளையாட்டு பட்டியல்",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/tr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "Izgara görünümü",
"listView": "Liste görünümü",
"refresh": "Yenile"
"refresh": "Yenile",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Kütüphane",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/uk/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "",
"listView": "",
"refresh": ""
"refresh": "",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Бібліотека",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/vi/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "Hiển thị dạng ô",
"listView": "Hiển thị dạng danh sánh",
"refresh": "Tải lại"
"refresh": "Tải lại",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "Thư viện",
"loading": {
Expand Down
5 changes: 4 additions & 1 deletion public/locales/zh_Hans/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@
"library": {
"gridView": "网格视图",
"listView": "列表视图",
"refresh": "刷新"
"refresh": "刷新",
"sortAscending": "Sort Ascending",
"sortByStatus": "Sort by Status",
"sortDescending": "Sort Descending"
},
"Library": "仓库",
"loading": {
Expand Down
Loading