-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopup.html
More file actions
192 lines (187 loc) · 7.33 KB
/
popup.html
File metadata and controls
192 lines (187 loc) · 7.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<title>Easy Prompt Builder</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="main-header">
<h2>Easy Prompt Builder (EZ-prob)</h2>
</div>
<div id="drop-zone">Drag Files Here</div>
<div id="file-list" style="margin:10px 0; font-size:14px; color:#333;"></div>
<!-- originalpromptThe box remains unchanged -->
<div id="prompt" contenteditable="true"></div>
<ul id="suggestion-list" class="hidden"></ul>
<!-- Add a fixed positiondependbox -->
<div class="section-label">📁 File Dependencies (use @ to insert files):</div>
<div id="depend" contenteditable="true"></div>
<ul id="depend-suggestion-list" class="hidden"></ul>
<div id="customize-modal" class="hidden">
<div>
<h3>Customized Constraints</h3>
<div style="margin-bottom: 0;">
</div>
<div class="table-container">
<table id="cmd-table">
<thead>
<tr>
<th>Name</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<!-- The tour will be led byJavaScriptDynamically add -->
</tbody>
</table>
</div>
<div class="modal-actions">
<button id="add-new-constraint" class="modal-btn">New Constraint</button>
<button id="close-cmds" class="modal-btn">Close</button>
</div>
</div>
</div>
<div id="constraint-edit-modal" class="hidden">
<div>
<h3 id="constraint-edit-title">Manage Constraint</h3>
<div style="margin:10px 0 5px 0; display: flex; justify-content: center;">
<input type="text" id="edit-constraint-name" placeholder="Type constraint name here" style="width:100%;margin:0px 0;padding:4px;box-sizing:border-box">
</div>
<div style="margin:10px 0 5px 0; display: flex; justify-content: center;">
<textarea id="edit-constraint-content" placeholder="Type constraint content here" style="width:100%;height:150px;margin:0px 0;padding:4px;resize:vertical;box-sizing:border-box"></textarea>
</div>
<div class="modal-actions" style="white-space: nowrap;">
<button id="save-constraint" class="modal-btn" style="display: inline-block;">Save</button>
<button id="cancel-constraint-edit" class="modal-btn" style="display: inline-block;">Cancel</button>
</div>
</div>
</div>
<div id="create-file-modal" class="hidden">
<div>
<h3>Create New File</h3>
<div style="margin:10px 0 5px 0; display: flex; justify-content: center;">
<input type="text" id="new-filename" placeholder="Type file name here" style="width:90%;margin:0px 0px;padding:4px;box-sizing:border-box;">
</div>
<div style="margin:10px 0 5px 0; display: flex; justify-content: center;">
<input type="text" id="new-filedesc" placeholder="Describe the purpose" style="width:90%;margin:0px 0px;padding:4px;box-sizing:border-box;">
</div>
<div style="margin:5px 0 10px 0; display: flex; justify-content: center;">
<textarea id="new-filecontent" placeholder="Fill file contents here" style="width:90%;height:150px;margin:0px 0px;padding:4px;box-sizing:border-box;"></textarea>
</div>
<div class="modal-actions" style="white-space: nowrap;">
<button id="save-new-file" class="modal-btn" style="display: inline-block;">Save</button>
<button id="cancel-new-file" class="modal-btn" style="display: inline-block;">Cancel</button>
</div>
</div>
</div>
<div id="settings-modal" class="hidden">
<div>
<h3>Settings</h3>
<div class="modal-actions">
<button id="reset-settings" class="modal-btn">Reset to Default</button>
<button id="purge-files" class="modal-btn danger">Purge Files</button>
</div>
<div class="settings-container">
<table class="settings-table">
<thead>
<tr>
<th>Parameter</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<!-- Numeric settings -->
<tr class="setting-row">
<td class="param-label">Max total storage (KB)</td>
<td class="param-value">
<input type="number" id="max-total-storage-kb" min="100" max="10000" class="number-input">
</td>
</tr>
<tr class="setting-row">
<td class="param-label">Max single file size (KB)</td>
<td class="param-value">
<input type="number" id="max-file-size-kb" min="10" max="5000" class="number-input">
</td>
</tr>
<tr class="setting-row">
<td class="param-label">Max number of files</td>
<td class="param-value">
<input type="number" id="max-files-count" min="1" max="100" class="number-input">
</td>
</tr>
<tr class="setting-row">
<td class="param-label">Max file age (days)</td>
<td class="param-value">
<input type="number" id="max-file-age-days" min="1" max="365" class="number-input" disabled>
</td>
</tr>
<tr class="setting-row">
<td class="param-label">Max constraint words</td>
<td class="param-value">
<input type="number" id="max-constraint-words" min="10" max="10000" class="number-input">
</td>
</tr>
<tr class="setting-row">
<td class="param-label">Max constraint number</td>
<td class="param-value">
<input type="number" id="max-constraints-count" min="1" max="100" class="number-input">
</td>
</tr>
<tr class="setting-row">
<td class="param-label">Max prompt length (KB)</td>
<td class="param-value">
<input type="number" id="max-prompt-kb" min="10" max="5000" class="number-input">
</td>
</tr>
<tr class="setting-row">
<td class="param-label">Max prompt age (days)</td>
<td class="param-value">
<input type="number" id="max-prompt-age-days" min="1" max="365" class="number-input" disabled>
</td>
</tr>
<!-- Switch type setting -->
<tr class="setting-row">
<td class="param-label">Enable auto cleanup</td>
<td class="param-value">
<label class="toggle-switch">
<input type="checkbox" id="auto-cleanup-enabled">
<span class="toggle-slider"></span>
</label>
</td>
</tr>
<tr class="setting-row">
<td class="param-label">Auto cleanup prompt</td>
<td class="param-value">
<label class="toggle-switch">
<input type="checkbox" id="auto-cleanup-prompt-enabled">
<span class="toggle-slider"></span>
</label>
</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-actions">
<button id="save-settings" class="modal-btn">Save</button>
<button id="close-settings" class="modal-btn">Cancel</button>
</div>
</div>
</div>
<div class="modal-actions">
<button id="create-file-btn" class="modal-btn">Create File</button>
<button id="customize-btn" class="modal-btn">Constraints</button>
</div>
<div class="modal-actions">
<button id="copy-btn" class="modal-btn primary">Copy Prompt</button>
<button id="settings-btn" class="modal-btn">Settings</button>
</div>
<div id="copy-status" style="margin-top:8px;height:22px;">
<span class="status-default">
<span class="status-icon">🔍</span>
<span class="status-text">What are you up to?</span>
</span>
</div>
<script src="popup.js"></script>
</body>
</html>