mirror of
https://github.com/perstarkse/minne.git
synced 2026-06-30 18:11:34 +02:00
fix: html-router modals and add insta snapshot tests.
Avoid nested forms in the scratchpad editor, centralize modal lifecycle in modal.js, return HTMX partials from archive, and add template compile plus layout snapshots.
This commit is contained in:
@@ -19,17 +19,12 @@ hx-swap="outerHTML"
|
||||
{% endblock %}
|
||||
|
||||
{% block primary_actions %}
|
||||
<button type="button" class="nb-btn w-full sm:w-auto sm:mr-2" id="reset_prompt_button">
|
||||
<button type="button" class="nb-btn w-full sm:w-auto sm:mr-2"
|
||||
data-reset-target="textarea[name=image_processing_prompt]">
|
||||
Reset to Default
|
||||
</button>
|
||||
|
||||
<textarea id="default_prompt_content" style="display:none;">{{ default_image_prompt }}</textarea>
|
||||
<script>
|
||||
document.getElementById('reset_prompt_button').addEventListener('click', function () {
|
||||
const defaultContent = document.getElementById('default_prompt_content').value;
|
||||
document.querySelector('textarea[name=image_processing_prompt]').value = defaultContent;
|
||||
});
|
||||
</script>
|
||||
|
||||
<button type="submit" class="nb-btn nb-cta w-full sm:w-auto">
|
||||
<span class="htmx-indicator hidden">
|
||||
|
||||
@@ -19,17 +19,12 @@ hx-swap="outerHTML"
|
||||
{% endblock %}
|
||||
|
||||
{% block primary_actions %}
|
||||
<button type="button" class="nb-btn w-full sm:w-auto sm:mr-2" id="reset_prompt_button">
|
||||
<button type="button" class="nb-btn w-full sm:w-auto sm:mr-2"
|
||||
data-reset-target="textarea[name=ingestion_system_prompt]">
|
||||
Reset to Default
|
||||
</button>
|
||||
|
||||
<textarea id="default_prompt_content" style="display:none;">{{ default_ingestion_prompt }}</textarea>
|
||||
<script>
|
||||
document.getElementById('reset_prompt_button').addEventListener('click', function () {
|
||||
const defaultContent = document.getElementById('default_prompt_content').value;
|
||||
document.querySelector('textarea[name=ingestion_system_prompt]').value = defaultContent;
|
||||
});
|
||||
</script>
|
||||
|
||||
<button type="submit" class="nb-btn nb-cta w-full sm:w-auto">
|
||||
<span class="htmx-indicator hidden">
|
||||
|
||||
@@ -19,17 +19,12 @@ hx-swap="outerHTML"
|
||||
{% endblock %}
|
||||
|
||||
{% block primary_actions %}
|
||||
<button type="button" class="nb-btn w-full sm:w-auto sm:mr-2" id="reset_prompt_button">
|
||||
<button type="button" class="nb-btn w-full sm:w-auto sm:mr-2"
|
||||
data-reset-target="textarea[name=query_system_prompt]">
|
||||
Reset to Default
|
||||
</button>
|
||||
|
||||
<textarea id="default_prompt_content" style="display:none;">{{ default_query_prompt }}</textarea>
|
||||
<script>
|
||||
document.getElementById('reset_prompt_button').addEventListener('click', function () {
|
||||
const defaultContent = document.getElementById('default_prompt_content').value;
|
||||
document.querySelector('textarea[name=query_system_prompt]').value = defaultContent;
|
||||
});
|
||||
</script>
|
||||
|
||||
<button type="submit" class="nb-btn nb-cta w-full sm:w-auto">
|
||||
<span class="htmx-indicator hidden">
|
||||
|
||||
Reference in New Issue
Block a user