feat: Enhance video management with detailed view and improved routing

This commit is contained in:
2026-02-05 21:48:22 +07:00
parent 27a765044d
commit 1ee2130d88
7 changed files with 112 additions and 120 deletions

View File

@@ -102,29 +102,34 @@ const routes: RouteData[] = [
},
{
path: "video",
name: "video",
component: () => import("./video/Videos.vue"),
meta: {
head: {
title: "Videos - Holistream",
meta: [
{
name: "description",
content: "Manage your video content.",
children: [
{
path: "",
name: "video",
component: () => import("./video/Videos.vue"),
meta: {
head: {
title: "Videos - Holistream",
meta: [
{
name: "description",
content: "Manage your video content.",
},
],
},
],
},
},
},
},
{
path: "video/:id/edit",
name: "video-edit",
component: () => import("./video/EditVideo.vue"),
meta: {
head: {
title: "Edit Video - Holistream",
{
path: ":id",
name: "video-detail",
component: () => import("./video/DetailVideo.vue"),
meta: {
head: {
title: "Edit Video - Holistream",
},
},
},
},
],
},
{
path: "payments-and-plans",
@@ -174,17 +179,17 @@ const routes: RouteData[] = [
];
const createAppRouter = () => {
const router = createRouter({
history: import.meta.env.SSR
? createMemoryHistory() // server
: createWebHistory(), // client
routes,
scrollBehavior(to, from, savedPosition) {
if (savedPosition) {
return savedPosition
}
return { top: 0 }
}
});
history: import.meta.env.SSR
? createMemoryHistory() // server
: createWebHistory(), // client
routes,
scrollBehavior(to, from, savedPosition) {
if (savedPosition) {
return savedPosition;
}
return { top: 0 };
},
});
router.beforeEach((to, from, next) => {
const auth = useAuthStore();