- Add `tags: List[str]` field to all 13 entity types (devices, output targets, CSS sources, picture sources, audio sources, value sources, sync clocks, automations, scene presets, capture/audio/PP/pattern templates) - Update all stores, schemas, and route handlers for tag CRUD - Add GET /api/v1/tags endpoint aggregating unique tags across all stores - Create TagInput component with chip display, autocomplete dropdown, keyboard navigation, and API-backed suggestions - Display tag chips on all entity cards (searchable via existing text filter) - Add tag input to all 14 editor modals with dirty check support - Add CSS styles and i18n keys (en/ru/zh) for tag UI - Also includes code review fixes: thread safety, perf, store dedup Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
55 lines
3.2 KiB
HTML
55 lines
3.2 KiB
HTML
<!-- Template Modal -->
|
|
<div id="template-modal" class="modal" role="dialog" aria-modal="true" aria-labelledby="template-modal-title">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h2 id="template-modal-title" data-i18n="templates.add">Add Capture Template</h2>
|
|
<button class="modal-close-btn" onclick="closeTemplateModal()" title="Close" data-i18n-aria-label="aria.close">✕</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<input type="hidden" id="template-id">
|
|
<form id="template-form">
|
|
<div class="form-group">
|
|
<label for="template-name" data-i18n="templates.name">Template Name:</label>
|
|
<input type="text" id="template-name" data-i18n-placeholder="templates.name.placeholder" placeholder="My Custom Template" required>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="template-description" data-i18n="templates.description.label">Description (optional):</label>
|
|
<input type="text" id="template-description" data-i18n-placeholder="templates.description.placeholder" placeholder="Describe this template..." maxlength="500">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="label-row">
|
|
<label for="template-engine" data-i18n="templates.engine">Capture Engine:</label>
|
|
<button type="button" class="hint-toggle" onclick="toggleHint(this)" title="?">?</button>
|
|
</div>
|
|
<small class="input-hint" style="display:none" data-i18n="templates.engine.hint">Select the screen capture technology to use</small>
|
|
<select id="template-engine" onchange="onEngineChange()" required>
|
|
</select>
|
|
<small id="engine-availability-hint" class="form-hint" style="display: none;"></small>
|
|
</div>
|
|
|
|
<div id="engine-config-section" style="display: none;">
|
|
<h3 data-i18n="templates.config">Configuration</h3>
|
|
<div id="engine-config-fields"></div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="label-row">
|
|
<label data-i18n="tags.label">Tags:</label>
|
|
<button type="button" class="hint-toggle" onclick="toggleHint(this)" title="?">?</button>
|
|
</div>
|
|
<small class="input-hint" style="display:none" data-i18n="tags.hint">Assign tags for grouping and filtering cards</small>
|
|
<div id="capture-template-tags-container"></div>
|
|
</div>
|
|
|
|
<div id="template-error" class="error-message" style="display: none;"></div>
|
|
</form>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button class="btn btn-icon btn-secondary" onclick="closeTemplateModal()" title="Cancel" data-i18n-aria-label="aria.cancel">✕</button>
|
|
<button class="btn btn-icon btn-primary" onclick="saveTemplate()" title="Save" data-i18n-aria-label="aria.save">✓</button>
|
|
</div>
|
|
</div>
|
|
</div>
|