From 8e8ca99bd5f72de60f6e0e1b334f33312cab5388 Mon Sep 17 00:00:00 2001 From: Sascha Date: Wed, 3 Mar 2021 17:49:53 +0100 Subject: 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. --- .../components/BugTitleForm/.BugTitleForm.tsx.swp | Bin 0 -> 20480 bytes webui/src/components/BugTitleForm/BugTitleForm.tsx | 24 +++------------------ 2 files changed, 3 insertions(+), 21 deletions(-) create mode 100644 webui/src/components/BugTitleForm/.BugTitleForm.tsx.swp (limited to 'webui/src/components/BugTitleForm') 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 Binary files /dev/null and b/webui/src/components/BugTitleForm/.BugTitleForm.tsx.swp 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" -- cgit From 50484fb97efd62aceafdbb78ed575e94ff7bb1fd Mon Sep 17 00:00:00 2001 From: Sascha Date: Wed, 3 Mar 2021 18:14:37 +0100 Subject: Fix spacing between cancle and save button --- webui/src/components/BugTitleForm/.BugTitleForm.tsx.swp | Bin 20480 -> 0 bytes webui/src/components/BugTitleForm/BugTitleForm.tsx | 4 ++++ 2 files changed, 4 insertions(+) delete mode 100644 webui/src/components/BugTitleForm/.BugTitleForm.tsx.swp (limited to 'webui/src/components/BugTitleForm') diff --git a/webui/src/components/BugTitleForm/.BugTitleForm.tsx.swp b/webui/src/components/BugTitleForm/.BugTitleForm.tsx.swp deleted file mode 100644 index 125bed11..00000000 Binary files a/webui/src/components/BugTitleForm/.BugTitleForm.tsx.swp and /dev/null differ diff --git a/webui/src/components/BugTitleForm/BugTitleForm.tsx b/webui/src/components/BugTitleForm/BugTitleForm.tsx index 97025302..08a1ac90 100644 --- a/webui/src/components/BugTitleForm/BugTitleForm.tsx +++ b/webui/src/components/BugTitleForm/BugTitleForm.tsx @@ -49,6 +49,9 @@ const useStyles = makeStyles((theme) => ({ backgroundColor: theme.palette.success.main, color: theme.palette.success.contrastText, }, + saveButton: { + marginRight: theme.spacing(1), + }, })); interface Props { @@ -117,6 +120,7 @@ function BugTitleForm({ bug }: Props) { />
)} -- cgit From 07e1c45cd70554630640bb1ea25968078a36fd6c Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Fri, 19 Mar 2021 17:04:59 +0100 Subject: webui: minor code fixes --- webui/src/components/BugTitleForm/BugTitleForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'webui/src/components/BugTitleForm') diff --git a/webui/src/components/BugTitleForm/BugTitleForm.tsx b/webui/src/components/BugTitleForm/BugTitleForm.tsx index c31f8ef7..9a161443 100644 --- a/webui/src/components/BugTitleForm/BugTitleForm.tsx +++ b/webui/src/components/BugTitleForm/BugTitleForm.tsx @@ -66,7 +66,7 @@ function BugTitleForm({ bug }: Props) { function isFormValid() { if (issueTitleInput) { - return issueTitleInput.value.length > 0 ? true : false; + return issueTitleInput.value.length > 0; } else { return false; } -- cgit From d80b2ad03898eb798f8c3c95a4c10bd119691e01 Mon Sep 17 00:00:00 2001 From: Sascha Date: Sun, 28 Mar 2021 11:02:48 +0200 Subject: Prevent page reload for redirecting components Link instantly to: - NewBugPage - BackToList --- webui/src/components/BugTitleForm/BugTitleForm.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'webui/src/components/BugTitleForm') diff --git a/webui/src/components/BugTitleForm/BugTitleForm.tsx b/webui/src/components/BugTitleForm/BugTitleForm.tsx index a7d5a820..529f23a2 100644 --- a/webui/src/components/BugTitleForm/BugTitleForm.tsx +++ b/webui/src/components/BugTitleForm/BugTitleForm.tsx @@ -1,4 +1,5 @@ import React, { useState } from 'react'; +import { Link } from 'react-router-dom'; import { Button, makeStyles, Typography } from '@material-ui/core'; @@ -157,7 +158,8 @@ function BugTitleForm({ bug }: Props) { className={classes.greenButton} size="small" variant="contained" - href="/new" + component={Link} + to="/new" > New bug -- cgit