summaryrefslogtreecommitdiffstats
path: root/ui/src/index.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-04-10 16:55:57 -0400
committerDessalines <tyhou13@gmx.com>2020-04-10 16:55:57 -0400
commitbb287cbd076940bd09f6afb61b642370d020f91e (patch)
treef3fe3afa29b6445fbb2232a8c5a9133b8d691a91 /ui/src/index.tsx
parented264aba3c12243352f68c2de6a5f21f23778bd0 (diff)
Adding an admin settings page.
- Fixes #620 - Adding a UserListing component. Fixes #627
Diffstat (limited to 'ui/src/index.tsx')
-rw-r--r--ui/src/index.tsx116
1 files changed, 61 insertions, 55 deletions
diff --git a/ui/src/index.tsx b/ui/src/index.tsx
index c56f6c4e..8e49df9f 100644
--- a/ui/src/index.tsx
+++ b/ui/src/index.tsx
@@ -15,79 +15,85 @@ import { Communities } from './components/communities';
import { User } from './components/user';
import { Modlog } from './components/modlog';
import { Setup } from './components/setup';
+import { AdminSettings } from './components/admin-settings';
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/data_type/:data_type/listing_type/:listing_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/data_type/:data_type/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>
+ <Navbar />
+ <div class="mt-4 p-0 fl-1">
+ <Switch>
+ <Route exact path={`/`} component={Main} />
+ <Route
+ path={`/home/data_type/:data_type/listing_type/:listing_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/data_type/:data_type/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={`/admin`} component={AdminSettings} />
+ <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 />
</div>
- <Footer />
</BrowserRouter>
</Provider>
);