-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'request-body-panel' into trunk
- Loading branch information
Showing
22 changed files
with
2,095 additions
and
180 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright 2024 the Cartero authors | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
using Gtk 4.0; | ||
using Adw 1; | ||
|
||
template $CarteroFormdataPayloadPane: $CarteroBasePayloadPane { | ||
ScrolledWindow { | ||
hexpand: true; | ||
vexpand: true; | ||
|
||
Adw.Clamp { | ||
styles [ | ||
"background" | ||
] | ||
|
||
maximum-size: 720; | ||
|
||
$CarteroKeyValuePane data {} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/* | ||
* Copyright 2024 the Cartero authors | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
using Gtk 4.0; | ||
using Adw 1; | ||
|
||
template $CarteroPayloadTab: Gtk.Box { | ||
styles [ | ||
"background" | ||
] | ||
|
||
orientation: vertical; | ||
spacing: 15; | ||
|
||
Adw.Clamp { | ||
margin-top: 10; | ||
vexpand: false; | ||
|
||
Adw.PreferencesGroup { | ||
Adw.ComboRow combo { | ||
title: _("Body type"); | ||
model: entries; | ||
notify::selected => $on_selection_changed() swapped; | ||
} | ||
} | ||
} | ||
|
||
Gtk.Box { | ||
orientation: vertical; | ||
vexpand: true; | ||
valign: fill; | ||
|
||
Gtk.Separator sep {} | ||
|
||
Gtk.Stack stack { | ||
Gtk.StackPage { | ||
name: "none"; | ||
|
||
child: Adw.Bin {}; | ||
} | ||
|
||
Gtk.StackPage { | ||
name: "urlencoded"; | ||
|
||
child: $CarteroUrlencodedPayloadPane urlencoded {}; | ||
} | ||
|
||
Gtk.StackPage { | ||
name: "formdata"; | ||
|
||
child: $CarteroFormdataPayloadPane formdata {}; | ||
} | ||
|
||
Gtk.StackPage { | ||
name: "raw"; | ||
|
||
child: $CarteroRawPayloadPane raw {}; | ||
} | ||
|
||
visible-child-name: "none"; | ||
} | ||
} | ||
} | ||
|
||
Gtk.StringList entries { | ||
strings [ | ||
_("(none)"), | ||
_("URL Encoded"), | ||
_("Multipart Form Data"), | ||
"JSON", | ||
"XML", | ||
_("Raw"), | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright 2024 the Cartero authors | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
using Gtk 4.0; | ||
using Adw 1; | ||
using GtkSource 5; | ||
|
||
template $CarteroRawPayloadPane: $CarteroBasePayloadPane { | ||
ScrolledWindow { | ||
hexpand: true; | ||
vexpand: true; | ||
|
||
GtkSource.View view { | ||
top-margin: 10; | ||
bottom-margin: 10; | ||
left-margin: 10; | ||
right-margin: 10; | ||
smart-backspace: true; | ||
monospace: true; | ||
buffer: buffer; | ||
} | ||
} | ||
} | ||
|
||
GtkSource.Buffer buffer {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright 2024 the Cartero authors | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
using Gtk 4.0; | ||
using Adw 1; | ||
|
||
template $CarteroUrlencodedPayloadPane: $CarteroBasePayloadPane { | ||
ScrolledWindow { | ||
hexpand: true; | ||
vexpand: true; | ||
|
||
Adw.Clamp { | ||
styles [ | ||
"background" | ||
] | ||
|
||
maximum-size: 720; | ||
|
||
$CarteroKeyValuePane data {} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.