nise/nise-frontend/src/app/app-routing.module.ts

50 lines
2.3 KiB
TypeScript
Raw Normal View History

2024-02-14 16:43:11 +00:00
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";
2024-03-07 17:25:35 +00:00
import {ContributeComponent} from "./contribute/contribute.component";
2024-03-08 07:18:44 +00:00
import {BanlistComponent} from "./banlist/banlist.component";
2024-03-09 13:33:12 +00:00
import {ProfileComponent} from "./profile/profile.component";
2024-06-08 18:08:24 +00:00
import {ApiComponent} from "./api/api.component";
2024-06-12 12:17:19 +00:00
import {ApiPythonComponent} from "./api-python/api-python.component";
2024-06-14 23:49:36 +00:00
import {MetabaseComponent} from "./metabase/metabase.component";
2024-02-14 16:43:11 +00:00
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},
2024-03-06 14:07:12 +00:00
{path: 'c/:userReplayId', component: ViewScoreComponent},
{path: 'search', component: SearchComponent, data: { searchType: 'score' }},
{path: 'user-search', component: SearchComponent, data: { searchType: 'user' }},
2024-02-14 16:43:11 +00:00
2024-03-06 14:07:12 +00:00
{path: 'p/:replay1Id/:replay2Id', component: ViewReplayPairComponent},
2024-03-04 23:32:57 +00:00
2024-03-09 13:33:12 +00:00
{path: 'profile', component: ProfileComponent},
2024-03-08 07:18:44 +00:00
{path: 'banlist', component: BanlistComponent, title: '/ban/'},
2024-03-07 17:25:35 +00:00
{path: 'contribute', component: ContributeComponent, title: '/contribute/ <3'},
2024-03-08 08:18:10 +00:00
2024-06-10 14:52:33 +00:00
{path: 'docs', component: ApiComponent, title: '/api/ explanation'},
2024-06-12 12:17:19 +00:00
{path: 'docs/py', component: ApiPythonComponent, title: 'python lib'},
2024-06-08 18:08:24 +00:00
2024-06-14 23:49:36 +00:00
{path: 'neko', component: MetabaseComponent, title: 'metabase integration'},
2024-02-14 16:43:11 +00:00
{path: '**', component: HomeComponent, title: '/nise.moe/'},
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }