@gxp-dev/tools 2.0.5
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.
- package/.github/workflows/npm-publish.yml +48 -0
- package/CLAUDE.md +400 -0
- package/README.md +247 -0
- package/REFACTOR_PLAN.md +194 -0
- package/bin/gx-devtools.js +87 -0
- package/bin/lib/cli.js +251 -0
- package/bin/lib/commands/assets.js +337 -0
- package/bin/lib/commands/build.js +259 -0
- package/bin/lib/commands/datastore.js +433 -0
- package/bin/lib/commands/dev.js +328 -0
- package/bin/lib/commands/extensions.js +298 -0
- package/bin/lib/commands/index.js +35 -0
- package/bin/lib/commands/init.js +307 -0
- package/bin/lib/commands/publish.js +189 -0
- package/bin/lib/commands/socket.js +158 -0
- package/bin/lib/commands/ssl.js +47 -0
- package/bin/lib/constants.js +120 -0
- package/bin/lib/tui/App.tsx +600 -0
- package/bin/lib/tui/components/CommandInput.tsx +278 -0
- package/bin/lib/tui/components/GeminiPanel.tsx +161 -0
- package/bin/lib/tui/components/Header.tsx +27 -0
- package/bin/lib/tui/components/LogPanel.tsx +122 -0
- package/bin/lib/tui/components/TabBar.tsx +56 -0
- package/bin/lib/tui/components/WelcomeScreen.tsx +80 -0
- package/bin/lib/tui/index.tsx +63 -0
- package/bin/lib/tui/services/ExtensionService.ts +122 -0
- package/bin/lib/tui/services/GeminiService.ts +395 -0
- package/bin/lib/tui/services/ServiceManager.ts +336 -0
- package/bin/lib/tui/services/SocketService.ts +204 -0
- package/bin/lib/tui/services/ViteService.ts +107 -0
- package/bin/lib/tui/services/index.ts +13 -0
- package/bin/lib/utils/files.js +180 -0
- package/bin/lib/utils/index.js +17 -0
- package/bin/lib/utils/paths.js +138 -0
- package/bin/lib/utils/prompts.js +71 -0
- package/bin/lib/utils/ssl.js +233 -0
- package/browser-extensions/README.md +1 -0
- package/browser-extensions/chrome/background.js +857 -0
- package/browser-extensions/chrome/content.js +51 -0
- package/browser-extensions/chrome/devtools.html +9 -0
- package/browser-extensions/chrome/devtools.js +23 -0
- package/browser-extensions/chrome/icons/gx_off_128.png +0 -0
- package/browser-extensions/chrome/icons/gx_off_16.png +0 -0
- package/browser-extensions/chrome/icons/gx_off_32.png +0 -0
- package/browser-extensions/chrome/icons/gx_off_64.png +0 -0
- package/browser-extensions/chrome/icons/gx_on_128.png +0 -0
- package/browser-extensions/chrome/icons/gx_on_16.png +0 -0
- package/browser-extensions/chrome/icons/gx_on_32.png +0 -0
- package/browser-extensions/chrome/icons/gx_on_64.png +0 -0
- package/browser-extensions/chrome/inspector.js +1087 -0
- package/browser-extensions/chrome/manifest.json +70 -0
- package/browser-extensions/chrome/panel.html +638 -0
- package/browser-extensions/chrome/panel.js +862 -0
- package/browser-extensions/chrome/popup.html +399 -0
- package/browser-extensions/chrome/popup.js +515 -0
- package/browser-extensions/chrome/rules.json +1 -0
- package/browser-extensions/chrome/test-chrome.html +145 -0
- package/browser-extensions/chrome/test-mixed-content.html +190 -0
- package/browser-extensions/chrome/test-uri-pattern.html +199 -0
- package/browser-extensions/firefox/README.md +134 -0
- package/browser-extensions/firefox/background.js +804 -0
- package/browser-extensions/firefox/content.js +120 -0
- package/browser-extensions/firefox/debug-errors.html +229 -0
- package/browser-extensions/firefox/debug-https.html +113 -0
- package/browser-extensions/firefox/devtools.html +9 -0
- package/browser-extensions/firefox/devtools.js +24 -0
- package/browser-extensions/firefox/icons/gx_off_128.png +0 -0
- package/browser-extensions/firefox/icons/gx_off_16.png +0 -0
- package/browser-extensions/firefox/icons/gx_off_32.png +0 -0
- package/browser-extensions/firefox/icons/gx_off_64.png +0 -0
- package/browser-extensions/firefox/icons/gx_on_128.png +0 -0
- package/browser-extensions/firefox/icons/gx_on_16.png +0 -0
- package/browser-extensions/firefox/icons/gx_on_32.png +0 -0
- package/browser-extensions/firefox/icons/gx_on_64.png +0 -0
- package/browser-extensions/firefox/inspector.js +1087 -0
- package/browser-extensions/firefox/manifest.json +67 -0
- package/browser-extensions/firefox/panel.html +638 -0
- package/browser-extensions/firefox/panel.js +862 -0
- package/browser-extensions/firefox/popup.html +525 -0
- package/browser-extensions/firefox/popup.js +536 -0
- package/browser-extensions/firefox/test-gramercy.html +126 -0
- package/browser-extensions/firefox/test-imports.html +58 -0
- package/browser-extensions/firefox/test-masking.html +147 -0
- package/browser-extensions/firefox/test-uri-pattern.html +199 -0
- package/docs/DOCUSAURUS_IMPORT.md +378 -0
- package/docs/_category_.json +8 -0
- package/docs/app-manifest.md +272 -0
- package/docs/building-for-platform.md +315 -0
- package/docs/dev-tools.md +291 -0
- package/docs/getting-started.md +180 -0
- package/docs/gxp-store.md +305 -0
- package/docs/index.md +44 -0
- package/package.json +77 -0
- package/runtime/PortalContainer.vue +326 -0
- package/runtime/dev-tools/DevToolsModal.vue +217 -0
- package/runtime/dev-tools/LayoutSwitcher.vue +221 -0
- package/runtime/dev-tools/MockDataEditor.vue +621 -0
- package/runtime/dev-tools/SocketSimulator.vue +562 -0
- package/runtime/dev-tools/StoreInspector.vue +644 -0
- package/runtime/dev-tools/index.js +6 -0
- package/runtime/gxpStringsPlugin.js +428 -0
- package/runtime/index.html +22 -0
- package/runtime/main.js +32 -0
- package/runtime/mock-api/auth-middleware.js +97 -0
- package/runtime/mock-api/image-generator.js +221 -0
- package/runtime/mock-api/index.js +197 -0
- package/runtime/mock-api/response-generator.js +394 -0
- package/runtime/mock-api/route-generator.js +323 -0
- package/runtime/mock-api/socket-triggers.js +371 -0
- package/runtime/mock-api/spec-loader.js +300 -0
- package/runtime/server.js +180 -0
- package/runtime/stores/gxpPortalConfigStore.js +554 -0
- package/runtime/stores/index.js +6 -0
- package/runtime/vite-inspector-plugin.js +749 -0
- package/runtime/vite-source-tracker-plugin.js +232 -0
- package/runtime/vite.config.js +402 -0
- package/scripts/launch-chrome.js +90 -0
- package/scripts/pack-chrome.js +91 -0
- package/socket-events/AiSessionMessageCreated.json +18 -0
- package/socket-events/SocialStreamPostCreated.json +24 -0
- package/socket-events/SocialStreamPostVariantCompleted.json +23 -0
- package/template/README.md +332 -0
- package/template/app-manifest.json +32 -0
- package/template/dev-assets/images/avatar-placeholder.png +0 -0
- package/template/dev-assets/images/background-placeholder.jpg +0 -0
- package/template/dev-assets/images/banner-placeholder.jpg +0 -0
- package/template/dev-assets/images/icon-placeholder.png +0 -0
- package/template/dev-assets/images/logo-placeholder.png +0 -0
- package/template/dev-assets/images/product-placeholder.jpg +0 -0
- package/template/dev-assets/images/thumbnail-placeholder.jpg +0 -0
- package/template/env.example +51 -0
- package/template/gitignore +53 -0
- package/template/index.html +22 -0
- package/template/main.js +28 -0
- package/template/src/DemoPage.vue +459 -0
- package/template/src/Plugin.vue +38 -0
- package/template/src/stores/index.js +9 -0
- package/template/src/stores/test-data.json +173 -0
- package/template/theme-layouts/AdditionalStyling.css +0 -0
- package/template/theme-layouts/PrivateLayout.vue +39 -0
- package/template/theme-layouts/PublicLayout.vue +39 -0
- package/template/theme-layouts/SystemLayout.vue +39 -0
- package/template/vite.config.js +333 -0
- package/tsconfig.tui.json +21 -0
- package/vite.config.js +164 -0
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<style>
|
|
6
|
+
body {
|
|
7
|
+
width: 400px;
|
|
8
|
+
padding: 0;
|
|
9
|
+
margin: 0;
|
|
10
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
11
|
+
background: #f8f9fa;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.header {
|
|
15
|
+
background: #fff;
|
|
16
|
+
padding: 16px;
|
|
17
|
+
border-bottom: 1px solid #e9ecef;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.title {
|
|
21
|
+
margin: 0 0 12px 0;
|
|
22
|
+
font-size: 16px;
|
|
23
|
+
font-weight: 600;
|
|
24
|
+
color: #212529;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.toggle-container {
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: 12px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.toggle-button {
|
|
34
|
+
background: #dc3545;
|
|
35
|
+
border: none;
|
|
36
|
+
padding: 8px 16px;
|
|
37
|
+
border-radius: 20px;
|
|
38
|
+
color: white;
|
|
39
|
+
font-weight: 500;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
transition: all 0.2s;
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
gap: 6px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.toggle-button.enabled {
|
|
48
|
+
background: #28a745;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.toggle-button:hover {
|
|
52
|
+
opacity: 0.9;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.status-dot {
|
|
56
|
+
width: 8px;
|
|
57
|
+
height: 8px;
|
|
58
|
+
border-radius: 50%;
|
|
59
|
+
background: currentColor;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.content {
|
|
63
|
+
padding: 16px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.section {
|
|
67
|
+
margin-bottom: 20px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.section-title {
|
|
71
|
+
font-size: 14px;
|
|
72
|
+
font-weight: 600;
|
|
73
|
+
margin-bottom: 8px;
|
|
74
|
+
color: #495057;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.config-container {
|
|
78
|
+
background: white;
|
|
79
|
+
border: 1px solid #dee2e6;
|
|
80
|
+
border-radius: 6px;
|
|
81
|
+
padding: 16px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.rule-container {
|
|
85
|
+
background: white;
|
|
86
|
+
border: 1px solid #dee2e6;
|
|
87
|
+
border-radius: 6px;
|
|
88
|
+
padding: 16px;
|
|
89
|
+
margin-bottom: 12px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.rule-header {
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
gap: 8px;
|
|
96
|
+
margin-bottom: 12px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.rule-title {
|
|
100
|
+
font-size: 14px;
|
|
101
|
+
font-weight: 600;
|
|
102
|
+
color: #495057;
|
|
103
|
+
margin: 0;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.rule-toggle {
|
|
107
|
+
margin-left: auto;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.input-group {
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
gap: 6px;
|
|
114
|
+
margin-bottom: 16px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.input-label {
|
|
118
|
+
font-size: 12px;
|
|
119
|
+
color: #6c757d;
|
|
120
|
+
font-weight: 500;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
input[type="text"] {
|
|
124
|
+
padding: 8px 10px;
|
|
125
|
+
border: 1px solid #ced4da;
|
|
126
|
+
border-radius: 4px;
|
|
127
|
+
font-size: 13px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
input[type="text"]:focus {
|
|
131
|
+
outline: none;
|
|
132
|
+
border-color: #007bff;
|
|
133
|
+
box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
input[type="text"]:disabled {
|
|
137
|
+
background: #f8f9fa;
|
|
138
|
+
color: #6c757d;
|
|
139
|
+
cursor: not-allowed;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.checkbox-group {
|
|
143
|
+
display: flex;
|
|
144
|
+
align-items: center;
|
|
145
|
+
gap: 8px;
|
|
146
|
+
margin-bottom: 12px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.checkbox-group input[type="checkbox"] {
|
|
150
|
+
margin: 0;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.checkbox-group label {
|
|
154
|
+
font-size: 12px;
|
|
155
|
+
color: #495057;
|
|
156
|
+
margin: 0;
|
|
157
|
+
cursor: pointer;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.pattern-display {
|
|
161
|
+
background: #f8f9fa;
|
|
162
|
+
border: 1px solid #e9ecef;
|
|
163
|
+
border-radius: 4px;
|
|
164
|
+
padding: 8px 10px;
|
|
165
|
+
font-size: 11px;
|
|
166
|
+
color: #6c757d;
|
|
167
|
+
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
168
|
+
word-break: break-all;
|
|
169
|
+
margin-bottom: 8px;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.pattern-input {
|
|
173
|
+
display: none;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.pattern-input.visible {
|
|
177
|
+
display: block;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.save-button {
|
|
181
|
+
background: #28a745;
|
|
182
|
+
border: none;
|
|
183
|
+
color: white;
|
|
184
|
+
padding: 12px 20px;
|
|
185
|
+
border-radius: 4px;
|
|
186
|
+
font-size: 14px;
|
|
187
|
+
cursor: pointer;
|
|
188
|
+
width: 100%;
|
|
189
|
+
margin-top: 8px;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.save-button:hover {
|
|
193
|
+
background: #218838;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.save-button:disabled {
|
|
197
|
+
background: #6c757d;
|
|
198
|
+
cursor: not-allowed;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.status {
|
|
202
|
+
margin-top: 12px;
|
|
203
|
+
padding: 8px 12px;
|
|
204
|
+
border-radius: 4px;
|
|
205
|
+
font-size: 12px;
|
|
206
|
+
text-align: center;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.status.success {
|
|
210
|
+
background: #d4edda;
|
|
211
|
+
color: #155724;
|
|
212
|
+
border: 1px solid #c3e6cb;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.status.error {
|
|
216
|
+
background: #f8d7da;
|
|
217
|
+
color: #721c24;
|
|
218
|
+
border: 1px solid #f5c6cb;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.help-text {
|
|
222
|
+
font-size: 11px;
|
|
223
|
+
color: #6c757d;
|
|
224
|
+
margin-top: 4px;
|
|
225
|
+
line-height: 1.3;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.example-text {
|
|
229
|
+
font-size: 11px;
|
|
230
|
+
color: #007bff;
|
|
231
|
+
margin-bottom: 8px;
|
|
232
|
+
font-style: italic;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.rule-disabled {
|
|
236
|
+
opacity: 0.6;
|
|
237
|
+
pointer-events: none;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.blank-option {
|
|
241
|
+
background: #fff3cd;
|
|
242
|
+
border: 1px solid #ffeaa7;
|
|
243
|
+
border-radius: 4px;
|
|
244
|
+
padding: 8px 10px;
|
|
245
|
+
margin-bottom: 12px;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.blank-option-title {
|
|
249
|
+
font-size: 12px;
|
|
250
|
+
font-weight: 600;
|
|
251
|
+
color: #856404;
|
|
252
|
+
margin-bottom: 4px;
|
|
253
|
+
}
|
|
254
|
+
</style>
|
|
255
|
+
</head>
|
|
256
|
+
<body>
|
|
257
|
+
<div class="header">
|
|
258
|
+
<h1 class="title">GxP Developer Toolkit</h1>
|
|
259
|
+
<div class="toggle-container">
|
|
260
|
+
<button id="toggleButton" class="toggle-button">
|
|
261
|
+
<div class="status-dot"></div>
|
|
262
|
+
<span id="toggleText">OFF</span>
|
|
263
|
+
</button>
|
|
264
|
+
<label style="font-size: 12px; color: #6c757d;">
|
|
265
|
+
<input type="checkbox" id="maskingMode" style="margin-right: 4px;">
|
|
266
|
+
URL Masking Mode
|
|
267
|
+
</label>
|
|
268
|
+
</div>
|
|
269
|
+
</div>
|
|
270
|
+
|
|
271
|
+
<!-- Component Inspector Section -->
|
|
272
|
+
<div class="content" style="padding-top: 8px; padding-bottom: 0;">
|
|
273
|
+
<div class="section">
|
|
274
|
+
<div class="section-title">Component Inspector</div>
|
|
275
|
+
<div class="config-container">
|
|
276
|
+
<div style="display: flex; align-items: center; gap: 12px; margin-bottom: 8px;">
|
|
277
|
+
<button id="inspectorToggle" class="toggle-button" style="padding: 6px 14px; font-size: 12px;">
|
|
278
|
+
<div class="status-dot"></div>
|
|
279
|
+
<span id="inspectorText">OFF</span>
|
|
280
|
+
</button>
|
|
281
|
+
<span style="font-size: 12px; color: #6c757d;">or press <kbd style="background: #e9ecef; padding: 2px 6px; border-radius: 3px; font-size: 10px;">Ctrl+Shift+I</kbd></span>
|
|
282
|
+
</div>
|
|
283
|
+
<div class="help-text">Hover over Vue components to inspect props and extract hardcoded strings to getString() helpers.</div>
|
|
284
|
+
</div>
|
|
285
|
+
</div>
|
|
286
|
+
</div>
|
|
287
|
+
|
|
288
|
+
<div class="content" style="padding-top: 8px;">
|
|
289
|
+
<div class="section">
|
|
290
|
+
<div class="section-title">Cache Management</div>
|
|
291
|
+
<div class="config-container">
|
|
292
|
+
<div class="checkbox-group">
|
|
293
|
+
<input type="checkbox" id="clearCacheOnEnable">
|
|
294
|
+
<label for="clearCacheOnEnable">Clear cache when extension is enabled</label>
|
|
295
|
+
</div>
|
|
296
|
+
<div class="help-text" style="margin-top: -8px; margin-bottom: 12px;">Automatically clears browser cache to ensure fresh redirects</div>
|
|
297
|
+
|
|
298
|
+
<div class="checkbox-group">
|
|
299
|
+
<input type="checkbox" id="disableCacheForRedirects">
|
|
300
|
+
<label for="disableCacheForRedirects">Disable caching for matched URLs</label>
|
|
301
|
+
</div>
|
|
302
|
+
<div class="help-text" style="margin-top: -8px; margin-bottom: 12px;">Adds cache-busting headers to prevent service worker caching</div>
|
|
303
|
+
|
|
304
|
+
<button id="clearCacheButton" style="background: #ffc107; color: #212529; border: none; padding: 8px 16px; border-radius: 4px; font-size: 12px; cursor: pointer; width: 100%; margin-top: 8px;">
|
|
305
|
+
Clear Cache Now
|
|
306
|
+
</button>
|
|
307
|
+
</div>
|
|
308
|
+
</div>
|
|
309
|
+
</div>
|
|
310
|
+
|
|
311
|
+
<div class="content">
|
|
312
|
+
<div class="section">
|
|
313
|
+
<div class="section-title">Proxy Rules</div>
|
|
314
|
+
|
|
315
|
+
<!-- JavaScript Rule -->
|
|
316
|
+
<div class="rule-container">
|
|
317
|
+
<div class="rule-header">
|
|
318
|
+
<div class="rule-title">JavaScript Files (.js)</div>
|
|
319
|
+
<div class="rule-toggle">
|
|
320
|
+
<input type="checkbox" id="jsRuleEnabled">
|
|
321
|
+
<label for="jsRuleEnabled" style="font-size: 12px; margin-left: 4px;">Enabled</label>
|
|
322
|
+
</div>
|
|
323
|
+
</div>
|
|
324
|
+
|
|
325
|
+
<div id="jsRuleContent">
|
|
326
|
+
<div class="example-text">Redirects JavaScript files from production uploads to your local development server</div>
|
|
327
|
+
|
|
328
|
+
<div class="input-group">
|
|
329
|
+
<label class="input-label">Redirect To URL</label>
|
|
330
|
+
<input type="text" id="jsRedirectUrl" placeholder="https://localhost:3060/src/Plugin.vue">
|
|
331
|
+
<div class="help-text">Local URL where matching JavaScript files should be redirected</div>
|
|
332
|
+
</div>
|
|
333
|
+
|
|
334
|
+
<div class="checkbox-group">
|
|
335
|
+
<input type="checkbox" id="jsCustomPattern">
|
|
336
|
+
<label for="jsCustomPattern">Use custom URL pattern</label>
|
|
337
|
+
</div>
|
|
338
|
+
|
|
339
|
+
<div class="input-group">
|
|
340
|
+
<label class="input-label">URL Pattern to Match</label>
|
|
341
|
+
<div id="jsPatternDisplay" class="pattern-display"></div>
|
|
342
|
+
<input type="text" id="jsCustomPatternInput" class="pattern-input" placeholder="">
|
|
343
|
+
<div class="help-text">RegEx pattern to match JavaScript file URLs</div>
|
|
344
|
+
</div>
|
|
345
|
+
</div>
|
|
346
|
+
</div>
|
|
347
|
+
|
|
348
|
+
<!-- CSS Rule -->
|
|
349
|
+
<div class="rule-container">
|
|
350
|
+
<div class="rule-header">
|
|
351
|
+
<div class="rule-title">CSS Files (.css)</div>
|
|
352
|
+
<div class="rule-toggle">
|
|
353
|
+
<input type="checkbox" id="cssRuleEnabled">
|
|
354
|
+
<label for="cssRuleEnabled" style="font-size: 12px; margin-left: 4px;">Enabled</label>
|
|
355
|
+
</div>
|
|
356
|
+
</div>
|
|
357
|
+
|
|
358
|
+
<div id="cssRuleContent">
|
|
359
|
+
<div class="example-text">Handle CSS files from production uploads</div>
|
|
360
|
+
|
|
361
|
+
<div class="blank-option">
|
|
362
|
+
<div class="blank-option-title">Return Blank CSS</div>
|
|
363
|
+
<div class="checkbox-group" style="margin-bottom: 6px;">
|
|
364
|
+
<input type="checkbox" id="cssReturnBlank">
|
|
365
|
+
<label for="cssReturnBlank">Return empty CSS file instead of redirecting</label>
|
|
366
|
+
</div>
|
|
367
|
+
<div class="help-text" style="margin: 0;">Useful for disabling production styles during development</div>
|
|
368
|
+
</div>
|
|
369
|
+
|
|
370
|
+
<div id="cssRedirectSection">
|
|
371
|
+
<div class="input-group">
|
|
372
|
+
<label class="input-label">Redirect To URL</label>
|
|
373
|
+
<input type="text" id="cssRedirectUrl" placeholder="https://localhost:3060/src/styles.css">
|
|
374
|
+
<div class="help-text">Local URL where matching CSS files should be redirected</div>
|
|
375
|
+
</div>
|
|
376
|
+
</div>
|
|
377
|
+
|
|
378
|
+
<div class="checkbox-group">
|
|
379
|
+
<input type="checkbox" id="cssCustomPattern">
|
|
380
|
+
<label for="cssCustomPattern">Use custom URL pattern</label>
|
|
381
|
+
</div>
|
|
382
|
+
|
|
383
|
+
<div class="input-group">
|
|
384
|
+
<label class="input-label">URL Pattern to Match</label>
|
|
385
|
+
<div id="cssPatternDisplay" class="pattern-display"></div>
|
|
386
|
+
<input type="text" id="cssCustomPatternInput" class="pattern-input" placeholder="">
|
|
387
|
+
<div class="help-text">RegEx pattern to match CSS file URLs</div>
|
|
388
|
+
</div>
|
|
389
|
+
</div>
|
|
390
|
+
</div>
|
|
391
|
+
</div>
|
|
392
|
+
|
|
393
|
+
<button id="saveButton" class="save-button">Save Configuration</button>
|
|
394
|
+
<div id="status" class="status" style="display: none;"></div>
|
|
395
|
+
</div>
|
|
396
|
+
|
|
397
|
+
<script src="popup.js"></script>
|
|
398
|
+
</body>
|
|
399
|
+
</html>
|