better json editor

This commit is contained in:
hiddify-com
2024-07-30 18:47:49 +02:00
parent ce01af1cd8
commit f3e73aee39
2 changed files with 5 additions and 3 deletions

View File

@@ -426,6 +426,7 @@ class _JsonEditorState extends State<JsonEditor> {
),
child: Row(
children: [
const Text('Config Editor: '),
if (!widget.hideEditorsMenuButton)
PopupMenuButton<Editors>(
initialValue: _editor,
@@ -554,8 +555,9 @@ class _JsonEditorState extends State<JsonEditor> {
child: TextFormField(
controller: _controller,
onChanged: parseData,
maxLines: 10,
// expands: true,
maxLines: null,
minLines: null,
expands: true,
textAlignVertical: TextAlignVertical.top,
decoration: const InputDecoration(
border: InputBorder.none,

View File

@@ -274,7 +274,7 @@ class ProfileDetailsPage extends HookConsumerWidget with PresLogger {
],
if (state.isEditing) ...[
SizedBox(
height: MediaQuery.of(context).size.height * 0.8,
height: MediaQuery.of(context).size.height * 0.9,
child: JsonEditor(
expandedObjects: const ["outbounds"],
onChanged: (value) {