drf-to-mkdoc 0.3.0__py3-none-any.whl → 0.3.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of drf-to-mkdoc might be problematic. Click here for more details.
- drf_to_mkdoc/conf/defaults.py +1 -2
- drf_to_mkdoc/conf/settings.py +2 -1
- drf_to_mkdoc/static/drf-to-mkdoc/javascripts/settings-modal.js +361 -0
- drf_to_mkdoc/static/drf-to-mkdoc/javascripts/try-out/form-manager.js +136 -17
- drf_to_mkdoc/static/drf-to-mkdoc/javascripts/try-out/request-executor.js +18 -2
- drf_to_mkdoc/static/drf-to-mkdoc/stylesheets/endpoints/filter-section.css +10 -5
- drf_to_mkdoc/static/drf-to-mkdoc/stylesheets/endpoints/settings-modal.css +555 -0
- drf_to_mkdoc/templates/endpoints/list/base.html +1 -0
- drf_to_mkdoc/templates/endpoints/list/filter_section.html +3 -1
- drf_to_mkdoc/templates/endpoints/list/settings_modal.html +138 -0
- drf_to_mkdoc/templates/try-out/form.html +1 -1
- drf_to_mkdoc/utils/endpoint_detail_generator.py +1 -1
- drf_to_mkdoc/utils/endpoint_list_generator.py +2 -0
- drf_to_mkdoc/utils/schema.py +10 -1
- drf_to_mkdoc-0.3.2.dist-info/METADATA +232 -0
- {drf_to_mkdoc-0.3.0.dist-info → drf_to_mkdoc-0.3.2.dist-info}/RECORD +19 -16
- drf_to_mkdoc-0.3.0.dist-info/METADATA +0 -315
- {drf_to_mkdoc-0.3.0.dist-info → drf_to_mkdoc-0.3.2.dist-info}/WHEEL +0 -0
- {drf_to_mkdoc-0.3.0.dist-info → drf_to_mkdoc-0.3.2.dist-info}/licenses/LICENSE +0 -0
- {drf_to_mkdoc-0.3.0.dist-info → drf_to_mkdoc-0.3.2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,555 @@
|
|
|
1
|
+
/* Settings Modal Styles */
|
|
2
|
+
.settings-modal {
|
|
3
|
+
position: fixed;
|
|
4
|
+
top: 0;
|
|
5
|
+
left: 0;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
z-index: 10000;
|
|
9
|
+
display: none;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
padding: var(--try-out-spacing-lg, 1rem);
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.settings-modal.show {
|
|
17
|
+
display: flex;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.settings-modal .modal-overlay {
|
|
21
|
+
position: fixed;
|
|
22
|
+
top: 0;
|
|
23
|
+
left: 0;
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 100%;
|
|
26
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
27
|
+
backdrop-filter: blur(2px);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.settings-modal .modal-content {
|
|
31
|
+
position: relative;
|
|
32
|
+
width: 100%;
|
|
33
|
+
max-width: 600px;
|
|
34
|
+
max-height: 85vh;
|
|
35
|
+
background-color: var(--bg-primary, #ffffff);
|
|
36
|
+
border-radius: 16px;
|
|
37
|
+
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
z-index: 1;
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* Modal Header */
|
|
45
|
+
.settings-modal .modal-header {
|
|
46
|
+
padding: var(--try-out-spacing-lg, 1rem) var(--try-out-spacing-xl, 1.5rem);
|
|
47
|
+
background: linear-gradient(135deg, var(--accent-primary, #3b82f6), var(--accent-secondary, #1d4ed8));
|
|
48
|
+
color: white;
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: space-between;
|
|
52
|
+
flex-shrink: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.modal-title-group {
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: var(--try-out-spacing, 0.75rem);
|
|
59
|
+
flex: 1;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.modal-icon {
|
|
63
|
+
font-size: 1.25rem;
|
|
64
|
+
line-height: 1;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.settings-modal .modal-header h3 {
|
|
68
|
+
margin: 0;
|
|
69
|
+
font-size: var(--try-out-font-lg, 1rem);
|
|
70
|
+
font-weight: 600;
|
|
71
|
+
line-height: 1.5;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.modal-controls {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
gap: var(--try-out-spacing-sm, 0.5rem);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.settings-modal .modal-close {
|
|
81
|
+
background: rgba(255, 255, 255, 0.1);
|
|
82
|
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
83
|
+
color: white;
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
padding: var(--try-out-spacing-xs, 0.25rem);
|
|
86
|
+
font-size: 1rem;
|
|
87
|
+
line-height: 1;
|
|
88
|
+
border-radius: 6px;
|
|
89
|
+
width: 32px;
|
|
90
|
+
height: 32px;
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
transition: all 0.3s ease;
|
|
95
|
+
flex-shrink: 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.settings-modal .modal-close:hover {
|
|
99
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
100
|
+
border-color: rgba(255, 255, 255, 0.3);
|
|
101
|
+
transform: scale(1.05);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.settings-modal .modal-close:active {
|
|
105
|
+
transform: scale(0.95);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.visually-hidden {
|
|
109
|
+
position: absolute !important;
|
|
110
|
+
width: 1px !important;
|
|
111
|
+
height: 1px !important;
|
|
112
|
+
padding: 0 !important;
|
|
113
|
+
margin: -1px !important;
|
|
114
|
+
overflow: hidden !important;
|
|
115
|
+
clip: rect(0, 0, 0, 0) !important;
|
|
116
|
+
white-space: nowrap !important;
|
|
117
|
+
border: 0 !important;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Modal Body */
|
|
121
|
+
.settings-modal .modal-body {
|
|
122
|
+
padding: var(--try-out-spacing-xl, 1.5rem);
|
|
123
|
+
flex: 1;
|
|
124
|
+
background: var(--bg-primary, #ffffff);
|
|
125
|
+
overflow-y: auto;
|
|
126
|
+
overflow-x: hidden;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.settings-form {
|
|
130
|
+
display: flex;
|
|
131
|
+
flex-direction: column;
|
|
132
|
+
gap: var(--try-out-spacing-xl, 1.5rem);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.settings-form .form-section {
|
|
136
|
+
display: flex;
|
|
137
|
+
flex-direction: column;
|
|
138
|
+
gap: var(--try-out-spacing, 0.75rem);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.section-header {
|
|
142
|
+
display: flex;
|
|
143
|
+
align-items: center;
|
|
144
|
+
gap: var(--try-out-spacing-sm, 0.5rem);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.section-header h4 {
|
|
148
|
+
margin: 0;
|
|
149
|
+
font-size: var(--try-out-font-lg, 1rem);
|
|
150
|
+
font-weight: 600;
|
|
151
|
+
color: var(--text-primary, #0f172a);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.tooltip {
|
|
155
|
+
cursor: help;
|
|
156
|
+
font-size: 0.875rem;
|
|
157
|
+
opacity: 0.7;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* Floating Label Group */
|
|
161
|
+
.floating-label-group {
|
|
162
|
+
position: relative;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.floating-label-group .floating-input {
|
|
166
|
+
width: 100%;
|
|
167
|
+
padding: 12px;
|
|
168
|
+
border: 1px solid var(--border-color, #e2e8f0);
|
|
169
|
+
border-radius: 8px;
|
|
170
|
+
font-size: 14px;
|
|
171
|
+
background: var(--bg-primary, #ffffff);
|
|
172
|
+
color: var(--text-primary, #0f172a);
|
|
173
|
+
transition: all 0.2s ease;
|
|
174
|
+
box-sizing: border-box;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.floating-label-group .floating-input:focus {
|
|
178
|
+
outline: none;
|
|
179
|
+
border-color: var(--accent-primary, #3b82f6);
|
|
180
|
+
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.floating-label-group .floating-label {
|
|
184
|
+
position: absolute;
|
|
185
|
+
left: 12px;
|
|
186
|
+
top: 12px;
|
|
187
|
+
font-size: 14px;
|
|
188
|
+
color: var(--text-secondary, #475569);
|
|
189
|
+
pointer-events: none;
|
|
190
|
+
transition: all 0.2s ease;
|
|
191
|
+
background: var(--bg-primary, #ffffff);
|
|
192
|
+
padding: 0 4px;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.floating-label-group .floating-input:focus + .floating-label,
|
|
196
|
+
.floating-label-group .floating-input:not(:placeholder-shown) + .floating-label {
|
|
197
|
+
top: -8px;
|
|
198
|
+
font-size: 12px;
|
|
199
|
+
color: var(--accent-primary, #3b82f6);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.field-help {
|
|
203
|
+
font-size: 12px;
|
|
204
|
+
color: var(--text-secondary, #475569);
|
|
205
|
+
margin-top: -4px;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* Header Security Section */
|
|
209
|
+
.header-security-section {
|
|
210
|
+
display: flex;
|
|
211
|
+
flex-direction: column;
|
|
212
|
+
gap: var(--try-out-spacing, 0.75rem);
|
|
213
|
+
padding: var(--try-out-spacing, 0.75rem);
|
|
214
|
+
background: rgba(255, 193, 7, 0.1);
|
|
215
|
+
border: 1px solid rgba(255, 193, 7, 0.3);
|
|
216
|
+
border-radius: 8px;
|
|
217
|
+
margin-bottom: var(--try-out-spacing, 0.75rem);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.security-warning {
|
|
221
|
+
display: flex;
|
|
222
|
+
align-items: flex-start;
|
|
223
|
+
gap: var(--try-out-spacing-sm, 0.5rem);
|
|
224
|
+
font-size: 13px;
|
|
225
|
+
color: var(--text-primary, #0f172a);
|
|
226
|
+
line-height: 1.5;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.warning-icon {
|
|
230
|
+
font-size: 16px;
|
|
231
|
+
flex-shrink: 0;
|
|
232
|
+
margin-top: 2px;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.warning-text {
|
|
236
|
+
flex: 1;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.persist-checkbox-label {
|
|
240
|
+
display: flex;
|
|
241
|
+
align-items: center;
|
|
242
|
+
gap: var(--try-out-spacing-sm, 0.5rem);
|
|
243
|
+
cursor: pointer;
|
|
244
|
+
font-size: 14px;
|
|
245
|
+
font-weight: 500;
|
|
246
|
+
color: var(--text-primary, #0f172a);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.persist-checkbox-label input[type="checkbox"] {
|
|
250
|
+
width: 18px;
|
|
251
|
+
height: 18px;
|
|
252
|
+
cursor: pointer;
|
|
253
|
+
accent-color: var(--accent-primary, #3b82f6);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.checkbox-label-text {
|
|
257
|
+
user-select: none;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.security-note {
|
|
261
|
+
font-size: 12px;
|
|
262
|
+
color: var(--text-secondary, #475569);
|
|
263
|
+
font-weight: normal;
|
|
264
|
+
font-style: italic;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/* Header Container */
|
|
268
|
+
.settings-modal .header-container {
|
|
269
|
+
display: flex;
|
|
270
|
+
flex-direction: column;
|
|
271
|
+
gap: var(--try-out-spacing, 0.75rem);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.header-toolbar {
|
|
275
|
+
display: flex;
|
|
276
|
+
justify-content: flex-start;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.add-header-btn {
|
|
280
|
+
display: inline-flex;
|
|
281
|
+
align-items: center;
|
|
282
|
+
gap: var(--try-out-spacing-sm, 0.5rem);
|
|
283
|
+
padding: var(--try-out-spacing-sm, 0.5rem) var(--try-out-spacing-lg, 1rem);
|
|
284
|
+
border: 1px solid var(--accent-primary, #3b82f6);
|
|
285
|
+
border-radius: 8px;
|
|
286
|
+
background: var(--accent-primary, #3b82f6);
|
|
287
|
+
color: white;
|
|
288
|
+
cursor: pointer;
|
|
289
|
+
font-size: 14px;
|
|
290
|
+
font-weight: 500;
|
|
291
|
+
transition: all 0.2s ease;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.add-header-btn:hover {
|
|
295
|
+
background: var(--accent-hover, #2563eb);
|
|
296
|
+
border-color: var(--accent-hover, #2563eb);
|
|
297
|
+
transform: translateY(-1px);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.header-list {
|
|
301
|
+
display: flex;
|
|
302
|
+
flex-direction: column;
|
|
303
|
+
gap: var(--try-out-spacing-sm, 0.5rem);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.header-item {
|
|
307
|
+
display: flex;
|
|
308
|
+
width: 100%;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.header-inputs {
|
|
312
|
+
display: flex;
|
|
313
|
+
gap: var(--try-out-spacing-sm, 0.5rem);
|
|
314
|
+
width: 100%;
|
|
315
|
+
align-items: center;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.header-inputs .modern-input {
|
|
319
|
+
flex: 1;
|
|
320
|
+
padding: 10px 12px;
|
|
321
|
+
border: 1px solid var(--border-color, #e2e8f0);
|
|
322
|
+
border-radius: 8px;
|
|
323
|
+
font-size: 14px;
|
|
324
|
+
background: var(--bg-primary, #ffffff);
|
|
325
|
+
color: var(--text-primary, #0f172a);
|
|
326
|
+
transition: all 0.2s ease;
|
|
327
|
+
box-sizing: border-box;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.header-inputs .modern-input:focus {
|
|
331
|
+
outline: none;
|
|
332
|
+
border-color: var(--accent-primary, #3b82f6);
|
|
333
|
+
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.header-inputs .remove-btn {
|
|
337
|
+
background: var(--try-out-danger, #dc3545);
|
|
338
|
+
border: none;
|
|
339
|
+
color: white;
|
|
340
|
+
cursor: pointer;
|
|
341
|
+
padding: var(--try-out-spacing-sm, 0.5rem);
|
|
342
|
+
font-size: 14px;
|
|
343
|
+
line-height: 1;
|
|
344
|
+
border-radius: 8px;
|
|
345
|
+
width: 32px;
|
|
346
|
+
height: 32px;
|
|
347
|
+
display: flex;
|
|
348
|
+
align-items: center;
|
|
349
|
+
justify-content: center;
|
|
350
|
+
transition: all 0.2s ease;
|
|
351
|
+
flex-shrink: 0;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.header-inputs .remove-btn:hover {
|
|
355
|
+
background: var(--try-out-danger-hover, #c82333);
|
|
356
|
+
transform: scale(1.05);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.header-inputs .remove-btn:active {
|
|
360
|
+
transform: scale(0.95);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/* Modal Footer */
|
|
364
|
+
.settings-modal .modal-footer {
|
|
365
|
+
padding: var(--try-out-spacing-lg, 1rem) var(--try-out-spacing-xl, 1.5rem);
|
|
366
|
+
background: var(--bg-secondary, #f8fafc);
|
|
367
|
+
border-top: 1px solid var(--border-color, #e2e8f0);
|
|
368
|
+
flex-shrink: 0;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.modal-actions {
|
|
372
|
+
display: flex;
|
|
373
|
+
justify-content: flex-end;
|
|
374
|
+
gap: var(--try-out-spacing, 0.75rem);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.primary-button,
|
|
378
|
+
.secondary-button {
|
|
379
|
+
padding: 10px 20px;
|
|
380
|
+
border-radius: 8px;
|
|
381
|
+
font-size: 14px;
|
|
382
|
+
font-weight: 500;
|
|
383
|
+
cursor: pointer;
|
|
384
|
+
transition: all 0.2s ease;
|
|
385
|
+
border: none;
|
|
386
|
+
min-width: 120px;
|
|
387
|
+
min-height: 44px;
|
|
388
|
+
display: inline-flex;
|
|
389
|
+
align-items: center;
|
|
390
|
+
justify-content: center;
|
|
391
|
+
gap: var(--try-out-spacing-sm, 0.5rem);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.primary-button {
|
|
395
|
+
background: linear-gradient(135deg, var(--accent-primary, #3b82f6), var(--accent-secondary, #1d4ed8));
|
|
396
|
+
color: white;
|
|
397
|
+
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.primary-button:hover {
|
|
401
|
+
transform: translateY(-1px);
|
|
402
|
+
box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.primary-button:active {
|
|
406
|
+
transform: translateY(0);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.secondary-button {
|
|
410
|
+
background: transparent;
|
|
411
|
+
color: var(--text-primary, #0f172a);
|
|
412
|
+
border: 1px solid var(--border-color, #e2e8f0);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.secondary-button:hover {
|
|
416
|
+
background: var(--bg-secondary, #f8fafc);
|
|
417
|
+
border-color: var(--accent-primary, #3b82f6);
|
|
418
|
+
color: var(--accent-primary, #3b82f6);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/* Toast Notification */
|
|
422
|
+
.settings-toast {
|
|
423
|
+
position: fixed;
|
|
424
|
+
top: 20px;
|
|
425
|
+
right: 20px;
|
|
426
|
+
background: var(--text-primary, #0f172a);
|
|
427
|
+
color: white;
|
|
428
|
+
padding: 12px 20px;
|
|
429
|
+
border-radius: 8px;
|
|
430
|
+
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
|
|
431
|
+
z-index: 10001;
|
|
432
|
+
opacity: 0;
|
|
433
|
+
transform: translateX(100%);
|
|
434
|
+
transition: all 0.3s ease;
|
|
435
|
+
font-size: 14px;
|
|
436
|
+
max-width: 300px;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.settings-toast.show {
|
|
440
|
+
opacity: 1;
|
|
441
|
+
transform: translateX(0);
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.settings-toast.toast-success {
|
|
445
|
+
background: var(--try-out-success, #28a745);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.settings-toast.toast-error {
|
|
449
|
+
background: var(--try-out-danger, #dc3545);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/* Dark Mode Support */
|
|
453
|
+
[data-md-color-scheme="slate"] .settings-modal .modal-content {
|
|
454
|
+
background-color: var(--bg-primary, #1a1a1a);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
[data-md-color-scheme="slate"] .settings-modal .modal-body {
|
|
458
|
+
background: var(--bg-primary, #1a1a1a);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
[data-md-color-scheme="slate"] .section-header h4 {
|
|
462
|
+
color: var(--text-primary, #e0e0e0);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
[data-md-color-scheme="slate"] .floating-input,
|
|
466
|
+
[data-md-color-scheme="slate"] .modern-input {
|
|
467
|
+
background: var(--bg-secondary, #2d2d2d);
|
|
468
|
+
color: var(--text-primary, #e0e0e0);
|
|
469
|
+
border-color: var(--border-color, #404040);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
[data-md-color-scheme="slate"] .floating-label {
|
|
473
|
+
background: var(--bg-primary, #1a1a1a);
|
|
474
|
+
color: var(--text-secondary, #b0b0b0);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
[data-md-color-scheme="slate"] .field-help {
|
|
478
|
+
color: var(--text-secondary, #b0b0b0);
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
[data-md-color-scheme="slate"] .settings-modal .modal-footer {
|
|
482
|
+
background: var(--bg-secondary, #2d2d2d);
|
|
483
|
+
border-color: var(--border-color, #404040);
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
[data-md-color-scheme="slate"] .secondary-button {
|
|
487
|
+
color: var(--text-primary, #e0e0e0);
|
|
488
|
+
border-color: var(--border-color, #404040);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
[data-md-color-scheme="slate"] .secondary-button:hover {
|
|
492
|
+
background: var(--bg-tertiary, #404040);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
[data-md-color-scheme="slate"] .header-security-section {
|
|
496
|
+
background: rgba(255, 152, 0, 0.15);
|
|
497
|
+
border-color: rgba(255, 152, 0, 0.4);
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
[data-md-color-scheme="slate"] .security-warning {
|
|
501
|
+
color: var(--text-primary, #e0e0e0);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
[data-md-color-scheme="slate"] .persist-checkbox-label {
|
|
505
|
+
color: var(--text-primary, #e0e0e0);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
[data-md-color-scheme="slate"] .security-note {
|
|
509
|
+
color: var(--text-secondary, #b0b0b0);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/* Mobile Responsive */
|
|
513
|
+
@media screen and (max-width: 768px) {
|
|
514
|
+
.settings-modal {
|
|
515
|
+
padding: var(--try-out-spacing-sm, 0.5rem);
|
|
516
|
+
align-items: flex-start;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.settings-modal .modal-content {
|
|
520
|
+
width: 95%;
|
|
521
|
+
max-width: none;
|
|
522
|
+
max-height: 95vh;
|
|
523
|
+
margin-top: var(--try-out-spacing-sm, 0.5rem);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.settings-modal .modal-header {
|
|
527
|
+
padding: var(--try-out-spacing, 0.75rem) var(--try-out-spacing-lg, 1rem);
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.settings-modal .modal-body {
|
|
531
|
+
padding: var(--try-out-spacing-lg, 1rem);
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.header-inputs {
|
|
535
|
+
flex-direction: column;
|
|
536
|
+
gap: var(--try-out-spacing-sm, 0.5rem);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.header-inputs .modern-input {
|
|
540
|
+
width: 100%;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.header-inputs .remove-btn {
|
|
544
|
+
align-self: flex-end;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.modal-actions {
|
|
548
|
+
flex-direction: column-reverse;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.primary-button,
|
|
552
|
+
.secondary-button {
|
|
553
|
+
width: 100%;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
<div class="main-content">
|
|
14
14
|
{% include "endpoints/list/filter_section.html" %}
|
|
15
|
+
{% include "endpoints/list/settings_modal.html" %}
|
|
15
16
|
{% for app_name, endpoints in endpoints_by_app.items %}
|
|
16
17
|
<h2>{{ app_name|title }}</h2>
|
|
17
18
|
<div class="endpoints-grid">
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
9
|
<div class="filter-actions">
|
|
10
|
-
<button class="filter-
|
|
10
|
+
<button class="filter-settings" onclick="openSettingsModal()">
|
|
11
|
+
<span class="icon">⚙️</span> Settings
|
|
12
|
+
</button>
|
|
11
13
|
<button class="filter-clear" onclick="clearFilters()">Clear</button>
|
|
12
14
|
</div>
|
|
13
15
|
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
<!-- Settings Modal -->
|
|
2
|
+
<div
|
|
3
|
+
id="settingsModal"
|
|
4
|
+
class="settings-modal"
|
|
5
|
+
role="dialog"
|
|
6
|
+
aria-modal="true"
|
|
7
|
+
aria-labelledby="settingsModalTitle"
|
|
8
|
+
aria-describedby="settingsModalDescription"
|
|
9
|
+
>
|
|
10
|
+
<!-- Backdrop with blur effect -->
|
|
11
|
+
<div
|
|
12
|
+
class="modal-overlay"
|
|
13
|
+
data-action="close"
|
|
14
|
+
onclick="closeSettingsModal()"
|
|
15
|
+
style="backdrop-filter: blur(2px);"
|
|
16
|
+
></div>
|
|
17
|
+
|
|
18
|
+
<!-- Modal Container -->
|
|
19
|
+
<div class="modal-content" role="document">
|
|
20
|
+
<div class="modal-header">
|
|
21
|
+
<div class="modal-title-group">
|
|
22
|
+
<span class="modal-icon" aria-hidden="true">⚙️</span>
|
|
23
|
+
<h3 id="settingsModalTitle">API Settings</h3>
|
|
24
|
+
<span id="settingsModalDescription" class="visually-hidden">Configure API host and default request headers</span>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<!-- Close Button -->
|
|
28
|
+
<div class="modal-controls">
|
|
29
|
+
<button
|
|
30
|
+
class="modal-close"
|
|
31
|
+
aria-label="Close modal"
|
|
32
|
+
onclick="closeSettingsModal()"
|
|
33
|
+
data-action="close"
|
|
34
|
+
>
|
|
35
|
+
<span aria-hidden="true">✕</span>
|
|
36
|
+
</button>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<!-- Main Content -->
|
|
41
|
+
<div class="modal-body">
|
|
42
|
+
<div class="settings-form">
|
|
43
|
+
<!-- Host Section -->
|
|
44
|
+
<div class="form-section">
|
|
45
|
+
<div class="section-header">
|
|
46
|
+
<h4>API Host</h4>
|
|
47
|
+
<div class="tooltip" data-tooltip="Base URL for API requests">ℹ️</div>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="floating-label-group">
|
|
50
|
+
<input type="text"
|
|
51
|
+
id="settingsHost"
|
|
52
|
+
class="floating-input"
|
|
53
|
+
placeholder=" "
|
|
54
|
+
required>
|
|
55
|
+
<label for="settingsHost" class="floating-label">Host URL</label>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="field-help">Default will use current browser host</div>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<!-- Default Headers Section -->
|
|
61
|
+
<div class="form-section">
|
|
62
|
+
<div class="section-header">
|
|
63
|
+
<h4>Default Request Headers</h4>
|
|
64
|
+
<div class="tooltip" data-tooltip="Headers that will be automatically added to all requests">ℹ️</div>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<!-- Security Warning and Persist Checkbox -->
|
|
68
|
+
<div class="header-security-section">
|
|
69
|
+
<div class="security-warning">
|
|
70
|
+
<span class="warning-icon">⚠️</span>
|
|
71
|
+
<span class="warning-text">Headers are stored in sessionStorage (cleared when tab closes). Enable persistence to store in localStorage.</span>
|
|
72
|
+
</div>
|
|
73
|
+
<label class="persist-checkbox-label">
|
|
74
|
+
<input type="checkbox"
|
|
75
|
+
id="persistHeaders"
|
|
76
|
+
class="persist-checkbox">
|
|
77
|
+
<span class="checkbox-label-text">Persist headers in localStorage</span>
|
|
78
|
+
<span class="security-note">(Less secure: persists across sessions)</span>
|
|
79
|
+
</label>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<div class="header-container" id="settingsHeaders">
|
|
83
|
+
<div class="header-toolbar">
|
|
84
|
+
<button class="add-header-btn" onclick="SettingsManager.addHeaderField()">
|
|
85
|
+
<span class="icon">+</span> Add Header
|
|
86
|
+
</button>
|
|
87
|
+
</div>
|
|
88
|
+
<div class="header-list">
|
|
89
|
+
<div class="header-item">
|
|
90
|
+
<div class="header-inputs">
|
|
91
|
+
<input type="text"
|
|
92
|
+
class="modern-input name-input"
|
|
93
|
+
placeholder="Header name"
|
|
94
|
+
list="settingsHeaderSuggestions">
|
|
95
|
+
<input type="text"
|
|
96
|
+
class="modern-input value-input"
|
|
97
|
+
placeholder="Header value">
|
|
98
|
+
<button class="remove-btn"
|
|
99
|
+
onclick="SettingsManager.removeHeaderField(this)"
|
|
100
|
+
aria-label="Remove header">
|
|
101
|
+
<span class="icon">✕</span>
|
|
102
|
+
</button>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
<!-- Header Suggestions -->
|
|
107
|
+
<datalist id="settingsHeaderSuggestions">
|
|
108
|
+
<option value="Authorization">Authentication credentials (e.g., Bearer token)</option>
|
|
109
|
+
<option value="Accept">Response format preference</option>
|
|
110
|
+
<option value="Content-Type">Request body format</option>
|
|
111
|
+
<option value="X-API-Key">API key header</option>
|
|
112
|
+
</datalist>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
|
|
118
|
+
<!-- Footer with Actions -->
|
|
119
|
+
<div class="modal-footer">
|
|
120
|
+
<div class="modal-actions">
|
|
121
|
+
<button
|
|
122
|
+
type="button"
|
|
123
|
+
class="secondary-button"
|
|
124
|
+
onclick="closeSettingsModal()"
|
|
125
|
+
>
|
|
126
|
+
Cancel
|
|
127
|
+
</button>
|
|
128
|
+
<button
|
|
129
|
+
type="button"
|
|
130
|
+
class="primary-button"
|
|
131
|
+
onclick="SettingsManager.saveSettings()"
|
|
132
|
+
>
|
|
133
|
+
<span class="icon">💾</span> Save Settings
|
|
134
|
+
</button>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|