2021-04-07 17:15:40 +05:30
|
|
|
import { createRouter, createWebHistory } from "vue-router";
|
2020-12-09 19:03:29 +05:30
|
|
|
|
2021-04-07 17:15:40 +05:30
|
|
|
const routes = [
|
|
|
|
{
|
|
|
|
path: "/",
|
|
|
|
name: "Trending",
|
|
|
|
component: () => import("../components/TrendingPage.vue"),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/preferences",
|
|
|
|
name: "Preferences",
|
2022-01-13 10:42:06 +05:30
|
|
|
component: () => import("../components/PreferencesPage.vue"),
|
2021-04-07 17:15:40 +05:30
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/results",
|
|
|
|
name: "SearchResults",
|
|
|
|
component: () => import("../components/SearchResults.vue"),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/playlist",
|
|
|
|
name: "Playlist",
|
2022-01-13 10:42:06 +05:30
|
|
|
component: () => import("../components/PlaylistPage.vue"),
|
2021-04-07 17:15:40 +05:30
|
|
|
},
|
2021-06-26 15:49:10 +05:30
|
|
|
{
|
|
|
|
path: "/:path(v|w|embed|shorts|watch)/:v?",
|
2021-07-20 02:55:43 +05:30
|
|
|
name: "WatchVideo",
|
2021-06-26 15:49:10 +05:30
|
|
|
component: () => import("../components/WatchVideo.vue"),
|
|
|
|
},
|
2022-02-10 20:33:33 +05:30
|
|
|
{
|
|
|
|
path: "/clip/:clipId",
|
|
|
|
name: "Clips",
|
|
|
|
component: () => import("../components/ClipsPage.vue"),
|
|
|
|
},
|
2021-06-26 15:49:10 +05:30
|
|
|
{
|
|
|
|
path: "/:path(channel|user|c)/:channelId/:videos?",
|
2021-07-20 02:55:43 +05:30
|
|
|
name: "Channel",
|
2022-01-13 10:42:06 +05:30
|
|
|
component: () => import("../components/ChannelPage.vue"),
|
2021-06-26 15:49:10 +05:30
|
|
|
},
|
2021-07-17 04:26:41 +05:30
|
|
|
{
|
|
|
|
path: "/login",
|
|
|
|
name: "Login",
|
|
|
|
component: () => import("../components/LoginPage.vue"),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/register",
|
|
|
|
name: "Register",
|
|
|
|
component: () => import("../components/RegisterPage.vue"),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/feed",
|
|
|
|
name: "Feed",
|
|
|
|
component: () => import("../components/FeedPage.vue"),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/import",
|
|
|
|
name: "Import",
|
|
|
|
component: () => import("../components/ImportPage.vue"),
|
|
|
|
},
|
2021-07-20 02:55:43 +05:30
|
|
|
{
|
|
|
|
path: "/:videoId([a-zA-Z0-9_-]{11})",
|
|
|
|
component: () => import("../components/VideoRedirect.vue"),
|
|
|
|
},
|
2021-07-23 01:35:48 +05:30
|
|
|
{
|
|
|
|
path: "/subscriptions",
|
|
|
|
name: "Subscriptions",
|
|
|
|
component: () => import("../components/SubscriptionsPage.vue"),
|
|
|
|
},
|
2021-08-22 15:57:09 +05:30
|
|
|
{
|
|
|
|
path: "/history",
|
|
|
|
name: "Watch History",
|
|
|
|
component: () => import("../components/HistoryPage.vue"),
|
|
|
|
},
|
2021-04-07 17:15:40 +05:30
|
|
|
];
|
2020-12-09 19:03:29 +05:30
|
|
|
|
|
|
|
const router = createRouter({
|
|
|
|
history: createWebHistory(),
|
2021-04-07 17:15:40 +05:30
|
|
|
routes,
|
|
|
|
});
|
2020-12-09 19:03:29 +05:30
|
|
|
|
2021-04-07 17:15:40 +05:30
|
|
|
export default router;
|