diff --git a/app/components/common/card.vue b/app/components/common/card.vue new file mode 100644 index 0000000..d00eeae --- /dev/null +++ b/app/components/common/card.vue @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/app/components/forms/auth/login-form.vue b/app/components/forms/auth/login-form.vue index 5632403..b25f8ab 100644 --- a/app/components/forms/auth/login-form.vue +++ b/app/components/forms/auth/login-form.vue @@ -23,6 +23,14 @@ const handleLogin = () => login(email.value, password.value) \ No newline at end of file diff --git a/app/components/panels/movie-details.vue b/app/components/panels/movie-details.vue index 066d32b..320162e 100644 --- a/app/components/panels/movie-details.vue +++ b/app/components/panels/movie-details.vue @@ -1,37 +1,127 @@ \ No newline at end of file diff --git a/app/components/slideout-panel.vue b/app/components/slideout-panel.vue index 439cb37..105f2e5 100644 --- a/app/components/slideout-panel.vue +++ b/app/components/slideout-panel.vue @@ -9,16 +9,18 @@ const emit = defineEmits<{ diff --git a/app/layouts/default.vue b/app/layouts/default.vue index d2b618b..a4d279a 100644 --- a/app/layouts/default.vue +++ b/app/layouts/default.vue @@ -16,4 +16,10 @@ max-width: 1280px; } +@media (max-width: 740px) { + .container { + padding: 0.5rem; + } +} + \ No newline at end of file diff --git a/app/middleware/auth.global.ts b/app/middleware/auth.global.ts new file mode 100644 index 0000000..3212b86 --- /dev/null +++ b/app/middleware/auth.global.ts @@ -0,0 +1,9 @@ +export default defineNuxtRouteMiddleware((to) => { + const publicRoutes = ['/auth/login'] + if (publicRoutes.includes(to.path)) return + + const xsrfToken = useCookie('XSRF-TOKEN') + if (!xsrfToken.value) { + return navigateTo('/auth/login') + } +}) diff --git a/app/pages/auth/login.vue b/app/pages/auth/login.vue index 576b08c..6f800ce 100644 --- a/app/pages/auth/login.vue +++ b/app/pages/auth/login.vue @@ -1,6 +1,9 @@