Refactor: Remove Supabase authentication and related code

- Removed Supabase authentication logic from xem/[slug].vue and yeu-thich.vue.
- Updated favorite and watch later messages to be device-specific.
- Removed unused user state and authentication initialization.
- Deleted supabase.ts plugin file and related configurations.
- Updated nuxt.config.ts to remove Supabase runtime configuration.
- Removed Supabase dependencies from package.json and package-lock.json.
- Adjusted Dockerfile for development environment.
- Added admin layout and pages for managing settings, movies, and users.
- Implemented admin dashboard with statistics and recent activities.
- Created movie and user management interfaces with search functionality.
This commit is contained in:
ngthanhvu
2026-07-21 23:43:04 -04:00
parent 2782ffb75e
commit f09e3275eb
22 changed files with 697 additions and 760 deletions
+3 -17
View File
@@ -1,8 +1,7 @@
<script setup lang="ts">
import { Heart, UserRound } from 'lucide-vue-next'
import { Heart } from 'lucide-vue-next'
import type { LibraryMovieItem } from '~/composables/useMovieLibrary'
const { user, loading: authLoading, initAuth } = useSupabaseAuth()
const { loadFavorites } = useMovieLibrary()
const favoriteItems = ref<LibraryMovieItem[]>([])
const loading = ref(true)
@@ -23,14 +22,9 @@ function movieLink(item: LibraryMovieItem) {
}
onMounted(async () => {
await initAuth()
await refreshFavorites()
})
watch(user, () => {
refreshFavorites()
})
useHead({
title: 'Yêu thích - CineK',
meta: [
@@ -52,7 +46,7 @@ useHead({
<h1 class="mt-2 text-3xl font-black sm:text-4xl">Yêu thích</h1>
</div>
<div v-if="loading || authLoading" class="grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-6">
<div v-if="loading" class="grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-6">
<div v-for="item in 12" :key="item" class="aspect-2/3 animate-pulse rounded-md bg-white/10" />
</div>
@@ -75,7 +69,7 @@ useHead({
</NuxtLink>
</div>
<div v-else-if="user"
<div v-else
class="flex min-h-80 flex-col items-center justify-center rounded-lg border border-white/10 bg-white/6 p-6 text-center">
<Heart class="size-12 text-yellow-300" />
<h2 class="mt-4 text-xl font-black">Chưa phim yêu thích</h2>
@@ -87,14 +81,6 @@ useHead({
Duyệt phim
</NuxtLink>
</div>
<div v-else class="rounded-lg border border-white/10 bg-white/6 p-6">
<UserRound class="size-10 text-yellow-300" />
<h2 class="mt-4 text-xl font-black">Bạn chưa đăng nhập</h2>
<p class="mt-2 text-sm leading-6 text-slate-300">
Đăng nhập để đồng bộ danh sách yêu thích, hoặc vẫn thể lưu tạm trên thiết bị này.
</p>
</div>
</section>
</main>
</template>