up
This commit is contained in:
+9
-3
@@ -592,11 +592,11 @@ app
|
||||
intent && typeof intent === 'object' && 'action' in intent ? intent.action : null
|
||||
try {
|
||||
const result = await online!.act(intent)
|
||||
if (['download', 'check', 'remove'].includes(String(action)))
|
||||
if (['download', 'check', 'remove', 'clear-games'].includes(String(action)))
|
||||
diagnostics?.record('package', { action, status: 'success' })
|
||||
return result
|
||||
} catch (error) {
|
||||
if (['download', 'check', 'remove'].includes(String(action)))
|
||||
if (['download', 'check', 'remove', 'clear-games'].includes(String(action)))
|
||||
diagnostics?.record('package', { action, status: 'failed' })
|
||||
throw error
|
||||
} finally {
|
||||
@@ -622,7 +622,13 @@ app
|
||||
requireControl(event)
|
||||
return packages
|
||||
.list()
|
||||
.map((pkg) => ({ key: pkg.key, version: pkg.version, name: pkg.package.game.name }))
|
||||
.map((pkg) => ({
|
||||
key: pkg.key,
|
||||
version: pkg.version,
|
||||
name: pkg.package.game.name,
|
||||
downloadedFiles: pkg.package.assets.filter((asset) => packages.canRead(pkg.key, asset.id)).length,
|
||||
totalFiles: pkg.package.assets.length,
|
||||
}))
|
||||
})
|
||||
ipcMain.handle('select-package', async (event, key: unknown) => {
|
||||
requireControl(event)
|
||||
|
||||
Reference in New Issue
Block a user