feat: Add feedback button to navbar

- Adds 'Give Feedback' button to mobile navigation menu
- Integrates with feedback modal system
- Part of governed feedback system (Tractatus + AL)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
TheFlow 2025-11-03 12:53:14 +13:00
parent 925b28498d
commit 72404725ae

View file

@ -102,6 +102,14 @@ class TractatusNavbar {
<a href="/koha.html" class="block px-3 py-2.5 text-gray-700 hover:bg-blue-50 hover:text-blue-700 rounded-lg transition">
<span class="text-sm font-semibold">🤝 Support (Koha)</span>
</a>
<!-- Feedback (opens modal) -->
<div class="pt-3 mt-3 border-t border-gray-200">
<button id="navbar-feedback-btn" class="w-full text-left block px-3 py-2.5 text-white bg-gradient-to-r from-blue-600 to-blue-700 hover:shadow-lg rounded-lg transition">
<span class="text-sm font-semibold">💬 Give Feedback</span>
<span class="block text-xs opacity-90 mt-0.5">Governed by Tractatus + AL</span>
</button>
</div>
</nav>
</div>
</div>
@ -182,6 +190,20 @@ class TractatusNavbar {
}
});
});
// Feedback button - dispatch event that feedback component will handle
const navbarFeedbackBtn = document.getElementById('navbar-feedback-btn');
if (navbarFeedbackBtn) {
navbarFeedbackBtn.addEventListener('click', () => {
// Close mobile menu
if (this.mobileMenuOpen) {
toggleMobileMenu();
}
// Dispatch event to open feedback modal
window.dispatchEvent(new CustomEvent('openFeedbackModal'));
});
}
}
setActivePageIndicator() {