Skip to content

Fix some issues when uninstalling games #1950

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 2 commits into from
Oct 29, 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
1 change: 1 addition & 0 deletions public/locales/az/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
"queued": "Queued",
"reparing": "Oyun Təmir edilir, zəhmət olmasa gözləyin",
"totalDownloaded": "Toplam Endirilib",
"uninstalling": "Uninstalling",
"updating": "Oyun Yenilənir"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Ідзе рамонт гульні, пачакайце",
"totalDownloaded": "Усяго спампавана",
"uninstalling": "Uninstalling",
"updating": "Абнаўленне гульні"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Поправяне на играта; моля, изчакайте",
"totalDownloaded": "Общо свалено",
"uninstalling": "Uninstalling",
"updating": "Обновяване на играта"
},
"submenu": {
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 @@ -170,6 +170,7 @@
"queued": "Queued",
"reparing": "Popravljanje video igre, molimo čekajte",
"totalDownloaded": "Ukupno preuzeto",
"uninstalling": "Uninstalling",
"updating": "Ažuriranje video igre"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "S'està reparant el joc. Espereu.",
"totalDownloaded": "Total baixat",
"uninstalling": "Uninstalling",
"updating": "S'està actualitzant el joc"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Opravuji hru, čekejte prosím",
"totalDownloaded": "Celkově staženo",
"uninstalling": "Uninstalling",
"updating": "Aktualizuji hru"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Spiel wird repariert, bitte warten",
"totalDownloaded": "Insgesamt heruntergeladen",
"uninstalling": "Uninstalling",
"updating": "Spiel wird aktualisiert"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Επιδιόρθωση παιχνιδιού, παρακαλώ περιμένετε",
"totalDownloaded": "Σύνολο ληφθέντων",
"uninstalling": "Uninstalling",
"updating": "Ενημέρωση παιχνιδιού"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Repairing Game, please wait",
"totalDownloaded": "Total Downloaded",
"uninstalling": "Uninstalling",
"updating": "Updating Game"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Reparando el juego, por favor espere",
"totalDownloaded": "Total descargado",
"uninstalling": "Uninstalling",
"updating": "Actualización de juego"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Mängu parandamine, palun oodake",
"totalDownloaded": "Allalaaditud kokku",
"uninstalling": "Uninstalling",
"updating": "Mängu uuendamine"
},
"submenu": {
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 @@ -170,6 +170,7 @@
"queued": "Queued",
"reparing": "Jokoaren konponketa, mesedez",
"totalDownloaded": "Deskargatutakoa, guztira",
"uninstalling": "Uninstalling",
"updating": "Jokoa eguneratzea"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "در حال تعمیر بازی، لطفا صبر کنید",
"totalDownloaded": "حجم کل دانلود شده",
"uninstalling": "Uninstalling",
"updating": "در حال به روزرسانی بازی"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Korjataan peliä, odota",
"totalDownloaded": "Ladattu yhteensä",
"uninstalling": "Uninstalling",
"updating": "Päivitetään peliä"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Réparation du jeu en cours, veuillez patienter",
"totalDownloaded": "Total Téléchargé",
"uninstalling": "Uninstalling",
"updating": "Mise à jour du jeu en cours"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Reparando xogo, agarda",
"totalDownloaded": "Total descargado",
"uninstalling": "Uninstalling",
"updating": "Actualización do xogo"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Popravljanje igrice, molimo pričekajte",
"totalDownloaded": "Sveukupno preuzeto",
"uninstalling": "Uninstalling",
"updating": "Ažuriranje igrice"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Játék javítása, kérlek várj",
"totalDownloaded": "Teljesen letöltve",
"uninstalling": "Uninstalling",
"updating": "Játék frissítése"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Memperbaiki Gim, harap tunggu",
"totalDownloaded": "Jumlah yang Diunduh",
"uninstalling": "Uninstalling",
"updating": "Memperbarui Gim"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Riparazione del gioco in corso, per favore attendi",
"totalDownloaded": "Totale scaricato",
"uninstalling": "Uninstalling",
"updating": "Aggiornamento in corso"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "ゲームを修復しています、お待ちください",
"totalDownloaded": "ダウンロードの総数",
"uninstalling": "Uninstalling",
"updating": "ゲームを更新しています"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "게임을 복구 중입니다, 잠시만 기다려 주세요",
"totalDownloaded": "총 다운로드",
"uninstalling": "Uninstalling",
"updating": "게임 업데이트 중"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "കളി നന്നാക്കുന്നു, ഒന്നു കാക്കൂ",
"totalDownloaded": "ആകെ ഇറക്കിയെടുത്തത്",
"uninstalling": "Uninstalling",
"updating": "കളി പുതുക്കുന്നു"
},
"submenu": {
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 @@ -170,6 +170,7 @@
"queued": "Queued",
"reparing": "Reparerer spillet, vennligst vent",
"totalDownloaded": "Totalt nedlastede",
"uninstalling": "Uninstalling",
"updating": "Oppdaterer spillet"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Spel aan het repareren, even geduld",
"totalDownloaded": "Totaal gedownload",
"uninstalling": "Uninstalling",
"updating": "Spel aan het updaten"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Naprawianie gry, proszę czekać",
"totalDownloaded": "Łącznie pobrane",
"uninstalling": "Uninstalling",
"updating": "Aktualizowanie gry"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Reparando jogo, por favor espere",
"totalDownloaded": "Total Baixado",
"uninstalling": "Uninstalling",
"updating": "Atualizando jogo"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Reparando Jogo, Por favor Aguarde",
"totalDownloaded": "Total Baixado",
"uninstalling": "Uninstalling",
"updating": "Atualizando Jogo"
},
"submenu": {
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 @@ -170,6 +170,7 @@
"queued": "Queued",
"reparing": "Reparare joc, vă rugăm așteptați",
"totalDownloaded": "Descărcat total",
"uninstalling": "Uninstalling",
"updating": "Joc in curs de actualizare"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Восстановление игры. Пожалуйста, подождите",
"totalDownloaded": "Всего загружено",
"uninstalling": "Uninstalling",
"updating": "Обновление игры"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Oprava hry, čakajte prosím",
"totalDownloaded": "Celkom stiahnutých",
"uninstalling": "Uninstalling",
"updating": "Aktualizácia hry"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Reparerar spelet, vänligen vänta",
"totalDownloaded": "Nedladdning",
"uninstalling": "Uninstalling",
"updating": "Updaterar spelet"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "விளையாட்டு பழுதுபார்க்கப்படுகிறது, தயவுசெய்து காத்திருக்கவும்",
"totalDownloaded": "மொத்த பதிவிறக்கம்",
"uninstalling": "Uninstalling",
"updating": "விளையாட்டு புதுப்பிக்கப்படுகிறது"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Oyun onarılıyor, lütfen bekleyin",
"totalDownloaded": "Toplam İndirilen",
"uninstalling": "Uninstalling",
"updating": "Oyun Güncelleniyor"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Відновлюю гру, будь ласка зачекайте",
"totalDownloaded": "Всього завантажено",
"uninstalling": "Uninstalling",
"updating": "Оновлюю гру"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "Đang sửa game, vui lòng đợi",
"totalDownloaded": "Tổng số đã tải",
"uninstalling": "Uninstalling",
"updating": "Đang cập nhật Game"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "正在修复游戏,请稍等",
"totalDownloaded": "下载总计",
"uninstalling": "Uninstalling",
"updating": "游戏更新中"
},
"submenu": {
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 @@ -169,6 +169,7 @@
"queued": "Queued",
"reparing": "遊戲修復中,請稍等",
"totalDownloaded": "總共已下載",
"uninstalling": "Uninstalling",
"updating": "遊戲更新中"
},
"submenu": {
Expand Down
3 changes: 2 additions & 1 deletion src/backend/api/library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ export const uninstall = async (
const [appName, shouldRemovePrefix, runner] = args
if (runner === 'sideload') {
return ipcRenderer.invoke('removeApp', { appName, shouldRemovePrefix })
} else {
return ipcRenderer.invoke('uninstall', args)
}
ipcRenderer.invoke('uninstall', args)
}
export const repair = async (appName: string, runner: Runner) =>
ipcRenderer.invoke('repair', appName, runner)
Expand Down
37 changes: 27 additions & 10 deletions src/frontend/screens/Game/GamePage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export default function GamePage(): JSX.Element | null {
const isQueued = status === 'queued'
const isReparing = status === 'repairing'
const isMoving = status === 'moving'
const isUninstalling = status === 'uninstalling'

const backRoute = location.state?.fromDM ? '/download-manager' : '/'

Expand Down Expand Up @@ -390,6 +391,16 @@ export default function GamePage(): JSX.Element | null {
</div>
<TimeContainer game={appName} />
<div className="gameStatus">
{isUninstalling && (
<p
style={{
color: 'var(--danger)',
fontStyle: 'italic'
}}
>
{t('status.uninstalling', 'Uninstalling')}
</p>
)}
{isInstalling ||
(isUpdating && (
<progress
Expand Down Expand Up @@ -427,15 +438,15 @@ export default function GamePage(): JSX.Element | null {
<Anticheat gameInfo={gameInfo} />
<div className="buttonsWrapper">
{is_installed && (
<>
<button
disabled={isReparing || isMoving || isUpdating}
onClick={handlePlay()}
className={`button ${getPlayBtnClass()}`}
>
{getPlayLabel()}
</button>
</>
<button
disabled={
isReparing || isMoving || isUpdating || isUninstalling
}
onClick={handlePlay()}
className={`button ${getPlayBtnClass()}`}
>
{getPlayLabel()}
</button>
)}
{is_installed ? (
<Link
Expand All @@ -454,7 +465,13 @@ export default function GamePage(): JSX.Element | null {
) : (
<button
onClick={async () => handleInstall(is_installed)}
disabled={isPlaying || isUpdating || isReparing || isMoving}
disabled={
isPlaying ||
isUpdating ||
isReparing ||
isMoving ||
isUninstalling
}
className={`button ${getButtonClass(is_installed)}`}
>
{`${getButtonLabel(is_installed)}`}
Expand Down
Loading