Fix: Explicitly import models in database.py to ensure table creation on Render

This commit is contained in:
2026-02-22 10:29:41 -05:00
parent d50020ade2
commit a111827d1f
4 changed files with 180 additions and 114 deletions

View File

@ -31,17 +31,14 @@ onMounted(() => {
</template>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
:root {
/* Common Variables */
--safe-area-top: env(safe-area-inset-top, 0px);
--safe-area-bottom: env(safe-area-inset-bottom, 0px);
--transition-speed: 0.3s;
--transition-speed: 0.4s;
--font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
}
/* DARK THEME (Default & .dark) */
@ -51,38 +48,38 @@ html.dark {
--bg-secondary: #020617;
--text-primary: #f8fafc;
--text-secondary: #94a3b8;
--border-color: rgba(255, 255, 255, 0.12);
--shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
--border-color: rgba(255, 255, 255, 0.1);
--shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
--header-bg: rgba(15, 23, 42, 0.9);
--header-bg: rgba(15, 23, 42, 0.8);
--header-text: #ffffff;
--card-bg: rgba(30, 41, 59, 0.85); /* Increased opacity for better legibility */
--hover-bg: rgba(255, 255, 255, 0.08);
--card-bg: rgba(30, 41, 59, 0.7);
--hover-bg: rgba(254, 231, 21, 0.08); /* SIBU Gold hint on hover */
--active-bg: rgba(254, 231, 21, 0.15);
--active-color: #fee715;
--accent-color: #fee715;
--accent-hover: #fde047;
--glass-bg: rgba(255, 255, 255, 0.05);
--glass-border: rgba(255, 255, 255, 0.15);
--glass-bg: rgba(15, 23, 42, 0.6);
--glass-border: rgba(254, 231, 21, 0.2);
}
/* LIGHT THEME */
html.light-theme {
--bg-primary: #f1f5f9; /* Slightly darker light background */
--bg-primary: #f8fafc;
--bg-secondary: #ffffff;
--text-primary: #0f172a;
--text-secondary: #475569;
--border-color: #cbd5e1; /* More visible borders */
--header-bg: #ffffff;
--text-secondary: #64748b;
--border-color: rgba(15, 23, 42, 0.08);
--header-bg: rgba(255, 255, 255, 0.8);
--header-text: #0f172a;
--card-bg: #ffffff;
--hover-bg: #f1f5f9;
--glass-bg: rgba(255, 255, 255, 0.9);
--glass-border: #e2e8f0;
--shadow: 0 8px 30px rgba(0, 0, 0, 0.12); /* Stronger shadow in light mode */
--active-bg: rgba(16, 24, 32, 0.1);
--card-bg: rgba(255, 255, 255, 0.9);
--hover-bg: rgba(15, 23, 42, 0.04);
--glass-bg: rgba(255, 255, 255, 0.7);
--glass-border: rgba(15, 23, 42, 0.1);
--shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
--active-bg: rgba(15, 23, 42, 0.05);
--active-color: #101820;
--accent-color: #101820;
}
@ -96,9 +93,9 @@ body {
overflow-x: hidden;
background-color: var(--bg-primary);
color: var(--text-primary);
transition: all 0.3s ease;
font-family: 'Inter', system-ui, -apple-system, sans-serif;
letter-spacing: -0.01em;
transition: background-color 0.5s ease-in-out;
font-family: var(--font-family);
letter-spacing: -0.02em;
}
body {

View File

@ -105,18 +105,30 @@ function clearRouteAndClose() {
</div>
<div v-else>
<!-- Route selector card (same style as MapView) -->
<div v-if="routeStore.allRoutes.length > 0" class="route-card" ref="routeCardRef">
<!-- Quick Select Route Buttons (Nexus Style) -->
<div class="quick-routes-container">
<div
v-for="route in routeStore.allRoutes"
:key="route.id"
class="route-chip-nexus"
:class="{ 'active': route.id === routeStore.selectedRouteId }"
@click="selectRouteAndClose(route.id, route.name)"
>
<span class="material-icons chip-icon">directions_bus</span>
<span class="chip-text">{{ route.name }}</span>
<div v-if="route.id === routeStore.selectedRouteId" class="active-dot"></div>
</div>
</div>
<!-- Route selector card (As backup/dropdown) -->
<div class="route-card" ref="routeCardRef">
<div class="route-card-content" @click.stop="showRouteDropdown = !showRouteDropdown">
<span class="material-icons route-icon">route</span>
<span class="material-icons route-icon">search</span>
<div class="route-info">
<div v-if="routeStore.selectedRouteId && routeStore.selectedRouteName" class="route-name">
{{ t('schedules.route') }}: {{ routeStore.selectedRouteName }}
</div>
<div v-else class="route-name">{{ t('schedules.selectRoute') }}</div>
<div v-if="routeStore.selectedRouteId && scheduleStore.schedules.length > 0" class="route-stops">
{{ scheduleStore.schedules.length }} {{ t('schedules.schedules') }}
{{ routeStore.selectedRouteName }}
</div>
<div v-else class="route-name">Buscar otra ruta...</div>
</div>
<span class="material-icons arrow-icon" :class="{ 'rotated': showRouteDropdown }">
keyboard_arrow_down
@ -134,13 +146,6 @@ function clearRouteAndClose() {
>
{{ route.name }}
</div>
<div
v-if="routeStore.selectedRouteId"
class="route-option clear-option"
@click="clearRouteAndClose"
>
{{ t('common.clearSelection') }}
</div>
</div>
</div>
@ -208,9 +213,72 @@ function clearRouteAndClose() {
text-align: center;
}
.quick-routes-container {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 12px;
margin-bottom: 24px;
max-width: 800px;
margin-left: auto;
margin-right: auto;
}
.route-chip-nexus {
background: rgba(255, 255, 255, 0.05);
border: 1px solid var(--border-color);
padding: 12px 20px;
border-radius: 16px;
display: flex;
align-items: center;
gap: 10px;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
overflow: hidden;
}
.route-chip-nexus:hover {
background: rgba(254, 231, 21, 0.1);
border-color: var(--active-color);
transform: translateY(-2px);
}
.route-chip-nexus.active {
background: var(--active-color);
border-color: var(--active-color);
color: #101820;
box-shadow: 0 8px 20px rgba(254, 231, 21, 0.3);
}
.chip-icon {
font-size: 20px;
color: var(--active-color);
}
.route-chip-nexus.active .chip-icon {
color: #101820;
}
.chip-text {
font-weight: 800;
font-size: 0.9rem;
letter-spacing: 0.5px;
}
.active-dot {
position: absolute;
top: 6px;
right: 6px;
width: 6px;
height: 6px;
background: #101820;
border-radius: 50%;
}
.route-card {
margin-bottom: 2rem;
max-width: 600px;
max-width: 400px;
margin-left: auto;
margin-right: auto;
}