feat(ui): move game folder picker into settings
The design update moved game-folder configuration out of launcher chrome and into Settings > Library. Follow that contract in the runtime UI without changing the existing storage or Tauri directory commands. The top bar now leaves its right edge for the kebab menu. Settings owns a new Game folder row that shows a valid selected path with a neutral Change button, or the red Not set state with a stronger Choose button when no accessible directory is configured. Both the empty-library state and the Settings row still use the existing native directory picker, so existing saved paths and rescans keep their current behavior. Keep useGameDirectory as the directory-state owner and expose the shared hasGameDirectory boolean from that hook so the grid and Settings field agree on what counts as configured. Test Plan: - git diff --cached --check - just frontend-test - just build Refs: 62b409f4bfc4995c25461776107d28f52b24f30e
This commit is contained in:
@@ -64,6 +64,8 @@ export const useGameDirectory = () => {
|
||||
};
|
||||
}, [gameDir]);
|
||||
|
||||
const hasGameDirectory = gameDir.trim() !== '' && gameDirExists;
|
||||
|
||||
const rescan = useCallback(() => {
|
||||
if (!gameDir.trim()) {
|
||||
setGameDirExists(false);
|
||||
@@ -86,5 +88,5 @@ export const useGameDirectory = () => {
|
||||
void sync();
|
||||
}, [gameDir]);
|
||||
|
||||
return { gameDir, gameDirExists, setGameDir, rescan };
|
||||
return { gameDir, gameDirExists, hasGameDirectory, setGameDir, rescan };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user