Compare commits

..
30 Commits
Author SHA1 Message Date
Maksim Eltyshev 36e4bef21b feat: Remove attachments from public access
Closes #219
2022-04-26 22:20:20 +05:00
Maksim Eltyshev 486e663a3d feat: Store accessToken in cookies instead of localStorage 2022-04-26 18:01:55 +05:00
Michael Fürnschuß 536064fdfe fix: Fix missed table name (#227) 2022-04-25 16:00:14 +05:00
Michael Fürnschuß f03bb5a78f feat: Update German translation (#228) 2022-04-25 15:45:24 +05:00
Maksim Eltyshev 8bf85e2eb6 ref: Rename .env file to sample, stop tracking .env file 2022-04-22 16:21:09 +05:00
Maksim Eltyshev e3d1d36857 fix: Fix markdown options and styles 2022-04-22 02:06:12 +05:00
Maksim Eltyshev 4371e16c8d feat: Fallback to English if translation is missing
Closes #175
2022-04-21 04:42:02 +05:00
Maksim Eltyshev ec7b4d7b24 ref: Fix locale file names 2022-04-21 04:20:04 +05:00
Maksim Eltyshev 7974c9dc5d docs: Add contributing guidelines 2022-04-20 19:36:24 +05:00
Michal VOLF e2a8f5b483 feat: Update Czech translation (#217) 2022-04-20 14:17:00 +05:00
Arcady "RKD" Chumachenko 5049034ae3 feat: Alway apply migrations on start-up (#172) 2022-04-20 04:52:42 +05:00
Maksim Eltyshev 16a822cc7d Prepare for release 2022-04-19 20:36:10 +05:00
Maksim Eltyshev 6f219e5368 Fix pre-commit hook, update dependencies 2022-04-19 02:52:19 +05:00
Maksim Eltyshev e239d85901 Update dependencies 2022-04-16 00:08:14 +05:00
Maksim Eltyshev f539e7b76d Fix language loading. Closes #207 2022-03-31 02:23:44 +05:00
Maksim Eltyshev 0c92623109 Update dependencies 2022-02-09 00:56:01 +05:00
Lorenz Brun 95ea1e97d3 Improve Docker cache efficiency and fix signal handling 2022-02-08 16:15:52 +05:00
Maksim Eltyshev 6f99d99683 Add date-fns locale for Danish language 2022-01-30 02:50:13 +05:00
Christiansen afdcd11da6 Add Danish translation 2022-01-30 02:46:41 +05:00
Maksim Eltyshev a628f116a7 Fix linting errors, fix default database url. Closes #193 2021-12-30 00:30:53 +05:00
Asliddinbek Azizovich 6b158f0f1d Add Uzbek language 2021-12-15 16:16:20 +05:00
RokkuCode f59981db79 Fix several spelling errors and grammar in German translation 2021-12-15 16:11:10 +05:00
MoaufmKlo 96fa39e830 Correct incorrect gender in German translation 2021-12-15 16:04:36 +05:00
MoaufmKlo 2efc20cc02 Improve German translation 2021-10-21 01:39:21 +05:00
SimonTagne 31d314736a Fix updates of username and email 2021-10-21 01:25:04 +05:00
dbrennand 729e5dac5e Make trustProxy configurable via environment variable 2021-10-21 01:24:19 +05:00
ejo090 07e58ffe0c Add Japanese language 2021-10-21 01:22:28 +05:00
Maksim Eltyshev 32aae89c6e Merge branch 'master' of https://github.com/plankanban/planka 2021-08-02 17:24:54 +05:00
Maksim Eltyshev 1a5c0f53f8 Fix board deletion, update dependencies. Closes #146 2021-08-02 17:23:56 +05:00
SohnyBohny b63f0742ba Fix invalid white-spaces in card description. Closes #141 2021-07-12 19:16:54 +05:00
92 changed files with 21856 additions and 28104 deletions
-12
View File
@@ -1,12 +0,0 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: meltyshev
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged
+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.
+18 -12
View File
@@ -1,22 +1,23 @@
FROM node AS client-builder
FROM node:lts AS client-builder
WORKDIR /app
COPY client .
COPY client/package.json client/package-lock.json ./
RUN npm install npm@latest --global \
&& npm install \
&& npm run build
&& npm install
FROM node:alpine
COPY client .
RUN npm run build
FROM node:lts-alpine
WORKDIR /app
COPY server .
COPY docker-start.sh start.sh
COPY server/.npmrc server/package.json server/package-lock.json ./
ARG ALPINE_VERSION=3.12
ARG VIPS_VERSION=8.10.2
ARG ALPINE_VERSION=3.15
ARG VIPS_VERSION=8.12.2
RUN apk -U upgrade \
&& apk add \
@@ -43,15 +44,20 @@ RUN apk -U upgrade \
&& rm -rf /tmp/vips-${VIPS_VERSION} \
&& npm install npm@latest --global \
&& npm install --production \
&& apk del vips-dependencies --purge \
&& chmod +x start.sh
&& apk del vips-dependencies --purge
COPY docker-start.sh 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
+2 -19
View File
@@ -1,6 +1,6 @@
# Planka
![David (path)](https://img.shields.io/david/plankanban/planka?path=client) ![Docker Pulls](https://img.shields.io/docker/pulls/meltyshev/planka) ![GitHub](https://img.shields.io/github/license/plankanban/planka)
![David (path)](https://img.shields.io/github/package-json/v/plankanban/planka) ![Docker Pulls](https://img.shields.io/docker/pulls/meltyshev/planka) ![GitHub](https://img.shields.io/github/license/plankanban/planka)
A Trello-like kanban board built with React and Redux.
@@ -8,8 +8,6 @@ A Trello-like kanban board built with React and Redux.
[**Client demo**](https://plankanban.github.io/planka) (without server features).
<a href="https://ko-fi.com/meltyshev" target="_blank"><img src="https://cdn.ko-fi.com/cdn/kofi4.png?v=2" alt="Buy Me a Coffee at ko-fi.com" border="0" height="36" style="border:0px;height:36px;" /></a>
## Features
- Create projects, boards, lists, cards, labels and tasks
@@ -21,23 +19,8 @@ A Trello-like kanban board built with React and Redux.
- User notifications
- Internationalization
## Roadmap
### Current task
Projects should have Managers who have the ability to create/edit/delete boards. Boards should have their own Members, so members won't see all boards, just those they belong to. Planka will be released after this breaking change.
### Future tasks
- Fetch last data after reconnection
- Custom fields
- Public boards
- Automatic actions
## Deploy
**Please note that Planka is NOT released yet, API and database structure may be changed!**
### Docker Compose
[![](https://d207aa93qlcgug.cloudfront.net/1.95.5.qa/img/nav/docker-logo-loggedout.png)](https://hub.docker.com/r/meltyshev/planka)
@@ -78,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
+16355 -23543
View File
File diff suppressed because it is too large Load Diff
+44 -34
View File
@@ -25,7 +25,15 @@
"browser": true,
"jest": true
},
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"parserOptions": {
"babelOptions": {
"presets": [
"airbnb"
]
},
"requireConfigFile": false
},
"plugins": [
"prettier"
],
@@ -56,54 +64,56 @@
},
"dependencies": {
"classnames": "^2.2.6",
"connected-react-router": "^6.8.0",
"date-fns": "^2.22.1",
"connected-react-router": "^6.9.2",
"date-fns": "^2.28.0",
"dequal": "^2.0.2",
"history": "^4.10.1",
"i18next": "^20.3.2",
"i18next-browser-languagedetector": "^6.1.2",
"initials": "^3.1.1",
"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": "^6.0.0",
"prop-types": "^15.7.2",
"react": "^17.0.1",
"node-sass": "^7.0.1",
"prop-types": "^15.8.1",
"react": "^17.0.2",
"react-beautiful-dnd": "^13.0.0",
"react-datepicker": "^4.1.1",
"react-dom": "^17.0.1",
"react-dropzone": "^11.3.1",
"react-i18next": "^11.11.0",
"react-datepicker": "^4.7.0",
"react-dom": "^17.0.2",
"react-dropzone": "^12.0.5",
"react-i18next": "^11.16.6",
"react-input-mask": "^2.0.4",
"react-markdown": "^6.0.2",
"react-redux": "^7.2.4",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.3",
"react-markdown": "^8.0.2",
"react-redux": "^7.2.8",
"react-router-dom": "^5.3.1",
"react-scripts": "5.0.1",
"react-textarea-autosize": "^8.3.3",
"redux": "^4.1.0",
"redux": "^4.1.2",
"redux-logger": "^3.0.6",
"redux-orm": "^0.16.2",
"redux-saga": "^1.1.3",
"remark-gfm": "^1.0.0",
"reselect": "^4.0.0",
"remark-gfm": "^3.0.1",
"reselect": "^4.1.5",
"sails.io.js": "^1.2.1",
"semantic-ui-react": "^2.0.3",
"semantic-ui-react": "^2.1.2",
"socket.io-client": "^2.3.1",
"validator": "^13.6.0",
"validator": "^13.7.0",
"whatwg-fetch": "^3.5.0"
},
"devDependencies": {
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.2",
"chai": "^4.3.0",
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
"babel-preset-airbnb": "^5.0.0",
"chai": "^4.3.6",
"enzyme": "^3.11.0",
"eslint": "^7.29.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint": "^8.13.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.4.0",
"jest-enzyme": "^7.1.2",
"prettier": "2.3.1",
"react-test-renderer": "^17.0.1"
"prettier": "2.6.2",
"react-test-renderer": "^17.0.2"
}
}
+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,
+14 -12
View File
@@ -9,18 +9,20 @@ import { ProjectBackgroundTypes } from '../../constants/Enums';
import styles from './Background.module.scss';
import globalStyles from '../../styles.module.scss';
const Background = ({ type, name, imageUrl }) => (
<div
className={classNames(
styles.wrapper,
type === ProjectBackgroundTypes.GRADIENT &&
globalStyles[`background${upperFirst(camelCase(name))}`],
)}
style={{
background: type === 'image' && `url("${imageUrl}") center / cover`,
}}
/>
);
function Background({ type, name, imageUrl }) {
return (
<div
className={classNames(
styles.wrapper,
type === ProjectBackgroundTypes.GRADIENT &&
globalStyles[`background${upperFirst(camelCase(name))}`],
)}
style={{
background: type === 'image' && `url("${imageUrl}") center / cover`,
}}
/>
);
}
Background.propTypes = {
type: PropTypes.string.isRequired,
+1 -3
View File
@@ -40,9 +40,7 @@ const Tasks = React.memo(({ items }) => {
<span
className={classNames(styles.count, isOpened ? styles.countOpened : styles.countClosed)}
>
{completedItems.length}
{'/'}
{items.length}
{completedItems.length}/{items.length}
</span>
</div>
{isOpened && (
@@ -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,20 +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;
white-space: pre-line;
width: 100%;
img {
max-width: 100%;
}
}
.grid {
+18 -16
View File
@@ -9,22 +9,24 @@ import UserSettingsModalContainer from '../containers/UserSettingsModalContainer
import ProjectAddModalContainer from '../containers/ProjectAddModalContainer';
import Background from './Background';
const Core = ({ currentModal, currentProject }) => (
<>
{currentProject && currentProject.background && (
<Background
type={currentProject.background.type}
name={currentProject.background.name}
imageUrl={currentProject.backgroundImage && currentProject.backgroundImage.url}
/>
)}
<FixedContainer />
<StaticContainer />
{currentModal === ModalTypes.USERS && <UsersModalContainer />}
{currentModal === ModalTypes.USER_SETTINGS && <UserSettingsModalContainer />}
{currentModal === ModalTypes.PROJECT_ADD && <ProjectAddModalContainer />}
</>
);
function Core({ currentModal, currentProject }) {
return (
<>
{currentProject && currentProject.background && (
<Background
type={currentProject.background.type}
name={currentProject.background.name}
imageUrl={currentProject.backgroundImage && currentProject.backgroundImage.url}
/>
)}
<FixedContainer />
<StaticContainer />
{currentModal === ModalTypes.USERS && <UsersModalContainer />}
{currentModal === ModalTypes.USER_SETTINGS && <UserSettingsModalContainer />}
{currentModal === ModalTypes.PROJECT_ADD && <ProjectAddModalContainer />}
</>
);
}
Core.propTypes = {
currentModal: PropTypes.oneOf(Object.values(ModalTypes)),
+9 -7
View File
@@ -7,13 +7,15 @@ import BoardActionsContainer from '../../containers/BoardActionsContainer';
import styles from './Fixed.module.scss';
const Fixed = ({ projectId, board }) => (
<div className={styles.wrapper}>
<HeaderContainer />
{projectId && <ProjectContainer />}
{board && !board.isFetching && <BoardActionsContainer />}
</div>
);
function Fixed({ projectId, board }) {
return (
<div className={styles.wrapper}>
<HeaderContainer />
{projectId && <ProjectContainer />}
{board && !board.isFetching && <BoardActionsContainer />}
</div>
);
}
Fixed.propTypes = {
projectId: PropTypes.string,
+2 -2
View File
@@ -1,7 +1,7 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
const NotFound = () => {
function NotFound() {
const [t] = useTranslation();
return (
@@ -11,6 +11,6 @@ const NotFound = () => {
})}
</h1>
);
};
}
export default NotFound;
+16 -14
View File
@@ -14,20 +14,22 @@ import '../lib/custom-ui/styles.css';
import '../styles.module.scss';
const Root = ({ store, history }) => (
<Provider store={store}>
<ConnectedRouter history={history}>
<Switch>
<Route exact path={Paths.LOGIN} component={LoginContainer} />
<Route exact path={Paths.ROOT} component={CoreWrapperContainer} />
<Route exact path={Paths.PROJECTS} component={CoreWrapperContainer} />
<Route exact path={Paths.BOARDS} component={CoreWrapperContainer} />
<Route exact path={Paths.CARDS} component={CoreWrapperContainer} />
<Route path="*" component={NotFound} />
</Switch>
</ConnectedRouter>
</Provider>
);
function Root({ store, history }) {
return (
<Provider store={store}>
<ConnectedRouter history={history}>
<Switch>
<Route exact path={Paths.LOGIN} component={LoginContainer} />
<Route exact path={Paths.ROOT} component={CoreWrapperContainer} />
<Route exact path={Paths.PROJECTS} component={CoreWrapperContainer} />
<Route exact path={Paths.BOARDS} component={CoreWrapperContainer} />
<Route exact path={Paths.CARDS} component={CoreWrapperContainer} />
<Route path="*" component={NotFound} />
</Switch>
</ConnectedRouter>
</Provider>
);
}
Root.propTypes = {
/* eslint-disable react/forbid-prop-types */
+2 -2
View File
@@ -9,7 +9,7 @@ import BoardWrapperContainer from '../../containers/BoardWrapperContainer';
import styles from './Static.module.scss';
const Static = ({ cardId, boardId, projectId }) => {
function Static({ cardId, boardId, projectId }) {
const [t] = useTranslation();
if (projectId === undefined) {
@@ -85,7 +85,7 @@ const Static = ({ cardId, boardId, projectId }) => {
<BoardWrapperContainer />
</div>
);
};
}
Static.propTypes = {
cardId: PropTypes.string,
+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,
};
+12 -7
View File
@@ -14,7 +14,7 @@ i18n.dateFns = {
registerLocale(language, locale);
},
getLocale(language = i18n.language) {
getLocale(language = i18n.resolvedLanguage) {
return this.locales[language];
},
format(date, format, { language, ...options } = {}) {
@@ -31,8 +31,8 @@ i18n.dateFns = {
},
};
i18n.on('languageChanged', (language) => {
setDefaultLocale(language);
i18n.on('languageChanged', () => {
setDefaultLocale(i18n.resolvedLanguage);
});
const formatDatePostProcessor = {
@@ -58,9 +58,9 @@ i18n
.use(initReactI18next)
.init({
resources: embedLocales,
fallbackLng: false,
whitelist: languages,
load: 'currentOnly',
fallbackLng: 'en',
supportedLngs: languages,
load: 'languageOnly',
interpolation: {
escapeValue: false,
format(value, format, language) {
@@ -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%);
}
}
File diff suppressed because one or more lines are too long
+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é)',
+213
View File
@@ -0,0 +1,213 @@
import dateFns from 'date-fns/locale/da';
export default {
dateFns,
format: {
date: 'd/M/yyyy',
time: 'p',
dateTime: '$t(format:date) $t(format:time)',
longDate: 'MMM d',
longDateTime: "MMMM d 'at' p",
},
translation: {
common: {
account: 'Konto',
actions: 'Handlinger',
addAttachment_title: 'Vedhæft fil',
addComment: 'Skriv kommentar',
addManager_title: 'Tilføj projektleder',
addMember_title: 'Tilføj medlem',
addUser_title: 'Tilføj bruger',
administrator: 'Administrator',
all: 'Alle',
allChangesWillBeAutomaticallySavedAfterConnectionRestored:
'Alle ændringer vil automatisk blive gemt<br />ved genforbindelse',
areYouSureYouWantToDeleteThisAttachment: 'Vil du slette den vedhæftede fil?',
areYouSureYouWantToDeleteThisBoard: 'Vil du slette dette bræt?',
areYouSureYouWantToDeleteThisCard: 'Vil du slette dette kort?',
areYouSureYouWantToDeleteThisComment: 'Vil du slette denne kommentar?',
areYouSureYouWantToDeleteThisLabel: 'Vil du slette dette mærkat?',
areYouSureYouWantToDeleteThisList: 'Vil du slette denne liste?',
areYouSureYouWantToDeleteThisProject: 'Vil du slette dette projekt?',
areYouSureYouWantToDeleteThisTask: 'Vil du slette denne opgave?',
areYouSureYouWantToDeleteThisUser: 'Vil du slette denne bruger?',
areYouSureYouWantToLeaveBoard: 'Vil du forlade dette bræt?',
areYouSureYouWantToLeaveProject: 'Vil du forlade dette projekt?',
areYouSureYouWantToRemoveThisManagerFromProject:
'Vil du slette denne projektleder fra projektet?',
areYouSureYouWantToRemoveThisMemberFromBoard: 'Vil du slette dette medlem fra projektet?',
attachment: 'Vedhæftede fil',
attachments: 'Vedhæftede filer',
authentication: 'Brugervalidering',
background: 'Baggrundsbillede',
board: 'Bræt',
boardNotFound_title: 'Bræt ikke fundet',
cardActions_title: 'Korthandlinger',
cardNotFound_title: 'Kort ikke fundet',
cardOrActionAreDeleted: 'Kort eller handling er slettet',
color: 'Farve',
createBoard_title: 'Opret bræt',
createLabel_title: 'Opret mærkat',
createNewOneOrSelectExistingOne: 'Lav en ny eller marker<br />en eksisterende',
createProject_title: 'Opret projekt',
createTextFile_title: 'Opret tekstfil',
currentPassword: 'Nuværende løsen',
dangerZone_title: 'Farligt afsnit',
date: 'Dato',
dueDate_title: 'Afleveringsfrist',
deleteAttachment_title: 'Slet vedhæftning',
deleteBoard_title: 'Slet bræt',
deleteCard_title: 'Slet kort',
deleteComment_title: 'Slet kommentar',
deleteLabel_title: 'Slet mærkat',
deleteList_title: 'Slet liste',
deleteProject_title: 'Slet projekt',
deleteTask_title: 'Slet opgave',
deleteUser_title: 'Slet bruger',
description: 'Beskrivelsen',
dropFileToUpload: 'Slip fil for at dele',
editAttachment_title: 'Ændre vedhæftning',
editAvatar_title: 'Ændre profilbillede',
editBoard_title: 'Ændre bræt',
editDueDate_title: 'Ændre afleveringsfrist',
editEmail_title: 'Ændre E-mail',
editLabel_title: 'ændre mærkat',
editPassword_title: 'Ændre løsen',
editTimer_title: 'Ændre timer',
editUsername_title: 'Ændre brugernavn',
email: 'E-mail',
emailAlreadyInUse: 'E-mail allerede i brug',
enterCardTitle: 'Angiv kortets overskrift...',
enterDescription: 'Angiv beskrivelsen...',
enterFilename: 'Angiv filnavn',
enterListTitle: 'Angiv listens overskrift...',
enterProjectTitle: 'Angiv projektets titel',
enterTaskDescription: 'Angiv opgavens beskrivelse...',
filterByLabels_title: 'Filtrer på mærkater',
filterByMembers_title: 'Filtrer på medlemmer',
fromComputer_title: 'Fra computer',
general: 'Generelt',
hours: 'Timer',
invalidCurrentPassword: 'Nuværende adgangskode are ugyldig',
labels: 'Mærkater',
leaveBoard_title: 'Forlad bræt',
leaveProject_title: 'Forlad projekt',
list: 'Liste',
listActions_title: 'Listens handlinger',
managers: 'Projektledere',
members: 'Medlemmer',
minutes: 'Minutter',
moveCard_title: 'Flyt kort',
name: 'Navn',
newEmail: 'Ny e-mail',
newPassword: 'Nyt løsen',
newUsername: 'Nyt brugernavn',
noConnectionToServer: 'Ingen forbindelse til serveren',
noBoards: 'Ingen brædder',
noLists: 'Ingen lister',
noProjects: 'Ingen projekter',
notifications: 'Notifikationer',
noUnreadNotifications: 'Ingen ulæste notifikationer',
openBoard_title: 'Åben bræt',
optional_inline: 'valgfri',
organization: 'Organisation',
phone: 'Telefon',
preferences: 'Præferencer',
pressPasteShortcutToAddAttachmentFromClipboard:
'Tip: Tryk Ctrl-V (Cmd-V på Mac) for at vedhæfte direkte fra udklipsholder',
project: 'Projekt',
projectNotFound_title: 'Projekt ej fundet',
removeManager_title: 'Fjern projektleder',
removeMember_title: 'Fjern medlem',
seconds: 'Sekunder',
selectBoard: 'Vælg bræt',
selectList: 'Vælg liste',
selectProject: 'Vælg projekt',
settings: 'Indstillinger',
subscribeToMyOwnCardsByDefault: 'Abonnér på egne kort som standard',
taskActions_title: 'Opgave handlinger',
tasks: 'Opgaver',
time: 'Tid',
timer: 'Tidsmåler',
title: 'Overskrift',
userActions_title: 'Brugerhandlinger',
userAddedThisCardToList: '<0>{{user}}</0><1> tilføjede kortet til {{list}}</1>',
userLeftNewCommentToCard: '{{user}} skrevet en ny kommentar «{{comment}}» på <2>{{card}}</2>',
userMovedCardFromListToList:
'{{user}} flyttede <2>{{card}}</2> fra {{fromList}} til {{toList}}',
userMovedThisCardFromListToList:
'<0>{{user}}</0><1> flyttede kortet fra {{fromList}} til {{toList}}</1>',
username: 'Brugernavn',
usernameAlreadyInUse: 'Brugernavn allerede i brug',
users: 'Brugere',
writeComment: 'Skriv en kommentar...',
},
action: {
addAnotherCard: 'Tilføj endnu et kort',
addAnotherList: 'Tilføj endnu en liste',
addAnotherTask: 'Tilføj endnu en opgave',
addCard: 'Tilføj kort',
addCard_title: 'Tilføj kort',
addComment: 'Tilføj kommentar',
addList: 'Tilføj liste',
addMoreDetailedDescription: 'Tilføj en uddybende beskrivelse',
addTask: 'Tilføj opgave',
addToCard: 'Tilføj til kort',
addUser: 'Tilføj bruger',
createBoard: 'Opret bræt',
createFile: 'Opret fil',
createLabel: 'Opret mærkat',
createNewLabel: 'Opret nyt mærkat',
createProject: 'Opret projekt',
delete: 'Slet',
deleteAttachment: 'Slet vedhæftning',
deleteAvatar: 'Slet profilbillede',
deleteBoard: 'Slet bræt',
deleteCard: 'Slet kort',
deleteCard_title: 'Slet kort',
deleteComment: 'Slet kommentar',
deleteImage: 'Slet profilbillede',
deleteLabel: 'Slet mærkat',
deleteList: 'Slet liste',
deleteList_title: 'Slet liste',
deleteProject: 'Slet projekt',
deleteProject_title: 'Slet projekt',
deleteTask: 'Slet opgave',
deleteTask_title: 'Slet opgave',
deleteUser: 'Slet bruger',
edit: 'Ændre',
editDueDate_title: 'Ændre afleveringsfrist',
editDescription_title: 'Ændre beskrivelse',
editEmail_title: 'Ændre e-mail',
editPassword_title: 'Ændre Løsen',
editTimer_title: 'Ændre tidstager',
editTitle_title: 'Ændre overskrift',
editUsername_title: 'Ændre brugernavn',
leaveBoard: 'Forlad bræt',
leaveProject: 'Forlad projekt',
logOut_title: 'Log på',
makeCover_title: 'Gør til fremhævet billede',
move: 'Flyt',
moveCard_title: 'Flyt kort',
remove: 'Fjern',
removeBackground: 'Fjern baggrundsbillede',
removeCover_title: 'Fjern fremhævet billede',
removeFromBoard: 'Fjern fra bræt',
removeFromProject: 'Fjern fra projekt',
removeManager: 'Fjern projektleder',
removeMember: 'Fjern medlem',
save: 'Gem ændringer',
showAllAttachments: 'Vis alle vedhæftninger ({{hidden}} skjulte)',
showFewerAttachments: 'Vis færre vedhæftninger',
start: 'Start',
stop: 'Stop',
subscribe: 'Abonnér',
unsubscribe: 'Opsig abonnement',
uploadNewAvatar: 'Tilføj nyt profilbillede',
uploadNewImage: 'Tilføj nyt billede',
},
},
};
+20
View File
@@ -0,0 +1,20 @@
export default {
translation: {
common: {
emailOrUsername: 'E-mail eller brugernavn',
invalidEmailOrUsername: 'Ugyldig e-mail eller brugernavn',
invalidPassword: 'Ugyldig løsen',
logInToPlanka: 'Log på Planka',
noInternetConnection: 'Ingen forbindelse til internettet',
pageNotFound_title: 'Side ej fundet',
password: 'Løsen',
projectManagement: 'Projektstyring',
serverConnectionFailed: 'Ingen forbindelse til serveren',
unknownError: 'Ukendt fejl - prøv igen',
},
action: {
logIn: 'Log på',
},
},
};
+32 -16
View File
@@ -13,16 +13,17 @@ export default {
translation: {
common: {
account: 'Account',
account: 'Konto',
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',
all: 'Alle',
allChangesWillBeAutomaticallySavedAfterConnectionRestored:
'Alle Änderungen werden automatisch gespeichert.<br />nach Wiederherstellung der Verbindung',
'Alle Änderungen werden automatisch gespeichert,<br />sobald die Verbindung wiederhergestellt wurde.',
areYouSureYouWantToDeleteThisAttachment:
'Sind Sie sicher, dass Sie diesen Anhang löschen möchten?',
areYouSureYouWantToDeleteThisBoard: 'Sind Sie sicher, dass Sie dieses Board löschen möchten?',
@@ -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',
@@ -49,14 +55,15 @@ export default {
color: 'Farbe',
createBoard_title: 'Board erstellen',
createLabel_title: 'Label erstellen',
createNewOneOrSelectExistingOne: 'Eine Neue erstellen, oder <br />eine bestehende auswählen',
createNewOneOrSelectExistingOne: 'Ein Neues erstellen, oder <br />ein Bestehendes auswählen',
createProject_title: 'Projekt erstellen',
createTextFile_title: 'Textdatei erstellen',
currentPassword: 'derzeitiges Password',
currentPassword: 'Derzeitiges Password',
dangerZone_title: 'Gefährlicher Bereich',
date: 'Datum',
dueDate_title: 'Fälligkeitsdatum',
deleteAttachment_title: 'Anhang löschen',
deleteBoard_title: 'Board löschne',
deleteBoard_title: 'Board löschen',
deleteCard_title: 'Karte löschen',
deleteComment_title: 'Kommentar löschen',
deleteLabel_title: 'Label löschen',
@@ -65,16 +72,16 @@ export default {
deleteTask_title: 'Aufgabe löschen',
deleteUser_title: 'Benutzer löschen',
description: 'Beschreibung',
dropFileToUpload: 'Datei ablegen um hochzuladen',
dropFileToUpload: 'Datei ablegen, um hochzuladen',
editAttachment_title: 'Anhang bearbieten',
editAvatar_title: 'Avatar bearbeiten',
editBoard_title: 'Board bearbeiten',
editDueDate_title: 'Änderung Fälligkeitsdatum',
editDueDate_title: 'Fälligkeitsdatum bearbeiten',
editEmail_title: 'E-Mail bearbeiten',
editLabel_title: 'Label bearbeiten',
editPassword_title: 'Passwort ändern',
editTimer_title: 'Timer bearbeiten',
editUsername_title: 'Benutzername bearbeiten',
editUsername_title: 'Benutzername ändern',
email: 'E-Mail',
emailAlreadyInUse: 'E-Mail bereits in Verwendung',
enterCardTitle: 'Kartentitel eingeben...',
@@ -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',
@@ -130,9 +142,9 @@ export default {
userLeftNewCommentToCard:
'{{user}} hat einen neuen Kommentar verfasst «{{comment}}» to <2>{{card}}</2>',
userMovedCardFromListToList:
'{{user}} bewegte <2>{{card}}</2> von {{fromList}} zu {{toList}}',
'{{user}} bewegte <2>{{card}}</2> von {{fromList}} nach {{toList}}',
userMovedThisCardFromListToList:
'<0>{{user}}</0><1> bewegte diese Karte von {{fromList}} zu {{toList}}</1>',
'<0>{{user}}</0><1> bewegte diese Karte von {{fromList}} nach {{toList}}</1>',
username: 'Benutzername',
usernameAlreadyInUse: 'Benutzername wird bereits verwendet',
users: 'Benutzer',
@@ -147,7 +159,7 @@ export default {
addCard_title: 'Karte hinzufügen',
addComment: 'Kommentar hinzufügen',
addList: 'Liste hinzufügen',
addMoreDetailedDescription: 'Eine detaillierte Beschriebung hinzufügen',
addMoreDetailedDescription: 'Eine detaillierte Beschreibung hinzufügen',
addTask: 'Aufgabe hinzufügen',
addToCard: 'Zu Karte hinzufügen',
addUser: 'Benutzer hinzufügen',
@@ -156,7 +168,7 @@ export default {
createLabel: 'Label erstellen',
createNewLabel: 'Neues Label erstellen',
createProject: 'Projekt erstellen',
delete: 'löschen',
delete: 'Löschen',
deleteAttachment: 'Anhang löschen',
deleteAvatar: 'Avatar löschen',
deleteBoard: 'Board löschen',
@@ -172,14 +184,16 @@ export default {
deleteTask: 'Aufgabe löschen',
deleteTask_title: 'Aufgabe löschen',
deleteUser: 'Benutzer löschen',
edit: 'bearbeiten',
edit: 'Bearbeiten',
editDueDate_title: 'Fälligkeitsdatum bearbeiten',
editDescription_title: 'Beschriebung ändern',
editDescription_title: 'Beschreibung ändern',
editEmail_title: 'E-Mail bearbeiten',
editPassword_title: 'Passwort ändern',
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 -14
View File
@@ -1,21 +1,31 @@
import merge from 'lodash/merge';
import fromPairs from 'lodash/fromPairs';
import cs from './cs/embed';
import de from './de/embed';
import en from './en/embed';
import es from './es/embed';
import fr from './fr/embed';
import pl from './pl/embed';
import ru from './ru/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],
['de', de],
['en', en],
['es', es],
['fr', fr],
['pl', pl],
['ru', ru],
['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]);
+215
View File
@@ -0,0 +1,215 @@
import dateFns from 'date-fns/locale/ja';
export default {
dateFns,
format: {
date: 'yyyy/M/d',
time: 'HH:mm',
dateTime: '$t(format:date) $t(format:time)',
longDate: 'MMMMd日',
longDateTime: "MMMMd'日 ' HH:MM",
},
translation: {
common: {
account: 'アカウント',
actions: 'アクション',
addAttachment_title: '添付ファイルを追加',
addComment: 'コメントを追加',
addManager_title: 'マネージャーを追加',
addMember_title: 'メンバーを追加',
addUser_title: 'ユーザーを追加',
administrator: '管理者',
all: 'すべて',
allChangesWillBeAutomaticallySavedAfterConnectionRestored:
'全ての変更は接続回復後自動的に保存されます',
areYouSureYouWantToDeleteThisAttachment: 'この添付ファイルを削除してもよろしいですか?',
areYouSureYouWantToDeleteThisBoard: 'このボードを削除してもよろしいですか?',
areYouSureYouWantToDeleteThisCard: 'このカードを削除してもよろしいですか?',
areYouSureYouWantToDeleteThisComment: 'このコメントを削除してもよろしいですか?',
areYouSureYouWantToDeleteThisLabel: 'このラベルを削除してもよろしいですか?',
areYouSureYouWantToDeleteThisList: 'このリストを削除してもよろしいですか?',
areYouSureYouWantToDeleteThisProject: 'このプロジェクトを削除してもよろしいですか?',
areYouSureYouWantToDeleteThisTask: 'このタスクを削除してもよろしいですか?',
areYouSureYouWantToDeleteThisUser: 'このユーザーを削除してもよろしいですか?',
areYouSureYouWantToLeaveBoard: 'ボードから退出してもよろしいですか?',
areYouSureYouWantToLeaveProject: 'プロジェクトから退出してもよろしいですか?',
areYouSureYouWantToRemoveThisManagerFromProject:
'このマネージャーをプロジェクトから外してもよろしいですか?',
areYouSureYouWantToRemoveThisMemberFromBoard:
'このメンバーをボードから外してもよろしいですか?',
attachment: '添付ファイル',
attachments: '添付ファイル',
authentication: '認証',
background: '背景',
board: 'ボード',
boardNotFound_title: 'ボードが見つかりません',
cardActions_title: 'カードのアクション',
cardNotFound_title: 'カードが見つかりません',
cardOrActionAreDeleted: 'カードやアクションが削除されます',
color: '色',
createBoard_title: 'ボードを作成',
createLabel_title: 'ラベルを作成',
createNewOneOrSelectExistingOne: '新規作成もしくは既存のものから選択',
createProject_title: 'プロジェクトを作成',
createTextFile_title: 'テキストファイルを作成',
currentPassword: '現在のパスワード',
dangerZone_title: '危険ゾーン',
date: '日付',
dueDate_title: '期限',
deleteAttachment_title: '添付ファイルを削除',
deleteBoard_title: 'ボードを削除',
deleteCard_title: 'カードを削除',
deleteComment_title: 'コメントを削除',
deleteLabel_title: 'ラベルを削除',
deleteList_title: 'リストを削除',
deleteProject_title: 'プロジェクトを削除',
deleteTask_title: 'タスクを削除',
deleteUser_title: 'ユーザーを削除',
description: '説明',
dropFileToUpload: 'ファイルをドロップしてアップロード',
editAttachment_title: '添付ファイルを編集',
editAvatar_title: 'アバターを編集',
editBoard_title: 'ボードを編集',
editDueDate_title: '期限を編集',
editEmail_title: 'Eメールを編集',
editLabel_title: 'ラベルを編集',
editPassword_title: 'パスワードを編集',
editTimer_title: 'タイマーを編集',
editUsername_title: 'ユーザー名を編集',
email: 'Eメール',
emailAlreadyInUse: 'Eメールは既に使われています',
enterCardTitle: 'カードのタイトルを入力...',
enterDescription: '説明を入力...',
enterFilename: 'ファイル名を入力...',
enterListTitle: 'リストのタイトルを入力...',
enterProjectTitle: 'プロジェクトのタイトルを入力',
enterTaskDescription: 'タスクの説明を入力...',
filterByLabels_title: 'ラベルで絞り込む',
filterByMembers_title: 'メンバーで絞り込む',
fromComputer_title: 'コンピューターから',
general: '一般',
hours: '時間',
invalidCurrentPassword: '現在のパスワードが無効',
labels: 'ラベル',
leaveBoard_title: 'ボードから退出',
leaveProject_title: 'プロジェクトから退出',
list: 'リスト',
listActions_title: 'アクションのリスト',
managers: 'マネージャー',
members: 'メンバー',
minutes: '分',
moveCard_title: 'カードを移動',
name: '名前',
newEmail: '新しいEメール',
newPassword: '新しいパスワード',
newUsername: '新しいユーザー名',
noConnectionToServer: 'サーバーへ接続されていません',
noBoards: 'ボードがありません',
noLists: 'リストがありません',
noProjects: 'プロジェクトがありません',
notifications: '通知',
noUnreadNotifications: '未読の通知はありません',
openBoard_title: 'ボードを開く',
optional_inline: '任意',
organization: '組織',
phone: '電話番号',
preferences: '環境設定',
pressPasteShortcutToAddAttachmentFromClipboard:
'ヒント: Ctrl-V(MacではCmd-V)を押して、クリップボードから添付ファイルを追加します。',
project: 'プロジェクト',
projectNotFound_title: 'プロジェクトがありません',
removeManager_title: 'マネージャーを削除',
removeMember_title: 'メンバーを削除',
seconds: '秒',
selectBoard: 'ボードを選択',
selectList: 'リストを選択',
selectProject: 'プロジェクトを選択',
settings: '設定',
subscribeToMyOwnCardsByDefault: '自分のカードをデフォルトで購読する',
taskActions_title: 'タスクのアクション',
tasks: 'タスク',
time: '時間',
timer: 'タイマー',
title: 'タイトル',
userActions_title: 'ユーザーのアクション',
userAddedThisCardToList: '<0>{{user}}</0> は <1>{{list}} をこのカードに追加しました</1>',
userLeftNewCommentToCard:
'{{user}} は <2> {{card}} </2> に新しいコメント «{{comment}}» を残しました',
userMovedCardFromListToList:
'{{user}} は <2> {{card}} </2> を {{fromList}} から {{toList}} に移動しました',
userMovedThisCardFromListToList:
'<0>{{user}}</0> <1>はこのカードを {{fromList}} から {{toList}} に移動しました</1>',
username: 'ユーザー名',
usernameAlreadyInUse: 'ユーザー名は既に使われています',
users: 'ユーザー',
writeComment: 'コメントを書く...',
},
action: {
addAnotherCard: '別のカードを追加',
addAnotherList: '別のリストを追加',
addAnotherTask: '別のタスクを追加',
addCard: 'カードを追加',
addCard_title: 'カードを追加',
addComment: 'コメントを追加',
addList: 'リストを追加',
addMoreDetailedDescription: 'より詳細な説明を追加',
addTask: 'タスクを追加',
addToCard: 'カードに追加',
addUser: 'ユーザーを追加',
createBoard: 'ボードを作成',
createFile: 'ファイルを作成',
createLabel: 'ラベルを作成',
createNewLabel: '新しいラベルを作成',
createProject: 'プロジェクトを作成',
delete: '削除',
deleteAttachment: '添付ファイルを削除',
deleteAvatar: 'アバターを削除',
deleteBoard: 'ボードを削除',
deleteCard: 'カードを削除',
deleteCard_title: 'カードを削除',
deleteComment: 'コメントを削除',
deleteImage: '画像を削除',
deleteLabel: 'ラベルを削除',
deleteList: 'リストを削除',
deleteList_title: 'リストを削除',
deleteProject: 'プロジェクトを削除',
deleteProject_title: 'プロジェクトを削除',
deleteTask: 'タスクを削除',
deleteTask_title: 'タスクを削除',
deleteUser: 'ユーザーを削除',
edit: '編集',
editDueDate_title: '期限を編集',
editDescription_title: '説明を編集',
editEmail_title: 'Eメールを編集',
editPassword_title: 'パスワードの編集',
editTimer_title: 'タイマーの編集',
editTitle_title: 'タイトルの編集',
editUsername_title: 'ユーザー名の編集',
leaveBoard: 'ボードから退出',
leaveProject: 'プロジェクトから退出',
logOut_title: 'ログアウト',
makeCover_title: 'カバーを作る',
move: '移動',
moveCard_title: 'カードを移動',
remove: '削除',
removeBackground: '背景を削除',
removeCover_title: 'カバーを削除',
removeFromBoard: 'ボードから削除',
removeFromProject: 'プロジェクトから削除',
removeManager: 'マネージャーを削除',
removeMember: 'メンバーを削除',
save: '保存',
showAllAttachments: '全ての添付ファイルを表示する({{hidden}} 非表示)',
showFewerAttachments: 'テンプファイルの表示数を減らす',
start: 'スタート',
stop: 'ストップ',
subscribe: '購読',
unsubscribe: '購読解除',
uploadNewAvatar: '新しいアバターをアップロード',
uploadNewImage: '新しい画像をアップロード',
},
},
};
+20
View File
@@ -0,0 +1,20 @@
export default {
translation: {
common: {
emailOrUsername: 'Eメールまたはユーザー名',
invalidEmailOrUsername: 'Eメールまたはユーザー名が無効',
invalidPassword: 'パスワードが無効',
logInToPlanka: 'Planka にログインする',
noInternetConnection: 'インターネットに接続されていません。',
pageNotFound_title: 'ページが見つかりません。',
password: 'パスワード',
projectManagement: 'プロジェクト管理',
serverConnectionFailed: 'サーバーの接続に失敗',
unknownError: '不明なエラーです。後でもう一度試してください。',
},
action: {
logIn: 'ログイン',
},
},
};
+209
View File
@@ -0,0 +1,209 @@
export default {
format: {
date: 'M/d/yyyy',
time: 'p',
dateTime: '$t(format:date) $t(format:time)',
longDate: 'MMM d',
longDateTime: "MMMM d 'at' p",
},
translation: {
common: {
account: 'Profil',
actions: 'Amallar',
addAttachment_title: "Ilova Qo'shish",
addComment: "Izoh qo'shish",
addManager_title: "Boshqaruvchi Qo'shish",
addMember_title: "Yangi a'zo Qo'shish",
addUser_title: "Foydalanuvchi Qo'shish",
administrator: 'Administrator',
all: 'Barchasi',
allChangesWillBeAutomaticallySavedAfterConnectionRestored:
"Barcha o'zgarishlar tarmoq ulanishi tiklangandan so'ng<br /> avtomatik saqlanadi",
areYouSureYouWantToDeleteThisAttachment: "Ushbu biriktirmani o'chirmoqchimisiz?",
areYouSureYouWantToDeleteThisBoard: "Ushbu doskani o'chirmoqchimisiz?",
areYouSureYouWantToDeleteThisCard: "Ushbu kartani o'chirmoqchimisiz?",
areYouSureYouWantToDeleteThisComment: "Ushbu izohni o'chirmoqchimisiz?",
areYouSureYouWantToDeleteThisLabel: "Ushbu yorliqni o'chirmoqchimisiz?",
areYouSureYouWantToDeleteThisList: "Ushbu ro'yxatni o'chirmoqchimisiz?",
areYouSureYouWantToDeleteThisProject: "Ushbu loyihani o'chirmoqchimisiz?",
areYouSureYouWantToDeleteThisTask: "Ushbu topshiriqni o'chirmoqchimisiz?",
areYouSureYouWantToDeleteThisUser: "Ushbu foydalanuvchini o'chirmoqchimisiz?",
areYouSureYouWantToLeaveBoard: 'Ushbu doskadan chiqmoqchimisiz?',
areYouSureYouWantToLeaveProject: 'Ushbu loyihadan chiqmoqchimisiz?',
areYouSureYouWantToRemoveThisManagerFromProject:
"Ushbu boshqaruvchini loyihadan o'chirmoqchimisiz?",
areYouSureYouWantToRemoveThisMemberFromBoard: "Ushbu a'zoni doskadan o'chirmoqchimisiz?",
attachment: 'Ilova',
attachments: 'Ilovalar',
authentication: 'Autentifikatsiya',
background: 'Orqa fon',
board: 'Doska',
boardNotFound_title: 'Doska Topilmadi',
cardActions_title: 'Karta Amallari',
cardNotFound_title: 'Karta Topilmadi',
cardOrActionAreDeleted: "Karta yoki amal o'chirilgan",
color: 'Rang',
createBoard_title: 'Doska Yaratish',
createLabel_title: 'Yorliq Yaratish',
createNewOneOrSelectExistingOne: "Yangisini tanlash yoki<br /> mavjud bo'lganini tanlash",
createProject_title: 'Loyiha Yaratish',
createTextFile_title: 'Matnli fayl yaratish',
currentPassword: 'Hozirgi parol',
dangerZone_title: 'Xavfli Hudud',
date: 'Sana',
dueDate_title: 'Muddati',
deleteAttachment_title: "Ilovani O'chirish",
deleteBoard_title: "Doskani O'chirish",
deleteCard_title: "Kartani O'chirish",
deleteComment_title: "Izohni O'chirish",
deleteLabel_title: "Yorliqni O'chirish",
deleteList_title: "Ro'yxatni O'chirish",
deleteProject_title: "Loyihani O'chirish",
deleteTask_title: "Vazifani O'chirish",
deleteUser_title: "Foydalanuvchini O'chirish",
description: 'Tavsif',
dropFileToUpload: 'Faylni yuklash uchun qoldiring',
editAttachment_title: 'Ilovani Tahrirlash',
editAvatar_title: 'Avatarni Tahrirlash',
editBoard_title: 'Doskani Tahrirlash',
editDueDate_title: 'Muddatni Tahrirlash',
editEmail_title: 'E-mail ni Tahrirlash',
editLabel_title: 'Yorliqni Tahrirlash',
editPassword_title: 'Parolni Tahrirlash',
editTimer_title: 'Taymerni Tahrirlash',
editUsername_title: 'Foydalanuvchi nomini Tahrirlash',
email: 'E-mail',
emailAlreadyInUse: 'E-mail allaqachon mavjud',
enterCardTitle: 'Karta sarlavhasini kiriting...',
enterDescription: 'Tavsif kiriting...',
enterFilename: 'Fayl nomini kiriting',
enterListTitle: "Ro'yxat sarlavhasini kiriting...",
enterProjectTitle: 'Loyiha sarlavhasini kiriting',
enterTaskDescription: 'Topshiriq sarlavhasini kiriting...',
filterByLabels_title: "Yorliq bo'yicha filter",
filterByMembers_title: "A'zolar bo'yicha filter",
fromComputer_title: 'Kompyuterdan',
general: 'Umumiy',
hours: 'Soat',
invalidCurrentPassword: 'Hozirgi parol xato',
labels: 'Yorliqlar',
leaveBoard_title: 'Doskadan Chiqish',
leaveProject_title: 'Loyihadan Chiqish',
list: "Ro'yxat",
listActions_title: "R'yxat Amallari",
managers: 'Boshqaruvchilar',
members: "A'zolar",
minutes: 'Minut',
moveCard_title: "Kartani Ko'chirish",
name: 'Ism',
newEmail: 'Yangi e-mail',
newPassword: 'Yangi parol',
newUsername: 'Yangi foydalanuvchi nomi',
noConnectionToServer: "Server bilan bog'lanish yo'q",
noBoards: "Doskalar yo'q",
noLists: "Ro'yxatlar yo'q",
noProjects: "Loyihalar yo'q",
notifications: 'Bildirishnomalar',
noUnreadNotifications: "O'qilmagan bildirishnomalar yo'q",
openBoard_title: 'Doskani Ochish',
optional_inline: 'ixtiyoriy',
organization: 'Tashkilot',
phone: 'Telefon',
preferences: 'Afzalliklar',
pressPasteShortcutToAddAttachmentFromClipboard:
"Tip: Buferdan ilova qo'shish uchun Ctrl-V (Mac da Cmd-V) ni bosing.",
project: 'Loyiha',
projectNotFound_title: 'Loyiha Topilmadi',
removeManager_title: "Boshqaruvchini O'chirish",
removeMember_title: "A'zoni O'chirish",
seconds: 'Sekund',
selectBoard: 'Doskani tanlash',
selectList: "Ro'yxatni tanlash",
selectProject: "Loyihani '",
settings: 'Sozlamalar',
subscribeToMyOwnCardsByDefault: "Odatiy holda o'z kartalarimga obuna bo'ling",
taskActions_title: 'Vazifa Amallari',
tasks: 'Vazifalar',
time: 'Vaqt',
timer: 'Taymer',
title: 'Sarlavha',
userActions_title: 'Foydalanuvchi Amallari',
userAddedThisCardToList: "<1>Ushbu kartani {{list}} ga</1><0>{{user}}</0> qo'shdi",
userLeftNewCommentToCard: '{{user}} <2>{{card}}</2> ga yangi izoh qoldirdi «{{comment}}»',
userMovedCardFromListToList:
"{{user}} <2>{{card}}</2> ni {{fromList}} dan {{toList}} ga ko'chirdi",
userMovedThisCardFromListToList:
"<0>{{user}}</0><1> ushbu kartani {{fromList}} dan {{toList}}</1> ga ko'chirdi",
username: 'Foydalanuvchi nomi',
usernameAlreadyInUse: 'Foydalanuvchi nomi allaqachon mavjud',
users: 'Foydalanuvchilar',
writeComment: 'Izoh yozish...',
},
action: {
addAnotherCard: "Yana karta qo'shish",
addAnotherList: "Yana ro'yxat qo'shish",
addAnotherTask: "Yana vazifa qo'shish",
addCard: "Karta qo'shish",
addCard_title: "Karta Qo'shish",
addComment: "Izoh qo'shish",
addList: "Ro'yxat qo'shish",
addMoreDetailedDescription: "Batafsil izoh qo'shish",
addTask: "Vazifa qo'shish",
addToCard: "Kartaga qo'shish",
addUser: "Foydalanuvchi qo'shish",
createBoard: 'Doska yaratish',
createFile: 'Fayl yaratish',
createLabel: 'Yorliq yaratish',
createNewLabel: 'Yangi yorliq yaratish',
createProject: 'Loyiha yaratish',
delete: "O'chirish",
deleteAttachment: "Ilovani o'chirish",
deleteAvatar: "Avatarni o'chirish",
deleteBoard: "Doskani o'chirish",
deleteCard: "Kartani o'chirish",
deleteCard_title: "Kartani O'chirish",
deleteComment: "Izohni o'chirish",
deleteImage: "Rasmni o'chirish",
deleteLabel: "Yorliqni o'chirish",
deleteList: "Ro'yxatni o'chirish",
deleteList_title: "Ro'yxatni O'chirish",
deleteProject: "Loyihani o'chirish",
deleteProject_title: "Loyihani O'chirish",
deleteTask: "Vazifani o'chirish",
deleteTask_title: "Vazifani O'chirish",
deleteUser: "Foydalanuvchini o'chirish",
edit: 'Tahrirlash',
editDueDate_title: 'Muddatni Tahrirlash',
editDescription_title: 'Izohni Tahrirlash',
editEmail_title: 'E-mailni Tahrirlash',
editPassword_title: 'Parolni Tahrirlash',
editTimer_title: 'Taymerni Tahrirlash',
editTitle_title: 'Sarlavhani Tahrirlash',
editUsername_title: 'Foydalanuvchi nomini Tahrirlash',
leaveBoard: 'Doskadan chiqish',
leaveProject: 'Loyidan chiqish',
logOut_title: 'Chiqish',
makeCover_title: 'Muqova Yasash',
move: "Ko'chirish",
moveCard_title: "Kartani Ko'chirish",
remove: "O'chirish",
removeBackground: "Orqa fonni o'chirish",
removeCover_title: "Muqovani O'chirish",
removeFromBoard: "Doskadan o'chirish",
removeFromProject: "Loyihadan o'chirish",
removeManager: "Boshqaruvchini o'chirish",
removeMember: "A'zoni o'chirish",
save: 'Saqlash',
showAllAttachments: "Barcha ilovalarni ko'rsatish ({{hidden}} yashirilgan)",
showFewerAttachments: "Kamroq ilovalarni ko'rsatish",
start: 'Boshlash',
stop: "To'xtatish",
subscribe: "Obuna bo'lish",
unsubscribe: 'Obunani bekor qilish',
uploadNewAvatar: 'Yangi avatar yuklash',
uploadNewImage: 'Yangi rasm yuklash',
},
},
};
+20
View File
@@ -0,0 +1,20 @@
export default {
translation: {
common: {
emailOrUsername: 'E-mail yoki foydalanuvchi nomi',
invalidEmailOrUsername: "Noto'g'ri e-mail yoki foydalanuvchi nomi",
invalidPassword: "Noto'g'ri parol",
logInToPlanka: 'Planka ga Kirish',
noInternetConnection: "Internet bog'lanishi yo'q",
pageNotFound_title: 'Sahifa Topilmadi',
password: 'Parol',
projectManagement: 'Loyiha boshqaruvi',
serverConnectionFailed: "Serverga bog'lanish xatosi",
unknownError: "Noma'lum xatolik, qaytadan urinib ko'ring",
},
action: {
logIn: 'Kirish',
},
},
};
+207
View File
@@ -0,0 +1,207 @@
export default {
format: {
date: 'M/d/yyyy',
time: 'p',
dateTime: '$t(format:date) $t(format:time)',
longDate: 'MMM d',
longDateTime: "MMMM d 'at' p",
},
translation: {
common: {
account: '账号',
actions: '操作',
addAttachment_title: '添加附件',
addComment: '添加评论',
addManager_title: '添加管理员',
addMember_title: '添加成员',
addUser_title: '添加用户',
administrator: '管理员',
all: '全部',
allChangesWillBeAutomaticallySavedAfterConnectionRestored: '所有修改会在重连后自动保存',
areYouSureYouWantToDeleteThisAttachment: '确认删除此附件吗?',
areYouSureYouWantToDeleteThisBoard: '确认删除此面板吗?',
areYouSureYouWantToDeleteThisCard: '确认删除此卡片吗?',
areYouSureYouWantToDeleteThisComment: '确认删除此评论吗?',
areYouSureYouWantToDeleteThisLabel: '确认删除此标签吗?',
areYouSureYouWantToDeleteThisList: '确认删除此列表吗?',
areYouSureYouWantToDeleteThisProject: '确认删除此项目吗?',
areYouSureYouWantToDeleteThisTask: '确认删除此任务吗?',
areYouSureYouWantToDeleteThisUser: '确认删除此用户吗?',
areYouSureYouWantToLeaveBoard: '确认离开此面板吗?',
areYouSureYouWantToLeaveProject: '确认离开此项目吗?',
areYouSureYouWantToRemoveThisManagerFromProject: '确认从本项目删除该管理员吗?',
areYouSureYouWantToRemoveThisMemberFromBoard: '确认本面板删除该成员吗?',
attachment: '附件',
attachments: '多个附件',
authentication: '认证',
background: '背景',
board: '面板',
boardNotFound_title: '面板不存在',
cardActions_title: '卡片操作',
cardNotFound_title: '卡片不存在',
cardOrActionAreDeleted: '卡片或操作已经被删除',
color: '颜色',
createBoard_title: '创建面板',
createLabel_title: '创建标签',
createNewOneOrSelectExistingOne: '创建一个新的或者选择一个已创建的',
createProject_title: '创建项目',
createTextFile_title: '创建文本文件',
currentPassword: '当前密码',
dangerZone_title: '危险区域',
date: '日期',
dueDate_title: '截止日期',
deleteAttachment_title: '删除附件',
deleteBoard_title: '删除面板',
deleteCard_title: '删除擦片',
deleteComment_title: '删除评论',
deleteLabel_title: '删除标签',
deleteList_title: '删除列表',
deleteProject_title: '删除项目',
deleteTask_title: '删除任务',
deleteUser_title: '删除用户',
description: '描述',
dropFileToUpload: '拖放文件以上传',
editAttachment_title: '编辑附件',
editAvatar_title: '编辑头像',
editBoard_title: '编辑面板',
editDueDate_title: '编辑截止时间',
editEmail_title: '编辑邮箱',
editLabel_title: '编辑标签',
editPassword_title: '修改密码',
editTimer_title: '修改时间',
editUsername_title: '修改用户名',
email: '邮箱',
emailAlreadyInUse: '邮箱已使用',
enterCardTitle: '输入卡片标题...',
enterDescription: '输入描述...',
enterFilename: '输入文件名',
enterListTitle: '输入列表标题...',
enterProjectTitle: '输入项目标题',
enterTaskDescription: '输入任务描述...',
filterByLabels_title: '通过标签筛选',
filterByMembers_title: '通过成员筛选',
fromComputer_title: '从电脑',
general: '全体',
hours: '小时',
invalidCurrentPassword: '当前密码错误',
labels: '标签',
leaveBoard_title: '离开面板',
leaveProject_title: '离开项目',
list: '列表',
listActions_title: '列表操作',
managers: '管理员',
members: '成员',
minutes: '分钟',
moveCard_title: '移动卡片',
name: '姓名',
newEmail: '新邮箱',
newPassword: '新密码',
newUsername: '新用户名',
noConnectionToServer: '未连接服务器',
noBoards: '没有面板',
noLists: '没有列表',
noProjects: '没有项目',
notifications: '通知',
noUnreadNotifications: '没有未读通知',
openBoard_title: '打开面板',
optional_inline: '可选的',
organization: '组织机构',
phone: '电话',
preferences: '偏好',
pressPasteShortcutToAddAttachmentFromClipboard:
'提示: 点击 Ctrl-V (Mac: Cmd-V) 从剪切板添加附件.',
project: '项目',
projectNotFound_title: '项目未找到',
removeManager_title: '删除管理员',
removeMember_title: '删除成员',
seconds: '秒',
selectBoard: '选择面板',
selectList: '选择列表',
selectProject: '选择项目',
settings: '设置',
subscribeToMyOwnCardsByDefault: '默认关注自己创建的卡片',
taskActions_title: '任务操作',
tasks: '任务',
time: '时间',
timer: '计时器',
title: '标题',
userActions_title: '用户操作',
userAddedThisCardToList: '<0>{{user}}</0><1> 向列表 {{list}} 添加了该卡片</1>',
userLeftNewCommentToCard: '{{user}} 给 {{card}} 添加了一个新评论 «{{comment}}»',
userMovedCardFromListToList:
'{{user}} 将卡片 <2>{{card}}</2> 从 {{fromList}} 移动到 {{toList}}',
userMovedThisCardFromListToList:
'<0>{{user}}</0><1> 将该卡片从 {{fromList}} 移动到 {{toList}}</1>',
username: '用户名',
usernameAlreadyInUse: '用户名已占用',
users: '用户',
writeComment: '编写评论...',
},
action: {
addAnotherCard: '添加别的卡片',
addAnotherList: '添加别的列表',
addAnotherTask: '添加别的任务',
addCard: '添加卡片',
addCard_title: '添加卡片',
addComment: '添加评论',
addList: '添加列表',
addMoreDetailedDescription: '添加更多详细描述',
addTask: '添加任务',
addToCard: '添加擦篇',
addUser: '添加用户',
createBoard: '创建面板',
createFile: '创建文件',
createLabel: '创建标签',
createNewLabel: '创建新标签',
createProject: '创建项目',
delete: '删除',
deleteAttachment: '删除附件',
deleteAvatar: '删除头像',
deleteBoard: '删除面板',
deleteCard: '删除卡片',
deleteCard_title: '删除卡片',
deleteComment: '删除评论',
deleteImage: '删除图片',
deleteLabel: '删除标签',
deleteList: '删除列表',
deleteList_title: '删除列表',
deleteProject: '删除项目',
deleteProject_title: '删除项目',
deleteTask: '删除任务',
deleteTask_title: '删除任务',
deleteUser: '删除用户',
edit: '编辑',
editDueDate_title: '编辑到期时间',
editDescription_title: '编辑描述',
editEmail_title: '编辑邮箱',
editPassword_title: '编辑密码',
editTimer_title: '编辑实践',
editTitle_title: '编辑标题',
editUsername_title: '编辑用户名',
leaveBoard: '离开面板',
leaveProject: '离开项目',
logOut_title: '退出',
makeCover_title: '设置标题',
move: '移动',
moveCard_title: '移动卡片',
remove: '删除',
removeBackground: '删除背景',
removeCover_title: '删除封面',
removeFromBoard: '从面板中删除',
removeFromProject: '从项目中删除',
removeManager: '删除管理者',
removeMember: '删除成员',
save: '保存',
showAllAttachments: '显示所有的附件 ({{hidden}} 隐藏)',
showFewerAttachments: '显示较少的附件',
start: '开始',
stop: '结束',
subscribe: '关注',
unsubscribe: '取消关注',
uploadNewAvatar: '上传新头像',
uploadNewImage: '上传图片',
},
},
};
+20
View File
@@ -0,0 +1,20 @@
export default {
translation: {
common: {
emailOrUsername: '邮箱或用户名',
invalidEmailOrUsername: '错误的邮箱或用户名',
invalidPassword: '密码错误',
logInToPlanka: '登录至 Planka',
noInternetConnection: '没有网络连接',
pageNotFound_title: '页面找不到',
password: '密码',
projectManagement: '项目管理',
serverConnectionFailed: '服务连接失败',
unknownError: '未知错误,请稍后重试',
},
action: {
logIn: '登录',
},
},
};
+1 -7
View File
@@ -1,18 +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 {
+1
View File
@@ -8,6 +8,7 @@ const initialState = {
currentModal: null,
};
// eslint-disable-next-line default-param-last
export default (state = initialState, { type, payload }) => {
switch (type) {
case LOCATION_CHANGE:
+1
View File
@@ -4,6 +4,7 @@ const initialState = {
isDisconnected: false,
};
// eslint-disable-next-line default-param-last
export default (state = initialState, { type }) => {
switch (type) {
case ActionTypes.SOCKET_DISCONNECT_HANDLE:
@@ -9,6 +9,7 @@ const initialState = {
error: null,
};
// eslint-disable-next-line default-param-last
export default (state = initialState, { type, payload }) => {
switch (type) {
case ActionTypes.AUTHENTICATE:
@@ -7,6 +7,7 @@ const initialState = {
isSubmitting: false,
};
// eslint-disable-next-line default-param-last
export default (state = initialState, { type, payload }) => {
switch (type) {
case ActionTypes.PROJECT_CREATE:
@@ -10,6 +10,7 @@ const initialState = {
error: null,
};
// eslint-disable-next-line default-param-last
export default (state = initialState, { type, payload }) => {
switch (type) {
case ActionTypes.USER_CREATE:
+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.language);
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);
};
+2 -1
View File
@@ -15,11 +15,12 @@ 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:
- BASE_URL=http://localhost:3000
- TRUST_PROXY=0
- DATABASE_URL=postgresql://postgres@postgres/planka
- SECRET_KEY=notsecretkey
depends_on:
+3 -3
View File
@@ -1,4 +1,4 @@
#!/bin/bash
node db/init.js \
&& node app.js --prod $@
set -e
node db/init.js
exec node app.js --prod $@
+769 -962
View File
File diff suppressed because it is too large Load Diff
+6 -10
View File
@@ -1,6 +1,6 @@
{
"name": "planka",
"version": "0.1.0",
"version": "1.0.0",
"private": true,
"homepage": "https://plankanban.github.io/planka",
"repository": {
@@ -14,8 +14,9 @@
"client:lint": "npm run lint --prefix client",
"client:start": "npm start --prefix client",
"client:test": "npm test --prefix client",
"lint": "npm run server:lint && npm run client:lint",
"postinstall": "npm i --prefix server && npm i --prefix client",
"prepare": "husky install",
"lint": "npm run server:lint && npm run client:lint",
"server:console": "npm run console --prefix server",
"server:db:init": "npm run db:init --prefix server",
"server:db:migrate": "npm run db:migrate --prefix server",
@@ -27,11 +28,6 @@
"start": "concurrently -n server,client \"npm run server:start\" \"npm run client:start\"",
"test": "npm run server:test && npm run client:test"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"client/**/*.{js,jsx}": [
"npm run client:lint"
@@ -41,8 +37,8 @@
]
},
"dependencies": {
"concurrently": "^6.2.0",
"husky": "^6.0.0",
"lint-staged": "^11.0.0"
"concurrently": "^7.1.0",
"husky": "^7.0.4",
"lint-staged": "^12.3.8"
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
TZ=UTC
BASE_URL=http://localhost:1337
DATABASE_URL=postgresql://ghostly@localhost/planka
DATABASE_URL=postgresql://postgres@localhost/planka
SECRET_KEY=notsecretkey
+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));
},
};
+2
View File
@@ -20,6 +20,8 @@ module.exports = {
},
async fn(inputs) {
const { currentUser } = this.req;
let { board } = await sails.helpers.boards
.getProjectPath(inputs.id)
.intercept('pathNotFound', () => Errors.BOARD_NOT_FOUND);
+1 -1
View File
@@ -69,7 +69,7 @@ module.exports = {
const values = _.pick(inputs, ['email']);
user = await sails.helpers.users
.update(user, values, this.req)
.updateOne(user, values, this.req)
.intercept('emailAlreadyInUse', () => Errors.EMAIL_ALREADY_IN_USE);
if (!user) {
@@ -71,7 +71,7 @@ module.exports = {
const values = _.pick(inputs, ['username']);
user = await sails.helpers.users
.update(user, values, this.req)
.updateOne(user, values, this.req)
.intercept('usernameAlreadyInUse', () => Errors.USERNAME_ALREADY_IN_USE);
if (!user) {
+4
View File
@@ -10,6 +10,10 @@ module.exports = {
},
async fn(inputs) {
await BoardMembership.destroy({
boardId: inputs.record.id,
}).fetch();
const board = await Board.archiveOne(inputs.record.id);
if (board) {
+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`,
};
+1 -1
View File
@@ -273,7 +273,7 @@ module.exports = {
*
*/
// trustProxy: true,
trustProxy: process.env.TRUST_PROXY,
},
/**
-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');
+2255 -3231
View File
File diff suppressed because it is too large Load Diff
+18 -18
View File
@@ -39,34 +39,34 @@
},
"dependencies": {
"bcrypt": "^5.0.1",
"dotenv": "^10.0.0",
"dotenv-cli": "^4.0.0",
"dotenv": "^16.0.0",
"dotenv-cli": "^5.1.0",
"filenamify": "^4.3.0",
"jsonwebtoken": "^8.5.1",
"knex": "^0.95.6",
"knex": "^1.0.7",
"lodash": "^4.17.21",
"moment": "^2.29.1",
"moment": "^2.29.3",
"rimraf": "^3.0.2",
"sails": "^1.4.3",
"sails-hook-orm": "^3.0.2",
"sails": "^1.5.2",
"sails-hook-orm": "^4.0.1",
"sails-hook-sockets": "^2.0.1",
"sails-postgresql-redacted": "^1.0.2-9",
"sharp": "^0.28.3",
"sharp": "^0.30.4",
"stream-to-array": "^2.3.0",
"uuid": "^8.3.2",
"validator": "^13.6.0"
"validator": "^13.7.0"
},
"devDependencies": {
"chai": "^4.3.4",
"eslint": "^7.29.0",
"eslint-config-airbnb-base": "^14.2.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-prettier": "^3.4.0",
"mocha": "^9.0.1",
"nodemon": "^2.0.4",
"prettier": "2.3.1",
"supertest": "^6.1.3"
"chai": "^4.3.6",
"eslint": "^8.13.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.0.0",
"mocha": "^9.2.2",
"nodemon": "^2.0.15",
"prettier": "2.6.2",
"supertest": "^6.2.2"
},
"engines": {
"node": "^12.10"