-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
65 lines (58 loc) · 3.16 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Optable Offline CSV Editor</title>
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="css/fontawesome.min.css">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
</head>
<body>
<div id="main-container">
<div id="header">
<img src="assets/title.svg" alt="Title Card" id="title-card">
</div>
<p>Select a file and this tool will automatically identify its <strong>headers</strong>. You can then modify headers, hash values, and save an updated version of your file.</p>
<p>All processing is done directly in your browser, ensuring a secure and offline experience.</p>
<hr class="solid">
<section id="file-upload-container">
<div id="drag-drop-area" ondrop="dropHandler(event);" ondragover="dragOverHandler(event);" style="cursor: pointer; text-align: center;">
<input type="file" id="csv-file" accept=".csv" onchange="handleFileUpload()" style="display:none;">
<p style="margin-bottom: 20px">Drop your file here or</p>
<button style="margin-bottom: 20px" onClick="document.getElementById('csv-file').click();" class="upload-button">Select File</button>
</div>
</section>
<div id="delimiter-container" style="display: none">
<div style="margin-bottom: 10px;">
<h2 style="text-align: left;">Delimiter Modifier</h2>
<p style="text-align: left; margin-bottom: 5px;">This files curent delimiter is: <span style="text-align: left; font-size: 1.2em; color: #393D5E; margin-top: 0;"><strong id="detected-delimiter"></strong></span></p>
</div>
<div style="display: flex; align-items: center;">
<label class="switch">
<input type="checkbox" id="change-delimiter-checkbox" onclick="toggleDelimiterField()">
<span class="slider"></span>
</label>
<label for="change-delimiter-checkbox" style="margin-right: 10px; margin-left: 10px; font-size: 14px">Change delimiter to: </label>
<select id="new-delimiter" disabled>
<option value="," selected>Comma</option>
<option value=";">Semicolon</option>
</select>
</div>
</div>
<div id="columns-container-wrapper" style="display: none;">
<div>
<h2>Column Modifier</h2>
<p>Below are the headers that were detected in your CSV. Use 'modify' to match these headers to their specific identifier and trait types you want to load into your DCN. <a href="https://docs.optable.co/optable-documentation/reference/tabular-data-schema" target="_blank">Learn more</a></p>
</div>
<table id="columns-container" hidden>
</table>
</div>
<div id="button-container">
<button id="restart-button" onClick="window.location.reload();" hidden>Restart</button>
<button id="save-button" onclick="saveUpdatedFile()" hidden>Save File</button>
</div>
</div>
<script src="js/main.js"></script>
</body>
</html>