New modal-based command that bulk-sets cell values conditionally: - Match Column: autocomplete column name picker - Match Values: textarea with one value per line - Set Value: the value to write Scans all rows; where the Match Column cell equals any Match Value, sets the cell at the cursor's current column to Set Value. Modal supports full keyboard navigation: Tab between fields, Enter in Set Value confirms, Escape closes, arrow keys for autocomplete selection. Co-authored-by: Shelley <shelley@exe.dev>
65 lines
2.9 KiB
HTML
65 lines
2.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8"/>
|
|
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
|
<title>CSV Tool</title>
|
|
<link rel="stylesheet" href="./src/style.css"/>
|
|
</head>
|
|
<body>
|
|
<div id="app">
|
|
<div id="toolbar">
|
|
<div id="cell-ref"></div>
|
|
<input type="text" id="formula-bar" placeholder="Select a cell to edit" />
|
|
</div>
|
|
<div id="table-container" style="--wails-drop-target:drop">
|
|
<table id="csv-table">
|
|
<thead id="table-head"></thead>
|
|
<tbody id="table-body"></tbody>
|
|
</table>
|
|
</div>
|
|
<div id="status-bar">
|
|
<span id="status-text">Ready</span>
|
|
</div>
|
|
<div id="command-palette" class="hidden">
|
|
<input type="text" id="command-input" placeholder="Type a command..." />
|
|
<div id="command-list"></div>
|
|
</div>
|
|
<div id="sort-modal" class="hidden">
|
|
<div class="modal-title">Sort Advanced</div>
|
|
<div class="modal-body">
|
|
<label for="sort-columns-input">Columns (comma-separated, in priority order):</label>
|
|
<div id="sort-input-wrap">
|
|
<input type="text" id="sort-columns-input" placeholder="e.g. Name, Age, City" autocomplete="off" />
|
|
<div id="sort-autocomplete" class="hidden"></div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-actions">
|
|
<button id="sort-cancel-btn" class="modal-btn">Cancel</button>
|
|
<button id="sort-confirm-btn" class="modal-btn modal-btn-primary">Sort</button>
|
|
</div>
|
|
</div>
|
|
<div id="set-where-modal" class="hidden">
|
|
<div class="modal-title">Set Where</div>
|
|
<div class="modal-body">
|
|
<label for="sw-match-col">Match Column:</label>
|
|
<div class="sw-input-wrap">
|
|
<input type="text" id="sw-match-col" placeholder="Column name" autocomplete="off" />
|
|
<div id="sw-col-autocomplete" class="hidden"></div>
|
|
</div>
|
|
<label for="sw-match-values" style="margin-top:10px">Match Values (one per line):</label>
|
|
<textarea id="sw-match-values" rows="6" placeholder="value1 value2 value3"></textarea>
|
|
<label for="sw-set-value" style="margin-top:10px">Set Value:</label>
|
|
<input type="text" id="sw-set-value" placeholder="Value to set" />
|
|
</div>
|
|
<div class="modal-actions">
|
|
<button id="sw-cancel-btn" class="modal-btn">Cancel</button>
|
|
<button id="sw-confirm-btn" class="modal-btn modal-btn-primary">Apply</button>
|
|
</div>
|
|
</div>
|
|
<div id="overlay" class="hidden"></div>
|
|
</div>
|
|
<script src="./src/main.js" type="module"></script>
|
|
</body>
|
|
</html>
|