mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-16 21:53:07 +00:00
* Changes from fix/fetch-before-pull-fetch * feat: Improve pull request flow, add branch selection for worktree creation, fix for automode concurrency count * feat: Add validation for remote names and improve error handling * Address PR comments and mobile layout fixes * ``` refactor: Extract PR target resolution logic into dedicated service ``` * feat: Add app shell UI and improve service imports. Address PR comments * fix: Improve security validation and cache handling in git operations * feat: Add GET /list endpoint and improve parameter handling * chore: Improve validation, accessibility, and error handling across apps * chore: Format vite server port configuration * fix: Add error handling for gh pr list command and improve offline fallbacks * fix: Preserve existing PR creation time and improve remote handling
31 lines
632 B
TypeScript
31 lines
632 B
TypeScript
import { useState, useCallback } from 'react';
|
|
|
|
export type ProjectSettingsViewId =
|
|
| 'identity'
|
|
| 'theme'
|
|
| 'worktrees'
|
|
| 'commands'
|
|
| 'scripts'
|
|
| 'claude'
|
|
| 'data'
|
|
| 'danger';
|
|
|
|
interface UseProjectSettingsViewOptions {
|
|
initialView?: ProjectSettingsViewId;
|
|
}
|
|
|
|
export function useProjectSettingsView({
|
|
initialView = 'identity',
|
|
}: UseProjectSettingsViewOptions = {}) {
|
|
const [activeView, setActiveView] = useState<ProjectSettingsViewId>(initialView);
|
|
|
|
const navigateTo = useCallback((viewId: ProjectSettingsViewId) => {
|
|
setActiveView(viewId);
|
|
}, []);
|
|
|
|
return {
|
|
activeView,
|
|
navigateTo,
|
|
};
|
|
}
|