mirror of
https://github.com/LinoSchmidt/StickExporterTX.git
synced 2026-03-21 01:51:15 +01:00
Fixed empty log in menu
This commit is contained in:
@@ -21,23 +21,28 @@ function MainSide() {
|
|||||||
</tr>
|
</tr>
|
||||||
}));
|
}));
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const logList = settingList.log.substring(1).slice(0, -1).split('""');
|
if(settingList.log == "") {
|
||||||
|
setLogTable([]);
|
||||||
|
} else {
|
||||||
|
|
||||||
const logListName:string[] = [];
|
const logList = settingList.log.substring(1).slice(0, -1).split('""');
|
||||||
logList.forEach(log => {
|
|
||||||
logListName.push(log.split('\\')[log.split('\\').length - 1]);
|
const logListName:string[] = [];
|
||||||
});
|
logList.forEach(log => {
|
||||||
|
logListName.push(log.split('\\')[log.split('\\').length - 1]);
|
||||||
setLogTable(logListName.map((log, index) => {
|
});
|
||||||
return <tr key={index}>
|
|
||||||
<td title={logList[index]}>{index+1}. {log}</td>
|
setLogTable(logListName.map((log, index) => {
|
||||||
<td><button onClick={() => {
|
return <tr key={index}>
|
||||||
const newLogs = settingList.log.replace('"'+logList[index]+'"', "");
|
<td title={logList[index]}>{index+1}. {log}</td>
|
||||||
updateSettings({log:newLogs});
|
<td><button onClick={() => {
|
||||||
setLogs(newLogs);
|
const newLogs = settingList.log.replace('"'+logList[index]+'"', "");
|
||||||
}}>Delete</button></td>
|
updateSettings({log:newLogs});
|
||||||
</tr>
|
setLogs(newLogs);
|
||||||
}));
|
}}>Delete</button></td>
|
||||||
|
</tr>
|
||||||
|
}));
|
||||||
|
}
|
||||||
}, [logs]);
|
}, [logs]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -70,7 +75,7 @@ function MainSide() {
|
|||||||
<div className="dataDiv" id="outputDiv">
|
<div className="dataDiv" id="outputDiv">
|
||||||
<h4>Output Folder:</h4>
|
<h4>Output Folder:</h4>
|
||||||
<p id="output">{output}</p>
|
<p id="output">{output}</p>
|
||||||
<button onClick={() => openVid(setOutput)}>Open Video</button>
|
<button onClick={() => openVid(setOutput)}>Select Output Folder</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user