feat: add mobile navigation component and queue panel
- Implemented MobileNav.vue for mobile navigation with links to Home, Library, Playlist, and Profile. - Added QueuePanel.vue to display the current queue of tracks with functionality to jump to a specific track. - Created ArtistView.vue to show artist details and their tracks, including loading states and play functionality. - Introduced NotFoundPage.vue for handling 404 errors with a user-friendly message and a link to return home.
This commit is contained in:
@@ -9,6 +9,8 @@ import PlaylistPage from '../views/PlaylistPage.vue'
|
||||
import PlaylistDetail from '../views/PlaylistDetail.vue'
|
||||
import ProfilePage from '../views/ProfilePage.vue'
|
||||
import AdminPage from '../views/AdminPage.vue'
|
||||
import ArtistView from '../views/ArtistView.vue'
|
||||
import NotFoundPage from '../views/NotFoundPage.vue'
|
||||
|
||||
const routes = [
|
||||
{ path: '/', redirect: '/home' },
|
||||
@@ -19,7 +21,9 @@ const routes = [
|
||||
{ path: '/playlist', name: 'Playlist', component: PlaylistPage },
|
||||
{ path: '/playlist/:id', name: 'PlaylistDetail', component: PlaylistDetail },
|
||||
{ path: '/profile', name: 'Profile', component: ProfilePage },
|
||||
{ path: '/artist/:name', name: 'Artist', component: ArtistView },
|
||||
{ path: '/admin/tracks', name: 'AdminTracks', component: AdminPage, meta: { admin: true } },
|
||||
{ path: '/:pathMatch(.*)*', name: 'NotFound', component: NotFoundPage },
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
@@ -41,4 +45,8 @@ router.beforeEach((to, from, next) => {
|
||||
next()
|
||||
})
|
||||
|
||||
router.afterEach(() => {
|
||||
window.scrollTo(0, 0)
|
||||
})
|
||||
|
||||
export default router
|
||||
|
||||
Reference in New Issue
Block a user