Add open app folder button to settings

This commit is contained in:
Lncvrt committed 2026-05-09 21:10:48 -07:00
1 parent fff13b0075
commit d61f090c92
1 file changed
+18
+18
View File
@@ -10,6 +10,8 @@ import Dropdown from '@/components/Dropdown'
import { WebviewWindow } from '@tauri-apps/api/webviewWindow'
import { relaunch } from '@tauri-apps/plugin-process'
import { BaseDirectory, exists, readDir, remove } from '@tauri-apps/plugin-fs'
import { openPath } from '@tauri-apps/plugin-opener'
import { appLocalDataDir } from '@tauri-apps/api/path'
export default function Settings () {
const {
@@ -276,6 +278,22 @@ export default function Settings () {
>
Delete invalid/unavailable games
</button>
<button
className='button btntheme1'
title="Restarts the launcher. I don't think I needed to add this description."
onClick={async () => await openPath(await appLocalDataDir())}
>
Open app data folder
</button>
{customDataLocation && (
<button
className='button btntheme1'
title="Restarts the launcher. I don't think I needed to add this description."
onClick={async () => await openPath(customDataLocation)}
>
Open custom app data folder
</button>
)}
<p className='text-center'>Hover buttons for descriptions</p>
</div>
</div>