Skip to content

Commit 144a86b

Browse files
committed
#3 | PI: adding fields for showing data from response option
1 parent 86930c2 commit 144a86b

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

Sources/propertyinspector/index.html

+35
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,41 @@
8181
</div>
8282
</div>
8383

84+
<div class="sdpi-item">
85+
<div style="width: 15px;"></div>
86+
<div class="sdpi-item-value">
87+
<div class="sdpi-item-child">
88+
<input id="response_data" type="checkbox">
89+
<label for="response_data" class="sdpi-item-label"><span></span>Button shows data from response</label>
90+
</div>
91+
</div>
92+
</div>
93+
<div id="response_data_container" style="display:none">
94+
<details>
95+
<summary>Expand for Response data display instructions</summary>
96+
<p>Specify the JSON path in the API response whose value will show up on the key.</p>
97+
<p>A missing path will only display question marks.</p>
98+
<p>YOU MUST NOT USE THE TITLE OTHERWISE IT WILL HIDE THE DATA RETURNED</p>
99+
<p>(but you can use the title color and size config to adjust the data displayed).</p>
100+
</details>
101+
<div class="sdpi-item">
102+
<div class="sdpi-item-label">Name</div>
103+
<input class="sdpi-item-value" type="text" id="response_data_name">
104+
</div>
105+
<div class="sdpi-item">
106+
<div class="sdpi-item-label">JSON Path</div>
107+
<input class="sdpi-item-value" type="text" id="response_data_field">
108+
</div>
109+
<div class="sdpi-item">Background</div>
110+
<div class="sdpi-item">
111+
<div class="sdpi-item-group file" id="matchedfilepickergroup">
112+
<input class="sdpi-item-value" type="file" id="background_image" accept=".jpg, .jpeg, .png, .ico, .gif, .bmp, .tiff">
113+
<label class="sdpi-file-info " for="background_image">No file...</label>
114+
<label class="sdpi-file-label" for="background_image">Choose file...</label>
115+
</div>
116+
</div>
117+
</div>
118+
84119
<div class="sdpi-item">
85120
<div style="width: 15px;"></div>
86121
<div class="sdpi-item-value">

Sources/propertyinspector/index_pi.js

+3
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,9 @@ function showHideSettings() {
342342
d = document.getElementById('request_parameters_container');
343343
d.style.display = settings.request_parameters ? "" : "none";
344344

345+
d = document.getElementById('response_data_container');
346+
d.style.display = settings.response_data ? "" : "none";
347+
345348
d = document.getElementById('response_parse_container');
346349
d.style.display = settings.response_parse ? "" : "none";
347350

0 commit comments

Comments
 (0)