mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-13 12:05:02 +03:00
webui: upgrade Material UI
This commit is contained in:
parent
b0eb041e57
commit
fd17d6dd1f
1177
webui/package-lock.json
generated
1177
webui/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -5,10 +5,12 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apollo/client": "^3.5.9",
|
"@apollo/client": "^3.5.9",
|
||||||
"@arrows/composition": "^1.2.2",
|
"@arrows/composition": "^1.2.2",
|
||||||
"@material-ui/core": "^4.12.3",
|
"@emotion/react": "^11.8.1",
|
||||||
"@material-ui/icons": "^4.11.2",
|
"@emotion/styled": "^11.8.1",
|
||||||
"@material-ui/lab": "^4.0.0-alpha.60",
|
"@mui/icons-material": "^5.4.2",
|
||||||
"@material-ui/styles": "^4.10.0",
|
"@mui/lab": "^5.0.0-alpha.70",
|
||||||
|
"@mui/material": "^5.4.3",
|
||||||
|
"@mui/styles": "^5.4.2",
|
||||||
"@types/node": "^17.0.18",
|
"@types/node": "^17.0.18",
|
||||||
"@types/react": "^17.0.39",
|
"@types/react": "^17.0.39",
|
||||||
"@types/react-dom": "^17.0.11",
|
"@types/react-dom": "^17.0.11",
|
||||||
|
@ -6,6 +6,12 @@ const client = new ApolloClient({
|
|||||||
uri: '/graphql',
|
uri: '/graphql',
|
||||||
cache: new InMemoryCache({
|
cache: new InMemoryCache({
|
||||||
possibleTypes: introspectionResult.possibleTypes,
|
possibleTypes: introspectionResult.possibleTypes,
|
||||||
|
typePolicies: {
|
||||||
|
// TODO: For now, we only query the default repository, so consider it as a singleton
|
||||||
|
Repository: {
|
||||||
|
keyFields: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
|
import MAvatar from '@mui/material/Avatar';
|
||||||
|
import Link from '@mui/material/Link';
|
||||||
|
import Tooltip from '@mui/material/Tooltip/Tooltip';
|
||||||
import { Link as RouterLink } from 'react-router-dom';
|
import { Link as RouterLink } from 'react-router-dom';
|
||||||
|
|
||||||
import MAvatar from '@material-ui/core/Avatar';
|
|
||||||
import Link from '@material-ui/core/Link';
|
|
||||||
import Tooltip from '@material-ui/core/Tooltip/Tooltip';
|
|
||||||
|
|
||||||
import { AuthoredFragment } from '../graphql/fragments.generated';
|
import { AuthoredFragment } from '../graphql/fragments.generated';
|
||||||
|
|
||||||
type Props = AuthoredFragment & {
|
type Props = AuthoredFragment & {
|
||||||
@ -14,7 +13,12 @@ type Props = AuthoredFragment & {
|
|||||||
const Author = ({ author, ...props }: Props) => {
|
const Author = ({ author, ...props }: Props) => {
|
||||||
return (
|
return (
|
||||||
<Tooltip title={`Goto the ${author.displayName}'s profile.`}>
|
<Tooltip title={`Goto the ${author.displayName}'s profile.`}>
|
||||||
<Link {...props} component={RouterLink} to={`/user/${author.id}`}>
|
<Link
|
||||||
|
{...props}
|
||||||
|
component={RouterLink}
|
||||||
|
to={`/user/${author.id}`}
|
||||||
|
underline="hover"
|
||||||
|
>
|
||||||
{author.displayName}
|
{author.displayName}
|
||||||
</Link>
|
</Link>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
|
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
|
||||||
|
import Button from '@mui/material/Button';
|
||||||
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
import Button from '@material-ui/core/Button';
|
|
||||||
import { makeStyles } from '@material-ui/core/styles';
|
|
||||||
import ArrowBackIcon from '@material-ui/icons/ArrowBack';
|
|
||||||
|
|
||||||
const useStyles = makeStyles((theme) => ({
|
const useStyles = makeStyles((theme) => ({
|
||||||
backButton: {
|
backButton: {
|
||||||
position: 'sticky',
|
position: 'sticky',
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { useState } from 'react';
|
import { Button, Typography } from '@mui/material';
|
||||||
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
|
import { useRef, useState } from 'react';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
import { Button, makeStyles, Typography } from '@material-ui/core';
|
|
||||||
|
|
||||||
import { TimelineDocument } from '../../pages/bug/TimelineQuery.generated';
|
import { TimelineDocument } from '../../pages/bug/TimelineQuery.generated';
|
||||||
import IfLoggedIn from '../IfLoggedIn/IfLoggedIn';
|
import IfLoggedIn from '../IfLoggedIn/IfLoggedIn';
|
||||||
import Author from 'src/components/Author';
|
import Author from 'src/components/Author';
|
||||||
@ -71,11 +71,11 @@ function BugTitleForm({ bug }: Props) {
|
|||||||
const [setTitle, { loading, error }] = useSetTitleMutation();
|
const [setTitle, { loading, error }] = useSetTitleMutation();
|
||||||
const [issueTitle, setIssueTitle] = useState(bug.title);
|
const [issueTitle, setIssueTitle] = useState(bug.title);
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
let issueTitleInput: any;
|
const issueTitleInput = useRef<HTMLInputElement>();
|
||||||
|
|
||||||
function isFormValid() {
|
function isFormValid() {
|
||||||
if (issueTitleInput) {
|
if (issueTitleInput.current) {
|
||||||
return issueTitleInput.value.length > 0;
|
return issueTitleInput.current.value.length > 0;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -83,7 +83,7 @@ function BugTitleForm({ bug }: Props) {
|
|||||||
|
|
||||||
function submitNewTitle() {
|
function submitNewTitle() {
|
||||||
if (!isFormValid()) return;
|
if (!isFormValid()) return;
|
||||||
if (bug.title === issueTitleInput.value) {
|
if (bug.title === issueTitleInput.current?.value) {
|
||||||
cancelChange();
|
cancelChange();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -91,7 +91,7 @@ function BugTitleForm({ bug }: Props) {
|
|||||||
variables: {
|
variables: {
|
||||||
input: {
|
input: {
|
||||||
prefix: bug.id,
|
prefix: bug.id,
|
||||||
title: issueTitleInput.value,
|
title: issueTitleInput.current!!.value,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
refetchQueries: [
|
refetchQueries: [
|
||||||
@ -117,9 +117,7 @@ function BugTitleForm({ bug }: Props) {
|
|||||||
return (
|
return (
|
||||||
<form className={classes.headerTitle}>
|
<form className={classes.headerTitle}>
|
||||||
<BugTitleInput
|
<BugTitleInput
|
||||||
inputRef={(node) => {
|
inputRef={issueTitleInput}
|
||||||
issueTitleInput = node;
|
|
||||||
}}
|
|
||||||
label="Title"
|
label="Title"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
fullWidth
|
fullWidth
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
import { createStyles, fade, withStyles, TextField } from '@material-ui/core';
|
import { alpha, TextField } from '@mui/material';
|
||||||
import { Theme } from '@material-ui/core/styles';
|
import { Theme } from '@mui/material/styles';
|
||||||
|
import createStyles from '@mui/styles/createStyles';
|
||||||
|
import withStyles from '@mui/styles/withStyles';
|
||||||
|
|
||||||
const BugTitleInput = withStyles((theme: Theme) =>
|
const BugTitleInput = withStyles((theme: Theme) =>
|
||||||
createStyles({
|
createStyles({
|
||||||
@ -14,7 +16,7 @@ const BugTitleInput = withStyles((theme: Theme) =>
|
|||||||
},
|
},
|
||||||
'& input:valid:hover + fieldset': {
|
'& input:valid:hover + fieldset': {
|
||||||
color: theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
borderColor: fade(theme.palette.divider, 0.3),
|
borderColor: alpha(theme.palette.divider, 0.3),
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
},
|
},
|
||||||
'& input:valid:focus + fieldset': {
|
'& input:valid:focus + fieldset': {
|
||||||
|
@ -1,20 +1,12 @@
|
|||||||
import Button from '@material-ui/core/Button';
|
import ErrorOutlineIcon from '@mui/icons-material/ErrorOutline';
|
||||||
import CircularProgress from '@material-ui/core/CircularProgress';
|
import Button from '@mui/material/Button';
|
||||||
import { makeStyles, Theme } from '@material-ui/core/styles';
|
import CircularProgress from '@mui/material/CircularProgress';
|
||||||
import ErrorOutlineIcon from '@material-ui/icons/ErrorOutline';
|
|
||||||
|
|
||||||
import { BugFragment } from 'src/pages/bug/Bug.generated';
|
import { BugFragment } from 'src/pages/bug/Bug.generated';
|
||||||
import { TimelineDocument } from 'src/pages/bug/TimelineQuery.generated';
|
import { TimelineDocument } from 'src/pages/bug/TimelineQuery.generated';
|
||||||
|
|
||||||
import { useCloseBugMutation } from './CloseBug.generated';
|
import { useCloseBugMutation } from './CloseBug.generated';
|
||||||
|
|
||||||
const useStyles = makeStyles((theme: Theme) => ({
|
|
||||||
closeIssueIcon: {
|
|
||||||
color: theme.palette.secondary.dark,
|
|
||||||
paddingTop: '0.1rem',
|
|
||||||
},
|
|
||||||
}));
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
bug: BugFragment;
|
bug: BugFragment;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
@ -22,7 +14,6 @@ interface Props {
|
|||||||
|
|
||||||
function CloseBugButton({ bug, disabled }: Props) {
|
function CloseBugButton({ bug, disabled }: Props) {
|
||||||
const [closeBug, { loading, error }] = useCloseBugMutation();
|
const [closeBug, { loading, error }] = useCloseBugMutation();
|
||||||
const classes = useStyles();
|
|
||||||
|
|
||||||
function closeBugAction() {
|
function closeBugAction() {
|
||||||
closeBug({
|
closeBug({
|
||||||
@ -54,7 +45,7 @@ function CloseBugButton({ bug, disabled }: Props) {
|
|||||||
variant="contained"
|
variant="contained"
|
||||||
onClick={() => closeBugAction()}
|
onClick={() => closeBugAction()}
|
||||||
disabled={bug.status === 'CLOSED' || disabled}
|
disabled={bug.status === 'CLOSED' || disabled}
|
||||||
startIcon={<ErrorOutlineIcon className={classes.closeIssueIcon} />}
|
startIcon={<ErrorOutlineIcon />}
|
||||||
>
|
>
|
||||||
Close bug
|
Close bug
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -1,20 +1,12 @@
|
|||||||
import Button from '@material-ui/core/Button';
|
import ErrorOutlineIcon from '@mui/icons-material/ErrorOutline';
|
||||||
import CircularProgress from '@material-ui/core/CircularProgress';
|
import Button from '@mui/material/Button';
|
||||||
import { makeStyles, Theme } from '@material-ui/core/styles';
|
import CircularProgress from '@mui/material/CircularProgress';
|
||||||
import ErrorOutlineIcon from '@material-ui/icons/ErrorOutline';
|
|
||||||
|
|
||||||
import { BugFragment } from 'src/pages/bug/Bug.generated';
|
import { BugFragment } from 'src/pages/bug/Bug.generated';
|
||||||
import { TimelineDocument } from 'src/pages/bug/TimelineQuery.generated';
|
import { TimelineDocument } from 'src/pages/bug/TimelineQuery.generated';
|
||||||
|
|
||||||
import { useAddCommentAndCloseBugMutation } from './CloseBugWithComment.generated';
|
import { useAddCommentAndCloseBugMutation } from './CloseBugWithComment.generated';
|
||||||
|
|
||||||
const useStyles = makeStyles((theme: Theme) => ({
|
|
||||||
closeIssueIcon: {
|
|
||||||
color: theme.palette.secondary.dark,
|
|
||||||
paddingTop: '0.1rem',
|
|
||||||
},
|
|
||||||
}));
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
bug: BugFragment;
|
bug: BugFragment;
|
||||||
comment: string;
|
comment: string;
|
||||||
@ -24,7 +16,6 @@ interface Props {
|
|||||||
function CloseBugWithCommentButton({ bug, comment, postClick }: Props) {
|
function CloseBugWithCommentButton({ bug, comment, postClick }: Props) {
|
||||||
const [addCommentAndCloseBug, { loading, error }] =
|
const [addCommentAndCloseBug, { loading, error }] =
|
||||||
useAddCommentAndCloseBugMutation();
|
useAddCommentAndCloseBugMutation();
|
||||||
const classes = useStyles();
|
|
||||||
|
|
||||||
function addCommentAndCloseBugAction() {
|
function addCommentAndCloseBugAction() {
|
||||||
addCommentAndCloseBug({
|
addCommentAndCloseBug({
|
||||||
@ -60,7 +51,7 @@ function CloseBugWithCommentButton({ bug, comment, postClick }: Props) {
|
|||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
onClick={() => addCommentAndCloseBugAction()}
|
onClick={() => addCommentAndCloseBugAction()}
|
||||||
startIcon={<ErrorOutlineIcon className={classes.closeIssueIcon} />}
|
startIcon={<ErrorOutlineIcon />}
|
||||||
>
|
>
|
||||||
Close bug with comment
|
Close bug with comment
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
import { useState, useEffect } from 'react';
|
import { Typography } from '@mui/material';
|
||||||
|
import Tab from '@mui/material/Tab';
|
||||||
|
import Tabs from '@mui/material/Tabs';
|
||||||
|
import TextField from '@mui/material/TextField';
|
||||||
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
import { useState, useEffect } from 'react';
|
||||||
import { Typography } from '@material-ui/core';
|
|
||||||
import Tab from '@material-ui/core/Tab';
|
|
||||||
import Tabs from '@material-ui/core/Tabs';
|
|
||||||
import TextField from '@material-ui/core/TextField';
|
|
||||||
import { makeStyles } from '@material-ui/core/styles';
|
|
||||||
|
|
||||||
import Content from '../Content';
|
import Content from '../Content';
|
||||||
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
import { makeStyles } from '@material-ui/core/styles';
|
|
||||||
|
|
||||||
const useStyles = makeStyles((theme) => ({
|
const useStyles = makeStyles((theme) => ({
|
||||||
tag: {
|
tag: {
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import { makeStyles } from '@material-ui/core/styles';
|
|
||||||
|
|
||||||
const useStyles = makeStyles((theme) => ({
|
const useStyles = makeStyles((theme) => ({
|
||||||
tag: {
|
tag: {
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
|
import { makeStyles } from '@mui/styles';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import { makeStyles } from '@material-ui/styles';
|
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles({
|
||||||
tag: {
|
tag: {
|
||||||
maxWidth: '100%',
|
maxWidth: '100%',
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
|
import { makeStyles } from '@mui/styles';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import { makeStyles } from '@material-ui/styles';
|
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles({
|
||||||
tag: {
|
tag: {
|
||||||
maxWidth: '100%',
|
maxWidth: '100%',
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
|
import Tooltip from '@mui/material/Tooltip/Tooltip';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import Moment from 'react-moment';
|
import Moment from 'react-moment';
|
||||||
|
|
||||||
import Tooltip from '@material-ui/core/Tooltip/Tooltip';
|
|
||||||
|
|
||||||
const HOUR = 1000 * 3600;
|
const HOUR = 1000 * 3600;
|
||||||
const DAY = 24 * HOUR;
|
const DAY = 24 * HOUR;
|
||||||
const WEEK = 7 * DAY;
|
const WEEK = 7 * DAY;
|
||||||
@ -10,7 +9,9 @@ const WEEK = 7 * DAY;
|
|||||||
type Props = { date: string };
|
type Props = { date: string };
|
||||||
const Date = ({ date }: Props) => (
|
const Date = ({ date }: Props) => (
|
||||||
<Tooltip title={moment(date).format('LLLL')}>
|
<Tooltip title={moment(date).format('LLLL')}>
|
||||||
<Moment date={date} format="on ll" fromNowDuring={WEEK} />
|
<span>
|
||||||
|
<Moment date={date} format="on ll" fromNowDuring={WEEK} />
|
||||||
|
</span>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
|
import AppBar from '@mui/material/AppBar';
|
||||||
|
import Tab, { TabProps } from '@mui/material/Tab';
|
||||||
|
import Tabs from '@mui/material/Tabs';
|
||||||
|
import Toolbar from '@mui/material/Toolbar';
|
||||||
|
import Tooltip from '@mui/material/Tooltip/Tooltip';
|
||||||
|
import { alpha } from '@mui/material/styles';
|
||||||
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
import { Link, useLocation } from 'react-router-dom';
|
import { Link, useLocation } from 'react-router-dom';
|
||||||
|
|
||||||
import AppBar from '@material-ui/core/AppBar';
|
|
||||||
import Tab, { TabProps } from '@material-ui/core/Tab';
|
|
||||||
import Tabs from '@material-ui/core/Tabs';
|
|
||||||
import Toolbar from '@material-ui/core/Toolbar';
|
|
||||||
import Tooltip from '@material-ui/core/Tooltip/Tooltip';
|
|
||||||
import { fade, makeStyles } from '@material-ui/core/styles';
|
|
||||||
|
|
||||||
import CurrentIdentity from '../Identity/CurrentIdentity';
|
import CurrentIdentity from '../Identity/CurrentIdentity';
|
||||||
import { LightSwitch } from '../Themer';
|
import { LightSwitch } from '../Themer';
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ const useStyles = makeStyles((theme) => ({
|
|||||||
},
|
},
|
||||||
lightSwitch: {
|
lightSwitch: {
|
||||||
marginRight: '20px',
|
marginRight: '20px',
|
||||||
color: fade(theme.palette.primary.contrastText, 0.5),
|
color: alpha(theme.palette.primary.contrastText, 0.5),
|
||||||
},
|
},
|
||||||
logo: {
|
logo: {
|
||||||
height: '42px',
|
height: '42px',
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
|
import CssBaseline from '@mui/material/CssBaseline';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import CssBaseline from '@material-ui/core/CssBaseline';
|
|
||||||
|
|
||||||
import Header from './Header';
|
import Header from './Header';
|
||||||
|
|
||||||
type Props = { children: React.ReactNode };
|
type Props = { children: React.ReactNode };
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
import { useState, useRef } from 'react';
|
import LockIcon from '@mui/icons-material/Lock';
|
||||||
import { Link as RouterLink } from 'react-router-dom';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
ClickAwayListener,
|
ClickAwayListener,
|
||||||
@ -10,10 +8,11 @@ import {
|
|||||||
MenuList,
|
MenuList,
|
||||||
Paper,
|
Paper,
|
||||||
Popper,
|
Popper,
|
||||||
} from '@material-ui/core';
|
} from '@mui/material';
|
||||||
import Avatar from '@material-ui/core/Avatar';
|
import Avatar from '@mui/material/Avatar';
|
||||||
import { makeStyles } from '@material-ui/core/styles';
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
import LockIcon from '@material-ui/icons/Lock';
|
import { useState, useRef } from 'react';
|
||||||
|
import { Link as RouterLink } from 'react-router-dom';
|
||||||
|
|
||||||
import { useCurrentIdentityQuery } from './CurrentIdentity.generated';
|
import { useCurrentIdentityQuery } from './CurrentIdentity.generated';
|
||||||
|
|
||||||
@ -97,6 +96,7 @@ const CurrentIdentity = () => {
|
|||||||
className={classes.profileLink}
|
className={classes.profileLink}
|
||||||
component={RouterLink}
|
component={RouterLink}
|
||||||
to={`/user/${user.id}`}
|
to={`/user/${user.id}`}
|
||||||
|
underline="hover"
|
||||||
>
|
>
|
||||||
Open profile
|
Open profile
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
import { Chip } from '@material-ui/core';
|
import { Chip } from '@mui/material';
|
||||||
import { common } from '@material-ui/core/colors';
|
import { common } from '@mui/material/colors';
|
||||||
import {
|
import { darken, getContrastRatio } from '@mui/material/styles';
|
||||||
darken,
|
|
||||||
getContrastRatio,
|
|
||||||
} from '@material-ui/core/styles/colorManipulator';
|
|
||||||
|
|
||||||
import { Color } from '../gqlTypes';
|
import { Color } from '../gqlTypes';
|
||||||
import { LabelFragment } from '../graphql/fragments.generated';
|
import { LabelFragment } from '../graphql/fragments.generated';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import Button from '@material-ui/core/Button';
|
import Button from '@mui/material/Button';
|
||||||
import CircularProgress from '@material-ui/core/CircularProgress';
|
import CircularProgress from '@mui/material/CircularProgress';
|
||||||
|
|
||||||
import { BugFragment } from 'src/pages/bug/Bug.generated';
|
import { BugFragment } from 'src/pages/bug/Bug.generated';
|
||||||
import { TimelineDocument } from 'src/pages/bug/TimelineQuery.generated';
|
import { TimelineDocument } from 'src/pages/bug/TimelineQuery.generated';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import Button from '@material-ui/core/Button';
|
import Button from '@mui/material/Button';
|
||||||
import CircularProgress from '@material-ui/core/CircularProgress';
|
import CircularProgress from '@mui/material/CircularProgress';
|
||||||
|
|
||||||
import { BugFragment } from 'src/pages/bug/Bug.generated';
|
import { BugFragment } from 'src/pages/bug/Bug.generated';
|
||||||
import { TimelineDocument } from 'src/pages/bug/TimelineQuery.generated';
|
import { TimelineDocument } from 'src/pages/bug/TimelineQuery.generated';
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
import { createContext, useContext, useState } from 'react';
|
import { NightsStayRounded, WbSunnyRounded } from '@mui/icons-material';
|
||||||
|
import { ThemeProvider, StyledEngineProvider } from '@mui/material';
|
||||||
|
import IconButton from '@mui/material/IconButton';
|
||||||
|
import Tooltip from '@mui/material/Tooltip';
|
||||||
|
import { Theme } from '@mui/material/styles';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
import { createContext, useContext, useState } from 'react';
|
||||||
|
|
||||||
import { ThemeProvider } from '@material-ui/core';
|
declare module '@mui/styles/defaultTheme' {
|
||||||
import IconButton from '@material-ui/core/IconButton';
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||||
import Tooltip from '@material-ui/core/Tooltip';
|
interface DefaultTheme extends Theme {}
|
||||||
import { Theme } from '@material-ui/core/styles';
|
}
|
||||||
import { NightsStayRounded, WbSunnyRounded } from '@material-ui/icons';
|
|
||||||
|
|
||||||
const ThemeContext = createContext({
|
const ThemeContext = createContext({
|
||||||
toggleMode: () => {},
|
toggleMode: () => {},
|
||||||
@ -26,6 +30,7 @@ const LightSwitch = ({ className }: LightSwitchProps) => {
|
|||||||
onClick={toggleMode}
|
onClick={toggleMode}
|
||||||
aria-label={description}
|
aria-label={description}
|
||||||
className={className}
|
className={className}
|
||||||
|
size="large"
|
||||||
>
|
>
|
||||||
{mode === 'light' ? <WbSunnyRounded /> : <NightsStayRounded />}
|
{mode === 'light' ? <WbSunnyRounded /> : <NightsStayRounded />}
|
||||||
</IconButton>
|
</IconButton>
|
||||||
@ -53,7 +58,9 @@ const Themer = ({ children, lightTheme, darkTheme }: Props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ThemeContext.Provider value={{ toggleMode: toggleMode, mode: mode }}>
|
<ThemeContext.Provider value={{ toggleMode: toggleMode, mode: mode }}>
|
||||||
<ThemeProvider theme={preferedTheme}>{children}</ThemeProvider>
|
<StyledEngineProvider injectFirst>
|
||||||
|
<ThemeProvider theme={preferedTheme}>{children}</ThemeProvider>
|
||||||
|
</StyledEngineProvider>
|
||||||
</ThemeContext.Provider>
|
</ThemeContext.Provider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { makeStyles } from '@material-ui/core/styles';
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
|
|
||||||
import BugTitleForm from 'src/components/BugTitleForm/BugTitleForm';
|
import BugTitleForm from 'src/components/BugTitleForm/BugTitleForm';
|
||||||
import IfLoggedIn from 'src/components/IfLoggedIn/IfLoggedIn';
|
import IfLoggedIn from 'src/components/IfLoggedIn/IfLoggedIn';
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
|
import CircularProgress from '@mui/material/CircularProgress';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from 'react-router-dom';
|
||||||
|
|
||||||
import CircularProgress from '@material-ui/core/CircularProgress';
|
|
||||||
|
|
||||||
import NotFoundPage from '../notfound/NotFoundPage';
|
import NotFoundPage from '../notfound/NotFoundPage';
|
||||||
|
|
||||||
import Bug from './Bug';
|
import Bug from './Bug';
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { useState, useRef } from 'react';
|
import Button from '@mui/material/Button';
|
||||||
|
import Paper from '@mui/material/Paper';
|
||||||
|
import { Theme } from '@mui/material/styles';
|
||||||
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
import { useState, useRef } from 'react';
|
||||||
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 '../../components/CommentInput/CommentInput';
|
import CommentInput from '../../components/CommentInput/CommentInput';
|
||||||
import CloseBugButton from 'src/components/CloseBugButton';
|
import CloseBugButton from 'src/components/CloseBugButton';
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { useState, useRef } from 'react';
|
import Button from '@mui/material/Button';
|
||||||
|
import Paper from '@mui/material/Paper';
|
||||||
|
import { Theme } from '@mui/material/styles';
|
||||||
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
import { useState, useRef } from 'react';
|
||||||
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 '../../components/CommentInput/CommentInput';
|
import CommentInput from '../../components/CommentInput/CommentInput';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Typography } from '@material-ui/core';
|
import { Typography } from '@mui/material';
|
||||||
import { makeStyles } from '@material-ui/core/styles';
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
|
|
||||||
import Author from 'src/components/Author';
|
import Author from 'src/components/Author';
|
||||||
import Date from 'src/components/Date';
|
import Date from 'src/components/Date';
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
import { useState } from 'react';
|
import EditIcon from '@mui/icons-material/Edit';
|
||||||
|
import HistoryIcon from '@mui/icons-material/History';
|
||||||
|
import IconButton from '@mui/material/IconButton';
|
||||||
|
import Paper from '@mui/material/Paper';
|
||||||
|
import Tooltip from '@mui/material/Tooltip/Tooltip';
|
||||||
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
import { useState } from 'react';
|
||||||
import IconButton from '@material-ui/core/IconButton';
|
|
||||||
import Paper from '@material-ui/core/Paper';
|
|
||||||
import Tooltip from '@material-ui/core/Tooltip/Tooltip';
|
|
||||||
import { makeStyles } from '@material-ui/core/styles';
|
|
||||||
import EditIcon from '@material-ui/icons/Edit';
|
|
||||||
import HistoryIcon from '@material-ui/icons/History';
|
|
||||||
|
|
||||||
import Author, { Avatar } from 'src/components/Author';
|
import Author, { Avatar } from 'src/components/Author';
|
||||||
import Content from 'src/components/Content';
|
import Content from 'src/components/Content';
|
||||||
@ -98,6 +97,7 @@ function HistoryMenuToggleButton({ bugId, commentId }: HistBtnProps) {
|
|||||||
aria-haspopup="true"
|
aria-haspopup="true"
|
||||||
onClick={handleClickOpen}
|
onClick={handleClickOpen}
|
||||||
className={classes.headerActions}
|
className={classes.headerActions}
|
||||||
|
size="large"
|
||||||
>
|
>
|
||||||
<HistoryIcon />
|
<HistoryIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
@ -150,6 +150,7 @@ function Message({ bug, op }: Props) {
|
|||||||
className={classes.headerActions}
|
className={classes.headerActions}
|
||||||
aria-label="edit message"
|
aria-label="edit message"
|
||||||
onClick={() => editComment(comment.id)}
|
onClick={() => editComment(comment.id)}
|
||||||
|
size="large"
|
||||||
>
|
>
|
||||||
<EditIcon />
|
<EditIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
|
@ -1,27 +1,24 @@
|
|||||||
|
import CloseIcon from '@mui/icons-material/Close';
|
||||||
|
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
||||||
|
import MuiAccordion from '@mui/material/Accordion';
|
||||||
|
import MuiAccordionDetails from '@mui/material/AccordionDetails';
|
||||||
|
import MuiAccordionSummary from '@mui/material/AccordionSummary';
|
||||||
|
import CircularProgress from '@mui/material/CircularProgress';
|
||||||
|
import Dialog from '@mui/material/Dialog';
|
||||||
|
import MuiDialogContent from '@mui/material/DialogContent';
|
||||||
|
import MuiDialogTitle from '@mui/material/DialogTitle';
|
||||||
|
import Grid from '@mui/material/Grid';
|
||||||
|
import IconButton from '@mui/material/IconButton';
|
||||||
|
import Tooltip from '@mui/material/Tooltip/Tooltip';
|
||||||
|
import Typography from '@mui/material/Typography';
|
||||||
|
import { Theme } from '@mui/material/styles';
|
||||||
|
import { WithStyles } from '@mui/styles';
|
||||||
|
import createStyles from '@mui/styles/createStyles';
|
||||||
|
import withStyles from '@mui/styles/withStyles';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import Moment from 'react-moment';
|
import Moment from 'react-moment';
|
||||||
|
|
||||||
import MuiAccordion from '@material-ui/core/Accordion';
|
|
||||||
import MuiAccordionDetails from '@material-ui/core/AccordionDetails';
|
|
||||||
import MuiAccordionSummary from '@material-ui/core/AccordionSummary';
|
|
||||||
import CircularProgress from '@material-ui/core/CircularProgress';
|
|
||||||
import Dialog from '@material-ui/core/Dialog';
|
|
||||||
import MuiDialogContent from '@material-ui/core/DialogContent';
|
|
||||||
import MuiDialogTitle from '@material-ui/core/DialogTitle';
|
|
||||||
import Grid from '@material-ui/core/Grid';
|
|
||||||
import IconButton from '@material-ui/core/IconButton';
|
|
||||||
import Tooltip from '@material-ui/core/Tooltip/Tooltip';
|
|
||||||
import Typography from '@material-ui/core/Typography';
|
|
||||||
import {
|
|
||||||
createStyles,
|
|
||||||
Theme,
|
|
||||||
withStyles,
|
|
||||||
WithStyles,
|
|
||||||
} from '@material-ui/core/styles';
|
|
||||||
import CloseIcon from '@material-ui/icons/Close';
|
|
||||||
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
|
|
||||||
|
|
||||||
import Content from '../../components/Content';
|
import Content from '../../components/Content';
|
||||||
|
|
||||||
import { AddCommentFragment } from './MessageCommentFragment.generated';
|
import { AddCommentFragment } from './MessageCommentFragment.generated';
|
||||||
@ -50,13 +47,14 @@ export interface DialogTitleProps extends WithStyles<typeof styles> {
|
|||||||
const DialogTitle = withStyles(styles)((props: DialogTitleProps) => {
|
const DialogTitle = withStyles(styles)((props: DialogTitleProps) => {
|
||||||
const { children, classes, onClose, ...other } = props;
|
const { children, classes, onClose, ...other } = props;
|
||||||
return (
|
return (
|
||||||
<MuiDialogTitle disableTypography className={classes.root} {...other}>
|
<MuiDialogTitle className={classes.root} {...other}>
|
||||||
<Typography variant="h6">{children}</Typography>
|
<Typography variant="h6">{children}</Typography>
|
||||||
{onClose ? (
|
{onClose ? (
|
||||||
<IconButton
|
<IconButton
|
||||||
aria-label="close"
|
aria-label="close"
|
||||||
className={classes.closeButton}
|
className={classes.closeButton}
|
||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
|
size="large"
|
||||||
>
|
>
|
||||||
<CloseIcon />
|
<CloseIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
@ -141,7 +139,7 @@ function MessageHistoryDialog({ bugId, commentId, open, onClose }: Props) {
|
|||||||
Loading...
|
Loading...
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<DialogContent dividers>
|
<DialogContent dividers>
|
||||||
<Grid container justify="center">
|
<Grid container justifyContent="center">
|
||||||
<CircularProgress />
|
<CircularProgress />
|
||||||
</Grid>
|
</Grid>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Typography } from '@material-ui/core';
|
import { Typography } from '@mui/material';
|
||||||
import { makeStyles } from '@material-ui/core/styles';
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
|
|
||||||
import { Status } from '../../gqlTypes';
|
import { Status } from '../../gqlTypes';
|
||||||
import Author from 'src/components/Author';
|
import Author from 'src/components/Author';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Typography } from '@material-ui/core';
|
import { Typography } from '@mui/material';
|
||||||
import { makeStyles } from '@material-ui/core/styles';
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
|
|
||||||
import Author from 'src/components/Author';
|
import Author from 'src/components/Author';
|
||||||
import Date from 'src/components/Date';
|
import Date from 'src/components/Date';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { makeStyles } from '@material-ui/core/styles';
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
|
|
||||||
import { BugFragment } from './Bug.generated';
|
import { BugFragment } from './Bug.generated';
|
||||||
import LabelChange from './LabelChange';
|
import LabelChange from './LabelChange';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import CircularProgress from '@material-ui/core/CircularProgress';
|
import CircularProgress from '@mui/material/CircularProgress';
|
||||||
|
|
||||||
import { BugFragment } from './Bug.generated';
|
import { BugFragment } from './Bug.generated';
|
||||||
import Timeline from './Timeline';
|
import Timeline from './Timeline';
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import { useEffect, useRef, useState } from 'react';
|
import CheckIcon from '@mui/icons-material/Check';
|
||||||
|
import SettingsIcon from '@mui/icons-material/Settings';
|
||||||
|
import { IconButton } from '@mui/material';
|
||||||
|
import Menu from '@mui/material/Menu';
|
||||||
|
import MenuItem from '@mui/material/MenuItem';
|
||||||
|
import TextField from '@mui/material/TextField';
|
||||||
|
import { darken } from '@mui/material/styles';
|
||||||
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
|
import withStyles from '@mui/styles/withStyles';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
import { useEffect, useRef, useState } from 'react';
|
||||||
import { IconButton } from '@material-ui/core';
|
|
||||||
import Menu from '@material-ui/core/Menu';
|
|
||||||
import MenuItem from '@material-ui/core/MenuItem';
|
|
||||||
import TextField from '@material-ui/core/TextField';
|
|
||||||
import { makeStyles, withStyles } from '@material-ui/core/styles';
|
|
||||||
import { darken } from '@material-ui/core/styles/colorManipulator';
|
|
||||||
import CheckIcon from '@material-ui/icons/Check';
|
|
||||||
import SettingsIcon from '@material-ui/icons/Settings';
|
|
||||||
|
|
||||||
import { Color } from '../../../gqlTypes';
|
import { Color } from '../../../gqlTypes';
|
||||||
import {
|
import {
|
||||||
@ -109,7 +109,7 @@ function FilterDropdown({
|
|||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
const [filter, setFilter] = useState<string>('');
|
const [filter, setFilter] = useState<string>('');
|
||||||
const buttonRef = useRef<HTMLButtonElement>(null);
|
const buttonRef = useRef<HTMLButtonElement>(null);
|
||||||
const searchRef = useRef<HTMLButtonElement>(null);
|
const searchRef = useRef<HTMLInputElement>(null);
|
||||||
const classes = useStyles({ active: false });
|
const classes = useStyles({ active: false });
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -125,6 +125,7 @@ function FilterDropdown({
|
|||||||
onClick={() => setOpen(!open)}
|
onClick={() => setOpen(!open)}
|
||||||
className={classes.gearBtn}
|
className={classes.gearBtn}
|
||||||
disableRipple
|
disableRipple
|
||||||
|
size="large"
|
||||||
>
|
>
|
||||||
<SettingsIcon fontSize={'small'} />
|
<SettingsIcon fontSize={'small'} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
@ -132,8 +133,6 @@ function FilterDropdown({
|
|||||||
|
|
||||||
<Menu
|
<Menu
|
||||||
className={classes.menu}
|
className={classes.menu}
|
||||||
getContentAnchorEl={null}
|
|
||||||
ref={searchRef}
|
|
||||||
anchorOrigin={{
|
anchorOrigin={{
|
||||||
vertical: 'bottom',
|
vertical: 'bottom',
|
||||||
horizontal: 'left',
|
horizontal: 'left',
|
||||||
@ -147,7 +146,6 @@ function FilterDropdown({
|
|||||||
setOpen(false);
|
setOpen(false);
|
||||||
onClose();
|
onClose();
|
||||||
}}
|
}}
|
||||||
onExited={() => setFilter('')}
|
|
||||||
anchorEl={buttonRef.current}
|
anchorEl={buttonRef.current}
|
||||||
PaperProps={{
|
PaperProps={{
|
||||||
style: {
|
style: {
|
||||||
@ -155,9 +153,13 @@ function FilterDropdown({
|
|||||||
width: '25ch',
|
width: '25ch',
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
|
TransitionProps={{
|
||||||
|
onExited: () => setFilter(''),
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{hasFilter && (
|
{hasFilter && (
|
||||||
<CustomTextField
|
<CustomTextField
|
||||||
|
inputRef={searchRef}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const { value } = e.target;
|
const { value } = e.target;
|
||||||
setFilter(value);
|
setFilter(value);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Card, Divider, Link, Typography } from '@material-ui/core';
|
import { Card, Divider, Link, Typography } from '@mui/material';
|
||||||
import CircularProgress from '@material-ui/core/CircularProgress';
|
import CircularProgress from '@mui/material/CircularProgress';
|
||||||
import { makeStyles } from '@material-ui/core/styles';
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
|
|
||||||
import Date from '../../components/Date';
|
import Date from '../../components/Date';
|
||||||
|
|
||||||
@ -47,6 +47,7 @@ function BugList({ id }: Props) {
|
|||||||
className={classes.bugLink}
|
className={classes.bugLink}
|
||||||
href={'/bug/' + bug.id}
|
href={'/bug/' + bug.id}
|
||||||
color={'inherit'}
|
color={'inherit'}
|
||||||
|
underline="hover"
|
||||||
>
|
>
|
||||||
{bug.title}
|
{bug.title}
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
|
import InfoIcon from '@mui/icons-material/Info';
|
||||||
|
import MailOutlineIcon from '@mui/icons-material/MailOutline';
|
||||||
|
import { Link, Paper, Typography } from '@mui/material';
|
||||||
|
import Avatar from '@mui/material/Avatar';
|
||||||
|
import CircularProgress from '@mui/material/CircularProgress';
|
||||||
|
import Grid from '@mui/material/Grid';
|
||||||
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
import { Link as RouterLink } from 'react-router-dom';
|
import { Link as RouterLink } from 'react-router-dom';
|
||||||
|
|
||||||
import { Link, Paper, Typography } from '@material-ui/core';
|
|
||||||
import Avatar from '@material-ui/core/Avatar';
|
|
||||||
import CircularProgress from '@material-ui/core/CircularProgress';
|
|
||||||
import Grid from '@material-ui/core/Grid';
|
|
||||||
import { makeStyles } from '@material-ui/core/styles';
|
|
||||||
import InfoIcon from '@material-ui/icons/Info';
|
|
||||||
import MailOutlineIcon from '@material-ui/icons/MailOutline';
|
|
||||||
|
|
||||||
import { IdentityFragment } from '../../components/Identity/IdentityFragment.generated';
|
import { IdentityFragment } from '../../components/Identity/IdentityFragment.generated';
|
||||||
|
|
||||||
import { useGetUserStatisticQuery } from './GetUserStatistic.generated';
|
import { useGetUserStatisticQuery } from './GetUserStatistic.generated';
|
||||||
@ -98,7 +97,11 @@ const Identity = ({ identity }: Props) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<MailOutlineIcon />
|
<MailOutlineIcon />
|
||||||
<Link href={'mailto:' + user?.email} color={'inherit'}>
|
<Link
|
||||||
|
href={'mailto:' + user?.email}
|
||||||
|
color={'inherit'}
|
||||||
|
underline="hover"
|
||||||
|
>
|
||||||
{user?.email}
|
{user?.email}
|
||||||
</Link>
|
</Link>
|
||||||
</Typography>
|
</Typography>
|
||||||
@ -112,6 +115,7 @@ const Identity = ({ identity }: Props) => {
|
|||||||
component={RouterLink}
|
component={RouterLink}
|
||||||
to={`/?q=author%3A${user?.id}+sort%3Acreation`}
|
to={`/?q=author%3A${user?.id}+sort%3Acreation`}
|
||||||
color={'inherit'}
|
color={'inherit'}
|
||||||
|
underline="hover"
|
||||||
>
|
>
|
||||||
<Typography variant="subtitle1">
|
<Typography variant="subtitle1">
|
||||||
Created {authoredCount} bugs.
|
Created {authoredCount} bugs.
|
||||||
@ -121,6 +125,7 @@ const Identity = ({ identity }: Props) => {
|
|||||||
component={RouterLink}
|
component={RouterLink}
|
||||||
to={`/?q=participant%3A${user?.id}+sort%3Acreation`}
|
to={`/?q=participant%3A${user?.id}+sort%3Acreation`}
|
||||||
color={'inherit'}
|
color={'inherit'}
|
||||||
|
underline="hover"
|
||||||
>
|
>
|
||||||
<Typography variant="subtitle1">
|
<Typography variant="subtitle1">
|
||||||
Participated to {participatedCount} bugs.
|
Participated to {participatedCount} bugs.
|
||||||
@ -130,6 +135,7 @@ const Identity = ({ identity }: Props) => {
|
|||||||
component={RouterLink}
|
component={RouterLink}
|
||||||
to={`/?q=actor%3A${user?.id}+sort%3Acreation`}
|
to={`/?q=actor%3A${user?.id}+sort%3Acreation`}
|
||||||
color={'inherit'}
|
color={'inherit'}
|
||||||
|
underline="hover"
|
||||||
>
|
>
|
||||||
<Typography variant="subtitle1">
|
<Typography variant="subtitle1">
|
||||||
Interacted with {actionCount} bugs.
|
Interacted with {actionCount} bugs.
|
||||||
|
@ -9,7 +9,7 @@ import Identity from './Identity';
|
|||||||
|
|
||||||
const UserQuery: React.FC = () => {
|
const UserQuery: React.FC = () => {
|
||||||
const params = useParams<'id'>();
|
const params = useParams<'id'>();
|
||||||
if (params.id === undefined) throw new Error();
|
if (params.id === undefined) throw new Error('missing route parameters');
|
||||||
|
|
||||||
const { loading, error, data } = useGetUserByIdQuery({
|
const { loading, error, data } = useGetUserByIdQuery({
|
||||||
variables: { userId: params.id },
|
variables: { userId: params.id },
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
|
import CheckCircleOutline from '@mui/icons-material/CheckCircleOutline';
|
||||||
|
import CommentOutlinedIcon from '@mui/icons-material/CommentOutlined';
|
||||||
|
import ErrorOutline from '@mui/icons-material/ErrorOutline';
|
||||||
|
import TableCell from '@mui/material/TableCell/TableCell';
|
||||||
|
import TableRow from '@mui/material/TableRow/TableRow';
|
||||||
|
import Tooltip from '@mui/material/Tooltip/Tooltip';
|
||||||
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
import TableCell from '@material-ui/core/TableCell/TableCell';
|
|
||||||
import TableRow from '@material-ui/core/TableRow/TableRow';
|
|
||||||
import Tooltip from '@material-ui/core/Tooltip/Tooltip';
|
|
||||||
import { makeStyles } from '@material-ui/core/styles';
|
|
||||||
import CheckCircleOutline from '@material-ui/icons/CheckCircleOutline';
|
|
||||||
import CommentOutlinedIcon from '@material-ui/icons/CommentOutlined';
|
|
||||||
import ErrorOutline from '@material-ui/icons/ErrorOutline';
|
|
||||||
|
|
||||||
import Author from 'src/components/Author';
|
import Author from 'src/components/Author';
|
||||||
import Date from 'src/components/Date';
|
import Date from 'src/components/Date';
|
||||||
import Label from 'src/components/Label';
|
import Label from 'src/components/Label';
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
|
import ArrowDropDown from '@mui/icons-material/ArrowDropDown';
|
||||||
|
import CheckIcon from '@mui/icons-material/Check';
|
||||||
|
import Menu from '@mui/material/Menu';
|
||||||
|
import MenuItem from '@mui/material/MenuItem';
|
||||||
|
import { SvgIconProps } from '@mui/material/SvgIcon';
|
||||||
|
import TextField from '@mui/material/TextField';
|
||||||
|
import { darken } from '@mui/material/styles';
|
||||||
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
|
import withStyles from '@mui/styles/withStyles';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import { useRef, useState, useEffect } from 'react';
|
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
import { useRef, useState, useEffect } from 'react';
|
||||||
import { Location, Link } from 'react-router-dom';
|
import { Location, Link } from 'react-router-dom';
|
||||||
|
|
||||||
import Menu from '@material-ui/core/Menu';
|
|
||||||
import MenuItem from '@material-ui/core/MenuItem';
|
|
||||||
import { SvgIconProps } from '@material-ui/core/SvgIcon';
|
|
||||||
import TextField from '@material-ui/core/TextField';
|
|
||||||
import { makeStyles, withStyles } from '@material-ui/core/styles';
|
|
||||||
import { darken } from '@material-ui/core/styles/colorManipulator';
|
|
||||||
import ArrowDropDown from '@material-ui/icons/ArrowDropDown';
|
|
||||||
import CheckIcon from '@material-ui/icons/Check';
|
|
||||||
|
|
||||||
import { Color } from '../../gqlTypes';
|
import { Color } from '../../gqlTypes';
|
||||||
|
|
||||||
const CustomTextField = withStyles((theme) => ({
|
const CustomTextField = withStyles((theme) => ({
|
||||||
@ -153,7 +153,7 @@ function FilterDropdown({
|
|||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
const [filter, setFilter] = useState<string>('');
|
const [filter, setFilter] = useState<string>('');
|
||||||
const buttonRef = useRef<HTMLButtonElement>(null);
|
const buttonRef = useRef<HTMLButtonElement>(null);
|
||||||
const searchRef = useRef<HTMLButtonElement>(null);
|
const searchRef = useRef<HTMLInputElement>(null);
|
||||||
const classes = useStyles({ active: false });
|
const classes = useStyles({ active: false });
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -180,8 +180,6 @@ function FilterDropdown({
|
|||||||
</button>
|
</button>
|
||||||
<Menu
|
<Menu
|
||||||
className={classes.labelMenu}
|
className={classes.labelMenu}
|
||||||
getContentAnchorEl={null}
|
|
||||||
ref={searchRef}
|
|
||||||
anchorOrigin={{
|
anchorOrigin={{
|
||||||
vertical: 'bottom',
|
vertical: 'bottom',
|
||||||
horizontal: 'left',
|
horizontal: 'left',
|
||||||
@ -202,6 +200,7 @@ function FilterDropdown({
|
|||||||
>
|
>
|
||||||
{hasFilter && (
|
{hasFilter && (
|
||||||
<CustomTextField
|
<CustomTextField
|
||||||
|
inputRef={searchRef}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const { value } = e.target;
|
const { value } = e.target;
|
||||||
setFilter(value);
|
setFilter(value);
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
import { pipe } from '@arrows/composition';
|
import { pipe } from '@arrows/composition';
|
||||||
|
import CheckCircleOutline from '@mui/icons-material/CheckCircleOutline';
|
||||||
|
import ErrorOutline from '@mui/icons-material/ErrorOutline';
|
||||||
|
import Toolbar from '@mui/material/Toolbar';
|
||||||
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Location } from 'react-router-dom';
|
import { Location } from 'react-router-dom';
|
||||||
|
|
||||||
import Toolbar from '@material-ui/core/Toolbar';
|
|
||||||
import { makeStyles } from '@material-ui/core/styles';
|
|
||||||
import CheckCircleOutline from '@material-ui/icons/CheckCircleOutline';
|
|
||||||
import ErrorOutline from '@material-ui/icons/ErrorOutline';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Filter,
|
Filter,
|
||||||
FilterDropdown,
|
FilterDropdown,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import Table from '@material-ui/core/Table/Table';
|
import Table from '@mui/material/Table/Table';
|
||||||
import TableBody from '@material-ui/core/TableBody/TableBody';
|
import TableBody from '@mui/material/TableBody/TableBody';
|
||||||
|
|
||||||
import BugRow from './BugRow';
|
import BugRow from './BugRow';
|
||||||
import { BugListFragment } from './ListQuery.generated';
|
import { BugListFragment } from './ListQuery.generated';
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
import { ApolloError } from '@apollo/client';
|
import { ApolloError } from '@apollo/client';
|
||||||
import { pipe } from '@arrows/composition';
|
import { pipe } from '@arrows/composition';
|
||||||
import { useState, useEffect, useRef } from 'react';
|
import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';
|
||||||
|
import ErrorOutline from '@mui/icons-material/ErrorOutline';
|
||||||
|
import KeyboardArrowLeft from '@mui/icons-material/KeyboardArrowLeft';
|
||||||
|
import KeyboardArrowRight from '@mui/icons-material/KeyboardArrowRight';
|
||||||
|
import { Button, FormControl, Menu, MenuItem } from '@mui/material';
|
||||||
|
import IconButton from '@mui/material/IconButton';
|
||||||
|
import InputBase from '@mui/material/InputBase';
|
||||||
|
import Paper from '@mui/material/Paper';
|
||||||
|
import Skeleton from '@mui/material/Skeleton';
|
||||||
|
import { Theme } from '@mui/material/styles';
|
||||||
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
import { useState, useEffect, useRef } from 'react';
|
||||||
import { useLocation, useNavigate, Link } from 'react-router-dom';
|
import { useLocation, useNavigate, Link } from 'react-router-dom';
|
||||||
|
|
||||||
import { Button, FormControl, Menu, MenuItem } from '@material-ui/core';
|
|
||||||
import IconButton from '@material-ui/core/IconButton';
|
|
||||||
import InputBase from '@material-ui/core/InputBase';
|
|
||||||
import Paper from '@material-ui/core/Paper';
|
|
||||||
import { makeStyles, Theme } from '@material-ui/core/styles';
|
|
||||||
import ArrowDropDownIcon from '@material-ui/icons/ArrowDropDown';
|
|
||||||
import ErrorOutline from '@material-ui/icons/ErrorOutline';
|
|
||||||
import KeyboardArrowLeft from '@material-ui/icons/KeyboardArrowLeft';
|
|
||||||
import KeyboardArrowRight from '@material-ui/icons/KeyboardArrowRight';
|
|
||||||
import Skeleton from '@material-ui/lab/Skeleton';
|
|
||||||
|
|
||||||
import { useCurrentIdentityQuery } from '../../components/Identity/CurrentIdentity.generated';
|
import { useCurrentIdentityQuery } from '../../components/Identity/CurrentIdentity.generated';
|
||||||
import IfLoggedIn from 'src/components/IfLoggedIn/IfLoggedIn';
|
import IfLoggedIn from 'src/components/IfLoggedIn/IfLoggedIn';
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ const useStyles = makeStyles<Theme, StylesProps>((theme) => ({
|
|||||||
...theme.typography.h5,
|
...theme.typography.h5,
|
||||||
padding: theme.spacing(8),
|
padding: theme.spacing(8),
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
color: theme.palette.text.hint,
|
color: theme.palette.text.primary,
|
||||||
borderBottomColor: theme.palette.divider,
|
borderBottomColor: theme.palette.divider,
|
||||||
borderBottomWidth: '1px',
|
borderBottomWidth: '1px',
|
||||||
borderBottomStyle: 'solid',
|
borderBottomStyle: 'solid',
|
||||||
@ -141,7 +141,7 @@ const Placeholder: React.FC<PlaceholderProps> = ({
|
|||||||
<div key={i} className={classes.placeholderRow}>
|
<div key={i} className={classes.placeholderRow}>
|
||||||
<Skeleton
|
<Skeleton
|
||||||
className={classes.placeholderRowStatus}
|
className={classes.placeholderRowStatus}
|
||||||
variant="circle"
|
variant="circular"
|
||||||
width={20}
|
width={20}
|
||||||
height={20}
|
height={20}
|
||||||
/>
|
/>
|
||||||
@ -327,7 +327,6 @@ function ListQuery() {
|
|||||||
<Menu
|
<Menu
|
||||||
open={filterMenuIsOpen}
|
open={filterMenuIsOpen}
|
||||||
onClose={() => setFilterMenuIsOpen(false)}
|
onClose={() => setFilterMenuIsOpen(false)}
|
||||||
getContentAnchorEl={null}
|
|
||||||
anchorEl={filterButtonRef.current}
|
anchorEl={filterButtonRef.current}
|
||||||
anchorOrigin={{
|
anchorOrigin={{
|
||||||
vertical: 'bottom',
|
vertical: 'bottom',
|
||||||
@ -382,21 +381,21 @@ function ListQuery() {
|
|||||||
{content}
|
{content}
|
||||||
<div className={classes.pagination}>
|
<div className={classes.pagination}>
|
||||||
{previousPage ? (
|
{previousPage ? (
|
||||||
<IconButton component={Link} to={previousPage}>
|
<IconButton component={Link} to={previousPage} size="large">
|
||||||
<KeyboardArrowLeft />
|
<KeyboardArrowLeft />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
) : (
|
) : (
|
||||||
<IconButton disabled>
|
<IconButton disabled size="large">
|
||||||
<KeyboardArrowLeft />
|
<KeyboardArrowLeft />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
)}
|
)}
|
||||||
<div>{loading ? 'Loading' : `Total: ${count}`}</div>
|
<div>{loading ? 'Loading' : `Total: ${count}`}</div>
|
||||||
{nextPage ? (
|
{nextPage ? (
|
||||||
<IconButton component={Link} to={nextPage}>
|
<IconButton component={Link} to={nextPage} size="large">
|
||||||
<KeyboardArrowRight />
|
<KeyboardArrowRight />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
) : (
|
) : (
|
||||||
<IconButton disabled>
|
<IconButton disabled size="large">
|
||||||
<KeyboardArrowRight />
|
<KeyboardArrowRight />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
)}
|
)}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { FormEvent, useState } from 'react';
|
import { Button, Paper } from '@mui/material';
|
||||||
|
import { Theme } from '@mui/material/styles';
|
||||||
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
|
import { FormEvent, useRef, useState } from 'react';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
import { Button, Paper } from '@material-ui/core';
|
|
||||||
import { makeStyles, Theme } from '@material-ui/core/styles';
|
|
||||||
|
|
||||||
import BugTitleInput from '../../components/BugTitleForm/BugTitleInput';
|
import BugTitleInput from '../../components/BugTitleForm/BugTitleInput';
|
||||||
import CommentInput from '../../components/CommentInput/CommentInput';
|
import CommentInput from '../../components/CommentInput/CommentInput';
|
||||||
|
|
||||||
@ -48,8 +48,8 @@ function NewBugPage() {
|
|||||||
const [issueComment, setIssueComment] = useState('');
|
const [issueComment, setIssueComment] = useState('');
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
|
|
||||||
let issueTitleInput: any;
|
const issueTitleInput = useRef<HTMLInputElement>(null);
|
||||||
let navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
function submitNewIssue(e: FormEvent) {
|
function submitNewIssue(e: FormEvent) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@ -65,7 +65,10 @@ function NewBugPage() {
|
|||||||
const id = data.data?.newBug.bug.id;
|
const id = data.data?.newBug.bug.id;
|
||||||
navigate('/bug/' + id);
|
navigate('/bug/' + id);
|
||||||
});
|
});
|
||||||
issueTitleInput.value = '';
|
|
||||||
|
if (issueTitleInput.current) {
|
||||||
|
issueTitleInput.current.value = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function isFormValid() {
|
function isFormValid() {
|
||||||
@ -79,9 +82,7 @@ function NewBugPage() {
|
|||||||
<Paper className={classes.main}>
|
<Paper className={classes.main}>
|
||||||
<form className={classes.form} onSubmit={submitNewIssue}>
|
<form className={classes.form} onSubmit={submitNewIssue}>
|
||||||
<BugTitleInput
|
<BugTitleInput
|
||||||
inputRef={(node) => {
|
inputRef={issueTitleInput}
|
||||||
issueTitleInput = node;
|
|
||||||
}}
|
|
||||||
label="Title"
|
label="Title"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
fullWidth
|
fullWidth
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { makeStyles } from '@material-ui/core/styles';
|
import makeStyles from '@mui/styles/makeStyles';
|
||||||
|
|
||||||
import BackToListButton from '../../components/BackToListButton';
|
import BackToListButton from '../../components/BackToListButton';
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { createMuiTheme } from '@material-ui/core/styles';
|
import { createTheme } from '@mui/material/styles';
|
||||||
|
|
||||||
const defaultDarkTheme = createMuiTheme({
|
const defaultDarkTheme = createTheme({
|
||||||
palette: {
|
palette: {
|
||||||
type: 'dark',
|
mode: 'dark',
|
||||||
primary: {
|
primary: {
|
||||||
dark: '#263238',
|
dark: '#263238',
|
||||||
main: '#2a393e',
|
main: '#2a393e',
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { createMuiTheme } from '@material-ui/core/styles';
|
import { createTheme } from '@mui/material/styles';
|
||||||
|
|
||||||
const defaultLightTheme = createMuiTheme({
|
const defaultLightTheme = createTheme({
|
||||||
palette: {
|
palette: {
|
||||||
type: 'light',
|
mode: 'light',
|
||||||
primary: {
|
primary: {
|
||||||
dark: '#263238',
|
dark: '#263238',
|
||||||
main: '#5a6b73',
|
main: '#5a6b73',
|
||||||
|
Loading…
Reference in New Issue
Block a user