Blame Raw
· · · 179 lines (6.7 KB)
0 contributors
1<div class="regex-debugger-container">
2 <!-- Rules List Column -->
3 <div class="regex-debugger-rules-list">
4 <h3>
5 <i class="fa-solid fa-list-ol"></i>
6 <span data-i18n="ext_regex_debugger_active_rules"
7 >Active Rules</span
8 >
9 </h3>
10 <div class="flex-container">
11 <button
12 id="regex_debugger_save_order"
13 class="menu_button menu_button_icon interactable"
14 data-i18n="[title]ext_regex_debugger_save_order_help"
15 title="Save current rule order"
16 tabindex="0"
17 >
18 <i class="fa-solid fa-floppy-disk"></i>
19 <span data-i18n="ext_regex_debugger_save_order"
20 >Save Order</span
21 >
22 </button>
23 </div>
24 <ul id="regex_debugger_rules" class="sortable-list">
25 <!-- Rules will be populated here by JavaScript -->
26 </ul>
27 </div>
28
29 <!-- Testing Area Column -->
30 <div class="regex-debugger-tester">
31 <h3>
32 <i class="fa-solid fa-vial"></i>
33 <span data-i18n="ext_regex_debugger_testing_area"
34 >Testing Area</span
35 >
36 </h3>
37 <div class="regex-debugger-io">
38 <div class="regex-debugger-input">
39 <label
40 for="regex_debugger_raw_input"
41 data-i18n="ext_regex_debugger_raw_input"
42 >Raw Input</label
43 >
44 <textarea
45 id="regex_debugger_raw_input"
46 class="text_pole autoSetHeight"
47 rows="4"
48 ></textarea>
49 </div>
50 <div
51 id="regex_debugger_run_test_header"
52 class="flex-container"
53 >
54 <button
55 id="regex_debugger_run_test"
56 class="menu_button menu_button_icon interactable"
57 data-i18n="[title]ext_regex_debugger_run_test_help"
58 title="Run the test pipeline"
59 tabindex="0"
60 >
61 <i class="fa-solid fa-play"></i>
62 <span data-i18n="ext_regex_debugger_run_test"
63 >Run Test</span
64 >
65 </button>
66 <div class="flex-container gap10px">
67 <div class="radio_group">
68 <label
69 ><input
70 type="radio"
71 name="display_mode"
72 value="replace"
73 checked
74 />
75 <span data-i18n="ext_regex_debugger_display_replace"
76 >Replace</span
77 ></label
78 >
79 <label
80 ><input
81 type="radio"
82 name="display_mode"
83 value="highlight"
84 />
85 <span
86 data-i18n="ext_regex_debugger_display_highlight"
87 >Highlight</span
88 ></label
89 >
90 </div>
91 <select
92 id="regex_debugger_render_mode"
93 >
94 <option
95 value="text"
96 data-i18n="ext_regex_debugger_render_text"
97 >
98 Render as Text
99 </option>
100 <option
101 value="message"
102 data-i18n="ext_regex_debugger_render_message"
103 >
104 Render as Message
105 </option>
106 </select>
107 </div>
108 </div>
109 <div class="regex-debugger-results">
110 <div class="results-header">
111 <h4>
112 <i class="fa-solid fa-shoe-prints"></i>
113 <span data-i18n="ext_regex_debugger_step_by_step"
114 >Step-by-step Transformation</span
115 >
116 </h4>
117 <div
118 id="regex_debugger_expand_steps"
119 class="menu_button menu_button_icon"
120 data-i18n="[title]Expand view"
121 title="Expand view"
122 >
123 <i class="fa-solid fa-expand"></i>
124 </div>
125 </div>
126 <div id="regex_debugger_steps_output" class="results-box"></div>
127
128 <div class="results-header">
129 <h4>
130 <i class="fa-solid fa-flag-checkered"></i>
131 <span data-i18n="ext_regex_debugger_final_output"
132 >Final Output</span
133 >
134 </h4>
135 <div
136 id="regex_debugger_expand_final"
137 class="menu_button menu_button_icon"
138 data-i18n="[title]Expand view"
139 title="Expand view"
140 >
141 <i class="fa-solid fa-expand"></i>
142 </div>
143 </div>
144 <div
145 id="regex_debugger_final_output"
146 class="results-box final-output"
147 ></div>
148 </div>
149 </div>
150 </div>
151</div>
152
153<!-- Template for a single rule item -->
154<template id="regex_debugger_rule_template">
155 <li class="regex-debugger-rule" draggable="true">
156 <i class="fa-solid fa-grip-vertical handle"></i>
157 <label class="checkbox">
158 <input type="checkbox" class="rule-enabled" checked />
159 </label>
160 <div class="rule-details">
161 <span class="rule-name"></span>
162 <code class="rule-regex"></code>
163 <small class="rule-scope"></small>
164 </div>
165 <div class="menu_button menu_button_icon edit_rule" data-i18n="[title]Edit Rule" title="Edit Rule">
166 <i class="fa-solid fa-pencil"></i>
167 </div>
168 </li>
169</template>
170
171<!-- Template for a single transformation step -->
172<template id="regex_debugger_step_template">
173 <div class="step-result">
174 <div class="step-header">
175 <strong></strong>
176 </div>
177 <pre class="step-output"></pre>
178 </div>
179</template>