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 -5
View File
@@ -70,7 +70,6 @@ const {
loadWatchHistory: fetchWatchHistory,
saveWatchHistory: persistWatchHistory,
} = useWatchHistory()
const { user, initAuth } = useSupabaseAuth()
const {
isFavorite,
saveFavorite,
@@ -886,7 +885,7 @@ async function toggleFavorite() {
} else {
await saveFavorite(libraryItem.value)
isFavoriteMovie.value = true
flashActionMessage(user.value ? 'Đã lưu vào yêu thích.' : 'Đã lưu yêu thích trên thiết bị này.')
flashActionMessage('Đã lưu vào yêu thích.')
}
actionBusy.value = false
}
@@ -897,7 +896,7 @@ async function addToWatchLater() {
actionBusy.value = true
await saveWatchLater(libraryItem.value)
actionBusy.value = false
flashActionMessage(user.value ? 'Đã thêm vào danh sách xem sau.' : 'Đã thêm vào danh sách xem sau trên thiết bị này.')
flashActionMessage('Đã thêm vào danh sách xem sau.')
}
async function shareMovie() {
@@ -921,7 +920,6 @@ async function shareMovie() {
}
onMounted(async () => {
await initAuth()
await refreshFavoriteState()
document.addEventListener('visibilitychange', handleVisibilityChange)
document.addEventListener('keydown', handleKeyboardShortcut)
@@ -972,7 +970,7 @@ watch([canUseEmbed, canUseHls], () => {
immediate: true,
})
watch([libraryItem, user], () => {
watch(libraryItem, () => {
refreshFavoriteState()
})