큐 관리 추가
This commit is contained in:
@@ -29,18 +29,22 @@ const AppContent = ({ options, showLogin, setShowLogin }) => {
|
||||
showAddScenario: false,
|
||||
showVariableModal: false,
|
||||
showMockRouteEdit: false,
|
||||
showTCPServerEdit: false,
|
||||
showQueueEdit: false,
|
||||
selectedItem: null,
|
||||
});
|
||||
|
||||
const handleMenuClick = async (action, screen, item = null) => {
|
||||
|
||||
console.log(action);
|
||||
console.log(item);
|
||||
|
||||
if (screen) {
|
||||
console.log('Screen:', screen);
|
||||
setCurrentScreen(screen);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(item);
|
||||
// Handle modal actions
|
||||
switch (action) {
|
||||
case 'request-add':
|
||||
@@ -49,11 +53,15 @@ const AppContent = ({ options, showLogin, setShowLogin }) => {
|
||||
case 'response-add':
|
||||
case 'response-edit':
|
||||
case 'response-clone':
|
||||
setDialogState(prev => ({
|
||||
...prev,
|
||||
showMockRouteEdit: true,
|
||||
selectedItem: item // Pass the selected item
|
||||
}));
|
||||
setDialogState(prev => ({...prev, showMockRouteEdit: true, selectedItem: item }));
|
||||
break;
|
||||
case 'queue-add':
|
||||
case 'queue-edit':
|
||||
setDialogState(prev => ({ ...prev, showQueueEdit: true , selectedItem: item}));
|
||||
break;
|
||||
case 'socket-add':
|
||||
case 'socket-edit':
|
||||
setDialogState(prev => ({ ...prev, showTCPServerEdit: true , selectedItem: item}));
|
||||
break;
|
||||
case 'collection-add':
|
||||
setDialogState(prev => ({ ...prev, showAddCollection: true }));
|
||||
@@ -122,6 +130,8 @@ const AppContent = ({ options, showLogin, setShowLogin }) => {
|
||||
showAddScenario={dialogState.showAddScenario}
|
||||
showVariableModal={dialogState.showVariableModal}
|
||||
showMockRouteEdit={dialogState.showMockRouteEdit}
|
||||
showTCPServerEdit={dialogState.showTCPServerEdit}
|
||||
showQueueEdit={dialogState.showQueueEdit}
|
||||
selectedItem={dialogState.selectedItem}
|
||||
onDialogChange={handleDialogChange}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user