Compare commits

...

5 Commits

Author SHA1 Message Date
Maksim Eltyshev
1d2193c381 chore: Update version 2024-10-27 22:05:18 +01:00
dependabot[bot]
70f40e26af chore(deps): Bump http-proxy-middleware from 2.0.6 to 2.0.7 in /client (#922)
Bumps [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) from 2.0.6 to 2.0.7.
- [Release notes](https://github.com/chimurai/http-proxy-middleware/releases)
- [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/v2.0.7/CHANGELOG.md)
- [Commits](https://github.com/chimurai/http-proxy-middleware/compare/v2.0.6...v2.0.7)

---
updated-dependencies:
- dependency-name: http-proxy-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-27 21:18:12 +01:00
Holden Hu
814b5810ac feat: Improve UX of comment actions (#924)
Closes #915
2024-10-27 21:17:08 +01:00
Zananok
f372113def feat: Add multiple task creation with Ctrl+Enter (#921) 2024-10-27 21:03:59 +01:00
leroyloren
14dff96434 fix: Update Czech translation (#920) 2024-10-24 15:39:20 +02:00
11 changed files with 93 additions and 58 deletions

View File

@@ -15,13 +15,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.12 version: 0.2.13
# This is the version number of the application being deployed. This version number should be # This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to # incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using. # follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes. # It is recommended to use it with quotes.
appVersion: "1.23.3" appVersion: "1.23.4"
dependencies: dependencies:
- alias: postgresql - alias: postgresql

View File

@@ -10956,9 +10956,9 @@
} }
}, },
"node_modules/http-proxy-middleware": { "node_modules/http-proxy-middleware": {
"version": "2.0.6", "version": "2.0.7",
"resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.7.tgz",
"integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", "integrity": "sha512-fgVY8AV7qU7z/MmXJ/rxwbrtQH4jBQ9m7kp3llF0liB7glmFeVZFBepQb32T3y8n8k2+AEYuMPCpinYW+/CuRA==",
"dependencies": { "dependencies": {
"@types/http-proxy": "^1.17.8", "@types/http-proxy": "^1.17.8",
"http-proxy": "^1.18.1", "http-proxy": "^1.18.1",

View File

@@ -10,7 +10,7 @@ import { focusEnd } from '../../../utils/element-helpers';
import styles from './CommentEdit.module.scss'; import styles from './CommentEdit.module.scss';
const CommentEdit = React.forwardRef(({ children, defaultData, onUpdate }, ref) => { const CommentEdit = React.forwardRef(({ defaultData, onUpdate, text, actions }, ref) => {
const [t] = useTranslation(); const [t] = useTranslation();
const [isOpened, setIsOpened] = useState(false); const [isOpened, setIsOpened] = useState(false);
const [data, handleFieldChange, setData] = useForm(null); const [data, handleFieldChange, setData] = useForm(null);
@@ -76,7 +76,12 @@ const CommentEdit = React.forwardRef(({ children, defaultData, onUpdate }, ref)
}, [isOpened]); }, [isOpened]);
if (!isOpened) { if (!isOpened) {
return children; return (
<>
{actions}
{text}
</>
);
} }
return ( return (
@@ -101,9 +106,10 @@ const CommentEdit = React.forwardRef(({ children, defaultData, onUpdate }, ref)
}); });
CommentEdit.propTypes = { CommentEdit.propTypes = {
children: PropTypes.element.isRequired,
defaultData: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types defaultData: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types
onUpdate: PropTypes.func.isRequired, onUpdate: PropTypes.func.isRequired,
text: PropTypes.element.isRequired,
actions: PropTypes.element.isRequired,
}; };
export default React.memo(CommentEdit); export default React.memo(CommentEdit);

View File

@@ -31,7 +31,18 @@ const ItemComment = React.memo(
<User name={user.name} avatarUrl={user.avatarUrl} /> <User name={user.name} avatarUrl={user.avatarUrl} />
</span> </span>
<div className={classNames(styles.content)}> <div className={classNames(styles.content)}>
<CommentEdit
ref={commentEdit}
defaultData={data}
onUpdate={onUpdate}
text={
<div className={styles.text}>
<Markdown linkTarget="_blank">{data.text}</Markdown>
</div>
}
actions={
<div className={styles.title}> <div className={styles.title}>
<span>
<span className={styles.author}>{user.name}</span> <span className={styles.author}>{user.name}</span>
<span className={styles.date}> <span className={styles.date}>
{t(`format:${getDateFormat(createdAt)}`, { {t(`format:${getDateFormat(createdAt)}`, {
@@ -39,12 +50,7 @@ const ItemComment = React.memo(
value: createdAt, value: createdAt,
})} })}
</span> </span>
</div> </span>
<CommentEdit ref={commentEdit} defaultData={data} onUpdate={onUpdate}>
<>
<div className={styles.text}>
<Markdown linkTarget="_blank">{data.text}</Markdown>
</div>
{canEdit && ( {canEdit && (
<Comment.Actions> <Comment.Actions>
<Comment.Action <Comment.Action
@@ -67,8 +73,9 @@ const ItemComment = React.memo(
</DeletePopup> </DeletePopup>
</Comment.Actions> </Comment.Actions>
)} )}
</> </div>
</CommentEdit> }
/>
</div> </div>
</Comment> </Comment>
); );

View File

@@ -38,6 +38,12 @@
.title { .title {
padding-bottom: 4px; padding-bottom: 4px;
display: flex;
align-items: center;
justify-content: space-between;
position: sticky;
top: -1em;
background: #f5f6f7;
} }
.user { .user {

View File

@@ -13,6 +13,8 @@ const DEFAULT_DATA = {
name: '', name: '',
}; };
const MULTIPLE_REGEX = /\s*\r?\n\s*/;
const Add = React.forwardRef(({ children, onCreate }, ref) => { const Add = React.forwardRef(({ children, onCreate }, ref) => {
const [t] = useTranslation(); const [t] = useTranslation();
const [isOpened, setIsOpened] = useState(false); const [isOpened, setIsOpened] = useState(false);
@@ -29,7 +31,8 @@ const Add = React.forwardRef(({ children, onCreate }, ref) => {
setIsOpened(false); setIsOpened(false);
}, []); }, []);
const submit = useCallback(() => { const submit = useCallback(
(isMultiple = false) => {
const cleanData = { const cleanData = {
...data, ...data,
name: data.name.trim(), name: data.name.trim(),
@@ -40,11 +43,22 @@ const Add = React.forwardRef(({ children, onCreate }, ref) => {
return; return;
} }
if (isMultiple) {
cleanData.name.split(MULTIPLE_REGEX).forEach((name) => {
onCreate({
...cleanData,
name,
});
});
} else {
onCreate(cleanData); onCreate(cleanData);
}
setData(DEFAULT_DATA); setData(DEFAULT_DATA);
focusNameField(); focusNameField();
}, [onCreate, data, setData, focusNameField]); },
[onCreate, data, setData, focusNameField],
);
useImperativeHandle( useImperativeHandle(
ref, ref,
@@ -63,8 +77,7 @@ const Add = React.forwardRef(({ children, onCreate }, ref) => {
(event) => { (event) => {
if (event.key === 'Enter') { if (event.key === 'Enter') {
event.preventDefault(); event.preventDefault();
submit(event.ctrlKey);
submit();
} }
}, },
[submit], [submit],

View File

@@ -184,6 +184,7 @@ export default {
addTask: 'Přidat úkol', addTask: 'Přidat úkol',
addToCard: 'Přidat na kartu', addToCard: 'Přidat na kartu',
addUser: 'Přidat uživatele', addUser: 'Přidat uživatele',
copyLink_title: 'Zkopírovat odkaz',
createBoard: 'Vytvořit tabuli', createBoard: 'Vytvořit tabuli',
createFile: 'Vytvořit soubor', createFile: 'Vytvořit soubor',
createLabel: 'Vytvořit štítek', createLabel: 'Vytvořit štítek',

View File

@@ -3,6 +3,7 @@ export default {
common: { common: {
emailOrUsername: 'E-mail nebo uživatelské jméno', emailOrUsername: 'E-mail nebo uživatelské jméno',
invalidEmailOrUsername: 'Nesprávný e-mail nebo uživatelské jméno', invalidEmailOrUsername: 'Nesprávný e-mail nebo uživatelské jméno',
invalidCredentials: 'Neplatné přihlašovací údaje',
invalidPassword: 'Nesprávné heslo', invalidPassword: 'Nesprávné heslo',
logInToPlanka: 'Přihlásit se do Planka', logInToPlanka: 'Přihlásit se do Planka',
noInternetConnection: 'Bez připojení k internetu', noInternetConnection: 'Bez připojení k internetu',
@@ -11,6 +12,7 @@ export default {
projectManagement: 'Správa projektu', projectManagement: 'Správa projektu',
serverConnectionFailed: 'Připojení k serveru selhalo', serverConnectionFailed: 'Připojení k serveru selhalo',
unknownError: 'Neznámá chyba, zkuste to později', unknownError: 'Neznámá chyba, zkuste to později',
useSingleSignOn: 'Použít jednorázové přihlášení',
}, },
action: { action: {

View File

@@ -1 +1 @@
export default '1.23.3'; export default '1.23.4';

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "planka", "name": "planka",
"version": "1.23.3", "version": "1.23.4",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "planka", "name": "planka",
"version": "1.23.3", "version": "1.23.4",
"hasInstallScript": true, "hasInstallScript": true,
"license": "AGPL-3.0", "license": "AGPL-3.0",
"dependencies": { "dependencies": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "planka", "name": "planka",
"version": "1.23.3", "version": "1.23.4",
"private": true, "private": true,
"homepage": "https://plankanban.github.io/planka", "homepage": "https://plankanban.github.io/planka",
"repository": { "repository": {