Skip to content

Commit

Permalink
[Feature] Allow removing elements from recently played (#1937)
Browse files Browse the repository at this point in the history
* Allow removing elements from recently played

* Add translation files

* Optimize recents lookup

* Remove extra 'kill'
  • Loading branch information
arielj committed Oct 27, 2022
1 parent 369ff67 commit 3af6e06
Show file tree
Hide file tree
Showing 46 changed files with 158 additions and 75 deletions.
1 change: 1 addition & 0 deletions public/locales/az/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Sevimlilərdən Sil",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/be/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Выдаліць з абранага",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/bg/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Премахване от любимите",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/bs/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Otkloni iz favorita",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/ca/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Treu dels preferits",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/cs/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Odebrat z oblíbených",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/de/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Aus Favoriten entfernen",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/el/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Κατάργηση από τα Αγαπημένα",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/en/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Remove From Favourites",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/es/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Remover de Favoritos",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/et/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Eemalda lemmikutest",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/eu/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Kendu gogokoenetik",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/fa/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "حذف کردن از مورد علاقه ها",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/fi/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Remove From Favourites",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/fr/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Retirer des favoris",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/gl/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Remove From Favourites",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/hr/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Makni iz omiljenih",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/hu/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Eltávolítás a kedvencekből",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/id/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Hapus Dari Favorit",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/it/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Rimuovi Dai Preferiti",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/ja/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Remove From Favourites",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/ko/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "즐겨찾기에서 제거",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/ml/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Remove From Favourites",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/nb_NO/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Fjern fra favoritter",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/nl/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Remove From Favourites",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/pl/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Usuń z ulubionych",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/pt/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Remove From Favourites",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/pt_BR/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Remover dos favoritos",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/ro/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Eliminați din Favorite",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/ru/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Удалить из избранного",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/sk/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Odstrániť z obľúbených",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/sv/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Ta bort från Favoriter",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/ta/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Remove From Favourites",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/tr/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Favorilerden Kaldır",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/uk/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Видалити зі вподобань",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/vi/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "Xóa khỏi mục ưa thích",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/zh_Hans/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "从收藏夹移除",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/zh_Hant/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"remove": "Remove from Queue"
},
"remove_from_favourites": "自我的最愛移除",
"remove_from_recent": "Remove From Recent",
"run-exe-first": "Run Installer First",
"running-setup": "Running Setup",
"sideload": {
Expand Down
10 changes: 10 additions & 0 deletions src/backend/api/library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ export const handleInstallGame = (callback: any) =>
export const handleRefreshLibrary = (callback: any) =>
ipcRenderer.on('refreshLibrary', callback)

export const removeRecentGame = async (appName: string) =>
ipcRenderer.invoke('removeRecent', appName)
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const handleRecentGamesChanged = (callback: any) => {
ipcRenderer.on('recentGamesChanged', callback)
return () => {
ipcRenderer.removeListener('recentGamesChanged', callback)
}
}

export const addNewApp = (args: SideloadGame) =>
ipcRenderer.send('addNewApp', args)

Expand Down

0 comments on commit 3af6e06

Please sign in to comment.