aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src
diff options
context:
space:
mode:
authorSascha <GlancingMind@outlook.com>2021-03-03 17:49:53 +0100
committerSascha <GlancingMind@outlook.com>2021-03-04 20:54:04 +0100
commit8e8ca99bd5f72de60f6e0e1b334f33312cab5388 (patch)
tree506778b24554f62f4acbba9e8faee22321a7e5bc /webui/src
parentc24b7370f484e89662283a52b66e34940f972cf6 (diff)
downloadgit-bug-8e8ca99bd5f72de60f6e0e1b334f33312cab5388.tar.gz
Use colors from theme palette
- Use theme colors for title input. - Remove inputTitle classes as they are not applied to the TextField. This will lead to double borders and artifacts at the field corners.
Diffstat (limited to 'webui/src')
-rw-r--r--webui/src/components/BugTitleForm/.BugTitleForm.tsx.swpbin0 -> 20480 bytes
-rw-r--r--webui/src/components/BugTitleForm/BugTitleForm.tsx24
-rw-r--r--webui/src/pages/list/ListQuery.tsx11
-rw-r--r--webui/src/pages/new/NewBugPage.tsx23
-rw-r--r--webui/src/themes/DefaultDark.ts5
-rw-r--r--webui/src/themes/DefaultLight.ts4
6 files changed, 19 insertions, 48 deletions
diff --git a/webui/src/components/BugTitleForm/.BugTitleForm.tsx.swp b/webui/src/components/BugTitleForm/.BugTitleForm.tsx.swp
new file mode 100644
index 00000000..125bed11
--- /dev/null
+++ b/webui/src/components/BugTitleForm/.BugTitleForm.tsx.swp
Binary files differ
diff --git a/webui/src/components/BugTitleForm/BugTitleForm.tsx b/webui/src/components/BugTitleForm/BugTitleForm.tsx
index c47eab31..97025302 100644
--- a/webui/src/components/BugTitleForm/BugTitleForm.tsx
+++ b/webui/src/components/BugTitleForm/BugTitleForm.tsx
@@ -45,26 +45,9 @@ const useStyles = makeStyles((theme) => ({
marginLeft: theme.spacing(2),
},
greenButton: {
- marginLeft: '8px',
- backgroundColor: '#2ea44fd9',
- color: '#fff',
- '&:hover': {
- backgroundColor: '#2ea44f',
- },
- },
- titleInput: {
- borderRadius: theme.shape.borderRadius,
- borderColor: fade(theme.palette.primary.main, 0.2),
- borderStyle: 'solid',
- borderWidth: '1px',
- backgroundColor: fade(theme.palette.primary.main, 0.05),
- padding: theme.spacing(0, 0),
- minWidth: 336,
- transition: theme.transitions.create([
- 'width',
- 'borderColor',
- 'backgroundColor',
- ]),
+ marginLeft: theme.spacing(1),
+ backgroundColor: theme.palette.success.main,
+ color: theme.palette.success.contrastText,
},
}));
@@ -126,7 +109,6 @@ function BugTitleForm({ bug }: Props) {
inputRef={(node) => {
issueTitleInput = node;
}}
- className={classes.titleInput}
variant="outlined"
fullWidth
margin="dense"
diff --git a/webui/src/pages/list/ListQuery.tsx b/webui/src/pages/list/ListQuery.tsx
index d4ce7f80..021f70b0 100644
--- a/webui/src/pages/list/ListQuery.tsx
+++ b/webui/src/pages/list/ListQuery.tsx
@@ -112,12 +112,9 @@ const useStyles = makeStyles<Theme, StylesProps>((theme) => ({
padding: theme.spacing(2, 3),
},
},
- greenButton: {
- backgroundColor: '#2ea44fd9',
- color: '#fff',
- '&:hover': {
- backgroundColor: '#2ea44f',
- },
+ newIssueButton: {
+ backgroundColor: theme.palette.success.main,
+ color: theme.palette.success.contrastText,
},
}));
@@ -318,7 +315,7 @@ function ListQuery() {
<IfLoggedIn>
{() => (
<Button
- className={classes.greenButton}
+ className={classes.newIssueButton}
variant="contained"
href="/new"
>
diff --git a/webui/src/pages/new/NewBugPage.tsx b/webui/src/pages/new/NewBugPage.tsx
index c9e268b6..b649fffb 100644
--- a/webui/src/pages/new/NewBugPage.tsx
+++ b/webui/src/pages/new/NewBugPage.tsx
@@ -3,7 +3,7 @@ import React, { FormEvent, useState } from 'react';
import { Button } from '@material-ui/core';
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 { makeStyles, Theme } from '@material-ui/core/styles';
import CommentInput from '../../components/CommentInput/CommentInput';
@@ -21,19 +21,6 @@ const useStyles = makeStyles((theme: Theme) => ({
padding: theme.spacing(2),
overflow: 'hidden',
},
- titleInput: {
- borderRadius: theme.shape.borderRadius,
- borderColor: fade(theme.palette.primary.main, 0.2),
- borderStyle: 'solid',
- borderWidth: '1px',
- backgroundColor: fade(theme.palette.primary.main, 0.05),
- padding: theme.spacing(0, 0),
- transition: theme.transitions.create([
- 'width',
- 'borderColor',
- 'backgroundColor',
- ]),
- },
form: {
display: 'flex',
flexDirection: 'column',
@@ -43,11 +30,8 @@ const useStyles = makeStyles((theme: Theme) => ({
justifyContent: 'flex-end',
},
greenButton: {
- backgroundColor: '#2ea44fd9',
- color: '#fff',
- '&:hover': {
- backgroundColor: '#2ea44f',
- },
+ backgroundColor: theme.palette.success.main,
+ color: theme.palette.success.contrastText,
},
}));
@@ -90,7 +74,6 @@ function NewBugPage() {
issueTitleInput = node;
}}
label="Title"
- className={classes.titleInput}
variant="outlined"
fullWidth
margin="dense"
diff --git a/webui/src/themes/DefaultDark.ts b/webui/src/themes/DefaultDark.ts
index fe31f211..77871a51 100644
--- a/webui/src/themes/DefaultDark.ts
+++ b/webui/src/themes/DefaultDark.ts
@@ -15,6 +15,11 @@ const defaultDarkTheme = createMuiTheme({
main: '#2a393e',
},
},
+ typography: {
+ button: {
+ textTransform: 'none',
+ },
+ },
});
export default defaultDarkTheme;
diff --git a/webui/src/themes/DefaultLight.ts b/webui/src/themes/DefaultLight.ts
index 898bd0bc..735600b5 100644
--- a/webui/src/themes/DefaultLight.ts
+++ b/webui/src/themes/DefaultLight.ts
@@ -10,6 +10,10 @@ const defaultLightTheme = createMuiTheme({
info: {
main: '#e2f1ff',
},
+ success: {
+ main: '#2ea44fd9',
+ contrastText: '#fff',
+ },
text: {
secondary: '#555',
},