mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
77 lines
2.0 KiB
TypeScript
77 lines
2.0 KiB
TypeScript
import { NgModule } from '@angular/core';
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
import { isTauri } from '@tauri-apps/api/core';
|
|
import { stalkerRoutes } from './stalker/stalker.routes';
|
|
import { xtreamRoutes } from './xtream-tauri/xtream.routes';
|
|
|
|
const routes: Routes = [
|
|
{
|
|
path: '',
|
|
loadComponent: () =>
|
|
import('./home/home.component').then((c) => c.HomeComponent),
|
|
},
|
|
{
|
|
path: 'playlists',
|
|
loadComponent: () =>
|
|
import('./home/video-player/video-player.component').then(
|
|
(c) => c.VideoPlayerComponent
|
|
),
|
|
},
|
|
{
|
|
path: 'iptv',
|
|
loadComponent: () =>
|
|
import('./home/video-player/video-player.component').then(
|
|
(c) => c.VideoPlayerComponent
|
|
),
|
|
},
|
|
{
|
|
path: 'playlists/:id',
|
|
loadComponent: () =>
|
|
import('./home/video-player/video-player.component').then(
|
|
(c) => c.VideoPlayerComponent
|
|
),
|
|
},
|
|
{
|
|
path: 'settings',
|
|
loadComponent: () =>
|
|
import('./settings/settings.component').then(
|
|
(c) => c.SettingsComponent
|
|
),
|
|
},
|
|
...(isTauri()
|
|
? xtreamRoutes
|
|
: [
|
|
{
|
|
path: 'xtreams/:id',
|
|
loadComponent: () =>
|
|
import('./xtream/xtream-main-container.component').then(
|
|
(c) => c.XtreamMainContainerComponent
|
|
),
|
|
},
|
|
]),
|
|
{
|
|
path: 'portals/:id',
|
|
loadComponent: () =>
|
|
import('./stalker/stalker-main-container.component').then(
|
|
(c) => c.StalkerMainContainerComponent
|
|
),
|
|
},
|
|
...stalkerRoutes,
|
|
{
|
|
path: '**',
|
|
redirectTo: '',
|
|
},
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [
|
|
RouterModule.forRoot(
|
|
routes /* {
|
|
enableTracing: !AppConfig.production,
|
|
} */
|
|
),
|
|
],
|
|
exports: [RouterModule],
|
|
})
|
|
export class AppRoutingModule {}
|