From b8c6fb6380892babff1fa348877eb0c9a14125d7 Mon Sep 17 00:00:00 2001 From: Jannis Mattheis Date: Sun, 21 Oct 2018 15:57:50 +0200 Subject: [PATCH] Move message stuff into own folder --- ui/src/Layout.tsx | 2 +- ui/src/index.tsx | 4 ++-- ui/src/inject.tsx | 4 ++-- ui/src/{component => message}/Message.tsx | 2 +- ui/src/{pages => message}/Messages.tsx | 2 +- ui/src/{stores => message}/MessagesStore.ts | 2 +- ui/src/{stores => message}/WebSocketStore.ts | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) rename ui/src/{component => message}/Message.tsx (98%) rename ui/src/{pages => message}/Messages.tsx (99%) rename ui/src/{stores => message}/MessagesStore.ts (99%) rename ui/src/{stores => message}/WebSocketStore.ts (96%) diff --git a/ui/src/Layout.tsx b/ui/src/Layout.tsx index c4ffe7c..18bf667 100644 --- a/ui/src/Layout.tsx +++ b/ui/src/Layout.tsx @@ -13,7 +13,7 @@ import * as config from './config'; import Applications from './application/Applications'; import Clients from './client/Clients'; import Login from './pages/Login'; -import Messages from './pages/Messages'; +import Messages from './message/Messages'; import Users from './pages/Users'; import {observer} from 'mobx-react'; import {observable} from 'mobx'; diff --git a/ui/src/index.tsx b/ui/src/index.tsx index 5ffe736..1405e09 100644 --- a/ui/src/index.tsx +++ b/ui/src/index.tsx @@ -10,11 +10,11 @@ import * as Notifications from './stores/Notifications'; import {CurrentUser} from './stores/CurrentUser'; import {AppStore} from './application/AppStore'; import {reaction} from 'mobx'; -import {WebSocketStore} from './stores/WebSocketStore'; +import {WebSocketStore} from './message/WebSocketStore'; import {SnackManager} from './snack/SnackManager'; import {InjectProvider, StoreMapping} from './inject'; import {UserStore} from './stores/UserStore'; -import {MessagesStore} from './stores/MessagesStore'; +import {MessagesStore} from './message/MessagesStore'; import {ClientStore} from './client/ClientStore'; const defaultDevConfig = { diff --git a/ui/src/inject.tsx b/ui/src/inject.tsx index 32bfc30..989cf9c 100644 --- a/ui/src/inject.tsx +++ b/ui/src/inject.tsx @@ -1,12 +1,12 @@ import * as React from 'react'; import {UserStore} from './stores/UserStore'; import {SnackManager} from './snack/SnackManager'; -import {MessagesStore} from './stores/MessagesStore'; +import {MessagesStore} from './message/MessagesStore'; import {CurrentUser} from './stores/CurrentUser'; import {ClientStore} from './client/ClientStore'; import {AppStore} from './application/AppStore'; import {inject as mobxInject, Provider} from 'mobx-react'; -import {WebSocketStore} from './stores/WebSocketStore'; +import {WebSocketStore} from './message/WebSocketStore'; export interface StoreMapping { userStore: UserStore; diff --git a/ui/src/component/Message.tsx b/ui/src/message/Message.tsx similarity index 98% rename from ui/src/component/Message.tsx rename to ui/src/message/Message.tsx index daeb79e..8a51b49 100644 --- a/ui/src/component/Message.tsx +++ b/ui/src/message/Message.tsx @@ -4,7 +4,7 @@ import Typography from '@material-ui/core/Typography'; import Delete from '@material-ui/icons/Delete'; import React from 'react'; import TimeAgo from 'react-timeago'; -import Container from './Container'; +import Container from '../component/Container'; const styles = () => ({ header: { diff --git a/ui/src/pages/Messages.tsx b/ui/src/message/Messages.tsx similarity index 99% rename from ui/src/pages/Messages.tsx rename to ui/src/message/Messages.tsx index f8052b8..534c10b 100644 --- a/ui/src/pages/Messages.tsx +++ b/ui/src/message/Messages.tsx @@ -4,7 +4,7 @@ import Typography from '@material-ui/core/Typography'; import React, {Component} from 'react'; import {RouteComponentProps} from 'react-router'; import DefaultPage from '../component/DefaultPage'; -import Message from '../component/Message'; +import Message from './Message'; import {observer} from 'mobx-react'; // @ts-ignore import InfiniteAnyHeight from 'react-infinite-any-height'; diff --git a/ui/src/stores/MessagesStore.ts b/ui/src/message/MessagesStore.ts similarity index 99% rename from ui/src/stores/MessagesStore.ts rename to ui/src/message/MessagesStore.ts index f248a2b..e752d7a 100644 --- a/ui/src/stores/MessagesStore.ts +++ b/ui/src/message/MessagesStore.ts @@ -1,4 +1,4 @@ -import {BaseStore} from './BaseStore'; +import {BaseStore} from '../stores/BaseStore'; import {action, IObservableArray, observable, reaction} from 'mobx'; import axios, {AxiosResponse} from 'axios'; import * as config from '../config'; diff --git a/ui/src/stores/WebSocketStore.ts b/ui/src/message/WebSocketStore.ts similarity index 96% rename from ui/src/stores/WebSocketStore.ts rename to ui/src/message/WebSocketStore.ts index 7d33262..2477cf1 100644 --- a/ui/src/stores/WebSocketStore.ts +++ b/ui/src/message/WebSocketStore.ts @@ -1,5 +1,5 @@ import {SnackReporter} from '../snack/SnackManager'; -import {CurrentUser} from './CurrentUser'; +import {CurrentUser} from '../stores/CurrentUser'; import * as config from '../config'; import {MessagesStore} from './MessagesStore';