feat: JsonEditor for inputting JSON content (#4)

* feat(editor): add JsonEditor component for JSON configuration editing

* fix(provider): update API Key visibility logic in ProviderForm component

* fix(editor): stabilize JsonEditor height and restore API Key logic

- Revert API Key visibility to preset-based rule and injection to non-custom preset only.
- Reduce JsonEditor min-height from rows*22px to rows*18px to lessen layout jitter when switching presets.
- Keep fonts/size consistent with the previous textarea for visual parity.

* - fix(form): remove websiteUrl auto-extraction from JSON to prevent incorrect overrides

---------

Co-authored-by: Jason <farion1231@gmail.com>
This commit is contained in:
QuentinHsu
2025-09-06 09:30:09 +08:00
committed by GitHub
parent 07dd70570e
commit a14f7ef9b2
5 changed files with 272 additions and 31 deletions

View File

@@ -26,7 +26,12 @@
"vite": "^5.0.0"
},
"dependencies": {
"@codemirror/lang-json": "^6.0.2",
"@codemirror/state": "^6.5.2",
"@codemirror/theme-one-dark": "^6.1.3",
"@codemirror/view": "^6.38.2",
"@tauri-apps/api": "^2.8.0",
"codemirror": "^6.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}