Compare commits

...
11 Commits
63 changed files with 1379 additions and 194 deletions
+49
View File
@@ -0,0 +1,49 @@
# Contributing to Planka
First off, thanks for taking the time to contribute!
## Code of Conduct
This project and everyone participating in it is governed by the [Planka Code of Conduct](https://github.com/plankanban/planka/blob/master/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
## How Can I Contribute?
### Reporting Bugs
Feel free to create a bug report as a new issue on GitHub. Before creating, please check if there is already existing one. When creating a bug report, please include as many details as possible.
### Suggesting Enhancements
Feel free to create an enhancement suggestion as a new issue on GitHub. Before creating, please check if there is already existing one. When creating an enhancement suggestion, please include as many details as possible.
### Pull Requests
Before submitting a pull request please discuss with the core team by creating or commenting in an issue on GitHub – we'd also love to hear from you in the discussions. This way we can ensure that an approach is agreed on before code is written. This will result in a much higher liklihood of your code being accepted.
If you’re looking for ways to get started, here's a list of ways to help us improve Planka:
- [Translation](https://github.com/plankanban/planka/issues/66) into other languages
- Issues with [`good first issue`](https://github.com/plankanban/planka/labels/good%20first%20issue) label
- Performance improvements, both on client and server
- Developer happiness and documentation
- Bugs and other issues listed on GitHub
## Styleguides
### Git Commit Messages
Commit messages should follow the [commit message convention](https://conventionalcommits.org), so changelogs could be generated automatically by that.
Additional rules:
- Separate subject from body with a blank line
- Limit the subject line to 70 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line
- Use the body to explain what and why vs. how
- Each commit should be a single, stable change
### JavaScript
All JavaScript code should follow this [JavaScript style guide](https://github.com/airbnb/javascript). The pre-commit hook will help you find linting errors before committing.
+4 -2
View File
@@ -47,15 +47,17 @@ RUN apk -U upgrade \
&& apk del vips-dependencies --purge
COPY docker-start.sh start.sh
RUN chmod +x start.sh
COPY server .
RUN chmod +x start.sh \
&& cp .env.sample .env
COPY --from=client-builder /app/build public
COPY --from=client-builder /app/build/index.html views
VOLUME /app/public/user-avatars
VOLUME /app/public/project-background-images
VOLUME /app/public/attachments
VOLUME /app/private/attachments
EXPOSE 1337
+1 -1
View File
@@ -61,7 +61,7 @@ Either use a local database or start the provided development database:
docker-compose -f docker-compose-dev.yml up
```
Edit `DATABASE_URL` in `.env` file if needed, then initialize the database:
Create `server/.env` based on `server/.env.sample` and edit `DATABASE_URL` if needed, then initialize the database:
```
npm run server:db:init
+14
View File
@@ -14,6 +14,7 @@
"i18next": "^21.6.16",
"i18next-browser-languagedetector": "^6.1.4",
"initials": "^3.1.2",
"js-cookie": "^3.0.1",
"lodash": "^4.17.20",
"node-sass": "^7.0.1",
"prop-types": "^15.8.1",
@@ -13534,6 +13535,14 @@
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"node_modules/js-cookie": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz",
"integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==",
"engines": {
"node": ">=12"
}
},
"node_modules/js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
@@ -33059,6 +33068,11 @@
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"js-cookie": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz",
"integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw=="
},
"js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+1
View File
@@ -71,6 +71,7 @@
"i18next": "^21.6.16",
"i18next-browser-languagedetector": "^6.1.4",
"initials": "^3.1.2",
"js-cookie": "^3.0.1",
"lodash": "^4.17.20",
"node-sass": "^7.0.1",
"prop-types": "^15.8.1",
+1 -1
View File
@@ -2,7 +2,7 @@ import http from './http';
/* Actions */
const createAccessToken = (data, headers) => http.post('/access-tokens', data, headers);
const createAccessToken = (data) => http.post('/access-tokens', data);
export default {
createAccessToken,
+2 -2
View File
@@ -9,8 +9,8 @@ export const transformAction = (action) => ({
/* Actions */
const getActions = (cardId, data, headers) =>
socket.get(`/cards/${cardId}/actions`, data, headers).then((body) => ({
const getActions = (cardId, data) =>
socket.get(`/cards/${cardId}/actions`, data).then((body) => ({
...body,
items: body.items.map(transformAction),
}));
+6 -6
View File
@@ -10,20 +10,20 @@ export const transformAttachment = (attachment) => ({
/* Actions */
const createAttachment = (cardId, data, requestId, headers) =>
http.post(`/cards/${cardId}/attachments?requestId=${requestId}`, data, headers).then((body) => ({
const createAttachment = (cardId, data, requestId) =>
http.post(`/cards/${cardId}/attachments?requestId=${requestId}`, data).then((body) => ({
...body,
item: transformAttachment(body.item),
}));
const updateAttachment = (id, data, headers) =>
socket.patch(`/attachments/${id}`, data, headers).then((body) => ({
const updateAttachment = (id, data) =>
socket.patch(`/attachments/${id}`, data).then((body) => ({
...body,
item: transformAttachment(body.item),
}));
const deleteAttachment = (id, headers) =>
socket.delete(`/attachments/${id}`, undefined, headers).then((body) => ({
const deleteAttachment = (id) =>
socket.delete(`/attachments/${id}`).then((body) => ({
...body,
item: transformAttachment(body.item),
}));
+3 -4
View File
@@ -2,11 +2,10 @@ import socket from './socket';
/* Actions */
const createBoardMembership = (boardId, data, headers) =>
socket.post(`/boards/${boardId}/memberships`, data, headers);
const createBoardMembership = (boardId, data) =>
socket.post(`/boards/${boardId}/memberships`, data);
const deleteBoardMembership = (id, headers) =>
socket.delete(`/board-memberships/${id}`, undefined, headers);
const deleteBoardMembership = (id) => socket.delete(`/board-memberships/${id}`);
export default {
createBoardMembership,
+5 -6
View File
@@ -4,11 +4,10 @@ import { transformAttachment } from './attachments';
/* Actions */
const createBoard = (projectId, data, headers) =>
socket.post(`/projects/${projectId}/boards`, data, headers);
const createBoard = (projectId, data) => socket.post(`/projects/${projectId}/boards`, data);
const getBoard = (id, headers) =>
socket.get(`/boards/${id}`, undefined, headers).then((body) => ({
const getBoard = (id) =>
socket.get(`/boards/${id}`).then((body) => ({
...body,
included: {
...body.included,
@@ -17,9 +16,9 @@ const getBoard = (id, headers) =>
},
}));
const updateBoard = (id, data, headers) => socket.patch(`/boards/${id}`, data, headers);
const updateBoard = (id, data) => socket.patch(`/boards/${id}`, data);
const deleteBoard = (id, headers) => socket.delete(`/boards/${id}`, undefined, headers);
const deleteBoard = (id) => socket.delete(`/boards/${id}`);
export default {
createBoard,
+2 -4
View File
@@ -2,11 +2,9 @@ import socket from './socket';
/* Actions */
const createCardLabel = (cardId, data, headers) =>
socket.post(`/cards/${cardId}/labels`, data, headers);
const createCardLabel = (cardId, data) => socket.post(`/cards/${cardId}/labels`, data);
const deleteCardLabel = (cardId, labelId, headers) =>
socket.delete(`/cards/${cardId}/labels/${labelId}`, undefined, headers);
const deleteCardLabel = (cardId, labelId) => socket.delete(`/cards/${cardId}/labels/${labelId}`);
export default {
createCardLabel,
+3 -4
View File
@@ -2,11 +2,10 @@ import socket from './socket';
/* Actions */
const createCardMembership = (cardId, data, headers) =>
socket.post(`/cards/${cardId}/memberships`, data, headers);
const createCardMembership = (cardId, data) => socket.post(`/cards/${cardId}/memberships`, data);
const deleteCardMembership = (cardId, userId, headers) =>
socket.delete(`/cards/${cardId}/memberships?userId=${userId}`, undefined, headers);
const deleteCardMembership = (cardId, userId) =>
socket.delete(`/cards/${cardId}/memberships?userId=${userId}`);
export default {
createCardMembership,
+10 -10
View File
@@ -35,8 +35,8 @@ export const transformCardData = (data) => ({
/* Actions */
const getCards = (boardId, data, headers) =>
socket.get(`/board/${boardId}/cards`, data, headers).then((body) => ({
const getCards = (boardId, data) =>
socket.get(`/board/${boardId}/cards`, data).then((body) => ({
...body,
items: body.items.map(transformCard),
included: {
@@ -45,26 +45,26 @@ const getCards = (boardId, data, headers) =>
},
}));
const createCard = (boardId, data, headers) =>
socket.post(`/boards/${boardId}/cards`, transformCardData(data), headers).then((body) => ({
const createCard = (boardId, data) =>
socket.post(`/boards/${boardId}/cards`, transformCardData(data)).then((body) => ({
...body,
item: transformCard(body.item),
}));
const getCard = (id, headers) =>
socket.get(`/cards/${id}`, undefined, headers).then((body) => ({
const getCard = (id) =>
socket.get(`/cards/${id}`).then((body) => ({
...body,
item: transformCard(body.item),
}));
const updateCard = (id, data, headers) =>
socket.patch(`/cards/${id}`, transformCardData(data), headers).then((body) => ({
const updateCard = (id, data) =>
socket.patch(`/cards/${id}`, transformCardData(data)).then((body) => ({
...body,
item: transformCard(body.item),
}));
const deleteCard = (id, headers) =>
socket.delete(`/cards/${id}`, undefined, headers).then((body) => ({
const deleteCard = (id) =>
socket.delete(`/cards/${id}`).then((body) => ({
...body,
item: transformCard(body.item),
}));
+6 -6
View File
@@ -3,20 +3,20 @@ import { transformAction } from './actions';
/* Actions */
const createCommentAction = (cardId, data, headers) =>
socket.post(`/cards/${cardId}/comment-actions`, data, headers).then((body) => ({
const createCommentAction = (cardId, data) =>
socket.post(`/cards/${cardId}/comment-actions`, data).then((body) => ({
...body,
item: transformAction(body.item),
}));
const updateCommentAction = (id, data, headers) =>
socket.patch(`/comment-actions/${id}`, data, headers).then((body) => ({
const updateCommentAction = (id, data) =>
socket.patch(`/comment-actions/${id}`, data).then((body) => ({
...body,
item: transformAction(body.item),
}));
const deleteCommentAction = (id, headers) =>
socket.delete(`/comment-actions/${id}`, undefined, headers).then((body) => ({
const deleteCommentAction = (id) =>
socket.delete(`/comment-actions/${id}`).then((body) => ({
...body,
item: transformAction(body.item),
}));
+2 -2
View File
@@ -6,7 +6,7 @@ const http = {};
// TODO: add all methods
['POST'].forEach((method) => {
http[method.toLowerCase()] = (url, data, headers) => {
http[method.toLowerCase()] = (url, data) => {
const formData = Object.keys(data).reduce((result, key) => {
result.append(key, data[key]);
@@ -15,8 +15,8 @@ const http = {};
return fetch(`${Config.SERVER_BASE_URL}/api${url}`, {
method,
headers,
body: formData,
...Config.FETCH_OPTIONS,
})
.then((response) =>
response.json().then((body) => ({
+3 -4
View File
@@ -2,12 +2,11 @@ import socket from './socket';
/* Actions */
const createLabel = (boardId, data, headers) =>
socket.post(`/boards/${boardId}/labels`, data, headers);
const createLabel = (boardId, data) => socket.post(`/boards/${boardId}/labels`, data);
const updateLabel = (id, data, headers) => socket.patch(`/labels/${id}`, data, headers);
const updateLabel = (id, data) => socket.patch(`/labels/${id}`, data);
const deleteLabel = (id, headers) => socket.delete(`/labels/${id}`, undefined, headers);
const deleteLabel = (id) => socket.delete(`/labels/${id}`);
export default {
createLabel,
+3 -4
View File
@@ -2,12 +2,11 @@ import socket from './socket';
/* Actions */
const createList = (boardId, data, headers) =>
socket.post(`/boards/${boardId}/lists`, data, headers);
const createList = (boardId, data) => socket.post(`/boards/${boardId}/lists`, data);
const updateList = (id, data, headers) => socket.patch(`/lists/${id}`, data, headers);
const updateList = (id, data) => socket.patch(`/lists/${id}`, data);
const deleteList = (id, headers) => socket.delete(`/lists/${id}`, undefined, headers);
const deleteList = (id) => socket.delete(`/lists/${id}`);
export default {
createList,
+5 -6
View File
@@ -4,8 +4,8 @@ import { transformAction } from './actions';
/* Actions */
const getNotifications = (headers) =>
socket.get('/notifications', undefined, headers).then((body) => ({
const getNotifications = () =>
socket.get('/notifications').then((body) => ({
...body,
included: {
...body.included,
@@ -14,8 +14,8 @@ const getNotifications = (headers) =>
},
}));
const getNotification = (id, headers) =>
socket.get(`/notifications/${id}`, undefined, headers).then((body) => ({
const getNotification = (id) =>
socket.get(`/notifications/${id}`).then((body) => ({
...body,
included: {
...body.included,
@@ -24,8 +24,7 @@ const getNotification = (id, headers) =>
},
}));
const updateNotifications = (ids, data, headers) =>
socket.patch(`/notifications/${ids.join(',')}`, data, headers);
const updateNotifications = (ids, data) => socket.patch(`/notifications/${ids.join(',')}`, data);
export default {
getNotifications,
+3 -4
View File
@@ -2,11 +2,10 @@ import socket from './socket';
/* Actions */
const createProjectManager = (projectId, data, headers) =>
socket.post(`/projects/${projectId}/managers`, data, headers);
const createProjectManager = (projectId, data) =>
socket.post(`/projects/${projectId}/managers`, data);
const deleteProjectManager = (id, headers) =>
socket.delete(`/project-managers/${id}`, undefined, headers);
const deleteProjectManager = (id) => socket.delete(`/project-managers/${id}`);
export default {
createProjectManager,
+7 -7
View File
@@ -3,18 +3,18 @@ import socket from './socket';
/* Actions */
const getProjects = (headers) => socket.get('/projects', undefined, headers);
const getProjects = () => socket.get('/projects');
const createProject = (data, headers) => socket.post('/projects', data, headers);
const createProject = (data) => socket.post('/projects', data);
const getProject = (id, headers) => socket.get(`/projects/${id}`, undefined, headers);
const getProject = (id) => socket.get(`/projects/${id}`);
const updateProject = (id, data, headers) => socket.patch(`/projects/${id}`, data, headers);
const updateProject = (id, data) => socket.patch(`/projects/${id}`, data);
const updateProjectBackgroundImage = (id, data, headers) =>
http.post(`/projects/${id}/background-image`, data, headers);
const updateProjectBackgroundImage = (id, data) =>
http.post(`/projects/${id}/background-image`, data);
const deleteProject = (id, headers) => socket.delete(`/projects/${id}`, undefined, headers);
const deleteProject = (id) => socket.delete(`/projects/${id}`);
export default {
getProjects,
+1 -2
View File
@@ -16,13 +16,12 @@ const { socket } = io;
socket.connect = socket._connect; // eslint-disable-line no-underscore-dangle
['GET', 'POST', 'PUT', 'PATCH', 'DELETE'].forEach((method) => {
socket[method.toLowerCase()] = (url, data, headers) =>
socket[method.toLowerCase()] = (url, data) =>
new Promise((resolve, reject) => {
socket.request(
{
method,
data,
headers,
url: `/api${url}`,
},
(_, { body, error }) => {
+3 -3
View File
@@ -2,11 +2,11 @@ import socket from './socket';
/* Actions */
const createTask = (cardId, data, headers) => socket.post(`/cards/${cardId}/tasks`, data, headers);
const createTask = (cardId, data) => socket.post(`/cards/${cardId}/tasks`, data);
const updateTask = (id, data, headers) => socket.patch(`/tasks/${id}`, data, headers);
const updateTask = (id, data) => socket.patch(`/tasks/${id}`, data);
const deleteTask = (id, headers) => socket.delete(`/tasks/${id}`, undefined, headers);
const deleteTask = (id) => socket.delete(`/tasks/${id}`);
export default {
createTask,
+10 -12
View File
@@ -3,27 +3,25 @@ import socket from './socket';
/* Actions */
const getUsers = (headers) => socket.get('/users', undefined, headers);
const getUsers = () => socket.get('/users');
const createUser = (data, headers) => socket.post('/users', data, headers);
const createUser = (data) => socket.post('/users', data);
const getUser = (id, headers) => socket.get(`/users/${id}`, undefined, headers);
const getUser = (id) => socket.get(`/users/${id}`);
const getCurrentUser = (headers) => socket.get('/users/me', undefined, headers);
const getCurrentUser = () => socket.get('/users/me');
const updateUser = (id, data, headers) => socket.patch(`/users/${id}`, data, headers);
const updateUser = (id, data) => socket.patch(`/users/${id}`, data);
const updateUserEmail = (id, data, headers) => socket.patch(`/users/${id}/email`, data, headers);
const updateUserEmail = (id, data) => socket.patch(`/users/${id}/email`, data);
const updateUserPassword = (id, data, headers) =>
socket.patch(`/users/${id}/password`, data, headers);
const updateUserPassword = (id, data) => socket.patch(`/users/${id}/password`, data);
const updateUserUsername = (id, data, headers) =>
socket.patch(`/users/${id}/username`, data, headers);
const updateUserUsername = (id, data) => socket.patch(`/users/${id}/username`, data);
const updateUserAvatar = (id, data, headers) => http.post(`/users/${id}/avatar`, data, headers);
const updateUserAvatar = (id, data) => http.post(`/users/${id}/avatar`, data);
const deleteUser = (id, headers) => socket.delete(`/users/${id}`, undefined, headers);
const deleteUser = (id) => socket.delete(`/users/${id}`);
export default {
getUsers,
@@ -38,9 +38,9 @@ const ItemComment = React.memo(
</div>
<CommentEdit ref={commentEdit} defaultData={data} onUpdate={onUpdate}>
<>
<Markdown linkTarget="_blank" className={styles.text}>
{data.text}
</Markdown>
<div className={styles.text}>
<Markdown linkTarget="_blank">{data.text}</Markdown>
</div>
{canEdit && (
<Comment.Actions>
<Comment.Action
@@ -34,13 +34,6 @@
max-width: 100%;
overflow: hidden;
padding: 8px 12px;
text-overflow: ellipsis;
white-space: pre-line;
word-break: break-word;
img {
max-width: 100%;
}
}
.title {
@@ -115,23 +115,13 @@
border: none;
color: #17394d;
cursor: pointer;
line-height: 1.5;
font-size: 15px;
margin-bottom: 8px;
outline: none;
overflow: hidden;
overflow-wrap: break-word;
padding: 0;
text-align: left;
width: 100%;
p {
white-space: pre-line;
}
img {
max-width: 100%;
}
}
.grid {
+13 -1
View File
@@ -2,12 +2,24 @@ const SERVER_BASE_URL =
process.env.REACT_APP_SERVER_BASE_URL ||
(process.env.NODE_ENV === 'production' ? '' : 'http://localhost:1337');
const POSITION_GAP = 65535;
const FETCH_OPTIONS =
process.env.NODE_ENV === 'production'
? undefined
: {
credentials: 'include',
};
const ACCESS_TOKEN_KEY = 'accessToken';
const ACCESS_TOKEN_EXPIRES = 365;
const POSITION_GAP = 65535;
const ACTIONS_LIMIT = 10;
export default {
SERVER_BASE_URL,
FETCH_OPTIONS,
ACCESS_TOKEN_KEY,
ACCESS_TOKEN_EXPIRES,
POSITION_GAP,
ACTIONS_LIMIT,
};
+7 -2
View File
@@ -58,7 +58,7 @@ i18n
.use(initReactI18next)
.init({
resources: embedLocales,
fallbackLng: false,
fallbackLng: 'en',
supportedLngs: languages,
load: 'languageOnly',
interpolation: {
@@ -79,7 +79,11 @@ i18n
debug: process.env.NODE_ENV !== 'production',
});
i18n.loadCoreLocale = (language) =>
i18n.loadCoreLocale = (language = i18n.resolvedLanguage) => {
if (language === 'en') {
return;
}
import(`./locales/${language}/core`).then((module) => {
const locale = module.default;
@@ -91,5 +95,6 @@ i18n.loadCoreLocale = (language) =>
}
});
});
};
export default i18n;
@@ -1,7 +1,9 @@
import React, { useCallback } from 'react';
import PropTypes from 'prop-types';
import ReactMarkdown from 'react-markdown';
import gfm from 'remark-gfm';
import remarkGfm from 'remark-gfm';
import './Markdown.module.scss'; // FIXME: import as styles?
const Markdown = React.memo(({ linkStopPropagation, ...props }) => {
const handleLinkClick = useCallback((event) => {
@@ -21,16 +23,23 @@ const Markdown = React.memo(({ linkStopPropagation, ...props }) => {
[handleLinkClick],
);
let renderers;
let components;
if (linkStopPropagation) {
renderers = {
link: linkRenderer,
components = {
a: linkRenderer,
};
}
// eslint-disable-next-line react/jsx-props-no-spreading
return <ReactMarkdown {...props} plugins={[gfm]} renderers={renderers} />;
return (
/* eslint-disable react/jsx-props-no-spreading */
<ReactMarkdown
{...props}
components={components}
remarkPlugins={[remarkGfm]}
className="markdown-body"
/>
/* eslint-enable react/jsx-props-no-spreading */
);
});
Markdown.propTypes = {
@@ -0,0 +1,942 @@
:global {
.markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
margin: 0;
/* color: #24292f;
background-color: #ffffff;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
font-size: 16px; */
line-height: 1.5;
word-wrap: break-word;
}
.markdown-body .octicon {
display: inline-block;
fill: currentColor;
vertical-align: text-bottom;
}
.markdown-body h1:hover .anchor .octicon-link:before,
.markdown-body h2:hover .anchor .octicon-link:before,
.markdown-body h3:hover .anchor .octicon-link:before,
.markdown-body h4:hover .anchor .octicon-link:before,
.markdown-body h5:hover .anchor .octicon-link:before,
.markdown-body h6:hover .anchor .octicon-link:before {
width: 16px;
height: 16px;
content: ' ';
display: inline-block;
background-color: currentColor;
-webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");
mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");
}
.markdown-body details,
.markdown-body figcaption,
.markdown-body figure {
display: block;
}
.markdown-body summary {
display: list-item;
}
.markdown-body [hidden] {
display: none !important;
}
.markdown-body a {
background-color: transparent;
color: #0969da;
text-decoration: none;
}
.markdown-body a:active,
.markdown-body a:hover {
outline-width: 0;
}
.markdown-body abbr[title] {
border-bottom: none;
text-decoration: underline dotted;
}
.markdown-body b,
.markdown-body strong {
font-weight: 600;
}
.markdown-body dfn {
font-style: italic;
}
.markdown-body h1 {
margin: .67em 0;
font-weight: 600;
padding-bottom: .3em;
font-size: 2em;
border-bottom: 1px solid hsla(210, 18%, 87%, 1);
}
.markdown-body mark {
background-color: #fff8c5;
color: #24292f;
}
.markdown-body small {
font-size: 90%;
}
.markdown-body sub,
.markdown-body sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
.markdown-body sub {
bottom: -0.25em;
}
.markdown-body sup {
top: -0.5em;
}
.markdown-body img {
border-style: none;
max-width: 100%;
box-sizing: content-box;
background-color: #ffffff;
}
.markdown-body code,
.markdown-body kbd,
.markdown-body pre,
.markdown-body samp {
font-family: monospace, monospace;
font-size: 1em;
}
.markdown-body figure {
margin: 1em 40px;
}
.markdown-body hr {
box-sizing: content-box;
overflow: hidden;
background: transparent;
border-bottom: 1px solid hsla(210, 18%, 87%, 1);
height: .25em;
padding: 0;
margin: 24px 0;
background-color: #d0d7de;
border: 0;
}
.markdown-body input {
font: inherit;
margin: 0;
overflow: visible;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
.markdown-body [type=button],
.markdown-body [type=reset],
.markdown-body [type=submit] {
-webkit-appearance: button;
}
.markdown-body [type=button]::-moz-focus-inner,
.markdown-body [type=reset]::-moz-focus-inner,
.markdown-body [type=submit]::-moz-focus-inner {
border-style: none;
padding: 0;
}
.markdown-body [type=button]:-moz-focusring,
.markdown-body [type=reset]:-moz-focusring,
.markdown-body [type=submit]:-moz-focusring {
outline: 1px dotted ButtonText;
}
.markdown-body [type=checkbox],
.markdown-body [type=radio] {
box-sizing: border-box;
padding: 0;
}
.markdown-body [type=number]::-webkit-inner-spin-button,
.markdown-body [type=number]::-webkit-outer-spin-button {
height: auto;
}
.markdown-body [type=search] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
.markdown-body [type=search]::-webkit-search-cancel-button,
.markdown-body [type=search]::-webkit-search-decoration {
-webkit-appearance: none;
}
.markdown-body ::-webkit-input-placeholder {
color: inherit;
opacity: .54;
}
.markdown-body ::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit;
}
.markdown-body a:hover {
text-decoration: underline;
}
.markdown-body hr::before {
display: table;
content: "";
}
.markdown-body hr::after {
display: table;
clear: both;
content: "";
}
.markdown-body table {
border-spacing: 0;
border-collapse: collapse;
display: block;
width: max-content;
max-width: 100%;
overflow: auto;
}
.markdown-body td,
.markdown-body th {
padding: 0;
}
.markdown-body details summary {
cursor: pointer;
}
.markdown-body details:not([open])>*:not(summary) {
display: none !important;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
line-height: 10px;
color: #24292f;
vertical-align: middle;
background-color: #f6f8fa;
border: solid 1px rgba(175, 184, 193, 0.2);
border-bottom-color: rgba(175, 184, 193, 0.2);
border-radius: 6px;
box-shadow: inset 0 -1px 0 rgba(175, 184, 193, 0.2);
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 24px;
margin-bottom: 16px;
font-weight: 600;
line-height: 1.25;
}
.markdown-body h2 {
font-weight: 600;
padding-bottom: .3em;
font-size: 1.5em;
border-bottom: 1px solid hsla(210, 18%, 87%, 1);
}
.markdown-body h3 {
font-weight: 600;
font-size: 1.25em;
}
.markdown-body h4 {
font-weight: 600;
font-size: 1em;
}
.markdown-body h5 {
font-weight: 600;
font-size: .875em;
}
.markdown-body h6 {
font-weight: 600;
font-size: .85em;
color: #57606a;
}
.markdown-body p {
margin-top: 0;
margin-bottom: 10px;
}
.markdown-body blockquote {
margin: 0;
padding: 0 1em;
color: #57606a;
border-left: .25em solid #d0d7de;
}
.markdown-body ul,
.markdown-body ol {
margin-top: 0;
margin-bottom: 0;
padding-left: 2em;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.markdown-body dd {
margin-left: 0;
}
.markdown-body tt,
.markdown-body code {
font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
font-size: 12px;
}
.markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
font-size: 12px;
word-wrap: normal;
}
.markdown-body .octicon {
display: inline-block;
overflow: visible !important;
vertical-align: text-bottom;
fill: currentColor;
}
.markdown-body ::placeholder {
color: #6e7781;
opacity: 1;
}
.markdown-body input::-webkit-outer-spin-button,
.markdown-body input::-webkit-inner-spin-button {
margin: 0;
-webkit-appearance: none;
appearance: none;
}
.markdown-body .pl-c {
color: #6e7781;
}
.markdown-body .pl-c1,
.markdown-body .pl-s .pl-v {
color: #0550ae;
}
.markdown-body .pl-e,
.markdown-body .pl-en {
color: #8250df;
}
.markdown-body .pl-smi,
.markdown-body .pl-s .pl-s1 {
color: #24292f;
}
.markdown-body .pl-ent {
color: #116329;
}
.markdown-body .pl-k {
color: #cf222e;
}
.markdown-body .pl-s,
.markdown-body .pl-pds,
.markdown-body .pl-s .pl-pse .pl-s1,
.markdown-body .pl-sr,
.markdown-body .pl-sr .pl-cce,
.markdown-body .pl-sr .pl-sre,
.markdown-body .pl-sr .pl-sra {
color: #0a3069;
}
.markdown-body .pl-v,
.markdown-body .pl-smw {
color: #953800;
}
.markdown-body .pl-bu {
color: #82071e;
}
.markdown-body .pl-ii {
color: #f6f8fa;
background-color: #82071e;
}
.markdown-body .pl-c2 {
color: #f6f8fa;
background-color: #cf222e;
}
.markdown-body .pl-sr .pl-cce {
font-weight: bold;
color: #116329;
}
.markdown-body .pl-ml {
color: #3b2300;
}
.markdown-body .pl-mh,
.markdown-body .pl-mh .pl-en,
.markdown-body .pl-ms {
font-weight: bold;
color: #0550ae;
}
.markdown-body .pl-mi {
font-style: italic;
color: #24292f;
}
.markdown-body .pl-mb {
font-weight: bold;
color: #24292f;
}
.markdown-body .pl-md {
color: #82071e;
background-color: #FFEBE9;
}
.markdown-body .pl-mi1 {
color: #116329;
background-color: #dafbe1;
}
.markdown-body .pl-mc {
color: #953800;
background-color: #ffd8b5;
}
.markdown-body .pl-mi2 {
color: #eaeef2;
background-color: #0550ae;
}
.markdown-body .pl-mdr {
font-weight: bold;
color: #8250df;
}
.markdown-body .pl-ba {
color: #57606a;
}
.markdown-body .pl-sg {
color: #8c959f;
}
.markdown-body .pl-corl {
text-decoration: underline;
color: #0a3069;
}
.markdown-body [data-catalyst] {
display: block;
}
.markdown-body g-emoji {
font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-size: 1em;
font-style: normal !important;
font-weight: 400;
line-height: 1;
vertical-align: -0.075em;
}
.markdown-body g-emoji img {
width: 1em;
height: 1em;
}
.markdown-body::before {
display: table;
content: "";
}
.markdown-body::after {
display: table;
clear: both;
content: "";
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.markdown-body a:not([href]) {
color: inherit;
text-decoration: none;
}
.markdown-body .absent {
color: #cf222e;
}
.markdown-body .anchor {
float: left;
padding-right: 4px;
margin-left: -20px;
line-height: 1;
}
.markdown-body .anchor:focus {
outline: none;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre,
.markdown-body details {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body blockquote>:first-child {
margin-top: 0;
}
.markdown-body blockquote>:last-child {
margin-bottom: 0;
}
.markdown-body sup>a::before {
content: "[";
}
.markdown-body sup>a::after {
content: "]";
}
.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
color: #24292f;
vertical-align: middle;
visibility: hidden;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
text-decoration: none;
}
.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
visibility: visible;
}
.markdown-body h1 tt,
.markdown-body h1 code,
.markdown-body h2 tt,
.markdown-body h2 code,
.markdown-body h3 tt,
.markdown-body h3 code,
.markdown-body h4 tt,
.markdown-body h4 code,
.markdown-body h5 tt,
.markdown-body h5 code,
.markdown-body h6 tt,
.markdown-body h6 code {
padding: 0 .2em;
font-size: inherit;
}
.markdown-body ul.no-list,
.markdown-body ol.no-list {
padding: 0;
list-style-type: none;
}
.markdown-body ol[type="1"] {
list-style-type: decimal;
}
.markdown-body ol[type=a] {
list-style-type: lower-alpha;
}
.markdown-body ol[type=i] {
list-style-type: lower-roman;
}
.markdown-body div>ol:not([type]) {
list-style-type: decimal;
}
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body li>p {
margin-top: 16px;
}
.markdown-body li+li {
margin-top: .25em;
}
.markdown-body dl {
padding: 0;
}
.markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: 600;
}
.markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.markdown-body table th {
font-weight: 600;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid #d0d7de;
}
.markdown-body table tr {
background-color: #ffffff;
border-top: 1px solid hsla(210, 18%, 87%, 1);
}
.markdown-body table tr:nth-child(2n) {
background-color: #f6f8fa;
}
.markdown-body table img {
background-color: transparent;
}
.markdown-body img[align=right] {
padding-left: 20px;
}
.markdown-body img[align=left] {
padding-right: 20px;
}
.markdown-body .emoji {
max-width: none;
vertical-align: text-top;
background-color: transparent;
}
.markdown-body span.frame {
display: block;
overflow: hidden;
}
.markdown-body span.frame>span {
display: block;
float: left;
width: auto;
padding: 7px;
margin: 13px 0 0;
overflow: hidden;
border: 1px solid #d0d7de;
}
.markdown-body span.frame span img {
display: block;
float: left;
}
.markdown-body span.frame span span {
display: block;
padding: 5px 0 0;
clear: both;
color: #24292f;
}
.markdown-body span.align-center {
display: block;
overflow: hidden;
clear: both;
}
.markdown-body span.align-center>span {
display: block;
margin: 13px auto 0;
overflow: hidden;
text-align: center;
}
.markdown-body span.align-center span img {
margin: 0 auto;
text-align: center;
}
.markdown-body span.align-right {
display: block;
overflow: hidden;
clear: both;
}
.markdown-body span.align-right>span {
display: block;
margin: 13px 0 0;
overflow: hidden;
text-align: right;
}
.markdown-body span.align-right span img {
margin: 0;
text-align: right;
}
.markdown-body span.float-left {
display: block;
float: left;
margin-right: 13px;
overflow: hidden;
}
.markdown-body span.float-left span {
margin: 13px 0 0;
}
.markdown-body span.float-right {
display: block;
float: right;
margin-left: 13px;
overflow: hidden;
}
.markdown-body span.float-right>span {
display: block;
margin: 13px auto 0;
overflow: hidden;
text-align: right;
}
.markdown-body code,
.markdown-body tt {
padding: .2em .4em;
margin: 0;
font-size: 85%;
background-color: rgba(175, 184, 193, 0.2);
border-radius: 6px;
}
.markdown-body code br,
.markdown-body tt br {
display: none;
}
.markdown-body del code {
text-decoration: inherit;
}
.markdown-body pre code {
font-size: 100%;
}
.markdown-body pre>code {
padding: 0;
margin: 0;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.markdown-body .highlight {
margin-bottom: 16px;
}
.markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.markdown-body .highlight pre,
.markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f6f8fa;
border-radius: 6px;
}
.markdown-body pre code,
.markdown-body pre tt {
display: inline;
max-width: auto;
padding: 0;
margin: 0;
overflow: visible;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.markdown-body .csv-data td,
.markdown-body .csv-data th {
padding: 5px;
overflow: hidden;
font-size: 12px;
line-height: 1;
text-align: left;
white-space: nowrap;
}
.markdown-body .csv-data .blob-num {
padding: 10px 8px 9px;
text-align: right;
background: #ffffff;
border: 0;
}
.markdown-body .csv-data tr {
border-top: 0;
}
.markdown-body .csv-data th {
font-weight: 600;
background: #f6f8fa;
border-top: 0;
}
.markdown-body .footnotes {
font-size: 12px;
color: #57606a;
border-top: 1px solid #d0d7de;
}
.markdown-body .footnotes ol {
padding-left: 16px;
}
.markdown-body .footnotes li {
position: relative;
}
.markdown-body .footnotes li:target::before {
position: absolute;
top: -8px;
right: -8px;
bottom: -8px;
left: -24px;
pointer-events: none;
content: "";
border: 2px solid #0969da;
border-radius: 6px;
}
.markdown-body .footnotes li:target {
color: #24292f;
}
.markdown-body .footnotes .data-footnote-backref g-emoji {
font-family: monospace;
}
.markdown-body .task-list-item {
list-style-type: none;
}
.markdown-body .task-list-item label {
font-weight: 400;
}
.markdown-body .task-list-item.enabled label {
cursor: pointer;
}
.markdown-body .task-list-item+.task-list-item {
margin-top: 3px;
}
.markdown-body .task-list-item .handle {
display: none;
}
.markdown-body .task-list-item-checkbox {
margin: 0 .2em .25em -1.6em;
vertical-align: middle;
}
.markdown-body .contains-task-list:dir(rtl) .task-list-item-checkbox {
margin: 0 -1.6em .25em .2em;
}
.markdown-body ::-webkit-calendar-picker-indicator {
filter: invert(50%);
}
}
+19 -3
View File
@@ -17,9 +17,10 @@ export default {
actions: 'Akce',
addAttachment_title: 'Přidat přílohu',
addComment: 'Přidat komentář',
addManager_title: 'Přidat vedoucího',
addMember_title: 'Přidat člena',
addUser_title: 'Přidat uživatele',
administrator: 'Administrator',
administrator: 'Administrátor',
all: 'Vše',
allChangesWillBeAutomaticallySavedAfterConnectionRestored:
'Všechny změny budou automaticky uloženy<br />po obnově spojení',
@@ -32,11 +33,16 @@ export default {
areYouSureYouWantToDeleteThisProject: 'Opravdu chcete smazat tento projekt?',
areYouSureYouWantToDeleteThisTask: 'Opravdu chcete smazat tento úkol?',
areYouSureYouWantToDeleteThisUser: 'Opravdu chcete smazat tohoto uživatele?',
areYouSureYouWantToRemoveThisMemberFromProject:
'Opravdu chcete odstranit tohoto člena z projektu?',
areYouSureYouWantToLeaveBoard: 'Opravdu chcete opustit tuto tabuli?',
areYouSureYouWantToLeaveProject: 'Opravdu chcete opustit projekt?',
areYouSureYouWantToRemoveThisManagerFromProject:
'Are you sure you want to remove this manager from the project?',
areYouSureYouWantToRemoveThisMemberFromBoard:
'Opravdu chcete odstranit tohoto člena z tabule?',
attachment: 'Příloha',
attachments: 'Přílohy',
authentication: 'Ověření',
background: 'Pozadí',
board: 'Tabule',
boardNotFound_title: 'Tabule nenalezena',
cardActions_title: 'Akce na kartě',
@@ -49,6 +55,7 @@ export default {
createProject_title: 'Vytvořit projekt',
createTextFile_title: 'Vytvořit textový soubor',
currentPassword: 'Aktuální heslo',
dangerZone_title: 'Nebezpečná zóna',
date: 'Datum',
dueDate_title: 'Termín do',
deleteAttachment_title: 'Smazat přílohu',
@@ -82,11 +89,15 @@ export default {
filterByLabels_title: 'Filtruj podle štítku',
filterByMembers_title: 'Filtruj podle člena',
fromComputer_title: 'Z počítače',
general: 'Obecné',
hours: 'Hodiny',
invalidCurrentPassword: 'Neplatné aktuální heslo',
labels: 'Štítky',
leaveBoard_title: 'Opustit tabuli',
leaveProject_title: 'Opustit projekt',
list: 'Seznam',
listActions_title: 'Seznam akcí',
managers: 'Vedoucí',
members: 'Členové',
minutes: 'Minuty',
moveCard_title: 'Přesunout kartu',
@@ -109,6 +120,7 @@ export default {
'Tip: dejte Ctrl-V (Cmd-V na Mac) pro vložení přílohy ze schránky.',
project: 'Projekt',
projectNotFound_title: 'Projekt nenalezen',
removeManager_title: 'Odstranit vedoucího',
removeMember_title: 'Odstranit člena',
seconds: 'Vteřin',
selectBoard: 'Vybrat tabuli',
@@ -174,6 +186,8 @@ export default {
editTimer_title: 'Upravit časovač',
editTitle_title: 'Upravit titulek',
editUsername_title: 'Upravit uživatelské jméno',
leaveBoard: 'Opustit tabuli',
leaveProject: 'Opustit projekt',
logOut_title: 'Odhlásit se',
makeCover_title: 'Vytvořit obal',
move: 'Přesunout',
@@ -181,7 +195,9 @@ export default {
remove: 'Odstranit',
removeBackground: 'Odstranit pozadí',
removeCover_title: 'Odstranit obal',
removeFromBoard: 'Odstranit z tabule',
removeFromProject: 'Odstranit z projektu',
removeManager: 'Odstranit vedoucího',
removeMember: 'Odstranit člena',
save: 'Uložit',
showAllAttachments: 'Zozbrazit všechny přílohy ({{hidden}} skryté)',
+18 -2
View File
@@ -17,6 +17,7 @@ export default {
actions: 'Aktionen',
addAttachment_title: 'Anhang hinzufügen',
addComment: 'Kommentar hinzufügen',
addManager_title: 'Manager hinzufügen',
addMember_title: 'Mitglied hinzufügen',
addUser_title: 'Benutzer hinzufügen',
administrator: 'Administrator',
@@ -36,11 +37,16 @@ export default {
areYouSureYouWantToDeleteThisTask: 'Sind Sie sicher, dass Sie diese Aufgabe löschen möchten?',
areYouSureYouWantToDeleteThisUser:
'Sind Sie sicher, dass Sie diesen Benutzer löschen möchten?',
areYouSureYouWantToRemoveThisMemberFromProject:
'Sind Sie sicher, dass Sie dieses Mitglied aus dem Projekt entfernen möchten??',
areYouSureYouWantToLeaveBoard: 'Sind Sie sicher, dass Sie das Board verlassen möchten?',
areYouSureYouWantToLeaveProject: 'Sind Sie sicher, dass Sie das Projekt verlassen möchten?',
areYouSureYouWantToRemoveThisManagerFromProject:
'Sind Sie sicher, dass Sie diesen Manager aus dem Projekt entfernen möchten?',
areYouSureYouWantToRemoveThisMemberFromBoard:
'Sind Sie sicher, dass Sie dieses Mitglied aus dem Board entfernen möchten?',
attachment: 'Anhang',
attachments: 'Anhänge',
authentication: 'Authentifizierung',
background: 'Hintergrund',
board: 'Board',
boardNotFound_title: 'Board nicht gefunden',
cardActions_title: 'Kartenaktionen',
@@ -53,6 +59,7 @@ export default {
createProject_title: 'Projekt erstellen',
createTextFile_title: 'Textdatei erstellen',
currentPassword: 'Derzeitiges Password',
dangerZone_title: 'Gefährlicher Bereich',
date: 'Datum',
dueDate_title: 'Fälligkeitsdatum',
deleteAttachment_title: 'Anhang löschen',
@@ -86,11 +93,15 @@ export default {
filterByLabels_title: 'Nach Label filtern',
filterByMembers_title: 'Nach Mitgliedern filtern',
fromComputer_title: 'Vom Computer',
general: 'Allgemein',
hours: 'Stunden',
invalidCurrentPassword: 'Das aktuelle Passwort ist falsch',
labels: 'Labels',
leaveBoard_title: 'Board verlassen',
leaveProject_title: 'Projekt verlassen',
list: 'Listen',
listActions_title: 'Aufgaben auflisten',
managers: 'Manager',
members: 'Mitglieder',
minutes: 'Minuten',
moveCard_title: 'Karte verschieben',
@@ -113,6 +124,7 @@ export default {
'Tipp: Drücken Sie STRG-V (Cmd-V auf Mac), um einen Anhang aus der Zwischenablage hinzuzufügen.',
project: 'Projekt',
projectNotFound_title: 'Projekt nicht gefunden',
removeManager_title: 'Manager entfernen',
removeMember_title: 'Mitglied entfernen',
seconds: 'Sekunden',
selectBoard: 'Board auswählen',
@@ -180,6 +192,8 @@ export default {
editTimer_title: 'Timer bearbeiten',
editTitle_title: 'Titel bearbeiten',
editUsername_title: 'Benutzername ändern',
leaveBoard: 'Board verlassen',
leaveProject: 'Projekt verlassen',
logOut_title: 'Ausloggen',
makeCover_title: 'als Vorschau festlegen',
move: 'Verschieben',
@@ -187,7 +201,9 @@ export default {
remove: 'Löschen',
removeBackground: 'Hintergrund löschen',
removeCover_title: 'Vorschau löschen',
removeFromBoard: 'Vom Board entfernen',
removeFromProject: 'Vom Projekt entfernen',
removeManager: 'Manager entfernen',
removeMember: 'Mitglied entfernen',
save: 'Speichern',
showAllAttachments: 'Alle Anhänge anzeigen ({{hidden}} versteckt)',
+24 -22
View File
@@ -1,29 +1,31 @@
import merge from 'lodash/merge';
import fromPairs from 'lodash/fromPairs';
import cs from './cs/embed';
import da from './da/embed';
import de from './de/embed';
import en from './en/embed';
import es from './es/embed';
import fr from './fr/embed';
import ja from './ja/embed';
import pl from './pl/embed';
import ru from './ru/embed';
import uz from './uz/embed';
import zh from './zh/embed';
import csLogin from './cs/login';
import daLogin from './da/login';
import deLogin from './de/login';
import enLogin from './en/login';
import enCore from './en/core';
import esLogin from './es/login';
import frLogin from './fr/login';
import jaLogin from './ja/login';
import plLogin from './pl/login';
import ruLogin from './ru/login';
import uzLogin from './uz/login';
import zhLogin from './zh/login';
const localePairs = [
['cs', cs],
['da', da],
['de', de],
['en', en],
['es', es],
['fr', fr],
['ja', ja],
['pl', pl],
['ru', ru],
['uz', uz],
['zh', zh],
['cs', csLogin],
['da', daLogin],
['de', deLogin],
['en', merge(enLogin, enCore)],
['es', esLogin],
['fr', frLogin],
['ja', jaLogin],
['pl', plLogin],
['ru', ruLogin],
['uz', uzLogin],
['zh', zhLogin],
];
export const languages = localePairs.map((locale) => locale[0]);
-7
View File
@@ -1,19 +1,12 @@
import { getAccessToken } from '../utils/access-token-storage';
import ActionTypes from '../constants/ActionTypes';
const initialState = {
accessToken: getAccessToken(),
userId: null,
};
// eslint-disable-next-line default-param-last
export default (state = initialState, { type, payload }) => {
switch (type) {
case ActionTypes.AUTHENTICATE__SUCCESS:
return {
...state,
accessToken: payload.accessToken,
};
case ActionTypes.SOCKET_RECONNECT_HANDLE:
case ActionTypes.CORE_INITIALIZE:
return {
+2 -7
View File
@@ -1,6 +1,5 @@
import { call, fork, join, put, select, take } from 'redux-saga/effects';
import { call, fork, join, put, take } from 'redux-saga/effects';
import { accessTokenSelector } from '../../selectors';
import { logout } from '../../actions';
import ErrorCodes from '../../constants/ErrorCodes';
@@ -13,12 +12,8 @@ function* queueRequest(method, ...args) {
} catch {} // eslint-disable-line no-empty
}
const accessToken = yield select(accessTokenSelector);
try {
return yield call(method, ...args, {
Authorization: `Bearer ${accessToken}`,
});
return yield call(method, ...args);
} catch (error) {
if (error.code === ErrorCodes.UNAUTHORIZED) {
yield put(logout()); // TODO: next url
+1 -1
View File
@@ -25,7 +25,7 @@ export function* initializeCoreService() {
notifications,
} = yield call(fetchCoreRequest); // TODO: handle error
yield call(i18n.loadCoreLocale, i18n.resolvedLanguage);
yield call(i18n.loadCoreLocale);
yield put(
initializeCore(
+3 -3
View File
@@ -1,11 +1,11 @@
import { call, select } from 'redux-saga/effects';
import { call } from 'redux-saga/effects';
import loginSaga from './login';
import coreSaga from './core';
import { accessTokenSelector } from '../selectors';
import { getAccessToken } from '../utils/access-token-storage';
export default function* rootSaga() {
const accessToken = yield select(accessTokenSelector);
const accessToken = yield call(getAccessToken);
if (!accessToken) {
yield call(loginSaga);
+19 -4
View File
@@ -1,11 +1,26 @@
const ACCESS_TOKEN_KEY = 'accessToken';
import Cookies from 'js-cookie';
export const getAccessToken = () => localStorage.getItem(ACCESS_TOKEN_KEY);
import Config from '../constants/Config';
export const setAccessToken = (accessToken) => {
localStorage.setItem(ACCESS_TOKEN_KEY, accessToken);
Cookies.set(Config.ACCESS_TOKEN_KEY, accessToken, {
expires: Config.ACCESS_TOKEN_EXPIRES,
});
};
export const getAccessToken = () => {
// TODO: remove migration
const accessToken = localStorage.getItem(Config.ACCESS_TOKEN_KEY);
if (accessToken) {
localStorage.removeItem(Config.ACCESS_TOKEN_KEY);
setAccessToken(accessToken);
return accessToken;
}
return Cookies.get(Config.ACCESS_TOKEN_KEY);
};
export const removeAccessToken = () => {
localStorage.removeItem(ACCESS_TOKEN_KEY);
Cookies.remove(Config.ACCESS_TOKEN_KEY);
};
+1 -1
View File
@@ -15,7 +15,7 @@ services:
volumes:
- user-avatars:/app/public/user-avatars
- project-background-images:/app/public/project-background-images
- attachments:/app/public/attachments
- attachments:/app/private/attachments
ports:
- 3000:1337
environment:
View File
+6 -3
View File
@@ -44,6 +44,7 @@
#
################################################
.env
config/local.js
################################################
@@ -134,9 +135,11 @@ public/user-avatars/*
!public/project-background-images
public/project-background-images/*
!public/project-background-images/.gitkeep
!public/attachments
public/attachments/*
!public/attachments/.gitkeep
private/*
!private/attachments
private/attachments/*
!private/attachments/.gitkeep
views/*
!views/.gitkeep
@@ -0,0 +1,67 @@
const fs = require('fs');
const path = require('path');
const Errors = {
ATTACHMENT_NOT_FOUND: {
attachmentNotFound: 'Attachment not found',
},
};
module.exports = {
inputs: {
id: {
type: 'string',
regex: /^[0-9]+$/,
required: true,
},
filename: {
type: 'string',
required: true,
},
},
exits: {
attachmentNotFound: {
responseType: 'notFound',
},
},
async fn(inputs, exits) {
const { currentUser } = this.req;
const { attachment, card, project } = await sails.helpers.attachments
.getProjectPath(inputs.id)
.intercept('pathNotFound', () => Errors.ATTACHMENT_NOT_FOUND);
const isBoardMember = await sails.helpers.users.isBoardMember(currentUser.id, card.boardId);
if (!isBoardMember) {
const isProjectManager = await sails.helpers.users.isProjectManager(
currentUser.id,
project.id,
);
if (!isProjectManager) {
throw Errors.ATTACHMENT_NOT_FOUND; // Forbidden
}
}
if (!attachment.isImage) {
throw Errors.ATTACHMENT_NOT_FOUND;
}
const filePath = path.join(
sails.config.custom.attachmentsPath,
attachment.dirname,
'thumbnails',
inputs.filename,
);
if (!fs.existsSync(filePath)) {
throw Errors.ATTACHMENT_NOT_FOUND;
}
this.res.setHeader('Content-Disposition', `inline; ${inputs.filename}`);
return exits.success(fs.createReadStream(filePath));
},
};
@@ -0,0 +1,69 @@
const fs = require('fs');
const path = require('path');
const Errors = {
ATTACHMENT_NOT_FOUND: {
attachmentNotFound: 'Attachment not found',
},
};
module.exports = {
inputs: {
id: {
type: 'string',
regex: /^[0-9]+$/,
required: true,
},
filename: {
type: 'string',
required: true,
},
},
exits: {
attachmentNotFound: {
responseType: 'notFound',
},
},
async fn(inputs, exits) {
const { currentUser } = this.req;
const { attachment, card, project } = await sails.helpers.attachments
.getProjectPath(inputs.id)
.intercept('pathNotFound', () => Errors.ATTACHMENT_NOT_FOUND);
const isBoardMember = await sails.helpers.users.isBoardMember(currentUser.id, card.boardId);
if (!isBoardMember) {
const isProjectManager = await sails.helpers.users.isProjectManager(
currentUser.id,
project.id,
);
if (!isProjectManager) {
throw Errors.ATTACHMENT_NOT_FOUND; // Forbidden
}
}
const filePath = path.join(
sails.config.custom.attachmentsPath,
attachment.dirname,
attachment.filename,
);
if (!fs.existsSync(filePath)) {
throw Errors.ATTACHMENT_NOT_FOUND;
}
let contentDisposition;
if (attachment.isImage || path.extname(attachment.filename) === '.pdf') {
contentDisposition = 'inline';
} else {
contentDisposition = `attachment; ${inputs.filename}`;
}
this.res.setHeader('Content-Disposition', contentDisposition);
return exits.success(fs.createReadStream(filePath));
},
};
+9 -4
View File
@@ -34,11 +34,16 @@ module.exports = function defineCurrentUserHook(sails) {
before: {
'/*': {
async fn(req, res, next) {
const { authorization: authorizationHeader } = req.headers;
if (authorizationHeader && TOKEN_PATTERN.test(authorizationHeader)) {
const accessToken = authorizationHeader.replace(TOKEN_PATTERN, '');
let accessToken;
if (req.headers.authorization) {
if (TOKEN_PATTERN.test(req.headers.authorization)) {
accessToken = req.headers.authorization.replace(TOKEN_PATTERN, '');
}
} else if (req.cookies.accessToken) {
accessToken = req.cookies.accessToken;
}
if (accessToken) {
req.currentUser = await getUser(accessToken);
}
+2 -2
View File
@@ -52,9 +52,9 @@ module.exports = {
customToJSON() {
return {
..._.omit(this, ['dirname', 'filename', 'isImage']),
url: `${sails.config.custom.attachmentsUrl}/${this.dirname}/${this.filename}`,
url: `${sails.config.custom.attachmentsUrl}/${this.id}/download/${this.filename}`,
coverUrl: this.isImage
? `${sails.config.custom.attachmentsUrl}/${this.dirname}/thumbnails/cover-256.jpg`
? `${sails.config.custom.attachmentsUrl}/${this.id}/download/thumbnails/cover-256.jpg`
: null,
};
},
+1 -1
View File
@@ -26,6 +26,6 @@ module.exports.custom = {
projectBackgroundImagesPath: path.join(sails.config.paths.public, 'project-background-images'),
projectBackgroundImagesUrl: `${process.env.BASE_URL}/project-background-images`,
attachmentsPath: path.join(sails.config.paths.public, 'attachments'),
attachmentsPath: path.join(sails.config.appPath, 'private', 'attachments'),
attachmentsUrl: `${process.env.BASE_URL}/attachments`,
};
-11
View File
@@ -18,21 +18,10 @@ module.exports.policies = {
'*': 'is-authenticated',
// 'users/index': ['is-authenticated', 'is-admin'],
'users/create': ['is-authenticated', 'is-admin'],
'users/delete': ['is-authenticated', 'is-admin'],
'projects/create': ['is-authenticated', 'is-admin'],
// 'projects/update': ['is-authenticated', 'is-admin'],
// 'projects/update-background-image': ['is-authenticated', 'is-admin'],
// 'projects/delete': ['is-authenticated', 'is-admin'],
// 'project-memberships/create': ['is-authenticated', 'is-admin'],
// 'project-memberships/delete': ['is-authenticated', 'is-admin'],
// 'boards/create': ['is-authenticated', 'is-admin'],
// 'boards/update': ['is-authenticated', 'is-admin'],
// 'boards/delete': ['is-authenticated', 'is-admin'],
'access-tokens/create': true,
};
+10
View File
@@ -75,6 +75,16 @@ module.exports.routes = {
'GET /api/notifications/:id': 'notifications/show',
'PATCH /api/notifications/:ids': 'notifications/update',
'GET /attachments/:id/download/:filename': {
action: 'attachments/download',
skipAssets: false,
},
'GET /attachments/:id/download/thumbnails/:filename': {
action: 'attachments/download-thumbnail',
skipAssets: false,
},
'GET /*': {
view: 'index',
skipAssets: true,
+1 -1
View File
@@ -31,7 +31,7 @@ module.exports.security = {
allRoutes: true,
allowOrigins: ['http://localhost:3000'],
allowRequestHeaders: ['Authorization'],
allowCredentials: false,
allowCredentials: true,
},
/**
+1 -1
View File
@@ -6,8 +6,8 @@ const knex = require('knex')(config); // eslint-disable-line import/order
try {
const isExists = await knex.schema.hasTable(config.migrations.tableName);
await knex.migrate.latest();
if (!isExists) {
await knex.migrate.latest();
await knex.seed.run();
}
} catch (error) {
@@ -16,4 +16,4 @@ module.exports.up = (knex) =>
table.index('user_id');
});
module.exports.down = (knex) => knex.schema.dropTable('project_membership');
module.exports.down = (knex) => knex.schema.dropTable('project_manager');