feat: add interactive folder selection for CSV saves and stabilize cross-platform dependency locking

This commit is contained in:
jack
2026-06-18 10:30:51 -07:00
parent e545c245d7
commit 1119733929
5 changed files with 201 additions and 36 deletions
+26
View File
@@ -1,6 +1,7 @@
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import QtQuick.Dialogs
import ISC
// ===== Status Tab =====
@@ -29,6 +30,28 @@ ColumnLayout {
property string csvPath: ""
property bool dataParsed: false
function cleanFolderUrl(url) {
return decodeURIComponent(String(url).replace(/^file:\/\//, ""))
}
function currentFamilyCode() {
var info = deviceController.lastWaferInfo
return info && info.length > 0 ? (info[0] || "") : ""
}
function parseAndSavePendingRead() {
deviceController.parseAndSaveData(root.currentFamilyCode(), deviceController.selectedPort || "")
}
FolderDialog {
id: saveDirDialog
title: "Choose CSV Save Folder"
onAccepted: {
deviceController.setSaveDataDir(root.cleanFolderUrl(selectedFolder))
root.parseAndSavePendingRead()
}
}
// ===== Empty state — nothing shown until detect fires =====
Item {
Layout.fillWidth: true
@@ -345,6 +368,9 @@ ColumnLayout {
root.dataRows = 0
root.dataCols = 0
root.csvPath = ""
if (result && result.success === true)
saveDirDialog.open()
}
}