Changesets · Branches · Tags · Compare
| Changeset | a765bb1061c8a6cf8e41617fa79c1021045087dca756005854271ddbc9d9caad |
|---|---|
| Author | Dallin Romney <dallinromney@gmail.com> · 2025-08-07 10:09 -07:00 |
| Committer | GitHub <noreply@github.com> · 2025-08-07 10:09 -07:00 |
| Parents | f69193afceac, 80d4c66b3ffb |
1 file changed
modified gui/src/components/mainInput/Lump/sections/PromptsSection.tsx +6 −2
| @@ -60,6 +60,9 @@ | ||
| 60 | 60 | } |
| 61 | 61 | }; |
| 62 | 62 | |
| 63 | + const canEdit = | |
| 64 | + prompt.promptFile && !prompt.promptFile.startsWith("builtin:"); | |
| 65 | + | |
| 63 | 66 | return ( |
| 64 | 67 | <div |
| 65 | 68 | className="hover:bg-list-active hover:text-list-active-foreground flex items-center justify-between gap-3 rounded-md px-2 py-1 hover:cursor-pointer" |
| @@ -78,8 +81,9 @@ | ||
| 78 | 81 | </div> |
| 79 | 82 | <div className="flex items-center gap-2"> |
| 80 | 83 | <PencilIcon |
| 81 | - className="h-3 w-3 cursor-pointer text-gray-400 hover:brightness-125" | |
| 82 | - onClick={handleEditClick} | |
| 84 | + className={`h-3 w-3 cursor-pointer text-gray-400 hover:brightness-125 ${!canEdit ? "pointer-events-none cursor-not-allowed opacity-50" : ""}`} | |
| 85 | + onClick={canEdit ? handleEditClick : undefined} | |
| 86 | + aria-disabled={!canEdit} | |
| 83 | 87 | /> |
| 84 | 88 | <div |
| 85 | 89 | onClick={handleBookmarkClick} |