Phase 2 Complete: SQL migration with SQLModel and Alembic
This commit is contained in:
+26
-7
@@ -11,7 +11,7 @@
|
||||
|
||||
<!-- External Libraries -->
|
||||
<script src="https://unpkg.com/htmx.org@1.9.10"></script>
|
||||
<script src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
||||
<script src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js" defer></script>
|
||||
<script src="https://cdn.plyr.io/3.7.8/plyr.polyfilled.js"></script>
|
||||
|
||||
<style>
|
||||
@@ -31,15 +31,34 @@
|
||||
<script src="/static/js/watchlist-ui.js?v=1.11" defer></script>
|
||||
<script src="/static/js/main.js?v=1.11" defer></script>
|
||||
</head>
|
||||
<body x-data="{
|
||||
activeTab: 'home',
|
||||
isAuthenticated: true,
|
||||
username: ''
|
||||
}" @set-tab.window="activeTab = $event.detail.tab"
|
||||
@auth-success.window="isAuthenticated = true; username = $event.detail.username">
|
||||
<body x-data="globalAppState">
|
||||
{% include "components/toast_container.html" %}
|
||||
<div class="container">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Global State initialized when Alpine is ready
|
||||
document.addEventListener('alpine:init', () => {
|
||||
console.log('Alpine.js initializing...');
|
||||
Alpine.data('globalAppState', () => ({
|
||||
activeTab: 'home',
|
||||
isAuthenticated: true,
|
||||
username: '',
|
||||
init() {
|
||||
console.log('Global app state ready');
|
||||
window.addEventListener('auth-success', (e) => {
|
||||
console.log('Alpine auth-success received');
|
||||
this.isAuthenticated = true;
|
||||
this.username = e.detail.username;
|
||||
});
|
||||
window.addEventListener('set-tab', (e) => {
|
||||
console.log('Alpine set-tab received:', e.detail.tab);
|
||||
this.activeTab = e.detail.tab;
|
||||
});
|
||||
}
|
||||
}));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user