Fix: mime to see marks; reverse actions order; hide endturn button

This commit is contained in:
Grail Finder
2025-09-11 18:42:41 +03:00
parent 6daab9cb1a
commit 1664c26c0a
4 changed files with 14 additions and 28 deletions

View File

@@ -1,5 +1,5 @@
{{define "actionhistory"}}
<div id="actionHistoryContainer" class="overflow-y-auto max-h-96 border-2 border-gray-300 p-4 rounded-lg space-y-2">
<div id="actionHistoryContainer" class="overflow-y-auto max-h-96 border-2 border-gray-300 p-4 rounded-lg space-y-2 h-full flex-col-reverse justify-end">
Backlog:
{{range .}}
<div class="flex items-center justify-between p-2 rounded">
@@ -14,27 +14,4 @@
</div>
{{end}}
</div>
<script>
if (!window.actionHistoryScrollSet) {
// Use HTMX's after-swap event to scroll after content updates
document.addEventListener('htmx:afterSwap', function(evt) {
if (evt.target.id === 'actionHistoryContainer' || evt.detail.target.id === 'actionHistoryContainer') {
const container = document.getElementById('actionHistoryContainer');
if (container) {
container.scrollTop = container.scrollHeight;
}
}
});
// Fallback for initial load
htmx.onLoad(function(target) {
if (target.id === 'actionHistoryContainer') {
const container = document.getElementById('actionHistoryContainer');
if (container) {
container.scrollTop = container.scrollHeight;
}
}
});
window.actionHistoryScrollSet = true;
}
</script>
{{end}}