Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e01a2eafba | ||
|
|
3b3bff1b6b | ||
|
|
ecc45c7a9e | ||
|
|
3497e09703 | ||
|
|
dfc52191fc | ||
|
|
6268ced4cb | ||
|
|
e7495e0067 | ||
|
|
b8c065e0c8 | ||
|
|
86e4864d1b | ||
|
|
0be598ca9e | ||
|
|
ba850801c5 | ||
|
|
c9b23652d1 | ||
|
|
8490629e4c | ||
|
|
76fcd79203 | ||
|
|
3ce1bc0419 | ||
|
|
540fbfceb5 | ||
|
|
48a56648e2 | ||
|
|
6d002c311c | ||
|
|
ede707ed24 | ||
|
|
81052e1ce6 | ||
|
|
315a9a4c3d | ||
|
|
8112bcbb84 | ||
|
|
fc69b7d6f4 | ||
|
|
027e911907 | ||
|
|
afc2a4628d | ||
|
|
b0b6587eee | ||
|
|
e29c9e6dda | ||
|
|
caf9602557 | ||
|
|
445b0fc682 | ||
|
|
2e045217ec | ||
|
|
36e4bef21b | ||
|
|
486e663a3d | ||
|
|
536064fdfe | ||
|
|
f03bb5a78f | ||
|
|
8bf85e2eb6 | ||
|
|
e3d1d36857 | ||
|
|
4371e16c8d | ||
|
|
ec7b4d7b24 | ||
|
|
7974c9dc5d | ||
|
|
e2a8f5b483 | ||
|
|
5049034ae3 |
@@ -0,0 +1,44 @@
|
|||||||
|
name: Build and push Docker base image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- ./Dockerfile.base
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
ALPINE_VERSION: 3.15
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push-docker-base-image:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
|
file: Dockerfile.base
|
||||||
|
build-args: ALPINE_VERSION=${{ env.ALPINE_VERSION }}
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
ghcr.io/plankanban/planka:base-latest
|
||||||
|
ghcr.io/plankanban/planka:base-${{ env.ALPINE_VERSION }}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
name: Build and push Docker image
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push-docker-image:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set version
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
id: set-version
|
||||||
|
with:
|
||||||
|
result-encoding: string
|
||||||
|
script: return context.payload.release.tag_name.replace('v', '')
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
ghcr.io/plankanban/planka:latest
|
||||||
|
ghcr.io/plankanban/planka:${{ steps.set-version.outputs.result }}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
node_modules
|
node_modules
|
||||||
docker-compose.override.yml
|
docker-compose.override.yml
|
||||||
|
|
||||||
|
.idea
|
||||||
.vscode
|
.vscode
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|||||||
@@ -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.
|
||||||
+5
-30
@@ -10,52 +10,27 @@ RUN npm install npm@latest --global \
|
|||||||
COPY client .
|
COPY client .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM node:lts-alpine
|
FROM ghcr.io/plankanban/planka:base-latest
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY server/.npmrc server/package.json server/package-lock.json ./
|
COPY server/.npmrc server/package.json server/package-lock.json ./
|
||||||
|
|
||||||
ARG ALPINE_VERSION=3.15
|
RUN npm install npm@latest --global \
|
||||||
ARG VIPS_VERSION=8.12.2
|
|
||||||
|
|
||||||
RUN apk -U upgrade \
|
|
||||||
&& apk add \
|
|
||||||
bash giflib glib lcms2 libexif \
|
|
||||||
libgsf libjpeg-turbo libpng librsvg libwebp \
|
|
||||||
orc pango tiff \
|
|
||||||
--repository https://alpine.global.ssl.fastly.net/alpine/v${ALPINE_VERSION}/community/ \
|
|
||||||
--repository https://alpine.global.ssl.fastly.net/alpine/v${ALPINE_VERSION}/main/ \
|
|
||||||
--no-cache \
|
|
||||||
&& apk add \
|
|
||||||
build-base giflib-dev glib-dev lcms2-dev libexif-dev \
|
|
||||||
libgsf-dev libjpeg-turbo-dev libpng-dev librsvg-dev libwebp-dev \
|
|
||||||
orc-dev pango-dev tiff-dev \
|
|
||||||
--virtual vips-dependencies \
|
|
||||||
--repository https://alpine.global.ssl.fastly.net/alpine/v${ALPINE_VERSION}/community/ \
|
|
||||||
--repository https://alpine.global.ssl.fastly.net/alpine/v${ALPINE_VERSION}/main/ \
|
|
||||||
--no-cache \
|
|
||||||
&& wget -O- https://github.com/libvips/libvips/releases/download/v${VIPS_VERSION}/vips-${VIPS_VERSION}.tar.gz | tar xzC /tmp \
|
|
||||||
&& cd /tmp/vips-${VIPS_VERSION} \
|
|
||||||
&& ./configure \
|
|
||||||
&& make \
|
|
||||||
&& make install-strip \
|
|
||||||
&& cd $OLDPWD \
|
|
||||||
&& rm -rf /tmp/vips-${VIPS_VERSION} \
|
|
||||||
&& npm install npm@latest --global \
|
|
||||||
&& npm install --production \
|
&& npm install --production \
|
||||||
&& apk del vips-dependencies --purge
|
&& apk del vips-dependencies --purge
|
||||||
|
|
||||||
COPY docker-start.sh start.sh
|
COPY docker-start.sh start.sh
|
||||||
RUN chmod +x start.sh
|
|
||||||
COPY server .
|
COPY server .
|
||||||
|
|
||||||
|
RUN cp .env.sample .env
|
||||||
|
|
||||||
COPY --from=client-builder /app/build public
|
COPY --from=client-builder /app/build public
|
||||||
COPY --from=client-builder /app/build/index.html views
|
COPY --from=client-builder /app/build/index.html views
|
||||||
|
|
||||||
VOLUME /app/public/user-avatars
|
VOLUME /app/public/user-avatars
|
||||||
VOLUME /app/public/project-background-images
|
VOLUME /app/public/project-background-images
|
||||||
VOLUME /app/public/attachments
|
VOLUME /app/private/attachments
|
||||||
|
|
||||||
EXPOSE 1337
|
EXPOSE 1337
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
FROM node:lts-alpine
|
||||||
|
|
||||||
|
ARG ALPINE_VERSION=3.15
|
||||||
|
ARG VIPS_VERSION=8.12.2
|
||||||
|
|
||||||
|
RUN apk -U upgrade \
|
||||||
|
&& apk add \
|
||||||
|
bash giflib glib lcms2 libexif \
|
||||||
|
libgsf libjpeg-turbo libpng librsvg libwebp \
|
||||||
|
orc pango tiff \
|
||||||
|
--repository https://alpine.global.ssl.fastly.net/alpine/v${ALPINE_VERSION}/community/ \
|
||||||
|
--repository https://alpine.global.ssl.fastly.net/alpine/v${ALPINE_VERSION}/main/ \
|
||||||
|
--no-cache \
|
||||||
|
&& apk add \
|
||||||
|
build-base giflib-dev glib-dev lcms2-dev libexif-dev \
|
||||||
|
libgsf-dev libjpeg-turbo-dev libpng-dev librsvg-dev libwebp-dev \
|
||||||
|
orc-dev pango-dev tiff-dev \
|
||||||
|
--virtual vips-dependencies \
|
||||||
|
--repository https://alpine.global.ssl.fastly.net/alpine/v${ALPINE_VERSION}/community/ \
|
||||||
|
--repository https://alpine.global.ssl.fastly.net/alpine/v${ALPINE_VERSION}/main/ \
|
||||||
|
--no-cache \
|
||||||
|
&& wget -O- https://github.com/libvips/libvips/releases/download/v${VIPS_VERSION}/vips-${VIPS_VERSION}.tar.gz | tar xzC /tmp \
|
||||||
|
&& cd /tmp/vips-${VIPS_VERSION} \
|
||||||
|
&& ./configure \
|
||||||
|
&& make \
|
||||||
|
&& make install-strip \
|
||||||
|
&& rm -rf /tmp/vips-${VIPS_VERSION}
|
||||||
@@ -61,7 +61,7 @@ Either use a local database or start the provided development database:
|
|||||||
docker-compose -f docker-compose-dev.yml up
|
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
|
npm run server:db:init
|
||||||
|
|||||||
Generated
+70
@@ -14,8 +14,10 @@
|
|||||||
"i18next": "^21.6.16",
|
"i18next": "^21.6.16",
|
||||||
"i18next-browser-languagedetector": "^6.1.4",
|
"i18next-browser-languagedetector": "^6.1.4",
|
||||||
"initials": "^3.1.2",
|
"initials": "^3.1.2",
|
||||||
|
"js-cookie": "^3.0.1",
|
||||||
"lodash": "^4.17.20",
|
"lodash": "^4.17.20",
|
||||||
"node-sass": "^7.0.1",
|
"node-sass": "^7.0.1",
|
||||||
|
"photoswipe": "^5.2.7",
|
||||||
"prop-types": "^15.8.1",
|
"prop-types": "^15.8.1",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-beautiful-dnd": "^13.0.0",
|
"react-beautiful-dnd": "^13.0.0",
|
||||||
@@ -25,6 +27,7 @@
|
|||||||
"react-i18next": "^11.16.6",
|
"react-i18next": "^11.16.6",
|
||||||
"react-input-mask": "^2.0.4",
|
"react-input-mask": "^2.0.4",
|
||||||
"react-markdown": "^8.0.2",
|
"react-markdown": "^8.0.2",
|
||||||
|
"react-photoswipe-gallery": "^2.2.1",
|
||||||
"react-redux": "^7.2.8",
|
"react-redux": "^7.2.8",
|
||||||
"react-router-dom": "^5.3.1",
|
"react-router-dom": "^5.3.1",
|
||||||
"react-scripts": "5.0.1",
|
"react-scripts": "5.0.1",
|
||||||
@@ -33,6 +36,7 @@
|
|||||||
"redux-logger": "^3.0.6",
|
"redux-logger": "^3.0.6",
|
||||||
"redux-orm": "^0.16.2",
|
"redux-orm": "^0.16.2",
|
||||||
"redux-saga": "^1.1.3",
|
"redux-saga": "^1.1.3",
|
||||||
|
"remark-breaks": "^3.0.2",
|
||||||
"remark-gfm": "^3.0.1",
|
"remark-gfm": "^3.0.1",
|
||||||
"reselect": "^4.1.5",
|
"reselect": "^4.1.5",
|
||||||
"sails.io.js": "^1.2.1",
|
"sails.io.js": "^1.2.1",
|
||||||
@@ -13534,6 +13538,14 @@
|
|||||||
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
|
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
|
||||||
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
|
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
|
||||||
},
|
},
|
||||||
|
"node_modules/js-cookie": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/js-tokens": {
|
"node_modules/js-tokens": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||||
@@ -16214,6 +16226,14 @@
|
|||||||
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
|
||||||
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
|
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
|
||||||
},
|
},
|
||||||
|
"node_modules/photoswipe": {
|
||||||
|
"version": "5.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/photoswipe/-/photoswipe-5.2.7.tgz",
|
||||||
|
"integrity": "sha512-AogMba7W/O5gOtDIZ8cQuou1ltwxlaLNoZY1qi1s+kbYXpZk9D6rXxnNGAfDppl+bfe+sKLW2w2sx+3uQ8oPzg==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.12.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/picocolors": {
|
"node_modules/picocolors": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
|
||||||
@@ -18220,6 +18240,16 @@
|
|||||||
"react-dom": "^15.5.x || ^16.x || ^17.x"
|
"react-dom": "^15.5.x || ^16.x || ^17.x"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/react-photoswipe-gallery": {
|
||||||
|
"version": "2.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/react-photoswipe-gallery/-/react-photoswipe-gallery-2.2.1.tgz",
|
||||||
|
"integrity": "sha512-xaUKKmwRLCpEzB8+bU7yxjXvRBHaInpBcI6YQY0UOeFctHAL3jGRDk9j2YbwmlgN7kRStHTcyrSNxr+zSaOnKg==",
|
||||||
|
"peerDependencies": {
|
||||||
|
"photoswipe": ">= 5.2.2",
|
||||||
|
"prop-types": ">= 15.7.0",
|
||||||
|
"react": ">= 16.8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/react-popper": {
|
"node_modules/react-popper": {
|
||||||
"version": "2.2.5",
|
"version": "2.2.5",
|
||||||
"resolved": "https://registry.npmjs.org/react-popper/-/react-popper-2.2.5.tgz",
|
"resolved": "https://registry.npmjs.org/react-popper/-/react-popper-2.2.5.tgz",
|
||||||
@@ -18815,6 +18845,20 @@
|
|||||||
"node": ">= 0.10"
|
"node": ">= 0.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/remark-breaks": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/remark-breaks/-/remark-breaks-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-x96YDJ9X+Ry0/JNZFKfr1hpcAKvGYWfUTszxY9RbxKEqq6uzPPoLCuHdZsLPZZUdAv3nCROyc7FPrQLWr2rxyw==",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/mdast": "^3.0.0",
|
||||||
|
"unified": "^10.0.0",
|
||||||
|
"unist-util-visit": "^4.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/unified"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/remark-gfm": {
|
"node_modules/remark-gfm": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-3.0.1.tgz",
|
||||||
@@ -33059,6 +33103,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
|
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
|
||||||
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
|
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
|
||||||
},
|
},
|
||||||
|
"js-cookie": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw=="
|
||||||
|
},
|
||||||
"js-tokens": {
|
"js-tokens": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||||
@@ -34981,6 +35030,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
|
||||||
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
|
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
|
||||||
},
|
},
|
||||||
|
"photoswipe": {
|
||||||
|
"version": "5.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/photoswipe/-/photoswipe-5.2.7.tgz",
|
||||||
|
"integrity": "sha512-AogMba7W/O5gOtDIZ8cQuou1ltwxlaLNoZY1qi1s+kbYXpZk9D6rXxnNGAfDppl+bfe+sKLW2w2sx+3uQ8oPzg=="
|
||||||
|
},
|
||||||
"picocolors": {
|
"picocolors": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
|
||||||
@@ -36290,6 +36344,12 @@
|
|||||||
"integrity": "sha512-a5Q7CkWznBRUWPmocCvE8b6lEYw1s6+opp/60dCunhO+G6E4tDTO2Sd2jKE+leEnnrLAE2Wj5DlDHNqj5wPv1Q==",
|
"integrity": "sha512-a5Q7CkWznBRUWPmocCvE8b6lEYw1s6+opp/60dCunhO+G6E4tDTO2Sd2jKE+leEnnrLAE2Wj5DlDHNqj5wPv1Q==",
|
||||||
"requires": {}
|
"requires": {}
|
||||||
},
|
},
|
||||||
|
"react-photoswipe-gallery": {
|
||||||
|
"version": "2.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/react-photoswipe-gallery/-/react-photoswipe-gallery-2.2.1.tgz",
|
||||||
|
"integrity": "sha512-xaUKKmwRLCpEzB8+bU7yxjXvRBHaInpBcI6YQY0UOeFctHAL3jGRDk9j2YbwmlgN7kRStHTcyrSNxr+zSaOnKg==",
|
||||||
|
"requires": {}
|
||||||
|
},
|
||||||
"react-popper": {
|
"react-popper": {
|
||||||
"version": "2.2.5",
|
"version": "2.2.5",
|
||||||
"resolved": "https://registry.npmjs.org/react-popper/-/react-popper-2.2.5.tgz",
|
"resolved": "https://registry.npmjs.org/react-popper/-/react-popper-2.2.5.tgz",
|
||||||
@@ -36747,6 +36807,16 @@
|
|||||||
"resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz",
|
"resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz",
|
||||||
"integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk="
|
"integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk="
|
||||||
},
|
},
|
||||||
|
"remark-breaks": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/remark-breaks/-/remark-breaks-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-x96YDJ9X+Ry0/JNZFKfr1hpcAKvGYWfUTszxY9RbxKEqq6uzPPoLCuHdZsLPZZUdAv3nCROyc7FPrQLWr2rxyw==",
|
||||||
|
"requires": {
|
||||||
|
"@types/mdast": "^3.0.0",
|
||||||
|
"unified": "^10.0.0",
|
||||||
|
"unist-util-visit": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"remark-gfm": {
|
"remark-gfm": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-3.0.1.tgz",
|
||||||
|
|||||||
@@ -71,8 +71,10 @@
|
|||||||
"i18next": "^21.6.16",
|
"i18next": "^21.6.16",
|
||||||
"i18next-browser-languagedetector": "^6.1.4",
|
"i18next-browser-languagedetector": "^6.1.4",
|
||||||
"initials": "^3.1.2",
|
"initials": "^3.1.2",
|
||||||
|
"js-cookie": "^3.0.1",
|
||||||
"lodash": "^4.17.20",
|
"lodash": "^4.17.20",
|
||||||
"node-sass": "^7.0.1",
|
"node-sass": "^7.0.1",
|
||||||
|
"photoswipe": "^5.2.7",
|
||||||
"prop-types": "^15.8.1",
|
"prop-types": "^15.8.1",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-beautiful-dnd": "^13.0.0",
|
"react-beautiful-dnd": "^13.0.0",
|
||||||
@@ -82,6 +84,7 @@
|
|||||||
"react-i18next": "^11.16.6",
|
"react-i18next": "^11.16.6",
|
||||||
"react-input-mask": "^2.0.4",
|
"react-input-mask": "^2.0.4",
|
||||||
"react-markdown": "^8.0.2",
|
"react-markdown": "^8.0.2",
|
||||||
|
"react-photoswipe-gallery": "^2.2.1",
|
||||||
"react-redux": "^7.2.8",
|
"react-redux": "^7.2.8",
|
||||||
"react-router-dom": "^5.3.1",
|
"react-router-dom": "^5.3.1",
|
||||||
"react-scripts": "5.0.1",
|
"react-scripts": "5.0.1",
|
||||||
@@ -90,6 +93,7 @@
|
|||||||
"redux-logger": "^3.0.6",
|
"redux-logger": "^3.0.6",
|
||||||
"redux-orm": "^0.16.2",
|
"redux-orm": "^0.16.2",
|
||||||
"redux-saga": "^1.1.3",
|
"redux-saga": "^1.1.3",
|
||||||
|
"remark-breaks": "^3.0.2",
|
||||||
"remark-gfm": "^3.0.1",
|
"remark-gfm": "^3.0.1",
|
||||||
"reselect": "^4.1.5",
|
"reselect": "^4.1.5",
|
||||||
"sails.io.js": "^1.2.1",
|
"sails.io.js": "^1.2.1",
|
||||||
|
|||||||
@@ -41,6 +41,14 @@ export const handleUserUpdate = (user) => ({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const updateUserEmail = (id, data) => ({
|
||||||
|
type: EntryActionTypes.USER_EMAIL_UPDATE,
|
||||||
|
payload: {
|
||||||
|
id,
|
||||||
|
data,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
export const updateCurrentUserEmail = (data) => ({
|
export const updateCurrentUserEmail = (data) => ({
|
||||||
type: EntryActionTypes.CURRENT_USER_EMAIL_UPDATE,
|
type: EntryActionTypes.CURRENT_USER_EMAIL_UPDATE,
|
||||||
payload: {
|
payload: {
|
||||||
@@ -48,11 +56,26 @@ export const updateCurrentUserEmail = (data) => ({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const clearUserEmailUpdateError = (id) => ({
|
||||||
|
type: EntryActionTypes.USER_EMAIL_UPDATE_ERROR_CLEAR,
|
||||||
|
payload: {
|
||||||
|
id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
export const clearCurrentUserEmailUpdateError = () => ({
|
export const clearCurrentUserEmailUpdateError = () => ({
|
||||||
type: EntryActionTypes.CURRENT_USER_EMAIL_UPDATE_ERROR_CLEAR,
|
type: EntryActionTypes.CURRENT_USER_EMAIL_UPDATE_ERROR_CLEAR,
|
||||||
payload: {},
|
payload: {},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const updateUserPassword = (id, data) => ({
|
||||||
|
type: EntryActionTypes.USER_PASSWORD_UPDATE,
|
||||||
|
payload: {
|
||||||
|
id,
|
||||||
|
data,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
export const updateCurrentUserPassword = (data) => ({
|
export const updateCurrentUserPassword = (data) => ({
|
||||||
type: EntryActionTypes.CURRENT_USER_PASSWORD_UPDATE,
|
type: EntryActionTypes.CURRENT_USER_PASSWORD_UPDATE,
|
||||||
payload: {
|
payload: {
|
||||||
@@ -60,11 +83,26 @@ export const updateCurrentUserPassword = (data) => ({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const clearUserPasswordUpdateError = (id) => ({
|
||||||
|
type: EntryActionTypes.USER_PASSWORD_UPDATE_ERROR_CLEAR,
|
||||||
|
payload: {
|
||||||
|
id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
export const clearCurrentUserPasswordUpdateError = () => ({
|
export const clearCurrentUserPasswordUpdateError = () => ({
|
||||||
type: EntryActionTypes.CURRENT_USER_PASSWORD_UPDATE_ERROR_CLEAR,
|
type: EntryActionTypes.CURRENT_USER_PASSWORD_UPDATE_ERROR_CLEAR,
|
||||||
payload: {},
|
payload: {},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const updateUserUsername = (id, data) => ({
|
||||||
|
type: EntryActionTypes.USER_USERNAME_UPDATE,
|
||||||
|
payload: {
|
||||||
|
id,
|
||||||
|
data,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
export const updateCurrentUserUsername = (data) => ({
|
export const updateCurrentUserUsername = (data) => ({
|
||||||
type: EntryActionTypes.CURRENT_USER_USERNAME_UPDATE,
|
type: EntryActionTypes.CURRENT_USER_USERNAME_UPDATE,
|
||||||
payload: {
|
payload: {
|
||||||
@@ -72,6 +110,13 @@ export const updateCurrentUserUsername = (data) => ({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const clearUserUsernameUpdateError = (id) => ({
|
||||||
|
type: EntryActionTypes.USER_USERNAME_UPDATE_ERROR_CLEAR,
|
||||||
|
payload: {
|
||||||
|
id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
export const clearCurrentUserUsernameUpdateError = () => ({
|
export const clearCurrentUserUsernameUpdateError = () => ({
|
||||||
type: EntryActionTypes.CURRENT_USER_USERNAME_UPDATE_ERROR_CLEAR,
|
type: EntryActionTypes.CURRENT_USER_USERNAME_UPDATE_ERROR_CLEAR,
|
||||||
payload: {},
|
payload: {},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import http from './http';
|
|||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
const createAccessToken = (data, headers) => http.post('/access-tokens', data, headers);
|
const createAccessToken = (data) => http.post('/access-tokens', data);
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
createAccessToken,
|
createAccessToken,
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ export const transformAction = (action) => ({
|
|||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
const getActions = (cardId, data, headers) =>
|
const getActions = (cardId, data) =>
|
||||||
socket.get(`/cards/${cardId}/actions`, data, headers).then((body) => ({
|
socket.get(`/cards/${cardId}/actions`, data).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
items: body.items.map(transformAction),
|
items: body.items.map(transformAction),
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -10,20 +10,20 @@ export const transformAttachment = (attachment) => ({
|
|||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
const createAttachment = (cardId, data, requestId, headers) =>
|
const createAttachment = (cardId, data, requestId) =>
|
||||||
http.post(`/cards/${cardId}/attachments?requestId=${requestId}`, data, headers).then((body) => ({
|
http.post(`/cards/${cardId}/attachments?requestId=${requestId}`, data).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
item: transformAttachment(body.item),
|
item: transformAttachment(body.item),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const updateAttachment = (id, data, headers) =>
|
const updateAttachment = (id, data) =>
|
||||||
socket.patch(`/attachments/${id}`, data, headers).then((body) => ({
|
socket.patch(`/attachments/${id}`, data).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
item: transformAttachment(body.item),
|
item: transformAttachment(body.item),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const deleteAttachment = (id, headers) =>
|
const deleteAttachment = (id) =>
|
||||||
socket.delete(`/attachments/${id}`, undefined, headers).then((body) => ({
|
socket.delete(`/attachments/${id}`).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
item: transformAttachment(body.item),
|
item: transformAttachment(body.item),
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -2,11 +2,10 @@ import socket from './socket';
|
|||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
const createBoardMembership = (boardId, data, headers) =>
|
const createBoardMembership = (boardId, data) =>
|
||||||
socket.post(`/boards/${boardId}/memberships`, data, headers);
|
socket.post(`/boards/${boardId}/memberships`, data);
|
||||||
|
|
||||||
const deleteBoardMembership = (id, headers) =>
|
const deleteBoardMembership = (id) => socket.delete(`/board-memberships/${id}`);
|
||||||
socket.delete(`/board-memberships/${id}`, undefined, headers);
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
createBoardMembership,
|
createBoardMembership,
|
||||||
|
|||||||
@@ -4,11 +4,10 @@ import { transformAttachment } from './attachments';
|
|||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
const createBoard = (projectId, data, headers) =>
|
const createBoard = (projectId, data) => socket.post(`/projects/${projectId}/boards`, data);
|
||||||
socket.post(`/projects/${projectId}/boards`, data, headers);
|
|
||||||
|
|
||||||
const getBoard = (id, headers) =>
|
const getBoard = (id) =>
|
||||||
socket.get(`/boards/${id}`, undefined, headers).then((body) => ({
|
socket.get(`/boards/${id}`).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
included: {
|
included: {
|
||||||
...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 {
|
export default {
|
||||||
createBoard,
|
createBoard,
|
||||||
|
|||||||
@@ -2,11 +2,9 @@ import socket from './socket';
|
|||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
const createCardLabel = (cardId, data, headers) =>
|
const createCardLabel = (cardId, data) => socket.post(`/cards/${cardId}/labels`, data);
|
||||||
socket.post(`/cards/${cardId}/labels`, data, headers);
|
|
||||||
|
|
||||||
const deleteCardLabel = (cardId, labelId, headers) =>
|
const deleteCardLabel = (cardId, labelId) => socket.delete(`/cards/${cardId}/labels/${labelId}`);
|
||||||
socket.delete(`/cards/${cardId}/labels/${labelId}`, undefined, headers);
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
createCardLabel,
|
createCardLabel,
|
||||||
|
|||||||
@@ -2,11 +2,10 @@ import socket from './socket';
|
|||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
const createCardMembership = (cardId, data, headers) =>
|
const createCardMembership = (cardId, data) => socket.post(`/cards/${cardId}/memberships`, data);
|
||||||
socket.post(`/cards/${cardId}/memberships`, data, headers);
|
|
||||||
|
|
||||||
const deleteCardMembership = (cardId, userId, headers) =>
|
const deleteCardMembership = (cardId, userId) =>
|
||||||
socket.delete(`/cards/${cardId}/memberships?userId=${userId}`, undefined, headers);
|
socket.delete(`/cards/${cardId}/memberships?userId=${userId}`);
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
createCardMembership,
|
createCardMembership,
|
||||||
|
|||||||
+10
-10
@@ -35,8 +35,8 @@ export const transformCardData = (data) => ({
|
|||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
const getCards = (boardId, data, headers) =>
|
const getCards = (boardId, data) =>
|
||||||
socket.get(`/board/${boardId}/cards`, data, headers).then((body) => ({
|
socket.get(`/board/${boardId}/cards`, data).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
items: body.items.map(transformCard),
|
items: body.items.map(transformCard),
|
||||||
included: {
|
included: {
|
||||||
@@ -45,26 +45,26 @@ const getCards = (boardId, data, headers) =>
|
|||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const createCard = (boardId, data, headers) =>
|
const createCard = (boardId, data) =>
|
||||||
socket.post(`/boards/${boardId}/cards`, transformCardData(data), headers).then((body) => ({
|
socket.post(`/boards/${boardId}/cards`, transformCardData(data)).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
item: transformCard(body.item),
|
item: transformCard(body.item),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const getCard = (id, headers) =>
|
const getCard = (id) =>
|
||||||
socket.get(`/cards/${id}`, undefined, headers).then((body) => ({
|
socket.get(`/cards/${id}`).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
item: transformCard(body.item),
|
item: transformCard(body.item),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const updateCard = (id, data, headers) =>
|
const updateCard = (id, data) =>
|
||||||
socket.patch(`/cards/${id}`, transformCardData(data), headers).then((body) => ({
|
socket.patch(`/cards/${id}`, transformCardData(data)).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
item: transformCard(body.item),
|
item: transformCard(body.item),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const deleteCard = (id, headers) =>
|
const deleteCard = (id) =>
|
||||||
socket.delete(`/cards/${id}`, undefined, headers).then((body) => ({
|
socket.delete(`/cards/${id}`).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
item: transformCard(body.item),
|
item: transformCard(body.item),
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -3,20 +3,20 @@ import { transformAction } from './actions';
|
|||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
const createCommentAction = (cardId, data, headers) =>
|
const createCommentAction = (cardId, data) =>
|
||||||
socket.post(`/cards/${cardId}/comment-actions`, data, headers).then((body) => ({
|
socket.post(`/cards/${cardId}/comment-actions`, data).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
item: transformAction(body.item),
|
item: transformAction(body.item),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const updateCommentAction = (id, data, headers) =>
|
const updateCommentAction = (id, data) =>
|
||||||
socket.patch(`/comment-actions/${id}`, data, headers).then((body) => ({
|
socket.patch(`/comment-actions/${id}`, data).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
item: transformAction(body.item),
|
item: transformAction(body.item),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const deleteCommentAction = (id, headers) =>
|
const deleteCommentAction = (id) =>
|
||||||
socket.delete(`/comment-actions/${id}`, undefined, headers).then((body) => ({
|
socket.delete(`/comment-actions/${id}`).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
item: transformAction(body.item),
|
item: transformAction(body.item),
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ const http = {};
|
|||||||
|
|
||||||
// TODO: add all methods
|
// TODO: add all methods
|
||||||
['POST'].forEach((method) => {
|
['POST'].forEach((method) => {
|
||||||
http[method.toLowerCase()] = (url, data, headers) => {
|
http[method.toLowerCase()] = (url, data) => {
|
||||||
const formData = Object.keys(data).reduce((result, key) => {
|
const formData = Object.keys(data).reduce((result, key) => {
|
||||||
result.append(key, data[key]);
|
result.append(key, data[key]);
|
||||||
|
|
||||||
@@ -15,8 +15,8 @@ const http = {};
|
|||||||
|
|
||||||
return fetch(`${Config.SERVER_BASE_URL}/api${url}`, {
|
return fetch(`${Config.SERVER_BASE_URL}/api${url}`, {
|
||||||
method,
|
method,
|
||||||
headers,
|
|
||||||
body: formData,
|
body: formData,
|
||||||
|
...Config.FETCH_OPTIONS,
|
||||||
})
|
})
|
||||||
.then((response) =>
|
.then((response) =>
|
||||||
response.json().then((body) => ({
|
response.json().then((body) => ({
|
||||||
|
|||||||
@@ -2,12 +2,11 @@ import socket from './socket';
|
|||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
const createLabel = (boardId, data, headers) =>
|
const createLabel = (boardId, data) => socket.post(`/boards/${boardId}/labels`, data);
|
||||||
socket.post(`/boards/${boardId}/labels`, data, headers);
|
|
||||||
|
|
||||||
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 {
|
export default {
|
||||||
createLabel,
|
createLabel,
|
||||||
|
|||||||
@@ -2,12 +2,11 @@ import socket from './socket';
|
|||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
const createList = (boardId, data, headers) =>
|
const createList = (boardId, data) => socket.post(`/boards/${boardId}/lists`, data);
|
||||||
socket.post(`/boards/${boardId}/lists`, data, headers);
|
|
||||||
|
|
||||||
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 {
|
export default {
|
||||||
createList,
|
createList,
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import { transformAction } from './actions';
|
|||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
const getNotifications = (headers) =>
|
const getNotifications = () =>
|
||||||
socket.get('/notifications', undefined, headers).then((body) => ({
|
socket.get('/notifications').then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
included: {
|
included: {
|
||||||
...body.included,
|
...body.included,
|
||||||
@@ -14,8 +14,8 @@ const getNotifications = (headers) =>
|
|||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const getNotification = (id, headers) =>
|
const getNotification = (id) =>
|
||||||
socket.get(`/notifications/${id}`, undefined, headers).then((body) => ({
|
socket.get(`/notifications/${id}`).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
included: {
|
included: {
|
||||||
...body.included,
|
...body.included,
|
||||||
@@ -24,8 +24,7 @@ const getNotification = (id, headers) =>
|
|||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const updateNotifications = (ids, data, headers) =>
|
const updateNotifications = (ids, data) => socket.patch(`/notifications/${ids.join(',')}`, data);
|
||||||
socket.patch(`/notifications/${ids.join(',')}`, data, headers);
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
getNotifications,
|
getNotifications,
|
||||||
|
|||||||
@@ -2,11 +2,10 @@ import socket from './socket';
|
|||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
const createProjectManager = (projectId, data, headers) =>
|
const createProjectManager = (projectId, data) =>
|
||||||
socket.post(`/projects/${projectId}/managers`, data, headers);
|
socket.post(`/projects/${projectId}/managers`, data);
|
||||||
|
|
||||||
const deleteProjectManager = (id, headers) =>
|
const deleteProjectManager = (id) => socket.delete(`/project-managers/${id}`);
|
||||||
socket.delete(`/project-managers/${id}`, undefined, headers);
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
createProjectManager,
|
createProjectManager,
|
||||||
|
|||||||
@@ -3,18 +3,18 @@ import socket from './socket';
|
|||||||
|
|
||||||
/* Actions */
|
/* 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) =>
|
const updateProjectBackgroundImage = (id, data) =>
|
||||||
http.post(`/projects/${id}/background-image`, data, headers);
|
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 {
|
export default {
|
||||||
getProjects,
|
getProjects,
|
||||||
|
|||||||
@@ -16,13 +16,12 @@ const { socket } = io;
|
|||||||
socket.connect = socket._connect; // eslint-disable-line no-underscore-dangle
|
socket.connect = socket._connect; // eslint-disable-line no-underscore-dangle
|
||||||
|
|
||||||
['GET', 'POST', 'PUT', 'PATCH', 'DELETE'].forEach((method) => {
|
['GET', 'POST', 'PUT', 'PATCH', 'DELETE'].forEach((method) => {
|
||||||
socket[method.toLowerCase()] = (url, data, headers) =>
|
socket[method.toLowerCase()] = (url, data) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
socket.request(
|
socket.request(
|
||||||
{
|
{
|
||||||
method,
|
method,
|
||||||
data,
|
data,
|
||||||
headers,
|
|
||||||
url: `/api${url}`,
|
url: `/api${url}`,
|
||||||
},
|
},
|
||||||
(_, { body, error }) => {
|
(_, { body, error }) => {
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ import socket from './socket';
|
|||||||
|
|
||||||
/* Actions */
|
/* 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 {
|
export default {
|
||||||
createTask,
|
createTask,
|
||||||
|
|||||||
+10
-12
@@ -3,27 +3,25 @@ import socket from './socket';
|
|||||||
|
|
||||||
/* Actions */
|
/* 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) =>
|
const updateUserPassword = (id, data) => socket.patch(`/users/${id}/password`, data);
|
||||||
socket.patch(`/users/${id}/password`, data, headers);
|
|
||||||
|
|
||||||
const updateUserUsername = (id, data, headers) =>
|
const updateUserUsername = (id, data) => socket.patch(`/users/${id}/username`, data);
|
||||||
socket.patch(`/users/${id}/username`, data, headers);
|
|
||||||
|
|
||||||
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 {
|
export default {
|
||||||
getUsers,
|
getUsers,
|
||||||
|
|||||||
@@ -38,9 +38,9 @@ const ItemComment = React.memo(
|
|||||||
</div>
|
</div>
|
||||||
<CommentEdit ref={commentEdit} defaultData={data} onUpdate={onUpdate}>
|
<CommentEdit ref={commentEdit} defaultData={data} onUpdate={onUpdate}>
|
||||||
<>
|
<>
|
||||||
<Markdown linkTarget="_blank" className={styles.text}>
|
<div className={styles.text}>
|
||||||
{data.text}
|
<Markdown linkTarget="_blank">{data.text}</Markdown>
|
||||||
</Markdown>
|
</div>
|
||||||
{canEdit && (
|
{canEdit && (
|
||||||
<Comment.Actions>
|
<Comment.Actions>
|
||||||
<Comment.Action
|
<Comment.Action
|
||||||
|
|||||||
@@ -34,13 +34,6 @@
|
|||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: pre-line;
|
|
||||||
word-break: break-word;
|
|
||||||
|
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import classNames from 'classnames';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { Gallery, Item as GalleryItem } from 'react-photoswipe-gallery';
|
||||||
import { Button } from 'semantic-ui-react';
|
import { Button } from 'semantic-ui-react';
|
||||||
import { useToggle } from '../../../lib/hooks';
|
import { useToggle } from '../../../lib/hooks';
|
||||||
|
|
||||||
@@ -8,81 +10,152 @@ import Item from './Item';
|
|||||||
|
|
||||||
import styles from './Attachments.module.scss';
|
import styles from './Attachments.module.scss';
|
||||||
|
|
||||||
const Attachments = React.memo(({ items, onUpdate, onDelete, onCoverUpdate }) => {
|
const INITIALLY_VISIBLE = 4;
|
||||||
const [t] = useTranslation();
|
|
||||||
const [isOpened, toggleOpened] = useToggle();
|
|
||||||
|
|
||||||
const handleToggleClick = useCallback(() => {
|
const Attachments = React.memo(
|
||||||
toggleOpened();
|
({ items, onUpdate, onDelete, onCoverUpdate, onGalleryOpen, onGalleryClose }) => {
|
||||||
}, [toggleOpened]);
|
const [t] = useTranslation();
|
||||||
|
const [isAllVisible, toggleAllVisible] = useToggle();
|
||||||
|
|
||||||
const handleCoverSelect = useCallback(
|
const handleCoverSelect = useCallback(
|
||||||
(id) => {
|
(id) => {
|
||||||
onCoverUpdate(id);
|
onCoverUpdate(id);
|
||||||
},
|
},
|
||||||
[onCoverUpdate],
|
[onCoverUpdate],
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleCoverDeselect = useCallback(() => {
|
const handleCoverDeselect = useCallback(() => {
|
||||||
onCoverUpdate(null);
|
onCoverUpdate(null);
|
||||||
}, [onCoverUpdate]);
|
}, [onCoverUpdate]);
|
||||||
|
|
||||||
const handleUpdate = useCallback(
|
const handleUpdate = useCallback(
|
||||||
(id, data) => {
|
(id, data) => {
|
||||||
onUpdate(id, data);
|
onUpdate(id, data);
|
||||||
},
|
},
|
||||||
[onUpdate],
|
[onUpdate],
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDelete = useCallback(
|
const handleDelete = useCallback(
|
||||||
(id) => {
|
(id) => {
|
||||||
onDelete(id);
|
onDelete(id);
|
||||||
},
|
},
|
||||||
[onDelete],
|
[onDelete],
|
||||||
);
|
);
|
||||||
|
|
||||||
const visibleItems = isOpened ? items : items.slice(0, 4);
|
const handleBeforeGalleryOpen = useCallback(
|
||||||
|
(gallery) => {
|
||||||
|
onGalleryOpen();
|
||||||
|
|
||||||
return (
|
gallery.on('destroy', () => {
|
||||||
<>
|
onGalleryClose();
|
||||||
{visibleItems.map((item) => (
|
});
|
||||||
<Item
|
},
|
||||||
|
[onGalleryOpen, onGalleryClose],
|
||||||
|
);
|
||||||
|
|
||||||
|
const handleToggleAllVisibleClick = useCallback(() => {
|
||||||
|
toggleAllVisible();
|
||||||
|
}, [toggleAllVisible]);
|
||||||
|
|
||||||
|
const galleryItemsNode = items.map((item, index) => {
|
||||||
|
const isPdf = item.url && item.url.endsWith('.pdf');
|
||||||
|
|
||||||
|
let props;
|
||||||
|
if (item.image) {
|
||||||
|
props = item.image;
|
||||||
|
} else {
|
||||||
|
props = {
|
||||||
|
content: isPdf ? (
|
||||||
|
// eslint-disable-next-line jsx-a11y/alt-text
|
||||||
|
<object
|
||||||
|
data={item.url}
|
||||||
|
type="application/pdf"
|
||||||
|
className={classNames(styles.content, styles.contentPdf)}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<span className={classNames(styles.content, styles.contentError)}>
|
||||||
|
{t('common.thereIsNoPreviewAvailableForThisAttachment')}
|
||||||
|
</span>
|
||||||
|
),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const isVisible = isAllVisible || index < INITIALLY_VISIBLE;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<GalleryItem
|
||||||
|
{...props} // eslint-disable-line react/jsx-props-no-spreading
|
||||||
key={item.id}
|
key={item.id}
|
||||||
name={item.name}
|
original={item.url}
|
||||||
url={item.url}
|
caption={item.name}
|
||||||
coverUrl={item.coverUrl}
|
>
|
||||||
createdAt={item.createdAt}
|
{({ ref, open }) =>
|
||||||
isCover={item.isCover}
|
isVisible ? (
|
||||||
isPersisted={item.isPersisted}
|
<Item
|
||||||
onCoverSelect={() => handleCoverSelect(item.id)}
|
ref={ref}
|
||||||
onCoverDeselect={handleCoverDeselect}
|
name={item.name}
|
||||||
onUpdate={(data) => handleUpdate(item.id, data)}
|
url={item.url}
|
||||||
onDelete={() => handleDelete(item.id)}
|
coverUrl={item.coverUrl}
|
||||||
/>
|
createdAt={item.createdAt}
|
||||||
))}
|
isCover={item.isCover}
|
||||||
{items.length > 4 && (
|
isPersisted={item.isPersisted}
|
||||||
<Button
|
onClick={item.image || isPdf ? open : undefined}
|
||||||
fluid
|
onCoverSelect={() => handleCoverSelect(item.id)}
|
||||||
content={
|
onCoverDeselect={handleCoverDeselect}
|
||||||
isOpened
|
onUpdate={(data) => handleUpdate(item.id, data)}
|
||||||
? t('action.showFewerAttachments')
|
onDelete={() => handleDelete(item.id)}
|
||||||
: t('action.showAllAttachments', {
|
/>
|
||||||
hidden: items.length - visibleItems.length,
|
) : (
|
||||||
})
|
<span ref={ref} />
|
||||||
|
)
|
||||||
}
|
}
|
||||||
className={styles.toggleButton}
|
</GalleryItem>
|
||||||
onClick={handleToggleClick}
|
);
|
||||||
/>
|
});
|
||||||
)}
|
|
||||||
</>
|
return (
|
||||||
);
|
<>
|
||||||
});
|
<Gallery
|
||||||
|
withCaption
|
||||||
|
withDownloadButton
|
||||||
|
options={{
|
||||||
|
showHideAnimationType: 'none',
|
||||||
|
closeTitle: '',
|
||||||
|
zoomTitle: '',
|
||||||
|
arrowPrevTitle: '',
|
||||||
|
arrowNextTitle: '',
|
||||||
|
errorMsg: '',
|
||||||
|
}}
|
||||||
|
onBeforeOpen={handleBeforeGalleryOpen}
|
||||||
|
>
|
||||||
|
{galleryItemsNode}
|
||||||
|
</Gallery>
|
||||||
|
{items.length > INITIALLY_VISIBLE && (
|
||||||
|
<Button
|
||||||
|
fluid
|
||||||
|
content={
|
||||||
|
isAllVisible
|
||||||
|
? t('action.showFewerAttachments')
|
||||||
|
: t('action.showAllAttachments', {
|
||||||
|
hidden: items.length - INITIALLY_VISIBLE,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
className={styles.toggleButton}
|
||||||
|
onClick={handleToggleAllVisibleClick}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
Attachments.propTypes = {
|
Attachments.propTypes = {
|
||||||
items: PropTypes.array.isRequired, // eslint-disable-line react/forbid-prop-types
|
items: PropTypes.array.isRequired, // eslint-disable-line react/forbid-prop-types
|
||||||
onUpdate: PropTypes.func.isRequired,
|
onUpdate: PropTypes.func.isRequired,
|
||||||
onDelete: PropTypes.func.isRequired,
|
onDelete: PropTypes.func.isRequired,
|
||||||
onCoverUpdate: PropTypes.func.isRequired,
|
onCoverUpdate: PropTypes.func.isRequired,
|
||||||
|
onGalleryOpen: PropTypes.func.isRequired,
|
||||||
|
onGalleryClose: PropTypes.func.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Attachments;
|
export default Attachments;
|
||||||
|
|||||||
@@ -1,4 +1,26 @@
|
|||||||
:global(#app) {
|
:global(#app) {
|
||||||
|
.content {
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
margin: auto;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contentPdf {
|
||||||
|
height: 100%;
|
||||||
|
width: 1120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contentError {
|
||||||
|
color: #fff;
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 700;
|
||||||
|
height: 20px;
|
||||||
|
width: 470px;
|
||||||
|
}
|
||||||
|
|
||||||
.toggleButton {
|
.toggleButton {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
|||||||
@@ -8,24 +8,32 @@ import EditPopup from './EditPopup';
|
|||||||
|
|
||||||
import styles from './Item.module.scss';
|
import styles from './Item.module.scss';
|
||||||
|
|
||||||
const Item = React.memo(
|
const Item = React.forwardRef(
|
||||||
({
|
(
|
||||||
name,
|
{
|
||||||
url,
|
name,
|
||||||
coverUrl,
|
url,
|
||||||
createdAt,
|
coverUrl,
|
||||||
isCover,
|
createdAt,
|
||||||
isPersisted,
|
isCover,
|
||||||
onCoverSelect,
|
isPersisted,
|
||||||
onCoverDeselect,
|
onCoverSelect,
|
||||||
onUpdate,
|
onCoverDeselect,
|
||||||
onDelete,
|
onClick,
|
||||||
}) => {
|
onUpdate,
|
||||||
|
onDelete,
|
||||||
|
},
|
||||||
|
ref,
|
||||||
|
) => {
|
||||||
const [t] = useTranslation();
|
const [t] = useTranslation();
|
||||||
|
|
||||||
const handleClick = useCallback(() => {
|
const handleClick = useCallback(() => {
|
||||||
window.open(url, '_blank');
|
if (onClick) {
|
||||||
}, [url]);
|
onClick();
|
||||||
|
} else {
|
||||||
|
window.open(url, '_blank');
|
||||||
|
}
|
||||||
|
}, [url, onClick]);
|
||||||
|
|
||||||
const handleToggleCoverClick = useCallback(
|
const handleToggleCoverClick = useCallback(
|
||||||
(event) => {
|
(event) => {
|
||||||
@@ -54,7 +62,7 @@ const Item = React.memo(
|
|||||||
return (
|
return (
|
||||||
/* eslint-disable jsx-a11y/click-events-have-key-events,
|
/* eslint-disable jsx-a11y/click-events-have-key-events,
|
||||||
jsx-a11y/no-static-element-interactions */
|
jsx-a11y/no-static-element-interactions */
|
||||||
<div className={styles.wrapper} onClick={handleClick}>
|
<div ref={ref} className={styles.wrapper} onClick={handleClick}>
|
||||||
{/* eslint-enable jsx-a11y/click-events-have-key-events,
|
{/* eslint-enable jsx-a11y/click-events-have-key-events,
|
||||||
jsx-a11y/no-static-element-interactions */}
|
jsx-a11y/no-static-element-interactions */}
|
||||||
<div
|
<div
|
||||||
@@ -133,6 +141,7 @@ Item.propTypes = {
|
|||||||
createdAt: PropTypes.instanceOf(Date),
|
createdAt: PropTypes.instanceOf(Date),
|
||||||
isCover: PropTypes.bool.isRequired,
|
isCover: PropTypes.bool.isRequired,
|
||||||
isPersisted: PropTypes.bool.isRequired,
|
isPersisted: PropTypes.bool.isRequired,
|
||||||
|
onClick: PropTypes.func,
|
||||||
onCoverSelect: PropTypes.func.isRequired,
|
onCoverSelect: PropTypes.func.isRequired,
|
||||||
onCoverDeselect: PropTypes.func.isRequired,
|
onCoverDeselect: PropTypes.func.isRequired,
|
||||||
onUpdate: PropTypes.func.isRequired,
|
onUpdate: PropTypes.func.isRequired,
|
||||||
@@ -143,6 +152,7 @@ Item.defaultProps = {
|
|||||||
url: undefined,
|
url: undefined,
|
||||||
coverUrl: undefined,
|
coverUrl: undefined,
|
||||||
createdAt: undefined,
|
createdAt: undefined,
|
||||||
|
onClick: undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Item;
|
export default React.memo(Item);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback, useRef } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
@@ -73,6 +73,8 @@ const CardModal = React.memo(
|
|||||||
}) => {
|
}) => {
|
||||||
const [t] = useTranslation();
|
const [t] = useTranslation();
|
||||||
|
|
||||||
|
const isGalleryOpened = useRef(false);
|
||||||
|
|
||||||
const handleNameUpdate = useCallback(
|
const handleNameUpdate = useCallback(
|
||||||
(newName) => {
|
(newName) => {
|
||||||
onUpdate({
|
onUpdate({
|
||||||
@@ -124,6 +126,22 @@ const CardModal = React.memo(
|
|||||||
});
|
});
|
||||||
}, [isSubscribed, onUpdate]);
|
}, [isSubscribed, onUpdate]);
|
||||||
|
|
||||||
|
const handleGalleryOpen = useCallback(() => {
|
||||||
|
isGalleryOpened.current = true;
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const handleGalleryClose = useCallback(() => {
|
||||||
|
isGalleryOpened.current = false;
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const handleClose = useCallback(() => {
|
||||||
|
if (isGalleryOpened.current) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
onClose();
|
||||||
|
}, [onClose]);
|
||||||
|
|
||||||
const userIds = users.map((user) => user.id);
|
const userIds = users.map((user) => user.id);
|
||||||
const labelIds = labels.map((label) => label.id);
|
const labelIds = labels.map((label) => label.id);
|
||||||
|
|
||||||
@@ -328,6 +346,8 @@ const CardModal = React.memo(
|
|||||||
onUpdate={onAttachmentUpdate}
|
onUpdate={onAttachmentUpdate}
|
||||||
onDelete={onAttachmentDelete}
|
onDelete={onAttachmentDelete}
|
||||||
onCoverUpdate={handleCoverUpdate}
|
onCoverUpdate={handleCoverUpdate}
|
||||||
|
onGalleryOpen={handleGalleryOpen}
|
||||||
|
onGalleryClose={handleGalleryClose}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -445,7 +465,7 @@ const CardModal = React.memo(
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal open closeIcon size="small" centered={false} onClose={onClose}>
|
<Modal open closeIcon size="small" centered={false} onClose={handleClose}>
|
||||||
{canEdit ? (
|
{canEdit ? (
|
||||||
<AttachmentAddZone onCreate={onAttachmentCreate}>{contentNode}</AttachmentAddZone>
|
<AttachmentAddZone onCreate={onAttachmentCreate}>{contentNode}</AttachmentAddZone>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -115,23 +115,13 @@
|
|||||||
border: none;
|
border: none;
|
||||||
color: #17394d;
|
color: #17394d;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
line-height: 1.5;
|
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
outline: none;
|
outline: none;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
overflow-wrap: break-word;
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
p {
|
|
||||||
white-space: pre-line;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid {
|
.grid {
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import CoreWrapperContainer from '../containers/CoreWrapperContainer';
|
|||||||
import NotFound from './NotFound';
|
import NotFound from './NotFound';
|
||||||
|
|
||||||
import 'react-datepicker/dist/react-datepicker.css';
|
import 'react-datepicker/dist/react-datepicker.css';
|
||||||
|
import 'photoswipe/dist/photoswipe.css';
|
||||||
import '../lib/custom-ui/styles.css';
|
import '../lib/custom-ui/styles.css';
|
||||||
|
|
||||||
import '../styles.module.scss';
|
import '../styles.module.scss';
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ const createData = (timer) => {
|
|||||||
const TimerEditStep = React.memo(({ defaultValue, onUpdate, onBack, onClose }) => {
|
const TimerEditStep = React.memo(({ defaultValue, onUpdate, onBack, onClose }) => {
|
||||||
const [t] = useTranslation();
|
const [t] = useTranslation();
|
||||||
const [data, handleFieldChange, setData] = useForm(() => createData(defaultValue));
|
const [data, handleFieldChange, setData] = useForm(() => createData(defaultValue));
|
||||||
const [isEditing, toggleEdit] = useToggle();
|
const [isEditing, toggleEditing] = useToggle();
|
||||||
|
|
||||||
const hoursField = useRef(null);
|
const hoursField = useRef(null);
|
||||||
const minutesField = useRef(null);
|
const minutesField = useRef(null);
|
||||||
@@ -55,10 +55,10 @@ const TimerEditStep = React.memo(({ defaultValue, onUpdate, onBack, onClose }) =
|
|||||||
onClose();
|
onClose();
|
||||||
}, [defaultValue, onUpdate, onClose]);
|
}, [defaultValue, onUpdate, onClose]);
|
||||||
|
|
||||||
const handleToggleEditClick = useCallback(() => {
|
const handleToggleEditingClick = useCallback(() => {
|
||||||
setData(createData(defaultValue));
|
setData(createData(defaultValue));
|
||||||
toggleEdit();
|
toggleEditing();
|
||||||
}, [defaultValue, setData, toggleEdit]);
|
}, [defaultValue, setData, toggleEditing]);
|
||||||
|
|
||||||
const handleSubmit = useCallback(() => {
|
const handleSubmit = useCallback(() => {
|
||||||
const parts = {
|
const parts = {
|
||||||
@@ -149,7 +149,7 @@ const TimerEditStep = React.memo(({ defaultValue, onUpdate, onBack, onClose }) =
|
|||||||
type="button"
|
type="button"
|
||||||
icon={isEditing ? 'close' : 'edit'}
|
icon={isEditing ? 'close' : 'edit'}
|
||||||
className={styles.iconButton}
|
className={styles.iconButton}
|
||||||
onClick={handleToggleEditClick}
|
onClick={handleToggleEditingClick}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{isEditing && <Button positive content={t('action.save')} />}
|
{isEditing && <Button positive content={t('action.save')} />}
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import { withPopup } from '../lib/popup';
|
||||||
|
|
||||||
|
import UserEmailEditStep from './UserEmailEditStep';
|
||||||
|
|
||||||
|
export default withPopup(UserEmailEditStep);
|
||||||
+41
-23
@@ -1,15 +1,15 @@
|
|||||||
|
import omit from 'lodash/omit';
|
||||||
import isEmail from 'validator/lib/isEmail';
|
import isEmail from 'validator/lib/isEmail';
|
||||||
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Button, Form, Message } from 'semantic-ui-react';
|
import { Button, Form, Message } from 'semantic-ui-react';
|
||||||
import { useDidUpdate, usePrevious, useToggle } from '../../../lib/hooks';
|
import { useDidUpdate, usePrevious, useToggle } from '../../lib/hooks';
|
||||||
import { withPopup } from '../../../lib/popup';
|
import { Input, Popup } from '../../lib/custom-ui';
|
||||||
import { Input, Popup } from '../../../lib/custom-ui';
|
|
||||||
|
|
||||||
import { useForm } from '../../../hooks';
|
import { useForm } from '../../hooks';
|
||||||
|
|
||||||
import styles from './EmailEditPopup.module.scss';
|
import styles from './UserEmailEditStep.module.scss';
|
||||||
|
|
||||||
const createMessage = (error) => {
|
const createMessage = (error) => {
|
||||||
if (!error) {
|
if (!error) {
|
||||||
@@ -35,8 +35,18 @@ const createMessage = (error) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const EmailEditStep = React.memo(
|
const UserEmailEditStep = React.memo(
|
||||||
({ defaultData, email, isSubmitting, error, onUpdate, onMessageDismiss, onClose }) => {
|
({
|
||||||
|
defaultData,
|
||||||
|
email,
|
||||||
|
isSubmitting,
|
||||||
|
error,
|
||||||
|
usePasswordConfirmation,
|
||||||
|
onUpdate,
|
||||||
|
onMessageDismiss,
|
||||||
|
onBack,
|
||||||
|
onClose,
|
||||||
|
}) => {
|
||||||
const [t] = useTranslation();
|
const [t] = useTranslation();
|
||||||
const wasSubmitting = usePrevious(isSubmitting);
|
const wasSubmitting = usePrevious(isSubmitting);
|
||||||
|
|
||||||
@@ -68,13 +78,13 @@ const EmailEditStep = React.memo(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cleanData.currentPassword) {
|
if (usePasswordConfirmation && !cleanData.currentPassword) {
|
||||||
currentPasswordField.current.focus();
|
currentPasswordField.current.focus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
onUpdate(cleanData);
|
onUpdate(usePasswordConfirmation ? cleanData : omit(cleanData, 'currentPassword'));
|
||||||
}, [email, onUpdate, onClose, data]);
|
}, [email, usePasswordConfirmation, onUpdate, onClose, data]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
emailField.current.select();
|
emailField.current.select();
|
||||||
@@ -110,7 +120,7 @@ const EmailEditStep = React.memo(
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Popup.Header>
|
<Popup.Header onBack={onBack}>
|
||||||
{t('common.editEmail', {
|
{t('common.editEmail', {
|
||||||
context: 'title',
|
context: 'title',
|
||||||
})}
|
})}
|
||||||
@@ -138,15 +148,19 @@ const EmailEditStep = React.memo(
|
|||||||
className={styles.field}
|
className={styles.field}
|
||||||
onChange={handleFieldChange}
|
onChange={handleFieldChange}
|
||||||
/>
|
/>
|
||||||
<div className={styles.text}>{t('common.currentPassword')}</div>
|
{usePasswordConfirmation && (
|
||||||
<Input.Password
|
<>
|
||||||
fluid
|
<div className={styles.text}>{t('common.currentPassword')}</div>
|
||||||
ref={currentPasswordField}
|
<Input.Password
|
||||||
name="currentPassword"
|
fluid
|
||||||
value={data.currentPassword}
|
ref={currentPasswordField}
|
||||||
className={styles.field}
|
name="currentPassword"
|
||||||
onChange={handleFieldChange}
|
value={data.currentPassword}
|
||||||
/>
|
className={styles.field}
|
||||||
|
onChange={handleFieldChange}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
<Button
|
<Button
|
||||||
positive
|
positive
|
||||||
content={t('action.save')}
|
content={t('action.save')}
|
||||||
@@ -160,18 +174,22 @@ const EmailEditStep = React.memo(
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
EmailEditStep.propTypes = {
|
UserEmailEditStep.propTypes = {
|
||||||
defaultData: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types
|
defaultData: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types
|
||||||
email: PropTypes.string.isRequired,
|
email: PropTypes.string.isRequired,
|
||||||
isSubmitting: PropTypes.bool.isRequired,
|
isSubmitting: PropTypes.bool.isRequired,
|
||||||
error: PropTypes.object, // eslint-disable-line react/forbid-prop-types
|
error: PropTypes.object, // eslint-disable-line react/forbid-prop-types
|
||||||
|
usePasswordConfirmation: PropTypes.bool,
|
||||||
onUpdate: PropTypes.func.isRequired,
|
onUpdate: PropTypes.func.isRequired,
|
||||||
onMessageDismiss: PropTypes.func.isRequired,
|
onMessageDismiss: PropTypes.func.isRequired,
|
||||||
|
onBack: PropTypes.func,
|
||||||
onClose: PropTypes.func.isRequired,
|
onClose: PropTypes.func.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
EmailEditStep.defaultProps = {
|
UserEmailEditStep.defaultProps = {
|
||||||
error: undefined,
|
error: undefined,
|
||||||
|
usePasswordConfirmation: false,
|
||||||
|
onBack: undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default withPopup(EmailEditStep);
|
export default UserEmailEditStep;
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
import UserEmailEditStep from './UserEmailEditStep';
|
||||||
|
|
||||||
|
export default UserEmailEditStep;
|
||||||
+5
-5
@@ -5,11 +5,11 @@ import PropTypes from 'prop-types';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Button, Form, Input } from 'semantic-ui-react';
|
import { Button, Form, Input } from 'semantic-ui-react';
|
||||||
|
|
||||||
import { useForm } from '../../../hooks';
|
import { useForm } from '../../hooks';
|
||||||
|
|
||||||
import styles from './InformationEdit.module.scss';
|
import styles from './UserInformationEdit.module.scss';
|
||||||
|
|
||||||
const InformationEdit = React.memo(({ defaultData, onUpdate }) => {
|
const UserInformationEdit = React.memo(({ defaultData, onUpdate }) => {
|
||||||
const [t] = useTranslation();
|
const [t] = useTranslation();
|
||||||
|
|
||||||
const [data, handleFieldChange] = useForm(() => ({
|
const [data, handleFieldChange] = useForm(() => ({
|
||||||
@@ -72,9 +72,9 @@ const InformationEdit = React.memo(({ defaultData, onUpdate }) => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
InformationEdit.propTypes = {
|
UserInformationEdit.propTypes = {
|
||||||
defaultData: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types
|
defaultData: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types
|
||||||
onUpdate: PropTypes.func.isRequired,
|
onUpdate: PropTypes.func.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default InformationEdit;
|
export default UserInformationEdit;
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
import UserInformationEdit from './UserInformationEdit';
|
||||||
|
|
||||||
|
export default UserInformationEdit;
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
import React, { useCallback } from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { Popup } from '../lib/custom-ui';
|
||||||
|
|
||||||
|
import UserInformationEdit from './UserInformationEdit';
|
||||||
|
|
||||||
|
const UserInformationEditStep = React.memo(({ defaultData, onUpdate, onBack, onClose }) => {
|
||||||
|
const [t] = useTranslation();
|
||||||
|
|
||||||
|
const handleUpdate = useCallback(
|
||||||
|
(data) => {
|
||||||
|
onUpdate(data);
|
||||||
|
onClose();
|
||||||
|
},
|
||||||
|
[onUpdate, onClose],
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Popup.Header onBack={onBack}>
|
||||||
|
{t('common.editInformation', {
|
||||||
|
context: 'title',
|
||||||
|
})}
|
||||||
|
</Popup.Header>
|
||||||
|
<Popup.Content>
|
||||||
|
<UserInformationEdit defaultData={defaultData} onUpdate={handleUpdate} />
|
||||||
|
</Popup.Content>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
UserInformationEditStep.propTypes = {
|
||||||
|
defaultData: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types
|
||||||
|
onUpdate: PropTypes.func.isRequired,
|
||||||
|
onBack: PropTypes.func,
|
||||||
|
onClose: PropTypes.func.isRequired,
|
||||||
|
};
|
||||||
|
|
||||||
|
UserInformationEditStep.defaultProps = {
|
||||||
|
onBack: undefined,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default UserInformationEditStep;
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import { withPopup } from '../lib/popup';
|
||||||
|
|
||||||
|
import UserPasswordEditStep from './UserPasswordEditStep';
|
||||||
|
|
||||||
|
export default withPopup(UserPasswordEditStep);
|
||||||
+40
-23
@@ -1,14 +1,14 @@
|
|||||||
|
import omit from 'lodash/omit';
|
||||||
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Button, Form, Message } from 'semantic-ui-react';
|
import { Button, Form, Message } from 'semantic-ui-react';
|
||||||
import { useDidUpdate, usePrevious, useToggle } from '../../../lib/hooks';
|
import { useDidUpdate, usePrevious, useToggle } from '../../lib/hooks';
|
||||||
import { withPopup } from '../../../lib/popup';
|
import { Input, Popup } from '../../lib/custom-ui';
|
||||||
import { Input, Popup } from '../../../lib/custom-ui';
|
|
||||||
|
|
||||||
import { useForm } from '../../../hooks';
|
import { useForm } from '../../hooks';
|
||||||
|
|
||||||
import styles from './PasswordEditPopup.module.scss';
|
import styles from './UserPasswordEditStep.module.scss';
|
||||||
|
|
||||||
const createMessage = (error) => {
|
const createMessage = (error) => {
|
||||||
if (!error) {
|
if (!error) {
|
||||||
@@ -29,8 +29,17 @@ const createMessage = (error) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const PasswordEditStep = React.memo(
|
const UserPasswordEditStep = React.memo(
|
||||||
({ defaultData, isSubmitting, error, onUpdate, onMessageDismiss, onClose }) => {
|
({
|
||||||
|
defaultData,
|
||||||
|
isSubmitting,
|
||||||
|
error,
|
||||||
|
usePasswordConfirmation,
|
||||||
|
onUpdate,
|
||||||
|
onMessageDismiss,
|
||||||
|
onBack,
|
||||||
|
onClose,
|
||||||
|
}) => {
|
||||||
const [t] = useTranslation();
|
const [t] = useTranslation();
|
||||||
const wasSubmitting = usePrevious(isSubmitting);
|
const wasSubmitting = usePrevious(isSubmitting);
|
||||||
|
|
||||||
@@ -52,13 +61,13 @@ const PasswordEditStep = React.memo(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!data.currentPassword) {
|
if (usePasswordConfirmation && !data.currentPassword) {
|
||||||
currentPasswordField.current.focus();
|
currentPasswordField.current.focus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
onUpdate(data);
|
onUpdate(usePasswordConfirmation ? data : omit(data, 'currentPassword'));
|
||||||
}, [onUpdate, data]);
|
}, [usePasswordConfirmation, onUpdate, data]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
passwordField.current.select();
|
passwordField.current.select();
|
||||||
@@ -84,7 +93,7 @@ const PasswordEditStep = React.memo(
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Popup.Header>
|
<Popup.Header onBack={onBack}>
|
||||||
{t('common.editPassword', {
|
{t('common.editPassword', {
|
||||||
context: 'title',
|
context: 'title',
|
||||||
})}
|
})}
|
||||||
@@ -111,15 +120,19 @@ const PasswordEditStep = React.memo(
|
|||||||
className={styles.field}
|
className={styles.field}
|
||||||
onChange={handleFieldChange}
|
onChange={handleFieldChange}
|
||||||
/>
|
/>
|
||||||
<div className={styles.text}>{t('common.currentPassword')}</div>
|
{usePasswordConfirmation && (
|
||||||
<Input.Password
|
<>
|
||||||
fluid
|
<div className={styles.text}>{t('common.currentPassword')}</div>
|
||||||
ref={currentPasswordField}
|
<Input.Password
|
||||||
name="currentPassword"
|
fluid
|
||||||
value={data.currentPassword}
|
ref={currentPasswordField}
|
||||||
className={styles.field}
|
name="currentPassword"
|
||||||
onChange={handleFieldChange}
|
value={data.currentPassword}
|
||||||
/>
|
className={styles.field}
|
||||||
|
onChange={handleFieldChange}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
<Button
|
<Button
|
||||||
positive
|
positive
|
||||||
content={t('action.save')}
|
content={t('action.save')}
|
||||||
@@ -133,17 +146,21 @@ const PasswordEditStep = React.memo(
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
PasswordEditStep.propTypes = {
|
UserPasswordEditStep.propTypes = {
|
||||||
defaultData: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types
|
defaultData: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types
|
||||||
isSubmitting: PropTypes.bool.isRequired,
|
isSubmitting: PropTypes.bool.isRequired,
|
||||||
error: PropTypes.object, // eslint-disable-line react/forbid-prop-types
|
error: PropTypes.object, // eslint-disable-line react/forbid-prop-types
|
||||||
|
usePasswordConfirmation: PropTypes.bool,
|
||||||
onUpdate: PropTypes.func.isRequired,
|
onUpdate: PropTypes.func.isRequired,
|
||||||
onMessageDismiss: PropTypes.func.isRequired,
|
onMessageDismiss: PropTypes.func.isRequired,
|
||||||
|
onBack: PropTypes.func,
|
||||||
onClose: PropTypes.func.isRequired,
|
onClose: PropTypes.func.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
PasswordEditStep.defaultProps = {
|
UserPasswordEditStep.defaultProps = {
|
||||||
error: undefined,
|
error: undefined,
|
||||||
|
usePasswordConfirmation: false,
|
||||||
|
onBack: undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default withPopup(PasswordEditStep);
|
export default UserPasswordEditStep;
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
import UserPasswordEditStep from './UserPasswordEditStep';
|
||||||
|
|
||||||
|
export default UserPasswordEditStep;
|
||||||
@@ -3,12 +3,12 @@ import PropTypes from 'prop-types';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Button, Divider, Header, Tab } from 'semantic-ui-react';
|
import { Button, Divider, Header, Tab } from 'semantic-ui-react';
|
||||||
|
|
||||||
import InformationEdit from './InformationEdit';
|
|
||||||
import AvatarEditPopup from './AvatarEditPopup';
|
import AvatarEditPopup from './AvatarEditPopup';
|
||||||
import UsernameEditPopup from './UsernameEditPopup';
|
|
||||||
import EmailEditPopup from './EmailEditPopup';
|
|
||||||
import PasswordEditPopup from './PasswordEditPopup';
|
|
||||||
import User from '../../User';
|
import User from '../../User';
|
||||||
|
import UserInformationEdit from '../../UserInformationEdit';
|
||||||
|
import UserUsernameEditPopup from '../../UserUsernameEditPopup';
|
||||||
|
import UserEmailEditPopup from '../../UserEmailEditPopup';
|
||||||
|
import UserPasswordEditPopup from '../../UserPasswordEditPopup';
|
||||||
|
|
||||||
import styles from './AccountPane.module.scss';
|
import styles from './AccountPane.module.scss';
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ const AccountPane = React.memo(
|
|||||||
</AvatarEditPopup>
|
</AvatarEditPopup>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<InformationEdit
|
<UserInformationEdit
|
||||||
defaultData={{
|
defaultData={{
|
||||||
name,
|
name,
|
||||||
phone,
|
phone,
|
||||||
@@ -68,7 +68,8 @@ const AccountPane = React.memo(
|
|||||||
</Header>
|
</Header>
|
||||||
</Divider>
|
</Divider>
|
||||||
<div className={styles.action}>
|
<div className={styles.action}>
|
||||||
<UsernameEditPopup
|
<UserUsernameEditPopup
|
||||||
|
usePasswordConfirmation
|
||||||
defaultData={usernameUpdateForm.data}
|
defaultData={usernameUpdateForm.data}
|
||||||
username={username}
|
username={username}
|
||||||
isSubmitting={usernameUpdateForm.isSubmitting}
|
isSubmitting={usernameUpdateForm.isSubmitting}
|
||||||
@@ -81,10 +82,11 @@ const AccountPane = React.memo(
|
|||||||
context: 'title',
|
context: 'title',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</UsernameEditPopup>
|
</UserUsernameEditPopup>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.action}>
|
<div className={styles.action}>
|
||||||
<EmailEditPopup
|
<UserEmailEditPopup
|
||||||
|
usePasswordConfirmation
|
||||||
defaultData={emailUpdateForm.data}
|
defaultData={emailUpdateForm.data}
|
||||||
email={email}
|
email={email}
|
||||||
isSubmitting={emailUpdateForm.isSubmitting}
|
isSubmitting={emailUpdateForm.isSubmitting}
|
||||||
@@ -97,10 +99,11 @@ const AccountPane = React.memo(
|
|||||||
context: 'title',
|
context: 'title',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</EmailEditPopup>
|
</UserEmailEditPopup>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.action}>
|
<div className={styles.action}>
|
||||||
<PasswordEditPopup
|
<UserPasswordEditPopup
|
||||||
|
usePasswordConfirmation
|
||||||
defaultData={passwordUpdateForm.data}
|
defaultData={passwordUpdateForm.data}
|
||||||
isSubmitting={passwordUpdateForm.isSubmitting}
|
isSubmitting={passwordUpdateForm.isSubmitting}
|
||||||
error={passwordUpdateForm.error}
|
error={passwordUpdateForm.error}
|
||||||
@@ -112,7 +115,7 @@ const AccountPane = React.memo(
|
|||||||
context: 'title',
|
context: 'title',
|
||||||
})}
|
})}
|
||||||
</Button>
|
</Button>
|
||||||
</PasswordEditPopup>
|
</UserPasswordEditPopup>
|
||||||
</div>
|
</div>
|
||||||
</Tab.Pane>
|
</Tab.Pane>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
:global(#app) {
|
|
||||||
.field {
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import { withPopup } from '../lib/popup';
|
||||||
|
|
||||||
|
import UserUsernameEditStep from './UserUsernameEditStep';
|
||||||
|
|
||||||
|
export default withPopup(UserUsernameEditStep);
|
||||||
+43
-25
@@ -1,15 +1,15 @@
|
|||||||
|
import omit from 'lodash/omit';
|
||||||
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Button, Form, Message } from 'semantic-ui-react';
|
import { Button, Form, Message } from 'semantic-ui-react';
|
||||||
import { useDidUpdate, usePrevious, useToggle } from '../../../lib/hooks';
|
import { useDidUpdate, usePrevious, useToggle } from '../../lib/hooks';
|
||||||
import { withPopup } from '../../../lib/popup';
|
import { Input, Popup } from '../../lib/custom-ui';
|
||||||
import { Input, Popup } from '../../../lib/custom-ui';
|
|
||||||
|
|
||||||
import { useForm } from '../../../hooks';
|
import { useForm } from '../../hooks';
|
||||||
import { isUsername } from '../../../utils/validator';
|
import { isUsername } from '../../utils/validator';
|
||||||
|
|
||||||
import styles from './UsernameEditPopup.module.scss';
|
import styles from './UserUsernameEditStep.module.scss';
|
||||||
|
|
||||||
const createMessage = (error) => {
|
const createMessage = (error) => {
|
||||||
if (!error) {
|
if (!error) {
|
||||||
@@ -35,8 +35,18 @@ const createMessage = (error) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const UsernameEditStep = React.memo(
|
const UserUsernameEditStep = React.memo(
|
||||||
({ defaultData, username, isSubmitting, error, onUpdate, onMessageDismiss, onClose }) => {
|
({
|
||||||
|
defaultData,
|
||||||
|
username,
|
||||||
|
isSubmitting,
|
||||||
|
error,
|
||||||
|
usePasswordConfirmation,
|
||||||
|
onUpdate,
|
||||||
|
onMessageDismiss,
|
||||||
|
onBack,
|
||||||
|
onClose,
|
||||||
|
}) => {
|
||||||
const [t] = useTranslation();
|
const [t] = useTranslation();
|
||||||
const wasSubmitting = usePrevious(isSubmitting);
|
const wasSubmitting = usePrevious(isSubmitting);
|
||||||
|
|
||||||
@@ -58,7 +68,7 @@ const UsernameEditStep = React.memo(
|
|||||||
username: data.username.trim() || null,
|
username: data.username.trim() || null,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (cleanData.username && !isUsername(cleanData.username)) {
|
if (!cleanData.username || !isUsername(cleanData.username)) {
|
||||||
usernameField.current.select();
|
usernameField.current.select();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -68,13 +78,13 @@ const UsernameEditStep = React.memo(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cleanData.currentPassword) {
|
if (usePasswordConfirmation && !cleanData.currentPassword) {
|
||||||
currentPasswordField.current.focus();
|
currentPasswordField.current.focus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
onUpdate(cleanData);
|
onUpdate(usePasswordConfirmation ? cleanData : omit(cleanData, 'currentPassword'));
|
||||||
}, [username, onUpdate, onClose, data]);
|
}, [username, usePasswordConfirmation, onUpdate, onClose, data]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
usernameField.current.select();
|
usernameField.current.select();
|
||||||
@@ -110,7 +120,7 @@ const UsernameEditStep = React.memo(
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Popup.Header>
|
<Popup.Header onBack={onBack}>
|
||||||
{t('common.editUsername', {
|
{t('common.editUsername', {
|
||||||
context: 'title',
|
context: 'title',
|
||||||
})}
|
})}
|
||||||
@@ -138,15 +148,19 @@ const UsernameEditStep = React.memo(
|
|||||||
className={styles.field}
|
className={styles.field}
|
||||||
onChange={handleFieldChange}
|
onChange={handleFieldChange}
|
||||||
/>
|
/>
|
||||||
<div className={styles.text}>{t('common.currentPassword')}</div>
|
{usePasswordConfirmation && (
|
||||||
<Input.Password
|
<>
|
||||||
fluid
|
<div className={styles.text}>{t('common.currentPassword')}</div>
|
||||||
ref={currentPasswordField}
|
<Input.Password
|
||||||
name="currentPassword"
|
fluid
|
||||||
value={data.currentPassword}
|
ref={currentPasswordField}
|
||||||
className={styles.field}
|
name="currentPassword"
|
||||||
onChange={handleFieldChange}
|
value={data.currentPassword}
|
||||||
/>
|
className={styles.field}
|
||||||
|
onChange={handleFieldChange}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
<Button
|
<Button
|
||||||
positive
|
positive
|
||||||
content={t('action.save')}
|
content={t('action.save')}
|
||||||
@@ -160,19 +174,23 @@ const UsernameEditStep = React.memo(
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
UsernameEditStep.propTypes = {
|
UserUsernameEditStep.propTypes = {
|
||||||
defaultData: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types
|
defaultData: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types
|
||||||
username: PropTypes.string,
|
username: PropTypes.string,
|
||||||
isSubmitting: PropTypes.bool.isRequired,
|
isSubmitting: PropTypes.bool.isRequired,
|
||||||
error: PropTypes.object, // eslint-disable-line react/forbid-prop-types
|
error: PropTypes.object, // eslint-disable-line react/forbid-prop-types
|
||||||
|
usePasswordConfirmation: PropTypes.bool,
|
||||||
onUpdate: PropTypes.func.isRequired,
|
onUpdate: PropTypes.func.isRequired,
|
||||||
onMessageDismiss: PropTypes.func.isRequired,
|
onMessageDismiss: PropTypes.func.isRequired,
|
||||||
|
onBack: PropTypes.func,
|
||||||
onClose: PropTypes.func.isRequired,
|
onClose: PropTypes.func.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
UsernameEditStep.defaultProps = {
|
UserUsernameEditStep.defaultProps = {
|
||||||
username: undefined,
|
username: undefined,
|
||||||
error: undefined,
|
error: undefined,
|
||||||
|
usePasswordConfirmation: false,
|
||||||
|
onBack: undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default withPopup(UsernameEditStep);
|
export default UserUsernameEditStep;
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
:global(#app) {
|
||||||
|
.field {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
color: #444444;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: bold;
|
||||||
|
padding-bottom: 6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
import UserUsernameEditStep from './UserUsernameEditStep';
|
||||||
|
|
||||||
|
export default UserUsernameEditStep;
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
import React, { useCallback } from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import { Button, Radio, Table } from 'semantic-ui-react';
|
|
||||||
|
|
||||||
import DeletePopup from '../DeletePopup';
|
|
||||||
|
|
||||||
import styles from './Item.module.scss';
|
|
||||||
|
|
||||||
const Item = React.memo(({ name, username, email, isAdmin, onUpdate, onDelete }) => {
|
|
||||||
const [t] = useTranslation();
|
|
||||||
|
|
||||||
const handleIsAdminChange = useCallback(() => {
|
|
||||||
onUpdate({
|
|
||||||
isAdmin: !isAdmin,
|
|
||||||
});
|
|
||||||
}, [isAdmin, onUpdate]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Table.Row>
|
|
||||||
<Table.Cell>{name}</Table.Cell>
|
|
||||||
<Table.Cell>{username || '-'}</Table.Cell>
|
|
||||||
<Table.Cell>{email}</Table.Cell>
|
|
||||||
<Table.Cell collapsing>
|
|
||||||
<Radio toggle checked={isAdmin} onChange={handleIsAdminChange} />
|
|
||||||
</Table.Cell>
|
|
||||||
<Table.Cell collapsing>
|
|
||||||
<DeletePopup
|
|
||||||
title={t('common.deleteUser', {
|
|
||||||
context: 'title',
|
|
||||||
})}
|
|
||||||
content={t('common.areYouSureYouWantToDeleteThisUser')}
|
|
||||||
buttonContent={t('action.deleteUser')}
|
|
||||||
onConfirm={onDelete}
|
|
||||||
>
|
|
||||||
<Button content={t('action.delete')} className={styles.button} />
|
|
||||||
</DeletePopup>
|
|
||||||
</Table.Cell>
|
|
||||||
</Table.Row>
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
Item.propTypes = {
|
|
||||||
name: PropTypes.string.isRequired,
|
|
||||||
username: PropTypes.string,
|
|
||||||
email: PropTypes.string.isRequired,
|
|
||||||
isAdmin: PropTypes.bool.isRequired,
|
|
||||||
onUpdate: PropTypes.func.isRequired,
|
|
||||||
onDelete: PropTypes.func.isRequired,
|
|
||||||
};
|
|
||||||
|
|
||||||
Item.defaultProps = {
|
|
||||||
username: undefined,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default Item;
|
|
||||||
@@ -0,0 +1,181 @@
|
|||||||
|
import pick from 'lodash/pick';
|
||||||
|
import React, { useCallback } from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { Menu } from 'semantic-ui-react';
|
||||||
|
import { withPopup } from '../../../lib/popup';
|
||||||
|
import { Popup } from '../../../lib/custom-ui';
|
||||||
|
|
||||||
|
import { useSteps } from '../../../hooks';
|
||||||
|
import UserInformationEditStep from '../../UserInformationEditStep';
|
||||||
|
import UserUsernameEditStep from '../../UserUsernameEditStep';
|
||||||
|
import UserEmailEditStep from '../../UserEmailEditStep';
|
||||||
|
import UserPasswordEditStep from '../../UserPasswordEditStep';
|
||||||
|
import DeleteStep from '../../DeleteStep';
|
||||||
|
|
||||||
|
import styles from './ActionsPopup.module.scss';
|
||||||
|
|
||||||
|
const StepTypes = {
|
||||||
|
EDIT_INFORMATION: 'EDIT_INFORMATION',
|
||||||
|
EDIT_USERNAME: 'EDIT_USERNAME',
|
||||||
|
EDIT_EMAIL: 'EDIT_EMAIL',
|
||||||
|
EDIT_PASSWORD: 'EDIT_PASSWORD',
|
||||||
|
DELETE: 'DELETE',
|
||||||
|
};
|
||||||
|
|
||||||
|
const ActionsStep = React.memo(
|
||||||
|
({
|
||||||
|
user,
|
||||||
|
onUpdate,
|
||||||
|
onUsernameUpdate,
|
||||||
|
onUsernameUpdateMessageDismiss,
|
||||||
|
onEmailUpdate,
|
||||||
|
onEmailUpdateMessageDismiss,
|
||||||
|
onPasswordUpdate,
|
||||||
|
onPasswordUpdateMessageDismiss,
|
||||||
|
onDelete,
|
||||||
|
onClose,
|
||||||
|
}) => {
|
||||||
|
const [t] = useTranslation();
|
||||||
|
const [step, openStep, handleBack] = useSteps();
|
||||||
|
|
||||||
|
const handleEditInformationClick = useCallback(() => {
|
||||||
|
openStep(StepTypes.EDIT_INFORMATION);
|
||||||
|
}, [openStep]);
|
||||||
|
|
||||||
|
const handleEditUsernameClick = useCallback(() => {
|
||||||
|
openStep(StepTypes.EDIT_USERNAME);
|
||||||
|
}, [openStep]);
|
||||||
|
|
||||||
|
const handleEditEmailClick = useCallback(() => {
|
||||||
|
openStep(StepTypes.EDIT_EMAIL);
|
||||||
|
}, [openStep]);
|
||||||
|
|
||||||
|
const handleEditPasswordClick = useCallback(() => {
|
||||||
|
openStep(StepTypes.EDIT_PASSWORD);
|
||||||
|
}, [openStep]);
|
||||||
|
|
||||||
|
const handleDeleteClick = useCallback(() => {
|
||||||
|
openStep(StepTypes.DELETE);
|
||||||
|
}, [openStep]);
|
||||||
|
|
||||||
|
if (step) {
|
||||||
|
switch (step.type) {
|
||||||
|
case StepTypes.EDIT_INFORMATION:
|
||||||
|
return (
|
||||||
|
<UserInformationEditStep
|
||||||
|
defaultData={pick(user, ['name', 'phone', 'organization'])}
|
||||||
|
onUpdate={onUpdate}
|
||||||
|
onBack={handleBack}
|
||||||
|
onClose={onClose}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
case StepTypes.EDIT_USERNAME:
|
||||||
|
return (
|
||||||
|
<UserUsernameEditStep
|
||||||
|
defaultData={user.usernameUpdateForm.data}
|
||||||
|
username={user.username}
|
||||||
|
isSubmitting={user.usernameUpdateForm.isSubmitting}
|
||||||
|
error={user.usernameUpdateForm.error}
|
||||||
|
onUpdate={onUsernameUpdate}
|
||||||
|
onMessageDismiss={onUsernameUpdateMessageDismiss}
|
||||||
|
onBack={handleBack}
|
||||||
|
onClose={onClose}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
case StepTypes.EDIT_EMAIL:
|
||||||
|
return (
|
||||||
|
<UserEmailEditStep
|
||||||
|
defaultData={user.emailUpdateForm.data}
|
||||||
|
email={user.email}
|
||||||
|
isSubmitting={user.emailUpdateForm.isSubmitting}
|
||||||
|
error={user.emailUpdateForm.error}
|
||||||
|
onUpdate={onEmailUpdate}
|
||||||
|
onMessageDismiss={onEmailUpdateMessageDismiss}
|
||||||
|
onBack={handleBack}
|
||||||
|
onClose={onClose}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
case StepTypes.EDIT_PASSWORD:
|
||||||
|
return (
|
||||||
|
<UserPasswordEditStep
|
||||||
|
defaultData={user.passwordUpdateForm.data}
|
||||||
|
isSubmitting={user.passwordUpdateForm.isSubmitting}
|
||||||
|
error={user.emailUpdateForm.error}
|
||||||
|
onUpdate={onPasswordUpdate}
|
||||||
|
onMessageDismiss={onPasswordUpdateMessageDismiss}
|
||||||
|
onBack={handleBack}
|
||||||
|
onClose={onClose}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
case StepTypes.DELETE:
|
||||||
|
return (
|
||||||
|
<DeleteStep
|
||||||
|
title={t('common.deleteUser', {
|
||||||
|
context: 'title',
|
||||||
|
})}
|
||||||
|
content={t('common.areYouSureYouWantToDeleteThisUser')}
|
||||||
|
buttonContent={t('action.deleteUser')}
|
||||||
|
onConfirm={onDelete}
|
||||||
|
onBack={handleBack}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Popup.Header>
|
||||||
|
{t('common.userActions', {
|
||||||
|
context: 'title',
|
||||||
|
})}
|
||||||
|
</Popup.Header>
|
||||||
|
<Popup.Content>
|
||||||
|
<Menu secondary vertical className={styles.menu}>
|
||||||
|
<Menu.Item className={styles.menuItem} onClick={handleEditInformationClick}>
|
||||||
|
{t('action.editInformation', {
|
||||||
|
context: 'title',
|
||||||
|
})}
|
||||||
|
</Menu.Item>
|
||||||
|
<Menu.Item className={styles.menuItem} onClick={handleEditUsernameClick}>
|
||||||
|
{t('action.editUsername', {
|
||||||
|
context: 'title',
|
||||||
|
})}
|
||||||
|
</Menu.Item>
|
||||||
|
<Menu.Item className={styles.menuItem} onClick={handleEditEmailClick}>
|
||||||
|
{t('action.editEmail', {
|
||||||
|
context: 'title',
|
||||||
|
})}
|
||||||
|
</Menu.Item>
|
||||||
|
<Menu.Item className={styles.menuItem} onClick={handleEditPasswordClick}>
|
||||||
|
{t('action.editPassword', {
|
||||||
|
context: 'title',
|
||||||
|
})}
|
||||||
|
</Menu.Item>
|
||||||
|
<Menu.Item className={styles.menuItem} onClick={handleDeleteClick}>
|
||||||
|
{t('action.deleteUser', {
|
||||||
|
context: 'title',
|
||||||
|
})}
|
||||||
|
</Menu.Item>
|
||||||
|
</Menu>
|
||||||
|
</Popup.Content>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
ActionsStep.propTypes = {
|
||||||
|
user: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types
|
||||||
|
onUpdate: PropTypes.func.isRequired,
|
||||||
|
onUsernameUpdate: PropTypes.func.isRequired,
|
||||||
|
onUsernameUpdateMessageDismiss: PropTypes.func.isRequired,
|
||||||
|
onEmailUpdate: PropTypes.func.isRequired,
|
||||||
|
onEmailUpdateMessageDismiss: PropTypes.func.isRequired,
|
||||||
|
onPasswordUpdate: PropTypes.func.isRequired,
|
||||||
|
onPasswordUpdateMessageDismiss: PropTypes.func.isRequired,
|
||||||
|
onDelete: PropTypes.func.isRequired,
|
||||||
|
onClose: PropTypes.func.isRequired,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default withPopup(ActionsStep);
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
:global(#app) {
|
||||||
|
.menu {
|
||||||
|
margin: -7px -12px -5px;
|
||||||
|
width: calc(100% + 24px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.menuItem {
|
||||||
|
margin: 0;
|
||||||
|
padding-left: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
+103
@@ -0,0 +1,103 @@
|
|||||||
|
import React, { useCallback } from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import { Button, Icon, Radio, Table } from 'semantic-ui-react';
|
||||||
|
|
||||||
|
import ActionsPopup from './ActionsPopup';
|
||||||
|
|
||||||
|
import styles from './Item.module.scss';
|
||||||
|
|
||||||
|
const Item = React.memo(
|
||||||
|
({
|
||||||
|
email,
|
||||||
|
username,
|
||||||
|
name,
|
||||||
|
organization,
|
||||||
|
phone,
|
||||||
|
isAdmin,
|
||||||
|
emailUpdateForm,
|
||||||
|
passwordUpdateForm,
|
||||||
|
usernameUpdateForm,
|
||||||
|
onUpdate,
|
||||||
|
onUsernameUpdate,
|
||||||
|
onUsernameUpdateMessageDismiss,
|
||||||
|
onEmailUpdate,
|
||||||
|
onEmailUpdateMessageDismiss,
|
||||||
|
onPasswordUpdate,
|
||||||
|
onPasswordUpdateMessageDismiss,
|
||||||
|
onDelete,
|
||||||
|
}) => {
|
||||||
|
const handleIsAdminChange = useCallback(() => {
|
||||||
|
onUpdate({
|
||||||
|
isAdmin: !isAdmin,
|
||||||
|
});
|
||||||
|
}, [isAdmin, onUpdate]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Table.Row>
|
||||||
|
<Table.Cell>{name}</Table.Cell>
|
||||||
|
<Table.Cell>{username || '-'}</Table.Cell>
|
||||||
|
<Table.Cell>{email}</Table.Cell>
|
||||||
|
<Table.Cell collapsing>
|
||||||
|
<Radio toggle checked={isAdmin} onChange={handleIsAdminChange} />
|
||||||
|
</Table.Cell>
|
||||||
|
<Table.Cell collapsing>
|
||||||
|
<ActionsPopup
|
||||||
|
user={{
|
||||||
|
email,
|
||||||
|
username,
|
||||||
|
name,
|
||||||
|
organization,
|
||||||
|
phone,
|
||||||
|
isAdmin,
|
||||||
|
emailUpdateForm,
|
||||||
|
passwordUpdateForm,
|
||||||
|
usernameUpdateForm,
|
||||||
|
}}
|
||||||
|
onUpdate={onUpdate}
|
||||||
|
onUsernameUpdate={onUsernameUpdate}
|
||||||
|
onUsernameUpdateMessageDismiss={onUsernameUpdateMessageDismiss}
|
||||||
|
onEmailUpdate={onEmailUpdate}
|
||||||
|
onEmailUpdateMessageDismiss={onEmailUpdateMessageDismiss}
|
||||||
|
onPasswordUpdate={onPasswordUpdate}
|
||||||
|
onPasswordUpdateMessageDismiss={onPasswordUpdateMessageDismiss}
|
||||||
|
onDelete={onDelete}
|
||||||
|
>
|
||||||
|
<Button className={styles.button}>
|
||||||
|
<Icon fitted name="pencil" />
|
||||||
|
</Button>
|
||||||
|
</ActionsPopup>
|
||||||
|
</Table.Cell>
|
||||||
|
</Table.Row>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
Item.propTypes = {
|
||||||
|
email: PropTypes.string.isRequired,
|
||||||
|
username: PropTypes.string,
|
||||||
|
name: PropTypes.string.isRequired,
|
||||||
|
organization: PropTypes.string,
|
||||||
|
phone: PropTypes.string,
|
||||||
|
isAdmin: PropTypes.bool.isRequired,
|
||||||
|
/* eslint-disable react/forbid-prop-types */
|
||||||
|
emailUpdateForm: PropTypes.object.isRequired,
|
||||||
|
passwordUpdateForm: PropTypes.object.isRequired,
|
||||||
|
usernameUpdateForm: PropTypes.object.isRequired,
|
||||||
|
/* eslint-enable react/forbid-prop-types */
|
||||||
|
onUpdate: PropTypes.func.isRequired,
|
||||||
|
onUsernameUpdate: PropTypes.func.isRequired,
|
||||||
|
onUsernameUpdateMessageDismiss: PropTypes.func.isRequired,
|
||||||
|
onEmailUpdate: PropTypes.func.isRequired,
|
||||||
|
onEmailUpdateMessageDismiss: PropTypes.func.isRequired,
|
||||||
|
onPasswordUpdate: PropTypes.func.isRequired,
|
||||||
|
onPasswordUpdateMessageDismiss: PropTypes.func.isRequired,
|
||||||
|
onDelete: PropTypes.func.isRequired,
|
||||||
|
};
|
||||||
|
|
||||||
|
Item.defaultProps = {
|
||||||
|
username: undefined,
|
||||||
|
organization: undefined,
|
||||||
|
phone: undefined,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Item;
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
import Item from './Item';
|
||||||
|
|
||||||
|
export default Item;
|
||||||
@@ -6,68 +6,140 @@ import { Button, Modal, Table } from 'semantic-ui-react';
|
|||||||
import UserAddPopupContainer from '../../containers/UserAddPopupContainer';
|
import UserAddPopupContainer from '../../containers/UserAddPopupContainer';
|
||||||
import Item from './Item';
|
import Item from './Item';
|
||||||
|
|
||||||
const UsersModal = React.memo(({ items, onUpdate, onDelete, onClose }) => {
|
const UsersModal = React.memo(
|
||||||
const [t] = useTranslation();
|
({
|
||||||
|
items,
|
||||||
|
onUpdate,
|
||||||
|
onUsernameUpdate,
|
||||||
|
onUsernameUpdateMessageDismiss,
|
||||||
|
onEmailUpdate,
|
||||||
|
onEmailUpdateMessageDismiss,
|
||||||
|
onPasswordUpdate,
|
||||||
|
onPasswordUpdateMessageDismiss,
|
||||||
|
onDelete,
|
||||||
|
onClose,
|
||||||
|
}) => {
|
||||||
|
const [t] = useTranslation();
|
||||||
|
|
||||||
const handleUpdate = useCallback(
|
const handleUpdate = useCallback(
|
||||||
(id, data) => {
|
(id, data) => {
|
||||||
onUpdate(id, data);
|
onUpdate(id, data);
|
||||||
},
|
},
|
||||||
[onUpdate],
|
[onUpdate],
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDelete = useCallback(
|
const handleUsernameUpdate = useCallback(
|
||||||
(id) => {
|
(id, data) => {
|
||||||
onDelete(id);
|
onUsernameUpdate(id, data);
|
||||||
},
|
},
|
||||||
[onDelete],
|
[onUsernameUpdate],
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
const handleUsernameUpdateMessageDismiss = useCallback(
|
||||||
<Modal open closeIcon size="large" centered={false} onClose={onClose}>
|
(id) => {
|
||||||
<Modal.Header>
|
onUsernameUpdateMessageDismiss(id);
|
||||||
{t('common.users', {
|
},
|
||||||
context: 'title',
|
[onUsernameUpdateMessageDismiss],
|
||||||
})}
|
);
|
||||||
</Modal.Header>
|
|
||||||
<Modal.Content>
|
const handleEmailUpdate = useCallback(
|
||||||
<Table basic="very">
|
(id, data) => {
|
||||||
<Table.Header>
|
onEmailUpdate(id, data);
|
||||||
<Table.Row>
|
},
|
||||||
<Table.HeaderCell width={4}>{t('common.name')}</Table.HeaderCell>
|
[onEmailUpdate],
|
||||||
<Table.HeaderCell width={4}>{t('common.username')}</Table.HeaderCell>
|
);
|
||||||
<Table.HeaderCell width={4}>{t('common.email')}</Table.HeaderCell>
|
|
||||||
<Table.HeaderCell>{t('common.administrator')}</Table.HeaderCell>
|
const handleEmailUpdateMessageDismiss = useCallback(
|
||||||
<Table.HeaderCell />
|
(id) => {
|
||||||
</Table.Row>
|
onEmailUpdateMessageDismiss(id);
|
||||||
</Table.Header>
|
},
|
||||||
<Table.Body>
|
[onEmailUpdateMessageDismiss],
|
||||||
{items.map((item) => (
|
);
|
||||||
<Item
|
|
||||||
key={item.id}
|
const handlePasswordUpdate = useCallback(
|
||||||
name={item.name}
|
(id, data) => {
|
||||||
username={item.username}
|
onPasswordUpdate(id, data);
|
||||||
email={item.email}
|
},
|
||||||
isAdmin={item.isAdmin}
|
[onPasswordUpdate],
|
||||||
onUpdate={(data) => handleUpdate(item.id, data)}
|
);
|
||||||
onDelete={() => handleDelete(item.id)}
|
|
||||||
/>
|
const handlePasswordUpdateMessageDismiss = useCallback(
|
||||||
))}
|
(id) => {
|
||||||
</Table.Body>
|
onPasswordUpdateMessageDismiss(id);
|
||||||
</Table>
|
},
|
||||||
</Modal.Content>
|
[onPasswordUpdateMessageDismiss],
|
||||||
<Modal.Actions>
|
);
|
||||||
<UserAddPopupContainer>
|
|
||||||
<Button positive content={t('action.addUser')} />
|
const handleDelete = useCallback(
|
||||||
</UserAddPopupContainer>
|
(id) => {
|
||||||
</Modal.Actions>
|
onDelete(id);
|
||||||
</Modal>
|
},
|
||||||
);
|
[onDelete],
|
||||||
});
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Modal open closeIcon size="large" centered={false} onClose={onClose}>
|
||||||
|
<Modal.Header>
|
||||||
|
{t('common.users', {
|
||||||
|
context: 'title',
|
||||||
|
})}
|
||||||
|
</Modal.Header>
|
||||||
|
<Modal.Content>
|
||||||
|
<Table basic="very">
|
||||||
|
<Table.Header>
|
||||||
|
<Table.Row>
|
||||||
|
<Table.HeaderCell width={4}>{t('common.name')}</Table.HeaderCell>
|
||||||
|
<Table.HeaderCell width={4}>{t('common.username')}</Table.HeaderCell>
|
||||||
|
<Table.HeaderCell width={4}>{t('common.email')}</Table.HeaderCell>
|
||||||
|
<Table.HeaderCell>{t('common.administrator')}</Table.HeaderCell>
|
||||||
|
<Table.HeaderCell />
|
||||||
|
</Table.Row>
|
||||||
|
</Table.Header>
|
||||||
|
<Table.Body>
|
||||||
|
{items.map((item) => (
|
||||||
|
<Item
|
||||||
|
key={item.id}
|
||||||
|
email={item.email}
|
||||||
|
username={item.username}
|
||||||
|
name={item.name}
|
||||||
|
organization={item.organization}
|
||||||
|
phone={item.phone}
|
||||||
|
isAdmin={item.isAdmin}
|
||||||
|
emailUpdateForm={item.emailUpdateForm}
|
||||||
|
passwordUpdateForm={item.passwordUpdateForm}
|
||||||
|
usernameUpdateForm={item.usernameUpdateForm}
|
||||||
|
onUpdate={(data) => handleUpdate(item.id, data)}
|
||||||
|
onUsernameUpdate={(data) => handleUsernameUpdate(item.id, data)}
|
||||||
|
onUsernameUpdateMessageDismiss={() => handleUsernameUpdateMessageDismiss(item.id)}
|
||||||
|
onEmailUpdate={(data) => handleEmailUpdate(item.id, data)}
|
||||||
|
onEmailUpdateMessageDismiss={() => handleEmailUpdateMessageDismiss(item.id)}
|
||||||
|
onPasswordUpdate={(data) => handlePasswordUpdate(item.id, data)}
|
||||||
|
onPasswordUpdateMessageDismiss={() => handlePasswordUpdateMessageDismiss(item.id)}
|
||||||
|
onDelete={() => handleDelete(item.id)}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</Table.Body>
|
||||||
|
</Table>
|
||||||
|
</Modal.Content>
|
||||||
|
<Modal.Actions>
|
||||||
|
<UserAddPopupContainer>
|
||||||
|
<Button positive content={t('action.addUser')} />
|
||||||
|
</UserAddPopupContainer>
|
||||||
|
</Modal.Actions>
|
||||||
|
</Modal>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
UsersModal.propTypes = {
|
UsersModal.propTypes = {
|
||||||
items: PropTypes.array.isRequired, // eslint-disable-line react/forbid-prop-types
|
items: PropTypes.array.isRequired, // eslint-disable-line react/forbid-prop-types
|
||||||
onUpdate: PropTypes.func.isRequired,
|
onUpdate: PropTypes.func.isRequired,
|
||||||
|
onUsernameUpdate: PropTypes.func.isRequired,
|
||||||
|
onUsernameUpdateMessageDismiss: PropTypes.func.isRequired,
|
||||||
|
onEmailUpdate: PropTypes.func.isRequired,
|
||||||
|
onEmailUpdateMessageDismiss: PropTypes.func.isRequired,
|
||||||
|
onPasswordUpdate: PropTypes.func.isRequired,
|
||||||
|
onPasswordUpdateMessageDismiss: PropTypes.func.isRequired,
|
||||||
onDelete: PropTypes.func.isRequired,
|
onDelete: PropTypes.func.isRequired,
|
||||||
onClose: PropTypes.func.isRequired,
|
onClose: PropTypes.func.isRequired,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,12 +2,24 @@ const SERVER_BASE_URL =
|
|||||||
process.env.REACT_APP_SERVER_BASE_URL ||
|
process.env.REACT_APP_SERVER_BASE_URL ||
|
||||||
(process.env.NODE_ENV === 'production' ? '' : 'http://localhost:1337');
|
(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;
|
const ACTIONS_LIMIT = 10;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
SERVER_BASE_URL,
|
SERVER_BASE_URL,
|
||||||
|
FETCH_OPTIONS,
|
||||||
|
ACCESS_TOKEN_KEY,
|
||||||
|
ACCESS_TOKEN_EXPIRES,
|
||||||
POSITION_GAP,
|
POSITION_GAP,
|
||||||
ACTIONS_LIMIT,
|
ACTIONS_LIMIT,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -31,11 +31,17 @@ export default {
|
|||||||
USER_UPDATE: `${PREFIX}/USER_UPDATE`,
|
USER_UPDATE: `${PREFIX}/USER_UPDATE`,
|
||||||
CURRENT_USER_UPDATE: `${PREFIX}/CURRENT_USER_UPDATE`,
|
CURRENT_USER_UPDATE: `${PREFIX}/CURRENT_USER_UPDATE`,
|
||||||
USER_UPDATE_HANDLE: `${PREFIX}/USER_UPDATE_HANDLE`,
|
USER_UPDATE_HANDLE: `${PREFIX}/USER_UPDATE_HANDLE`,
|
||||||
|
USER_EMAIL_UPDATE: `${PREFIX}/USER_EMAIL_UPDATE`,
|
||||||
CURRENT_USER_EMAIL_UPDATE: `${PREFIX}/CURRENT_USER_EMAIL_UPDATE`,
|
CURRENT_USER_EMAIL_UPDATE: `${PREFIX}/CURRENT_USER_EMAIL_UPDATE`,
|
||||||
|
USER_EMAIL_UPDATE_ERROR_CLEAR: `${PREFIX}/USER_EMAIL_UPDATE_ERROR_CLEAR`,
|
||||||
CURRENT_USER_EMAIL_UPDATE_ERROR_CLEAR: `${PREFIX}/CURRENT_USER_EMAIL_UPDATE_ERROR_CLEAR`,
|
CURRENT_USER_EMAIL_UPDATE_ERROR_CLEAR: `${PREFIX}/CURRENT_USER_EMAIL_UPDATE_ERROR_CLEAR`,
|
||||||
|
USER_PASSWORD_UPDATE: `${PREFIX}/USER_PASSWORD_UPDATE`,
|
||||||
CURRENT_USER_PASSWORD_UPDATE: `${PREFIX}/CURRENT_USER_PASSWORD_UPDATE`,
|
CURRENT_USER_PASSWORD_UPDATE: `${PREFIX}/CURRENT_USER_PASSWORD_UPDATE`,
|
||||||
|
USER_PASSWORD_UPDATE_ERROR_CLEAR: `${PREFIX}/USER_PASSWORD_UPDATE_ERROR_CLEAR`,
|
||||||
CURRENT_USER_PASSWORD_UPDATE_ERROR_CLEAR: `${PREFIX}/CURRENT_USER_PASSWORD_UPDATE_ERROR_CLEAR`,
|
CURRENT_USER_PASSWORD_UPDATE_ERROR_CLEAR: `${PREFIX}/CURRENT_USER_PASSWORD_UPDATE_ERROR_CLEAR`,
|
||||||
|
USER_USERNAME_UPDATE: `${PREFIX}/USER_USERNAME_UPDATE`,
|
||||||
CURRENT_USER_USERNAME_UPDATE: `${PREFIX}/CURRENT_USER_USERNAME_UPDATE`,
|
CURRENT_USER_USERNAME_UPDATE: `${PREFIX}/CURRENT_USER_USERNAME_UPDATE`,
|
||||||
|
USER_USERNAME_UPDATE_ERROR_CLEAR: `${PREFIX}/USER_USERNAME_UPDATE_ERROR_CLEAR`,
|
||||||
CURRENT_USER_USERNAME_UPDATE_ERROR_CLEAR: `${PREFIX}/CURRENT_USER_USERNAME_UPDATE_ERROR_CLEAR`,
|
CURRENT_USER_USERNAME_UPDATE_ERROR_CLEAR: `${PREFIX}/CURRENT_USER_USERNAME_UPDATE_ERROR_CLEAR`,
|
||||||
CURRENT_USER_AVATAR_UPDATE: `${PREFIX}/CURRENT_USER_AVATAR_UPDATE`,
|
CURRENT_USER_AVATAR_UPDATE: `${PREFIX}/CURRENT_USER_AVATAR_UPDATE`,
|
||||||
USER_DELETE: `${PREFIX}/USER_DELETE`,
|
USER_DELETE: `${PREFIX}/USER_DELETE`,
|
||||||
|
|||||||
@@ -2,7 +2,17 @@ import { bindActionCreators } from 'redux';
|
|||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import { usersExceptCurrentSelector } from '../selectors';
|
import { usersExceptCurrentSelector } from '../selectors';
|
||||||
import { closeModal, deleteUser, updateUser } from '../actions/entry';
|
import {
|
||||||
|
clearUserEmailUpdateError,
|
||||||
|
clearUserPasswordUpdateError,
|
||||||
|
clearUserUsernameUpdateError,
|
||||||
|
closeModal,
|
||||||
|
deleteUser,
|
||||||
|
updateUser,
|
||||||
|
updateUserEmail,
|
||||||
|
updateUserPassword,
|
||||||
|
updateUserUsername,
|
||||||
|
} from '../actions/entry';
|
||||||
import UsersModal from '../components/UsersModal';
|
import UsersModal from '../components/UsersModal';
|
||||||
|
|
||||||
const mapStateToProps = (state) => {
|
const mapStateToProps = (state) => {
|
||||||
@@ -17,6 +27,12 @@ const mapDispatchToProps = (dispatch) =>
|
|||||||
bindActionCreators(
|
bindActionCreators(
|
||||||
{
|
{
|
||||||
onUpdate: updateUser,
|
onUpdate: updateUser,
|
||||||
|
onUsernameUpdate: updateUserUsername,
|
||||||
|
onUsernameUpdateMessageDismiss: clearUserUsernameUpdateError,
|
||||||
|
onEmailUpdate: updateUserEmail,
|
||||||
|
onEmailUpdateMessageDismiss: clearUserEmailUpdateError,
|
||||||
|
onPasswordUpdate: updateUserPassword,
|
||||||
|
onPasswordUpdateMessageDismiss: clearUserPasswordUpdateError,
|
||||||
onDelete: deleteUser,
|
onDelete: deleteUser,
|
||||||
onClose: closeModal,
|
onClose: closeModal,
|
||||||
},
|
},
|
||||||
|
|||||||
+7
-2
@@ -58,7 +58,7 @@ i18n
|
|||||||
.use(initReactI18next)
|
.use(initReactI18next)
|
||||||
.init({
|
.init({
|
||||||
resources: embedLocales,
|
resources: embedLocales,
|
||||||
fallbackLng: false,
|
fallbackLng: 'en',
|
||||||
supportedLngs: languages,
|
supportedLngs: languages,
|
||||||
load: 'languageOnly',
|
load: 'languageOnly',
|
||||||
interpolation: {
|
interpolation: {
|
||||||
@@ -79,7 +79,11 @@ i18n
|
|||||||
debug: process.env.NODE_ENV !== 'production',
|
debug: process.env.NODE_ENV !== 'production',
|
||||||
});
|
});
|
||||||
|
|
||||||
i18n.loadCoreLocale = (language) =>
|
i18n.loadCoreLocale = (language = i18n.resolvedLanguage) => {
|
||||||
|
if (language === 'en') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
import(`./locales/${language}/core`).then((module) => {
|
import(`./locales/${language}/core`).then((module) => {
|
||||||
const locale = module.default;
|
const locale = module.default;
|
||||||
|
|
||||||
@@ -91,5 +95,6 @@ i18n.loadCoreLocale = (language) =>
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
|
||||||
export default i18n;
|
export default i18n;
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import ReactMarkdown from 'react-markdown';
|
import ReactMarkdown from 'react-markdown';
|
||||||
import gfm from 'remark-gfm';
|
import remarkGfm from 'remark-gfm';
|
||||||
|
import remarkBreaks from 'remark-breaks';
|
||||||
|
|
||||||
|
import './Markdown.module.scss'; // FIXME: import as styles?
|
||||||
|
|
||||||
const Markdown = React.memo(({ linkStopPropagation, ...props }) => {
|
const Markdown = React.memo(({ linkStopPropagation, ...props }) => {
|
||||||
const handleLinkClick = useCallback((event) => {
|
const handleLinkClick = useCallback((event) => {
|
||||||
@@ -21,16 +24,23 @@ const Markdown = React.memo(({ linkStopPropagation, ...props }) => {
|
|||||||
[handleLinkClick],
|
[handleLinkClick],
|
||||||
);
|
);
|
||||||
|
|
||||||
let renderers;
|
let components;
|
||||||
|
|
||||||
if (linkStopPropagation) {
|
if (linkStopPropagation) {
|
||||||
renderers = {
|
components = {
|
||||||
link: linkRenderer,
|
a: linkRenderer,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line react/jsx-props-no-spreading
|
return (
|
||||||
return <ReactMarkdown {...props} plugins={[gfm]} renderers={renderers} />;
|
/* eslint-disable react/jsx-props-no-spreading */
|
||||||
|
<ReactMarkdown
|
||||||
|
{...props}
|
||||||
|
components={components}
|
||||||
|
remarkPlugins={[remarkGfm, remarkBreaks]}
|
||||||
|
className="markdown-body"
|
||||||
|
/>
|
||||||
|
/* eslint-enable react/jsx-props-no-spreading */
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
Markdown.propTypes = {
|
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%);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,9 +17,10 @@ export default {
|
|||||||
actions: 'Akce',
|
actions: 'Akce',
|
||||||
addAttachment_title: 'Přidat přílohu',
|
addAttachment_title: 'Přidat přílohu',
|
||||||
addComment: 'Přidat komentář',
|
addComment: 'Přidat komentář',
|
||||||
|
addManager_title: 'Přidat vedoucího',
|
||||||
addMember_title: 'Přidat člena',
|
addMember_title: 'Přidat člena',
|
||||||
addUser_title: 'Přidat uživatele',
|
addUser_title: 'Přidat uživatele',
|
||||||
administrator: 'Administrator',
|
administrator: 'Administrátor',
|
||||||
all: 'Vše',
|
all: 'Vše',
|
||||||
allChangesWillBeAutomaticallySavedAfterConnectionRestored:
|
allChangesWillBeAutomaticallySavedAfterConnectionRestored:
|
||||||
'Všechny změny budou automaticky uloženy<br />po obnově spojení',
|
'Všechny změny budou automaticky uloženy<br />po obnově spojení',
|
||||||
@@ -32,11 +33,16 @@ export default {
|
|||||||
areYouSureYouWantToDeleteThisProject: 'Opravdu chcete smazat tento projekt?',
|
areYouSureYouWantToDeleteThisProject: 'Opravdu chcete smazat tento projekt?',
|
||||||
areYouSureYouWantToDeleteThisTask: 'Opravdu chcete smazat tento úkol?',
|
areYouSureYouWantToDeleteThisTask: 'Opravdu chcete smazat tento úkol?',
|
||||||
areYouSureYouWantToDeleteThisUser: 'Opravdu chcete smazat tohoto uživatele?',
|
areYouSureYouWantToDeleteThisUser: 'Opravdu chcete smazat tohoto uživatele?',
|
||||||
areYouSureYouWantToRemoveThisMemberFromProject:
|
areYouSureYouWantToLeaveBoard: 'Opravdu chcete opustit tuto tabuli?',
|
||||||
'Opravdu chcete odstranit tohoto člena z projektu?',
|
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',
|
attachment: 'Příloha',
|
||||||
attachments: 'Přílohy',
|
attachments: 'Přílohy',
|
||||||
authentication: 'Ověření',
|
authentication: 'Ověření',
|
||||||
|
background: 'Pozadí',
|
||||||
board: 'Tabule',
|
board: 'Tabule',
|
||||||
boardNotFound_title: 'Tabule nenalezena',
|
boardNotFound_title: 'Tabule nenalezena',
|
||||||
cardActions_title: 'Akce na kartě',
|
cardActions_title: 'Akce na kartě',
|
||||||
@@ -49,6 +55,7 @@ export default {
|
|||||||
createProject_title: 'Vytvořit projekt',
|
createProject_title: 'Vytvořit projekt',
|
||||||
createTextFile_title: 'Vytvořit textový soubor',
|
createTextFile_title: 'Vytvořit textový soubor',
|
||||||
currentPassword: 'Aktuální heslo',
|
currentPassword: 'Aktuální heslo',
|
||||||
|
dangerZone_title: 'Nebezpečná zóna',
|
||||||
date: 'Datum',
|
date: 'Datum',
|
||||||
dueDate_title: 'Termín do',
|
dueDate_title: 'Termín do',
|
||||||
deleteAttachment_title: 'Smazat přílohu',
|
deleteAttachment_title: 'Smazat přílohu',
|
||||||
@@ -82,11 +89,15 @@ export default {
|
|||||||
filterByLabels_title: 'Filtruj podle štítku',
|
filterByLabels_title: 'Filtruj podle štítku',
|
||||||
filterByMembers_title: 'Filtruj podle člena',
|
filterByMembers_title: 'Filtruj podle člena',
|
||||||
fromComputer_title: 'Z počítače',
|
fromComputer_title: 'Z počítače',
|
||||||
|
general: 'Obecné',
|
||||||
hours: 'Hodiny',
|
hours: 'Hodiny',
|
||||||
invalidCurrentPassword: 'Neplatné aktuální heslo',
|
invalidCurrentPassword: 'Neplatné aktuální heslo',
|
||||||
labels: 'Štítky',
|
labels: 'Štítky',
|
||||||
|
leaveBoard_title: 'Opustit tabuli',
|
||||||
|
leaveProject_title: 'Opustit projekt',
|
||||||
list: 'Seznam',
|
list: 'Seznam',
|
||||||
listActions_title: 'Seznam akcí',
|
listActions_title: 'Seznam akcí',
|
||||||
|
managers: 'Vedoucí',
|
||||||
members: 'Členové',
|
members: 'Členové',
|
||||||
minutes: 'Minuty',
|
minutes: 'Minuty',
|
||||||
moveCard_title: 'Přesunout kartu',
|
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.',
|
'Tip: dejte Ctrl-V (Cmd-V na Mac) pro vložení přílohy ze schránky.',
|
||||||
project: 'Projekt',
|
project: 'Projekt',
|
||||||
projectNotFound_title: 'Projekt nenalezen',
|
projectNotFound_title: 'Projekt nenalezen',
|
||||||
|
removeManager_title: 'Odstranit vedoucího',
|
||||||
removeMember_title: 'Odstranit člena',
|
removeMember_title: 'Odstranit člena',
|
||||||
seconds: 'Vteřin',
|
seconds: 'Vteřin',
|
||||||
selectBoard: 'Vybrat tabuli',
|
selectBoard: 'Vybrat tabuli',
|
||||||
@@ -174,6 +186,8 @@ export default {
|
|||||||
editTimer_title: 'Upravit časovač',
|
editTimer_title: 'Upravit časovač',
|
||||||
editTitle_title: 'Upravit titulek',
|
editTitle_title: 'Upravit titulek',
|
||||||
editUsername_title: 'Upravit uživatelské jméno',
|
editUsername_title: 'Upravit uživatelské jméno',
|
||||||
|
leaveBoard: 'Opustit tabuli',
|
||||||
|
leaveProject: 'Opustit projekt',
|
||||||
logOut_title: 'Odhlásit se',
|
logOut_title: 'Odhlásit se',
|
||||||
makeCover_title: 'Vytvořit obal',
|
makeCover_title: 'Vytvořit obal',
|
||||||
move: 'Přesunout',
|
move: 'Přesunout',
|
||||||
@@ -181,7 +195,9 @@ export default {
|
|||||||
remove: 'Odstranit',
|
remove: 'Odstranit',
|
||||||
removeBackground: 'Odstranit pozadí',
|
removeBackground: 'Odstranit pozadí',
|
||||||
removeCover_title: 'Odstranit obal',
|
removeCover_title: 'Odstranit obal',
|
||||||
|
removeFromBoard: 'Odstranit z tabule',
|
||||||
removeFromProject: 'Odstranit z projektu',
|
removeFromProject: 'Odstranit z projektu',
|
||||||
|
removeManager: 'Odstranit vedoucího',
|
||||||
removeMember: 'Odstranit člena',
|
removeMember: 'Odstranit člena',
|
||||||
save: 'Uložit',
|
save: 'Uložit',
|
||||||
showAllAttachments: 'Zozbrazit všechny přílohy ({{hidden}} skryté)',
|
showAllAttachments: 'Zozbrazit všechny přílohy ({{hidden}} skryté)',
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ export default {
|
|||||||
actions: 'Aktionen',
|
actions: 'Aktionen',
|
||||||
addAttachment_title: 'Anhang hinzufügen',
|
addAttachment_title: 'Anhang hinzufügen',
|
||||||
addComment: 'Kommentar hinzufügen',
|
addComment: 'Kommentar hinzufügen',
|
||||||
|
addManager_title: 'Manager hinzufügen',
|
||||||
addMember_title: 'Mitglied hinzufügen',
|
addMember_title: 'Mitglied hinzufügen',
|
||||||
addUser_title: 'Benutzer hinzufügen',
|
addUser_title: 'Benutzer hinzufügen',
|
||||||
administrator: 'Administrator',
|
administrator: 'Administrator',
|
||||||
@@ -36,11 +37,16 @@ export default {
|
|||||||
areYouSureYouWantToDeleteThisTask: 'Sind Sie sicher, dass Sie diese Aufgabe löschen möchten?',
|
areYouSureYouWantToDeleteThisTask: 'Sind Sie sicher, dass Sie diese Aufgabe löschen möchten?',
|
||||||
areYouSureYouWantToDeleteThisUser:
|
areYouSureYouWantToDeleteThisUser:
|
||||||
'Sind Sie sicher, dass Sie diesen Benutzer löschen möchten?',
|
'Sind Sie sicher, dass Sie diesen Benutzer löschen möchten?',
|
||||||
areYouSureYouWantToRemoveThisMemberFromProject:
|
areYouSureYouWantToLeaveBoard: 'Sind Sie sicher, dass Sie das Board verlassen möchten?',
|
||||||
'Sind Sie sicher, dass Sie dieses Mitglied aus dem Projekt entfernen 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',
|
attachment: 'Anhang',
|
||||||
attachments: 'Anhänge',
|
attachments: 'Anhänge',
|
||||||
authentication: 'Authentifizierung',
|
authentication: 'Authentifizierung',
|
||||||
|
background: 'Hintergrund',
|
||||||
board: 'Board',
|
board: 'Board',
|
||||||
boardNotFound_title: 'Board nicht gefunden',
|
boardNotFound_title: 'Board nicht gefunden',
|
||||||
cardActions_title: 'Kartenaktionen',
|
cardActions_title: 'Kartenaktionen',
|
||||||
@@ -53,6 +59,7 @@ export default {
|
|||||||
createProject_title: 'Projekt erstellen',
|
createProject_title: 'Projekt erstellen',
|
||||||
createTextFile_title: 'Textdatei erstellen',
|
createTextFile_title: 'Textdatei erstellen',
|
||||||
currentPassword: 'Derzeitiges Password',
|
currentPassword: 'Derzeitiges Password',
|
||||||
|
dangerZone_title: 'Gefährlicher Bereich',
|
||||||
date: 'Datum',
|
date: 'Datum',
|
||||||
dueDate_title: 'Fälligkeitsdatum',
|
dueDate_title: 'Fälligkeitsdatum',
|
||||||
deleteAttachment_title: 'Anhang löschen',
|
deleteAttachment_title: 'Anhang löschen',
|
||||||
@@ -86,11 +93,15 @@ export default {
|
|||||||
filterByLabels_title: 'Nach Label filtern',
|
filterByLabels_title: 'Nach Label filtern',
|
||||||
filterByMembers_title: 'Nach Mitgliedern filtern',
|
filterByMembers_title: 'Nach Mitgliedern filtern',
|
||||||
fromComputer_title: 'Vom Computer',
|
fromComputer_title: 'Vom Computer',
|
||||||
|
general: 'Allgemein',
|
||||||
hours: 'Stunden',
|
hours: 'Stunden',
|
||||||
invalidCurrentPassword: 'Das aktuelle Passwort ist falsch',
|
invalidCurrentPassword: 'Das aktuelle Passwort ist falsch',
|
||||||
labels: 'Labels',
|
labels: 'Labels',
|
||||||
|
leaveBoard_title: 'Board verlassen',
|
||||||
|
leaveProject_title: 'Projekt verlassen',
|
||||||
list: 'Listen',
|
list: 'Listen',
|
||||||
listActions_title: 'Aufgaben auflisten',
|
listActions_title: 'Aufgaben auflisten',
|
||||||
|
managers: 'Manager',
|
||||||
members: 'Mitglieder',
|
members: 'Mitglieder',
|
||||||
minutes: 'Minuten',
|
minutes: 'Minuten',
|
||||||
moveCard_title: 'Karte verschieben',
|
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.',
|
'Tipp: Drücken Sie STRG-V (Cmd-V auf Mac), um einen Anhang aus der Zwischenablage hinzuzufügen.',
|
||||||
project: 'Projekt',
|
project: 'Projekt',
|
||||||
projectNotFound_title: 'Projekt nicht gefunden',
|
projectNotFound_title: 'Projekt nicht gefunden',
|
||||||
|
removeManager_title: 'Manager entfernen',
|
||||||
removeMember_title: 'Mitglied entfernen',
|
removeMember_title: 'Mitglied entfernen',
|
||||||
seconds: 'Sekunden',
|
seconds: 'Sekunden',
|
||||||
selectBoard: 'Board auswählen',
|
selectBoard: 'Board auswählen',
|
||||||
@@ -122,6 +134,7 @@ export default {
|
|||||||
subscribeToMyOwnCardsByDefault: 'Standardmäßig meine eigenen Karten abonnieren',
|
subscribeToMyOwnCardsByDefault: 'Standardmäßig meine eigenen Karten abonnieren',
|
||||||
taskActions_title: 'Aufgabenaktionen',
|
taskActions_title: 'Aufgabenaktionen',
|
||||||
tasks: 'Aufgaben',
|
tasks: 'Aufgaben',
|
||||||
|
thereIsNoPreviewAvailableForThisAttachment: 'Für diesen Anhang ist keine Vorschau verfügbar',
|
||||||
time: 'Zeit',
|
time: 'Zeit',
|
||||||
timer: 'Timer',
|
timer: 'Timer',
|
||||||
title: 'Titel',
|
title: 'Titel',
|
||||||
@@ -180,6 +193,8 @@ export default {
|
|||||||
editTimer_title: 'Timer bearbeiten',
|
editTimer_title: 'Timer bearbeiten',
|
||||||
editTitle_title: 'Titel bearbeiten',
|
editTitle_title: 'Titel bearbeiten',
|
||||||
editUsername_title: 'Benutzername ändern',
|
editUsername_title: 'Benutzername ändern',
|
||||||
|
leaveBoard: 'Board verlassen',
|
||||||
|
leaveProject: 'Projekt verlassen',
|
||||||
logOut_title: 'Ausloggen',
|
logOut_title: 'Ausloggen',
|
||||||
makeCover_title: 'als Vorschau festlegen',
|
makeCover_title: 'als Vorschau festlegen',
|
||||||
move: 'Verschieben',
|
move: 'Verschieben',
|
||||||
@@ -187,7 +202,9 @@ export default {
|
|||||||
remove: 'Löschen',
|
remove: 'Löschen',
|
||||||
removeBackground: 'Hintergrund löschen',
|
removeBackground: 'Hintergrund löschen',
|
||||||
removeCover_title: 'Vorschau löschen',
|
removeCover_title: 'Vorschau löschen',
|
||||||
|
removeFromBoard: 'Vom Board entfernen',
|
||||||
removeFromProject: 'Vom Projekt entfernen',
|
removeFromProject: 'Vom Projekt entfernen',
|
||||||
|
removeManager: 'Manager entfernen',
|
||||||
removeMember: 'Mitglied entfernen',
|
removeMember: 'Mitglied entfernen',
|
||||||
save: 'Speichern',
|
save: 'Speichern',
|
||||||
showAllAttachments: 'Alle Anhänge anzeigen ({{hidden}} versteckt)',
|
showAllAttachments: 'Alle Anhänge anzeigen ({{hidden}} versteckt)',
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ export default {
|
|||||||
editBoard_title: 'Edit Board',
|
editBoard_title: 'Edit Board',
|
||||||
editDueDate_title: 'Edit Due Date',
|
editDueDate_title: 'Edit Due Date',
|
||||||
editEmail_title: 'Edit E-mail',
|
editEmail_title: 'Edit E-mail',
|
||||||
|
editInformation_title: 'Edit Information',
|
||||||
editLabel_title: 'Edit Label',
|
editLabel_title: 'Edit Label',
|
||||||
editPassword_title: 'Edit Password',
|
editPassword_title: 'Edit Password',
|
||||||
editTimer_title: 'Edit Timer',
|
editTimer_title: 'Edit Timer',
|
||||||
@@ -126,6 +127,8 @@ export default {
|
|||||||
subscribeToMyOwnCardsByDefault: 'Subscribe to my own cards by default',
|
subscribeToMyOwnCardsByDefault: 'Subscribe to my own cards by default',
|
||||||
taskActions_title: 'Task Actions',
|
taskActions_title: 'Task Actions',
|
||||||
tasks: 'Tasks',
|
tasks: 'Tasks',
|
||||||
|
thereIsNoPreviewAvailableForThisAttachment:
|
||||||
|
'There is no preview available for this attachment',
|
||||||
time: 'Time',
|
time: 'Time',
|
||||||
timer: 'Timer',
|
timer: 'Timer',
|
||||||
title: 'Title',
|
title: 'Title',
|
||||||
@@ -178,6 +181,7 @@ export default {
|
|||||||
editDueDate_title: 'Edit Due Date',
|
editDueDate_title: 'Edit Due Date',
|
||||||
editDescription_title: 'Edit Description',
|
editDescription_title: 'Edit Description',
|
||||||
editEmail_title: 'Edit E-mail',
|
editEmail_title: 'Edit E-mail',
|
||||||
|
editInformation_title: 'Edit Information',
|
||||||
editPassword_title: 'Edit Password',
|
editPassword_title: 'Edit Password',
|
||||||
editTimer_title: 'Edit Timer',
|
editTimer_title: 'Edit Timer',
|
||||||
editTitle_title: 'Edit Title',
|
editTitle_title: 'Edit Title',
|
||||||
|
|||||||
+28
-22
@@ -1,29 +1,35 @@
|
|||||||
|
import merge from 'lodash/merge';
|
||||||
import fromPairs from 'lodash/fromPairs';
|
import fromPairs from 'lodash/fromPairs';
|
||||||
|
|
||||||
import cs from './cs/embed';
|
import csLogin from './cs/login';
|
||||||
import da from './da/embed';
|
import daLogin from './da/login';
|
||||||
import de from './de/embed';
|
import deLogin from './de/login';
|
||||||
import en from './en/embed';
|
import enLogin from './en/login';
|
||||||
import es from './es/embed';
|
import enCore from './en/core';
|
||||||
import fr from './fr/embed';
|
import esLogin from './es/login';
|
||||||
import ja from './ja/embed';
|
import frLogin from './fr/login';
|
||||||
import pl from './pl/embed';
|
import jaLogin from './ja/login';
|
||||||
import ru from './ru/embed';
|
import plLogin from './pl/login';
|
||||||
import uz from './uz/embed';
|
import ruLogin from './ru/login';
|
||||||
import zh from './zh/embed';
|
import skLogin from './sk/login';
|
||||||
|
import svLogin from './sv/login';
|
||||||
|
import uzLogin from './uz/login';
|
||||||
|
import zhLogin from './zh/login';
|
||||||
|
|
||||||
const localePairs = [
|
const localePairs = [
|
||||||
['cs', cs],
|
['cs', csLogin],
|
||||||
['da', da],
|
['da', daLogin],
|
||||||
['de', de],
|
['de', deLogin],
|
||||||
['en', en],
|
['en', merge(enLogin, enCore)],
|
||||||
['es', es],
|
['es', esLogin],
|
||||||
['fr', fr],
|
['fr', frLogin],
|
||||||
['ja', ja],
|
['ja', jaLogin],
|
||||||
['pl', pl],
|
['pl', plLogin],
|
||||||
['ru', ru],
|
['ru', ruLogin],
|
||||||
['uz', uz],
|
['sk', skLogin],
|
||||||
['zh', zh],
|
['sv', svLogin],
|
||||||
|
['uz', uzLogin],
|
||||||
|
['zh', zhLogin],
|
||||||
];
|
];
|
||||||
|
|
||||||
export const languages = localePairs.map((locale) => locale[0]);
|
export const languages = localePairs.map((locale) => locale[0]);
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ export default {
|
|||||||
subscribeToMyOwnCardsByDefault: 'По умолчанию подписаться на мои собственные карточки',
|
subscribeToMyOwnCardsByDefault: 'По умолчанию подписаться на мои собственные карточки',
|
||||||
taskActions: 'Действия с задачей',
|
taskActions: 'Действия с задачей',
|
||||||
tasks: 'Задачи',
|
tasks: 'Задачи',
|
||||||
|
thereIsNoPreviewAvailableForThisAttachment: 'Предпросмотр для этого вложения недоступен',
|
||||||
time: 'Время',
|
time: 'Время',
|
||||||
timer: 'Таймер',
|
timer: 'Таймер',
|
||||||
title: 'Название',
|
title: 'Название',
|
||||||
|
|||||||
@@ -0,0 +1,215 @@
|
|||||||
|
import dateFns from 'date-fns/locale/sk';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
dateFns,
|
||||||
|
|
||||||
|
format: {
|
||||||
|
date: 'd.M.yyyy',
|
||||||
|
time: 'p',
|
||||||
|
dateTime: '$t(format:date) $t(format:time)',
|
||||||
|
longDate: 'd MMM',
|
||||||
|
longDateTime: "d MMMM 'v' p",
|
||||||
|
},
|
||||||
|
|
||||||
|
translation: {
|
||||||
|
common: {
|
||||||
|
account: 'Účet',
|
||||||
|
actions: 'Akcia',
|
||||||
|
addAttachment_title: 'Pridať prílohu',
|
||||||
|
addComment: 'Pridať komentár',
|
||||||
|
addManager_title: 'Pridať správcu',
|
||||||
|
addMember_title: 'Pridať člena',
|
||||||
|
addUser_title: 'Pridať používateľa',
|
||||||
|
administrator: 'Administrátor',
|
||||||
|
all: 'Všetko',
|
||||||
|
allChangesWillBeAutomaticallySavedAfterConnectionRestored:
|
||||||
|
'Všetky zmeny budú automaticky uložené<br />po obnovení spojenia',
|
||||||
|
areYouSureYouWantToDeleteThisAttachment: 'Naozaj chcete zmazať túto prílohu?',
|
||||||
|
areYouSureYouWantToDeleteThisBoard: 'Naozaj chcete zmazať túto tabuľu?',
|
||||||
|
areYouSureYouWantToDeleteThisCard: 'Naozaj chcete zmazať túto kartu?',
|
||||||
|
areYouSureYouWantToDeleteThisComment: 'Naozaj chcete zmazať tento komentár?',
|
||||||
|
areYouSureYouWantToDeleteThisLabel: 'Naozaj chcete zmazať tento štítok?',
|
||||||
|
areYouSureYouWantToDeleteThisList: 'Naozaj chcete zmazať tento zoznam?',
|
||||||
|
areYouSureYouWantToDeleteThisProject: 'Naozaj chcete zmazať tento projekt?',
|
||||||
|
areYouSureYouWantToDeleteThisTask: 'Naozaj chcete zmazať túto úlohu?',
|
||||||
|
areYouSureYouWantToDeleteThisUser: 'Naozaj chcete zmazať tohoto používateľa?',
|
||||||
|
areYouSureYouWantToLeaveBoard: 'Naozaj chcete opustiť túto tabuľu?',
|
||||||
|
areYouSureYouWantToLeaveProject: 'Naozaj chcete opustiť tento projekt?',
|
||||||
|
areYouSureYouWantToRemoveThisManagerFromProject:
|
||||||
|
'Naozaj chcete zmazať daného správcu tohto projektu?',
|
||||||
|
areYouSureYouWantToRemoveThisMemberFromBoard:
|
||||||
|
'Naozaj chcete odstrániť tohoto člena z tabule?',
|
||||||
|
attachment: 'Príloha',
|
||||||
|
attachments: 'Prílohy',
|
||||||
|
authentication: 'Overenie',
|
||||||
|
background: 'Pozadie',
|
||||||
|
board: 'Tabuľa',
|
||||||
|
boardNotFound_title: 'Tabuľa neexistuje',
|
||||||
|
cardActions_title: 'Akcie na karte',
|
||||||
|
cardNotFound_title: 'Karta neexistuje',
|
||||||
|
cardOrActionAreDeleted: 'Karta alebo akcia sú zmazané',
|
||||||
|
color: 'Farba',
|
||||||
|
createBoard_title: 'Vytvoriť tabuľu',
|
||||||
|
createLabel_title: 'Vytvoriť štítok',
|
||||||
|
createNewOneOrSelectExistingOne: 'Vytvoriť nový alebo vyberte<br />už existujúci',
|
||||||
|
createProject_title: 'Vytvoriť projekt',
|
||||||
|
createTextFile_title: 'Vytvoriť textový súbor',
|
||||||
|
currentPassword: 'Aktuálne heslo',
|
||||||
|
dangerZone_title: 'Nebezpečná zóna',
|
||||||
|
date: 'Dátum',
|
||||||
|
dueDate_title: 'Termín do',
|
||||||
|
deleteAttachment_title: 'Zmazať prílohu',
|
||||||
|
deleteBoard_title: 'Zmazať tabuľu',
|
||||||
|
deleteCard_title: 'Zmazať kartu',
|
||||||
|
deleteComment_title: 'Zmazať komentár',
|
||||||
|
deleteLabel_title: 'Zmazať štítok',
|
||||||
|
deleteList_title: 'Zmazať zoznam',
|
||||||
|
deleteProject_title: 'Zmazať projekt',
|
||||||
|
deleteTask_title: 'Zmazať úlohu',
|
||||||
|
deleteUser_title: 'Zmazať používateľa',
|
||||||
|
description: 'Popis',
|
||||||
|
dropFileToUpload: 'Potiahnutím nahraj súbor',
|
||||||
|
editAttachment_title: 'Upraviť prílohu',
|
||||||
|
editAvatar_title: 'Upraviť avatar',
|
||||||
|
editBoard_title: 'Upraviť tabuľu',
|
||||||
|
editDueDate_title: 'Upraviť Termín do',
|
||||||
|
editEmail_title: 'Upraviť e-mail',
|
||||||
|
editInformation_title: 'Upraviť informácie',
|
||||||
|
editLabel_title: 'Upraviť štítok',
|
||||||
|
editPassword_title: 'Upraviť heslo',
|
||||||
|
editTimer_title: 'Upraviť časovač',
|
||||||
|
editUsername_title: 'Upraviť používateľské meno',
|
||||||
|
email: 'E-mail',
|
||||||
|
emailAlreadyInUse: 'E-mail je už použitý',
|
||||||
|
enterCardTitle: 'Vlož názov karty...',
|
||||||
|
enterDescription: 'Vlož popis...',
|
||||||
|
enterFilename: 'Vlož názov súboru',
|
||||||
|
enterListTitle: 'Vlož názov zoznamu...',
|
||||||
|
enterProjectTitle: 'Vlož názov projektu',
|
||||||
|
enterTaskDescription: 'Vlož popis úlohy...',
|
||||||
|
filterByLabels_title: 'Filtruj podľa štítku',
|
||||||
|
filterByMembers_title: 'Filtruj podľa člena',
|
||||||
|
fromComputer_title: 'Z počítača',
|
||||||
|
general: 'Všeobecné',
|
||||||
|
hours: 'Hodiny',
|
||||||
|
invalidCurrentPassword: 'Neplatné aktuálne heslo',
|
||||||
|
labels: 'Štítky',
|
||||||
|
leaveBoard_title: 'Opustiť tabuľu',
|
||||||
|
leaveProject_title: 'Opustiť projekt',
|
||||||
|
list: 'Zoznam',
|
||||||
|
listActions_title: 'Zoznam akcií',
|
||||||
|
managers: 'Správcovia',
|
||||||
|
members: 'Členovia',
|
||||||
|
minutes: 'Minúty',
|
||||||
|
moveCard_title: 'Presunúť kartu',
|
||||||
|
name: 'Meno',
|
||||||
|
newEmail: 'Nový e-mail',
|
||||||
|
newPassword: 'Nové heslo',
|
||||||
|
newUsername: 'Nové používateľské meno',
|
||||||
|
noConnectionToServer: 'Nie je spojenie k serveru',
|
||||||
|
noBoards: 'Žiadne tabule',
|
||||||
|
noLists: 'Žiadne zoznamy',
|
||||||
|
noProjects: 'Žiadne projekty',
|
||||||
|
notifications: 'Oznámenia',
|
||||||
|
noUnreadNotifications: 'Žiadne neprečítané oznámenia',
|
||||||
|
openBoard_title: 'Otvoriť tabuľu',
|
||||||
|
optional_inline: 'voliteľné',
|
||||||
|
organization: 'Spoločnosť',
|
||||||
|
phone: 'Telefón',
|
||||||
|
preferences: 'Voľby',
|
||||||
|
pressPasteShortcutToAddAttachmentFromClipboard:
|
||||||
|
'Tip: stlačte Ctrl-V (Cmd-V na Mac) pre vloženie prílohy zo schránky.',
|
||||||
|
project: 'Projekt',
|
||||||
|
projectNotFound_title: 'Projekt neexistuje',
|
||||||
|
removeManager_title: 'Odstrániť správcu',
|
||||||
|
removeMember_title: 'Odstrániť člena',
|
||||||
|
seconds: 'Sekúnd',
|
||||||
|
selectBoard: 'Vybrať tabuľu',
|
||||||
|
selectList: 'Vybrať zoznam',
|
||||||
|
selectProject: 'Vybrať projekt',
|
||||||
|
settings: 'Nastavenia',
|
||||||
|
subscribeToMyOwnCardsByDefault: 'Predvolene odoberať vlastné karty',
|
||||||
|
taskActions_title: 'Akcie na úlohe',
|
||||||
|
tasks: 'Úlohy',
|
||||||
|
time: 'Čas',
|
||||||
|
timer: 'Časovač',
|
||||||
|
title: 'Názov',
|
||||||
|
userActions_title: 'Akcie na používateľovi',
|
||||||
|
userAddedThisCardToList: '<0>{{user}}</0><1> pridal kartu do {{list}}</1>',
|
||||||
|
userLeftNewCommentToCard: '{{user}} zanechal nový komentár «{{comment}}» k <2>{{card}}</2>',
|
||||||
|
userMovedCardFromListToList: '{{user}} presunul <2>{{card}}</2> z {{fromList}} do {{toList}}',
|
||||||
|
userMovedThisCardFromListToList:
|
||||||
|
'<0>{{user}}</0><1> presunul túto kartu z {{fromList}} do {{toList}}</1>',
|
||||||
|
username: 'Používateľské meno',
|
||||||
|
usernameAlreadyInUse: 'Používateľské meno je zabrané',
|
||||||
|
users: 'Používatelia',
|
||||||
|
writeComment: 'Napísať komentár...',
|
||||||
|
},
|
||||||
|
|
||||||
|
action: {
|
||||||
|
addAnotherCard: 'Pridať ďalšiu kartu',
|
||||||
|
addAnotherList: 'Pridať ďalší zoznam',
|
||||||
|
addAnotherTask: 'Pridať ďalšiu úlohu',
|
||||||
|
addCard: 'Pridať kartu',
|
||||||
|
addCard_title: 'Pridať kartu',
|
||||||
|
addComment: 'Pridať komentár',
|
||||||
|
addList: 'Pridať zoznam',
|
||||||
|
addMoreDetailedDescription: 'Pridať ďalší detailný popis',
|
||||||
|
addTask: 'Pridať úlohu',
|
||||||
|
addToCard: 'Pridať na kartu',
|
||||||
|
addUser: 'Pridať používateľa',
|
||||||
|
createBoard: 'Vytvoriť tabuľu',
|
||||||
|
createFile: 'Vytvoriť súbor',
|
||||||
|
createLabel: 'Vytvoriť štítok',
|
||||||
|
createNewLabel: 'Vytvoriť nový štítok',
|
||||||
|
createProject: 'Vytvoriť projekt',
|
||||||
|
delete: 'Zmazať',
|
||||||
|
deleteAttachment: 'Zmazať prílohu',
|
||||||
|
deleteAvatar: 'Zmazať avatar',
|
||||||
|
deleteBoard: 'Zmazať tabuľu',
|
||||||
|
deleteCard: 'Zmazať kartu',
|
||||||
|
deleteCard_title: 'Zmazať kartu',
|
||||||
|
deleteComment: 'Zmazať komentár',
|
||||||
|
deleteImage: 'Zmazať obrázok',
|
||||||
|
deleteLabel: 'Zmazať štítok',
|
||||||
|
deleteList: 'Zmazať zoznam',
|
||||||
|
deleteList_title: 'Zmazať zoznam',
|
||||||
|
deleteProject: 'Zmazať projekt',
|
||||||
|
deleteProject_title: 'Zmazať projekt',
|
||||||
|
deleteTask: 'Zmazať úlohu',
|
||||||
|
deleteTask_title: 'Zmazať úlohu',
|
||||||
|
deleteUser: 'Zmazať používateľa',
|
||||||
|
edit: 'Upraviť',
|
||||||
|
editDueDate_title: 'Upraviť termín do',
|
||||||
|
editDescription_title: 'Upraviť popis',
|
||||||
|
editEmail_title: 'Upraviť e-mail',
|
||||||
|
editInformation_title: 'Upraviť informácie',
|
||||||
|
editPassword_title: 'Upraviť heslo',
|
||||||
|
editTimer_title: 'Upraviť časovač',
|
||||||
|
editTitle_title: 'Upraviť názov',
|
||||||
|
editUsername_title: 'Upraviť používateľské meno',
|
||||||
|
leaveBoard: 'Opustiť tabuľu',
|
||||||
|
leaveProject: 'Opustiť projekt',
|
||||||
|
logOut_title: 'Odhlásiť sa',
|
||||||
|
makeCover_title: 'Vytvoriť obal',
|
||||||
|
move: 'Presunúť',
|
||||||
|
moveCard_title: 'Presunúť kartu',
|
||||||
|
remove: 'Odstrániť',
|
||||||
|
removeBackground: 'Odstrániť pozadie',
|
||||||
|
removeCover_title: 'Odstrániť obal',
|
||||||
|
removeFromBoard: 'Odstrániť z tabule',
|
||||||
|
removeFromProject: 'Odstrániť z projektu',
|
||||||
|
removeManager: 'Odstrániť správcu',
|
||||||
|
removeMember: 'Odstrániť člena',
|
||||||
|
save: 'Uložiť',
|
||||||
|
showAllAttachments: 'Zozbraziť všetky prílohy ({{hidden}} skryté)',
|
||||||
|
showFewerAttachments: 'Zobraziť menej príloh',
|
||||||
|
start: 'Start',
|
||||||
|
stop: 'Stop',
|
||||||
|
subscribe: 'Odoberať',
|
||||||
|
unsubscribe: 'Neodoberať',
|
||||||
|
uploadNewAvatar: 'Nahrať nový avatar',
|
||||||
|
uploadNewImage: 'Nahrať nový obrázok',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
export default {
|
||||||
|
translation: {
|
||||||
|
common: {
|
||||||
|
emailOrUsername: 'E-mail alebo používateľské meno',
|
||||||
|
invalidEmailOrUsername: 'Nesprávny e-mail alebo používateľské meno',
|
||||||
|
invalidPassword: 'Nesprávne heslo',
|
||||||
|
logInToPlanka: 'Prihlásiť sa do Planka',
|
||||||
|
noInternetConnection: 'Bez pripojenia k internetu',
|
||||||
|
pageNotFound_title: 'Stránka neexistuje',
|
||||||
|
password: 'Heslo',
|
||||||
|
projectManagement: 'Správa projektu',
|
||||||
|
serverConnectionFailed: 'Pripojenie k serveru zlyhalo',
|
||||||
|
unknownError: 'Neznáma chyba, skúste to neskôr',
|
||||||
|
},
|
||||||
|
|
||||||
|
action: {
|
||||||
|
logIn: 'Prihlásiť sa',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -0,0 +1,216 @@
|
|||||||
|
import dateFns from 'date-fns/locale/sv';
|
||||||
|
|
||||||
|
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: 'Åtgärder',
|
||||||
|
addAttachment_title: 'Bifoga',
|
||||||
|
addComment: 'Kommentera',
|
||||||
|
addManager_title: 'Lägg till Projektledare',
|
||||||
|
addMember_title: 'Lägg till Medlem',
|
||||||
|
addUser_title: 'Lägg till Användare',
|
||||||
|
administrator: 'Administratör',
|
||||||
|
all: 'Alla',
|
||||||
|
allChangesWillBeAutomaticallySavedAfterConnectionRestored:
|
||||||
|
'Alla ändringar kommer att sparas automatiskt<br />så fort anslutningen är återställd',
|
||||||
|
areYouSureYouWantToDeleteThisAttachment:
|
||||||
|
'Är du säker på att du vill ta bort den här bilagan?',
|
||||||
|
areYouSureYouWantToDeleteThisBoard: 'Är du säker på att du vill ta bort den här tavlan?',
|
||||||
|
areYouSureYouWantToDeleteThisCard: 'Är du säker på att du vill ta bort det här kortet?',
|
||||||
|
areYouSureYouWantToDeleteThisComment:
|
||||||
|
'Är du säker på att du vill ta bort den här kommentaren?',
|
||||||
|
areYouSureYouWantToDeleteThisLabel: 'Är du säker på att du vill ta bort den här etiketten?',
|
||||||
|
areYouSureYouWantToDeleteThisList: 'Är du säker på att du vill ta bort den här listan?',
|
||||||
|
areYouSureYouWantToDeleteThisProject: 'Är du säker på att du vill ta bort det här projektet?',
|
||||||
|
areYouSureYouWantToDeleteThisTask: 'Är du säker på att du vill ta bort den här uppgiften?',
|
||||||
|
areYouSureYouWantToDeleteThisUser: 'Är du säker på att du vill ta bort den här användaren?',
|
||||||
|
areYouSureYouWantToLeaveBoard: 'Är du säker på att du vill lämna tavlan?',
|
||||||
|
areYouSureYouWantToLeaveProject: 'Är du säker på att du vill lämna projektet?',
|
||||||
|
areYouSureYouWantToRemoveThisManagerFromProject:
|
||||||
|
'Är du säker på att du vill ta bort den här projektledaren från projektet?',
|
||||||
|
areYouSureYouWantToRemoveThisMemberFromBoard:
|
||||||
|
'Är du säker på att du vill ta bort den här medlemmen från tavlan?',
|
||||||
|
attachment: 'Bilaga',
|
||||||
|
attachments: 'Bilagor',
|
||||||
|
authentication: 'Autentisering',
|
||||||
|
background: 'Bakgrund',
|
||||||
|
board: 'Tavla',
|
||||||
|
boardNotFound_title: 'Tavla Ej Funnen',
|
||||||
|
cardActions_title: 'Kortåtgärder',
|
||||||
|
cardNotFound_title: 'Kort Ej Funnet',
|
||||||
|
cardOrActionAreDeleted: 'Kort eller åtgärd är borttagen',
|
||||||
|
color: 'Färg',
|
||||||
|
createBoard_title: 'Skapa Tavla',
|
||||||
|
createLabel_title: 'Skapa Etikett',
|
||||||
|
createNewOneOrSelectExistingOne: 'Skapa en ny eller välj<br />en redan existerande',
|
||||||
|
createProject_title: 'Skapa Projekt',
|
||||||
|
createTextFile_title: 'Skapa Textfil',
|
||||||
|
currentPassword: 'Nuvarande lösenord',
|
||||||
|
dangerZone_title: 'Farozon',
|
||||||
|
date: 'Datum',
|
||||||
|
dueDate_title: 'Förfallodatum',
|
||||||
|
deleteAttachment_title: 'Ta Bort Bilaga',
|
||||||
|
deleteBoard_title: 'Ta Bort Tavla',
|
||||||
|
deleteCard_title: 'Ta Bort Kort',
|
||||||
|
deleteComment_title: 'Ta Bort Kommentar',
|
||||||
|
deleteLabel_title: 'Ta Bort Etikett',
|
||||||
|
deleteList_title: 'Ta Bort Lista',
|
||||||
|
deleteProject_title: 'Ta Bort Projekt',
|
||||||
|
deleteTask_title: 'Ta Bort Uppgift',
|
||||||
|
deleteUser_title: 'Ta Bort Användare',
|
||||||
|
description: 'Beskrivning',
|
||||||
|
dropFileToUpload: 'Släpp en fil för att ladda upp',
|
||||||
|
editAttachment_title: 'Redigera Bilaga',
|
||||||
|
editAvatar_title: 'Redigera Avatar',
|
||||||
|
editBoard_title: 'Redigera Tavla',
|
||||||
|
editDueDate_title: 'Redigera Förfallodatum',
|
||||||
|
editEmail_title: 'Redigera E-mail',
|
||||||
|
editLabel_title: 'Redigera Etikett',
|
||||||
|
editPassword_title: 'Redigera Lösenord',
|
||||||
|
editTimer_title: 'Redigera Timer',
|
||||||
|
editUsername_title: 'Redigera Användarnamn',
|
||||||
|
email: 'E-mail',
|
||||||
|
emailAlreadyInUse: 'E-mail används redan',
|
||||||
|
enterCardTitle: 'Ange kortets titel...',
|
||||||
|
enterDescription: 'Ange beskrivning...',
|
||||||
|
enterFilename: 'Ange filnamn',
|
||||||
|
enterListTitle: 'Ange listans titel...',
|
||||||
|
enterProjectTitle: 'Ange projektets titel',
|
||||||
|
enterTaskDescription: 'Ange uppgiftsbeskrivning...',
|
||||||
|
filterByLabels_title: 'Filtrera Efter Etiketter',
|
||||||
|
filterByMembers_title: 'Filtrera Efter Medlemmar',
|
||||||
|
fromComputer_title: 'Från dator',
|
||||||
|
general: 'Allmänt',
|
||||||
|
hours: 'Timmar',
|
||||||
|
invalidCurrentPassword: 'Ogiltigt nuvarande lösenord',
|
||||||
|
labels: 'Etiketter',
|
||||||
|
leaveBoard_title: 'Lämna Tavla',
|
||||||
|
leaveProject_title: 'Lämna Projekt',
|
||||||
|
list: 'Lista',
|
||||||
|
listActions_title: 'Liståtgärder',
|
||||||
|
managers: 'Projektledare',
|
||||||
|
members: 'Medlemmar',
|
||||||
|
minutes: 'Minuter',
|
||||||
|
moveCard_title: 'Flytta Kort',
|
||||||
|
name: 'Namn',
|
||||||
|
newEmail: 'Ny e-mail',
|
||||||
|
newPassword: 'Nytt lösenord',
|
||||||
|
newUsername: 'Nytt användarnamn',
|
||||||
|
noConnectionToServer: 'Ingen anslutning till servern',
|
||||||
|
noBoards: 'Inga tavlor',
|
||||||
|
noLists: 'Inga listor',
|
||||||
|
noProjects: 'Inga projekt',
|
||||||
|
notifications: 'Notifikationer',
|
||||||
|
noUnreadNotifications: 'Inga olästa notifikationer',
|
||||||
|
openBoard_title: 'Öppna Tavla',
|
||||||
|
optional_inline: 'valfri',
|
||||||
|
organization: 'Organisation',
|
||||||
|
phone: 'Telefon',
|
||||||
|
preferences: 'Preferenser',
|
||||||
|
pressPasteShortcutToAddAttachmentFromClipboard:
|
||||||
|
'Tips: tryck på Ctrl-V (Cmd-V på Mac) för att lägga till en bilaga från urklipp.',
|
||||||
|
project: 'Projekt',
|
||||||
|
projectNotFound_title: 'Projekt Ej Funnet',
|
||||||
|
removeManager_title: 'Ta Bort Projektledare',
|
||||||
|
removeMember_title: 'Ta Bort Medlem',
|
||||||
|
seconds: 'Sekunder',
|
||||||
|
selectBoard: 'Välj tavla',
|
||||||
|
selectList: 'Välj lista',
|
||||||
|
selectProject: 'Välj projekt',
|
||||||
|
settings: 'Inställningar',
|
||||||
|
subscribeToMyOwnCardsByDefault: 'Prenumerera på mina egna kort som standard',
|
||||||
|
taskActions_title: 'Uppgiftsåtgärder',
|
||||||
|
tasks: 'Uppgifter',
|
||||||
|
time: 'Tid',
|
||||||
|
timer: 'Timer',
|
||||||
|
title: 'Titel',
|
||||||
|
userActions_title: 'Användaråtgärder',
|
||||||
|
userAddedThisCardToList: '<0>{{user}}</0><1> lade till detta kort i {{list}}</1>',
|
||||||
|
userLeftNewCommentToCard: '{{user}} lämnade en ny kommentar «{{comment}}» på <2>{{card}}</2>',
|
||||||
|
userMovedCardFromListToList:
|
||||||
|
'{{user}} flyttade <2>{{card}}</2> från {{fromList}} till {{toList}}',
|
||||||
|
userMovedThisCardFromListToList:
|
||||||
|
'<0>{{user}}</0><1> flyttade detta kort från {{fromList}} till {{toList}}</1>',
|
||||||
|
username: 'Användarnamn',
|
||||||
|
usernameAlreadyInUse: 'Användarnamnet används redan',
|
||||||
|
users: 'Användare',
|
||||||
|
writeComment: 'Skriv en kommentar...',
|
||||||
|
},
|
||||||
|
|
||||||
|
action: {
|
||||||
|
addAnotherCard: 'Lägg till ytterligare ett kort',
|
||||||
|
addAnotherList: 'Lägg till ytterligare en lista',
|
||||||
|
addAnotherTask: 'Lägg till ytterligare en uppgift',
|
||||||
|
addCard: 'Lägg till kort',
|
||||||
|
addCard_title: 'Lägg Till Kort',
|
||||||
|
addComment: 'Lägg till kommentar',
|
||||||
|
addList: 'Lägg till lista',
|
||||||
|
addMoreDetailedDescription: 'Lägg till en mer detaljerad beskrivning',
|
||||||
|
addTask: 'Lägg till uppgift',
|
||||||
|
addToCard: 'Lägg till i kort',
|
||||||
|
addUser: 'Lägg till användare',
|
||||||
|
createBoard: 'Skapa tavla',
|
||||||
|
createFile: 'Skapa fil',
|
||||||
|
createLabel: 'Skapa etikett',
|
||||||
|
createNewLabel: 'Skapa ny etikett',
|
||||||
|
createProject: 'Skapa projekt',
|
||||||
|
delete: 'Ta Bort',
|
||||||
|
deleteAttachment: 'Ta bort bilaga',
|
||||||
|
deleteAvatar: 'Ta bort avatar',
|
||||||
|
deleteBoard: 'Ta bort tavla',
|
||||||
|
deleteCard: 'Ta bort kort',
|
||||||
|
deleteCard_title: 'Ta Bort Kort',
|
||||||
|
deleteComment: 'Ta bort kommentar',
|
||||||
|
deleteImage: 'Ta bort bild',
|
||||||
|
deleteLabel: 'Ta bort etikett',
|
||||||
|
deleteList: 'Ta bort lista',
|
||||||
|
deleteList_title: 'Ta Bort Lista',
|
||||||
|
deleteProject: 'Ta bort projekt',
|
||||||
|
deleteProject_title: 'Ta Bort Projekt',
|
||||||
|
deleteTask: 'Ta bort uppgift',
|
||||||
|
deleteTask_title: 'Ta Bort Uppgift',
|
||||||
|
deleteUser: 'Ta bort användare',
|
||||||
|
edit: 'Redigera',
|
||||||
|
editDueDate_title: 'Redigera Förfallodatum',
|
||||||
|
editDescription_title: 'Redigera Beskrivning',
|
||||||
|
editEmail_title: 'Redigera E-mail',
|
||||||
|
editPassword_title: 'Redigera Lösenord',
|
||||||
|
editTimer_title: 'Redigera Timer',
|
||||||
|
editTitle_title: 'Redigera Titel',
|
||||||
|
editUsername_title: 'Redigera Användarnamn',
|
||||||
|
leaveBoard: 'Lämna tavla',
|
||||||
|
leaveProject: 'Lämna projekt',
|
||||||
|
logOut_title: 'Logga ut',
|
||||||
|
makeCover_title: 'Skapa Omslagsbild',
|
||||||
|
move: 'Flytta',
|
||||||
|
moveCard_title: 'Flytta Kort',
|
||||||
|
remove: 'Ta Bort',
|
||||||
|
removeBackground: 'Ta bort bakgrund',
|
||||||
|
removeCover_title: 'Ta Bort Omslagsbild',
|
||||||
|
removeFromBoard: 'Ta bort from tavla',
|
||||||
|
removeFromProject: 'Ta bort from projekt',
|
||||||
|
removeManager: 'Ta bort projektledare',
|
||||||
|
removeMember: 'Ta bort medlem',
|
||||||
|
save: 'Spara',
|
||||||
|
showAllAttachments: 'Visa alla bilagor ({{hidden}} dolda)',
|
||||||
|
showFewerAttachments: 'Visa färre bilagor',
|
||||||
|
start: 'Starta',
|
||||||
|
stop: 'Stoppa',
|
||||||
|
subscribe: 'Prenumerera',
|
||||||
|
unsubscribe: 'Avprenumerera',
|
||||||
|
uploadNewAvatar: 'Ladda upp ny avatar',
|
||||||
|
uploadNewImage: 'Ladda upp ny bild',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
export default {
|
||||||
|
translation: {
|
||||||
|
common: {
|
||||||
|
emailOrUsername: 'E-mail eller användarnamn',
|
||||||
|
invalidEmailOrUsername: 'Ogiltig e-mail eller användarnamn',
|
||||||
|
invalidPassword: 'Ogiltigt lösenord',
|
||||||
|
logInToPlanka: 'Logga in på Planka',
|
||||||
|
noInternetConnection: 'Ingen internetanslutning',
|
||||||
|
pageNotFound_title: 'Sidan Kunde Inte Hittas',
|
||||||
|
password: 'Lösenord',
|
||||||
|
projectManagement: 'Projektledning',
|
||||||
|
serverConnectionFailed: 'Server connection failed',
|
||||||
|
unknownError: 'Okänt fel, försök igen senare',
|
||||||
|
},
|
||||||
|
|
||||||
|
action: {
|
||||||
|
logIn: 'Logga in',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -9,6 +9,7 @@ export default class extends Model {
|
|||||||
id: attr(),
|
id: attr(),
|
||||||
url: attr(),
|
url: attr(),
|
||||||
coverUrl: attr(),
|
coverUrl: attr(),
|
||||||
|
image: attr(),
|
||||||
name: attr(),
|
name: attr(),
|
||||||
cardId: fk({
|
cardId: fk({
|
||||||
to: 'Card',
|
to: 'Card',
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ export default class extends Model {
|
|||||||
static fields = {
|
static fields = {
|
||||||
id: attr(),
|
id: attr(),
|
||||||
email: attr(),
|
email: attr(),
|
||||||
|
username: attr(),
|
||||||
name: attr(),
|
name: attr(),
|
||||||
avatarUrl: attr(),
|
avatarUrl: attr(),
|
||||||
phone: attr(),
|
phone: attr(),
|
||||||
@@ -140,6 +141,18 @@ export default class extends Model {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case ActionTypes.USER_EMAIL_UPDATE_ERROR_CLEAR: {
|
||||||
|
const userModel = User.withId(payload.id);
|
||||||
|
|
||||||
|
userModel.update({
|
||||||
|
emailUpdateForm: {
|
||||||
|
...userModel.emailUpdateForm,
|
||||||
|
error: null,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
case ActionTypes.USER_PASSWORD_UPDATE: {
|
case ActionTypes.USER_PASSWORD_UPDATE: {
|
||||||
const userModel = User.withId(payload.id);
|
const userModel = User.withId(payload.id);
|
||||||
|
|
||||||
@@ -174,6 +187,18 @@ export default class extends Model {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case ActionTypes.USER_PASSWORD_UPDATE_ERROR_CLEAR: {
|
||||||
|
const userModel = User.withId(payload.id);
|
||||||
|
|
||||||
|
userModel.update({
|
||||||
|
passwordUpdateForm: {
|
||||||
|
...userModel.passwordUpdateForm,
|
||||||
|
error: null,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
case ActionTypes.USER_USERNAME_UPDATE: {
|
case ActionTypes.USER_USERNAME_UPDATE: {
|
||||||
const userModel = User.withId(payload.id);
|
const userModel = User.withId(payload.id);
|
||||||
|
|
||||||
@@ -208,6 +233,18 @@ export default class extends Model {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case ActionTypes.USER_USERNAME_UPDATE_ERROR_CLEAR: {
|
||||||
|
const userModel = User.withId(payload.id);
|
||||||
|
|
||||||
|
userModel.update({
|
||||||
|
usernameUpdateForm: {
|
||||||
|
...userModel.usernameUpdateForm,
|
||||||
|
error: null,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
case ActionTypes.USER_AVATAR_UPDATE:
|
case ActionTypes.USER_AVATAR_UPDATE:
|
||||||
User.withId(payload.id).update({
|
User.withId(payload.id).update({
|
||||||
isAvatarUpdating: true,
|
isAvatarUpdating: true,
|
||||||
|
|||||||
@@ -1,19 +1,12 @@
|
|||||||
import { getAccessToken } from '../utils/access-token-storage';
|
|
||||||
import ActionTypes from '../constants/ActionTypes';
|
import ActionTypes from '../constants/ActionTypes';
|
||||||
|
|
||||||
const initialState = {
|
const initialState = {
|
||||||
accessToken: getAccessToken(),
|
|
||||||
userId: null,
|
userId: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
// eslint-disable-next-line default-param-last
|
// eslint-disable-next-line default-param-last
|
||||||
export default (state = initialState, { type, payload }) => {
|
export default (state = initialState, { type, payload }) => {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ActionTypes.AUTHENTICATE__SUCCESS:
|
|
||||||
return {
|
|
||||||
...state,
|
|
||||||
accessToken: payload.accessToken,
|
|
||||||
};
|
|
||||||
case ActionTypes.SOCKET_RECONNECT_HANDLE:
|
case ActionTypes.SOCKET_RECONNECT_HANDLE:
|
||||||
case ActionTypes.CORE_INITIALIZE:
|
case ActionTypes.CORE_INITIALIZE:
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -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 { logout } from '../../actions';
|
||||||
import ErrorCodes from '../../constants/ErrorCodes';
|
import ErrorCodes from '../../constants/ErrorCodes';
|
||||||
|
|
||||||
@@ -13,12 +12,8 @@ function* queueRequest(method, ...args) {
|
|||||||
} catch {} // eslint-disable-line no-empty
|
} catch {} // eslint-disable-line no-empty
|
||||||
}
|
}
|
||||||
|
|
||||||
const accessToken = yield select(accessTokenSelector);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return yield call(method, ...args, {
|
return yield call(method, ...args);
|
||||||
Authorization: `Bearer ${accessToken}`,
|
|
||||||
});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.code === ErrorCodes.UNAUTHORIZED) {
|
if (error.code === ErrorCodes.UNAUTHORIZED) {
|
||||||
yield put(logout()); // TODO: next url
|
yield put(logout()); // TODO: next url
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export function* initializeCoreService() {
|
|||||||
notifications,
|
notifications,
|
||||||
} = yield call(fetchCoreRequest); // TODO: handle error
|
} = yield call(fetchCoreRequest); // TODO: handle error
|
||||||
|
|
||||||
yield call(i18n.loadCoreLocale, i18n.resolvedLanguage);
|
yield call(i18n.loadCoreLocale);
|
||||||
|
|
||||||
yield put(
|
yield put(
|
||||||
initializeCore(
|
initializeCore(
|
||||||
|
|||||||
@@ -8,8 +8,16 @@ import {
|
|||||||
clearCurrentUserPasswordUpdateErrorService,
|
clearCurrentUserPasswordUpdateErrorService,
|
||||||
clearCurrentUserUsernameUpdateErrorService,
|
clearCurrentUserUsernameUpdateErrorService,
|
||||||
clearUserCreateErrorService,
|
clearUserCreateErrorService,
|
||||||
|
clearUserEmailUpdateErrorService,
|
||||||
|
clearUserPasswordUpdateErrorService,
|
||||||
|
clearUserUsernameUpdateErrorService,
|
||||||
createUserService,
|
createUserService,
|
||||||
deleteUserService,
|
deleteUserService,
|
||||||
|
handleUserCreateService,
|
||||||
|
handleUserDeleteService,
|
||||||
|
handleUserFromCardRemoveService,
|
||||||
|
handleUserToCardAddService,
|
||||||
|
handleUserUpdateService,
|
||||||
removeUserFromCardService,
|
removeUserFromCardService,
|
||||||
removeUserFromCurrentCardService,
|
removeUserFromCurrentCardService,
|
||||||
removeUserFromFilterInCurrentBoardService,
|
removeUserFromFilterInCurrentBoardService,
|
||||||
@@ -19,11 +27,9 @@ import {
|
|||||||
updateCurrentUserPasswordService,
|
updateCurrentUserPasswordService,
|
||||||
updateCurrentUserService,
|
updateCurrentUserService,
|
||||||
updateCurrentUserUsernameService,
|
updateCurrentUserUsernameService,
|
||||||
handleUserCreateService,
|
updateUserEmailService,
|
||||||
handleUserUpdateService,
|
updateUserPasswordService,
|
||||||
handleUserDeleteService,
|
updateUserUsernameService,
|
||||||
handleUserToCardAddService,
|
|
||||||
handleUserFromCardRemoveService,
|
|
||||||
} from '../services';
|
} from '../services';
|
||||||
import EntryActionTypes from '../../../constants/EntryActionTypes';
|
import EntryActionTypes from '../../../constants/EntryActionTypes';
|
||||||
|
|
||||||
@@ -43,21 +49,39 @@ export default function* userWatchers() {
|
|||||||
takeEvery(EntryActionTypes.USER_UPDATE_HANDLE, ({ payload: { user } }) =>
|
takeEvery(EntryActionTypes.USER_UPDATE_HANDLE, ({ payload: { user } }) =>
|
||||||
handleUserUpdateService(user),
|
handleUserUpdateService(user),
|
||||||
),
|
),
|
||||||
|
takeEvery(EntryActionTypes.USER_EMAIL_UPDATE, ({ payload: { id, data } }) =>
|
||||||
|
updateUserEmailService(id, data),
|
||||||
|
),
|
||||||
takeEvery(EntryActionTypes.CURRENT_USER_EMAIL_UPDATE, ({ payload: { data } }) =>
|
takeEvery(EntryActionTypes.CURRENT_USER_EMAIL_UPDATE, ({ payload: { data } }) =>
|
||||||
updateCurrentUserEmailService(data),
|
updateCurrentUserEmailService(data),
|
||||||
),
|
),
|
||||||
|
takeEvery(EntryActionTypes.USER_EMAIL_UPDATE_ERROR_CLEAR, ({ payload: { id } }) =>
|
||||||
|
clearUserEmailUpdateErrorService(id),
|
||||||
|
),
|
||||||
takeEvery(EntryActionTypes.CURRENT_USER_EMAIL_UPDATE_ERROR_CLEAR, () =>
|
takeEvery(EntryActionTypes.CURRENT_USER_EMAIL_UPDATE_ERROR_CLEAR, () =>
|
||||||
clearCurrentUserEmailUpdateErrorService(),
|
clearCurrentUserEmailUpdateErrorService(),
|
||||||
),
|
),
|
||||||
|
takeEvery(EntryActionTypes.USER_PASSWORD_UPDATE, ({ payload: { id, data } }) =>
|
||||||
|
updateUserPasswordService(id, data),
|
||||||
|
),
|
||||||
takeEvery(EntryActionTypes.CURRENT_USER_PASSWORD_UPDATE, ({ payload: { data } }) =>
|
takeEvery(EntryActionTypes.CURRENT_USER_PASSWORD_UPDATE, ({ payload: { data } }) =>
|
||||||
updateCurrentUserPasswordService(data),
|
updateCurrentUserPasswordService(data),
|
||||||
),
|
),
|
||||||
|
takeEvery(EntryActionTypes.USER_PASSWORD_UPDATE_ERROR_CLEAR, ({ payload: { id } }) =>
|
||||||
|
clearUserPasswordUpdateErrorService(id),
|
||||||
|
),
|
||||||
takeEvery(EntryActionTypes.CURRENT_USER_PASSWORD_UPDATE_ERROR_CLEAR, () =>
|
takeEvery(EntryActionTypes.CURRENT_USER_PASSWORD_UPDATE_ERROR_CLEAR, () =>
|
||||||
clearCurrentUserPasswordUpdateErrorService(),
|
clearCurrentUserPasswordUpdateErrorService(),
|
||||||
),
|
),
|
||||||
|
takeEvery(EntryActionTypes.USER_USERNAME_UPDATE, ({ payload: { id, data } }) =>
|
||||||
|
updateUserUsernameService(id, data),
|
||||||
|
),
|
||||||
takeEvery(EntryActionTypes.CURRENT_USER_USERNAME_UPDATE, ({ payload: { data } }) =>
|
takeEvery(EntryActionTypes.CURRENT_USER_USERNAME_UPDATE, ({ payload: { data } }) =>
|
||||||
updateCurrentUserUsernameService(data),
|
updateCurrentUserUsernameService(data),
|
||||||
),
|
),
|
||||||
|
takeEvery(EntryActionTypes.USER_USERNAME_UPDATE_ERROR_CLEAR, ({ payload: { id } }) =>
|
||||||
|
clearUserUsernameUpdateErrorService(id),
|
||||||
|
),
|
||||||
takeEvery(EntryActionTypes.CURRENT_USER_USERNAME_UPDATE_ERROR_CLEAR, () =>
|
takeEvery(EntryActionTypes.CURRENT_USER_USERNAME_UPDATE_ERROR_CLEAR, () =>
|
||||||
clearCurrentUserUsernameUpdateErrorService(),
|
clearCurrentUserUsernameUpdateErrorService(),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { call, select } from 'redux-saga/effects';
|
import { call } from 'redux-saga/effects';
|
||||||
|
|
||||||
import loginSaga from './login';
|
import loginSaga from './login';
|
||||||
import coreSaga from './core';
|
import coreSaga from './core';
|
||||||
import { accessTokenSelector } from '../selectors';
|
import { getAccessToken } from '../utils/access-token-storage';
|
||||||
|
|
||||||
export default function* rootSaga() {
|
export default function* rootSaga() {
|
||||||
const accessToken = yield select(accessTokenSelector);
|
const accessToken = yield call(getAccessToken);
|
||||||
|
|
||||||
if (!accessToken) {
|
if (!accessToken) {
|
||||||
yield call(loginSaga);
|
yield call(loginSaga);
|
||||||
|
|||||||
@@ -101,6 +101,10 @@
|
|||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pswp .pswp__img--placeholder {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#root {
|
#root {
|
||||||
|
|||||||
@@ -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) => {
|
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 = () => {
|
export const removeAccessToken = () => {
|
||||||
localStorage.removeItem(ACCESS_TOKEN_KEY);
|
Cookies.remove(Config.ACCESS_TOKEN_KEY);
|
||||||
};
|
};
|
||||||
|
|||||||
+2
-2
@@ -2,7 +2,7 @@ version: '3'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
planka:
|
planka:
|
||||||
image: meltyshev/planka:latest
|
image: ghcr.io/plankanban/planka:latest
|
||||||
command: >
|
command: >
|
||||||
bash -c
|
bash -c
|
||||||
"for i in `seq 1 30`; do
|
"for i in `seq 1 30`; do
|
||||||
@@ -15,7 +15,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- user-avatars:/app/public/user-avatars
|
- user-avatars:/app/public/user-avatars
|
||||||
- project-background-images:/app/public/project-background-images
|
- project-background-images:/app/public/project-background-images
|
||||||
- attachments:/app/public/attachments
|
- attachments:/app/private/attachments
|
||||||
ports:
|
ports:
|
||||||
- 3000:1337
|
- 3000:1337
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "planka",
|
"name": "planka",
|
||||||
"version": "0.1.0",
|
"version": "1.2.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "planka",
|
"name": "planka",
|
||||||
"version": "0.1.0",
|
"version": "1.2.1",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
+4
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "planka",
|
"name": "planka",
|
||||||
"version": "1.0.0",
|
"version": "1.3.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": "https://plankanban.github.io/planka",
|
"homepage": "https://plankanban.github.io/planka",
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -14,9 +14,11 @@
|
|||||||
"client:lint": "npm run lint --prefix client",
|
"client:lint": "npm run lint --prefix client",
|
||||||
"client:start": "npm start --prefix client",
|
"client:start": "npm start --prefix client",
|
||||||
"client:test": "npm test --prefix client",
|
"client:test": "npm test --prefix client",
|
||||||
|
"docker:build": "docker build -t ghcr.io/plankanban/planka:local -f Dockerfile .",
|
||||||
|
"docker:build:base": "docker build -t ghcr.io/plankanban/planka:base-local -f Dockerfile.base .",
|
||||||
"postinstall": "npm i --prefix server && npm i --prefix client",
|
"postinstall": "npm i --prefix server && npm i --prefix client",
|
||||||
"prepare": "husky install",
|
|
||||||
"lint": "npm run server:lint && npm run client:lint",
|
"lint": "npm run server:lint && npm run client:lint",
|
||||||
|
"prepare": "husky install",
|
||||||
"server:console": "npm run console --prefix server",
|
"server:console": "npm run console --prefix server",
|
||||||
"server:db:init": "npm run db:init --prefix server",
|
"server:db:init": "npm run db:init --prefix server",
|
||||||
"server:db:migrate": "npm run db:migrate --prefix server",
|
"server:db:migrate": "npm run db:migrate --prefix server",
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user