314 lines
12 KiB
XML
314 lines
12 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<interface>
|
|
<requires lib="gtk" version="4.0"/>
|
|
<requires lib="Adw" version="1.0"/>
|
|
<template class="HistoryItem" parent="GtkBox">
|
|
<property name="orientation">vertical</property>
|
|
<property name="spacing">0</property>
|
|
|
|
<!-- Summary (always visible) -->
|
|
<child>
|
|
<object class="GtkBox" id="summary_box">
|
|
<property name="orientation">horizontal</property>
|
|
<property name="spacing">12</property>
|
|
<property name="margin-start">12</property>
|
|
<property name="margin-end">12</property>
|
|
<property name="margin-top">8</property>
|
|
<property name="margin-bottom">8</property>
|
|
|
|
<!-- Expand/Collapse Icon -->
|
|
<child>
|
|
<object class="GtkImage" id="expand_icon">
|
|
<property name="icon-name">go-next-symbolic</property>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Method Label -->
|
|
<child>
|
|
<object class="GtkLabel" id="method_label">
|
|
<property name="label">GET</property>
|
|
<property name="width-chars">6</property>
|
|
<property name="xalign">0</property>
|
|
<style>
|
|
<class name="heading"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- URL Label -->
|
|
<child>
|
|
<object class="GtkLabel" id="url_label">
|
|
<property name="label">URL</property>
|
|
<property name="ellipsize">end</property>
|
|
<property name="xalign">0</property>
|
|
<property name="hexpand">True</property>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Status Label -->
|
|
<child>
|
|
<object class="GtkLabel" id="status_label">
|
|
<property name="label">200 OK</property>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Timestamp Label -->
|
|
<child>
|
|
<object class="GtkLabel" id="timestamp_label">
|
|
<property name="label">Timestamp</property>
|
|
<style>
|
|
<class name="dim-label"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Click gesture for toggling expansion (only on summary) -->
|
|
<child>
|
|
<object class="GtkGestureClick" id="click_gesture">
|
|
<signal name="released" handler="on_clicked" swapped="no"/>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Details (expandable) -->
|
|
<child>
|
|
<object class="GtkRevealer" id="details_revealer">
|
|
<property name="reveal-child">False</property>
|
|
<property name="transition-type">slide-down</property>
|
|
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="orientation">vertical</property>
|
|
<property name="spacing">6</property>
|
|
<property name="margin-start">36</property>
|
|
<property name="margin-end">12</property>
|
|
<property name="margin-bottom">12</property>
|
|
|
|
<!-- Request Section -->
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="orientation">horizontal</property>
|
|
<property name="spacing">6</property>
|
|
<property name="margin-top">6</property>
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="label">Request:</property>
|
|
<property name="xalign">0</property>
|
|
<property name="hexpand">True</property>
|
|
<style>
|
|
<class name="heading"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkButton" id="copy_request_button">
|
|
<property name="icon-name">edit-copy-symbolic</property>
|
|
<property name="tooltip-text">Copy request to clipboard</property>
|
|
<property name="valign">center</property>
|
|
<signal name="clicked" handler="on_copy_request_clicked" swapped="no"/>
|
|
<style>
|
|
<class name="flat"/>
|
|
<class name="circular"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkLabel" id="request_headers_label">
|
|
<property name="label">Headers...</property>
|
|
<property name="xalign">0</property>
|
|
<property name="selectable">True</property>
|
|
<property name="wrap">True</property>
|
|
<property name="wrap-mode">word-char</property>
|
|
<style>
|
|
<class name="monospace"/>
|
|
<class name="dim-label"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Request Body (scrollable, initially collapsed) -->
|
|
<child>
|
|
<object class="GtkScrolledWindow" id="request_body_scroll">
|
|
<property name="margin-top">6</property>
|
|
<property name="min-content-height">60</property>
|
|
<property name="max-content-height">60</property>
|
|
<property name="propagate-natural-height">True</property>
|
|
<child>
|
|
<object class="GtkTextView" id="request_body_text">
|
|
<property name="editable">False</property>
|
|
<property name="monospace">True</property>
|
|
<property name="left-margin">6</property>
|
|
<property name="right-margin">6</property>
|
|
<property name="top-margin">6</property>
|
|
<property name="bottom-margin">6</property>
|
|
<property name="wrap-mode">word-char</property>
|
|
<style>
|
|
<class name="view"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Request Expander Separator -->
|
|
<child>
|
|
<object class="GtkBox" id="request_expander">
|
|
<property name="orientation">horizontal</property>
|
|
<property name="spacing">6</property>
|
|
<property name="halign">fill</property>
|
|
<property name="margin-top">3</property>
|
|
<property name="margin-bottom">3</property>
|
|
<child>
|
|
<object class="GtkSeparator">
|
|
<property name="hexpand">True</property>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkLabel" id="request_expander_label">
|
|
<property name="label">Show full request</property>
|
|
<style>
|
|
<class name="dim-label"/>
|
|
<class name="caption"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkSeparator">
|
|
<property name="hexpand">True</property>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkGestureClick">
|
|
<signal name="released" handler="on_request_expander_clicked" swapped="no"/>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Response Section -->
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="orientation">horizontal</property>
|
|
<property name="spacing">6</property>
|
|
<property name="margin-top">6</property>
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="label">Response:</property>
|
|
<property name="xalign">0</property>
|
|
<property name="hexpand">True</property>
|
|
<style>
|
|
<class name="heading"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkButton" id="copy_response_button">
|
|
<property name="icon-name">edit-copy-symbolic</property>
|
|
<property name="tooltip-text">Copy response to clipboard</property>
|
|
<property name="valign">center</property>
|
|
<signal name="clicked" handler="on_copy_response_clicked" swapped="no"/>
|
|
<style>
|
|
<class name="flat"/>
|
|
<class name="circular"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkLabel" id="response_headers_label">
|
|
<property name="label">Headers...</property>
|
|
<property name="xalign">0</property>
|
|
<property name="selectable">True</property>
|
|
<property name="wrap">True</property>
|
|
<property name="wrap-mode">word-char</property>
|
|
<style>
|
|
<class name="monospace"/>
|
|
<class name="dim-label"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Response Body (scrollable, initially collapsed) -->
|
|
<child>
|
|
<object class="GtkScrolledWindow" id="response_body_scroll">
|
|
<property name="margin-top">6</property>
|
|
<property name="min-content-height">60</property>
|
|
<property name="max-content-height">60</property>
|
|
<property name="propagate-natural-height">True</property>
|
|
<child>
|
|
<object class="GtkTextView" id="response_body_text">
|
|
<property name="editable">False</property>
|
|
<property name="monospace">True</property>
|
|
<property name="left-margin">6</property>
|
|
<property name="right-margin">6</property>
|
|
<property name="top-margin">6</property>
|
|
<property name="bottom-margin">6</property>
|
|
<property name="wrap-mode">word-char</property>
|
|
<style>
|
|
<class name="view"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Response Expander Separator -->
|
|
<child>
|
|
<object class="GtkBox" id="response_expander">
|
|
<property name="orientation">horizontal</property>
|
|
<property name="spacing">6</property>
|
|
<property name="halign">fill</property>
|
|
<property name="margin-top">3</property>
|
|
<property name="margin-bottom">3</property>
|
|
<child>
|
|
<object class="GtkSeparator">
|
|
<property name="hexpand">True</property>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkLabel" id="response_expander_label">
|
|
<property name="label">Show full response</property>
|
|
<style>
|
|
<class name="dim-label"/>
|
|
<class name="caption"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkSeparator">
|
|
<property name="hexpand">True</property>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkGestureClick">
|
|
<signal name="released" handler="on_response_expander_clicked" swapped="no"/>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Load Button -->
|
|
<child>
|
|
<object class="GtkButton" id="load_button">
|
|
<property name="label">Load Request</property>
|
|
<property name="halign">start</property>
|
|
<property name="margin-top">6</property>
|
|
<signal name="clicked" handler="on_load_clicked" swapped="no"/>
|
|
<style>
|
|
<class name="suggested-action"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</template>
|
|
</interface>
|