1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-19 21:29:43 +02:00

Small UI improvements, update dependencies

This commit is contained in:
Maksim Eltyshev 2019-10-16 22:48:24 +05:00
parent d770470371
commit 1f38c6073c
17 changed files with 99 additions and 103 deletions

View file

@ -4197,9 +4197,9 @@
} }
}, },
"date-fns": { "date-fns": {
"version": "2.4.1", "version": "2.5.0",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.4.1.tgz", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.5.0.tgz",
"integrity": "sha512-2RhmH/sjDSCYW2F3ZQxOUx/I7PvzXpi89aQL2d3OAxSTwLx6NilATeUbe0menFE3Lu5lFkOFci36ivimwYHHxw==" "integrity": "sha512-I6Tkis01//nRcmvMQw/MRE1HAtcuA5Ie6jGPb8bJZJub7494LGOObqkV3ParnsSVviAjk5C8mNKDqYVBzCopWg=="
}, },
"date-now": { "date-now": {
"version": "0.1.4", "version": "0.1.4",

View file

@ -34,7 +34,7 @@
"axios": "^0.19.0", "axios": "^0.19.0",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"connected-react-router": "^6.5.2", "connected-react-router": "^6.5.2",
"date-fns": "^2.4.1", "date-fns": "^2.5.0",
"dequal": "^1.0.0", "dequal": "^1.0.0",
"history": "^4.10.1", "history": "^4.10.1",
"i18next": "^17.2.0", "i18next": "^17.2.0",

View file

@ -78,6 +78,7 @@ const EditStep = React.memo(({
</Popup.Header> </Popup.Header>
<Popup.Content> <Popup.Content>
<Form onSubmit={handleSubmit}> <Form onSubmit={handleSubmit}>
<div className={styles.text}>{t('common.title')}</div>
<Input <Input
fluid fluid
ref={nameField} ref={nameField}

View file

@ -8,3 +8,10 @@
.field { .field {
margin-bottom: 8px; margin-bottom: 8px;
} }
.text {
color: #444444;
font-size: 12px;
font-weight: bold;
padding-bottom: 6px;
}

View file

@ -105,13 +105,7 @@ const CardModal = React.memo(
const labelIds = labels.map((label) => label.id); const labelIds = labels.map((label) => label.id);
return ( return (
<Modal <Modal open closeIcon size="small" centered={false} onClose={onClose}>
open
closeIcon
size="small"
centered={false}
onClose={onClose}
>
<Grid className={styles.grid}> <Grid className={styles.grid}>
<Grid.Row className={styles.headerPadding}> <Grid.Row className={styles.headerPadding}>
<Grid.Column width={16} className={styles.headerPadding}> <Grid.Column width={16} className={styles.headerPadding}>

View file

@ -1,6 +1,5 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { useTranslation } from 'react-i18next';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import { Icon, Menu } from 'semantic-ui-react'; import { Icon, Menu } from 'semantic-ui-react';
@ -20,26 +19,21 @@ const Header = React.memo(
onNotificationDelete, onNotificationDelete,
onUsers, onUsers,
onLogout, onLogout,
}) => { }) => (
const [t] = useTranslation();
return (
<div className={styles.wrapper}> <div className={styles.wrapper}>
<Link to={Paths.ROOT} className={styles.logo}> <Link to={Paths.ROOT} className={styles.logo}>
Planka Planka
</Link> </Link>
<Menu inverted size="large" className={styles.menu}> <Menu inverted size="large" className={styles.menu}>
<Menu.Menu position="right">
{isEditable && ( {isEditable && (
<Menu.Item className={styles.item} onClick={onUsers}> <Menu.Item className={styles.item} onClick={onUsers}>
{t('common.users', { <Icon fitted name="users" />
context: 'title',
})}
</Menu.Item> </Menu.Item>
)} )}
<Menu.Menu position="right">
<NotificationsPopup items={notifications} onDelete={onNotificationDelete}> <NotificationsPopup items={notifications} onDelete={onNotificationDelete}>
<Menu.Item className={styles.item}> <Menu.Item className={styles.item}>
<Icon name="bell" className={styles.icon} /> <Icon fitted name="bell" />
{notifications.length > 0 && ( {notifications.length > 0 && (
<span className={styles.notification}>{notifications.length}</span> <span className={styles.notification}>{notifications.length}</span>
)} )}
@ -58,8 +52,7 @@ const Header = React.memo(
</Menu.Menu> </Menu.Menu>
</Menu> </Menu>
</div> </div>
); ),
},
); );
Header.propTypes = { Header.propTypes = {

View file

@ -1,7 +1,3 @@
.icon {
margin: 0 !important;
}
.item:before { .item:before {
background: none !important; background: none !important;
} }

View file

@ -44,6 +44,7 @@ const EditNameStep = React.memo(({
</Popup.Header> </Popup.Header>
<Popup.Content> <Popup.Content>
<Form onSubmit={handleSubmit}> <Form onSubmit={handleSubmit}>
<div className={styles.text}>{t('common.name')}</div>
<Input <Input
fluid fluid
ref={field} ref={field}

View file

@ -1,3 +1,10 @@
.field { .field {
margin-bottom: 8px; margin-bottom: 8px;
} }
.text {
color: #444444;
font-size: 12px;
font-weight: bold;
padding-bottom: 6px;
}

View file

@ -78,6 +78,7 @@ const EditStep = React.memo(({
</Popup.Header> </Popup.Header>
<Popup.Content> <Popup.Content>
<Form onSubmit={handleSubmit}> <Form onSubmit={handleSubmit}>
<div className={styles.text}>{t('common.title')}</div>
<Input <Input
fluid fluid
ref={nameField} ref={nameField}

View file

@ -8,3 +8,10 @@
.field { .field {
margin-bottom: 8px; margin-bottom: 8px;
} }
.text {
color: #444444;
font-size: 12px;
font-weight: bold;
padding-bottom: 6px;
}

View file

@ -33,6 +33,7 @@ const Project = React.memo(
<Grid className={styles.header}> <Grid className={styles.header}>
<Grid.Row> <Grid.Row>
<Grid.Column> <Grid.Column>
{isEditable ? (
<EditPopup <EditPopup
defaultData={{ defaultData={{
name, name,
@ -42,6 +43,9 @@ const Project = React.memo(
> >
<Button content={name} disabled={!isEditable} className={styles.name} /> <Button content={name} disabled={!isEditable} className={styles.name} />
</EditPopup> </EditPopup>
) : (
<span className={styles.name}>{name}</span>
)}
<span className={styles.users}> <span className={styles.users}>
{memberships.map((membership) => ( {memberships.map((membership) => (
<span key={membership.id} className={styles.user}> <span key={membership.id} className={styles.user}>

View file

@ -22,9 +22,11 @@
.name { .name {
background: transparent !important; background: transparent !important;
color: #fff !important; color: #fff !important;
display: inline-block !important;
font-size: 32px !important; font-size: 32px !important;
font-weight: bold !important; font-weight: bold !important;
line-height: 36px !important; line-height: 36px !important;
margin-right: 8px !important;
padding: 0 !important; padding: 0 !important;
} }

View file

@ -2,14 +2,12 @@ import React, { useCallback } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { import {
Button, Header, Modal, Table, Button, Modal, Table,
} from 'semantic-ui-react'; } from 'semantic-ui-react';
import AddUserPopupContainer from '../../containers/AddUserPopupContainer'; import AddUserPopupContainer from '../../containers/AddUserPopupContainer';
import Item from './Item'; import Item from './Item';
import styles from './UsersModal.module.css';
const UsersModal = React.memo(({ const UsersModal = React.memo(({
items, onUpdate, onDelete, onClose, items, onUpdate, onDelete, onClose,
}) => { }) => {
@ -30,13 +28,13 @@ const UsersModal = React.memo(({
); );
return ( return (
<Modal open closeIcon size="large" onClose={onClose}> <Modal open closeIcon size="large" centered={false} onClose={onClose}>
<Modal.Content> <Modal.Header>
<Header size="huge" className={styles.title}>
{t('common.users', { {t('common.users', {
context: 'title', context: 'title',
})} })}
</Header> </Modal.Header>
<Modal.Content>
<Table basic="very"> <Table basic="very">
<Table.Header> <Table.Header>
<Table.Row> <Table.Row>
@ -58,17 +56,13 @@ const UsersModal = React.memo(({
/> />
))} ))}
</Table.Body> </Table.Body>
<Table.Footer>
<Table.Row>
<Table.HeaderCell colSpan="4">
<AddUserPopupContainer>
<Button positive content={t('action.addUser')} className={styles.button} />
</AddUserPopupContainer>
</Table.HeaderCell>
</Table.Row>
</Table.Footer>
</Table> </Table>
</Modal.Content> </Modal.Content>
<Modal.Actions>
<AddUserPopupContainer>
<Button positive content={t('action.addUser')} />
</AddUserPopupContainer>
</Modal.Actions>
</Modal> </Modal>
); );
}); });

View file

@ -1,11 +0,0 @@
.button {
float: right;
height: 32px;
line-height: 20px;
margin-top: -2px;
padding: 6px 12px;
}
.title {
display: inline-block;
}

View file

@ -1186,9 +1186,9 @@
} }
}, },
"dotenv": { "dotenv": {
"version": "8.1.0", "version": "8.2.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.1.0.tgz", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
"integrity": "sha512-GUE3gqcDCaMltj2++g6bRQ5rBJWtkWTmqmD0fo1RnnMuUqHNCt2oTPeDnS9n6fKYvlhn7AeBkb38lymBtWBQdA==" "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw=="
}, },
"dotenv-cli": { "dotenv-cli": {
"version": "3.0.0", "version": "3.0.0",
@ -4125,18 +4125,18 @@
} }
}, },
"nodemon": { "nodemon": {
"version": "1.19.3", "version": "1.19.4",
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.19.3.tgz", "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.19.4.tgz",
"integrity": "sha512-TBNKRmJykEbxpTniZBusqRrUTHIEqa2fpecbTQDQj1Gxjth7kKAPP296ztR0o5gPUWsiYbuEbt73/+XMYab1+w==", "integrity": "sha512-VGPaqQBNk193lrJFotBU8nvWZPqEZY2eIzymy2jjY0fJ9qIsxA0sxQ8ATPl0gZC645gijYEc1jtZvpS8QWzJGQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"chokidar": "^2.1.5", "chokidar": "^2.1.8",
"debug": "^3.1.0", "debug": "^3.2.6",
"ignore-by-default": "^1.0.1", "ignore-by-default": "^1.0.1",
"minimatch": "^3.0.4", "minimatch": "^3.0.4",
"pstree.remy": "^1.1.6", "pstree.remy": "^1.1.7",
"semver": "^5.5.0", "semver": "^5.7.1",
"supports-color": "^5.2.0", "supports-color": "^5.5.0",
"touch": "^3.1.0", "touch": "^3.1.0",
"undefsafe": "^2.0.2", "undefsafe": "^2.0.2",
"update-notifier": "^2.5.0" "update-notifier": "^2.5.0"

View file

@ -15,7 +15,7 @@
}, },
"dependencies": { "dependencies": {
"bcrypt": "^3.0.6", "bcrypt": "^3.0.6",
"dotenv": "^8.1.0", "dotenv": "^8.2.0",
"dotenv-cli": "^3.0.0", "dotenv-cli": "^3.0.0",
"jsonwebtoken": "^8.5.1", "jsonwebtoken": "^8.5.1",
"knex": "^0.19.5", "knex": "^0.19.5",
@ -29,7 +29,7 @@
}, },
"devDependencies": { "devDependencies": {
"eslint": "5.16.0", "eslint": "5.16.0",
"nodemon": "^1.19.3" "nodemon": "^1.19.4"
}, },
"engines": { "engines": {
"node": "^12.10" "node": "^12.10"