diff --git a/webui/src/App.tsx b/webui/src/App.tsx index 3a5ef0254f131afb98316719a74e5ab0e18e880f..b9ade9740258114c868d8ce92cbd55228e26a3c1 100644 --- a/webui/src/App.tsx +++ b/webui/src/App.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Route, Switch } from 'react-router'; -import Layout from './layout'; +import Layout from './components/Header'; import BugPage from './pages/bug'; import ListPage from './pages/list'; import NewBugPage from './pages/new/NewBugPage'; diff --git a/webui/src/components/Author.tsx b/webui/src/components/Author.tsx index 9ac1da527d67ec6c32aa12ce11db8bd901d42299..d60e8969fdceb24d38c645593ad0181a350ed1ba 100644 --- a/webui/src/components/Author.tsx +++ b/webui/src/components/Author.tsx @@ -3,7 +3,7 @@ import React from 'react'; import MAvatar from '@material-ui/core/Avatar'; import Tooltip from '@material-ui/core/Tooltip/Tooltip'; -import { AuthoredFragment } from './fragments.generated'; +import { AuthoredFragment } from '../graphql/fragments.generated'; type Props = AuthoredFragment & { className?: string; diff --git a/webui/src/layout/CommentInput/CommentInput.tsx b/webui/src/components/CommentInput/CommentInput.tsx similarity index 100% rename from webui/src/layout/CommentInput/CommentInput.tsx rename to webui/src/components/CommentInput/CommentInput.tsx diff --git a/webui/src/layout/CurrentIdentity.graphql b/webui/src/components/CurrentIdentity/CurrentIdentity.graphql similarity index 100% rename from webui/src/layout/CurrentIdentity.graphql rename to webui/src/components/CurrentIdentity/CurrentIdentity.graphql diff --git a/webui/src/layout/CurrentIdentity.tsx b/webui/src/components/CurrentIdentity/CurrentIdentity.tsx similarity index 100% rename from webui/src/layout/CurrentIdentity.tsx rename to webui/src/components/CurrentIdentity/CurrentIdentity.tsx diff --git a/webui/src/layout/Header.tsx b/webui/src/components/Header/Header.tsx similarity index 94% rename from webui/src/layout/Header.tsx rename to webui/src/components/Header/Header.tsx index b0fae3cc9acf67b38845b8b07a2fe9e73dbbd5f7..3e39b5f35d7d860fdb8f99be567ef122fda965fa 100644 --- a/webui/src/layout/Header.tsx +++ b/webui/src/components/Header/Header.tsx @@ -5,7 +5,7 @@ import AppBar from '@material-ui/core/AppBar'; import Toolbar from '@material-ui/core/Toolbar'; import { makeStyles } from '@material-ui/core/styles'; -import CurrentIdentity from './CurrentIdentity'; +import CurrentIdentity from '../CurrentIdentity/CurrentIdentity'; const useStyles = makeStyles((theme) => ({ offset: { diff --git a/webui/src/layout/index.tsx b/webui/src/components/Header/index.tsx similarity index 100% rename from webui/src/layout/index.tsx rename to webui/src/components/Header/index.tsx diff --git a/webui/src/layout/IfLoggedIn.tsx b/webui/src/components/IfLoggedIn/IfLoggedIn.tsx similarity index 78% rename from webui/src/layout/IfLoggedIn.tsx rename to webui/src/components/IfLoggedIn/IfLoggedIn.tsx index 9f4a75767051f30dbf44aca6ea0e62615a048bc5..2476aad87cd4589bfaf4d05f9a34be107227f69c 100644 --- a/webui/src/layout/IfLoggedIn.tsx +++ b/webui/src/components/IfLoggedIn/IfLoggedIn.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { useCurrentIdentityQuery } from './CurrentIdentity.generated'; +import { useCurrentIdentityQuery } from '../CurrentIdentity/CurrentIdentity.generated'; type Props = { children: () => React.ReactNode }; const IfLoggedIn = ({ children }: Props) => { diff --git a/webui/src/components/Label.tsx b/webui/src/components/Label.tsx index 4aaa6bb610333b4315b103c2c3e1692fccd800a4..111f6d7ff2b46ab09a20c7430ec41bdc47452b0c 100644 --- a/webui/src/components/Label.tsx +++ b/webui/src/components/Label.tsx @@ -7,10 +7,9 @@ import { darken, } from '@material-ui/core/styles/colorManipulator'; +import { LabelFragment } from '../graphql/fragments.generated'; import { Color } from 'src/gqlTypes'; -import { LabelFragment } from './fragments.generated'; - // Minimum contrast between the background and the text color const contrastThreshold = 2.5; diff --git a/webui/src/components/fragments.graphql b/webui/src/graphql/fragments.graphql similarity index 100% rename from webui/src/components/fragments.graphql rename to webui/src/graphql/fragments.graphql diff --git a/webui/src/pages/bug/Bug.tsx b/webui/src/pages/bug/Bug.tsx index bd6e44c41fa0fa1e6c06bda2fcd5db5f9362379f..d85c52966139658fe79ef1d1d9ac7fcdc6a06401 100644 --- a/webui/src/pages/bug/Bug.tsx +++ b/webui/src/pages/bug/Bug.tsx @@ -3,8 +3,8 @@ import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; import BugTitleForm from 'src/components/BugTitleForm/BugTitleForm'; +import IfLoggedIn from 'src/components/IfLoggedIn/IfLoggedIn'; import Label from 'src/components/Label'; -import IfLoggedIn from 'src/layout/IfLoggedIn'; import { BugFragment } from './Bug.generated'; import CommentForm from './CommentForm'; diff --git a/webui/src/pages/bug/CommentForm.tsx b/webui/src/pages/bug/CommentForm.tsx index c623dabb926b9fbe58e532a1c6c99e264f7372b9..0b97e133323c732aee7b8d33078d5c0cf6111248 100644 --- a/webui/src/pages/bug/CommentForm.tsx +++ b/webui/src/pages/bug/CommentForm.tsx @@ -4,7 +4,7 @@ import Button from '@material-ui/core/Button'; import Paper from '@material-ui/core/Paper'; import { makeStyles, Theme } from '@material-ui/core/styles'; -import CommentInput from '../../layout/CommentInput/CommentInput'; +import CommentInput from '../../components/CommentInput/CommentInput'; import CloseBugButton from 'src/components/CloseBugButton/CloseBugButton'; import ReopenBugButton from 'src/components/ReopenBugButton/ReopenBugButton'; diff --git a/webui/src/pages/new/NewBugPage.tsx b/webui/src/pages/new/NewBugPage.tsx index c70cddaadf8d5e4c58717ef3da26ce9612b8715f..c9e268b6043557613f9ecb77fbd9d73a62a09e93 100644 --- a/webui/src/pages/new/NewBugPage.tsx +++ b/webui/src/pages/new/NewBugPage.tsx @@ -5,7 +5,7 @@ import Paper from '@material-ui/core/Paper'; import TextField from '@material-ui/core/TextField/TextField'; import { fade, makeStyles, Theme } from '@material-ui/core/styles'; -import CommentInput from '../../layout/CommentInput/CommentInput'; +import CommentInput from '../../components/CommentInput/CommentInput'; import { useNewBugMutation } from './NewBug.generated';