-
Notifications
You must be signed in to change notification settings - Fork 2
/
ui.html
216 lines (210 loc) · 7.94 KB
/
ui.html
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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<div
id="promptHub-section-history"
style="margin-bottom: 1rem"
class="flex flex-col relative col gap-4 gr-compact promptHub-section"
>
<input type="file" id="promptHub-file-input" accept=".json,application/json" />
<div id="promptHub-history-toggle" class="w-full flex justify-between cursor-pointer">
<span class="promptHub-prompt-title"><strong>Prompt History</strong></span>
<span id="history-header-expansion-indicator" class="transition rotate-90">▼</span>
</div>
<div id="promptHub-history-container" class="hidden">
<div style="margin-top: 1rem">
<button
id="promptHub-history-save-current"
class="gr-button gr-button-sm gr-button-secondary"
title="Save the above positive and negative prompt"
style="display: block; margin: 0 auto"
>
📝
<span id="promptHub-history-current-label">Save Current txt2img Prompt</span>
</button>
<span>Positive</span>
<div class="flex row w-full">
<div class="promptHub-section-btn-container">
<button
id="promptHub-history-add-positive"
class="gr-button gr-button-lg gr-button-tool promptHub-prompt-btn"
title="Add selected style to positive prompt"
>
➕
</button>
<button
id="promptHub-history-remove-positive"
class="gr-button gr-button-lg gr-button-tool promptHub-prompt-btn"
title="Remove the selected prompt from history"
>
🗑
</button>
</div>
<select id="promptHub-positive-history" class="promptHub-multiselect promptHub-resizable" size="4"></select>
</div>
<div class="flex row w-full flex-wrap gap-4" style="margin-top: 1rem">
<button
id="promptHub-history-save-positive"
class="gr-button gr-button-sm gr-button-secondary"
title="Save the selected prompt"
>
💾 Save Selected
</button>
<button
id="promptHub-history-reset-positive"
class="gr-button gr-button-sm gr-button-secondary"
title="Clear the positive prompt history"
>
❌ Clear History
</button>
<button
id="promptHub-history-import-positive"
class="gr-button gr-button-sm gr-button-secondary"
title="Import a previous list of positive prompts from a file"
>
⬆️ Import
</button>
<button
id="promptHub-history-export-positive"
class="gr-button gr-button-sm gr-button-secondary"
title="Export the list of positive prompts to a file"
>
⬇️ Export
</button>
</div>
</div>
<div style="margin-top: 2rem">
<span>Negative</span>
<div class="flex row w-full">
<div class="promptHub-section-btn-container">
<button
id="promptHub-history-add-negative"
class="gr-button gr-button-lg gr-button-tool promptHub-prompt-btn"
title="Add selected style to positive prompt"
>
➕
</button>
<button
id="promptHub-history-remove-negative"
class="gr-button gr-button-lg gr-button-tool promptHub-prompt-btn"
title="Remove the selected prompt from history"
>
🗑
</button>
</div>
<select id="promptHub-negative-history" class="promptHub-multiselect promptHub-resizable" size="4"></select>
</div>
<div class="flex row w-full flex-wrap gap-4" style="margin-top: 1rem">
<button
id="promptHub-history-save-negative"
class="gr-button gr-button-sm gr-button-secondary"
title="Save the selected prompt"
>
💾 Save Selected
</button>
<button
id="promptHub-history-reset-negative"
class="gr-button gr-button-sm gr-button-secondary"
title="Clear the negative prompt history"
>
❌ Clear History
</button>
<button
id="promptHub-history-import-negative"
class="gr-button gr-button-sm gr-button-secondary"
title="Import a previous list of negative prompts from a file"
>
⬆️ Import
</button>
<button
id="promptHub-history-export-negative"
class="gr-button gr-button-sm gr-button-secondary"
title="Export the list of negative prompts to a file"
>
⬇️ Export
</button>
</div>
</div>
<button
id="promptHub-history-save-selected"
class="gr-button gr-button-sm gr-button-secondary"
title="Save the highlighted positive and negative prompt from the history list"
style="display: block; margin-top: 1.5rem; margin-left: auto; margin-right: auto"
>
↕️ Save Selected History Prompts
</button>
</div>
</div>
<div
id="promptHub-section-saved"
style="margin-bottom: 1rem"
class="flex flex-col relative col gap-4 gr-compact promptHub-section"
>
<div id="promptHub-saved-toggle" class="w-full flex justify-between cursor-pointer">
<span class="promptHub-prompt-title"><strong>Saved Prompts</strong></span>
<span id="saved-header-expansion-indicator" class="transition rotate-90">▼</span>
</div>
<div id="promptHub-saved-container" class="hidden" style="margin-top: 1rem">
<div class="flex row w-full promptHub-resizable">
<select id="promptHub-saved-prompts" class="promptHub-multiselect promptHub-resizable" size="4"></select>
</div>
<div class="flex row w-full flex-wrap gap-4" style="margin-top: 1rem">
<button
id="promptHub-saved-import"
class="gr-button gr-button-sm gr-button-secondary"
title="Save the selected prompt"
>
⬆️ Import
</button>
<button
id="promptHub-saved-export"
class="gr-button gr-button-sm gr-button-secondary"
title="Clear the negative prompt history"
>
⬇️ Export
</button>
<button
id="promptHub-saved-rename"
class="gr-button gr-button-sm gr-button-secondary"
title="Import a previous list of negative prompts from a file"
>
✏️ Rename Selected
</button>
<button
id="promptHub-saved-remove"
class="gr-button gr-button-sm gr-button-secondary"
title="Import a previous list of negative prompts from a file"
>
🗑 Remove Selected
</button>
<button
id="promptHub-saved-clear"
class="gr-button gr-button-sm gr-button-secondary"
title="Export the list of negative prompts to a file"
>
❌ Clear Saved
</button>
</div>
<div class="flex row w-full flex row w-full flex-col promptHub-section promptHub-resizable">
<span class="promptHub-inline-text">Positive:</span>
<textarea class="promptHub-section" id="promptHub-saved-positive-input"></textarea>
</div>
<div class="flex row w-full flex row w-full flex-col promptHub-section promptHub-resizable">
<span class="promptHub-inline-text">Negative:</span>
<textarea class="promptHub-section" id="promptHub-saved-negative-input"></textarea>
</div>
<button
id="promptHub-saved-update"
class="gr-button gr-button-lg gr-button-secondary promptHub-hide-btn"
style="display: block; margin-top: 1rem; margin-bottom: 1rem; margin-left: auto; margin-right: auto"
>
💾 Save Prompt Changes?
</button>
<div class="flex row w-full flex-wrap gap-4" style="margin-top: 1rem">
<button id="promptHub-saved-apply-both" class="gr-button gr-button-sm gr-button-secondary">↕️ Apply Both</button>
<button id="promptHub-saved-apply-positive" class="gr-button gr-button-sm gr-button-secondary">
➕ Apply Positive
</button>
<button id="promptHub-saved-apply-negative" class="gr-button gr-button-sm gr-button-secondary">
➖ Apply Negative
</button>
</div>
</div>
</div>