Skip to content

Commit ec138b9

Browse files
feat: Add dialogs for creating APIs and managing database settings, and update package version.
1 parent f2f1dc5 commit ec138b9

3 files changed

Lines changed: 230 additions & 66 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "api-documenter",
3-
"version": "1.0.12",
3+
"version": "1.0.14",
44
"description": "Self-hosted Postman alternative with folder-level RBAC and offline-first documentation",
55
"main": "./out/main/index.js",
66
"author": "Praneeth Kulukuri",

src/renderer/src/components/CreateApiDialog.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,18 @@ export function CreateApiDialog() {
1919

2020
const close = () => setShowCreateApi(false)
2121
const submit = async () => {
22-
if (!name.trim() || !path.trim() || !currentProjectId || !currentFolderId) return
23-
const a = await create.mutateAsync({ projectId: currentProjectId, folderId: currentFolderId, name: name.trim(), method, path: path.trim() })
22+
if (!name.trim() || !currentProjectId || !currentFolderId) return
23+
const a = await create.mutateAsync({
24+
projectId: currentProjectId,
25+
folderId: currentFolderId,
26+
name: name.trim(),
27+
method,
28+
path: path.trim()
29+
})
2430
selectApi(a.id); close()
2531
}
2632

27-
const canSubmit = !!name.trim() && !!path.trim()
33+
const canSubmit = !!name.trim()
2834

2935
return (
3036
<div
@@ -114,7 +120,7 @@ export function CreateApiDialog() {
114120
<label
115121
style={{ display: 'block', fontSize: '12px', fontWeight: 600, textTransform: 'uppercase', letterSpacing: '0.08em', color: '#6B7280', marginBottom: '6px' }}
116122
>
117-
Path <span style={{ color: '#FFFFFF' }}>*</span>
123+
Path
118124
</label>
119125
<input value={path} onChange={e => setPath(e.target.value)} placeholder="/auth/login"
120126
onKeyDown={e => e.key === 'Enter' && submit()}

0 commit comments

Comments
 (0)