feat(ui): implement save directory browse button and pre-detection check

- Add a 'Browse...' button to the Connection Status panel in StatusTab.qml.
- Check if save directory is set before wafer detection in HomePage.qml, prompting the user if empty.
- Resolve QML Connections warning by renaming onLogMessageEmitted to onLogMessage.
- Remove temporary debug stack traces from device_controller.py.
This commit is contained in:
jack
2026-06-18 17:08:58 -07:00
parent b417211476
commit 93868bcde4
3 changed files with 94 additions and 36 deletions
+26 -4
View File
@@ -2,6 +2,7 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import ISC
import QtQuick.Dialogs
// ===== Home Workspace Shell =====
Rectangle {
@@ -59,6 +60,26 @@ Rectangle {
}
}
function cleanFolderUrl(url) {
return decodeURIComponent(String(url).replace(/^file:\/\//, ""))
}
function _doDetect() {
root.memoryRead = false
streamController.setMode("review")
streamController.stopStream()
deviceController.detectWafer()
}
FolderDialog {
id: saveDirDialog
title: "Choose a folder to save Data"
onAccepted: {
deviceController.setSaveDataDir(root.cleanFolderUrl(selectedFolder))
root._doDetect()
}
}
// ===== Main Two-Column Layout ======
RowLayout {
anchors.fill: parent
@@ -106,10 +127,11 @@ Rectangle {
root.selectedSideActionIndex = index
root.selectedTabIndex = 0 // always jump to Status tab
if (index === 0) {
root.memoryRead = false
streamController.setMode("review")
streamController.stopStream()
deviceController.detectWafer()
if (!deviceController.saveDataDir) {
saveDirDialog.open()
return
}
root._doDetect()
}
else if (index === 1) {
streamController.setMode("review")