c3eaa2273a
commitf5b75f342b
Merge:bd1fc2b
69389f6
Author: Dessalines <happydooby@gmail.com> Date: Thu Jan 23 19:17:42 2020 -0500 Done merging http-api and private_message commitbd1fc2b80b
Author: Dessalines <happydooby@gmail.com> Date: Thu Jan 23 16:46:07 2020 -0500 Remove danger from private-message.tsx commit69389f61c9
Author: Dessalines <happydooby@gmail.com> Date: Thu Jan 23 11:21:21 2020 -0500 Fixing http curl POST docs. commit7fdcae4f07
Merge:dbe9ad0
752318f
Author: Dessalines <happydooby@gmail.com> Date: Thu Jan 23 11:01:06 2020 -0500 Merge remote-tracking branch 'nutomic/http-api' into dessalines-http-api commit752318fdf3
Author: Felix <me@nutomic.com> Date: Thu Jan 23 15:22:17 2020 +0100 api fixes commit9ccff18f23
Author: Dessalines <happydooby@gmail.com> Date: Wed Jan 22 22:29:11 2020 -0500 Adding a toaster to replace alerts. Fixes #457 commit5197407dd2
Merge:bacb9ac
58f673a
Author: Dessalines <happydooby@gmail.com> Date: Wed Jan 22 21:20:38 2020 -0500 Merge branch 'private_messaging' into dev commit58f673ab78
Author: Dessalines <happydooby@gmail.com> Date: Wed Jan 22 21:09:17 2020 -0500 Adding message to comment node actions. commitbacb9ac59e
Merge:10c6505
7d3adda
Author: Dessalines <happydooby@gmail.com> Date: Wed Jan 22 20:37:08 2020 -0500 Merge branch 'private_messaging' into dev commit10c6505968
Author: Dessalines <happydooby@gmail.com> Date: Wed Jan 22 20:35:20 2020 -0500 Adding correct hello_name to mail. commit7d3adda0cd
Author: Dessalines <happydooby@gmail.com> Date: Wed Jan 22 16:35:29 2020 -0500 Adding private messaging, and matrix user ids. - Fixes #244 commitdbe9ad0998
Author: Dessalines <happydooby@gmail.com> Date: Mon Jan 20 18:49:54 2020 -0500 Fixing last. commit20c9c54806
Author: Dessalines <happydooby@gmail.com> Date: Sun Jan 19 13:31:37 2020 -0500 Updating API docs. commitdc84ccaac9
Merge:6c61dd2
3edd75e
Author: Dessalines <happydooby@gmail.com> Date: Sun Jan 19 10:06:25 2020 -0500 Merge branch 'master' into dessalines-http-api commit6c61dd266b
Merge:c5eecd0
e518954
Author: Dessalines <happydooby@gmail.com> Date: Sun Jan 19 09:09:00 2020 -0500 Merge remote-tracking branch 'nutomic/websocket-generics' into dessalines-http-api commite518954bca
Author: Felix <me@nutomic.com> Date: Sun Jan 19 14:25:50 2020 +0100 Use generics to reduce code duplication in websocket commitc5eecd055e
Author: Dessalines <happydooby@gmail.com> Date: Sun Jan 19 00:38:45 2020 -0500 Strongly typing WebsocketJsonResponse. Forgot comment-form.tsx commit0c5eb47135
Author: Dessalines <happydooby@gmail.com> Date: Sat Jan 18 23:54:10 2020 -0500 First pass at fixing UI to work with new websocketresponses. commitbaf77bb6be
Author: Felix <me@nutomic.com> Date: Sat Jan 18 17:25:45 2020 +0100 simplify json serialization code commit047ec97e18
Author: Felix <me@nutomic.com> Date: Sat Jan 18 14:22:25 2020 +0100 rewrite api endpoint urls commit2fb4900b0c
Author: Felix <me@nutomic.com> Date: Thu Jan 16 17:04:37 2020 +0100 fix typo commitcba8081579
Author: Felix <me@nutomic.com> Date: Thu Jan 16 16:47:38 2020 +0100 fix formatting commitd7285d8c25
Author: Felix <me@nutomic.com> Date: Thu Jan 16 16:09:01 2020 +0100 small fix commit415040a1e9
Author: Felix <me@nutomic.com> Date: Thu Jan 16 15:39:08 2020 +0100 working! commit7a97c981a0
Author: Felix <me@nutomic.com> Date: Wed Jan 15 16:48:21 2020 +0100 try to simplify code with higher order functions commitc41082f98f
Author: Felix <me@nutomic.com> Date: Wed Jan 15 16:37:25 2020 +0100 Implement HTTP API using generics (fixes #380)
97 lines
3.7 KiB
TypeScript
Vendored
97 lines
3.7 KiB
TypeScript
Vendored
import { render, Component } from 'inferno';
|
|
import { BrowserRouter, Route, Switch } from 'inferno-router';
|
|
import { Provider } from 'inferno-i18next';
|
|
import { Main } from './components/main';
|
|
import { Navbar } from './components/navbar';
|
|
import { Footer } from './components/footer';
|
|
import { Login } from './components/login';
|
|
import { CreatePost } from './components/create-post';
|
|
import { CreateCommunity } from './components/create-community';
|
|
import { CreatePrivateMessage } from './components/create-private-message';
|
|
import { PasswordChange } from './components/password_change';
|
|
import { Post } from './components/post';
|
|
import { Community } from './components/community';
|
|
import { Communities } from './components/communities';
|
|
import { User } from './components/user';
|
|
import { Modlog } from './components/modlog';
|
|
import { Setup } from './components/setup';
|
|
import { Inbox } from './components/inbox';
|
|
import { Search } from './components/search';
|
|
import { Sponsors } from './components/sponsors';
|
|
import { Symbols } from './components/symbols';
|
|
import { i18n } from './i18next';
|
|
|
|
import { WebSocketService, UserService } from './services';
|
|
|
|
const container = document.getElementById('app');
|
|
|
|
class Index extends Component<any, any> {
|
|
constructor(props: any, context: any) {
|
|
super(props, context);
|
|
WebSocketService.Instance;
|
|
UserService.Instance;
|
|
}
|
|
|
|
render() {
|
|
return (
|
|
<Provider i18next={i18n}>
|
|
<BrowserRouter>
|
|
<Navbar />
|
|
<div class="mt-4 p-0 fl-1">
|
|
<Switch>
|
|
<Route exact path={`/`} component={Main} />
|
|
<Route
|
|
path={`/home/type/:type/sort/:sort/page/:page`}
|
|
component={Main}
|
|
/>
|
|
<Route path={`/login`} component={Login} />
|
|
<Route path={`/create_post`} component={CreatePost} />
|
|
<Route path={`/create_community`} component={CreateCommunity} />
|
|
<Route
|
|
path={`/create_private_message`}
|
|
component={CreatePrivateMessage}
|
|
/>
|
|
<Route path={`/communities/page/:page`} component={Communities} />
|
|
<Route path={`/communities`} component={Communities} />
|
|
<Route path={`/post/:id/comment/:comment_id`} component={Post} />
|
|
<Route path={`/post/:id`} component={Post} />
|
|
<Route
|
|
path={`/c/:name/sort/:sort/page/:page`}
|
|
component={Community}
|
|
/>
|
|
<Route path={`/community/:id`} component={Community} />
|
|
<Route path={`/c/:name`} component={Community} />
|
|
<Route
|
|
path={`/u/:username/view/:view/sort/:sort/page/:page`}
|
|
component={User}
|
|
/>
|
|
<Route path={`/user/:id`} component={User} />
|
|
<Route path={`/u/:username`} component={User} />
|
|
<Route path={`/inbox`} component={Inbox} />
|
|
<Route
|
|
path={`/modlog/community/:community_id`}
|
|
component={Modlog}
|
|
/>
|
|
<Route path={`/modlog`} component={Modlog} />
|
|
<Route path={`/setup`} component={Setup} />
|
|
<Route
|
|
path={`/search/q/:q/type/:type/sort/:sort/page/:page`}
|
|
component={Search}
|
|
/>
|
|
<Route path={`/search`} component={Search} />
|
|
<Route path={`/sponsors`} component={Sponsors} />
|
|
<Route
|
|
path={`/password_change/:token`}
|
|
component={PasswordChange}
|
|
/>
|
|
</Switch>
|
|
<Symbols />
|
|
</div>
|
|
<Footer />
|
|
</BrowserRouter>
|
|
</Provider>
|
|
);
|
|
}
|
|
}
|
|
|
|
render(<Index />, container);
|