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

331 lines
17 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 { BigBlueButtonWidgetWrapperComponent } from "./widget-wrappers/bigbluebutton/bigbluebutton.component";
import { BigBlueButtonConfigComponent } from "./configs/widget/bigbluebutton/bigbluebutton.widget.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 { 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";
import { WhiteboardWidgetComponent } from "./configs/widget/whiteboard/whiteboard.widget.component";
import { AdminHookshotGithubBridgeComponent } from "./admin/bridges/hookshot-github/hookshot-github.component";
import { HookshotGithubBridgeConfigComponent } from "./configs/bridge/hookshot-github/hookshot-github.bridge.component";
import { AdminHookshotJiraBridgeComponent } from "./admin/bridges/hookshot-jira/hookshot-jira.component";
import { HookshotJiraBridgeConfigComponent } from "./configs/bridge/hookshot-jira/hookshot-jira.bridge.component";
const routes: Routes = [
2017-08-27 01:26:00 -04:00
{path: "", component: HomeComponent},
{path: "riot", pathMatch: "full", redirectTo: "riot-app", data: {breadcrumb: "Home", name: "Dimension"}},
{path: "element", pathMatch: "full", redirectTo: "riot-app", data: {breadcrumb: "Home", name: "Dimension"}},
{
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"},
},
2018-10-24 22:56:38 -04:00
{
path: "slack",
component: AdminSlackBridgeComponent,
data: {breadcrumb: "Slack Bridge", name: "Slack Bridge"},
},
{
path: "hookshot_github",
component: AdminHookshotGithubBridgeComponent,
data: {breadcrumb: "Github Bridge", name: "Github Bridge"},
},
{
path: "hookshot_jira",
component: AdminHookshotJiraBridgeComponent,
data: {breadcrumb: "Jira Bridge", name: "Jira 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",
2021-08-16 18:07:56 -04:00
data: {breadcrumb: {skip: true}},
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
},
{
path: "bigbluebutton",
component: BigBlueButtonConfigComponent,
data: {breadcrumb: "BigBlueButton Widgets", name: "BigBlueButton Widgets"},
},
2017-12-23 15:16:05 -05:00
{
path: "etherpad",
component: EtherpadWidgetConfigComponent,
data: {breadcrumb: "Notes Widgets", name: "Notes 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"},
},
{
path: "whiteboard",
component: WhiteboardWidgetComponent,
data: {breadcrumb: "Whiteboard Widgets", name: "Whiteboard Widgets"},
},
2017-12-22 23:33:37 -05:00
],
},
{
path: "complex-bot",
data: {breadcrumb: {skip: true}},
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",
data: {breadcrumb: {skip: true}},
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: "slack",
component: SlackBridgeConfigComponent,
data: {breadcrumb: "Slack Bridge Configuration", name: "Slack Bridge Configuration"},
},
{
path: "hookshot_github",
component: HookshotGithubBridgeConfigComponent,
data: {breadcrumb: "Github Bridge Configuration", name: "Github Bridge Configuration"},
},
{
path: "hookshot_jira",
component: HookshotJiraBridgeConfigComponent,
data: {breadcrumb: "Jira Bridge Configuration", name: "Jira 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",
data: {breadcrumb: {skip: true}},
2017-12-15 01:52:36 -05:00
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: "bigbluebutton", component: BigBlueButtonWidgetWrapperComponent},
2017-12-15 01:52:36 -05:00
{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);