Closed skvrnami closed 1 year ago
Seems like the proposed solution still lets the user create a project after clicking twice on the create button. If warning should be issued, I would not go the css/update placeholder way, but stick with the pop-up warning implemented as warn_user("Project with the same name already exists in the selected directory")
.
Instead of the proposed solution, I counter-propose more simply:
if(file.exists(loc$db_path)){
warn_user("Project with the same name already exists in the selected directory")
}
req(!file.exists(loc$db_path))
I agree with @hlageek. Also, I would add: "Please, choose another name."
fixes #91 When creating a project that already exists (
attest
in this case), after clicking on the Create button, the border of the input field changes to red and the text (and placeholder text) changes toproject {project_name} already exists
. Does it work pass your requirements @martin-hajek? Or do you have any suggestions how it should work?