feat: add interactive folder selection for CSV saves and stabilize cross-platform dependency locking
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user