Compare commits

...
6 Commits
9 changed files with 101 additions and 10 deletions
+2 -2
View File
@@ -15,13 +15,13 @@ type: application
# 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.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.1
version: 0.2.2
# 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
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.19.0"
appVersion: "1.19.1"
dependencies:
- alias: postgresql
+1 -1
View File
@@ -1 +1 @@
REACT_APP_VERSION=1.19.0
REACT_APP_VERSION=1.19.1
+18 -1
View File
@@ -1,4 +1,4 @@
import React, { useCallback, useRef } from 'react';
import React, { useCallback, useRef, useState } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { useTranslation } from 'react-i18next';
@@ -81,6 +81,7 @@ const CardModal = React.memo(
onClose,
}) => {
const [t] = useTranslation();
const [isLinkCopied, setIsLinkCopied] = useState(false);
const isGalleryOpened = useRef(false);
@@ -146,6 +147,14 @@ const CardModal = React.memo(
onClose();
}, [onDuplicate, onClose]);
const handleCopyLinkClick = useCallback(() => {
navigator.clipboard.writeText(window.location.href);
setIsLinkCopied(true);
setTimeout(() => {
setIsLinkCopied(false);
}, 5000);
}, []);
const handleGalleryOpen = useCallback(() => {
isGalleryOpened.current = true;
}, []);
@@ -506,6 +515,14 @@ const CardModal = React.memo(
<Icon name="copy outline" className={styles.actionIcon} />
{t('action.duplicate')}
</Button>
<Button fluid className={styles.actionButton} onClick={handleCopyLinkClick}>
<Icon name={isLinkCopied ? 'linkify' : 'unlink'} className={styles.actionIcon} />
{isLinkCopied
? t('common.linkIsCopied')
: t('action.copyLink', {
context: 'title',
})}
</Button>
<DeletePopup
title="common.deleteCard"
content="common.areYouSureYouWantToDeleteThisCard"
@@ -20,7 +20,6 @@
.actionIcon {
color: #17394d;
display: inline;
margin-right: 8px;
}
+2
View File
@@ -104,6 +104,7 @@ export default {
language: 'Sprache',
leaveBoard_title: 'Board verlassen',
leaveProject_title: 'Projekt verlassen',
linkIsCopied: 'Link kopiert',
list: 'Listen',
listActions_title: 'Aufgaben auflisten',
managers: 'Manager',
@@ -169,6 +170,7 @@ export default {
addTask: 'Aufgabe hinzufügen',
addToCard: 'Zu Karte hinzufügen',
addUser: 'Benutzer hinzufügen',
copyLink_title: 'Link kopieren',
createBoard: 'Board erstellen',
createFile: 'Datei erstellen',
createLabel: 'Label erstellen',
+2
View File
@@ -106,6 +106,7 @@ export default {
language: 'Language',
leaveBoard_title: 'Leave Board',
leaveProject_title: 'Leave Project',
linkIsCopied: 'Link is copied',
list: 'List',
listActions_title: 'List Actions',
managers: 'Managers',
@@ -183,6 +184,7 @@ export default {
addTask: 'Add task',
addToCard: 'Add to card',
addUser: 'Add user',
copyLink_title: 'Copy Link',
createBoard: 'Create board',
createFile: 'Create file',
createLabel: 'Create label',
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "planka",
"version": "1.19.0",
"version": "1.19.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "planka",
"version": "1.19.0",
"version": "1.19.1",
"hasInstallScript": true,
"license": "AGPL-3.0",
"dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "planka",
"version": "1.19.0",
"version": "1.19.1",
"private": true,
"homepage": "https://plankanban.github.io/planka",
"repository": {
+73 -2
View File
@@ -1,3 +1,58 @@
const EVENT_TYPES = {
ACTION_CREATE: 'actionCreate',
ACTION_DELETE: 'actionDelete',
ACTION_UPDATE: 'actionUpdate',
ATTACHMENT_CREATE: 'attachmentCreate',
ATTACHMENT_DELETE: 'attachmentDelete',
ATTACHMENT_UPDATE: 'attachmentUpdate',
BOARD_CREATE: 'boardCreate',
BOARD_DELETE: 'boardDelete',
BOARD_UPDATE: 'boardUpdate',
BOARD_MEMBERSHIP_CREATE: 'boardMembershipCreate',
BOARD_MEMBERSHIP_DELETE: 'boardMembershipDelete',
BOARD_MEMBERSHIP_UPDATE: 'boardMembershipUpdate',
CARD_CREATE: 'cardCreate',
CARD_DELETE: 'cardDelete',
CARD_UPDATE: 'cardUpdate',
CARD_LABEL_CREATE: 'cardLabelCreate',
CARD_LABEL_DELETE: 'cardLabelDelete',
CARD_MEMBERSHIP_CREATE: 'cardMembershipCreate',
CARD_MEMBERSHIP_DELETE: 'cardMembershipDelete',
LABEL_CREATE: 'labelCreate',
LABEL_DELETE: 'labelDelete',
LABEL_UPDATE: 'labelUpdate',
LIST_CREATE: 'listCreate',
LIST_DELETE: 'listDelete',
LIST_SORT: 'listSort',
LIST_UPDATE: 'listUpdate',
NOTIFICATION_CREATE: 'notificationCreate',
NOTIFICATION_UPDATE: 'notificationUpdate',
PROJECT_CREATE: 'projectCreate',
PROJECT_DELETE: 'projectDelete',
PROJECT_UPDATE: 'projectUpdate',
PROJECT_MANAGER_CREATE: 'projectManagerCreate',
PROJECT_MANAGER_DELETE: 'projectManagerDelete',
TASK_CREATE: 'taskCreate',
TASK_DELETE: 'taskDelete',
TASK_UPDATE: 'taskUpdate',
USER_CREATE: 'userCreate',
USER_DELETE: 'userDelete',
USER_UPDATE: 'userUpdate',
};
const jsonifyData = (data) => {
const nextData = {};
@@ -22,18 +77,33 @@ const jsonifyData = (data) => {
return nextData;
};
/**
* @typedef {Object} Included
* @property {any[]} [projects] - Array of projects (optional).
* @property {any[]} [boards] - Array of boards (optional).
* @property {any[]} [lists] - Array of lists (optional).
* @property {any[]} [cards] - Array of cards (optional).
*/
/**
* @typedef {Object} Data
* @property {any} item - Actual event data.
* @property {Included} [included] - Optional included data.
*/
/**
* Sends a webhook notification to a configured URL.
*
* @param {*} webhook - Webhook configuration.
* @param {string} event - The event (see {@link Events}).
* @param {*} data - The actual data related to the event.
* @param {string} event - The event (see {@link EVENT_TYPES}).
* @param {Data} data - The data object containing event data and optionally included data.
* @param {ref} user - User object associated with the event.
* @returns {Promise<void>}
*/
async function sendWebhook(webhook, event, data, user) {
const headers = {
'Content-Type': 'application/json',
'User-Agent': `planka (+${sails.config.custom.baseUrl})`,
};
if (webhook.accessToken) {
@@ -68,6 +138,7 @@ module.exports = {
event: {
type: 'string',
required: true,
isIn: Object.values(EVENT_TYPES),
},
data: {
type: 'ref',