Compare commits
104 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e14dfb15f | ||
|
|
84fe5bd9ef | ||
|
|
8cebc35573 | ||
|
|
37b88d0afc | ||
|
|
647bcd3167 | ||
|
|
30629aaacc | ||
|
|
0fbda02b80 | ||
|
|
4763a0621c | ||
|
|
fc7eda5706 | ||
|
|
2fdf50620e | ||
|
|
f20a91553f | ||
|
|
8283aa67f0 | ||
|
|
ababa900bb | ||
|
|
e147b43eb9 | ||
|
|
65675cdbde | ||
|
|
d32e942908 | ||
|
|
32a65e856c | ||
|
|
01522e69ea | ||
|
|
49d356f04f | ||
|
|
04e5310643 | ||
|
|
a293467b59 | ||
|
|
c2546206a3 | ||
|
|
9c406a34c5 | ||
|
|
360b4f57f5 | ||
|
|
460d06fe10 | ||
|
|
b3b2ee1966 | ||
|
|
7092dc06ab | ||
|
|
c47829a3d9 | ||
|
|
54479eee20 | ||
|
|
cdd788a6b8 | ||
|
|
f5242cd10c | ||
|
|
f0299486d6 | ||
|
|
38921cade8 | ||
|
|
8a3e679c33 | ||
|
|
d1b81e697f | ||
|
|
215fcf61bc | ||
|
|
e418373503 | ||
|
|
ca22b0ad2c | ||
|
|
e4cbc694d4 | ||
|
|
f53e51fc4e | ||
|
|
dcbbb22dda | ||
|
|
e85042e1b4 | ||
|
|
a720669354 | ||
|
|
216b9445d3 | ||
|
|
b21faa8501 | ||
|
|
1bc28c68a5 | ||
|
|
f78f8bfd7f | ||
|
|
01bddf029e | ||
|
|
bdead3cdd5 | ||
|
|
88d164b411 | ||
|
|
1638c3d350 | ||
|
|
454d515192 | ||
|
|
e60219c9df | ||
|
|
5c8c73f2ac | ||
|
|
fad63ac6f5 | ||
|
|
31eb8d6698 | ||
|
|
40967a4ee6 | ||
|
|
bfe9b05d69 | ||
|
|
82e3400162 | ||
|
|
a886b4ee78 | ||
|
|
618fb50618 | ||
|
|
f7aae7912d | ||
|
|
2976604b7b | ||
|
|
bbe482586b | ||
|
|
ff61238487 | ||
|
|
9e2dcb686f | ||
|
|
fcc96ca98d | ||
|
|
a43cee8a5d | ||
|
|
f4ccc506af | ||
|
|
fee49f3699 | ||
|
|
d43c7a48cc | ||
|
|
c0fad295b5 | ||
|
|
cb1314f067 | ||
|
|
ba68e4c2f7 | ||
|
|
bd8fd6a66b | ||
|
|
0eba8d0840 | ||
|
|
8fc95dc40d | ||
|
|
ecd3e25588 | ||
|
|
914f912612 | ||
|
|
e68f723095 | ||
|
|
5f71be2e7f | ||
|
|
bc2a72f035 | ||
|
|
cf4be82827 | ||
|
|
23580705aa | ||
|
|
65c8c394a8 | ||
|
|
422788a6a3 | ||
|
|
2d5e29de5d | ||
|
|
2a307b92a7 | ||
|
|
2d8dbc70ad | ||
|
|
cfee259b38 | ||
|
|
f94cdb3ebb | ||
|
|
1ed50fdca6 | ||
|
|
56e460004f | ||
|
|
a95f78d188 | ||
|
|
df09a9a7b2 | ||
|
|
990ee2aef9 | ||
|
|
486ecd12db | ||
|
|
c9cdd7bb11 | ||
|
|
2c753fd084 | ||
|
|
79d2d2f3f5 | ||
|
|
24d9b55bfc | ||
|
|
28cd9fcf77 | ||
|
|
d8a36f0602 | ||
|
|
de06033dcd |
@@ -1,8 +1,8 @@
|
||||
module.exports = {
|
||||
extends: [
|
||||
'@nextcloud',
|
||||
'@nextcloud'
|
||||
],
|
||||
rules: {
|
||||
'valid-jsdoc': ['off'],
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
4
.github/workflows/appbuild.yml
vendored
4
.github/workflows/appbuild.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x]
|
||||
node-version: [12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
@@ -17,8 +17,6 @@ jobs:
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Set up npm7
|
||||
run: npm i -g npm@7
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v1
|
||||
with:
|
||||
|
||||
2
.github/workflows/integration.yml
vendored
2
.github/workflows/integration.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
matrix:
|
||||
php-versions: ['7.4']
|
||||
databases: ['sqlite', 'mysql', 'pgsql']
|
||||
server-versions: ['stable22']
|
||||
server-versions: ['stable21']
|
||||
|
||||
name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
|
||||
|
||||
|
||||
9
.github/workflows/lint.yml
vendored
9
.github/workflows/lint.yml
vendored
@@ -47,7 +47,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x]
|
||||
node-version: [12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -55,8 +55,6 @@ jobs:
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Set up npm7
|
||||
run: npm i -g npm@7
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: ESLint
|
||||
@@ -67,7 +65,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-versions: [14.x]
|
||||
node-versions: [12.x]
|
||||
|
||||
name: stylelint node${{ matrix.node-versions }}
|
||||
steps:
|
||||
@@ -78,9 +76,6 @@ jobs:
|
||||
with:
|
||||
node-versions: ${{ matrix.node-versions }}
|
||||
|
||||
- name: Set up npm7
|
||||
run: npm i -g npm@7
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
|
||||
4
.github/workflows/nightly.yml
vendored
4
.github/workflows/nightly.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x]
|
||||
node-version: [12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
@@ -22,8 +22,6 @@ jobs:
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Set up npm7
|
||||
run: npm i -g npm@7
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v1
|
||||
with:
|
||||
|
||||
4
.github/workflows/nodejs.yml
vendored
4
.github/workflows/nodejs.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x]
|
||||
node-version: [12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
@@ -17,8 +17,6 @@ jobs:
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Set up npm7
|
||||
run: npm i -g npm@7
|
||||
- name: install dependencies
|
||||
run: |
|
||||
npm ci
|
||||
|
||||
2
.github/workflows/phpunit.yml
vendored
2
.github/workflows/phpunit.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
matrix:
|
||||
php-versions: ['7.3', '7.4']
|
||||
databases: ['sqlite', 'mysql', 'pgsql']
|
||||
server-versions: ['stable22']
|
||||
server-versions: ['stable21']
|
||||
|
||||
name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
|
||||
|
||||
|
||||
2
.github/workflows/static-analysis.yml
vendored
2
.github/workflows/static-analysis.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
ocp-version: [ 'dev-stable22' ]
|
||||
ocp-version: [ 'dev-stable21' ]
|
||||
name: Nextcloud ${{ matrix.ocp-version }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
||||
142
CHANGELOG.md
142
CHANGELOG.md
@@ -1,92 +1,80 @@
|
||||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## 1.5.6
|
||||
## 1.4.8
|
||||
|
||||
### Fixed
|
||||
|
||||
- Allow to download an attachment without navigating to the files app [#3441](https://api.github.com/repos/nextcloud/deck/pulls/3441)
|
||||
- Fix CalDAV blocking and modernize circles API usage [#3527](https://api.github.com/repos/nextcloud/deck/pulls/3527)
|
||||
- CardApiController: Fix order of optional parameters [#3521](https://api.github.com/repos/nextcloud/deck/pulls/3521)
|
||||
- Fix cursor generation if no results are found [#3460](https://api.github.com/repos/nextcloud/deck/pulls/3460)
|
||||
- Exclude deleted boards in the selection for target [#3524](https://api.github.com/repos/nextcloud/deck/pulls/3524)
|
||||
- Generate fixed link for activity emails [#3627](https://api.github.com/repos/nextcloud/deck/pulls/3627)
|
||||
- Make insert attachment buttom easy to click [#3615](https://api.github.com/repos/nextcloud/deck/pulls/3615)
|
||||
- Fix confusion between stackId and boardId in StackService [#3544](https://api.github.com/repos/nextcloud/deck/pulls/3544)
|
||||
- Fix cursor generation if no results are found [#3461](https://api.github.com/repos/nextcloud/deck/pulls/3461)
|
||||
- Allow to download an attachment without navigating to the files app [#3442](https://api.github.com/repos/nextcloud/deck/pulls/3442)
|
||||
- Exclude deleted boards in the selection for target [#3525](https://api.github.com/repos/nextcloud/deck/pulls/3525)
|
||||
- Make insert attachment buttom easy to click [#3616](https://api.github.com/repos/nextcloud/deck/pulls/3616)
|
||||
- Fix confusion between stackId and boardId in StackService [#3545](https://api.github.com/repos/nextcloud/deck/pulls/3545)
|
||||
|
||||
## 1.5.5
|
||||
## 1.4.7
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix release asset build
|
||||
|
||||
## 1.5.4
|
||||
## 1.4.6
|
||||
|
||||
### Fixed
|
||||
|
||||
- #3378 Fix menu button position in card modal
|
||||
- #3392 Use displayname instead of uid for mentions (reopened against master)
|
||||
- #3361 Improve combined search @eneiluj
|
||||
- #3381 Extend drag-and-drop zone in card sidebar @Artem4590
|
||||
- #3366 Fix optional parameter order
|
||||
- #3407 Keep exceptions http response generic
|
||||
- #3379 Fix menu button position in card modal
|
||||
- #3360 Improve combined search @eneiluj
|
||||
- #3367 Fix optional parameter order
|
||||
- #3393 Use displayname instead of uid for mentions
|
||||
- #3359 Rich object string parameters for notifications @juliushaertl
|
||||
- #3385 Extend drag-and-drop zone in card sidebar @Artem4590
|
||||
- #3408 Keep exceptions http response generic
|
||||
|
||||
|
||||
## 1.5.3
|
||||
|
||||
### Fied
|
||||
|
||||
- #3317 Additional check for stacks
|
||||
|
||||
|
||||
## 1.5.2
|
||||
## 1.4.5
|
||||
|
||||
### Fixed
|
||||
|
||||
- #3300 Fix print style issues
|
||||
- #3303 Delete file shares through attachments API
|
||||
- #3306 Return false instead of throwing when getting calendar setting
|
||||
- #3318 Additional check for stacks
|
||||
|
||||
## 1.5.1 - 2021-09-03
|
||||
|
||||
## 1.4.4
|
||||
|
||||
### Fixed
|
||||
|
||||
- #3224 Move circle checks to a unified service and improve member checks
|
||||
- #3231 Check for null value to avoid TypeError in the group manager
|
||||
- #3264 Defer obtaining the user session in the config service
|
||||
- #3301 Fix print style issues
|
||||
- #3307 Return false instead of throwing when getting calendar setting
|
||||
- #3227 Additional circle level check
|
||||
- #3304 Delete file shares through attachments API
|
||||
|
||||
|
||||
## 1.5.0 - 2021-07-09
|
||||
|
||||
### Added
|
||||
|
||||
* Nextcloud 22 compatibility
|
||||
* [#3105](https://github.com/nextcloud/deck/pull/3105) Compatibility with Cirlces changes in 22
|
||||
* [#3147](https://github.com/nextcloud/deck/pull/3147) Add card button to the dashboard widget @jakobroehrl
|
||||
* [#2854](https://github.com/nextcloud/deck/pull/2854) Add card button in card overview @jakobroehrl
|
||||
* [#3078](https://github.com/nextcloud/deck/pull/3078) Show on shared boards unassigned cards to all users @jakobroehrl
|
||||
## 1.4.3 - 2021-07-09
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#2935](https://github.com/nextcloud/deck/pull/2935) Rich object string parameters for notifications @nickvergessen
|
||||
* [#2950](https://github.com/nextcloud/deck/pull/2950) Remove notification on unshare and add type hints
|
||||
* [#2983](https://github.com/nextcloud/deck/pull/2983) Fix codemirror description width
|
||||
* [#2989](https://github.com/nextcloud/deck/pull/2989) Fix unified comments search with postgres
|
||||
* [#3005](https://github.com/nextcloud/deck/pull/3005) Do not query the lookupserver when looking for sharees
|
||||
* [#3011](https://github.com/nextcloud/deck/pull/3011) L10n: Spelling unification @Valdnet
|
||||
* [#3014](https://github.com/nextcloud/deck/pull/3014) Proper error handling when fetching comments fails
|
||||
* [#3016](https://github.com/nextcloud/deck/pull/3016) Allow searching for filters without a query to match all that have a given filter set
|
||||
* [#3021](https://github.com/nextcloud/deck/pull/3021) L10n: Add word "Card" @Valdnet
|
||||
* [#3025](https://github.com/nextcloud/deck/pull/3025) Show comment counter and highlight if unread comments are available
|
||||
* [#3036](https://github.com/nextcloud/deck/pull/3036) Add link to migration tool for Trello @maxammann
|
||||
* [#3037](https://github.com/nextcloud/deck/pull/3037) Catch any error during circle detail fetching
|
||||
* [#3038](https://github.com/nextcloud/deck/pull/3038) Get attachment from the user node instead of the share source
|
||||
* [#3092](https://github.com/nextcloud/deck/pull/3092) Refactor update to have proper order of optional parameters
|
||||
* [#3113](https://github.com/nextcloud/deck/pull/3113) Use new viewer syntax with destructuring object @azul
|
||||
* [#3142](https://github.com/nextcloud/deck/pull/3142) Always pass user id in share provider
|
||||
* [#3152](https://github.com/nextcloud/deck/pull/3152) Only offer stack creation in emptycontent with proper permissions
|
||||
* [#3165](https://github.com/nextcloud/deck/pull/3165) Always log generic exceptions
|
||||
* [#3168](https://github.com/nextcloud/deck/pull/3168) Reduce duplicate queries when fetching user boards an permissions
|
||||
* [#3143](https://github.com/nextcloud/deck/pull/3143) Always pass user id in share provider
|
||||
* [#3153](https://github.com/nextcloud/deck/pull/3153) Only offer stack creation in emptycontent with proper permissions
|
||||
* [#3164](https://github.com/nextcloud/deck/pull/3164) Always log generic exceptions
|
||||
* [#3169](https://github.com/nextcloud/deck/pull/3169) Reduce duplicate queries when fetching user boards an permissions
|
||||
|
||||
|
||||
## 1.4.2 - 2021-05-03
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#3030](https://github.com/nextcloud/deck/pull/3030) Proper error handling when fetching comments fails
|
||||
* [#3031](https://github.com/nextcloud/deck/pull/3031) Allow searching for filters without a query to match all that have a given filter set
|
||||
* [#3039](https://github.com/nextcloud/deck/pull/3039) Catch any error during circle detail fetching
|
||||
* [#3040](https://github.com/nextcloud/deck/pull/3040) Get attachment from the user node instead of the share source
|
||||
|
||||
## 1.4.1 - 2021-04-20
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#2984](https://github.com/nextcloud/deck/pull/2984) Fix codemirror description width
|
||||
* [#2990](https://github.com/nextcloud/deck/pull/2990) Fix unified comments search with postgres
|
||||
* [#2994](https://github.com/nextcloud/deck/pull/2994) Remove notification on unshare and add type hints
|
||||
* [#3006](https://github.com/nextcloud/deck/pull/3006) Only import debounce
|
||||
* [#3008](https://github.com/nextcloud/deck/pull/3008) Do not query the lookupserver when looking for sharees
|
||||
|
||||
|
||||
## 1.4.0 - 2021-04-13
|
||||
|
||||
@@ -122,15 +110,15 @@ All notable changes to this project will be documented in this file.
|
||||
## 1.3.0-beta2
|
||||
|
||||
### Fixed
|
||||
* [#2700](https://github.com/nextcloud/deck/pull/2700) Attempt to copy file on dropping it to deck
|
||||
* [#2701](https://github.com/nextcloud/deck/pull/2701) Fix uploading files by drag and drop
|
||||
* [#2700](https://github.com/nextcloud/deck/pull/2700) Attempt to copy file on dropping it to deck @juliushaertl
|
||||
* [#2701](https://github.com/nextcloud/deck/pull/2701) Fix uploading files by drag and drop @juliushaertl
|
||||
* [#2707](https://github.com/nextcloud/deck/pull/2707) L10n: Change to a capital letter @Valdnet
|
||||
* [#2712](https://github.com/nextcloud/deck/pull/2712) Docs: Fix table in section "GET /api/v1.0/config" @das-g
|
||||
* [#2716](https://github.com/nextcloud/deck/pull/2716) Remove repair step which is no longer needed as we cleanup properly
|
||||
* [#2716](https://github.com/nextcloud/deck/pull/2716) Remove repair step which is no longer needed as we cleanup properly @juliushaertl
|
||||
* [#2723](https://github.com/nextcloud/deck/pull/2723) Pad random color with leading zeroes @PVince81
|
||||
* [#2729](https://github.com/nextcloud/deck/pull/2729) Remove invalid activity parameters @nickvergessen
|
||||
* [#2750](https://github.com/nextcloud/deck/pull/2750) Fix deck activity emails not being translated @nickvergessen
|
||||
* [#2751](https://github.com/nextcloud/deck/pull/2751) Properly set author for activity events that are triggered by cron
|
||||
* [#2751](https://github.com/nextcloud/deck/pull/2751) Properly set author for activity events that are triggered by cron @juliushaertl
|
||||
|
||||
|
||||
## 1.2.2 - 2020-11-24
|
||||
@@ -239,31 +227,31 @@ All notable changes to this project will be documented in this file.
|
||||
### Fixed
|
||||
|
||||
|
||||
* [#2116](https://github.com/nextcloud/deck/pull/2116) Fix navigation layout issues
|
||||
* [#2118](https://github.com/nextcloud/deck/pull/2118) Use proper parameter when handling attachments
|
||||
* [#2116](https://github.com/nextcloud/deck/pull/2116) Fix navigation layout issues @juliushaertl
|
||||
* [#2118](https://github.com/nextcloud/deck/pull/2118) Use proper parameter when handling attachments @juliushaertl
|
||||
|
||||
## 1.0.4 - 2020-06-26
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#2062](https://github.com/nextcloud/deck/pull/2062) Fix saving card description after toggling checkboxes
|
||||
* [#2062](https://github.com/nextcloud/deck/pull/2062) Fix saving card description after toggling checkboxes @juliushaertl
|
||||
* [#2065](https://github.com/nextcloud/deck/pull/2065) Adding CSS rule for Markdown Blockquotes @reox
|
||||
* [#2059](https://github.com/nextcloud/deck/pull/2059) Fix fetching attachments on card change
|
||||
* [#2060](https://github.com/nextcloud/deck/pull/2060) Use mixing for relative date in card sidebar
|
||||
* [#2059](https://github.com/nextcloud/deck/pull/2059) Fix fetching attachments on card change @juliushaertl
|
||||
* [#2060](https://github.com/nextcloud/deck/pull/2060) Use mixing for relative date in card sidebar @juliushaertl
|
||||
|
||||
|
||||
## 1.0.3 - 2020-06-19
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#2019](https://github.com/nextcloud/deck/pull/2019) Remove old global css rule
|
||||
* [#2020](https://github.com/nextcloud/deck/pull/2020) Fix navigation issue with leftover nodes
|
||||
* [#2021](https://github.com/nextcloud/deck/pull/2021) Fix description issues
|
||||
* [#2022](https://github.com/nextcloud/deck/pull/2022) Fix replyto issues with the comments API
|
||||
* [#2027](https://github.com/nextcloud/deck/pull/2027) Allow to unassign current user from card
|
||||
* [#2019](https://github.com/nextcloud/deck/pull/2019) Remove old global css rule @juliushaertl
|
||||
* [#2020](https://github.com/nextcloud/deck/pull/2020) Fix navigation issue with leftover nodes @juliushaertl
|
||||
* [#2021](https://github.com/nextcloud/deck/pull/2021) Fix description issues @juliushaertl
|
||||
* [#2022](https://github.com/nextcloud/deck/pull/2022) Fix replyto issues with the comments API @juliushaertl
|
||||
* [#2027](https://github.com/nextcloud/deck/pull/2027) Allow to unassign current user from card @juliushaertl
|
||||
* [#2029](https://github.com/nextcloud/deck/pull/2029) Fix wording : stack -> list @cloud2018
|
||||
* [#2032](https://github.com/nextcloud/deck/pull/2032) Force order by id as second sorting key
|
||||
* [#2045](https://github.com/nextcloud/deck/pull/2045) Improve label styling
|
||||
* [#2032](https://github.com/nextcloud/deck/pull/2032) Force order by id as second sorting key @juliushaertl
|
||||
* [#2045](https://github.com/nextcloud/deck/pull/2045) Improve label styling @juliushaertl
|
||||
* [#2010](https://github.com/nextcloud/deck/pull/2010) User documentation fixes @Nyco
|
||||
* [#1998](https://github.com/nextcloud/deck/pull/1998) Add Checklist explaination to the doc @4rnoP
|
||||
|
||||
|
||||
@@ -15,16 +15,11 @@ Deck is a kanban style organization tool aimed at personal planning and project
|
||||
- Keep track of changes in the activity stream
|
||||
- Get your project organized
|
||||
|
||||

|
||||
|
||||
### Mobile apps
|
||||
|
||||
- [Nextcloud Deck app for Android](https://github.com/stefan-niedermann/nextcloud-deck) - It is available in [F-Droid](https://f-droid.org/de/packages/it.niedermann.nextcloud.deck/) and the [Google Play Store](https://play.google.com/store/apps/details?id=it.niedermann.nextcloud.deck.play)
|
||||
- The [Nextcloud Deck app for Android](https://github.com/stefan-niedermann/nextcloud-deck) is available in the [Google Play Store](https://play.google.com/store/apps/details?id=it.niedermann.nextcloud.deck.play)
|
||||
|
||||
### 3rd-Party Integrations
|
||||
|
||||
- [trello-to-deck](https://github.com/maxammann/trello-to-deck) - Migrates cards from Trello
|
||||
- [mail2deck](https://github.com/newroco/mail2deck) - Provides an "email in" solution
|
||||

|
||||
|
||||
## Installation/Update
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
- 🚀 Get your project organized
|
||||
|
||||
</description>
|
||||
<version>1.5.6</version>
|
||||
<version>1.4.8</version>
|
||||
<licence>agpl</licence>
|
||||
<author>Julius Härtl</author>
|
||||
<namespace>Deck</namespace>
|
||||
@@ -35,7 +35,7 @@
|
||||
<database min-version="9.4">pgsql</database>
|
||||
<database>sqlite</database>
|
||||
<database min-version="5.5">mysql</database>
|
||||
<nextcloud min-version="22" max-version="22"/>
|
||||
<nextcloud min-version="21" max-version="21"/>
|
||||
</dependencies>
|
||||
<background-jobs>
|
||||
<job>OCA\Deck\Cron\DeleteCron</job>
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
return [
|
||||
'routes' => [
|
||||
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
|
||||
['name' => 'page#redirectToCard', 'url' => '/card/{cardId}', 'verb' => 'GET'],
|
||||
|
||||
// boards
|
||||
['name' => 'board#index', 'url' => '/boards', 'verb' => 'GET'],
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
const babelConfig = require('@nextcloud/babel-config')
|
||||
|
||||
module.exports = babelConfig
|
||||
module.exports = {
|
||||
plugins: ['@babel/plugin-syntax-dynamic-import'],
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
modules: false
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"require-dev": {
|
||||
"roave/security-advisories": "dev-master",
|
||||
"christophwurst/nextcloud": "^21@dev",
|
||||
"phpunit/phpunit": "^9",
|
||||
"phpunit/phpunit": "^8",
|
||||
"nextcloud/coding-standard": "^0.5.0",
|
||||
"symfony/event-dispatcher": "^4.0",
|
||||
"vimeo/psalm": "^4.3",
|
||||
|
||||
1001
composer.lock
generated
1001
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -35,7 +35,6 @@ use OCP\IConfig;
|
||||
use OCP\IURLGenerator;
|
||||
use OCP\IUserManager;
|
||||
use OCP\L10N\IFactory;
|
||||
use OCA\Deck\Service\CardService;
|
||||
|
||||
class DeckProvider implements IProvider {
|
||||
|
||||
@@ -53,10 +52,8 @@ class DeckProvider implements IProvider {
|
||||
private $l10nFactory;
|
||||
/** @var IConfig */
|
||||
private $config;
|
||||
/** @var CardService */
|
||||
private $cardService;
|
||||
|
||||
public function __construct(IURLGenerator $urlGenerator, ActivityManager $activityManager, IUserManager $userManager, ICommentsManager $commentsManager, IFactory $l10n, IConfig $config, $userId, CardService $cardService) {
|
||||
public function __construct(IURLGenerator $urlGenerator, ActivityManager $activityManager, IUserManager $userManager, ICommentsManager $commentsManager, IFactory $l10n, IConfig $config, $userId) {
|
||||
$this->userId = $userId;
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
$this->activityManager = $activityManager;
|
||||
@@ -64,7 +61,6 @@ class DeckProvider implements IProvider {
|
||||
$this->userManager = $userManager;
|
||||
$this->l10nFactory = $l10n;
|
||||
$this->config = $config;
|
||||
$this->cardService = $cardService;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -135,7 +131,7 @@ class DeckProvider implements IProvider {
|
||||
|
||||
if (array_key_exists('board', $subjectParams)) {
|
||||
$archivedParam = $subjectParams['card']['archived'] ? 'archived/' : '';
|
||||
$card['link'] = $this->cardService->getRedirectUrlForCard($event->getObjectId());
|
||||
$card['link'] = $this->deckUrl('/board/' . $subjectParams['board']['id'] . '/' . $archivedParam . 'card/' . $event->getObjectId());
|
||||
}
|
||||
$params['card'] = $card;
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ class Application extends App implements IBootstrap {
|
||||
// Talk integration has its own entrypoint which already includes collections handling
|
||||
return;
|
||||
}
|
||||
Util::addScript('deck', 'deck-collections');
|
||||
Util::addScript('deck', 'collections');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,8 +94,8 @@ class CardApiController extends ApiController {
|
||||
*
|
||||
* Update a card
|
||||
*/
|
||||
public function update($title, $type, $owner, $description = '', $order = 0, $duedate = null, $archived = null) {
|
||||
$card = $this->cardService->update($this->request->getParam('cardId'), $title, $this->request->getParam('stackId'), $type, $owner, $description, $order, $duedate, 0, $archived);
|
||||
public function update($title, $type, $order = 0, $description = '', $owner, $duedate = null, $archived = null) {
|
||||
$card = $this->cardService->update($this->request->getParam('cardId'), $title, $this->request->getParam('stackId'), $type, $order, $description, $owner, $duedate, 0, $archived);
|
||||
return new DataResponse($card, HTTP::STATUS_OK);
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ class CardController extends Controller {
|
||||
* @return \OCP\AppFramework\Db\Entity
|
||||
*/
|
||||
public function update($id, $title, $stackId, $type, $order, $description, $duedate, $deletedAt) {
|
||||
return $this->cardService->update($id, $title, $stackId, $type, $this->userId, $description, $order, $duedate, $deletedAt);
|
||||
return $this->cardService->update($id, $title, $stackId, $type, $order, $description, $this->userId, $duedate, $deletedAt);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -34,20 +34,12 @@ use OCP\IInitialStateService;
|
||||
use OCP\IRequest;
|
||||
use OCP\AppFramework\Http\TemplateResponse;
|
||||
use OCP\AppFramework\Controller;
|
||||
use OCA\Deck\Db\CardMapper;
|
||||
use OCP\IURLGenerator;
|
||||
use \OCP\AppFramework\Http\RedirectResponse;
|
||||
use OCA\Deck\Db\Acl;
|
||||
use OCA\Deck\Service\CardService;
|
||||
|
||||
class PageController extends Controller {
|
||||
private $permissionService;
|
||||
private $initialState;
|
||||
private $configService;
|
||||
private $eventDispatcher;
|
||||
private $cardMapper;
|
||||
private $urlGenerator;
|
||||
private $cardService;
|
||||
|
||||
public function __construct(
|
||||
$AppName,
|
||||
@@ -55,10 +47,7 @@ class PageController extends Controller {
|
||||
PermissionService $permissionService,
|
||||
IInitialStateService $initialStateService,
|
||||
ConfigService $configService,
|
||||
IEventDispatcher $eventDispatcher,
|
||||
CardMapper $cardMapper,
|
||||
IURLGenerator $urlGenerator,
|
||||
CardService $cardService
|
||||
IEventDispatcher $eventDispatcher
|
||||
) {
|
||||
parent::__construct($AppName, $request);
|
||||
|
||||
@@ -66,9 +55,6 @@ class PageController extends Controller {
|
||||
$this->initialState = $initialStateService;
|
||||
$this->configService = $configService;
|
||||
$this->eventDispatcher = $eventDispatcher;
|
||||
$this->cardMapper = $cardMapper;
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
$this->cardService = $cardService;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -99,17 +85,4 @@ class PageController extends Controller {
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*/
|
||||
public function redirectToCard($cardId): RedirectResponse {
|
||||
try {
|
||||
$this->permissionService->checkPermission($this->cardMapper, $cardId, Acl::PERMISSION_READ);
|
||||
return new RedirectResponse($this->cardService->getCardUrl($cardId));
|
||||
} catch (\Exception $e) {
|
||||
return new RedirectResponse($this->urlGenerator->linkToRouteAbsolute('deck.page.index'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,6 +79,6 @@ class DeckWidget implements IWidget {
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function load(): void {
|
||||
\OCP\Util::addScript('deck', 'deck-dashboard');
|
||||
\OCP\Util::addScript('deck', 'dashboard');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,9 +44,9 @@ class AclMapper extends DeckMapper implements IPermissionMapper {
|
||||
return ($row['owner'] === $userId);
|
||||
}
|
||||
|
||||
public function findBoardId($id): ?int {
|
||||
public function findBoardId($aclId): ?int {
|
||||
try {
|
||||
$entity = $this->find($id);
|
||||
$entity = $this->find($aclId);
|
||||
return $entity->getBoardId();
|
||||
} catch (DoesNotExistException | MultipleObjectsReturnedException $e) {
|
||||
}
|
||||
|
||||
@@ -83,8 +83,8 @@ class AssignmentMapper extends QBMapper implements IPermissionMapper {
|
||||
return $this->cardMapper->isOwner($userId, $cardId);
|
||||
}
|
||||
|
||||
public function findBoardId($id): ?int {
|
||||
return $this->cardMapper->findBoardId($id);
|
||||
public function findBoardId($cardId): ?int {
|
||||
return $this->cardMapper->findBoardId($cardId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
namespace OCA\Deck\Db;
|
||||
|
||||
use OC\Cache\CappedMemoryCache;
|
||||
use OCA\Deck\Service\CirclesService;
|
||||
use OCP\AppFramework\Db\DoesNotExistException;
|
||||
use OCP\IDBConnection;
|
||||
use OCP\IUserManager;
|
||||
@@ -37,10 +36,10 @@ class BoardMapper extends DeckMapper implements IPermissionMapper {
|
||||
private $stackMapper;
|
||||
private $userManager;
|
||||
private $groupManager;
|
||||
private $circlesService;
|
||||
private $logger;
|
||||
|
||||
/** @var CappedMemoryCache */
|
||||
private $circlesEnabled;
|
||||
|
||||
private $userBoardCache;
|
||||
|
||||
public function __construct(
|
||||
@@ -50,7 +49,6 @@ class BoardMapper extends DeckMapper implements IPermissionMapper {
|
||||
StackMapper $stackMapper,
|
||||
IUserManager $userManager,
|
||||
IGroupManager $groupManager,
|
||||
CirclesService $circlesService,
|
||||
LoggerInterface $logger
|
||||
) {
|
||||
parent::__construct($db, 'deck_boards', Board::class);
|
||||
@@ -59,10 +57,12 @@ class BoardMapper extends DeckMapper implements IPermissionMapper {
|
||||
$this->stackMapper = $stackMapper;
|
||||
$this->userManager = $userManager;
|
||||
$this->groupManager = $groupManager;
|
||||
$this->circlesService = $circlesService;
|
||||
$this->logger = $logger;
|
||||
|
||||
$this->userBoardCache = new CappedMemoryCache();
|
||||
|
||||
|
||||
$this->circlesEnabled = \OC::$server->getAppManager()->isEnabledForUser('circles');
|
||||
}
|
||||
|
||||
|
||||
@@ -181,7 +181,12 @@ class BoardMapper extends DeckMapper implements IPermissionMapper {
|
||||
}
|
||||
|
||||
public function findAllByCircles($userId, $limit = null, $offset = null, $since = -1,$includeArchived = true) {
|
||||
$circles = $this->circlesService->getUserCircles($userId);
|
||||
if (!$this->circlesEnabled) {
|
||||
return [];
|
||||
}
|
||||
$circles = array_map(function ($circle) {
|
||||
return $circle->getUniqueId();
|
||||
}, \OCA\Circles\Api\v1\Circles::joinedCircles($userId, true));
|
||||
if (count($circles) === 0) {
|
||||
return [];
|
||||
}
|
||||
@@ -272,11 +277,11 @@ class BoardMapper extends DeckMapper implements IPermissionMapper {
|
||||
return null;
|
||||
}
|
||||
if ($acl->getType() === Acl::PERMISSION_TYPE_CIRCLE) {
|
||||
if (!$this->circlesService->isCirclesEnabled()) {
|
||||
if (!$this->circlesEnabled) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
$circle = $this->circlesService->getCircle($acl->getParticipant());
|
||||
$circle = \OCA\Circles\Api\v1\Circles::detailsCircle($acl->getParticipant(), true);
|
||||
if ($circle) {
|
||||
return new Circle($circle);
|
||||
}
|
||||
|
||||
@@ -230,18 +230,16 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
||||
return $this->findEntities($qb);
|
||||
}
|
||||
|
||||
public function findToMeOrNotAssignedCards($boardId, $username) {
|
||||
public function findAssignedCards($boardId, $username) {
|
||||
$qb = $this->db->getQueryBuilder();
|
||||
$qb->select('c.*')
|
||||
->from('deck_cards', 'c')
|
||||
->innerJoin('c', 'deck_stacks', 's', 's.id = c.stack_id')
|
||||
->innerJoin('s', 'deck_boards', 'b', 'b.id = s.board_id')
|
||||
->leftJoin('c', 'deck_assigned_users', 'u', 'c.id = u.card_id')
|
||||
->innerJoin('c', 'deck_assigned_users', 'u', 'c.id = u.card_id')
|
||||
->where($qb->expr()->eq('s.board_id', $qb->createNamedParameter($boardId, IQueryBuilder::PARAM_INT)))
|
||||
->andWhere($qb->expr()->orX(
|
||||
$qb->expr()->eq('u.participant', $qb->createNamedParameter($username, IQueryBuilder::PARAM_STR)),
|
||||
$qb->expr()->isNull('u.participant'))
|
||||
)
|
||||
->andWhere($qb->expr()->eq('u.participant', $qb->createNamedParameter($username, IQueryBuilder::PARAM_STR)))
|
||||
->andWhere($qb->expr()->eq('u.type', $qb->createNamedParameter(Acl::PERMISSION_TYPE_USER, IQueryBuilder::PARAM_INT)))
|
||||
// Filter out archived/deleted cards and board
|
||||
->andWhere($qb->expr()->eq('c.archived', $qb->createNamedParameter(false, IQueryBuilder::PARAM_BOOL)))
|
||||
->andWhere($qb->expr()->eq('c.deleted_at', $qb->createNamedParameter(0, IQueryBuilder::PARAM_INT)))
|
||||
@@ -546,10 +544,10 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
||||
return ($row['owner'] === $userId);
|
||||
}
|
||||
|
||||
public function findBoardId($id): ?int {
|
||||
public function findBoardId($cardId): ?int {
|
||||
$sql = 'SELECT id FROM `*PREFIX*deck_boards` WHERE `id` IN (SELECT board_id FROM `*PREFIX*deck_stacks` WHERE id IN (SELECT stack_id FROM `*PREFIX*deck_cards` WHERE id = ?))';
|
||||
$stmt = $this->db->prepare($sql);
|
||||
$stmt->bindParam(1, $id, \PDO::PARAM_INT);
|
||||
$stmt->bindParam(1, $cardId, \PDO::PARAM_INT);
|
||||
$stmt->execute();
|
||||
return $stmt->fetchColumn() ?? null;
|
||||
}
|
||||
|
||||
@@ -36,8 +36,8 @@ class Circle extends RelationalObject {
|
||||
public function getObjectSerialization() {
|
||||
return [
|
||||
'uid' => $this->object->getUniqueId(),
|
||||
'displayname' => $this->object->getDisplayName(),
|
||||
'typeString' => '',
|
||||
'displayname' => $this->object->getName(),
|
||||
'typeString' => $this->object->getTypeString(),
|
||||
'circleOwner' => $this->object->getOwner(),
|
||||
'type' => 7
|
||||
];
|
||||
|
||||
@@ -101,9 +101,9 @@ class LabelMapper extends DeckMapper implements IPermissionMapper {
|
||||
return ($row['owner'] === $userId);
|
||||
}
|
||||
|
||||
public function findBoardId($id): ?int {
|
||||
public function findBoardId($labelId): ?int {
|
||||
try {
|
||||
$entity = $this->find($id);
|
||||
$entity = $this->find($labelId);
|
||||
return $entity->getBoardId();
|
||||
} catch (DoesNotExistException $e) {
|
||||
} catch (MultipleObjectsReturnedException $e) {
|
||||
|
||||
@@ -75,9 +75,9 @@ class StackMapper extends DeckMapper implements IPermissionMapper {
|
||||
return ($row['owner'] === $userId);
|
||||
}
|
||||
|
||||
public function findBoardId($id): ?int {
|
||||
public function findBoardId($stackId): ?int {
|
||||
try {
|
||||
$entity = $this->find($id);
|
||||
$entity = $this->find($stackId);
|
||||
return $entity->getBoardId();
|
||||
} catch (DoesNotExistException $e) {
|
||||
} catch (MultipleObjectsReturnedException $e) {
|
||||
|
||||
@@ -51,11 +51,11 @@ class BeforeTemplateRenderedListener implements IEventListener {
|
||||
|
||||
$pathInfo = $this->request->getPathInfo();
|
||||
if (strpos($pathInfo, '/apps/calendar') === 0) {
|
||||
Util::addScript('deck', 'deck-calendar');
|
||||
Util::addScript('deck', 'calendar');
|
||||
}
|
||||
|
||||
if (strpos($pathInfo, '/call/') === 0 || strpos($pathInfo, '/apps/spreed') === 0) {
|
||||
Util::addScript('deck', 'deck-talk');
|
||||
Util::addScript('deck', 'talk');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -238,7 +238,7 @@ class DeckProvider implements IFullTextSearchProvider {
|
||||
*
|
||||
* @param ISearchRequest $request
|
||||
*/
|
||||
public function improveSearchRequest(ISearchRequest $searchRequest) {
|
||||
public function improveSearchRequest(ISearchRequest $request) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -50,7 +50,6 @@ use OCA\Deck\Db\BoardMapper;
|
||||
use OCA\Deck\Db\LabelMapper;
|
||||
use OCP\IUserManager;
|
||||
use OCA\Deck\BadRequestException;
|
||||
use OCP\IURLGenerator;
|
||||
|
||||
class BoardService {
|
||||
private $boardMapper;
|
||||
@@ -69,8 +68,8 @@ class BoardService {
|
||||
private $activityManager;
|
||||
private $eventDispatcher;
|
||||
private $changeHelper;
|
||||
|
||||
private $boardsCache = null;
|
||||
private $urlGenerator;
|
||||
|
||||
|
||||
public function __construct(
|
||||
@@ -88,7 +87,6 @@ class BoardService {
|
||||
ActivityManager $activityManager,
|
||||
IEventDispatcher $eventDispatcher,
|
||||
ChangeHelper $changeHelper,
|
||||
IURLGenerator $urlGenerator,
|
||||
$userId
|
||||
) {
|
||||
$this->boardMapper = $boardMapper;
|
||||
@@ -106,7 +104,6 @@ class BoardService {
|
||||
$this->eventDispatcher = $eventDispatcher;
|
||||
$this->changeHelper = $changeHelper;
|
||||
$this->userId = $userId;
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -697,8 +694,4 @@ class BoardService {
|
||||
}
|
||||
$board->setUsers(array_values($boardUsers));
|
||||
}
|
||||
|
||||
public function getBoardUrl($endpoint) {
|
||||
return $this->urlGenerator->linkToRouteAbsolute('deck.page.index') . '#' . $endpoint;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ use OCA\Deck\Db\StackMapper;
|
||||
use OCA\Deck\Event\CardCreatedEvent;
|
||||
use OCA\Deck\Event\CardDeletedEvent;
|
||||
use OCA\Deck\Event\CardUpdatedEvent;
|
||||
use OCA\Deck\NoPermissionException;
|
||||
use OCA\Deck\Notification\NotificationHelper;
|
||||
use OCA\Deck\Db\BoardMapper;
|
||||
use OCA\Deck\Db\LabelMapper;
|
||||
@@ -46,7 +45,6 @@ use OCA\Deck\BadRequestException;
|
||||
use OCP\Comments\ICommentsManager;
|
||||
use OCP\EventDispatcher\IEventDispatcher;
|
||||
use OCP\IUserManager;
|
||||
use OCP\IURLGenerator;
|
||||
|
||||
class CardService {
|
||||
private $cardMapper;
|
||||
@@ -64,7 +62,6 @@ class CardService {
|
||||
private $changeHelper;
|
||||
private $eventDispatcher;
|
||||
private $userManager;
|
||||
private $urlGenerator;
|
||||
|
||||
public function __construct(
|
||||
CardMapper $cardMapper,
|
||||
@@ -81,7 +78,6 @@ class CardService {
|
||||
IUserManager $userManager,
|
||||
ChangeHelper $changeHelper,
|
||||
IEventDispatcher $eventDispatcher,
|
||||
IURLGenerator $urlGenerator,
|
||||
$userId
|
||||
) {
|
||||
$this->cardMapper = $cardMapper;
|
||||
@@ -99,7 +95,6 @@ class CardService {
|
||||
$this->changeHelper = $changeHelper;
|
||||
$this->eventDispatcher = $eventDispatcher;
|
||||
$this->currentUser = $userId;
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
}
|
||||
|
||||
public function enrich($card) {
|
||||
@@ -159,12 +154,7 @@ class CardService {
|
||||
}
|
||||
|
||||
public function findCalendarEntries($boardId) {
|
||||
try {
|
||||
$this->permissionService->checkPermission($this->boardMapper, $boardId, Acl::PERMISSION_READ);
|
||||
} catch (NoPermissionException $e) {
|
||||
\OC::$server->getLogger()->error('Unable to check permission for a previously obtained board ' . $boardId, ['exception' => $e]);
|
||||
return [];
|
||||
}
|
||||
$this->permissionService->checkPermission($this->boardMapper, $boardId, Acl::PERMISSION_READ);
|
||||
$cards = $this->cardMapper->findCalendarEntries($boardId);
|
||||
foreach ($cards as $card) {
|
||||
$this->enrich($card);
|
||||
@@ -267,9 +257,9 @@ class CardService {
|
||||
* @param $title
|
||||
* @param $stackId
|
||||
* @param $type
|
||||
* @param $owner
|
||||
* @param $description
|
||||
* @param $order
|
||||
* @param $description
|
||||
* @param $owner
|
||||
* @param $duedate
|
||||
* @return \OCP\AppFramework\Db\Entity
|
||||
* @throws StatusException
|
||||
@@ -278,7 +268,7 @@ class CardService {
|
||||
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
|
||||
* @throws BadRequestException
|
||||
*/
|
||||
public function update($id, $title, $stackId, $type, $owner, $description = '', $order = 0, $duedate = null, $deletedAt = null, $archived = null) {
|
||||
public function update($id, $title, $stackId, $type, $order = 0, $description = '', $owner, $duedate = null, $deletedAt = null, $archived = null) {
|
||||
if (is_numeric($id) === false) {
|
||||
throw new BadRequestException('card id must be a number');
|
||||
}
|
||||
@@ -607,13 +597,27 @@ class CardService {
|
||||
$this->eventDispatcher->dispatchTyped(new CardUpdatedEvent($card));
|
||||
}
|
||||
|
||||
public function getCardUrl($cardId) {
|
||||
$boardId = $this->cardMapper->findBoardId($cardId);
|
||||
/**
|
||||
*
|
||||
* @return array
|
||||
* @throws \OCA\Deck\NoPermissionException
|
||||
* @throws BadRequestException
|
||||
*/
|
||||
public function findAllWithDue($userId) {
|
||||
$cards = $this->cardMapper->findAllWithDue($userId);
|
||||
|
||||
return $this->urlGenerator->linkToRouteAbsolute('deck.page.index') . "#/board/$boardId/card/$cardId";
|
||||
return $cards;
|
||||
}
|
||||
|
||||
public function getRedirectUrlForCard($cardId) {
|
||||
return $this->urlGenerator->linkToRouteAbsolute('deck.page.index') . "card/$cardId";
|
||||
/**
|
||||
*
|
||||
* @return array
|
||||
* @throws \OCA\Deck\NoPermissionException
|
||||
* @throws BadRequestException
|
||||
*/
|
||||
public function findAssignedCards($userId) {
|
||||
$cards = $this->cardMapper->findAssignedCards($userId);
|
||||
|
||||
return $cards;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,12 +26,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace OCA\Deck\Service;
|
||||
|
||||
use OCA\Circles\CirclesManager;
|
||||
use OCA\Circles\Model\Circle;
|
||||
use OCA\Circles\Model\Member;
|
||||
use OCA\Circles\Model\Probes\CircleProbe;
|
||||
use OCA\Circles\Api\v1\Circles;
|
||||
use OCP\App\IAppManager;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* Wrapper around circles app API since it is not in a public namespace so we need to make sure that
|
||||
@@ -44,66 +40,24 @@ class CirclesService {
|
||||
$this->circlesEnabled = $appManager->isEnabledForUser('circles');
|
||||
}
|
||||
|
||||
public function isCirclesEnabled(): bool {
|
||||
return $this->circlesEnabled;
|
||||
}
|
||||
|
||||
public function getCircle(string $circleId): ?Circle {
|
||||
public function getCircle($circleId) {
|
||||
if (!$this->circlesEnabled) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
// Enforce current user condition since we always want the full list of members
|
||||
/** @var CirclesManager $circlesManager */
|
||||
$circlesManager = \OC::$server->get(CirclesManager::class);
|
||||
$circlesManager->startSuperSession();
|
||||
return $circlesManager->getCircle($circleId);
|
||||
} catch (Throwable $e) {
|
||||
}
|
||||
return null;
|
||||
return \OCA\Circles\Api\v1\Circles::detailsCircle($circleId, true);
|
||||
}
|
||||
|
||||
public function isUserInCircle(string $circleId, string $userId): bool {
|
||||
public function isUserInCircle($circleId, $userId): bool {
|
||||
if (!$this->circlesEnabled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
/** @var CirclesManager $circlesManager */
|
||||
$circlesManager = \OC::$server->get(CirclesManager::class);
|
||||
$federatedUser = $circlesManager->getFederatedUser($userId, Member::TYPE_USER);
|
||||
$circlesManager->startSession($federatedUser);
|
||||
$circle = $circlesManager->getCircle($circleId);
|
||||
$member = $circle->getInitiator();
|
||||
return $member !== null && $member->getLevel() >= Member::LEVEL_MEMBER;
|
||||
} catch (Throwable $e) {
|
||||
$member = \OCA\Circles\Api\v1\Circles::getMember($circleId, $userId, 1, true);
|
||||
return $member->getLevel() >= Circles::LEVEL_MEMBER;
|
||||
} catch (\Exception $e) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $userId
|
||||
* @return string[] circle single ids
|
||||
*/
|
||||
public function getUserCircles(string $userId): array {
|
||||
if (!$this->circlesEnabled) {
|
||||
return [];
|
||||
}
|
||||
|
||||
try {
|
||||
/** @var CirclesManager $circlesManager */
|
||||
$circlesManager = \OC::$server->get(CirclesManager::class);
|
||||
$federatedUser = $circlesManager->getFederatedUser($userId, Member::TYPE_USER);
|
||||
$circlesManager->startSession($federatedUser);
|
||||
$probe = new CircleProbe();
|
||||
$probe->mustBeMember();
|
||||
return array_map(function (Circle $circle) {
|
||||
return $circle->getSingleId();
|
||||
}, $circlesManager->getCircles($probe));
|
||||
} catch (Throwable $e) {
|
||||
}
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,29 +46,20 @@ class ConfigService {
|
||||
|
||||
public function __construct(
|
||||
IConfig $config,
|
||||
IGroupManager $groupManager
|
||||
IGroupManager $groupManager,
|
||||
IUserSession $userSession
|
||||
) {
|
||||
// Session is required here in order to make the tests properly inject the userId later on
|
||||
$this->userId = $userSession->getUser() ? $userSession->getUser()->getUID() : null;
|
||||
$this->groupManager = $groupManager;
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
public function getUserId() {
|
||||
if (!$this->userId) {
|
||||
$user = \OC::$server->get(IUserSession::class)->getUser();
|
||||
$this->userId = $user ? $user->getUID() : null;
|
||||
}
|
||||
return $this->userId;
|
||||
}
|
||||
|
||||
public function getAll(): array {
|
||||
if ($this->getUserId() === null) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$data = [
|
||||
'calendar' => $this->isCalendarEnabled()
|
||||
];
|
||||
if ($this->groupManager->isAdmin($this->getUserId())) {
|
||||
if ($this->groupManager->isAdmin($this->userId)) {
|
||||
$data['groupLimit'] = $this->get('groupLimit');
|
||||
}
|
||||
return $data;
|
||||
@@ -79,47 +70,43 @@ class ConfigService {
|
||||
[$scope] = explode(':', $key, 2);
|
||||
switch ($scope) {
|
||||
case 'groupLimit':
|
||||
if ($this->getUserId() === null || !$this->groupManager->isAdmin($this->getUserId())) {
|
||||
if (!$this->groupManager->isAdmin($this->userId)) {
|
||||
throw new NoPermissionException('You must be admin to get the group limit');
|
||||
}
|
||||
return $this->getGroupLimit();
|
||||
case 'calendar':
|
||||
if ($this->getUserId() === null) {
|
||||
if ($this->userId === null) {
|
||||
return false;
|
||||
}
|
||||
return (bool)$this->config->getUserValue($this->getUserId(), Application::APP_ID, 'calendar', true);
|
||||
return (bool)$this->config->getUserValue($this->userId, Application::APP_ID, 'calendar', true);
|
||||
}
|
||||
}
|
||||
|
||||
public function isCalendarEnabled(int $boardId = null): bool {
|
||||
if ($this->getUserId() === null) {
|
||||
if ($this->userId === null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$defaultState = (bool)$this->config->getUserValue($this->getUserId(), Application::APP_ID, 'calendar', true);
|
||||
$defaultState = (bool)$this->config->getUserValue($this->userId, Application::APP_ID, 'calendar', true);
|
||||
if ($boardId === null) {
|
||||
return $defaultState;
|
||||
}
|
||||
|
||||
return (bool)$this->config->getUserValue($this->getUserId(), Application::APP_ID, 'board:' . $boardId . ':calendar', $defaultState);
|
||||
return (bool)$this->config->getUserValue($this->userId, Application::APP_ID, 'board:' . $boardId . ':calendar', $defaultState);
|
||||
}
|
||||
|
||||
public function set($key, $value) {
|
||||
if ($this->getUserId() === null) {
|
||||
throw new NoPermissionException('Must be logged in to set user config');
|
||||
}
|
||||
|
||||
$result = null;
|
||||
[$scope] = explode(':', $key, 2);
|
||||
switch ($scope) {
|
||||
case 'groupLimit':
|
||||
if (!$this->groupManager->isAdmin($this->getUserId())) {
|
||||
if (!$this->groupManager->isAdmin($this->userId)) {
|
||||
throw new NoPermissionException('You must be admin to set the group limit');
|
||||
}
|
||||
$result = $this->setGroupLimit($value);
|
||||
break;
|
||||
case 'calendar':
|
||||
$this->config->setUserValue($this->getUserId(), Application::APP_ID, 'calendar', (string)$value);
|
||||
$this->config->setUserValue($this->userId, Application::APP_ID, 'calendar', (int)$value);
|
||||
$result = $value;
|
||||
break;
|
||||
case 'board':
|
||||
@@ -127,7 +114,7 @@ class ConfigService {
|
||||
if ($boardConfigKey === 'notify-due' && !in_array($value, [self::SETTING_BOARD_NOTIFICATION_DUE_ALL, self::SETTING_BOARD_NOTIFICATION_DUE_ASSIGNED, self::SETTING_BOARD_NOTIFICATION_DUE_OFF], true)) {
|
||||
throw new BadRequestException('Board notification option must be one of: off, assigned, all');
|
||||
}
|
||||
$this->config->setUserValue($this->getUserId(), Application::APP_ID, $key, (string)$value);
|
||||
$this->config->setUserValue($this->userId, Application::APP_ID, $key, $value);
|
||||
$result = $value;
|
||||
}
|
||||
return $result;
|
||||
@@ -169,10 +156,6 @@ class ConfigService {
|
||||
}
|
||||
|
||||
public function getAttachmentFolder(): string {
|
||||
if ($this->getUserId() === null) {
|
||||
throw new NoPermissionException('Must be logged in get the attachment folder');
|
||||
}
|
||||
|
||||
return $this->config->getUserValue($this->getUserId(), 'deck', 'attachment_folder', '/Deck');
|
||||
return $this->config->getUserValue($this->userId, 'deck', 'attachment_folder', '/Deck');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ class OverviewService {
|
||||
$service = $this;
|
||||
|
||||
if (count($userBoard->getAcl()) === 0) {
|
||||
// private board: get cards with due date
|
||||
// get cards with due date
|
||||
$findCards[] = array_map(static function ($card) use ($service, $userBoard, $userId) {
|
||||
$service->enrich($card, $userId);
|
||||
$cardData = $card->jsonSerialize();
|
||||
@@ -122,13 +122,13 @@ class OverviewService {
|
||||
return $cardData;
|
||||
}, $this->cardMapper->findAllWithDue($userBoard->getId()));
|
||||
} else {
|
||||
// shared board: get all my assigned or unassigned cards
|
||||
// get assigned cards
|
||||
$findCards[] = array_map(static function ($card) use ($service, $userBoard, $userId) {
|
||||
$service->enrich($card, $userId);
|
||||
$cardData = $card->jsonSerialize();
|
||||
$cardData['boardId'] = $userBoard->getId();
|
||||
return $cardData;
|
||||
}, $this->cardMapper->findToMeOrNotAssignedCards($userBoard->getId(), $userId));
|
||||
}, $this->cardMapper->findAssignedCards($userBoard->getId(), $userId));
|
||||
}
|
||||
}
|
||||
return $findCards;
|
||||
|
||||
@@ -33,7 +33,6 @@ use OCA\Deck\Db\IPermissionMapper;
|
||||
use OCA\Deck\Db\User;
|
||||
use OCA\Deck\NoPermissionException;
|
||||
use OCP\AppFramework\Db\DoesNotExistException;
|
||||
use OCP\AppFramework\Db\Entity;
|
||||
use OCP\AppFramework\Db\MultipleObjectsReturnedException;
|
||||
use OCP\IConfig;
|
||||
use OCP\IGroupManager;
|
||||
@@ -43,8 +42,6 @@ use OCP\Share\IManager;
|
||||
|
||||
class PermissionService {
|
||||
|
||||
/** @var CirclesService */
|
||||
private $circlesService;
|
||||
/** @var BoardMapper */
|
||||
private $boardMapper;
|
||||
/** @var AclMapper */
|
||||
@@ -64,11 +61,11 @@ class PermissionService {
|
||||
/** @var array */
|
||||
private $users = [];
|
||||
|
||||
private $circlesEnabled = false;
|
||||
private $boardCache;
|
||||
|
||||
public function __construct(
|
||||
ILogger $logger,
|
||||
CirclesService $circlesService,
|
||||
AclMapper $aclMapper,
|
||||
BoardMapper $boardMapper,
|
||||
IUserManager $userManager,
|
||||
@@ -77,7 +74,6 @@ class PermissionService {
|
||||
IConfig $config,
|
||||
$userId
|
||||
) {
|
||||
$this->circlesService = $circlesService;
|
||||
$this->aclMapper = $aclMapper;
|
||||
$this->boardMapper = $boardMapper;
|
||||
$this->logger = $logger;
|
||||
@@ -88,6 +84,9 @@ class PermissionService {
|
||||
$this->userId = $userId;
|
||||
|
||||
$this->boardCache = new CappedMemoryCache();
|
||||
|
||||
$this->circlesEnabled = \OC::$server->getAppManager()->isEnabledForUser('circles') &&
|
||||
(version_compare(\OC::$server->getAppManager()->getAppVersion('circles'), '0.17.1') >= 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -211,9 +210,10 @@ class PermissionService {
|
||||
return $acl->getPermission($permission);
|
||||
}
|
||||
|
||||
if ($this->circlesService->isCirclesEnabled() && $acl->getType() === Acl::PERMISSION_TYPE_CIRCLE) {
|
||||
if ($this->circlesEnabled && $acl->getType() === Acl::PERMISSION_TYPE_CIRCLE) {
|
||||
try {
|
||||
return $this->circlesService->isUserInCircle($acl->getParticipant(), $userId) && $acl->getPermission($permission);
|
||||
$member = \OCA\Circles\Api\v1\Circles::getMember($acl->getParticipant(), $this->userId, 1, true);
|
||||
return $member->getLevel() >= Member::LEVEL_MEMBER && $acl->getPermission($permission);
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->info('Member not found in circle that was accessed. This should not happen.');
|
||||
}
|
||||
@@ -278,19 +278,15 @@ class PermissionService {
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->circlesService->isCirclesEnabled() && $acl->getType() === Acl::PERMISSION_TYPE_CIRCLE) {
|
||||
if ($this->circlesEnabled && $acl->getType() === Acl::PERMISSION_TYPE_CIRCLE) {
|
||||
try {
|
||||
$circle = $this->circlesService->getCircle($acl->getParticipant());
|
||||
$circle = \OCA\Circles\Api\v1\Circles::detailsCircle($acl->getParticipant(), true);
|
||||
if ($circle === null) {
|
||||
$this->logger->info('No circle found for acl rule ' . $acl->getId());
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($circle->getInheritedMembers() as $member) {
|
||||
if ($member->getUserType() !== 1 || $member->getLevel() < Member::LEVEL_MEMBER) {
|
||||
// deck currently only supports user members in circles
|
||||
continue;
|
||||
}
|
||||
foreach ($circle->getMembers() as $member) {
|
||||
$user = $this->userManager->get($member->getUserId());
|
||||
if ($user === null) {
|
||||
$this->logger->info('No user found for circle member ' . $member->getUserId());
|
||||
@@ -308,10 +304,6 @@ class PermissionService {
|
||||
}
|
||||
|
||||
public function canCreate() {
|
||||
if ($this->userId === null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$groups = $this->getGroupLimitList();
|
||||
if (count($groups) === 0) {
|
||||
return true;
|
||||
|
||||
@@ -35,7 +35,6 @@ use OCA\Deck\Db\ChangeHelper;
|
||||
use OCA\Deck\Db\LabelMapper;
|
||||
use OCA\Deck\Db\Stack;
|
||||
use OCA\Deck\Db\StackMapper;
|
||||
use OCA\Deck\NoPermissionException;
|
||||
use OCA\Deck\StatusException;
|
||||
|
||||
class StackService {
|
||||
@@ -143,12 +142,7 @@ class StackService {
|
||||
}
|
||||
|
||||
public function findCalendarEntries($boardId) {
|
||||
try {
|
||||
$this->permissionService->checkPermission(null, $boardId, Acl::PERMISSION_READ);
|
||||
} catch (NoPermissionException $e) {
|
||||
\OC::$server->getLogger()->error('Unable to check permission for a previously obtained board ' . $boardId, ['exception' => $e]);
|
||||
return [];
|
||||
}
|
||||
$this->permissionService->checkPermission(null, $boardId, Acl::PERMISSION_READ);
|
||||
return $this->stackMapper->findAll($boardId);
|
||||
}
|
||||
|
||||
|
||||
42793
package-lock.json
generated
42793
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
77
package.json
77
package.json
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "deck",
|
||||
"description": "",
|
||||
"version": "1.5.6",
|
||||
"version": "1.4.8",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Julius Härtl",
|
||||
@@ -29,29 +29,29 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/polyfill": "^7.12.1",
|
||||
"@babel/runtime": "^7.14.6",
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@juliushaertl/vue-richtext": "^1.0.1",
|
||||
"@nextcloud/auth": "^1.3.0",
|
||||
"@nextcloud/axios": "^1.6.0",
|
||||
"@nextcloud/dialogs": "^3.1.2",
|
||||
"@nextcloud/event-bus": "^2.0.0",
|
||||
"@nextcloud/files": "^2.0.0",
|
||||
"@nextcloud/dialogs": "^3.1.1",
|
||||
"@nextcloud/event-bus": "^1.2.0",
|
||||
"@nextcloud/files": "^1.1.0",
|
||||
"@nextcloud/initial-state": "^1.2.0",
|
||||
"@nextcloud/l10n": "^1.4.1",
|
||||
"@nextcloud/moment": "^1.1.1",
|
||||
"@nextcloud/router": "^2.0.0",
|
||||
"@nextcloud/vue": "^3.10.1",
|
||||
"@nextcloud/vue-dashboard": "^2.0.1",
|
||||
"@nextcloud/router": "^1.2.0",
|
||||
"@nextcloud/vue": "^3.8.0",
|
||||
"@nextcloud/vue-dashboard": "^1.1.0",
|
||||
"blueimp-md5": "^2.18.0",
|
||||
"dompurify": "^2.2.9",
|
||||
"dompurify": "^2.2.7",
|
||||
"lodash": "^4.17.21",
|
||||
"markdown-it": "^12.0.6",
|
||||
"markdown-it": "^12.0.4",
|
||||
"markdown-it-task-lists": "^2.1.1",
|
||||
"moment": "^2.29.1",
|
||||
"nextcloud-vue-collections": "^0.9.0",
|
||||
"p-queue": "^6.6.2",
|
||||
"url-search-params-polyfill": "^8.1.1",
|
||||
"vue": "^2.6.14",
|
||||
"vue": "^2.6.12",
|
||||
"vue-at": "^2.5.0-beta.2",
|
||||
"vue-click-outside": "^1.1.0",
|
||||
"vue-easymde": "^1.4.0",
|
||||
@@ -65,20 +65,53 @@
|
||||
"extends @nextcloud/browserslist-config"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nextcloud/babel-config": "^1.0.0-beta.1",
|
||||
"@nextcloud/browserslist-config": "^2.1.0",
|
||||
"@nextcloud/eslint-config": "^5.1.0",
|
||||
"@nextcloud/stylelint-config": "^1.0.0-beta.0",
|
||||
"@nextcloud/webpack-vue-config": "^4.0.3",
|
||||
"@relative-ci/agent": "^2.0.0",
|
||||
"@vue/test-utils": "^1.2.1",
|
||||
"jest": "^27.0.4",
|
||||
"@babel/core": "^7.13.14",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
||||
"@babel/preset-env": "^7.13.12",
|
||||
"@nextcloud/browserslist-config": "^1.0.0",
|
||||
"@nextcloud/eslint-config": "^2.2.0",
|
||||
"@nextcloud/eslint-plugin": "^1.5.0",
|
||||
"@nextcloud/webpack-vue-config": "^1.4.1",
|
||||
"@relative-ci/agent": "^1.5.0",
|
||||
"@vue/test-utils": "^1.1.3",
|
||||
"acorn": "^8.1.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-jest": "^26.6.3",
|
||||
"babel-loader": "^8.2.2",
|
||||
"css-loader": "^4.3.0",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-standard": "^14.1.1",
|
||||
"eslint-friendly-formatter": "^4.0.1",
|
||||
"eslint-loader": "^4.0.2",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^4.3.1",
|
||||
"eslint-plugin-standard": "^4.1.0",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"file-loader": "^6.2.0",
|
||||
"jest": "^26.6.3",
|
||||
"jest-serializer-vue": "^2.0.2",
|
||||
"vue-jest": "^3.0.7"
|
||||
"minimist": "^1.2.5",
|
||||
"node-sass": "^4.14.1",
|
||||
"raw-loader": "^4.0.2",
|
||||
"sass-loader": "^10.1.1",
|
||||
"style-loader": "^1.3.0",
|
||||
"stylelint": "^13.12.0",
|
||||
"stylelint-config-recommended": "^4.0.0",
|
||||
"stylelint-config-recommended-scss": "^4.2.0",
|
||||
"stylelint-scss": "^3.19.0",
|
||||
"stylelint-webpack-plugin": "^2.1.1",
|
||||
"url-loader": "^4.1.1",
|
||||
"vue-jest": "^3.0.7",
|
||||
"vue-loader": "^15.9.6",
|
||||
"vue-template-compiler": "^2.6.12",
|
||||
"webpack": "^4.46.0",
|
||||
"webpack-cli": "^3.3.12",
|
||||
"webpack-dev-server": "^3.11.2",
|
||||
"webpack-merge": "^5.7.3"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
||||
@@ -72,10 +72,10 @@
|
||||
</div>
|
||||
<div v-else id="modal-inner">
|
||||
<EmptyContent v-if="creating" icon="icon-loading">
|
||||
{{ t('deck', 'Creating the new card …') }}
|
||||
{{ t('deck', 'Creating the new card…') }}
|
||||
</EmptyContent>
|
||||
<EmptyContent v-else-if="created" icon="icon-checkmark">
|
||||
{{ t('deck', 'Card "{card}" was added to "{board}"', { card: pendingTitle, board: selectedBoard.title }) }}
|
||||
{{ t('deck', '"{card}" was added to "{board}"', { card: pendingTitle, board: selectedBoard.title }) }}
|
||||
<template #desc>
|
||||
<button class="primary" @click="openNewCard">
|
||||
{{ t('deck', 'Open card') }}
|
||||
@@ -168,7 +168,6 @@ export default {
|
||||
|
||||
},
|
||||
close() {
|
||||
this.$emit('close')
|
||||
this.$root.$emit('close')
|
||||
},
|
||||
async select() {
|
||||
|
||||
@@ -79,7 +79,7 @@ export default {
|
||||
parameters.after.name = moment(dateTime).format('L LTS')
|
||||
}
|
||||
|
||||
Object.keys(parameters).forEach(function(key, index) {
|
||||
Object.keys(parameters).map(function(key, index) {
|
||||
const { type } = parameters[key]
|
||||
switch (type) {
|
||||
case 'highlight':
|
||||
|
||||
@@ -84,7 +84,7 @@ export default {
|
||||
params.append('object_id', '' + this.objectId)
|
||||
params.append('limit', ACTIVITY_FETCH_LIMIT)
|
||||
|
||||
const response = await axios.get(generateOcsUrl(`apps/activity/api/v2/activity/${this.filter}`) + '?' + params)
|
||||
const response = await axios.get(generateOcsUrl('apps/activity/api/v2/activity') + this.filter + '?' + params)
|
||||
let activities = response.data.ocs.data
|
||||
if (this.filter === 'deck') {
|
||||
// We need to manually filter activities here, since currently we use two different types and there is no way
|
||||
|
||||
@@ -25,12 +25,6 @@
|
||||
<div v-if="overviewName" class="board-title">
|
||||
<div class="board-bullet icon-calendar-dark" />
|
||||
<h2>{{ overviewName }}</h2>
|
||||
<Actions>
|
||||
<ActionButton icon="icon-add" @click="clickShowAddCardModel">
|
||||
{{ t('deck', 'Add card') }}
|
||||
</ActionButton>
|
||||
</Actions>
|
||||
<CardCreateDialog v-if="showAddCardModal" @close="clickHideAddCardModel" />
|
||||
</div>
|
||||
<div v-else-if="board" class="board-title">
|
||||
<div :style="{backgroundColor: '#' + board.color}" class="board-bullet" />
|
||||
@@ -212,12 +206,11 @@
|
||||
import { mapState, mapGetters } from 'vuex'
|
||||
import { Actions, ActionButton, Popover, Avatar } from '@nextcloud/vue'
|
||||
import labelStyle from '../mixins/labelStyle'
|
||||
import CardCreateDialog from '../CardCreateDialog'
|
||||
|
||||
export default {
|
||||
name: 'Controls',
|
||||
components: {
|
||||
Actions, ActionButton, Popover, Avatar, CardCreateDialog,
|
||||
Actions, ActionButton, Popover, Avatar,
|
||||
},
|
||||
mixins: [labelStyle],
|
||||
props: {
|
||||
@@ -240,7 +233,6 @@ export default {
|
||||
showArchived: false,
|
||||
isAddStackVisible: false,
|
||||
filter: { tags: [], users: [], due: '', unassigned: false },
|
||||
showAddCardModal: false,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -326,12 +318,6 @@ export default {
|
||||
this.$store.dispatch('setFilter', { ...filterReset })
|
||||
this.filter = filterReset
|
||||
},
|
||||
clickShowAddCardModel() {
|
||||
this.showAddCardModal = true
|
||||
},
|
||||
clickHideAddCardModel() {
|
||||
this.showAddCardModal = false
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -264,14 +264,12 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@use 'sass:math';
|
||||
|
||||
@import './../../css/variables';
|
||||
|
||||
.stack {
|
||||
width: $stack-width + $stack-spacing*3;
|
||||
margin-left: math.div($stack-spacing, 2);
|
||||
margin-right: math.div($stack-spacing, 2);
|
||||
margin-left: $stack-spacing/2;
|
||||
margin-right: $stack-spacing/2;
|
||||
}
|
||||
|
||||
.stack__header {
|
||||
|
||||
@@ -228,7 +228,7 @@ export default {
|
||||
throw new Error(t('files', 'Invalid path selected'))
|
||||
}
|
||||
|
||||
axios.post(generateOcsUrl('apps/files_sharing/api/v1/shares'), {
|
||||
axios.post(generateOcsUrl('apps/files_sharing/api/v1', 2) + 'shares', {
|
||||
path,
|
||||
shareType: 12,
|
||||
shareWith: '' + this.cardId,
|
||||
@@ -245,7 +245,7 @@ export default {
|
||||
},
|
||||
showViewer(attachment) {
|
||||
if (attachment.extendedData.fileid && window.OCA.Viewer.availableHandlers.map(handler => handler.mimes).flat().includes(attachment.extendedData.mimetype)) {
|
||||
window.OCA.Viewer.open({ path: attachment.extendedData.path })
|
||||
window.OCA.Viewer.open(attachment.extendedData.path)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
:members="members"
|
||||
name-key="displayname"
|
||||
:tab-select="true">
|
||||
<template #item="s">
|
||||
<template v-slot:item="s">
|
||||
<Avatar class="atwho-li--avatar" :user="s.item.uid" :size="24" />
|
||||
<span class="atwho-li--name" v-text="s.item.displayname" />
|
||||
</template>
|
||||
<template #embeddedItem="scope">
|
||||
<template v-slot:embeddedItem="scope">
|
||||
<span>
|
||||
<UserBubble v-if="scope.current.uid"
|
||||
:data-mention-id="scope.current.uid"
|
||||
|
||||
@@ -35,14 +35,14 @@
|
||||
<Avatar v-if="user.type === 1"
|
||||
:user="user.participant.uid"
|
||||
:display-name="user.participant.displayname"
|
||||
:tooltip-message="user.participant.displayname + ' ' + t('deck', '(Group)')"
|
||||
:tooltip-message="user.participant.displayname + ' ' + t('deck', '(group)')"
|
||||
:is-no-user="true"
|
||||
:disable-="true"
|
||||
:size="32" />
|
||||
<Avatar v-if="user.type === 7"
|
||||
:user="user.participant.uid"
|
||||
:display-name="user.participant.displayname"
|
||||
:tooltip-message="user.participant.displayname + ' ' + t('deck', '(Circle)')"
|
||||
:tooltip-message="user.participant.displayname + ' ' + t('deck', '(circle)')"
|
||||
:is-no-user="true"
|
||||
:disable-="true"
|
||||
:size="32" />
|
||||
@@ -72,7 +72,7 @@ export default {
|
||||
props: {
|
||||
users: {
|
||||
type: Array,
|
||||
default: () => ([]),
|
||||
default: () => { return {} },
|
||||
},
|
||||
},
|
||||
data() {
|
||||
@@ -132,7 +132,7 @@ export default {
|
||||
margin-top: 5px;
|
||||
position: relative;
|
||||
flex-grow: 1;
|
||||
::v-deep .popovermenu {
|
||||
/deep/ .popovermenu {
|
||||
margin-right: -4px;
|
||||
img {
|
||||
padding: 0;
|
||||
@@ -152,7 +152,7 @@ export default {
|
||||
padding-right: $avatar-offset;
|
||||
flex-direction: row-reverse;
|
||||
.avatardiv,
|
||||
::v-deep .avatardiv {
|
||||
/deep/ .avatardiv {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
box-sizing: content-box !important;
|
||||
@@ -167,7 +167,7 @@ export default {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
&:hover div:nth-child(n+2) ::v-deep .avatardiv {
|
||||
&:hover div:nth-child(n+2) /deep/ .avatardiv {
|
||||
margin-right: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ export default {
|
||||
if (this.card.commentsUnread > 0) {
|
||||
return t('deck', '{count} comments, {unread} unread', {
|
||||
count: this.card.commentsCount,
|
||||
unread: this.card.commentsUnread,
|
||||
unread: this.card.commentsUnread
|
||||
})
|
||||
}
|
||||
return null
|
||||
|
||||
@@ -163,7 +163,7 @@ export default {
|
||||
if (this.isAdmin) {
|
||||
this.groupLimit = this.$store.getters.config('groupLimit')
|
||||
this.groupLimitDisabled = false
|
||||
axios.get(generateOcsUrl('cloud/groups')).then((response) => {
|
||||
axios.get(generateOcsUrl('cloud', 2) + 'groups').then((response) => {
|
||||
this.groups = response.data.ocs.data.groups.reduce((obj, item) => {
|
||||
obj.push({
|
||||
id: item,
|
||||
|
||||
@@ -149,9 +149,6 @@ export default {
|
||||
directives: {
|
||||
ClickOutside,
|
||||
},
|
||||
inject: [
|
||||
'boardApi',
|
||||
],
|
||||
props: {
|
||||
board: {
|
||||
type: Object,
|
||||
@@ -306,6 +303,9 @@ export default {
|
||||
this.updateDueSetting = null
|
||||
},
|
||||
},
|
||||
inject: [
|
||||
'boardApi',
|
||||
],
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ const createCancelToken = () => axios.CancelToken.source()
|
||||
function search({ query, cursor }) {
|
||||
const cancelToken = createCancelToken()
|
||||
|
||||
const request = async() => axios.get(generateOcsUrl('apps/deck/api/v1.0/search'), {
|
||||
const request = async() => axios.get(generateOcsUrl('apps/deck/api/v1.0', 2) + '/search', {
|
||||
cancelToken: cancelToken.token,
|
||||
params: {
|
||||
term: query,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
@@ -84,7 +84,7 @@ export default {
|
||||
},
|
||||
colorIsValid(hex) {
|
||||
|
||||
const re = /[A-Fa-f0-9]{6}/
|
||||
const re = new RegExp('[A-Fa-f0-9]{6}')
|
||||
if (re.test(hex)) {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ export class CommentApi {
|
||||
}
|
||||
|
||||
async loadComments({ cardId, limit, offset }) {
|
||||
const api = await axios.get(generateOcsUrl(`apps/deck/api/v1.0/cards/${cardId}/comments`), {
|
||||
const api = await axios.get(generateOcsUrl('apps/deck/api/v1.0/cards', 2) + `${cardId}/comments`, {
|
||||
params: { limit, offset },
|
||||
headers: { 'OCS-APIRequest': 'true' },
|
||||
})
|
||||
@@ -39,7 +39,7 @@ export class CommentApi {
|
||||
}
|
||||
|
||||
async createComment({ cardId, comment, replyTo }) {
|
||||
const api = await axios.post(generateOcsUrl(`apps/deck/api/v1.0/cards/${cardId}/comments`), {
|
||||
const api = await axios.post(generateOcsUrl('apps/deck/api/v1.0/cards', 2) + `${cardId}/comments`, {
|
||||
message: `${comment}`,
|
||||
parentId: replyTo ? replyTo.id : null,
|
||||
})
|
||||
@@ -47,14 +47,14 @@ export class CommentApi {
|
||||
}
|
||||
|
||||
async updateComment({ cardId, id, comment }) {
|
||||
const api = await axios.put(generateOcsUrl(`apps/deck/api/v1.0/cards/${cardId}/comments/${id}`), {
|
||||
const api = await axios.put(generateOcsUrl('apps/deck/api/v1.0/cards', 2) + `${cardId}/comments/${id}`, {
|
||||
message: `${comment}`,
|
||||
})
|
||||
return api.data.ocs.data
|
||||
}
|
||||
|
||||
async deleteComment({ cardId, id }) {
|
||||
const api = await axios.delete(generateOcsUrl(`apps/deck/api/v1.0/cards/${cardId}/comments/${id}`))
|
||||
const api = await axios.delete(generateOcsUrl('apps/deck/api/v1.0/cards', 2) + `${cardId}/comments/${id}`)
|
||||
return api.data.ocs.data
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import { generateOcsUrl } from '@nextcloud/router'
|
||||
export class OverviewApi {
|
||||
|
||||
url(url) {
|
||||
return generateOcsUrl(`apps/deck/api/v1.0/${url}`)
|
||||
return generateOcsUrl('apps/deck/api/v1.0') + url
|
||||
}
|
||||
|
||||
get(filter) {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
import axios from '@nextcloud/axios'
|
||||
import { generateOcsUrl } from '@nextcloud/router'
|
||||
|
||||
const shareUrl = generateOcsUrl('apps/files_sharing/api/v1/shares')
|
||||
const shareUrl = generateOcsUrl('apps/files_sharing/api/v1', 2) + 'shares'
|
||||
|
||||
const createShare = async function({ path, permissions, shareType, shareWith, publicUpload, password, sendPasswordByTalk, expireDate, label }) {
|
||||
try {
|
||||
|
||||
@@ -317,7 +317,7 @@ export default new Vuex.Store({
|
||||
async setConfig({ commit }, config) {
|
||||
for (const key in config) {
|
||||
try {
|
||||
await axios.post(generateOcsUrl(`apps/deck/api/v1.0/config/${key}`), {
|
||||
await axios.post(generateOcsUrl('apps/deck/api/v1.0/config') + key, {
|
||||
value: config[key],
|
||||
})
|
||||
commit('SET_CONFIG', { key, value: config[key] })
|
||||
@@ -422,7 +422,7 @@ export default new Vuex.Store({
|
||||
params.append('itemType', [0, 1, 4, 7])
|
||||
params.append('lookup', false)
|
||||
|
||||
const response = await axios.get(generateOcsUrl('apps/files_sharing/api/v1/sharees'), { params })
|
||||
const response = await axios.get(generateOcsUrl('apps/files_sharing/api/v1') + 'sharees', { params })
|
||||
commit('setSharees', response.data.ocs.data)
|
||||
},
|
||||
|
||||
|
||||
@@ -21,39 +21,32 @@
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<DashboardWidget :items="cards"
|
||||
empty-content-icon="icon-deck"
|
||||
:empty-content-message="t('deck', 'No upcoming cards')"
|
||||
:show-more-text="t('deck', 'upcoming cards')"
|
||||
:loading="loading"
|
||||
@hide="() => {}"
|
||||
@markDone="() => {}">
|
||||
<template #default="{ item }">
|
||||
<a :key="item.id"
|
||||
:href="cardLink(item)"
|
||||
target="_blank"
|
||||
class="card">
|
||||
<div class="card--header">
|
||||
<DueDate class="right" :card="item" />
|
||||
<span class="title">{{ item.title }}</span>
|
||||
</div>
|
||||
<ul v-if="item.labels && item.labels.length"
|
||||
class="labels">
|
||||
<li v-for="label in item.labels" :key="label.id" :style="labelStyle(label)">
|
||||
<span>{{ label.title }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</a>
|
||||
</template>
|
||||
</DashboardWidget>
|
||||
<div class="center-button">
|
||||
<button @click="toggleAddCardModel">
|
||||
{{ t('deck', 'Add card') }}
|
||||
</button>
|
||||
<CardCreateDialog v-if="showAddCardModal" @close="toggleAddCardModel" />
|
||||
</div>
|
||||
</div>
|
||||
<DashboardWidget :items="cards"
|
||||
empty-content-icon="icon-deck"
|
||||
:empty-content-message="t('deck', 'No upcoming cards')"
|
||||
:show-more-text="t('deck', 'upcoming cards')"
|
||||
:show-more-url="showMoreUrl"
|
||||
:loading="loading"
|
||||
@hide="() => {}"
|
||||
@markDone="() => {}">
|
||||
<template v-slot:default="{ item }">
|
||||
<a :key="item.id"
|
||||
:href="cardLink(item)"
|
||||
target="_blank"
|
||||
class="card">
|
||||
<div class="card--header">
|
||||
<DueDate class="right" :card="item" />
|
||||
<span class="title">{{ item.title }}</span>
|
||||
</div>
|
||||
<ul v-if="item.labels && item.labels.length"
|
||||
class="labels">
|
||||
<li v-for="label in item.labels" :key="label.id" :style="labelStyle(label)">
|
||||
<span>{{ label.title }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</a>
|
||||
</template>
|
||||
</DashboardWidget>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -62,20 +55,17 @@ import { mapGetters } from 'vuex'
|
||||
import labelStyle from './../mixins/labelStyle'
|
||||
import DueDate from '../components/cards/badges/DueDate'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
import CardCreateDialog from '../CardCreateDialog'
|
||||
|
||||
export default {
|
||||
name: 'Dashboard',
|
||||
components: {
|
||||
DueDate,
|
||||
DashboardWidget,
|
||||
CardCreateDialog,
|
||||
},
|
||||
mixins: [labelStyle],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
showAddCardModal: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -91,7 +81,7 @@ export default {
|
||||
list.sort((a, b) => {
|
||||
return (new Date(a.duedate)).getTime() - (new Date(b.duedate)).getTime()
|
||||
})
|
||||
return list.slice(0, 6)
|
||||
return list
|
||||
},
|
||||
cardLink() {
|
||||
return (card) => {
|
||||
@@ -108,21 +98,12 @@ export default {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
toggleAddCardModel() {
|
||||
this.showAddCardModal = !this.showAddCardModal
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './../css/labels';
|
||||
|
||||
.center-button {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#deck-widget-empty-content {
|
||||
text-align: center;
|
||||
margin-top: 5vh;
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
const stylelintConfig = require('@nextcloud/stylelint-config')
|
||||
|
||||
module.exports = stylelintConfig
|
||||
module.exports = {
|
||||
extends: 'stylelint-config-recommended-scss',
|
||||
rules: {
|
||||
indentation: 'tab',
|
||||
'selector-type-no-unknown': null,
|
||||
'number-leading-zero': null,
|
||||
'rule-empty-line-before': [
|
||||
'always',
|
||||
{
|
||||
ignore: ['after-comment', 'inside-block']
|
||||
}
|
||||
],
|
||||
'declaration-empty-line-before': [
|
||||
'never',
|
||||
{
|
||||
ignore: ['after-declaration']
|
||||
}
|
||||
],
|
||||
'comment-empty-line-before': null,
|
||||
'selector-type-case': null,
|
||||
'selector-list-comma-newline-after': null,
|
||||
'no-descending-specificity': null,
|
||||
'string-quotes': 'single',
|
||||
'selector-pseudo-element-no-unknown': [
|
||||
true,
|
||||
{
|
||||
ignorePseudoElements: ['v-deep']
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: ['stylelint-scss']
|
||||
}
|
||||
|
||||
@@ -23,6 +23,6 @@
|
||||
|
||||
|
||||
style('deck', 'globalstyles');
|
||||
script('deck', 'deck-main');
|
||||
script('deck', 'main');
|
||||
|
||||
\OC::$server->getEventDispatcher()->dispatch('\OCP\Collaboration\Resources::loadAdditionalScripts');
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<files psalm-version="4.7.3@38c452ae584467e939d55377aaf83b5a26f19dd1">
|
||||
<files psalm-version="4.7.0@d4377c0baf3ffbf0b1ec6998e8d1be2a40971005">
|
||||
<file src="lib/Activity/ActivityManager.php">
|
||||
<TypeDoesNotContainType occurrences="1">
|
||||
<code>$message !== null</code>
|
||||
@@ -105,6 +105,10 @@
|
||||
<ParamNameMismatch occurrences="1">
|
||||
<code>$boardId</code>
|
||||
</ParamNameMismatch>
|
||||
<UndefinedClass occurrences="2">
|
||||
<code>\OCA\Circles\Api\v1\Circles</code>
|
||||
<code>\OCA\Circles\Api\v1\Circles</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="lib/Db/Card.php">
|
||||
<UndefinedClass occurrences="2">
|
||||
@@ -143,7 +147,8 @@
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>\OCA\Circles\Model\Circle</code>
|
||||
</UndefinedClass>
|
||||
<UndefinedDocblockClass occurrences="4">
|
||||
<UndefinedDocblockClass occurrences="5">
|
||||
<code>$this->object</code>
|
||||
<code>$this->object</code>
|
||||
<code>$this->object</code>
|
||||
<code>$this->object</code>
|
||||
@@ -167,11 +172,14 @@
|
||||
</ParamNameMismatch>
|
||||
</file>
|
||||
<file src="lib/Notification/Notifier.php">
|
||||
<RedundantCast occurrences="4">
|
||||
<RedundantCast occurrences="7">
|
||||
<code>(string) $l->t('%s has mentioned you in a comment on "%s".', [$dn, $params[0]])</code>
|
||||
<code>(string) $l->t('The board "%s" has been shared with you by %s.', [$params[0], $dn])</code>
|
||||
<code>(string) $l->t('The card "%s" on "%s" has been assigned to you by %s.', [$params[0], $params[1], $dn])</code>
|
||||
<code>(string) $l->t('The card "%s" on "%s" has reached its due date.', $params)</code>
|
||||
<code>(string) $l->t('{user} has assigned the card "%s" on "%s" to you.', [$params[0], $params[1]])</code>
|
||||
<code>(string) $l->t('{user} has mentioned you in a comment on "%s".', [$params[0]])</code>
|
||||
<code>(string) $l->t('{user} has shared the board %s with you.', [$params[0]])</code>
|
||||
</RedundantCast>
|
||||
</file>
|
||||
<file src="lib/Provider/DeckProvider.php">
|
||||
@@ -195,19 +203,18 @@
|
||||
</TooManyArguments>
|
||||
</file>
|
||||
<file src="lib/Service/CardService.php">
|
||||
<TooFewArguments occurrences="1">
|
||||
<code>findAssignedCards</code>
|
||||
</TooFewArguments>
|
||||
<UndefinedDocblockClass occurrences="1">
|
||||
<code>\OCP\AppFramework\Db\</code>
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="lib/Service/CirclesService.php">
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>?Circle</code>
|
||||
<UndefinedClass occurrences="2">
|
||||
<code>\OCA\Circles\Api\v1\Circles</code>
|
||||
<code>\OCA\Circles\Api\v1\Circles</code>
|
||||
</UndefinedClass>
|
||||
<UndefinedDocblockClass occurrences="3">
|
||||
<code>$circlesManager</code>
|
||||
<code>$circlesManager</code>
|
||||
<code>$circlesManager</code>
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="lib/Service/CommentService.php">
|
||||
<UndefinedThisPropertyAssignment occurrences="2">
|
||||
@@ -259,9 +266,10 @@
|
||||
</MissingDependency>
|
||||
</file>
|
||||
<file src="lib/Service/PermissionService.php">
|
||||
<UndefinedClass occurrences="2">
|
||||
<code>$circle</code>
|
||||
<UndefinedClass occurrences="3">
|
||||
<code>Member</code>
|
||||
<code>\OCA\Circles\Api\v1\Circles</code>
|
||||
<code>\OCA\Circles\Api\v1\Circles</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="lib/Service/StackService.php">
|
||||
@@ -276,9 +284,6 @@
|
||||
<InvalidReturnType occurrences="1">
|
||||
<code>getSharesInFolder</code>
|
||||
</InvalidReturnType>
|
||||
<InvalidThrow occurrences="1">
|
||||
<code>throw new GenericShareException('Already shared', $this->l->t('Path is already shared with this card'), 403);</code>
|
||||
</InvalidThrow>
|
||||
<MissingDependency occurrences="8">
|
||||
<code>GenericShareException</code>
|
||||
<code>GenericShareException</code>
|
||||
|
||||
@@ -38,7 +38,6 @@ use OCP\L10N\IFactory;
|
||||
use OCP\RichObjectStrings\IValidator;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use PHPUnit_Framework_MockObject_MockObject as MockObject;
|
||||
use OCA\Deck\Service\CardService;
|
||||
|
||||
class DeckProviderTest extends TestCase {
|
||||
|
||||
@@ -57,9 +56,6 @@ class DeckProviderTest extends TestCase {
|
||||
/** @var ICommentsManager|MockObject */
|
||||
private $commentsManager;
|
||||
|
||||
/** @var CardService|MockObject */
|
||||
private $cardService;
|
||||
|
||||
/** @var string */
|
||||
private $userId = 'admin';
|
||||
|
||||
@@ -71,9 +67,7 @@ class DeckProviderTest extends TestCase {
|
||||
$this->commentsManager = $this->createMock(ICommentsManager::class);
|
||||
$this->l10nFactory = $this->createMock(IFactory::class);
|
||||
$this->config = $this->createMock(IConfig::class);
|
||||
$this->config = $this->createMock(IConfig::class);
|
||||
$this->cardService = $this->createMock(CardService::class);
|
||||
$this->provider = new DeckProvider($this->urlGenerator, $this->activityManager, $this->userManager, $this->commentsManager, $this->l10nFactory, $this->config, $this->userId, $this->cardService);
|
||||
$this->provider = new DeckProvider($this->urlGenerator, $this->activityManager, $this->userManager, $this->commentsManager, $this->l10nFactory, $this->config, $this->userId);
|
||||
}
|
||||
|
||||
private function mockEvent($objectType, $objectId, $objectName, $subject, $subjectParameters = []) {
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
namespace OCA\Deck\Db;
|
||||
|
||||
use OCA\Deck\Service\CirclesService;
|
||||
use OCP\IGroupManager;
|
||||
use OCP\IUserManager;
|
||||
use Psr\Log\LoggerInterface;
|
||||
@@ -57,7 +56,6 @@ class AclMapperTest extends MapperTestUtility {
|
||||
\OC::$server->query(StackMapper::class),
|
||||
$this->userManager,
|
||||
$this->groupManager,
|
||||
$this->createMock(CirclesService::class),
|
||||
$this->createMock(LoggerInterface::class)
|
||||
);
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
namespace OCA\Deck\Db;
|
||||
|
||||
use OCA\Deck\Service\CirclesService;
|
||||
use OCP\IDBConnection;
|
||||
use OCP\IGroupManager;
|
||||
use OCP\IUserManager;
|
||||
@@ -64,7 +63,6 @@ class BoardMapperTest extends MapperTestUtility {
|
||||
\OC::$server->query(StackMapper::class),
|
||||
$this->userManager,
|
||||
$this->groupManager,
|
||||
$this->createMock(CirclesService::class),
|
||||
$this->createMock(LoggerInterface::class)
|
||||
);
|
||||
$this->aclMapper = \OC::$server->query(AclMapper::class);
|
||||
|
||||
@@ -42,7 +42,6 @@ use OCP\IUser;
|
||||
use OCP\IUserManager;
|
||||
use OCP\IGroupManager;
|
||||
use \Test\TestCase;
|
||||
use OCP\IURLGenerator;
|
||||
|
||||
class BoardServiceTest extends TestCase {
|
||||
|
||||
@@ -75,8 +74,6 @@ class BoardServiceTest extends TestCase {
|
||||
/** @var IEventDispatcher */
|
||||
private $eventDispatcher;
|
||||
private $userId = 'admin';
|
||||
/** @var IURLGenerator */
|
||||
private $urlGenerator;
|
||||
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
@@ -94,7 +91,6 @@ class BoardServiceTest extends TestCase {
|
||||
$this->activityManager = $this->createMock(ActivityManager::class);
|
||||
$this->changeHelper = $this->createMock(ChangeHelper::class);
|
||||
$this->eventDispatcher = $this->createMock(IEventDispatcher::class);
|
||||
$this->urlGenerator = $this->createMock(IURLGenerator::class);
|
||||
|
||||
$this->service = new BoardService(
|
||||
$this->boardMapper,
|
||||
@@ -111,7 +107,6 @@ class BoardServiceTest extends TestCase {
|
||||
$this->activityManager,
|
||||
$this->eventDispatcher,
|
||||
$this->changeHelper,
|
||||
$this->urlGenerator,
|
||||
$this->userId
|
||||
);
|
||||
|
||||
|
||||
@@ -43,7 +43,6 @@ use OCP\IUserManager;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Test\TestCase;
|
||||
use OCP\IURLGenerator;
|
||||
|
||||
class CardServiceTest extends TestCase {
|
||||
|
||||
@@ -77,9 +76,6 @@ class CardServiceTest extends TestCase {
|
||||
/** @var ChangeHelper|MockObject */
|
||||
private $changeHelper;
|
||||
|
||||
/** @var IURLGenerator|MockObject */
|
||||
private $urlGenerator;
|
||||
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->cardMapper = $this->createMock(CardMapper::class);
|
||||
@@ -96,7 +92,6 @@ class CardServiceTest extends TestCase {
|
||||
$this->userManager = $this->createMock(IUserManager::class);
|
||||
$this->eventDispatcher = $this->createMock(IEventDispatcher::class);
|
||||
$this->changeHelper = $this->createMock(ChangeHelper::class);
|
||||
$this->urlGenerator = $this->createMock(IURLGenerator::class);
|
||||
$this->cardService = new CardService(
|
||||
$this->cardMapper,
|
||||
$this->stackMapper,
|
||||
@@ -112,7 +107,6 @@ class CardServiceTest extends TestCase {
|
||||
$this->userManager,
|
||||
$this->changeHelper,
|
||||
$this->eventDispatcher,
|
||||
$this->urlGenerator,
|
||||
'user1'
|
||||
);
|
||||
}
|
||||
@@ -202,7 +196,7 @@ class CardServiceTest extends TestCase {
|
||||
$this->cardMapper->expects($this->once())->method('update')->willReturnCallback(function ($c) {
|
||||
return $c;
|
||||
});
|
||||
$actual = $this->cardService->update(123, 'newtitle', 234, 'text', 'admin', 'foo', 999, '2017-01-01 00:00:00', null);
|
||||
$actual = $this->cardService->update(123, 'newtitle', 234, 'text', 999, 'foo', 'admin', '2017-01-01 00:00:00', null);
|
||||
$this->assertEquals('newtitle', $actual->getTitle());
|
||||
$this->assertEquals(234, $actual->getStackId());
|
||||
$this->assertEquals('text', $actual->getType());
|
||||
@@ -218,7 +212,7 @@ class CardServiceTest extends TestCase {
|
||||
$this->cardMapper->expects($this->once())->method('find')->willReturn($card);
|
||||
$this->cardMapper->expects($this->never())->method('update');
|
||||
$this->expectException(StatusException::class);
|
||||
$this->cardService->update(123, 'newtitle', 234, 'text', 'admin', 'foo', 999, '2017-01-01 00:00:00', null, true);
|
||||
$this->cardService->update(123, 'newtitle', 234, 'text', 999, 'foo', 'admin', '2017-01-01 00:00:00', null, true);
|
||||
}
|
||||
|
||||
public function testRename() {
|
||||
|
||||
@@ -35,7 +35,6 @@ use OCP\IConfig;
|
||||
use OCP\IGroup;
|
||||
use OCP\IGroupManager;
|
||||
use OCP\ILogger;
|
||||
use OCP\IRequest;
|
||||
use OCP\IUser;
|
||||
use OCP\IUserManager;
|
||||
use OCP\Share\IManager;
|
||||
@@ -63,9 +62,7 @@ class PermissionServiceTest extends \Test\TestCase {
|
||||
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->logger = $this->createMock(ILogger::class);
|
||||
$this->request = $this->createMock(IRequest::class);
|
||||
$this->circlesService = $this->createMock(CirclesService::class);
|
||||
$this->logger = $this->request = $this->createMock(ILogger::class);
|
||||
$this->aclMapper = $this->createMock(AclMapper::class);
|
||||
$this->boardMapper = $this->createMock(BoardMapper::class);
|
||||
$this->userManager = $this->createMock(IUserManager::class);
|
||||
@@ -75,7 +72,6 @@ class PermissionServiceTest extends \Test\TestCase {
|
||||
|
||||
$this->service = new PermissionService(
|
||||
$this->logger,
|
||||
$this->circlesService,
|
||||
$this->aclMapper,
|
||||
$this->boardMapper,
|
||||
$this->userManager,
|
||||
|
||||
@@ -75,7 +75,7 @@ class CardControllerTest extends TestCase {
|
||||
public function testUpdate() {
|
||||
$this->cardService->expects($this->once())
|
||||
->method('update')
|
||||
->with(1, 'title', 3, 'text', $this->userId, 'foo', 5, '2017-01-01 00:00:00')
|
||||
->with(1, 'title', 3, 'text', 5, 'foo', $this->userId, '2017-01-01 00:00:00')
|
||||
->willReturn(1);
|
||||
$this->assertEquals(1, $this->controller->update(1, 'title', 3, 'text', 5, 'foo', '2017-01-01 00:00:00', null));
|
||||
}
|
||||
|
||||
@@ -24,56 +24,32 @@
|
||||
|
||||
namespace OCA\Deck\Controller;
|
||||
|
||||
use OCA\Deck\Db\CardMapper;
|
||||
use OCA\Deck\Service\CardService;
|
||||
use OCA\Deck\Service\ConfigService;
|
||||
use OCA\Deck\Service\PermissionService;
|
||||
use OCP\EventDispatcher\IEventDispatcher;
|
||||
use OCP\IInitialStateService;
|
||||
use OCP\IL10N;
|
||||
use OCP\IRequest;
|
||||
use OCP\IURLGenerator;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class PageControllerTest extends TestCase {
|
||||
class PageControllerTest extends \Test\TestCase {
|
||||
private $controller;
|
||||
private $request;
|
||||
private $l10n;
|
||||
private $permissionService;
|
||||
private $initialState;
|
||||
private $configService;
|
||||
private $eventDispatcher;
|
||||
/**
|
||||
* @var mixed|CardMapper|\PHPUnit\Framework\MockObject\MockObject
|
||||
*/
|
||||
private $cardMapper;
|
||||
/**
|
||||
* @var mixed|IURLGenerator|\PHPUnit\Framework\MockObject\MockObject
|
||||
*/
|
||||
private $urlGenerator;
|
||||
/**
|
||||
* @var mixed|CardService|\PHPUnit\Framework\MockObject\MockObject
|
||||
*/
|
||||
private $cardService;
|
||||
|
||||
public function setUp(): void {
|
||||
$this->l10n = $this->createMock(IL10N::class);
|
||||
$this->request = $this->createMock(IRequest::class);
|
||||
$this->permissionService = $this->createMock(PermissionService::class);
|
||||
$this->configService = $this->createMock(ConfigService::class);
|
||||
$this->initialState = $this->createMock(IInitialStateService::class);
|
||||
$this->eventDispatcher = $this->createMock(IEventDispatcher::class);
|
||||
$this->cardMapper = $this->createMock(CardMapper::class);
|
||||
$this->urlGenerator = $this->createMock(IURLGenerator::class);
|
||||
$this->cardService = $this->createMock(CardService::class);
|
||||
|
||||
$this->controller = new PageController(
|
||||
'deck',
|
||||
$this->request,
|
||||
$this->permissionService,
|
||||
$this->initialState,
|
||||
$this->configService,
|
||||
$this->eventDispatcher,
|
||||
$this->cardMapper,
|
||||
$this->urlGenerator,
|
||||
$this->cardService
|
||||
'deck', $this->request, $this->permissionService, $this->initialState, $this->configService, $this->eventDispatcher
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
43
webpack.js
43
webpack.js
@@ -1,20 +1,33 @@
|
||||
const webpackConfig = require('@nextcloud/webpack-vue-config')
|
||||
const path = require('path')
|
||||
const { merge } = require('webpack-merge')
|
||||
|
||||
webpackConfig.entry = {
|
||||
...webpackConfig.entry,
|
||||
collections: path.join(__dirname, 'src', 'init-collections.js'),
|
||||
dashboard: path.join(__dirname, 'src', 'init-dashboard.js'),
|
||||
calendar: path.join(__dirname, 'src', 'init-calendar.js'),
|
||||
talk: path.join(__dirname, 'src', 'init-talk.js'),
|
||||
const config = {
|
||||
entry: {
|
||||
collections: path.join(__dirname, 'src', 'init-collections.js'),
|
||||
dashboard: path.join(__dirname, 'src', 'init-dashboard.js'),
|
||||
calendar: path.join(__dirname, 'src', 'init-calendar.js'),
|
||||
talk: path.join(__dirname, 'src', 'init-talk.js'),
|
||||
},
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
jsonpFunction: 'webpackJsonpOCADeck',
|
||||
chunkFilename: '[name].js?v=[contenthash]',
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['*', '.js', '.vue', '.json'],
|
||||
modules: [
|
||||
path.resolve(__dirname, 'node_modules'),
|
||||
'node_modules',
|
||||
],
|
||||
},
|
||||
stats: {
|
||||
context: path.resolve(__dirname, 'src'),
|
||||
assets: true,
|
||||
entrypoints: true,
|
||||
chunks: true,
|
||||
modules: true
|
||||
}
|
||||
}
|
||||
|
||||
webpackConfig.stats = {
|
||||
context: path.resolve(__dirname, 'src'),
|
||||
assets: true,
|
||||
entrypoints: true,
|
||||
chunks: true,
|
||||
modules: true,
|
||||
}
|
||||
|
||||
module.exports = webpackConfig
|
||||
module.exports = merge(webpackConfig, config)
|
||||
|
||||
Reference in New Issue
Block a user