From aea42344ded1708361e7e1d577e9c6aa370ad64e Mon Sep 17 00:00:00 2001
From: ludovicm67 <ludovicmuller1@gmail.com>
Date: Fri, 31 Jan 2020 12:18:19 +0100
Subject: webui: transform index and App to TypeScript

---
 webui/src/App.tsx | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 webui/src/App.tsx

(limited to 'webui/src/App.tsx')

diff --git a/webui/src/App.tsx b/webui/src/App.tsx
new file mode 100644
index 00000000..d996eed6
--- /dev/null
+++ b/webui/src/App.tsx
@@ -0,0 +1,68 @@
+import AppBar from '@material-ui/core/AppBar';
+import CssBaseline from '@material-ui/core/CssBaseline';
+import {
+  createMuiTheme,
+  ThemeProvider,
+  makeStyles,
+} from '@material-ui/core/styles';
+import Toolbar from '@material-ui/core/Toolbar';
+import React from 'react';
+import { Route, Switch } from 'react-router';
+import { Link } from 'react-router-dom';
+
+import BugQuery from './bug/BugQuery';
+import ListQuery from './list/ListQuery';
+import CurrentIdentity from './CurrentIdentity';
+
+const theme = createMuiTheme({
+  palette: {
+    primary: {
+      main: '#263238',
+    },
+  },
+});
+
+const useStyles = makeStyles(theme => ({
+  offset: {
+    ...theme.mixins.toolbar,
+  },
+  filler: {
+    flexGrow: 1,
+  },
+  appTitle: {
+    ...theme.typography.h6,
+    color: 'white',
+    textDecoration: 'none',
+    display: 'flex',
+    alignItems: 'center',
+  },
+  logo: {
+    height: '42px',
+    marginRight: theme.spacing(2),
+  },
+}));
+
+export default function App() {
+  const classes = useStyles();
+
+  return (
+    <ThemeProvider theme={theme}>
+      <CssBaseline />
+      <AppBar position="fixed" color="primary">
+        <Toolbar>
+          <Link to="/" className={classes.appTitle}>
+            <img src="logo.svg" className={classes.logo} alt="git-bug" />
+            git-bug
+          </Link>
+          <div className={classes.filler}></div>
+          <CurrentIdentity />
+        </Toolbar>
+      </AppBar>
+      <div className={classes.offset} />
+      <Switch>
+        <Route path="/" exact component={ListQuery} />
+        <Route path="/bug/:id" exact component={BugQuery} />
+      </Switch>
+    </ThemeProvider>
+  );
+}
-- 
cgit 


From b83670821cfb36de211c1d9bc077dad43496d7eb Mon Sep 17 00:00:00 2001
From: ludovicm67 <ludovicmuller1@gmail.com>
Date: Sun, 9 Feb 2020 12:55:14 +0100
Subject: webui: fix logo url

---
 webui/src/App.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'webui/src/App.tsx')

diff --git a/webui/src/App.tsx b/webui/src/App.tsx
index d996eed6..928d7350 100644
--- a/webui/src/App.tsx
+++ b/webui/src/App.tsx
@@ -51,7 +51,7 @@ export default function App() {
       <AppBar position="fixed" color="primary">
         <Toolbar>
           <Link to="/" className={classes.appTitle}>
-            <img src="logo.svg" className={classes.logo} alt="git-bug" />
+            <img src="/logo.svg" className={classes.logo} alt="git-bug" />
             git-bug
           </Link>
           <div className={classes.filler}></div>
-- 
cgit 


From 9ddcb4b09215f942cb7889f9756d426ad3c90253 Mon Sep 17 00:00:00 2001
From: Quentin Gliech <quentingliech@gmail.com>
Date: Tue, 11 Feb 2020 20:54:01 +0100
Subject: webui: force import order

---
 webui/src/App.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'webui/src/App.tsx')

diff --git a/webui/src/App.tsx b/webui/src/App.tsx
index 928d7350..6f66a6ec 100644
--- a/webui/src/App.tsx
+++ b/webui/src/App.tsx
@@ -1,18 +1,18 @@
 import AppBar from '@material-ui/core/AppBar';
 import CssBaseline from '@material-ui/core/CssBaseline';
+import Toolbar from '@material-ui/core/Toolbar';
 import {
   createMuiTheme,
   ThemeProvider,
   makeStyles,
 } from '@material-ui/core/styles';
-import Toolbar from '@material-ui/core/Toolbar';
 import React from 'react';
 import { Route, Switch } from 'react-router';
 import { Link } from 'react-router-dom';
 
+import CurrentIdentity from './CurrentIdentity';
 import BugQuery from './bug/BugQuery';
 import ListQuery from './list/ListQuery';
-import CurrentIdentity from './CurrentIdentity';
 
 const theme = createMuiTheme({
   palette: {
-- 
cgit 

