mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
Fix/permission dialog id bug (#71)
* Fix permission dialog using wrong ID and add typed permission labels - Fix critical bug: pass permission.id instead of permission.permission when responding - Replace hardcoded switch statement with PERMISSION_LABELS derived from OpenCode types - Add all permission types from PermissionConfig schema * Add per-repo reset permissions feature - Add POST /api/repos/:id/reset-permissions endpoint that disposes OpenCode instance - Add resetRepoPermissions API function in frontend - Add Reset Permissions button in RepoDetail header and mobile dropdown - Add confirmation dialog explaining the action clears Allow Always permissions * Improve OpenCode config error handling and UI responsiveness
This commit is contained in:
1 parent
2bd2b024b8
commit
d035e196bd
9 files changed
+206
-53
No files matched your search
@@ -61,7 +61,7 @@ export function OpenCodeConfigEditor({
|
||||
setEditErrorLine(line)
|
||||
setEditError('Invalid JSON/JSONC format')
|
||||
} else {
|
||||
setEditError(error instanceof Error ? error.message : 'Failed to update config')
|
||||
setEditError('Failed to save. Please check your changes and try again.')
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,14 +70,14 @@ export function OpenCodeConfigEditor({
|
||||
|
||||
return (
|
||||
<Dialog open={isOpen} onOpenChange={(open) => !open && onClose()}>
|
||||
<DialogContent mobileFullscreen className="h-[90vh] max-w-6xl gap-0 flex flex-col p-0 sm:p-6">
|
||||
<DialogContent mobileFullscreen className="gap-0 flex flex-col p-0 md:p-6 w-full min-w-0 sm:max-w-4xl">
|
||||
<DialogHeader className="p-4 sm:p-6 border-b flex flex-row items-center justify-between space-y-0">
|
||||
<DialogTitle className="text-lg sm:text-xl font-semibold">
|
||||
{`Edit Config: ${config.name}`}
|
||||
</DialogTitle>
|
||||
</DialogHeader>
|
||||
|
||||
<div className="flex-1 p-0 sm:p-4 overflow-hidden relative">
|
||||
<div className="flex-1 p-0 sm:p-4 overflow-hidden relative w-full">
|
||||
<Textarea
|
||||
id="edit-config-content"
|
||||
ref={editTextareaRef}
|
||||
|
||||
Reference in new issue
Block a user