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
@@ -210,7 +210,7 @@ class OpenCodeServerManager {
|
||||
async reloadConfig(): Promise<void> {
|
||||
logger.info('Reloading OpenCode configuration (via API)')
|
||||
try {
|
||||
const response = await fetch(`http://${OPENCODE_SERVER_HOST}:${OPENCODE_SERVER_PORT}/config/`, {
|
||||
const response = await fetch(`http://${OPENCODE_SERVER_HOST}:${OPENCODE_SERVER_PORT}/config`, {
|
||||
method: 'GET'
|
||||
})
|
||||
|
||||
@@ -220,7 +220,7 @@ class OpenCodeServerManager {
|
||||
|
||||
const currentConfig = await response.json()
|
||||
logger.info('Triggering OpenCode config reload via PATCH')
|
||||
const patchResponse = await fetch(`http://${OPENCODE_SERVER_HOST}:${OPENCODE_SERVER_PORT}/config/`, {
|
||||
const patchResponse = await fetch(`http://${OPENCODE_SERVER_HOST}:${OPENCODE_SERVER_PORT}/config`, {
|
||||
method: 'PATCH',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(currentConfig)
|
||||
|
||||
Reference in new issue
Block a user