mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-07-07 04:58:03 +02:00
Add files via upload
This commit is contained in:
@@ -97,6 +97,24 @@ function closeRobotCreateModal() {
|
||||
if (modal) modal.style.display = 'none';
|
||||
}
|
||||
|
||||
function openRobotCommandsModal() {
|
||||
if (typeof openAppModal === 'function') {
|
||||
openAppModal('robot-commands-modal', { focus: false });
|
||||
return;
|
||||
}
|
||||
const modal = document.getElementById('robot-commands-modal');
|
||||
if (modal) modal.style.display = 'block';
|
||||
}
|
||||
|
||||
function closeRobotCommandsModal() {
|
||||
if (typeof closeAppModal === 'function') {
|
||||
closeAppModal('robot-commands-modal');
|
||||
return;
|
||||
}
|
||||
const modal = document.getElementById('robot-commands-modal');
|
||||
if (modal) modal.style.display = 'none';
|
||||
}
|
||||
|
||||
function selectRobotType(type) {
|
||||
closeRobotCreateModal();
|
||||
openRobotEditor(type);
|
||||
@@ -129,6 +147,14 @@ function bindRobotManagerEvents() {
|
||||
});
|
||||
modal.dataset.robotManagerBound = 'true';
|
||||
}
|
||||
|
||||
const commandsModal = document.getElementById('robot-commands-modal');
|
||||
if (commandsModal && !commandsModal.dataset.robotManagerBound) {
|
||||
commandsModal.addEventListener('click', (event) => {
|
||||
if (event.target === commandsModal) closeRobotCommandsModal();
|
||||
});
|
||||
commandsModal.dataset.robotManagerBound = 'true';
|
||||
}
|
||||
}
|
||||
|
||||
// 生成工具的唯一标识符,用于区分同名但来源不同的工具
|
||||
|
||||
Reference in New Issue
Block a user