MCPcopy Create free account
hub / github.com/MiroMindAI/MiroThinker / updateNavigationButtons

Function updateNavigationButtons

apps/visualize-trace/static/js/script.js:403–421  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

401}
402
403function updateNavigationButtons() {
404 const hasPrev = currentFileIndex > 0;
405 const hasNext = currentFileIndex >= 0 && currentFileIndex < currentFileList.length - 1;
406
407 elements.prevFileBtn.disabled = !hasPrev;
408 elements.nextFileBtn.disabled = !hasNext;
409
410 // 更新按钮提示文本
411 if (currentFileIndex >= 0 && currentFileList.length > 0) {
412 const prevFile = hasPrev ? currentFileList[currentFileIndex - 1] : null;
413 const nextFile = hasNext ? currentFileList[currentFileIndex + 1] : null;
414
415 elements.prevFileBtn.title = prevFile ? `上一个: ${prevFile.name}` : '没有上一个文件';
416 elements.nextFileBtn.title = nextFile ? `下一个: ${nextFile.name}` : '没有下一个文件';
417 } else {
418 elements.prevFileBtn.title = '上一个文件';
419 elements.nextFileBtn.title = '下一个文件';
420 }
421}
422
423// 键盘快捷键处理
424function handleKeyboardShortcuts(event) {

Callers 4

initializeAppFunction · 0.85
refreshFileListFunction · 0.85
onFileSelectFunction · 0.85
selectFileByIndexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected