diff --git a/src/components/ui/mainSide.tsx b/src/components/ui/mainSide.tsx
index dd32a02..8897a53 100644
--- a/src/components/ui/mainSide.tsx
+++ b/src/components/ui/mainSide.tsx
@@ -30,7 +30,12 @@ function MainSide() {
setLogTable(logListName.map((log, index) => {
return
- | {log} |
+ {index+1}. {log} |
+ |
}));
}, [logs]);
@@ -49,24 +54,29 @@ function MainSide() {
+ Logs:
+
-
Logs:
-
-
+
+
-
-
{"Output Folder: " + output}
+
+
Output Folder:
+
{output}
)
}
-function openLog(updateHook:React.Dispatch>) {
+function addLog(updateHook:React.Dispatch>) {
dialog.showOpenDialog({
properties: [
"multiSelections"
@@ -82,10 +92,16 @@ function openLog(updateHook:React.Dispatch>) {
}).then(result => {
let logStr = "";
result.filePaths.forEach(value => {
- logStr += "\"" + String(value) + "\"";
+ const logToAdd = "\"" + value + "\"";
+ if(settingList.log.includes(logToAdd)) {
+ logger.warningMSG("Log already added!");
+ } else {
+ logStr += "\"" + String(value) + "\"";
+ }
});
- updateSettings({log:logStr});
- updateHook(logStr);
+ const newLogs = settingList.log + logStr;
+ updateSettings({log:newLogs});
+ updateHook(newLogs);
}).catch(err => {
logger.errorMSG(err);
});
diff --git a/src/index.css b/src/index.css
index e712319..95bcdef 100644
--- a/src/index.css
+++ b/src/index.css
@@ -189,4 +189,24 @@ header h1 {
position: relative;
margin-top: 15px;
width: 100%;
+}
+
+.noMarginBottom {
+ margin-bottom: 0;
+}
+
+#outputDiv {
+ display: flex;
+ align-items: center;
+}
+#output {
+ margin-left: 5px;
+}
+
+#openLogButton {
+ margin-top: 5px;
+}
+#deleteLogsButton {
+ margin-top: 5px;
+ margin-left: 5px;
}
\ No newline at end of file