Skip to content
Open
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/en/gamepage.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"add_to_favourites": "Add To Favourites",
"browse_files": "Browse Files",
"browse_wine_prefix": "Browse Wine Prefix",
"showConfigFileInFolder": "Show Game Config File",
"cancel": "Pause/Cancel",
"changelog": "Show Changelog",
"continue": "Continue Downloading",
Expand Down
6 changes: 5 additions & 1 deletion src/backend/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -627,13 +627,17 @@ addListener('openSidInfoPage', async () => openUrlOrFile(sidInfoUrl))
addListener('openCustomThemesWiki', async () =>
openUrlOrFile(customThemesWikiLink)
)
addListener('showConfigFileInFolder', async (event, appName) => {
addListener('openConfigFile', async (event, appName) => {
if (appName === 'default') {
return openUrlOrFile(configPath)
}
return openUrlOrFile(path.join(gamesConfigPath, `${appName}.json`))
})

addListener('showConfigFileInFolder', (event, appName) =>
showItemInFolder(path.join(gamesConfigPath, `${appName}.json`))
)

addListener('removeFolder', async (e, [path, folderName]) => {
removeFolder(path, folderName)
})
Expand Down
1 change: 1 addition & 0 deletions src/common/types/ipc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ interface SyncIPCFunctions {
openWikiLink: () => void
openSidInfoPage: () => void
openCustomThemesWiki: () => void
openConfigFile: (appName: string) => void
showConfigFileInFolder: (appName: string) => void
removeFolder: ([path, folderName]: [string, string]) => void
clearCache: (showDialog?: boolean, fromVersionChange?: boolean) => void
Expand Down
8 changes: 8 additions & 0 deletions src/frontend/screens/Game/GameSubMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,14 @@ export default function GamesSubmenu({
{t('button.browse_wine_prefix', 'Browse Wine Prefix')}
</button>
)}
{isInstalled && (
<button
onClick={() => window.api.showConfigFileInFolder(appName)}
className="link button is-text is-link"
>
{t('button.showConfigFileInFolder', 'Show Game Config File')}
</button>
)}
</div>
</div>
</>
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/screens/Settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function Settings() {
},
{
label: t('settings.open-config-file', 'Open Config File'),
onclick: () => window.api.showConfigFileInFolder(appName),
onclick: () => window.api.openConfigFile(appName),
show: !isLogSettings
}
]}
Expand Down
1 change: 1 addition & 0 deletions src/preload/api/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export const refreshLibrary = makeHandlerInvoker('refreshLibrary')
export const gamepadAction = makeHandlerInvoker('gamepadAction')
export const logError = makeListenerCaller('logError')
export const logInfo = makeListenerCaller('logInfo')
export const openConfigFile = makeListenerCaller('openConfigFile')
export const showConfigFileInFolder = makeListenerCaller('showConfigFileInFolder')
export const openFolder = makeListenerCaller('openFolder')
export const syncGOGSaves = makeHandlerInvoker('syncGOGSaves')
Expand Down
Loading