-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathtemplatesSummaryPrompts.js
More file actions
47 lines (45 loc) · 2.09 KB
/
Copy pathtemplatesSummaryPrompts.js
File metadata and controls
47 lines (45 loc) · 2.09 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
// Copyright (C) 2024–2026 Aiko Hanasaki
// SPDX-License-Identifier: AGPL-3.0-only
import { Handlebars } from '../../../../lib.js';
export const summaryPromptsTableTemplate = Handlebars.compile(`
<table style="width: 100%; border-collapse: collapse;">
<thead>
<tr>
<th data-i18n="STMemoryBooks_PromptManager_DisplayName">Display Name</th>
</tr>
</thead>
<tbody>
{{#if items}}
{{#each items}}
<tr data-preset-key="{{key}}" style="cursor: pointer; border-bottom: 1px solid var(--SmartThemeBorderColor);">
<td style="padding: 8px;">
<span class="stmb-preset-name">{{displayName}}</span>
<span class="stmb-inline-actions" style="float: right; display: inline-flex; gap: 10px;">
<button class="stmb-action stmb-action-edit" title="Edit" aria-label="Edit" data-i18n="[title]STMemoryBooks_Edit;[aria-label]STMemoryBooks_Edit" style="background:none;border:none;cursor:pointer;">
<i class="fa-solid fa-pen"></i>
</button>
{{#unless disableDuplicate}}
<button class="stmb-action stmb-action-duplicate" title="Duplicate" aria-label="Duplicate" data-i18n="[title]STMemoryBooks_Duplicate;[aria-label]STMemoryBooks_Duplicate" style="background:none;border:none;cursor:pointer;">
<i class="fa-solid fa-copy"></i>
</button>
{{/unless}}
<button class="stmb-action stmb-action-delete" title="Delete" aria-label="Delete" data-i18n="[title]STMemoryBooks_Delete;[aria-label]STMemoryBooks_Delete" style="background:none;border:none;cursor:pointer;">
<i class="fa-solid fa-trash"></i>
</button>
</span>
{{#if usageNote}}
<small class="opacity70p" style="display: block; margin-top: 4px;">{{usageNote}}</small>
{{/if}}
</td>
</tr>
{{/each}}
{{else}}
<tr>
<td>
<div class="opacity50p" data-i18n="STMemoryBooks_PromptManager_NoPresets">No presets available</div>
</td>
</tr>
{{/if}}
</tbody>
</table>
`);