mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-20 20:34:19 +00:00
* feat(ui): pick an existing folder when installing into a folder The "Into folder" field in the install dialog was free text, so users mistyped paths or could not see which folders already exist. Replace it with a picker listing the source root, every existing folder, and a "New folder..." entry that reveals an input validated like validate.IntoPath. The `into` value sent to the API is unchanged, so no backend change is needed. Existing folders are derived client-side from the resource list and exclude tracked repos, followed source links, folders that are skills and names the server would reject. FolderPicker takes a disabledFolder prop so a later move dialog can reuse it. Refs #510 * fix(ui): block install while the picked folder is not a usable path Two paths let an unusable `into` through: - Choosing "New folder..." cleared the value but still counted as valid, so install silently went to the source root. The picker now reports validity with each change and an empty new folder is invalid. - Validity was ignored once Advanced was collapsed, and the server does not run IntoPath on install, so a bad path could still be installed. The dialog now keeps the picker's validity regardless of the panel. * feat(ui): make new folder a step in the folder picker Typing a new folder path inline gave no sense of where it would land or what the skill's link would be called. Align the picker with the approved design: - Picker rows show a folder icon, the path in monospace, and how many skills are under it; "New folder..." sits below a separator. - "New folder..." opens a step in the dialog with a parent folder, a name, and a result box with the folder path and the link name (path with / as __ in front of the skill name). Using it returns to the picker with the new path selected and tagged as new. - A caption under the picker says where the skill installs and what its link is called, using the skill name from the source when known. - Escape and the back arrow in the step return to the picker instead of closing the install dialog. The `into` sent to the API is still a plain path. FolderPicker takes disabledPaths (a folder and everything below it) for the move dialog. Refs #510