mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 08:33:36 +00:00
refactor: update graph view actions to include onViewDetails and remove onViewBranch
- Added onViewDetails callback to handle feature detail viewing. - Removed onViewBranch functionality and associated UI elements for a cleaner interface.
This commit is contained in:
@@ -14,10 +14,10 @@ export interface TaskNodeData extends Feature {
|
||||
isDimmed?: boolean;
|
||||
// Action callbacks
|
||||
onViewLogs?: () => void;
|
||||
onViewDetails?: () => void;
|
||||
onStartTask?: () => void;
|
||||
onStopTask?: () => void;
|
||||
onResumeTask?: () => void;
|
||||
onViewBranch?: () => void;
|
||||
}
|
||||
|
||||
export type TaskNode = Node<TaskNodeData, 'task'>;
|
||||
@@ -30,10 +30,10 @@ export type DependencyEdge = Edge<{
|
||||
|
||||
export interface NodeActionCallbacks {
|
||||
onViewLogs?: (featureId: string) => void;
|
||||
onViewDetails?: (featureId: string) => void;
|
||||
onStartTask?: (featureId: string) => void;
|
||||
onStopTask?: (featureId: string) => void;
|
||||
onResumeTask?: (featureId: string) => void;
|
||||
onViewBranch?: (featureId: string) => void;
|
||||
}
|
||||
|
||||
interface UseGraphNodesProps {
|
||||
@@ -94,6 +94,9 @@ export function useGraphNodes({
|
||||
onViewLogs: actionCallbacks?.onViewLogs
|
||||
? () => actionCallbacks.onViewLogs!(feature.id)
|
||||
: undefined,
|
||||
onViewDetails: actionCallbacks?.onViewDetails
|
||||
? () => actionCallbacks.onViewDetails!(feature.id)
|
||||
: undefined,
|
||||
onStartTask: actionCallbacks?.onStartTask
|
||||
? () => actionCallbacks.onStartTask!(feature.id)
|
||||
: undefined,
|
||||
@@ -103,9 +106,6 @@ export function useGraphNodes({
|
||||
onResumeTask: actionCallbacks?.onResumeTask
|
||||
? () => actionCallbacks.onResumeTask!(feature.id)
|
||||
: undefined,
|
||||
onViewBranch: actionCallbacks?.onViewBranch
|
||||
? () => actionCallbacks.onViewBranch!(feature.id)
|
||||
: undefined,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user