MCPcopy
hub / github.com/IPADS-SAI/MobiAgent / showAppInfoModal

Function showAppInfoModal

collect/manual/static/js/script.js:1652–1693  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1650
1651// 应用信息输入功能
1652function showAppInfoModal() {
1653 const modal = document.getElementById('appInfoModal');
1654 const appNameInput = document.getElementById('appName');
1655 const taskTypeInput = document.getElementById('taskType');
1656 const confirmBtn = document.getElementById('confirmAppInfoBtn');
1657
1658 // 清空输入框
1659 appNameInput.value = '';
1660 taskTypeInput.value = '';
1661 appNameInput.focus();
1662
1663 // 显示弹窗
1664 modal.style.display = 'flex';
1665
1666 // 绑定确认按钮事件
1667 confirmBtn.onclick = async () => {
1668 const appName = appNameInput.value.trim();
1669 const taskType = taskTypeInput.value.trim();
1670
1671 if (appName === '') {
1672 alert('请选择应用名称!');
1673 appNameInput.focus();
1674 return;
1675 }
1676
1677 if (taskType === '') {
1678 alert('请输入任务类型!');
1679 taskTypeInput.focus();
1680 return;
1681 }
1682
1683 // 保存应用信息
1684 currentAppName = appName;
1685 currentTaskType = taskType;
1686
1687 // 隐藏应用信息弹窗
1688 hideAppInfoModal();
1689
1690 // 显示任务描述弹窗
1691 showTaskDescriptionModal();
1692 };
1693}
1694
1695function hideAppInfoModal() {
1696 const modal = document.getElementById('appInfoModal');

Callers 1

startDataCollectionFunction · 0.85

Calls 2

hideAppInfoModalFunction · 0.85
showTaskDescriptionModalFunction · 0.85

Tested by

no test coverage detected