50 lines
2.3 KiB
TypeScript
50 lines
2.3 KiB
TypeScript
import { NgModule } from '@angular/core';
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
import {HomeComponent} from "./home/home.component";
|
|
import {ViewSuspiciousScoresComponent} from "./view-suspicious-scores/view-suspicious-scores.component";
|
|
import {ViewSimilarReplaysComponent} from "./view-similar-replays/view-similar-replays.component";
|
|
import {ViewScoreComponent} from "./view-score/view-score.component";
|
|
import {ViewUserComponent} from "./view-user/view-user.component";
|
|
import {ViewReplayPairComponent} from "./view-replay-pair/view-replay-pair.component";
|
|
import {SearchComponent} from "./search/search.component";
|
|
import {ContributeComponent} from "./contribute/contribute.component";
|
|
import {BanlistComponent} from "./banlist/banlist.component";
|
|
import {ProfileComponent} from "./profile/profile.component";
|
|
import {ApiComponent} from "./api/api.component";
|
|
import {ApiPythonComponent} from "./api-python/api-python.component";
|
|
import {MetabaseComponent} from "./metabase/metabase.component";
|
|
|
|
const routes: Routes = [
|
|
{path: 'sus/:f', component: ViewSuspiciousScoresComponent, title: '/sus/'},
|
|
{path: 'sus', component: ViewSuspiciousScoresComponent, title: '/sus/'},
|
|
|
|
{path: 'stolen', component: ViewSimilarReplaysComponent, title: '/nu/'},
|
|
{path: 'stolen/:f', component: ViewSimilarReplaysComponent, title: '/nu/'},
|
|
|
|
{path: 'u/:userId', component: ViewUserComponent},
|
|
{path: 's/:replayId', component: ViewScoreComponent},
|
|
{path: 'c/:userReplayId', component: ViewScoreComponent},
|
|
|
|
{path: 'search', component: SearchComponent, data: { searchType: 'score' }},
|
|
{path: 'user-search', component: SearchComponent, data: { searchType: 'user' }},
|
|
|
|
{path: 'p/:replay1Id/:replay2Id', component: ViewReplayPairComponent},
|
|
|
|
{path: 'profile', component: ProfileComponent},
|
|
{path: 'banlist', component: BanlistComponent, title: '/ban/'},
|
|
{path: 'contribute', component: ContributeComponent, title: '/contribute/ <3'},
|
|
|
|
{path: 'docs', component: ApiComponent, title: '/api/ explanation'},
|
|
{path: 'docs/py', component: ApiPythonComponent, title: 'python lib'},
|
|
|
|
{path: 'neko', component: MetabaseComponent, title: 'metabase integration'},
|
|
|
|
{path: '**', component: HomeComponent, title: '/nise.stedos.dev/'},
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forRoot(routes)],
|
|
exports: [RouterModule]
|
|
})
|
|
export class AppRoutingModule { }
|