matrix-dimension/web/app/app.routing.ts

300 lines
15 KiB
TypeScript
Raw Normal View History

import { RouterModule, Routes } from "@angular/router";
import { HomeComponent } from "./home/home.component";
import { RiotComponent } from "./riot/riot.component";
import { GenericWidgetWrapperComponent } from "./widget-wrappers/generic/generic.component";
import { VideoWidgetWrapperComponent } from "./widget-wrappers/video/video.component";
import { JitsiWidgetWrapperComponent } from "./widget-wrappers/jitsi/jitsi.component";
import { GCalWidgetWrapperComponent } from "./widget-wrappers/gcal/gcal.component";
import { RiotHomeComponent } from "./riot/riot-home/home.component";
2017-12-22 23:33:37 -05:00
import { CustomWidgetConfigComponent } from "./configs/widget/custom/custom.widget.component";
2017-12-23 15:16:05 -05:00
import { EtherpadWidgetConfigComponent } from "./configs/widget/etherpad/etherpad.widget.component";
import { GoogleCalendarWidgetConfigComponent } from "./configs/widget/google-calendar/gcal.widget.component";
import { GoogleDocsWidgetConfigComponent } from "./configs/widget/google-docs/gdoc.widget.component";
2017-12-23 16:16:22 -05:00
import { JitsiWidgetConfigComponent } from "./configs/widget/jitsi/jitsi.widget.component";
2017-12-23 17:03:24 -05:00
import { TwitchWidgetConfigComponent } from "./configs/widget/twitch/twitch.widget.component";
2017-12-23 17:28:42 -05:00
import { YoutubeWidgetConfigComponent } from "./configs/widget/youtube/youtube.widget.component";
2017-12-23 20:47:41 -05:00
import { AdminComponent } from "./admin/admin.component";
import { AdminHomeComponent } from "./admin/home/home.component";
import { AdminWidgetsComponent } from "./admin/widgets/widgets.component";
import { AdminNebComponent } from "./admin/neb/neb.component";
import { AdminEditNebComponent } from "./admin/neb/edit/edit.component";
import { AdminAddSelfhostedNebComponent } from "./admin/neb/add-selfhosted/add-selfhosted.component";
import { RssComplexBotConfigComponent } from "./configs/complex-bot/rss/rss.complex-bot.component";
import { TravisCiComplexBotConfigComponent } from "./configs/complex-bot/travisci/travisci.complex-bot.component";
import { AdminBridgesComponent } from "./admin/bridges/bridges.component";
import { AdminIrcBridgeComponent } from "./admin/bridges/irc/irc.component";
import { IrcBridgeConfigComponent } from "./configs/bridge/irc/irc.bridge.component";
import { AdminStickerPacksComponent } from "./admin/sticker-packs/sticker-packs.component";
import { StickerpickerComponent } from "./configs/stickerpicker/stickerpicker.component";
import { StickerPickerWidgetWrapperComponent } from "./widget-wrappers/sticker-picker/sticker-picker.component";
import { AdminTelegramBridgeComponent } from "./admin/bridges/telegram/telegram.component";
import { TelegramBridgeConfigComponent } from "./configs/bridge/telegram/telegram.bridge.component";
import { AdminWebhooksBridgeComponent } from "./admin/bridges/webhooks/webhooks.component";
import { WebhooksBridgeConfigComponent } from "./configs/bridge/webhooks/webhooks.bridge.component";
import { AdminGitterBridgeComponent } from "./admin/bridges/gitter/gitter.component";
import { GitterBridgeConfigComponent } from "./configs/bridge/gitter/gitter.bridge.component";
import { GenericFullscreenWidgetWrapperComponent } from "./widget-wrappers/generic-fullscreen/generic-fullscreen.component";
import { GrafanaWidgetConfigComponent } from "./configs/widget/grafana/grafana.widget.component";
import { TradingViewWidgetConfigComponent } from "./configs/widget/tradingview/tradingview.widget.component";
import { TradingViewWidgetWrapperComponent } from "./widget-wrappers/tradingview/tradingview.component";
import { SpotifyWidgetConfigComponent } from "./configs/widget/spotify/spotify.widget.component";
import { SpotifyWidgetWrapperComponent } from "./widget-wrappers/spotify/spotify.component";
import { AdminCustomBotsComponent } from "./admin/custom-bots/custom-bots.component";
2018-10-24 22:56:38 -04:00
import { AdminSlackBridgeComponent } from "./admin/bridges/slack/slack.component";
import { SlackBridgeConfigComponent } from "./configs/bridge/slack/slack.bridge.component";
import { ReauthExampleWidgetWrapperComponent } from "./widget-wrappers/reauth-example/reauth-example.component";
import { ManagerTestWidgetWrapperComponent } from "./widget-wrappers/manager-test/manager-test.component";
2019-07-01 01:05:33 -04:00
import { AdminTermsComponent } from "./admin/terms/terms.component";
2019-07-06 17:19:27 -04:00
import { AdminNewEditTermsComponent } from "./admin/terms/new-edit/new-edit.component";
2019-07-06 17:40:32 -04:00
import { TermsWidgetWrapperComponent } from "./widget-wrappers/terms/terms.component";
const routes: Routes = [
2017-08-27 01:26:00 -04:00
{path: "", component: HomeComponent},
2017-12-22 23:08:10 -05:00
{path: "riot", pathMatch: "full", redirectTo: "riot-app"},
{
path: "riot-app",
component: RiotComponent,
2017-12-22 23:08:10 -05:00
data: {breadcrumb: "Home", name: "Dimension"},
children: [
{
2017-12-22 23:08:10 -05:00
path: "",
component: RiotHomeComponent,
2017-12-22 23:08:10 -05:00
},
2017-12-23 20:47:41 -05:00
{
path: "admin",
component: AdminComponent,
data: {breadcrumb: "Admin", name: "Settings"},
2017-12-23 20:47:41 -05:00
children: [
{
path: "",
component: AdminHomeComponent,
},
{
path: "widgets",
component: AdminWidgetsComponent,
data: {breadcrumb: "Widgets", name: "Widgets"},
},
{
path: "neb",
data: {breadcrumb: "go-neb", name: "go-neb configuration"},
children: [
{
path: "",
component: AdminNebComponent,
},
{
path: ":nebId/edit",
component: AdminEditNebComponent,
data: {breadcrumb: "Edit go-neb", name: "Edit go-neb"},
},
{
path: "new/selfhosted",
component: AdminAddSelfhostedNebComponent,
data: {breadcrumb: "Add self-hosted go-neb", name: "Add self-hosted go-neb"},
},
]
},
{
path: "custom-bots",
data: {breadcrumb: "Custom bots", name: "Custom bots"},
children: [
{
path: "",
component: AdminCustomBotsComponent,
}
]
},
{
path: "bridges",
data: {breadcrumb: "Bridges", name: "Bridges"},
children: [
{
path: "",
component: AdminBridgesComponent,
},
{
path: "irc",
component: AdminIrcBridgeComponent,
data: {breadcrumb: "IRC Bridge", name: "IRC Bridge"},
},
{
path: "telegram",
component: AdminTelegramBridgeComponent,
data: {breadcrumb: "Telegram Bridge", name: "Telegram Bridge"},
},
{
path: "webhooks",
component: AdminWebhooksBridgeComponent,
data: {breadcrumb: "Webhook Bridge", name: "Webhook Bridge"},
},
{
path: "gitter",
component: AdminGitterBridgeComponent,
data: {breadcrumb: "Gitter Bridge", name: "Gitter Bridge"},
},
2018-10-24 22:56:38 -04:00
{
path: "slack",
component: AdminSlackBridgeComponent,
data: {breadcrumb: "Slack Bridge", name: "Slack Bridge"},
},
],
},
{
path: "stickerpacks",
data: {breadcrumb: "Sticker Packs", name: "Sticker Packs"},
children: [
{
path: "",
component: AdminStickerPacksComponent,
},
],
2019-07-01 01:05:33 -04:00
},
{
path: "terms",
data: {breadcrumb: "Terms of Service", name: "Terms of Service"},
children: [
{
path: "",
component: AdminTermsComponent,
},
{
path: "new",
2019-07-06 17:19:27 -04:00
component: AdminNewEditTermsComponent,
data: {breadcrumb: "New policy", name: "New policy"},
},
2019-07-06 17:19:27 -04:00
{
path: "edit/:shortcode",
component: AdminNewEditTermsComponent,
data: {breadcrumb: "Edit policy", name: "Edit policy"},
},
2019-07-01 01:05:33 -04:00
],
},
2017-12-23 20:47:41 -05:00
],
},
2017-12-22 23:08:10 -05:00
{
path: "widget",
2017-12-22 23:33:37 -05:00
children: [
{
path: "custom",
component: CustomWidgetConfigComponent,
data: {breadcrumb: "Custom Widgets", name: "Custom Widgets"},
2017-12-22 23:33:37 -05:00
},
2017-12-23 15:16:05 -05:00
{
path: "etherpad",
component: EtherpadWidgetConfigComponent,
data: {breadcrumb: "Etherpad Widgets", name: "Etherpad Widgets"},
2017-12-23 15:16:05 -05:00
},
2017-12-23 15:32:07 -05:00
{
path: "googlecalendar",
component: GoogleCalendarWidgetConfigComponent,
data: {breadcrumb: "Google Calendar Widgets", name: "Google Calendar Widgets"},
2017-12-23 15:32:07 -05:00
},
2017-12-23 15:44:19 -05:00
{
path: "googledocs",
component: GoogleDocsWidgetConfigComponent,
data: {breadcrumb: "Google Doc Widgets", name: "Google Doc Widgets"},
2017-12-23 15:44:19 -05:00
},
2017-12-23 16:16:22 -05:00
{
path: "jitsi",
component: JitsiWidgetConfigComponent,
data: {breadcrumb: "Jitsi Widgets", name: "Jitsi Widgets"},
2017-12-23 16:16:22 -05:00
},
2017-12-23 17:03:24 -05:00
{
path: "twitch",
component: TwitchWidgetConfigComponent,
data: {breadcrumb: "Twitch Livestream Widgets", name: "Twitch Livestream Widgets"},
2017-12-23 17:03:24 -05:00
},
2017-12-23 17:28:42 -05:00
{
path: "youtube",
component: YoutubeWidgetConfigComponent,
data: {breadcrumb: "Youtube Video Widgets", name: "Youtube Video Widgets"},
2017-12-23 17:28:42 -05:00
},
{
path: "grafana",
component: GrafanaWidgetConfigComponent,
data: {breadcrumb: "Grafana Widgets", name: "Grafana Widgets"},
},
{
path: "tradingview",
component: TradingViewWidgetConfigComponent,
data: {breadcrumb: "TradingView Widgets", name: "TradingView Widgets"},
},
{
path: "spotify",
component: SpotifyWidgetConfigComponent,
data: {breadcrumb: "Spotify Widgets", name: "Spotify Widgets"},
},
2017-12-22 23:33:37 -05:00
],
},
{
path: "complex-bot",
children: [
{
path: "rss",
component: RssComplexBotConfigComponent,
data: {breadcrumb: "RSS Bot Configuration", name: "RSS Bot Configuration"},
},
{
path: "travisci",
component: TravisCiComplexBotConfigComponent,
data: {breadcrumb: "Travis CI Configuration", name: "Travis CI Configuration"},
},
],
},
{
path: "bridge",
children: [
{
path: "irc",
component: IrcBridgeConfigComponent,
data: {breadcrumb: "IRC Bridge Configuration", name: "IRC Bridge Configuration"},
},
{
path: "telegram",
component: TelegramBridgeConfigComponent,
data: {breadcrumb: "Telegram Bridge Configuration", name: "Telegram Bridge Configuration"},
},
{
path: "webhooks",
component: WebhooksBridgeConfigComponent,
data: {breadcrumb: "Webhook Bridge Configuration", name: "Webhook Bridge Configuration"},
},
{
path: "gitter",
component: GitterBridgeConfigComponent,
data: {breadcrumb: "Gitter Bridge Configuration", name: "Gitter Bridge Configuration"},
},
{
path: "slack",
component: SlackBridgeConfigComponent,
data: {breadcrumb: "Slack Bridge Configuration", name: "Slack Bridge Configuration"},
},
],
},
{
path: "stickerpicker",
component: StickerpickerComponent,
data: {breadcrumb: "Your Sticker Packs", name: "Your Sticker Packs"},
},
],
},
2017-12-15 01:52:36 -05:00
{
path: "widgets",
children: [
2019-07-06 17:40:32 -04:00
{path: "terms/:shortcode/:lang/:version", component: TermsWidgetWrapperComponent},
2017-12-15 01:52:36 -05:00
{path: "generic", component: GenericWidgetWrapperComponent},
{path: "video", component: VideoWidgetWrapperComponent},
{path: "jitsi", component: JitsiWidgetWrapperComponent},
{path: "gcal", component: GCalWidgetWrapperComponent},
{path: "stickerpicker", component: StickerPickerWidgetWrapperComponent},
{path: "generic-fullscreen", component: GenericFullscreenWidgetWrapperComponent},
{path: "tradingview", component: TradingViewWidgetWrapperComponent},
{path: "spotify", component: SpotifyWidgetWrapperComponent},
{path: "reauth", component: ReauthExampleWidgetWrapperComponent},
{path: "manager-test", component: ManagerTestWidgetWrapperComponent},
2017-12-15 01:52:36 -05:00
]
},
];
export const routing = RouterModule.forRoot(routes);