mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-15 10:30:37 +09:00
Fix file tree clicks and redesign add-file UI on instructions tab
- Add onClick handler to file row div in PackageFileTree so clicks anywhere on the row select the file (not just the inner button) - Replace "Add" button with compact "+" icon that reveals an inline input with Create/Cancel actions - Hide file name input until "+" is clicked to reduce visual clutter - Validate new file paths: reject ".." path traversal segments - Change placeholder from "docs/TOOLS.md" to "TOOLS.md" Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
b0524412c4
commit
58d7f59477
2 changed files with 61 additions and 23 deletions
|
|
@ -286,6 +286,7 @@ export function PackageFileTree({
|
|||
style={{
|
||||
paddingInlineStart: `${TREE_BASE_INDENT + depth * TREE_STEP_INDENT - 8}px`,
|
||||
}}
|
||||
onClick={() => onSelectFile(node.path)}
|
||||
>
|
||||
{showCheckboxes && (
|
||||
<label className="flex items-center pl-2">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue