Compare commits
453 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
672616d14a | ||
|
|
caa5464f88 | ||
|
|
78e96962c2 | ||
|
|
a07b0e1d66 | ||
|
|
c7b0b4c4a8 | ||
|
|
1e12559cb2 | ||
|
|
5a3fe55d1b | ||
|
|
95c274c59b | ||
|
|
dda1702afb | ||
|
|
632871ad4d | ||
|
|
6c1f4744cc | ||
|
|
df2beaf5a5 | ||
|
|
a91e0eb1ac | ||
|
|
25875f1c05 | ||
|
|
116e124b2d | ||
|
|
497d06c700 | ||
|
|
cea66746d7 | ||
|
|
c807fcf635 | ||
|
|
73b6053a5e | ||
|
|
2ab4766085 | ||
|
|
9d0f7d6f95 | ||
|
|
a833f4190a | ||
|
|
fa9f220834 | ||
|
|
a07cb8b9db | ||
|
|
833f1ed0df | ||
|
|
8ceb48baef | ||
|
|
33f8e33a9e | ||
|
|
da7af01577 | ||
|
|
6ac95eda6f | ||
|
|
57c8e9b51b | ||
|
|
a1bc2a34b1 | ||
|
|
3a243b4869 | ||
|
|
090e67f473 | ||
|
|
55049ce411 | ||
|
|
2444adf5a1 | ||
|
|
3f71b3e190 | ||
|
|
869ff5bb84 | ||
|
|
3741d53ebf | ||
|
|
6d37fd72d7 | ||
|
|
5447fe69cd | ||
|
|
219a316cb0 | ||
|
|
53bc3b75ef | ||
|
|
4313351ee5 | ||
|
|
70953909f8 | ||
|
|
10b7cd649d | ||
|
|
3aa3d57c3b | ||
|
|
004c55a661 | ||
|
|
4537ca72da | ||
|
|
7399cdc7c8 | ||
|
|
188b42e46f | ||
|
|
c5e4274503 | ||
|
|
62d4b387bb | ||
|
|
e97672a321 | ||
|
|
9c420cdaec | ||
|
|
a590f1407f | ||
|
|
7331d0a77a | ||
|
|
d4189cfb95 | ||
|
|
69fd17df43 | ||
|
|
0204d38b8f | ||
|
|
7081e617fa | ||
|
|
fd87c34a00 | ||
|
|
d6030a3f09 | ||
|
|
7494e35ffb | ||
|
|
9532a5f935 | ||
|
|
5953b8a829 | ||
|
|
2c67766914 | ||
|
|
a0d9c519ee | ||
|
|
f0594aac2e | ||
|
|
71a3c114db | ||
|
|
829189f97d | ||
|
|
2a7e14941e | ||
|
|
2f08b27798 | ||
|
|
a9408f4aa7 | ||
|
|
8e04fb9c09 | ||
|
|
8ef5f7c12a | ||
|
|
f707440080 | ||
|
|
d7ec9d7d0c | ||
|
|
e978a1b518 | ||
|
|
25ab49e0c0 | ||
|
|
56c5b5b7ef | ||
|
|
a82deb6210 | ||
|
|
e66db256cf | ||
|
|
b360d50129 | ||
|
|
8c4b5cc7e5 | ||
|
|
27b135753b | ||
|
|
c77058222a | ||
|
|
78f64f7c04 | ||
|
|
6cd5b1a0aa | ||
|
|
ea009fa1ee | ||
|
|
5d4a4d3520 | ||
|
|
40f98a5883 | ||
|
|
b6fb131cc9 | ||
|
|
cf88330910 | ||
|
|
e47c66a669 | ||
|
|
e7387acd24 | ||
|
|
4d18c1d361 | ||
|
|
cf36de3f10 | ||
|
|
911e7bbeb7 | ||
|
|
47204d57a8 | ||
|
|
cd40a1617b | ||
|
|
3cbf284e4f | ||
|
|
e0d8cbf1ac | ||
|
|
8d91224998 | ||
|
|
0413a56bcd | ||
|
|
6910158bb4 | ||
|
|
48ec850f46 | ||
|
|
e761133022 | ||
|
|
5b051acdae | ||
|
|
7bf07ee0ab | ||
|
|
0dd16e09a9 | ||
|
|
4f3590c067 | ||
|
|
acd6d0d956 | ||
|
|
e3a6adb430 | ||
|
|
6600f133a2 | ||
|
|
3cf976650d | ||
|
|
64fc71aa6d | ||
|
|
cebe7e7409 | ||
|
|
635c68da80 | ||
|
|
595c099b46 | ||
|
|
93411a10e7 | ||
|
|
c77477ab97 | ||
|
|
834e068844 | ||
|
|
f5e36b97d9 | ||
|
|
557e229f79 | ||
|
|
592e4db5bf | ||
|
|
77ab2fe709 | ||
|
|
81c06a8e76 | ||
|
|
f262911dad | ||
|
|
847d21b962 | ||
|
|
752c973082 | ||
|
|
3613316bf4 | ||
|
|
e77b1928b4 | ||
|
|
82c7d13049 | ||
|
|
9a629167d8 | ||
|
|
5714dc17f2 | ||
|
|
d6721cd3ec | ||
|
|
94af83966c | ||
|
|
042b84ff5c | ||
|
|
4d5c09334d | ||
|
|
3a27e94afa | ||
|
|
9243a43082 | ||
|
|
f56bf48446 | ||
|
|
4d5321bfc4 | ||
|
|
36b7f3b491 | ||
|
|
7346142ef2 | ||
|
|
b54e52ce7e | ||
|
|
0d18b82c04 | ||
|
|
ba4f8d13bc | ||
|
|
2a27789854 | ||
|
|
15d07a23e7 | ||
|
|
75ed083c93 | ||
|
|
517641eed2 | ||
|
|
90afe70022 | ||
|
|
c2c0324f58 | ||
|
|
9305a836f9 | ||
|
|
96a0176194 | ||
|
|
fbbbd372c2 | ||
|
|
26fabf2b37 | ||
|
|
240e230c5d | ||
|
|
0f804bb113 | ||
|
|
33faee97eb | ||
|
|
fa842d10df | ||
|
|
587e0f439a | ||
|
|
74c517690d | ||
|
|
6663a522f1 | ||
|
|
27025d2d8e | ||
|
|
58a9ff4e39 | ||
|
|
80ca8f4b15 | ||
|
|
fd838c52b0 | ||
|
|
b9eb84bf05 | ||
|
|
d4019016bc | ||
|
|
eecdcd7a95 | ||
|
|
1e5f8910c7 | ||
|
|
9b73f8436d | ||
|
|
d5750309fe | ||
|
|
5639683ad3 | ||
|
|
c25b8905e6 | ||
|
|
b5d18298f9 | ||
|
|
3d678819f8 | ||
|
|
6a6f9b1aee | ||
|
|
db143b8dd9 | ||
|
|
290f35434f | ||
|
|
6c681355c2 | ||
|
|
4501e98bc3 | ||
|
|
aaae6250ef | ||
|
|
6e9379fd6f | ||
|
|
c081102c13 | ||
|
|
a352aaf924 | ||
|
|
0bdba67953 | ||
|
|
f2e1a24b6b | ||
|
|
e8111ddd2d | ||
|
|
23dfb4debe | ||
|
|
795d68024c | ||
|
|
964acbf02b | ||
|
|
5d4bec2aa4 | ||
|
|
435367ccd4 | ||
|
|
640a4b6ece | ||
|
|
0728342c34 | ||
|
|
6891b80eb2 | ||
|
|
63eb8cf350 | ||
|
|
3a5d5bd449 | ||
|
|
5b81f4b614 | ||
|
|
4ee7203990 | ||
|
|
3039d6dce2 | ||
|
|
60df897bd2 | ||
|
|
b78f8a664f | ||
|
|
9ca442f959 | ||
|
|
fd9883207e | ||
|
|
073093c958 | ||
|
|
f98873093d | ||
|
|
f160ec63c0 | ||
|
|
f5648284f2 | ||
|
|
890893f9e3 | ||
|
|
748f8bee3f | ||
|
|
d93d4af44f | ||
|
|
e98188fbf8 | ||
|
|
2ae9f71483 | ||
|
|
8954569aee | ||
|
|
ef463f32e6 | ||
|
|
72b5e1baf6 | ||
|
|
185699f6d7 | ||
|
|
2f4f7d9fc0 | ||
|
|
9fdfbd7239 | ||
|
|
dc84f29e4f | ||
|
|
f77655ec35 | ||
|
|
5e2f6305fa | ||
|
|
3112301260 | ||
|
|
5da87e3a2e | ||
|
|
dc59f96e59 | ||
|
|
2cc4f133a5 | ||
|
|
14317ef4d5 | ||
|
|
37e459948c | ||
|
|
b507a83ea1 | ||
|
|
3e4c2eb324 | ||
|
|
e127b1ee77 | ||
|
|
3704b17f41 | ||
|
|
3fdd8a4a4d | ||
|
|
1750046eb0 | ||
|
|
e9ab1ae6fc | ||
|
|
f6783f14cd | ||
|
|
6aa824385c | ||
|
|
0a79232bfe | ||
|
|
530b3be82a | ||
|
|
efeb2278f4 | ||
|
|
a3891c792c | ||
|
|
07c219dfa7 | ||
|
|
221fa2eab6 | ||
|
|
3f6d42257d | ||
|
|
81ca7c887e | ||
|
|
99c858e134 | ||
|
|
6644b11af7 | ||
|
|
801259479d | ||
|
|
4dc27f4e7e | ||
|
|
42085fac7f | ||
|
|
a95dc22cba | ||
|
|
6b5bf3c7cd | ||
|
|
2f046a7c80 | ||
|
|
bd5bb01944 | ||
|
|
2ade022deb | ||
|
|
afc3b6c307 | ||
|
|
e396c17828 | ||
|
|
3134607498 | ||
|
|
d5975e6f64 | ||
|
|
b0e67abdc8 | ||
|
|
48bac5b089 | ||
|
|
7e7d4406b9 | ||
|
|
3dc1122c1f | ||
|
|
90f0298cdb | ||
|
|
f57102ef8c | ||
|
|
e75d7bfe1f | ||
|
|
0a78018dd2 | ||
|
|
5e441c72e4 | ||
|
|
5180c3599b | ||
|
|
bd610f1e75 | ||
|
|
fc55d571f8 | ||
|
|
d0234d1a23 | ||
|
|
505bbabe3c | ||
|
|
cc4a3936f4 | ||
|
|
7312e0bc4d | ||
|
|
4965a07ae9 | ||
|
|
47225513e0 | ||
|
|
2dea87d0cc | ||
|
|
fc5bc30400 | ||
|
|
cd711fbcc9 | ||
|
|
ac3ddf5666 | ||
|
|
b02556783e | ||
|
|
9718e523a1 | ||
|
|
e9d057bb3a | ||
|
|
e19d97232e | ||
|
|
67ae0b5fce | ||
|
|
687934fb44 | ||
|
|
0c13ab5060 | ||
|
|
5f6b77bd29 | ||
|
|
27a258bd58 | ||
|
|
777598de30 | ||
|
|
eeb33bd2d4 | ||
|
|
16c34b35dd | ||
|
|
1882cabff4 | ||
|
|
dd4142d47c | ||
|
|
0817e99c0d | ||
|
|
3cef62927a | ||
|
|
a66293eba2 | ||
|
|
0c6f4f7ab8 | ||
|
|
0e7df10872 | ||
|
|
52af5955a3 | ||
|
|
680ed918be | ||
|
|
d06a73b233 | ||
|
|
8d7d35d28a | ||
|
|
3be3c0cef1 | ||
|
|
c302eaf0dc | ||
|
|
257bad8c6c | ||
|
|
db25b83a06 | ||
|
|
7daaf97514 | ||
|
|
1baff63376 | ||
|
|
6fb5ccca15 | ||
|
|
efa097df5b | ||
|
|
0f9cb189a8 | ||
|
|
90ae3130c1 | ||
|
|
a3bfda27e8 | ||
|
|
572b1ba9fa | ||
|
|
e7ac681415 | ||
|
|
907de3c88d | ||
|
|
75f015759d | ||
|
|
c228277453 | ||
|
|
17e07fae08 | ||
|
|
88adbe8514 | ||
|
|
bf022a75e5 | ||
|
|
d21af86dc1 | ||
|
|
4a95e4a7a0 | ||
|
|
e830de6ca1 | ||
|
|
66676e09b0 | ||
|
|
c834b58c9a | ||
|
|
b9ae5e558d | ||
|
|
650ca34399 | ||
|
|
a001ad76b0 | ||
|
|
da93c1a4c6 | ||
|
|
c5cf9a9d95 | ||
|
|
e95936dbcd | ||
|
|
68e066a86c | ||
|
|
986a34176c | ||
|
|
0d941ac960 | ||
|
|
3d08e5c767 | ||
|
|
024fa24cc7 | ||
|
|
f24bda2de2 | ||
|
|
d54471eadd | ||
|
|
70e0247334 | ||
|
|
43c144a9cc | ||
|
|
5ec4e4796d | ||
|
|
9a2a3f0b4c | ||
|
|
8444b510ce | ||
|
|
e4e5c9a651 | ||
|
|
9e813f322a | ||
|
|
70144b9061 | ||
|
|
27af65731e | ||
|
|
2778e5940c | ||
|
|
e20f2eac97 | ||
|
|
a91262b153 | ||
|
|
084c3649b2 | ||
|
|
c6584b93f3 | ||
|
|
57ed57ce23 | ||
|
|
77a81d273a | ||
|
|
b2e3d75b75 | ||
|
|
4de693a402 | ||
|
|
08febcb29a | ||
|
|
c1b6cc1149 | ||
|
|
2f43aabb2e | ||
|
|
50293ffbb4 | ||
|
|
a52bc5dc3f | ||
|
|
5acf52370a | ||
|
|
85e46f2513 | ||
|
|
db485aa713 | ||
|
|
e8aaa7c165 | ||
|
|
281d6c2af7 | ||
|
|
c8714ec821 | ||
|
|
84b2036374 | ||
|
|
5c65bf9b00 | ||
|
|
237f832ad1 | ||
|
|
d019d80efa | ||
|
|
42a2ef39db | ||
|
|
ed7c9fbf05 | ||
|
|
4f4627a600 | ||
|
|
7900c73d90 | ||
|
|
0030b8c20c | ||
|
|
fbc7d3135d | ||
|
|
7350ae2ef3 | ||
|
|
9cebe7ac56 | ||
|
|
bfe45c5af4 | ||
|
|
c3c8faffea | ||
|
|
96508580fd | ||
|
|
ee7fcefd73 | ||
|
|
ac31ff6efe | ||
|
|
af6111b51e | ||
|
|
6700c903eb | ||
|
|
10e48aded1 | ||
|
|
e80ba82d77 | ||
|
|
48202e6d98 | ||
|
|
e3ba870577 | ||
|
|
56fae37144 | ||
|
|
af9177584c | ||
|
|
d850c744cd | ||
|
|
cd60f4bf80 | ||
|
|
eddb6fc460 | ||
|
|
6684023424 | ||
|
|
43bec159ff | ||
|
|
27d960340e | ||
|
|
3cda8eab77 | ||
|
|
aac5c1ff72 | ||
|
|
65c0fcfdc9 | ||
|
|
c71d54a26e | ||
|
|
0224da2127 | ||
|
|
3114e1a477 | ||
|
|
375c78271d | ||
|
|
2b903ecf7f | ||
|
|
9e256921ba | ||
|
|
d7e85ac4da | ||
|
|
4495fc3554 | ||
|
|
6996c862ce | ||
|
|
f81d98fb4b | ||
|
|
cd942a1dfb | ||
|
|
ddd15e7451 | ||
|
|
21908ef534 | ||
|
|
426f1a33dd | ||
|
|
713271d525 | ||
|
|
a43efce576 | ||
|
|
07f2fb7c28 | ||
|
|
72563feaf0 | ||
|
|
763a474d11 | ||
|
|
3977d71892 | ||
|
|
25f3da3603 | ||
|
|
2920ca8c86 | ||
|
|
da7e075ee9 | ||
|
|
c7341bed78 | ||
|
|
d9014903ac | ||
|
|
5dad6bb0b0 | ||
|
|
e7529e2d74 | ||
|
|
c0e07dc202 | ||
|
|
2619219618 | ||
|
|
87a0a4ed4f | ||
|
|
df01d8ef79 | ||
|
|
9f38e51d9b | ||
|
|
3f2e343541 | ||
|
|
ea6006bec0 | ||
|
|
1e625d3955 | ||
|
|
4b0a27d6b5 | ||
|
|
9cc38000fd | ||
|
|
3574abe0cb | ||
|
|
fb5aed2143 | ||
|
|
3506ac2a42 | ||
|
|
1f2f8fe001 | ||
|
|
97d9c4cc2c | ||
|
|
b169ecd0fe | ||
|
|
912376a99d | ||
|
|
3ec2ad99b1 |
@@ -1,29 +0,0 @@
|
||||
{
|
||||
"image": "ghcr.io/juliushaertl/nextcloud-dev-php80:latest",
|
||||
"forwardPorts": [80],
|
||||
"containerEnv": {
|
||||
"NEXTCLOUD_AUTOINSTALL_APPS": "deck",
|
||||
"XDEBUG_MODE": "debug"
|
||||
},
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"felixfbecker.php-intellisense",
|
||||
"octref.vetur"
|
||||
],
|
||||
"settings": {
|
||||
"php.suggest.basic": false,
|
||||
"git.alwaysSignOff": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"workspaceMount": "source=${localWorkspaceFolder},target=/var/www/html/apps-extra/deck,type=bind",
|
||||
"workspaceFolder": "/var/www/html/apps-extra/deck",
|
||||
"overrideCommand": true,
|
||||
"postAttachCommand": "bash ./.devcontainer/setup.sh",
|
||||
"portsAttributes": {
|
||||
"80": {
|
||||
"label": "Webserver"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
(
|
||||
cd /tmp && /usr/local/bin/bootstrap.sh apache2ctl start
|
||||
)
|
||||
|
||||
composer install --no-dev
|
||||
npm ci
|
||||
npm run dev
|
||||
4
.github/dependabot.yml
vendored
4
.github/dependabot.yml
vendored
@@ -13,7 +13,7 @@ updates:
|
||||
- juliushaertl
|
||||
|
||||
- package-ecosystem: npm
|
||||
target-branch: stable27
|
||||
target-branch: stable25
|
||||
versioning-strategy: lockfile-only
|
||||
directory: "/"
|
||||
schedule:
|
||||
@@ -30,7 +30,7 @@ updates:
|
||||
- dependencies
|
||||
|
||||
- package-ecosystem: npm
|
||||
target-branch: stable26
|
||||
target-branch: stable24
|
||||
versioning-strategy: lockfile-only
|
||||
directory: "/"
|
||||
schedule:
|
||||
|
||||
8
.github/workflows/appbuild.yml
vendored
8
.github/workflows/appbuild.yml
vendored
@@ -13,18 +13,18 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x]
|
||||
node-version: [14.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Set up npm7
|
||||
run: npm i -g npm@7
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@2.27.1
|
||||
uses: shivammathur/setup-php@2.24.0
|
||||
with:
|
||||
php-version: '7.4'
|
||||
tools: composer
|
||||
|
||||
21
.github/workflows/appstore-build-publish.yml
vendored
21
.github/workflows/appstore-build-publish.yml
vendored
@@ -10,7 +10,7 @@ on:
|
||||
types: [published]
|
||||
|
||||
env:
|
||||
PHP_VERSION: 8.2
|
||||
PHP_VERSION: 8.1
|
||||
|
||||
jobs:
|
||||
build_and_publish:
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
|
||||
with:
|
||||
path: ${{ env.APP_NAME }}
|
||||
|
||||
@@ -44,19 +44,19 @@ jobs:
|
||||
expression: "//info//dependencies//nextcloud/@min-version"
|
||||
|
||||
- name: Read package.json node and npm engines version
|
||||
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
|
||||
uses: skjnldsv/read-package-engines-version-actions@1bdcee71fa343c46b18dc6aceffb4cd1e35209c6 # v1.2
|
||||
id: versions
|
||||
# Continue if no package.json
|
||||
continue-on-error: true
|
||||
with:
|
||||
path: ${{ env.APP_NAME }}
|
||||
fallbackNode: '^20'
|
||||
fallbackNpm: '^9'
|
||||
fallbackNode: "^16"
|
||||
fallbackNpm: "^7"
|
||||
|
||||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
||||
# Skip if no package.json
|
||||
if: ${{ steps.versions.outputs.nodeVersion }}
|
||||
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v3
|
||||
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3
|
||||
with:
|
||||
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
||||
|
||||
@@ -66,7 +66,7 @@ jobs:
|
||||
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
|
||||
|
||||
- name: Set up php ${{ env.PHP_VERSION }}
|
||||
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
|
||||
uses: shivammathur/setup-php@2.24.0 # v2
|
||||
with:
|
||||
php-version: ${{ env.PHP_VERSION }}
|
||||
coverage: none
|
||||
@@ -88,8 +88,6 @@ jobs:
|
||||
- name: Build ${{ env.APP_NAME }}
|
||||
# Skip if no package.json
|
||||
if: ${{ steps.versions.outputs.nodeVersion }}
|
||||
env:
|
||||
CYPRESS_INSTALL_BINARY: 0
|
||||
run: |
|
||||
cd ${{ env.APP_NAME }}
|
||||
npm ci
|
||||
@@ -128,10 +126,9 @@ jobs:
|
||||
unzip latest-$NCVERSION.zip
|
||||
|
||||
- name: Checkout server master fallback
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
|
||||
if: ${{ steps.server-checkout.outcome != 'success' }}
|
||||
with:
|
||||
submodules: true
|
||||
repository: nextcloud/server
|
||||
path: nextcloud
|
||||
|
||||
@@ -151,7 +148,7 @@ jobs:
|
||||
tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
|
||||
|
||||
- name: Attach tarball to github release
|
||||
uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df # v2
|
||||
uses: svenstaro/upload-release-action@7319e4733ec7a184d739a6f412c40ffc339b69c7 # v2
|
||||
id: attach_to_release
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
8
.github/workflows/command-rebase.yml
vendored
8
.github/workflows/command-rebase.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Add reaction on start
|
||||
uses: peter-evans/create-or-update-comment@23ff15729ef2fc348714a3bb66d2f655ca9066f2 # v3.1.0
|
||||
uses: peter-evans/create-or-update-comment@67dcc547d311b736a8e6c5c236542148a47adc3d # v2.1.1
|
||||
with:
|
||||
token: ${{ secrets.COMMAND_BOT_PAT }}
|
||||
repository: ${{ github.event.repository.full_name }}
|
||||
@@ -31,18 +31,18 @@ jobs:
|
||||
reaction-type: "+1"
|
||||
|
||||
- name: Checkout the latest code
|
||||
uses: actions/checkout@v4 # v3.5.2
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.COMMAND_BOT_PAT }}
|
||||
|
||||
- name: Automatic Rebase
|
||||
uses: cirrus-actions/rebase@b87d48154a87a85666003575337e27b8cd65f691 # 1.8
|
||||
uses: cirrus-actions/rebase@6e572f08c244e2f04f9beb85a943eb618218714d # 1.7
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
|
||||
|
||||
- name: Add reaction on failure
|
||||
uses: peter-evans/create-or-update-comment@23ff15729ef2fc348714a3bb66d2f655ca9066f2 # v3.1.0
|
||||
uses: peter-evans/create-or-update-comment@67dcc547d311b736a8e6c5c236542148a47adc3d # v2.1.1
|
||||
if: failure()
|
||||
with:
|
||||
token: ${{ secrets.COMMAND_BOT_PAT }}
|
||||
|
||||
20
.github/workflows/cypress.yml
vendored
20
.github/workflows/cypress.yml
vendored
@@ -19,17 +19,19 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: [20.x]
|
||||
node-version: [14.x]
|
||||
# containers: [1, 2, 3]
|
||||
php-versions: [ '8.0' ]
|
||||
databases: [ 'sqlite' ]
|
||||
server-versions: [ 'stable28' ]
|
||||
server-versions: [ 'stable26' ]
|
||||
|
||||
steps:
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Set up npm7
|
||||
run: npm i -g npm@7
|
||||
|
||||
- name: Register text Git reference
|
||||
run: |
|
||||
@@ -37,7 +39,7 @@ jobs:
|
||||
echo "text_app_ref=$text_app_ref" >> $GITHUB_ENV
|
||||
|
||||
- name: Checkout server
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: nextcloud/server
|
||||
ref: ${{ matrix.server-versions }}
|
||||
@@ -50,19 +52,19 @@ jobs:
|
||||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
||||
|
||||
- name: Checkout ${{ env.APP_NAME }}
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: apps/${{ env.APP_NAME }}
|
||||
|
||||
- name: Checkout text
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: nextcloud/text
|
||||
ref: ${{ env.text_app_ref }}
|
||||
path: apps/text
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2.27.1
|
||||
uses: shivammathur/setup-php@2.24.0
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, zip, gd, apcu
|
||||
@@ -94,9 +96,9 @@ jobs:
|
||||
curl -v http://localhost:8081/index.php/login
|
||||
|
||||
- name: Cypress run
|
||||
uses: cypress-io/github-action@v6
|
||||
uses: cypress-io/github-action@v5
|
||||
with:
|
||||
record: false
|
||||
record: true
|
||||
parallel: false
|
||||
wait-on: '${{ env.CYPRESS_baseUrl }}'
|
||||
working-directory: 'apps/${{ env.APP_NAME }}'
|
||||
|
||||
34
.github/workflows/fixup.yml
vendored
34
.github/workflows/fixup.yml
vendored
@@ -3,31 +3,31 @@
|
||||
# https://github.com/nextcloud/.github
|
||||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
|
||||
|
||||
name: Block fixup and squash commits
|
||||
name: Pull request checks
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, ready_for_review, reopened, synchronize]
|
||||
pull_request:
|
||||
types: [opened, ready_for_review, reopened, synchronize]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: fixup-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
group: fixup-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
commit-message-check:
|
||||
if: github.event.pull_request.draft == false
|
||||
commit-message-check:
|
||||
if: github.event.pull_request.draft == false
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
name: Block fixup and squash commits
|
||||
permissions:
|
||||
pull-requests: write
|
||||
name: Block fixup and squash commits
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Run check
|
||||
uses: skjnldsv/block-fixup-merge-action@42d26e1b536ce61e5cf467d65fb76caf4aa85acf # v1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- name: Run check
|
||||
uses: xt0rted/block-autosquash-commits-action@79880c36b4811fe549cfffe20233df88876024e7 # v2
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
10
.github/workflows/integration.yml
vendored
10
.github/workflows/integration.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
||||
matrix:
|
||||
php-versions: ['8.1']
|
||||
databases: ['sqlite', 'mysql', 'pgsql']
|
||||
server-versions: ['stable28']
|
||||
server-versions: ['stable26']
|
||||
|
||||
name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
|
||||
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout server
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: nextcloud/server
|
||||
ref: ${{ matrix.server-versions }}
|
||||
@@ -66,7 +66,7 @@ jobs:
|
||||
cd build/integration && composer require --dev phpunit/phpunit:~9
|
||||
|
||||
- name: Checkout app
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: apps/${{ env.APP_NAME }}
|
||||
|
||||
@@ -78,7 +78,7 @@ jobs:
|
||||
path: apps/activity
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2.27.1
|
||||
uses: shivammathur/setup-php@2.25.5
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, mysql, pdo_mysql, pgsql, pdo_pgsql, apcu
|
||||
@@ -114,7 +114,7 @@ jobs:
|
||||
|
||||
- name: Query count
|
||||
if: ${{ matrix.databases == 'mysql' }}
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
script: |
|
||||
|
||||
75
.github/workflows/lint-eslint.yml
vendored
75
.github/workflows/lint-eslint.yml
vendored
@@ -6,9 +6,22 @@
|
||||
# Use lint-eslint together with lint-eslint-when-unrelated to make eslint a required check for GitHub actions
|
||||
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
|
||||
|
||||
name: Lint eslint
|
||||
name: Lint
|
||||
|
||||
on: pull_request
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'src/**'
|
||||
- 'appinfo/info.xml'
|
||||
- 'package.json'
|
||||
- 'package-lock.json'
|
||||
- 'tsconfig.json'
|
||||
- '.eslintrc.*'
|
||||
- '.eslintignore'
|
||||
- '**.js'
|
||||
- '**.ts'
|
||||
- '**.vue'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -18,52 +31,24 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
outputs:
|
||||
src: ${{ steps.changes.outputs.src}}
|
||||
|
||||
steps:
|
||||
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
with:
|
||||
filters: |
|
||||
src:
|
||||
- '.github/workflows/**'
|
||||
- 'src/**'
|
||||
- 'appinfo/info.xml'
|
||||
- 'package.json'
|
||||
- 'package-lock.json'
|
||||
- 'tsconfig.json'
|
||||
- '.eslintrc.*'
|
||||
- '.eslintignore'
|
||||
- '**.js'
|
||||
- '**.ts'
|
||||
- '**.vue'
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: changes
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
|
||||
name: NPM lint
|
||||
name: eslint
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
|
||||
|
||||
- name: Read package.json node and npm engines version
|
||||
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
|
||||
uses: skjnldsv/read-package-engines-version-actions@1bdcee71fa343c46b18dc6aceffb4cd1e35209c6 # v1.2
|
||||
id: versions
|
||||
with:
|
||||
fallbackNode: '^20'
|
||||
fallbackNpm: '^9'
|
||||
fallbackNode: '^16'
|
||||
fallbackNpm: '^7'
|
||||
|
||||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
||||
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v3
|
||||
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3
|
||||
with:
|
||||
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
||||
|
||||
@@ -71,25 +56,7 @@ jobs:
|
||||
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
|
||||
|
||||
- name: Install dependencies
|
||||
env:
|
||||
CYPRESS_INSTALL_BINARY: 0
|
||||
PUPPETEER_SKIP_DOWNLOAD: true
|
||||
run: npm ci
|
||||
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
|
||||
summary:
|
||||
permissions:
|
||||
contents: none
|
||||
runs-on: ubuntu-latest
|
||||
needs: [changes, lint]
|
||||
|
||||
if: always()
|
||||
|
||||
# This is the summary, we just avoid to rename it so that branch protection rules still match
|
||||
name: eslint
|
||||
|
||||
steps:
|
||||
- name: Summary status
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.lint.result != 'success' }}; then exit 1; fi
|
||||
|
||||
11
.github/workflows/lint-php-cs.yml
vendored
11
.github/workflows/lint-php-cs.yml
vendored
@@ -3,7 +3,7 @@
|
||||
# https://github.com/nextcloud/.github
|
||||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
|
||||
|
||||
name: Lint php-cs
|
||||
name: Lint
|
||||
|
||||
on: pull_request
|
||||
|
||||
@@ -22,14 +22,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
|
||||
|
||||
- name: Set up php8.2
|
||||
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
|
||||
- name: Set up php
|
||||
uses: shivammathur/setup-php@2.24.0 # v2
|
||||
with:
|
||||
php-version: 8.2
|
||||
php-version: 8.1
|
||||
coverage: none
|
||||
ini-file: development
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
17
.github/workflows/lint-php.yml
vendored
17
.github/workflows/lint-php.yml
vendored
@@ -3,9 +3,15 @@
|
||||
# https://github.com/nextcloud/.github
|
||||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
|
||||
|
||||
name: Lint php
|
||||
name: Lint
|
||||
|
||||
on: pull_request
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
- stable*
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -19,20 +25,19 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
php-versions: [ '8.0', '8.1', '8.2', '8.3' ]
|
||||
php-versions: [ "8.0", "8.1", "8.2" ]
|
||||
|
||||
name: php-lint
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
|
||||
uses: shivammathur/setup-php@2.24.0 # v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
coverage: none
|
||||
ini-file: development
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
14
.github/workflows/lint-stylelint.yml
vendored
14
.github/workflows/lint-stylelint.yml
vendored
@@ -3,7 +3,7 @@
|
||||
# https://github.com/nextcloud/.github
|
||||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
|
||||
|
||||
name: Lint stylelint
|
||||
name: Lint
|
||||
|
||||
on: pull_request
|
||||
|
||||
@@ -22,17 +22,17 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
|
||||
|
||||
- name: Read package.json node and npm engines version
|
||||
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
|
||||
uses: skjnldsv/read-package-engines-version-actions@1bdcee71fa343c46b18dc6aceffb4cd1e35209c6 # v1.2
|
||||
id: versions
|
||||
with:
|
||||
fallbackNode: '^20'
|
||||
fallbackNpm: '^9'
|
||||
fallbackNode: '^16'
|
||||
fallbackNpm: '^7'
|
||||
|
||||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
||||
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v3
|
||||
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3
|
||||
with:
|
||||
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
||||
|
||||
@@ -40,8 +40,6 @@ jobs:
|
||||
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
|
||||
|
||||
- name: Install dependencies
|
||||
env:
|
||||
CYPRESS_INSTALL_BINARY: 0
|
||||
run: npm ci
|
||||
|
||||
- name: Lint
|
||||
|
||||
64
.github/workflows/nightly.yml
vendored
Normal file
64
.github/workflows/nightly.yml
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
name: Package nightly
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- nightly
|
||||
schedule:
|
||||
- cron: '0 1 * * *' # run at 2 AM UTC
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Set up npm7
|
||||
run: npm i -g npm@7
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@2.24.0
|
||||
with:
|
||||
php-version: '7.4'
|
||||
tools: composer
|
||||
- name: install dependencies
|
||||
run: |
|
||||
wget https://github.com/ChristophWurst/krankerl/releases/download/v0.12.2/krankerl_0.12.2_amd64.deb
|
||||
sudo dpkg -i krankerl_0.12.2_amd64.deb
|
||||
- name: package
|
||||
run: |
|
||||
uname -a
|
||||
RUST_BACKTRACE=1 krankerl --version
|
||||
RUST_BACKTRACE=1 krankerl package
|
||||
- name: Set git config
|
||||
run: |
|
||||
git config --local user.email "action@github.com"
|
||||
git config --local user.name "GitHub Action"
|
||||
git tag -f nightly
|
||||
- name: Push tag
|
||||
uses: juliushaertl/github-push-action@main
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tags: true
|
||||
force: true
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: juliushaertl/action-release@main
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: nightly
|
||||
files: ./build/artifacts/deck.tar.gz
|
||||
name: Nightly build
|
||||
body: |
|
||||
Nightly release of deck
|
||||
draft: false
|
||||
prerelease: true
|
||||
overwrite: true
|
||||
4
.github/workflows/nodejs.yml
vendored
4
.github/workflows/nodejs.yml
vendored
@@ -12,9 +12,9 @@ jobs:
|
||||
node-version: [14.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Set up npm7
|
||||
|
||||
73
.github/workflows/npm-audit-fix.yml
vendored
73
.github/workflows/npm-audit-fix.yml
vendored
@@ -1,73 +0,0 @@
|
||||
# This workflow is provided via the organization template repository
|
||||
#
|
||||
# https://github.com/nextcloud/.github
|
||||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
|
||||
|
||||
name: Npm audit fix and compile
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# At 2:30 on Sundays
|
||||
- cron: '30 2 * * 0'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
branches: ['main', 'master', 'stable28', 'stable27', 'stable26']
|
||||
|
||||
name: npm-audit-fix-${{ matrix.branches }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
with:
|
||||
ref: ${{ matrix.branches }}
|
||||
|
||||
- name: Read package.json node and npm engines version
|
||||
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
|
||||
id: versions
|
||||
with:
|
||||
fallbackNode: '^20'
|
||||
fallbackNpm: '^9'
|
||||
|
||||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
||||
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v3
|
||||
with:
|
||||
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
||||
|
||||
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
|
||||
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
|
||||
|
||||
- name: Fix npm audit
|
||||
run: |
|
||||
npm audit fix
|
||||
|
||||
- name: Run npm ci and npm run build
|
||||
if: always()
|
||||
env:
|
||||
CYPRESS_INSTALL_BINARY: 0
|
||||
run: |
|
||||
npm ci
|
||||
npm run build --if-present
|
||||
|
||||
- name: Create Pull Request
|
||||
if: always()
|
||||
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5
|
||||
with:
|
||||
token: ${{ secrets.COMMAND_BOT_PAT }}
|
||||
commit-message: "chore(deps): fix npm audit"
|
||||
committer: GitHub <noreply@github.com>
|
||||
author: nextcloud-command <nextcloud-command@users.noreply.github.com>
|
||||
signoff: true
|
||||
branch: automated/noid/${{ matrix.branches }}-fix-npm-audit
|
||||
title: "[${{ matrix.branches }}] Fix npm audit"
|
||||
body: |
|
||||
Auto-generated fix of npm audit
|
||||
labels: |
|
||||
dependencies
|
||||
3. to review
|
||||
10
.github/workflows/phpunit.yml
vendored
10
.github/workflows/phpunit.yml
vendored
@@ -26,9 +26,9 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-versions: ['8.0', '8.1', '8.2', '8.3']
|
||||
php-versions: ['8.0', '8.1', '8.2']
|
||||
databases: ['sqlite', 'mysql', 'pgsql']
|
||||
server-versions: ['stable28']
|
||||
server-versions: ['stable26']
|
||||
|
||||
name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
|
||||
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout server
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: nextcloud/server
|
||||
ref: ${{ matrix.server-versions }}
|
||||
@@ -65,12 +65,12 @@ jobs:
|
||||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
||||
|
||||
- name: Checkout app
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: apps/${{ env.APP_NAME }}
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2.27.1
|
||||
uses: shivammathur/setup-php@2.24.0
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
tools: phpunit
|
||||
|
||||
34
.github/workflows/pr-feedback.yml
vendored
34
.github/workflows/pr-feedback.yml
vendored
@@ -1,34 +0,0 @@
|
||||
# This workflow is provided via the organization template repository
|
||||
#
|
||||
# https://github.com/nextcloud/.github
|
||||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
|
||||
|
||||
name: 'Ask for feedback on PRs'
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 1 * * *'
|
||||
|
||||
jobs:
|
||||
pr-feedback:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: The get-github-handles-from-website action
|
||||
uses: marcelklehr/get-github-handles-from-website-action@a739600f6b91da4957f51db0792697afbb2f143c # v1.0.0
|
||||
id: scrape
|
||||
with:
|
||||
website: 'https://nextcloud.com/team/'
|
||||
- uses: marcelklehr/pr-feedback-action@601109aa729eb4c8d6d0ece7567b9d4901db4aef
|
||||
with:
|
||||
feedback-message: |
|
||||
Hello there,
|
||||
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
|
||||
|
||||
We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.
|
||||
|
||||
Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6
|
||||
|
||||
Thank you for contributing to Nextcloud and we hope to hear from you soon!
|
||||
days-before-feedback: 14
|
||||
start-date: "2023-07-10"
|
||||
exempt-authors: "${{ steps.scrape.outputs.users }},nextcloud-command,nextcloud-android-bot,skjnldsv,datenangebot"
|
||||
exempt-bots: true
|
||||
19
.github/workflows/psalm.yml
vendored
19
.github/workflows/psalm.yml
vendored
@@ -5,7 +5,13 @@
|
||||
|
||||
name: Static analysis
|
||||
|
||||
on: pull_request
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
- stable*
|
||||
|
||||
concurrency:
|
||||
group: psalm-${{ github.head_ref || github.run_id }}
|
||||
@@ -15,17 +21,16 @@ jobs:
|
||||
static-analysis:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
name: static-psalm-analysis
|
||||
name: Nextcloud
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
|
||||
|
||||
- name: Set up php8.2
|
||||
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
|
||||
- name: Set up php
|
||||
uses: shivammathur/setup-php@2.24.0 # v2
|
||||
with:
|
||||
php-version: 8.2
|
||||
php-version: 8.1
|
||||
coverage: none
|
||||
ini-file: development
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
68
.github/workflows/update-nextcloud-ocp.yml
vendored
68
.github/workflows/update-nextcloud-ocp.yml
vendored
@@ -17,90 +17,42 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
branches: ['main', 'master', 'stable28', 'stable27', 'stable26']
|
||||
branches: ["master", "stable25", "stable24"]
|
||||
|
||||
name: update-nextcloud-ocp-${{ matrix.branches }}
|
||||
|
||||
steps:
|
||||
- id: checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
|
||||
with:
|
||||
ref: ${{ matrix.branches }}
|
||||
submodules: true
|
||||
continue-on-error: true
|
||||
|
||||
- name: Set up php8.2
|
||||
if: steps.checkout.outcome == 'success'
|
||||
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
|
||||
- name: Set up php8.1
|
||||
uses: shivammathur/setup-php@2.24.0 # v2
|
||||
with:
|
||||
php-version: 8.2
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
|
||||
php-version: 8.1
|
||||
extensions: ctype,curl,dom,fileinfo,gd,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
|
||||
coverage: none
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Read codeowners
|
||||
if: steps.checkout.outcome == 'success'
|
||||
id: codeowners
|
||||
run: |
|
||||
grep '/appinfo/info.xml' .github/CODEOWNERS | cut -f 2- -d ' ' | xargs | awk '{ print "codeowners="$0 }' >> $GITHUB_OUTPUT
|
||||
continue-on-error: true
|
||||
|
||||
- name: Composer install
|
||||
if: steps.checkout.outcome == 'success'
|
||||
run: composer install
|
||||
|
||||
- name: Composer update nextcloud/ocp
|
||||
id: update_branch
|
||||
if: ${{ steps.checkout.outcome == 'success' && matrix.branches != 'main' }}
|
||||
run: composer require --dev nextcloud/ocp:dev-${{ matrix.branches }}
|
||||
continue-on-error: true
|
||||
|
||||
- name: Raise on issue on failure
|
||||
uses: dacbd/create-issue-action@ba4d1c45cccf9c483f2720cefb40e437f0ee6f7d # v1.2.1
|
||||
if: ${{ steps.checkout.outcome == 'success' && failure() && steps.update_branch.conclusion == 'failure' }}
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
title: Failed to update nextcloud/ocp package on branch ${{ matrix.branches }}
|
||||
body: Please check the output of the GitHub action and manually resolve the issues<br>${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}<br>${{ steps.codeowners.outputs.codeowners }}
|
||||
|
||||
- name: Composer update nextcloud/ocp
|
||||
id: update_main
|
||||
if: ${{ steps.checkout.outcome == 'success' && matrix.branches == 'main' }}
|
||||
run: composer require --dev nextcloud/ocp:dev-master
|
||||
|
||||
- name: Raise on issue on failure
|
||||
uses: dacbd/create-issue-action@ba4d1c45cccf9c483f2720cefb40e437f0ee6f7d # v1.2.1
|
||||
if: ${{ steps.checkout.outcome == 'success' && failure() && steps.update_main.conclusion == 'failure' }}
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
title: Failed to update nextcloud/ocp package on branch ${{ matrix.branches }}
|
||||
body: Please check the output of the GitHub action and manually resolve the issues<br>${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}<br>${{ steps.codeowners.outputs.codeowners }}
|
||||
|
||||
- name: Reset checkout 3rdparty
|
||||
if: steps.checkout.outcome == 'success'
|
||||
- name: Reset checkout dirs
|
||||
run: |
|
||||
git clean -f 3rdparty
|
||||
git checkout 3rdparty
|
||||
continue-on-error: true
|
||||
|
||||
- name: Reset checkout vendor
|
||||
if: steps.checkout.outcome == 'success'
|
||||
run: |
|
||||
git clean -f vendor
|
||||
git checkout vendor
|
||||
continue-on-error: true
|
||||
|
||||
- name: Reset checkout vendor-bin
|
||||
if: steps.checkout.outcome == 'success'
|
||||
run: |
|
||||
git clean -f vendor-bin
|
||||
git checkout vendor-bin
|
||||
git checkout 3rdparty vendor vendor-bin
|
||||
continue-on-error: true
|
||||
|
||||
- name: Create Pull Request
|
||||
if: steps.checkout.outcome == 'success'
|
||||
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v3
|
||||
uses: peter-evans/create-pull-request@2b011faafdcbc9ceb11414d64d0573f37c774b04 # v3
|
||||
with:
|
||||
token: ${{ secrets.COMMAND_BOT_PAT }}
|
||||
commit-message: "chore(dev-deps): Bump nextcloud/ocp package"
|
||||
|
||||
229
CHANGELOG.md
229
CHANGELOG.md
@@ -1,218 +1,95 @@
|
||||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## 1.12.1
|
||||
## 1.9.6
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix deleted card/board issues @juliushaertl [#5441](https://github.com/nextcloud/deck/pull/5441)
|
||||
- Fixing #5451 [#5457](https://github.com/nextcloud/deck/pull/5457)
|
||||
- fix: Add debounce to update due date [#5483](https://github.com/nextcloud/deck/pull/5483)
|
||||
- fix(i18n): Fixed typo [#5424](https://github.com/nextcloud/deck/pull/5424)
|
||||
- fix: allow null label colors in trello json importer @juliushaertl [#5439](https://github.com/nextcloud/deck/pull/5439)
|
||||
- Fix small issues around delete/undo [#5421](https://github.com/nextcloud/deck/pull/5421)
|
||||
- Fix deleted card/board issues @juliushaertl [#5443](https://github.com/nextcloud/deck/pull/5443)
|
||||
|
||||
## 1.12.0
|
||||
|
||||
### Added
|
||||
|
||||
- Added ability to mark a card as done @TehThanos [#4137](https://github.com/nextcloud/deck/pull/4137)
|
||||
- Card Cover Images @jszeibert [#5035](https://github.com/nextcloud/deck/pull/5035)
|
||||
- Upcoming/Today/Tomorrow dashboard widgets @BKapelari [#2658](https://github.com/nextcloud/deck/pull/2658)
|
||||
- Enabled advanced fields option on tag color picker @faab007nl [#4362](https://github.com/nextcloud/deck/pull/4362)
|
||||
- Remember last board, list for new card dialog @luka-nextcloud [#5046](https://github.com/nextcloud/deck/pull/5046)
|
||||
- Add support for bidirectional text @jamazi [#5258](https://github.com/nextcloud/deck/pull/5258)
|
||||
- Card layout polishing @juliushaertl [#5264](https://github.com/nextcloud/deck/pull/5264)
|
||||
- feat: Move to contenteditable for inline title editing @juliushaertl [#5282](https://github.com/nextcloud/deck/pull/5282)
|
||||
- scroll board by dragging @shoetten [#5293](https://github.com/nextcloud/deck/pull/5293)
|
||||
- Keyboard shortcuts [#5358](https://github.com/nextcloud/deck/pull/5358)
|
||||
## 1.9.5
|
||||
|
||||
### Fixed
|
||||
|
||||
- fix: allow null label colors in trello json importer [#5355](https://github.com/nextcloud/deck/pull/5355)
|
||||
- fix: Get proper rich object for card actions [#5352](https://github.com/nextcloud/deck/pull/5352)
|
||||
- fix: Use text content as result for comments @juliushaertl [#5294](https://github.com/nextcloud/deck/pull/5294)
|
||||
- fix: Bring back due date indicator to compact mode @juliushaertl [#5292](https://github.com/nextcloud/deck/pull/5292)
|
||||
- Fix small issues around delete/undo @juliushaertl [#5296](https://github.com/nextcloud/deck/pull/5296)
|
||||
- fix(controls): use primary when filter is active @fitrahfm [#5299](https://github.com/nextcloud/deck/pull/5299)
|
||||
- fix: Properly get done state for dav @juliushaertl [#5287](https://github.com/nextcloud/deck/pull/5287)
|
||||
- Fix upcoming cards and label input @juliushaertl [#5290](https://github.com/nextcloud/deck/pull/5290)
|
||||
- fix: Properly handle adding new tags through multiselect @juliushaertl [#5285](https://github.com/nextcloud/deck/pull/5285)
|
||||
- fix: Avoid throwing errors if no token provided on close @juliushaertl [#5284](https://github.com/nextcloud/deck/pull/5284)
|
||||
- fix: Expose card actions in the card menu (fix #3180) [#5280](https://github.com/nextcloud/deck/pull/5280)
|
||||
- fix: Use full card menu everywhere (fix #3993) [#5280](https://github.com/nextcloud/deck/pull/5280)
|
||||
- fix: Detect end of the activity responses (fix #3395) [#5280](https://github.com/nextcloud/deck/pull/5280)
|
||||
- fix: Add title with absolute date time to activity (fix #4508, fix #2122) [#5280](https://github.com/nextcloud/deck/pull/5280)
|
||||
- fix: Disable dragging archived cards (fix #3271) [#5280](https://github.com/nextcloud/deck/pull/5280)
|
||||
- fix: Hide unavailable card menu entries for archived card view [#5280](https://github.com/nextcloud/deck/pull/5280)
|
||||
- fix: Use localCompare to sort labels (fix #2736) [#5280](https://github.com/nextcloud/deck/pull/5280)
|
||||
- fix: More fitting click target for title editing [#5280](https://github.com/nextcloud/deck/pull/5280)
|
||||
- fix: Always load proper dashboard js (fixes a log error) [#5280](https://github.com/nextcloud/deck/pull/5280)
|
||||
- fix: Set fixed height for card modal (fix #4296) [#5280](https://github.com/nextcloud/deck/pull/5280)
|
||||
- fix: Make sure to always update card description when navigating away (fix #5254 #2705) [#5280](https://github.com/nextcloud/deck/pull/5280)
|
||||
- perf: Already pass board list as initial state @juliushaertl [#5281](https://github.com/nextcloud/deck/pull/5281)
|
||||
- Deck card comment notification label improvement @Jerome-Herbinet [#4748](https://github.com/nextcloud/deck/pull/4748)
|
||||
- update smart picker links @luka-nextcloud [#5047](https://github.com/nextcloud/deck/pull/5047)
|
||||
- feat: Enhance dark mode @juliushaertl [#5045](https://github.com/nextcloud/deck/pull/5045)
|
||||
- fix: export doesn't handle lists with no cards @magikmw [#5096](https://github.com/nextcloud/deck/pull/5096)
|
||||
- add attributes aria-label= and title= to Filters & View Modes buttons @privatemaker [#5133](https://github.com/nextcloud/deck/pull/5133)
|
||||
- fix: Check both card reference url patterns @juliushaertl [#5262](https://github.com/nextcloud/deck/pull/5262)
|
||||
- fix: Avoid too large index on postgres as indexing just the last_editor column is enough @juliushaertl [#5260](https://github.com/nextcloud/deck/pull/5260)
|
||||
- feat: error msg on CreateNewCardCustomPicker & only show available bo… @luka-nextcloud [#5029](https://github.com/nextcloud/deck/pull/5029)
|
||||
- test: add cypress tests for create new deck card @luka-nextcloud [#5025](https://github.com/nextcloud/deck/pull/5025)
|
||||
- Remove duplicate button @solracsf [#4850](https://github.com/nextcloud/deck/pull/4850)
|
||||
- [stable27] fix cypress for new file picker [#5088](https://github.com/nextcloud/deck/pull/5088)
|
||||
- Replace "Timeline" wording with "Activity" in order to be consistent with equivalent contexts throughout Nextcloud @Jerome-Herbinet [#5164](https://github.com/nextcloud/deck/pull/5164)
|
||||
- Board creation limitation : More understandable wordings @Jerome-Herbinet [#5168](https://github.com/nextcloud/deck/pull/5168)
|
||||
- ci(cypress): Fix file picker selector @juliushaertl [#5212](https://github.com/nextcloud/deck/pull/5212)
|
||||
- Switch to native date picker @juliushaertl [#4668](https://github.com/nextcloud/deck/pull/4668)
|
||||
- fixes minor spelling error @FundreasFrohsinn [#5216](https://github.com/nextcloud/deck/pull/5216)
|
||||
- feat(card): tooltip for comment timestamp @fitrahfm [#5253](https://github.com/nextcloud/deck/pull/5253)
|
||||
- fix: Use text content as result for comments [#5298](https://github.com/nextcloud/deck/pull/5298)
|
||||
|
||||
## 1.12.0-beta.5
|
||||
|
||||
### Added
|
||||
|
||||
- Keyboard shortcuts [#5358](https://github.com/nextcloud/deck/pull/5358)
|
||||
## 1.9.4
|
||||
|
||||
### Fixed
|
||||
|
||||
- fix: allow null label colors in trello json importer [#5355](https://github.com/nextcloud/deck/pull/5355)
|
||||
- fix: Get proper rich object for card actions [#5352](https://github.com/nextcloud/deck/pull/5352)
|
||||
- fix: open card in modal on main route [#5289](https://github.com/nextcloud/deck/pull/5289)
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Update nextcloud/ocp dependency @nextcloud-command [#5343](https://github.com/nextcloud/deck/pull/5343)
|
||||
- Chore(deps): Bump @babel/runtime from 7.23.4 to 7.23.5 @dependabot[bot] [#5338](https://github.com/nextcloud/deck/pull/5338)
|
||||
|
||||
|
||||
## 1.12.0-beta.4
|
||||
## 1.9.3
|
||||
|
||||
### Added
|
||||
|
||||
- scroll board by dragging @shoetten [#5293](https://github.com/nextcloud/deck/pull/5293)
|
||||
- Import of deck JSON data through occ @juliushaertl [#5004](https://github.com/nextcloud/deck/pull/5004)
|
||||
|
||||
### Fixed
|
||||
|
||||
- fix: Use text content as result for comments @juliushaertl [#5294](https://github.com/nextcloud/deck/pull/5294)
|
||||
- fix: Bring back due date indicator to compact mode @juliushaertl [#5292](https://github.com/nextcloud/deck/pull/5292)
|
||||
- Fix small issues around delete/undo @juliushaertl [#5296](https://github.com/nextcloud/deck/pull/5296)
|
||||
- fix(controls): use primary when filter is active @fitrahfm [#5299](https://github.com/nextcloud/deck/pull/5299)
|
||||
- Prevent tag itself being edit button if user lacks permissions [#4766](https://github.com/nextcloud/deck/pull/4766)
|
||||
- fix: Allow dynamic autoloading for classes added during upgrade [#4805](https://github.com/nextcloud/deck/pull/4805)
|
||||
- Fix(occ): set user id for permission sevice from board service [#4814](https://github.com/nextcloud/deck/pull/4814)
|
||||
- fix(notification): Prevent null in parameters [#4910](https://github.com/nextcloud/deck/pull/4910)
|
||||
- fix: Split query to fetch board ids to avoid slow query join @juliushaertl [#4950](https://github.com/nextcloud/deck/pull/4950)
|
||||
- fix: export doesn't handle lists with no cards [#5117](https://github.com/nextcloud/deck/pull/5117)
|
||||
- Ensure `$boardId` is an integer [#4774](https://github.com/nextcloud/deck/pull/4774)
|
||||
- fix: execute return int for export command [#4812](https://github.com/nextcloud/deck/pull/4812)
|
||||
- fix: crash when leaving out system parameter [#4832](https://github.com/nextcloud/deck/pull/4832)
|
||||
- Remove duplicate button [#5044](https://github.com/nextcloud/deck/pull/5044)
|
||||
|
||||
## 1.12.0-beta.3
|
||||
### Other
|
||||
|
||||
### Added
|
||||
- Dependency updates
|
||||
|
||||
- feat: Move to contenteditable for inline title editing @juliushaertl [#5282](https://github.com/nextcloud/deck/pull/5282)
|
||||
## 1.9.2
|
||||
|
||||
### Fixed
|
||||
|
||||
- fix: Properly get done state for dav @juliushaertl [#5287](https://github.com/nextcloud/deck/pull/5287)
|
||||
- Fix upcoming cards and label input @juliushaertl [#5290](https://github.com/nextcloud/deck/pull/5290)
|
||||
- fix: Properly overwrite z-index of datepicker above modal [#4665](https://github.com/nextcloud/deck/pull/4665)
|
||||
|
||||
## 1.12.0-beta.2
|
||||
|
||||
### Added
|
||||
|
||||
- Card layout polishing @juliushaertl [#5264](https://github.com/nextcloud/deck/pull/5264)
|
||||
## 1.9.1
|
||||
|
||||
### Fixed
|
||||
|
||||
- fix: Properly handle adding new tags through multiselect @juliushaertl [#5285](https://github.com/nextcloud/deck/pull/5285)
|
||||
- fix: Avoid throwing errors if no token provided on close @juliushaertl [#5284](https://github.com/nextcloud/deck/pull/5284)
|
||||
- fix: Expose card actions in the card menu (fix #3180) [#5280](https://github.com/nextcloud/deck/pull/5280)
|
||||
- fix: Use full card menu everywhere (fix #3993) [#5280](https://github.com/nextcloud/deck/pull/5280)
|
||||
- fix: Detect end of the activity responses (fix #3395) [#5280](https://github.com/nextcloud/deck/pull/5280)
|
||||
- fix: Add title with absolute date time to activity (fix #4508, fix #2122) [#5280](https://github.com/nextcloud/deck/pull/5280)
|
||||
- fix: Disable dragging archived cards (fix #3271) [#5280](https://github.com/nextcloud/deck/pull/5280)
|
||||
- fix: Hide unavailable card menu entries for archived card view [#5280](https://github.com/nextcloud/deck/pull/5280)
|
||||
- fix: Use localCompare to sort labels (fix #2736) [#5280](https://github.com/nextcloud/deck/pull/5280)
|
||||
- fix: More fitting click target for title editing [#5280](https://github.com/nextcloud/deck/pull/5280)
|
||||
- fix: Always load proper dashboard js (fixes a log error) [#5280](https://github.com/nextcloud/deck/pull/5280)
|
||||
- fix: Set fixed height for card modal (fix #4296) [#5280](https://github.com/nextcloud/deck/pull/5280)
|
||||
- fix: Make sure to always update card description when navigating away (fix #5254 #2705) [#5280](https://github.com/nextcloud/deck/pull/5280)
|
||||
- perf: Already pass board list as initial state @juliushaertl [#5281](https://github.com/nextcloud/deck/pull/5281)
|
||||
- Gracefully handle not found card for a share [#4567](https://github.com/nextcloud/deck/pull/4567)
|
||||
- fix: Adapt NcEmptyContent usages to new slots [#4562](https://github.com/nextcloud/deck/pull/4562)
|
||||
- allow user to toggle visibility of the calendar for a deck board [#4625](https://github.com/nextcloud/deck/pull/4625)
|
||||
- fix: Append datetime picker to body to avoid cut off [#4644](https://github.com/nextcloud/deck/pull/4644)
|
||||
- chore: Remove unused @nextcloud/vue-dashboard @juliushaertl [#4650](https://github.com/nextcloud/deck/pull/4650)
|
||||
- fix: Bring back overdue column by removing faulty condition [#4662](https://github.com/nextcloud/deck/pull/4662)
|
||||
- Fix : Overlapping expiry dates on tags [#4537](https://github.com/nextcloud/deck/pull/4537)
|
||||
- Better display of card dates (creation and change dates) [#4619](https://github.com/nextcloud/deck/pull/4619)
|
||||
- Update dependencies
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Fix npm audit @nextcloud-command [#5277](https://github.com/nextcloud/deck/pull/5277)
|
||||
- Update nextcloud/ocp dependency @nextcloud-command [#5275](https://github.com/nextcloud/deck/pull/5275)
|
||||
- Chore(deps): Bump @nextcloud/dialogs from 4.2.1 to 4.2.2 @dependabot[bot] [#5266](https://github.com/nextcloud/deck/pull/5266)
|
||||
- Chore(deps-dev): Bump cypress from 13.4.0 to 13.5.0 @dependabot[bot] [#5267](https://github.com/nextcloud/deck/pull/5267)
|
||||
- Chore(deps): Bump shivammathur/setup-php from 2.27.0 to 2.27.1 @dependabot[bot] [#5268](https://github.com/nextcloud/deck/pull/5268)
|
||||
|
||||
|
||||
## 1.12.0-beta.1
|
||||
## 1.9.0
|
||||
|
||||
### Added
|
||||
|
||||
- Added ability to mark a card as done @TehThanos [#4137](https://github.com/nextcloud/deck/pull/4137)
|
||||
- Card Cover Images @jszeibert [#5035](https://github.com/nextcloud/deck/pull/5035)
|
||||
- Upcoming/Today/Tomorrow dashboard widgets @BKapelari [#2658](https://github.com/nextcloud/deck/pull/2658)
|
||||
- Enabled advanced fields option on tag color picker @faab007nl [#4362](https://github.com/nextcloud/deck/pull/4362)
|
||||
- Remember last board, list for new card dialog @luka-nextcloud [#5046](https://github.com/nextcloud/deck/pull/5046)
|
||||
- Add support for bidirectional text @jamazi [#5258](https://github.com/nextcloud/deck/pull/5258)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Deck card comment notification label improvement @Jerome-Herbinet [#4748](https://github.com/nextcloud/deck/pull/4748)
|
||||
- update smart picker links @luka-nextcloud [#5047](https://github.com/nextcloud/deck/pull/5047)
|
||||
- feat: Enhance dark mode @juliushaertl [#5045](https://github.com/nextcloud/deck/pull/5045)
|
||||
- fix: export doesn't handle lists with no cards @magikmw [#5096](https://github.com/nextcloud/deck/pull/5096)
|
||||
- add attributes aria-label= and title= to Filters & View Modes buttons @privatemaker [#5133](https://github.com/nextcloud/deck/pull/5133)
|
||||
- fix: Check both card reference url patterns @juliushaertl [#5262](https://github.com/nextcloud/deck/pull/5262)
|
||||
- fix: Avoid too large index on postgres as indexing just the last_editor column is enough @juliushaertl [#5260](https://github.com/nextcloud/deck/pull/5260)
|
||||
- feat: error msg on CreateNewCardCustomPicker & only show available bo… @luka-nextcloud [#5029](https://github.com/nextcloud/deck/pull/5029)
|
||||
- test: add cypress tests for create new deck card @luka-nextcloud [#5025](https://github.com/nextcloud/deck/pull/5025)
|
||||
- Remove duplicate button @solracsf [#4850](https://github.com/nextcloud/deck/pull/4850)
|
||||
- [stable27] fix cypress for new file picker [#5088](https://github.com/nextcloud/deck/pull/5088)
|
||||
- Replace "Timeline" wording with "Activity" in order to be consistent with equivalent contexts throughout Nextcloud @Jerome-Herbinet [#5164](https://github.com/nextcloud/deck/pull/5164)
|
||||
- Board creation limitation : More understandable wordings @Jerome-Herbinet [#5168](https://github.com/nextcloud/deck/pull/5168)
|
||||
- ci(cypress): Fix file picker selector @juliushaertl [#5212](https://github.com/nextcloud/deck/pull/5212)
|
||||
- Switch to native date picker @juliushaertl [#4668](https://github.com/nextcloud/deck/pull/4668)
|
||||
- fixes minor spelling error @FundreasFrohsinn [#5216](https://github.com/nextcloud/deck/pull/5216)
|
||||
- feat(card): tooltip for comment timestamp @fitrahfm [#5253](https://github.com/nextcloud/deck/pull/5253)
|
||||
|
||||
## 1.10.0-beta.1
|
||||
|
||||
### Added
|
||||
|
||||
- Compatibility with Nextcloud 27
|
||||
|
||||
### Fixed
|
||||
|
||||
- fix(references): Mute NoPermissionException as it is expected to happen for references @juliushaertl [#4514](https://github.com/nextcloud/deck/pull/4514)
|
||||
- fix(cards): Fix card sizing by limiting too wide style rules @juliushaertl [#4512](https://github.com/nextcloud/deck/pull/4512)
|
||||
- fix: Adapt NcEmptyContent usages to new slots @juliushaertl [#4561](https://github.com/nextcloud/deck/pull/4561)
|
||||
- Gracefully handle not found card for a share @mejo- [#4566](https://github.com/nextcloud/deck/pull/4566)
|
||||
- Prevent tag itself being edit button if user lacks permissions @joshtrichards [#4574](https://github.com/nextcloud/deck/pull/4574)
|
||||
- chore: Remove unused @nextcloud/vue-dashboard @juliushaertl [#4586](https://github.com/nextcloud/deck/pull/4586)
|
||||
- Update Description.vue: Fixes the issue of hidden text by menu bar @pschopen [#4617](https://github.com/nextcloud/deck/pull/4617)
|
||||
- allow user to toggle visibility of the calendar for a deck board @schiessle [#4622](https://github.com/nextcloud/deck/pull/4622)
|
||||
- fix: Append datetime picker to body to avoid cut off @juliushaertl [#4643](https://github.com/nextcloud/deck/pull/4643)
|
||||
- fix: Bring back overdue column by removing faulty condition @juliushaertl [#4660](https://github.com/nextcloud/deck/pull/4660)
|
||||
- fix(sessions): Do not send close request without token @juliushaertl [#4510](https://github.com/nextcloud/deck/pull/4510)
|
||||
- tests(integration): Add test for multiple board shares to the same user @juliushaertl [#4494](https://github.com/nextcloud/deck/pull/4494)
|
||||
- fix(API): Fix board API details parameter to work as expected @nickvergessen [#4518](https://github.com/nextcloud/deck/pull/4518)
|
||||
- Fix : Overlapping expiry dates on tags @Jerome-Herbinet [#4535](https://github.com/nextcloud/deck/pull/4535)
|
||||
- Fix consistency of a "Create card" wording with its equivalent for Notes ("New card") @Jerome-Herbinet [#4534](https://github.com/nextcloud/deck/pull/4534)
|
||||
- tests(integration): Add integration tests for due dates @juliushaertl [#4489](https://github.com/nextcloud/deck/pull/4489)
|
||||
- Better display of card dates (creation and change dates) @Jerome-Herbinet [#4604](https://github.com/nextcloud/deck/pull/4604)
|
||||
- Refactors lib\Activity\DeckProvider.php to improve code readability. @fsamapoor [#4648](https://github.com/nextcloud/deck/pull/4648)
|
||||
- Converts 'strpos()' calls to improve code readability. @fsamapoor [#4657](https://github.com/nextcloud/deck/pull/4657)
|
||||
|
||||
|
||||
## 1.9.0-beta.1
|
||||
|
||||
### Added
|
||||
|
||||
- Export Board @david-loe [#3065](https://github.com/nextcloud/deck/pull/3065)
|
||||
- basic notify_push usage with session handling @alangecker [#3876](https://github.com/nextcloud/deck/pull/3876)
|
||||
- feat(Description): Use text as editor if available @juliushaertl [#4399](https://github.com/nextcloud/deck/pull/4399)
|
||||
- Live updates on board collaboration using notify_push @alangecker [#4273](https://github.com/nextcloud/deck/pull/4273)
|
||||
- Basic notify_push usage with session handling @alangecker [#3876](https://github.com/nextcloud/deck/pull/3876)
|
||||
- Use text as editor if available [#4399](https://github.com/nextcloud/deck/pull/4399)
|
||||
- Improve reference provider and add reference widgets @julien-nc [#4422](https://github.com/nextcloud/deck/pull/4422)
|
||||
- live updates 🎉 @alangecker [#4273](https://github.com/nextcloud/deck/pull/4273)
|
||||
- Tag creation from card view @juliushaertl [#4344](https://github.com/nextcloud/deck/pull/4344)
|
||||
- Optimize query performance with larger board or card count @[#4452](https://github.com/nextcloud/deck/pull/4452)
|
||||
- Export Board as CSV @david-loe [#3065](https://github.com/nextcloud/deck/pull/3065)
|
||||
|
||||
|
||||
### Fixed
|
||||
|
||||
- fix(cards): Fix card sizing by limiting too wide style rules [#4521](https://github.com/nextcloud/deck/pull/4521)
|
||||
- fix(references): Mute NoPermissionException as it is expected to happen for references [#4516](https://github.com/nextcloud/deck/pull/4516)
|
||||
- fix(API): Fix board API details parameter to work as expected [#4519](https://github.com/nextcloud/deck/pull/4519)
|
||||
- fix(sessions): Do not send close request without token [#4525](https://github.com/nextcloud/deck/pull/4525)
|
||||
- fix: Avoid mutating the due date when calculating days @juliushaertl [#4488](https://github.com/nextcloud/deck/pull/4488)
|
||||
- fix: Pass user id along to properly check permissions in background jobs @juliushaertl [#4485](https://github.com/nextcloud/deck/pull/4485)
|
||||
- fix: Use passed userid when getting attachment folder @juliushaertl [#4487](https://github.com/nextcloud/deck/pull/4487)
|
||||
- fix: Use proper z-index for text menubar @juliushaertl [#4490](https://github.com/nextcloud/deck/pull/4490)
|
||||
- fix(dashboard): Fix undefined array index @marcelklehr [#4492](https://github.com/nextcloud/deck/pull/4492)
|
||||
- fix: Always return sorted index array to make sure a json array is the result @juliushaertl [#4493](https://github.com/nextcloud/deck/pull/4493)
|
||||
- Fix component renaming so that acl works on shares again @small1 [#4315](https://github.com/nextcloud/deck/pull/4315)
|
||||
- fix(Sidebar): Only close sidebar on v-click-outside for specific targets @juliushaertl [#4350](https://github.com/nextcloud/deck/pull/4350)
|
||||
- add basic e2e tests for stack title @shoetten [#4206](https://github.com/nextcloud/deck/pull/4206)
|
||||
@@ -222,10 +99,6 @@ All notable changes to this project will be documented in this file.
|
||||
- perf: Register notifier and resource listener lazy @juliushaertl [#4439](https://github.com/nextcloud/deck/pull/4439)
|
||||
- perf: Lazy load dashboard components @juliushaertl [#4440](https://github.com/nextcloud/deck/pull/4440)
|
||||
- Optimise upcomming overview creation @Raudius [#3793](https://github.com/nextcloud/deck/pull/3793)
|
||||
- Performance boost @juliushaertl [#4452](https://github.com/nextcloud/deck/pull/4452)
|
||||
|
||||
### Other
|
||||
- Dependency updates
|
||||
|
||||
|
||||
## 1.8.0-beta.1
|
||||
|
||||
77
README.md
77
README.md
@@ -27,11 +27,27 @@ Deck is a kanban style organization tool aimed at personal planning and project
|
||||
- [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
|
||||
- [A-deck](https://github.com/leoossa/A-deck) - Chrome Extension that allows to create new card in selected stack based on current tab
|
||||
- [QOwnNotes](https://github.com/pbek/QOwnNotes) - Quickly creates cards and links to them in Markdown notes
|
||||
|
||||
## Installation/Update
|
||||
|
||||
The app can be installed through the app store within Nextcloud. You can also download the latest release from the [release page](https://github.com/nextcloud-releases/deck/releases).
|
||||
This app is supposed to work on the two latest Nextcloud versions.
|
||||
|
||||
### Install latest release
|
||||
|
||||
You can download and install the latest release from the [Nextcloud app store](https://apps.nextcloud.com/apps/deck)
|
||||
|
||||
### Install from git
|
||||
|
||||
If you want to run the latest development version from git source, you need to clone the repo to your apps folder:
|
||||
|
||||
```
|
||||
git clone https://github.com/nextcloud/deck.git
|
||||
cd deck
|
||||
make install-deps
|
||||
make build
|
||||
```
|
||||
|
||||
Please make sure you have installed the following dependencies: `make, which, tar, npm, curl, composer`
|
||||
|
||||
## Performance limitations
|
||||
|
||||
@@ -46,54 +62,41 @@ Improvements on Nextcloud server and Deck itself will improve the situation.
|
||||
|
||||
## Developing
|
||||
|
||||
There are multiple ways to develop on Deck. As you will need a Nextcloud server running, the individual options are described below.
|
||||
### Nextcloud environment
|
||||
|
||||
### General build instructions
|
||||
You need to setup a [development environment](https://docs.nextcloud.com/server/latest/developer_manual//getting_started/devenv.html) of the current nextcloud version. You can also alternatively install & run the [nextcloud docker container](https://github.com/juliushaertl/nextcloud-docker-dev).
|
||||
After the finished installation, you can clone the deck project directly in the `/[nextcloud-docker-dev-dir]/workspace/server/apps/` folder.
|
||||
|
||||
General build instructions for the app itself are the same for all options.
|
||||
### PHP
|
||||
|
||||
To build you will need to have [Node.js](https://nodejs.org/en/) and [Composer](https://getcomposer.org/) installed.
|
||||
Nothing to prepare, just dig into the code.
|
||||
|
||||
- Install PHP dependencies: `composer install --no-dev`
|
||||
- Install JS dependencies: `npm ci`
|
||||
- Build JavaScript for the frontend
|
||||
- Development build `npm run dev`
|
||||
- Watch for changes `npm run watch`
|
||||
- Production build `npm run build`
|
||||
### JavaScript
|
||||
|
||||
### Faster frontend developing with HMR
|
||||
This requires at least Node 16 and npm 7 to be installed.
|
||||
|
||||
You can enable HMR (Hot module replacement) to avoid page reloads when working on the frontend:
|
||||
Deck requires running a `make build-js` to install npm dependencies and build the JavaScript code using webpack. While developing you can also use `make watch` to rebuild everytime the code changes.
|
||||
|
||||
1. ☑️ Install and enable [`hmr_enabler` app](https://github.com/nextcloud/hmr_enabler)
|
||||
2. 🏁 Run `npm run serve`
|
||||
3. 🌍 Open the normal Nextcloud server URL (not the URL given by above command)
|
||||
#### Hot reloading
|
||||
|
||||
### GitHub Codespaces / VS Code devcontainer
|
||||
|
||||
- Open code spaces or the repository in VS Code to start the dev container
|
||||
- The container will automatically install all dependencies and build the app
|
||||
- Nextcloud will be installed from the master development branch and be available on a port exposed by the container
|
||||
|
||||
### Docker: Simple app development container
|
||||
|
||||
- Fork the app
|
||||
- Clone the repository: `git clone https://github.com/nextcloud/deck.git`
|
||||
- Go into deck directory: `cd deck`
|
||||
- Build the app as described in the general build instructions
|
||||
- Run Nextcloud development container and mount the apps source code into it
|
||||
Enable debug mode in your config.php `'debug' => true,`
|
||||
|
||||
Without SSL:
|
||||
```
|
||||
docker run --rm \
|
||||
-p 8080:80 \
|
||||
-v ~/path/to/app:/var/www/html/apps-extra/app \
|
||||
ghcr.io/juliushaertl/nextcloud-dev-php80:latest
|
||||
npx webpack-dev-server --config webpack.hot.js \
|
||||
--public localhost:3000 \
|
||||
--output-public-path 'http://localhost:3000/js/'
|
||||
```
|
||||
|
||||
### Full Nextcloud development environment
|
||||
With SSL:
|
||||
```
|
||||
npx webpack-dev-server --config webpack.dev.js --https \
|
||||
--cert ~/repos/nextcloud/nc-dev/data/ssl/nextcloud.local.crt \
|
||||
--key ~/repos/nextcloud/nc-dev/data/ssl/nextcloud.local.key \
|
||||
--public nextcloud.local:3000 \
|
||||
--output-public-path 'https://nextcloud.local:3000/js/'
|
||||
```
|
||||
|
||||
You need to setup a [development environment](https://docs.nextcloud.com/server/latest/developer_manual//getting_started/devenv.html) of the current Nextcloud version. You can also alternatively install & run the [nextcloud docker container](https://github.com/juliushaertl/nextcloud-docker-dev).
|
||||
After the finished installation, you can clone the deck project directly in the `/[nextcloud-docker-dev-dir]/workspace/server/apps/` folder.
|
||||
|
||||
### Running tests
|
||||
You can use the provided Makefile to run all tests by using:
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
- 🚀 Get your project organized
|
||||
|
||||
</description>
|
||||
<version>1.12.1</version>
|
||||
<version>1.9.6</version>
|
||||
<licence>agpl</licence>
|
||||
<author>Julius Härtl</author>
|
||||
<documentation>
|
||||
@@ -38,7 +38,7 @@
|
||||
<database min-version="9.4">pgsql</database>
|
||||
<database>sqlite</database>
|
||||
<database min-version="8.0">mysql</database>
|
||||
<nextcloud min-version="28" max-version="28"/>
|
||||
<nextcloud min-version="26" max-version="26"/>
|
||||
</dependencies>
|
||||
<background-jobs>
|
||||
<job>OCA\Deck\Cron\DeleteCron</job>
|
||||
@@ -58,9 +58,9 @@
|
||||
</commands>
|
||||
<activity>
|
||||
<settings>
|
||||
<setting>OCA\Deck\Activity\SettingChanges</setting>
|
||||
<setting>OCA\Deck\Activity\SettingDescription</setting>
|
||||
<setting>OCA\Deck\Activity\Setting</setting>
|
||||
<setting>OCA\Deck\Activity\SettingComment</setting>
|
||||
<setting>OCA\Deck\Activity\DescriptionSetting</setting>
|
||||
</settings>
|
||||
<filters>
|
||||
<filter>OCA\Deck\Activity\Filter</filter>
|
||||
|
||||
@@ -25,11 +25,6 @@
|
||||
return [
|
||||
'routes' => [
|
||||
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
|
||||
['name' => 'page#indexList', 'url' => '/board', 'verb' => 'GET'],
|
||||
['name' => 'page#indexBoard', 'url' => '/board/{boardId}', 'verb' => 'GET'],
|
||||
['name' => 'page#indexBoardDetails', 'url' => '/board/{boardId}/details', 'verb' => 'GET'],
|
||||
['name' => 'page#indexCard', 'url' => '/board/{boardId}/card/{cardId}', 'verb' => 'GET'],
|
||||
|
||||
['name' => 'page#redirectToCard', 'url' => '/card/{cardId}', 'verb' => 'GET'],
|
||||
|
||||
// boards
|
||||
@@ -66,8 +61,6 @@ return [
|
||||
['name' => 'card#reorder', 'url' => '/cards/{cardId}/reorder', 'verb' => 'PUT'],
|
||||
['name' => 'card#archive', 'url' => '/cards/{cardId}/archive', 'verb' => 'PUT'],
|
||||
['name' => 'card#unarchive', 'url' => '/cards/{cardId}/unarchive', 'verb' => 'PUT'],
|
||||
['name' => 'card#done', 'url' => '/cards/{cardId}/done', 'verb' => 'PUT'],
|
||||
['name' => 'card#undone', 'url' => '/cards/{cardId}/undone', 'verb' => 'PUT'],
|
||||
['name' => 'card#assignLabel', 'url' => '/cards/{cardId}/label/{labelId}', 'verb' => 'POST'],
|
||||
['name' => 'card#removeLabel', 'url' => '/cards/{cardId}/label/{labelId}', 'verb' => 'DELETE'],
|
||||
['name' => 'card#assignUser', 'url' => '/cards/{cardId}/assign', 'verb' => 'POST'],
|
||||
|
||||
@@ -9,14 +9,17 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"cogpowered/finediff": "0.3.*",
|
||||
"justinrainbow/json-schema": "^5.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"roave/security-advisories": "dev-master",
|
||||
"phpunit/phpunit": "^9",
|
||||
"nextcloud/coding-standard": "^1.1",
|
||||
"nextcloud/ocp": "dev-stable28",
|
||||
"psalm/phar": "^5.13"
|
||||
"nextcloud/coding-standard": "^1.0.0",
|
||||
"symfony/event-dispatcher": "^4.0",
|
||||
"vimeo/psalm": "^5.4",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.2",
|
||||
"nextcloud/ocp": "dev-stable26"
|
||||
},
|
||||
"config": {
|
||||
"optimize-autoloader": true,
|
||||
@@ -31,9 +34,9 @@
|
||||
"lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l",
|
||||
"cs:check": "php-cs-fixer fix --dry-run --diff",
|
||||
"cs:fix": "php-cs-fixer fix",
|
||||
"psalm": "psalm.phar",
|
||||
"psalm:update-baseline": "psalm.phar --update-baseline",
|
||||
"psalm:fix": "psalm.phar --alter --issues=InvalidReturnType,InvalidNullableReturnType,MismatchingDocblockParamType,MismatchingDocblockReturnType,MissingParamType,InvalidFalsableReturnType",
|
||||
"psalm": "psalm",
|
||||
"psalm:update-baseline": "psalm --update-baseline",
|
||||
"psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MismatchingDocblockParamType,MismatchingDocblockReturnType,MissingParamType,InvalidFalsableReturnType",
|
||||
"test": [
|
||||
"@test:unit",
|
||||
"@test:integration"
|
||||
|
||||
3555
composer.lock
generated
3555
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,5 @@
|
||||
import { randUser } from '../utils/index.js'
|
||||
import { sampleBoard } from '../utils/sampleBoard'
|
||||
import moment from '@nextcloud/moment'
|
||||
|
||||
const user = randUser()
|
||||
const boardData = sampleBoard()
|
||||
@@ -59,31 +58,6 @@ describe('Card', function() {
|
||||
})
|
||||
})
|
||||
|
||||
it('Create card from overview', function() {
|
||||
cy.visit(`/apps/deck/#/`)
|
||||
const newCardTitle = 'Test create from overview'
|
||||
cy.intercept({ method: 'POST', url: '**/apps/deck/cards' }).as('save')
|
||||
cy.intercept({ method: 'GET', url: '**/apps/deck/boards/*' }).as('getBoard')
|
||||
|
||||
cy.get('.button-vue[aria-label*="Add card"]')
|
||||
.first().click()
|
||||
cy.get('.modal-mask.card-selector .card-title').should('be.visible').click().type(newCardTitle)
|
||||
cy.get('.modal-mask.card-selector .multiselect-board').should('be.visible').click()
|
||||
cy.get('.modal-mask.card-selector .multiselect-board li:contains("' + boardData.title + '")').should('be.visible').click()
|
||||
cy.wait('@getBoard', { timeout: 7000 })
|
||||
|
||||
cy.get('.modal-mask.card-selector .multiselect-list').should('be.visible').click()
|
||||
cy.get('.modal-mask.card-selector .multiselect-list li').eq(0).should('be.visible').click()
|
||||
cy.get('.modal-mask.card-selector button.button-vue--vue-primary').should('be.visible').click()
|
||||
cy.wait('@save', { timeout: 7000 })
|
||||
|
||||
cy.visit(`/apps/deck/#/board/${boardId}`)
|
||||
cy.reload()
|
||||
cy.get('.board .stack').eq(0).within(() => {
|
||||
cy.get(`.card:contains("${newCardTitle}")`).should('be.visible')
|
||||
})
|
||||
})
|
||||
|
||||
describe('Modal', () => {
|
||||
beforeEach(function() {
|
||||
cy.login(user)
|
||||
@@ -112,7 +86,7 @@ describe('Card', function() {
|
||||
cy.get('button.icon-folder').should('be.visible')
|
||||
.click()
|
||||
cy.get('.file-picker__main').should('be.visible')
|
||||
cy.get('.file-picker__main [data-filename="welcome.txt"]', { timeout: 30000 }).should('be.visible')
|
||||
cy.get('.file-picker__main [data-filename="welcome.txt"]').should('be.visible')
|
||||
.click()
|
||||
cy.get('.dialog__actions button.button-vue--vue-primary').click()
|
||||
cy.get('.attachment-list .basename').contains('welcome.txt')
|
||||
@@ -136,33 +110,6 @@ describe('Card', function() {
|
||||
cy.get('.modal__card .ProseMirror li').eq(1).contains('with entries').should('be.visible')
|
||||
cy.get('.modal__card .ProseMirror p').contains('Paragraph').should('be.visible')
|
||||
})
|
||||
|
||||
it('Smart picker', () => {
|
||||
const newCardTitle = 'Test smart picker'
|
||||
cy.intercept({ method: 'POST', url: '**/apps/deck/cards' }).as('save')
|
||||
cy.intercept({ method: 'GET', url: '**/apps/deck/boards/*' }).as('getBoard')
|
||||
cy.get('.card:contains("Hello world")').should('be.visible').click()
|
||||
cy.get('.modal__card').should('be.visible')
|
||||
cy.get('.modal__card .ProseMirror h1')
|
||||
.click()
|
||||
.type('{enter}/create')
|
||||
cy.get('.suggestion-list__item.is-selected').should('be.visible').contains('Create a new deck card')
|
||||
cy.get('.suggestion-list__item.is-selected .link-picker__item').click()
|
||||
cy.get('.reference-picker-modal--content .reference-picker').should('be.visible')
|
||||
cy.get('.reference-picker-modal--content .reference-picker').contains('Create a new card')
|
||||
cy.get('.reference-picker-modal--content .reference-picker .card-title').should('be.visible').click().type(newCardTitle)
|
||||
cy.get('.reference-picker-modal--content .reference-picker .multiselect-board').should('be.visible').contains(boardData.title)
|
||||
cy.get('.reference-picker-modal--content .reference-picker .multiselect-list').should('be.visible').contains(boardData.stacks[0].title)
|
||||
cy.get('.reference-picker-modal--content .reference-picker button.button-vue--vue-primary').should('be.visible').click()
|
||||
cy.wait('@save', { timeout: 7000 })
|
||||
cy.get('.modal__card .ProseMirror').contains('/index.php/apps/deck/card/').should('be.visible')
|
||||
|
||||
cy.visit(`/apps/deck/#/board/${boardId}`)
|
||||
cy.reload()
|
||||
cy.get('.board .stack').eq(0).within(() => {
|
||||
cy.get(`.card:contains("${newCardTitle}")`).should('be.visible')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('Sidebar', () => {
|
||||
@@ -178,126 +125,6 @@ describe('Card', function() {
|
||||
cy.get('#app-sidebar-vue')
|
||||
.find('.ProseMirror h1').contains('Hello world writing more text').should('be.visible')
|
||||
})
|
||||
|
||||
it('Set a due date', function() {
|
||||
const newCardTitle = 'Card with a due date'
|
||||
|
||||
cy.get('.button-vue[aria-label*="Add card"]')
|
||||
.first().click()
|
||||
cy.get('.stack__card-add form input#new-stack-input-main')
|
||||
.type(newCardTitle)
|
||||
cy.get('.stack__card-add form input[type=submit]')
|
||||
.first().click()
|
||||
cy.get(`.card:contains("${newCardTitle}")`).should('be.visible')
|
||||
|
||||
cy.get('.card:contains("Card with a due date")').should('be.visible').click()
|
||||
|
||||
cy.get('#app-sidebar-vue [data-cy-due-date-actions]').should('be.visible').click()
|
||||
|
||||
// Set a due date through shortcut
|
||||
cy.get('[data-cy-due-date-shortcut="tomorrow"] button').should('be.visible').click()
|
||||
|
||||
const tomorrow = moment().add(1, 'days').hour(8).minutes(0).seconds(0)
|
||||
cy.get('#card-duedate-picker').should('have.value', tomorrow.format('YYYY-MM-DDTHH:mm'))
|
||||
|
||||
const now = moment().hour(11).minutes(0).seconds(0).toDate()
|
||||
cy.clock(now)
|
||||
cy.log(now)
|
||||
cy.tick(60_000)
|
||||
|
||||
cy.get(`.card:contains("${newCardTitle}")`).find('[data-due-state="Now"]').should('be.visible').should('contain', '21 hours')
|
||||
|
||||
|
||||
// Remove the due date again
|
||||
cy.get('#app-sidebar-vue [data-cy-due-date-actions]').should('be.visible').click()
|
||||
// tick needed to show the popover menu
|
||||
cy.tick(1_000)
|
||||
cy.get('[data-cy-due-date-remove] button').should('be.visible').click()
|
||||
|
||||
cy.get(`.card:contains("${newCardTitle}")`).find('[data-due-state]').should('not.exist')
|
||||
})
|
||||
|
||||
it('Add a label', function() {
|
||||
const newCardTitle = 'Card with labels'
|
||||
|
||||
cy.get('.button-vue[aria-label*="Add card"]')
|
||||
.first().click()
|
||||
cy.get('.stack__card-add form input#new-stack-input-main')
|
||||
.type(newCardTitle)
|
||||
cy.get('.stack__card-add form input[type=submit]')
|
||||
.first().click()
|
||||
cy.get(`.card:contains("${newCardTitle}")`).should('be.visible').click()
|
||||
|
||||
cy.get('#app-sidebar-vue [data-test="tag-selector"]').should('be.visible').click()
|
||||
cy.get('.multiselect__option:contains("Action needed")').should('be.visible').click()
|
||||
|
||||
cy.get('[data-test="tag-selector"] .selector-wrapper--icon').click()
|
||||
cy.get('.multiselect__option:contains("Action needed")').should('not.be.visible')
|
||||
|
||||
cy.get('[data-test="tag-selector"] .multiselect__tags .tag:contains("Action needed")')
|
||||
.should('be.visible')
|
||||
|
||||
cy.get(`.card:contains("${newCardTitle}")`).find('.labels li:contains("Action needed")')
|
||||
.should('be.visible')
|
||||
|
||||
cy.get('#app-sidebar-vue [data-test="tag-selector"]').should('be.visible').click()
|
||||
cy.get('.multiselect__option:contains("Later")').should('be.visible').click()
|
||||
cy.get('.multiselect__option:contains("Action needed")').should('be.visible').click()
|
||||
|
||||
cy.get(`.card:contains("${newCardTitle}")`).find('.labels li:contains("Later")')
|
||||
.should('be.visible')
|
||||
cy.get(`.card:contains("${newCardTitle}")`).find('.labels li:contains("Action needed")')
|
||||
.should('not.exist')
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
describe('Card actions', () => {
|
||||
beforeEach(function() {
|
||||
cy.login(user)
|
||||
useModal(false).then(() => {
|
||||
cy.visit(`/apps/deck/#/board/${boardId}`)
|
||||
})
|
||||
})
|
||||
|
||||
it('Custom card actions', () => {
|
||||
const myAction = {
|
||||
label: 'Test action',
|
||||
icon: 'icon-user',
|
||||
callback(card) {
|
||||
console.log('Called callback', card)
|
||||
},
|
||||
}
|
||||
cy.spy(myAction, 'callback').as('myAction.callback')
|
||||
|
||||
cy.window().then(win => {
|
||||
win.OCA.Deck.registerCardAction(myAction)
|
||||
})
|
||||
|
||||
cy.get('.card:contains("Hello world")').should('be.visible').click()
|
||||
cy.get('#app-sidebar-vue')
|
||||
.find('.ProseMirror h1').contains('Hello world').should('be.visible')
|
||||
|
||||
cy.get('.app-sidebar-header .action-item__menutoggle').click()
|
||||
cy.get('.v-popper__popper button:contains("Test action")').click()
|
||||
|
||||
cy.get('@myAction.callback')
|
||||
.should('be.called')
|
||||
.its('firstCall.args.0')
|
||||
.as('args')
|
||||
|
||||
cy.url().then(url => {
|
||||
const cardId = url.split('/').pop()
|
||||
cy.get('@args').should('have.property', 'name', 'Hello world')
|
||||
cy.get('@args').should('have.property', 'stackname', 'TestList')
|
||||
cy.get('@args').should('have.property', 'boardname', 'MyTestBoard')
|
||||
cy.get('@args').its('link').then((url) => {
|
||||
expect(url.split('/').pop() === cardId).to.be.true
|
||||
cy.visit(url)
|
||||
cy.get('#app-sidebar-vue')
|
||||
.find('.ProseMirror h1').contains('Hello world').should('be.visible')
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { randUser } from '../utils/index.js'
|
||||
import { sampleBoard } from '../utils/sampleBoard'
|
||||
const user = randUser()
|
||||
|
||||
describe('Deck dashboard', function() {
|
||||
@@ -9,18 +8,16 @@ describe('Deck dashboard', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
cy.login(user)
|
||||
cy.visit('/apps/deck')
|
||||
})
|
||||
|
||||
it('Can show the right title on the dashboard', function() {
|
||||
cy.visit('/apps/deck')
|
||||
cy.get('.board-title h2')
|
||||
.should('have.length', 1).first()
|
||||
.should($el => expect($el.text().trim()).to.equal('Upcoming cards'))
|
||||
.should('have.text', 'Upcoming cards')
|
||||
})
|
||||
|
||||
it('Can see the default "Personal Board" created for user by default', function() {
|
||||
cy.visit('/apps/deck')
|
||||
|
||||
const defaultBoard = 'Personal'
|
||||
|
||||
cy.get('.app-navigation-entry-wrapper[icon=icon-deck]')
|
||||
@@ -29,29 +26,4 @@ describe('Deck dashboard', function() {
|
||||
.contains(defaultBoard)
|
||||
.should('be.visible')
|
||||
})
|
||||
|
||||
it('Shows a card with due date on the overview', function() {
|
||||
cy.createExampleBoard({
|
||||
user,
|
||||
board: sampleBoard(),
|
||||
}).then((board) => {
|
||||
cy.visit(`/apps/deck/#/board/${board.id}`)
|
||||
|
||||
cy.intercept({ method: 'PUT', url: '**/apps/deck/cards/**' }).as('updateCard')
|
||||
|
||||
const newCardTitle = 'Hello world'
|
||||
cy.get(`.card:contains("${newCardTitle}")`).should('be.visible').click()
|
||||
cy.get('#app-sidebar-vue [data-cy-due-date-actions]').should('be.visible').click()
|
||||
cy.get('[data-cy-due-date-shortcut="tomorrow"] button').should('be.visible').click()
|
||||
|
||||
cy.wait('@updateCard')
|
||||
|
||||
cy.get('button[title="Close sidebar"]').click()
|
||||
cy.get('.app-navigation-entry:contains("Upcoming cards") a').click()
|
||||
|
||||
cy.get(`.card:contains("${newCardTitle}")`).should('be.visible')
|
||||
cy.get('.dashboard-column:contains("Tomorrow")').should('be.visible')
|
||||
cy.get('.dashboard-column:contains("Tomorrow") .card:contains("Hello world")').should('be.visible')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
46
docs/API.md
46
docs/API.md
@@ -80,7 +80,7 @@ An ETag header is returned in order to determine if further child elements have
|
||||
- Fetch a single card of a board `GET /api/v1.0/boards/{boardId}/stacks/{stackId}/cards/{cardId}`
|
||||
- Fetch attachments of a card `GET /api/v1.0/boards/{boardId}/stacks/{stackId}/cards/{cardId}/attachments`
|
||||
|
||||
If a `If-None-Match` header is provided and the requested element has not changed a `304` Not Modified response will be returned.
|
||||
If a `If-None-Match` header is provided and the requested element has not changed a `304` Not Modified response will be returned.
|
||||
|
||||
Changes of child elements will propagate to their parents and also cause an update of the ETag which will be useful for determining if a sync is necessary on any client integration side. As an example, if a label is added to a card, the ETag of all related entities (the card, stack and board) will change.
|
||||
|
||||
@@ -117,7 +117,6 @@ This API version has become available with **Deck 1.3.0**.
|
||||
- [GET /boards/import/getSystems - Import a board](#get-boardsimportgetsystems-import-a-board)
|
||||
- [GET /boards/import/config/system/{schema} - Import a board](#get-boardsimportconfigsystemschema-import-a-board)
|
||||
- [POST /boards/import - Import a board](#post-boardsimport-import-a-board)
|
||||
- The `done` property was added to cards
|
||||
|
||||
# Endpoints
|
||||
|
||||
@@ -588,7 +587,7 @@ The board list endpoint supports setting an `If-Modified-Since` header to limit
|
||||
#### Response
|
||||
|
||||
```json
|
||||
{
|
||||
{
|
||||
"title":"Test",
|
||||
"description":null,
|
||||
"stackId":6,
|
||||
@@ -602,7 +601,6 @@ The board list endpoint supports setting an `If-Modified-Since` header to limit
|
||||
"owner":"admin",
|
||||
"order":999,
|
||||
"archived":false,
|
||||
"done":null,
|
||||
"duedate": "2019-12-24T19:29:30+00:00",
|
||||
"deletedAt":0,
|
||||
"commentsUnread":0,
|
||||
@@ -625,28 +623,22 @@ The board list endpoint supports setting an `If-Modified-Since` header to limit
|
||||
|
||||
#### Request data
|
||||
|
||||
| Parameter | Type | Description |
|
||||
|-------------|-----------------|-----------------------------------------------------------------------------------------------------|
|
||||
| title | String | The title of the card, maximum length is limited to 255 characters |
|
||||
| description | String | The markdown description of the card |
|
||||
| type | String | Type of the card (for later use) use 'plain' for now |
|
||||
| owner | String | The user that owns the card |
|
||||
| order | Integer | Order for sorting the stacks |
|
||||
| duedate | timestamp | The ISO-8601 formatted duedate of the card or null |
|
||||
| archived | bool | Whether the card is archived or not |
|
||||
| done | timestamp\|null | The ISO-8601 formatted date when the card is marked as done (optional, null indicates undone state) |
|
||||
| Parameter | Type | Description |
|
||||
|-------------|-----------|------------------------------------------------------|
|
||||
| title | String | The title of the card, maximum length is limited to 255 characters |
|
||||
| description | String | The markdown description of the card |
|
||||
| type | String | Type of the card (for later use) use 'plain' for now |
|
||||
| order | Integer | Order for sorting the stacks |
|
||||
| duedate | timestamp | The ISO-8601 formatted duedate of the card or null |
|
||||
|
||||
|
||||
```
|
||||
{
|
||||
{
|
||||
"title": "Test card",
|
||||
"description": "A card description",
|
||||
"type": "plain",
|
||||
"owner": "admin",
|
||||
"order": 999,
|
||||
"duedate": "2019-12-24T19:29:30+00:00",
|
||||
"archived": false,
|
||||
"done": null,
|
||||
}
|
||||
```
|
||||
|
||||
@@ -985,7 +977,7 @@ For now only `deck_file` is supported as an attachment type.
|
||||
|
||||
### DELETE /boards/{boardId}/stacks/{stackId}/cards/{cardId}/attachments/{attachmentId} - Delete an attachment
|
||||
|
||||
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
@@ -1059,12 +1051,12 @@ Make a request to see the json schema of system
|
||||
|
||||
# OCS API
|
||||
|
||||
The following endpoints are available through the Nextcloud OCS endpoint, which is available at `/ocs/v2.php/apps/deck/api/v1.0/`.
|
||||
The following endpoints are available through the Nextcloud OCS endpoint, which is available at `/ocs/v2.php/apps/deck/api/v1.0/`.
|
||||
This has the benefit that both the web UI as well as external integrations can use the same API.
|
||||
|
||||
## Config
|
||||
|
||||
Deck stores user and app configuration values globally and per board. The GET endpoint allows to fetch the current global configuration while board settings will be exposed through the board element on the regular API endpoints.
|
||||
Deck stores user and app configuration values globally and per board. The GET endpoint allows to fetch the current global configuration while board settings will be exposed through the board element on the regular API endpoints.
|
||||
|
||||
### GET /api/v1.0/config - Fetch app configuration values
|
||||
|
||||
@@ -1072,10 +1064,10 @@ Deck stores user and app configuration values globally and per board. The GET en
|
||||
|
||||
| Config key | Description |
|
||||
| --- | --- |
|
||||
| calendar | Determines if the calendar/tasks integration through the CalDAV backend is enabled for the user (boolean) |
|
||||
| cardDetailsInModal | Determines if the bigger view is used (boolean) |
|
||||
| cardIdBadge | Determines if the ID badges are displayed on cards (boolean) |
|
||||
| groupLimit | Determines if creating new boards is limited to certain groups of the instance. The resulting output is an array of group objects with the id and the displayname (Admin only)|
|
||||
| calendar | Determines if the calendar/tasks integration through the CalDAV backend is enabled for the user (boolean) |
|
||||
| cardDetailsInModal | Determines if the bigger view is used (boolean) |
|
||||
| cardIdBadge | Determines if the ID badges are displayed on cards (boolean) |
|
||||
| groupLimit | Determines if creating new boards is limited to certain groups of the instance. The resulting output is an array of group objects with the id and the displayname (Admin only)|
|
||||
|
||||
```
|
||||
{
|
||||
@@ -1120,7 +1112,7 @@ Deck stores user and app configuration values globally and per board. The GET en
|
||||
| calendar | Boolean |
|
||||
| cardDetailsInModal | Boolean |
|
||||
| cardIdBadge | Boolean |
|
||||
|
||||
|
||||
#### Example request
|
||||
|
||||
```
|
||||
@@ -1194,7 +1186,7 @@ A list of comments will be provided under the `ocs.data` key. If no or no more c
|
||||
}
|
||||
```
|
||||
|
||||
In case a comment is marked as a reply to another comment object, the parent comment will be added as `replyTo` entry to the response. Only the next parent node is added, nested replies are not exposed directly.
|
||||
In case a comment is marked as a reply to another comment object, the parent comment will be added as `replyTo` entry to the response. Only the next parent node is added, nested replies are not exposed directly.
|
||||
|
||||
```json
|
||||
[
|
||||
|
||||
@@ -12,12 +12,11 @@ Overall, Deck is easy to use. You can create boards, add users, share the Deck,
|
||||
1. [Create my first board](#1-create-my-first-board)
|
||||
2. [Create stacks and cards](#2-create-stacks-and-cards)
|
||||
3. [Handle cards options](#3-handle-cards-options)
|
||||
4. [Mark task as done](#4-mark-as-done)
|
||||
5. [Archive old tasks](#5-archive-old-tasks)
|
||||
6. [Manage your board](#6-manage-your-board)
|
||||
7. [Import boards](#7-import-boards)
|
||||
8. [Search](#8-search)
|
||||
9. [New owner for the deck entities](#9-new-owner-for-the-deck-entities)
|
||||
4. [Archive old tasks](#4-archive-old-tasks)
|
||||
5. [Manage your board](#5-manage-your-board)
|
||||
6. [Import boards](#6-import-boards)
|
||||
7. [Search](#7-search)
|
||||
8. [New owner for the deck entities](#8-new-owner-for-the-deck-entities)
|
||||
|
||||
### 1. Create my first board
|
||||
In this example, we're going to create a board and share it with an other nextcloud user.
|
||||
@@ -26,7 +25,7 @@ In this example, we're going to create a board and share it with an other nextcl
|
||||
|
||||
|
||||
### 2. Create stacks and cards
|
||||
Stacks are simply columns with list of cards. It can represent a category of tasks or any step in your projects for example.
|
||||
Stacks are simply columns with list of cards. It can represent a category of tasks or an y step in your projects for example.
|
||||
**Check this out :**
|
||||
|
||||

|
||||
@@ -54,18 +53,12 @@ And even :
|
||||
|
||||

|
||||
|
||||
### 4. Mark as done
|
||||
Once a task has been completed, you can mark it as done. This will prevent it from becoming overdue and hide it from the upcoming cards.
|
||||
You can mark it as not done at any time.
|
||||
### 4. Archive old tasks
|
||||
Once finished or obsolete, a task could be archived. The tasks is not deleted, it's just archived, and you can retrieve it later
|
||||
|
||||

|
||||

|
||||
|
||||
### 5. Archive old tasks
|
||||
Once obsolete, a task could be archived. The task is not deleted, it's just archived, and you can retrieve it later
|
||||
|
||||

|
||||
|
||||
### 6. Manage your board
|
||||
### 5. Manage your board
|
||||
You can manage the settings of your Deck once you are inside it, by clicking on the small wheel at the top right.
|
||||
Once in this menu, you have access to several things:
|
||||
|
||||
@@ -79,7 +72,7 @@ The **sharing tab** allows you to add users or even groups to your boards.
|
||||
**Deleted objects** allows you to return previously deleted stacks or cards.
|
||||
The **Timeline** allows you to see everything that happened in your boards. Everything!
|
||||
|
||||
### 7. Import boards
|
||||
### 6. Import boards
|
||||
|
||||
Importing can be done using the API or the `occ` `deck:import` command.
|
||||
|
||||
@@ -145,7 +138,7 @@ Example configuration file:
|
||||
}
|
||||
```
|
||||
|
||||
### 8. Search
|
||||
### 7. Search
|
||||
|
||||
Deck provides a global search either through the unified search in the Nextcloud header or with the inline search next to the board controls.
|
||||
This search allows advanced filtering of cards across all board of the logged in user.
|
||||
@@ -168,7 +161,7 @@ Other text tokens will be used to perform a case-insensitive search on the card
|
||||
|
||||
In addition, quotes can be used to pass a query with spaces, e.g. `"Exact match with spaces"` or `title:"My card"`.
|
||||
|
||||
### 9. New owner for the deck entities
|
||||
### 8. New owner for the deck entities
|
||||
You can transfer ownership of boards, cards, etc to a new user, using `occ` command `deck:transfer-ownership`
|
||||
|
||||
```bash
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 88 KiB |
@@ -46,8 +46,8 @@ use OCP\AppFramework\Db\DoesNotExistException;
|
||||
use OCP\AppFramework\Db\MultipleObjectsReturnedException;
|
||||
use OCP\Comments\IComment;
|
||||
use OCP\IUser;
|
||||
use OCP\L10N\IFactory;
|
||||
use OCP\Server;
|
||||
use OCP\L10N\IFactory;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class ActivityManager {
|
||||
@@ -92,8 +92,6 @@ class ActivityManager {
|
||||
public const SUBJECT_CARD_UPDATE_DUEDATE = 'card_update_duedate';
|
||||
public const SUBJECT_CARD_UPDATE_ARCHIVE = 'card_update_archive';
|
||||
public const SUBJECT_CARD_UPDATE_UNARCHIVE = 'card_update_unarchive';
|
||||
public const SUBJECT_CARD_UPDATE_DONE = 'card_update_done';
|
||||
public const SUBJECT_CARD_UPDATE_UNDONE = 'card_update_undone';
|
||||
public const SUBJECT_CARD_UPDATE_STACKID = 'card_update_stackId';
|
||||
public const SUBJECT_CARD_USER_ASSIGN = 'card_user_assign';
|
||||
public const SUBJECT_CARD_USER_UNASSIGN = 'card_user_unassign';
|
||||
@@ -201,12 +199,6 @@ class ActivityManager {
|
||||
case self::SUBJECT_CARD_UPDATE_UNARCHIVE:
|
||||
$subject = $ownActivity ? $l->t('You have unarchived card {card} in list {stack} on board {board}') : $l->t('{user} has unarchived card {card} in list {stack} on board {board}');
|
||||
break;
|
||||
case self::SUBJECT_CARD_UPDATE_DONE:
|
||||
$subject = $ownActivity ? $l->t('You have marked the card {card} as done in list {stack} on board {board}') : $l->t('{user} has marked card {card} as done in list {stack} on board {board}');
|
||||
break;
|
||||
case self::SUBJECT_CARD_UPDATE_UNDONE:
|
||||
$subject = $ownActivity ? $l->t('You have marked the card {card} as undone in list {stack} on board {board}') : $l->t('{user} has marked the card {card} as undone in list {stack} on board {board}');
|
||||
break;
|
||||
case self::SUBJECT_CARD_UPDATE_DUEDATE:
|
||||
if (!isset($subjectParams['after'])) {
|
||||
$subject = $ownActivity ? $l->t('You have removed the due date of card {card}') : $l->t('{user} has removed the due date of card {card}');
|
||||
@@ -341,8 +333,8 @@ class ActivityManager {
|
||||
case self::SUBJECT_BOARD_UPDATE_ARCHIVED:
|
||||
case self::SUBJECT_BOARD_DELETE:
|
||||
case self::SUBJECT_BOARD_RESTORE:
|
||||
// Not defined as there is no activity for
|
||||
// case self::SUBJECT_BOARD_UPDATE_COLOR
|
||||
// Not defined as there is no activity for
|
||||
// case self::SUBJECT_BOARD_UPDATE_COLOR
|
||||
break;
|
||||
case self::SUBJECT_CARD_COMMENT_CREATE:
|
||||
$eventType = 'deck_comment';
|
||||
@@ -366,8 +358,6 @@ class ActivityManager {
|
||||
case self::SUBJECT_CARD_DELETE:
|
||||
case self::SUBJECT_CARD_UPDATE_ARCHIVE:
|
||||
case self::SUBJECT_CARD_UPDATE_UNARCHIVE:
|
||||
case self::SUBJECT_CARD_UPDATE_DONE:
|
||||
case self::SUBJECT_CARD_UPDATE_UNDONE:
|
||||
case self::SUBJECT_CARD_UPDATE_TITLE:
|
||||
case self::SUBJECT_CARD_UPDATE_DESCRIPTION:
|
||||
case self::SUBJECT_CARD_UPDATE_DUEDATE:
|
||||
@@ -385,7 +375,7 @@ class ActivityManager {
|
||||
$additionalParams['before'] = $additionalParams['before']->format('c');
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
case self::SUBJECT_ATTACHMENT_CREATE:
|
||||
case self::SUBJECT_ATTACHMENT_UPDATE:
|
||||
case self::SUBJECT_ATTACHMENT_DELETE:
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
|
||||
namespace OCA\Deck\Activity;
|
||||
|
||||
use \OCP\Comments\ICommentsEventHandler;
|
||||
use OCA\Deck\Db\CardMapper;
|
||||
use OCA\Deck\Db\ChangeHelper;
|
||||
use OCA\Deck\Notification\NotificationHelper;
|
||||
use OCP\Comments\CommentsEvent;
|
||||
use OCP\Comments\IComment;
|
||||
use \OCP\Comments\ICommentsEventHandler;
|
||||
|
||||
class CommentEventHandler implements ICommentsEventHandler {
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
namespace OCA\Deck\Activity;
|
||||
|
||||
use OCA\Deck\Db\Acl;
|
||||
use OCA\Deck\Service\CardService;
|
||||
use OCP\Activity\IEvent;
|
||||
use OCP\Activity\IProvider;
|
||||
use OCP\Comments\IComment;
|
||||
@@ -36,6 +35,7 @@ use OCP\IConfig;
|
||||
use OCP\IURLGenerator;
|
||||
use OCP\IUserManager;
|
||||
use OCP\L10N\IFactory;
|
||||
use OCA\Deck\Service\CardService;
|
||||
|
||||
class DeckProvider implements IProvider {
|
||||
|
||||
@@ -192,28 +192,28 @@ class DeckProvider implements IProvider {
|
||||
|
||||
private function getIcon(IEvent $event) {
|
||||
$event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('deck', 'deck-dark.svg')));
|
||||
if (str_contains($event->getSubject(), '_update')) {
|
||||
if (strpos($event->getSubject(), '_update') !== false) {
|
||||
$event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('files', 'change.svg')));
|
||||
}
|
||||
if (str_contains($event->getSubject(), '_create')) {
|
||||
if (strpos($event->getSubject(), '_create') !== false) {
|
||||
$event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('files', 'add-color.svg')));
|
||||
}
|
||||
if (str_contains($event->getSubject(), '_delete')) {
|
||||
if (strpos($event->getSubject(), '_delete') !== false) {
|
||||
$event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('files', 'delete-color.svg')));
|
||||
}
|
||||
if (str_contains($event->getSubject(), 'archive')) {
|
||||
if (strpos($event->getSubject(), 'archive') !== false) {
|
||||
$event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('deck', 'archive.svg')));
|
||||
}
|
||||
if (str_contains($event->getSubject(), '_restore')) {
|
||||
if (strpos($event->getSubject(), '_restore') !== false) {
|
||||
$event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/history.svg')));
|
||||
}
|
||||
if (str_contains($event->getSubject(), 'attachment_')) {
|
||||
if (strpos($event->getSubject(), 'attachment_') !== false) {
|
||||
$event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'places/files.svg')));
|
||||
}
|
||||
if (str_contains($event->getSubject(), 'comment_')) {
|
||||
if (strpos($event->getSubject(), 'comment_') !== false) {
|
||||
$event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/comment.svg')));
|
||||
}
|
||||
if (str_contains($event->getSubject(), 'label_')) {
|
||||
if (strpos($event->getSubject(), 'label_') !== false) {
|
||||
$event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/tag.svg')));
|
||||
}
|
||||
return $event;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
namespace OCA\Deck\Activity;
|
||||
|
||||
class SettingDescription extends SettingBase {
|
||||
class DescriptionSetting extends Setting {
|
||||
|
||||
/**
|
||||
* @return string Lowercase a-z and underscore only identifier
|
||||
@@ -38,6 +38,6 @@ class SettingDescription extends SettingBase {
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function getName(): string {
|
||||
return $this->l->t('A <strong>card description</strong> has been changed');
|
||||
return $this->l->t('A <strong>card description</strong> inside the Deck app has been changed');
|
||||
}
|
||||
}
|
||||
@@ -23,10 +23,9 @@
|
||||
|
||||
namespace OCA\Deck\Activity;
|
||||
|
||||
use OCP\Activity\ActivitySettings;
|
||||
use OCP\IL10N;
|
||||
|
||||
abstract class SettingBase extends ActivitySettings {
|
||||
class Setting implements \OCP\Activity\ISetting {
|
||||
|
||||
/** @var IL10N */
|
||||
protected $l;
|
||||
@@ -38,14 +37,6 @@ abstract class SettingBase extends ActivitySettings {
|
||||
$this->l = $l;
|
||||
}
|
||||
|
||||
public function getGroupIdentifier() {
|
||||
return 'deck';
|
||||
}
|
||||
|
||||
public function getGroupName() {
|
||||
return $this->l->t('Deck');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string Lowercase a-z and underscore only identifier
|
||||
* @since 11.0.0
|
||||
@@ -1,84 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace OCA\Deck\Activity;
|
||||
|
||||
class SettingChanges extends SettingBase {
|
||||
/**
|
||||
* @return string Lowercase a-z and underscore only identifier
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function getIdentifier(): string {
|
||||
return 'deck';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string A translated string
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function getName(): string {
|
||||
return $this->l->t('A <strong>board, list or card</strong> was changed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int whether the filter should be rather on the top or bottom of
|
||||
* the admin section. The filters are arranged in ascending order of the
|
||||
* priority values. It is required to return a value between 0 and 100.
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function getPriority(): int {
|
||||
return 90;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool True when the option can be changed for the stream
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function canChangeStream(): bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool True when the option can be changed for the stream
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function isDefaultEnabledStream(): bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool True when the option can be changed for the mail
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function canChangeMail(): bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool True when the option can be changed for the stream
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function isDefaultEnabledMail(): bool {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
namespace OCA\Deck\Activity;
|
||||
|
||||
class SettingComment extends SettingBase {
|
||||
class SettingComment extends Setting {
|
||||
|
||||
/**
|
||||
* @return string Lowercase a-z and underscore only identifier
|
||||
|
||||
@@ -30,9 +30,7 @@ use OCA\Deck\Activity\CommentEventHandler;
|
||||
use OCA\Deck\Capabilities;
|
||||
use OCA\Deck\Collaboration\Resources\ResourceProvider;
|
||||
use OCA\Deck\Collaboration\Resources\ResourceProviderCard;
|
||||
use OCA\Deck\Dashboard\DeckWidgetToday;
|
||||
use OCA\Deck\Dashboard\DeckWidgetTomorrow;
|
||||
use OCA\Deck\Dashboard\DeckWidgetUpcoming;
|
||||
use OCA\Deck\Dashboard\DeckWidget;
|
||||
use OCA\Deck\Db\Acl;
|
||||
use OCA\Deck\Db\CardMapper;
|
||||
use OCA\Deck\Event\AclCreatedEvent;
|
||||
@@ -45,24 +43,22 @@ use OCA\Deck\Event\CardUpdatedEvent;
|
||||
use OCA\Deck\Event\SessionClosedEvent;
|
||||
use OCA\Deck\Event\SessionCreatedEvent;
|
||||
use OCA\Deck\Listeners\BeforeTemplateRenderedListener;
|
||||
use OCA\Deck\Listeners\FullTextSearchEventListener;
|
||||
use OCA\Deck\Listeners\LiveUpdateListener;
|
||||
use OCA\Deck\Listeners\ParticipantCleanupListener;
|
||||
use OCA\Deck\Listeners\FullTextSearchEventListener;
|
||||
use OCA\Deck\Listeners\ResourceAdditionalScriptsListener;
|
||||
use OCA\Deck\Listeners\ResourceListener;
|
||||
use OCA\Deck\Listeners\LiveUpdateListener;
|
||||
use OCA\Deck\Middleware\DefaultBoardMiddleware;
|
||||
use OCA\Deck\Middleware\ExceptionMiddleware;
|
||||
use OCA\Deck\Notification\Notifier;
|
||||
use OCA\Deck\Reference\BoardReferenceProvider;
|
||||
use OCA\Deck\Reference\CardReferenceProvider;
|
||||
use OCA\Deck\Reference\CommentReferenceProvider;
|
||||
use OCA\Deck\Reference\CreateCardReferenceProvider;
|
||||
use OCA\Deck\Search\CardCommentProvider;
|
||||
use OCA\Deck\Search\DeckProvider;
|
||||
use OCA\Deck\Service\PermissionService;
|
||||
use OCA\Deck\Sharing\DeckShareProvider;
|
||||
use OCA\Deck\Sharing\Listener;
|
||||
use OCA\Text\Event\LoadEditor;
|
||||
use OCP\AppFramework\App;
|
||||
use OCP\AppFramework\Bootstrap\IBootContext;
|
||||
use OCP\AppFramework\Bootstrap\IBootstrap;
|
||||
@@ -87,8 +83,6 @@ class Application extends App implements IBootstrap {
|
||||
|
||||
public const COMMENT_ENTITY_TYPE = 'deckCard';
|
||||
|
||||
private $referenceLoaded = false;
|
||||
|
||||
public function __construct(array $urlParams = []) {
|
||||
parent::__construct(self::APP_ID, $urlParams);
|
||||
|
||||
@@ -96,12 +90,8 @@ class Application extends App implements IBootstrap {
|
||||
// (and use a listener class)
|
||||
$container = $this->getContainer();
|
||||
$eventDispatcher = $container->get(IEventDispatcher::class);
|
||||
$eventDispatcher->addListener(RenderReferenceEvent::class, function (RenderReferenceEvent $e) use ($eventDispatcher) {
|
||||
$eventDispatcher->addListener(RenderReferenceEvent::class, function () {
|
||||
Util::addScript(self::APP_ID, self::APP_ID . '-reference');
|
||||
if (!$this->referenceLoaded && class_exists(LoadEditor::class)) {
|
||||
$this->referenceLoaded = true;
|
||||
$eventDispatcher->dispatchTyped(new LoadEditor());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -137,11 +127,7 @@ class Application extends App implements IBootstrap {
|
||||
|
||||
$context->registerSearchProvider(DeckProvider::class);
|
||||
$context->registerSearchProvider(CardCommentProvider::class);
|
||||
$context->registerDashboardWidget(DeckWidgetUpcoming::class);
|
||||
$context->registerDashboardWidget(DeckWidgetToday::class);
|
||||
$context->registerDashboardWidget(DeckWidgetTomorrow::class);
|
||||
|
||||
$context->registerReferenceProvider(CreateCardReferenceProvider::class);
|
||||
$context->registerDashboardWidget(DeckWidget::class);
|
||||
|
||||
// reference widget
|
||||
$context->registerReferenceProvider(CardReferenceProvider::class);
|
||||
|
||||
@@ -43,7 +43,7 @@ class Capabilities implements ICapability {
|
||||
/**
|
||||
* Function an app uses to return the capabilities
|
||||
*
|
||||
* @return array{deck: array{version: string, canCreateBoards: bool, apiVersions: array<string>}}
|
||||
* @return array Array containing the apps capabilities
|
||||
* @since 8.2.0
|
||||
*/
|
||||
public function getCapabilities() {
|
||||
|
||||
@@ -22,19 +22,18 @@
|
||||
*/
|
||||
namespace OCA\Deck\Controller;
|
||||
|
||||
use OCA\Deck\Service\AttachmentService;
|
||||
use OCP\AppFramework\ApiController;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\IRequest;
|
||||
use OCA\Deck\Service\AttachmentService;
|
||||
|
||||
class AttachmentApiController extends ApiController {
|
||||
public function __construct(
|
||||
$appName,
|
||||
IRequest $request,
|
||||
private AttachmentService $attachmentService,
|
||||
) {
|
||||
private $attachmentService;
|
||||
|
||||
public function __construct($appName, IRequest $request, AttachmentService $attachmentService) {
|
||||
parent::__construct($appName, $request);
|
||||
$this->attachmentService = $attachmentService;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,12 +28,13 @@ use OCP\AppFramework\Controller;
|
||||
use OCP\IRequest;
|
||||
|
||||
class AttachmentController extends Controller {
|
||||
public function __construct(
|
||||
$appName,
|
||||
IRequest $request,
|
||||
private AttachmentService $attachmentService,
|
||||
) {
|
||||
|
||||
/** @var AttachmentService */
|
||||
private $attachmentService;
|
||||
|
||||
public function __construct($appName, IRequest $request, AttachmentService $attachmentService) {
|
||||
parent::__construct($appName, $request);
|
||||
$this->attachmentService = $attachmentService;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -52,7 +53,7 @@ class AttachmentController extends Controller {
|
||||
* @throws \OCA\Deck\NotFoundException
|
||||
*/
|
||||
public function display($cardId, $attachmentId) {
|
||||
if (!str_contains($attachmentId, ':')) {
|
||||
if (strpos($attachmentId, ':') === false) {
|
||||
$type = 'deck_file';
|
||||
} else {
|
||||
[$type, $attachmentId] = explode(':', $attachmentId);
|
||||
@@ -75,7 +76,7 @@ class AttachmentController extends Controller {
|
||||
* @NoAdminRequired
|
||||
*/
|
||||
public function update($cardId, $attachmentId) {
|
||||
if (!str_contains($attachmentId, ':')) {
|
||||
if (strpos($attachmentId, ':') === false) {
|
||||
$type = 'deck_file';
|
||||
} else {
|
||||
[$type, $attachmentId] = explode(':', $attachmentId);
|
||||
@@ -87,7 +88,7 @@ class AttachmentController extends Controller {
|
||||
* @NoAdminRequired
|
||||
*/
|
||||
public function delete($cardId, $attachmentId) {
|
||||
if (!str_contains($attachmentId, ':')) {
|
||||
if (strpos($attachmentId, ':') === false) {
|
||||
$type = 'deck_file';
|
||||
} else {
|
||||
[$type, $attachmentId] = explode(':', $attachmentId);
|
||||
@@ -99,7 +100,7 @@ class AttachmentController extends Controller {
|
||||
* @NoAdminRequired
|
||||
*/
|
||||
public function restore($cardId, $attachmentId) {
|
||||
if (!str_contains($attachmentId, ':')) {
|
||||
if (strpos($attachmentId, ':') === false) {
|
||||
$type = 'deck_file';
|
||||
} else {
|
||||
[$type, $attachmentId] = explode(':', $attachmentId);
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
namespace OCA\Deck\Controller;
|
||||
|
||||
use OCA\Deck\Db\Board;
|
||||
use OCA\Deck\Service\BoardService;
|
||||
use OCA\Deck\StatusException;
|
||||
use OCP\AppFramework\ApiController;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
|
||||
use OCP\IRequest;
|
||||
|
||||
use OCA\Deck\Service\BoardService;
|
||||
use Sabre\HTTP\Util;
|
||||
|
||||
/**
|
||||
@@ -40,16 +40,18 @@ use Sabre\HTTP\Util;
|
||||
* @package OCA\Deck\Controller
|
||||
*/
|
||||
class BoardApiController extends ApiController {
|
||||
private $boardService;
|
||||
|
||||
/**
|
||||
* @param string $appName
|
||||
* @param IRequest $request
|
||||
* @param BoardService $service
|
||||
* @param $userId
|
||||
*/
|
||||
public function __construct(
|
||||
$appName,
|
||||
IRequest $request,
|
||||
private BoardService $boardService,
|
||||
private $userId,
|
||||
) {
|
||||
public function __construct($appName, IRequest $request, BoardService $service, $userId) {
|
||||
parent::__construct($appName, $request);
|
||||
$this->boardService = $service;
|
||||
$this->userId = $userId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,14 +33,15 @@ use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\IRequest;
|
||||
|
||||
class BoardController extends ApiController {
|
||||
public function __construct(
|
||||
$appName,
|
||||
IRequest $request,
|
||||
private BoardService $boardService,
|
||||
private PermissionService $permissionService,
|
||||
private $userId,
|
||||
) {
|
||||
private $userId;
|
||||
private $boardService;
|
||||
private $permissionService;
|
||||
|
||||
public function __construct($appName, IRequest $request, BoardService $boardService, PermissionService $permissionService, $userId) {
|
||||
parent::__construct($appName, $request);
|
||||
$this->userId = $userId;
|
||||
$this->boardService = $boardService;
|
||||
$this->permissionService = $permissionService;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -143,7 +144,7 @@ class BoardController extends ApiController {
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @param $aclId
|
||||
* @return \OCP\AppFramework\Db\Entity|null
|
||||
* @return \OCP\AppFramework\Db\Entity
|
||||
*/
|
||||
public function deleteAcl($aclId) {
|
||||
return $this->boardService->deleteAcl($aclId);
|
||||
|
||||
@@ -30,13 +30,20 @@ use OCP\AppFramework\OCSController;
|
||||
use OCP\IRequest;
|
||||
|
||||
class BoardImportApiController extends OCSController {
|
||||
/** @var BoardImportService */
|
||||
private $boardImportService;
|
||||
/** @var string */
|
||||
private $userId;
|
||||
|
||||
public function __construct(
|
||||
string $appName,
|
||||
IRequest $request,
|
||||
private BoardImportService $boardImportService,
|
||||
private string $userId,
|
||||
BoardImportService $boardImportService,
|
||||
string $userId
|
||||
) {
|
||||
parent::__construct($appName, $request);
|
||||
$this->boardImportService = $boardImportService;
|
||||
$this->userId = $userId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,38 +23,36 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace OCA\Deck\Controller;
|
||||
namespace OCA\Deck\Controller;
|
||||
|
||||
use OCA\Deck\Model\OptionalNullableValue;
|
||||
use OCA\Deck\Service\AssignmentService;
|
||||
use OCA\Deck\Service\CardService;
|
||||
use OCP\AppFramework\ApiController;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\IRequest;
|
||||
use OCA\Deck\Service\AssignmentService;
|
||||
use OCP\AppFramework\ApiController;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\IRequest;
|
||||
use OCA\Deck\Service\CardService;
|
||||
|
||||
/**
|
||||
* Class BoardApiController
|
||||
*
|
||||
* @package OCA\Deck\Controller
|
||||
*/
|
||||
/**
|
||||
* Class BoardApiController
|
||||
*
|
||||
* @package OCA\Deck\Controller
|
||||
*/
|
||||
class CardApiController extends ApiController {
|
||||
private $cardService;
|
||||
private $userId;
|
||||
private $assignmentService;
|
||||
|
||||
/**
|
||||
* @param string $appName
|
||||
* @param IRequest $request
|
||||
* @param CardService $cardService
|
||||
* @param AssignmentService $assignmentService
|
||||
* @param $userId
|
||||
*/
|
||||
public function __construct(
|
||||
string $appName,
|
||||
IRequest $request,
|
||||
private CardService $cardService,
|
||||
private AssignmentService $assignmentService,
|
||||
private $userId,
|
||||
) {
|
||||
public function __construct($appName, IRequest $request, CardService $cardService, AssignmentService $assignmentService, $userId) {
|
||||
parent::__construct($appName, $request);
|
||||
$this->cardService = $cardService;
|
||||
$this->userId = $userId;
|
||||
$this->assignmentService = $assignmentService;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -83,17 +81,8 @@ class CardApiController extends ApiController {
|
||||
*
|
||||
* Get a specific card.
|
||||
*/
|
||||
public function create($title, $type = 'plain', $order = 999, $description = '', $duedate = null, $labels = [], $users = []) {
|
||||
public function create($title, $type = 'plain', $order = 999, $description = '', $duedate = null) {
|
||||
$card = $this->cardService->create($title, $this->request->getParam('stackId'), $type, $order, $this->userId, $description, $duedate);
|
||||
|
||||
foreach ($labels as $labelId) {
|
||||
$this->cardService->assignLabel($card->id, $labelId);
|
||||
}
|
||||
|
||||
foreach ($users as $user) {
|
||||
$this->assignmentService->assignUser($card->id, $user['id'], $user['type']);
|
||||
}
|
||||
|
||||
return new DataResponse($card, HTTP::STATUS_OK);
|
||||
}
|
||||
|
||||
@@ -106,8 +95,7 @@ class CardApiController extends ApiController {
|
||||
* Update a card
|
||||
*/
|
||||
public function update($title, $type, $owner, $description = '', $order = 0, $duedate = null, $archived = null) {
|
||||
$done = array_key_exists('done', $this->request->getParams()) ? new OptionalNullableValue($this->request->getParam('done', null)) : null;
|
||||
$card = $this->cardService->update($this->request->getParam('cardId'), $title, $this->request->getParam('stackId'), $type, $owner, $description, $order, $duedate, 0, $archived, $done);
|
||||
$card = $this->cardService->update($this->request->getParam('cardId'), $title, $this->request->getParam('stackId'), $type, $owner, $description, $order, $duedate, 0, $archived);
|
||||
return new DataResponse($card, HTTP::STATUS_OK);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,18 +25,19 @@ namespace OCA\Deck\Controller;
|
||||
|
||||
use OCA\Deck\Service\AssignmentService;
|
||||
use OCA\Deck\Service\CardService;
|
||||
use OCP\AppFramework\Controller;
|
||||
use OCP\IRequest;
|
||||
use OCP\AppFramework\Controller;
|
||||
|
||||
class CardController extends Controller {
|
||||
public function __construct(
|
||||
$appName,
|
||||
IRequest $request,
|
||||
private CardService $cardService,
|
||||
private AssignmentService $assignmentService,
|
||||
private $userId,
|
||||
) {
|
||||
private $userId;
|
||||
private $cardService;
|
||||
private $assignmentService;
|
||||
|
||||
public function __construct($appName, IRequest $request, CardService $cardService, AssignmentService $assignmentService, $userId) {
|
||||
parent::__construct($appName, $request);
|
||||
$this->userId = $userId;
|
||||
$this->cardService = $cardService;
|
||||
$this->assignmentService = $assignmentService;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -77,18 +78,8 @@ class CardController extends Controller {
|
||||
* @param int $order
|
||||
* @return \OCP\AppFramework\Db\Entity
|
||||
*/
|
||||
public function create($title, $stackId, $type = 'plain', $order = 999, string $description = '', $duedate = null, $labels = [], $users = []) {
|
||||
$card = $this->cardService->create($title, $stackId, $type, $order, $this->userId, $description, $duedate);
|
||||
|
||||
foreach ($labels as $label) {
|
||||
$this->assignLabel($card->id, $label);
|
||||
}
|
||||
|
||||
foreach ($users as $user) {
|
||||
$this->assignmentService->assignUser($card->id, $user['id'], $user['type']);
|
||||
}
|
||||
|
||||
return $card;
|
||||
public function create($title, $stackId, $type = 'plain', $order = 999, string $description = '') {
|
||||
return $this->cardService->create($title, $stackId, $type, $order, $this->userId, $description);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -143,24 +134,6 @@ class CardController extends Controller {
|
||||
return $this->cardService->unarchive($cardId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @param $cardId
|
||||
* @return \OCP\AppFramework\Db\Entity
|
||||
*/
|
||||
public function done(int $cardId) {
|
||||
return $this->cardService->done($cardId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @param $cardId
|
||||
* @return \OCP\AppFramework\Db\Entity
|
||||
*/
|
||||
public function undone(int $cardId) {
|
||||
return $this->cardService->undone($cardId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @param $cardId
|
||||
|
||||
@@ -31,15 +31,18 @@ use OCP\AppFramework\OCSController;
|
||||
use OCP\IRequest;
|
||||
|
||||
class CommentsApiController extends OCSController {
|
||||
|
||||
/** @var CommentService */
|
||||
private $commentService;
|
||||
|
||||
public function __construct(
|
||||
string $appName,
|
||||
IRequest $request,
|
||||
private CommentService $commentService,
|
||||
string $corsMethods = 'PUT, POST, GET, DELETE, PATCH',
|
||||
string $corsAllowedHeaders = 'Authorization, Content-Type, Accept',
|
||||
int $corsMaxAge = 1728000,
|
||||
CommentService $commentService,
|
||||
string $corsMethods = 'PUT, POST, GET, DELETE, PATCH', string $corsAllowedHeaders = 'Authorization, Content-Type, Accept', int $corsMaxAge = 1728000
|
||||
) {
|
||||
parent::__construct($appName, $request, $corsMethods, $corsAllowedHeaders, $corsMaxAge);
|
||||
$this->commentService = $commentService;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -30,12 +30,16 @@ use OCP\AppFramework\OCSController;
|
||||
use OCP\IRequest;
|
||||
|
||||
class ConfigController extends OCSController {
|
||||
private $configService;
|
||||
|
||||
public function __construct(
|
||||
$AppName,
|
||||
IRequest $request,
|
||||
private ConfigService $configService,
|
||||
) {
|
||||
ConfigService $configService
|
||||
) {
|
||||
parent::__construct($AppName, $request);
|
||||
|
||||
$this->configService = $configService;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
|
||||
namespace OCA\Deck\Controller;
|
||||
|
||||
use OCA\Deck\Service\LabelService;
|
||||
use OCP\AppFramework\ApiController;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\IRequest;
|
||||
use OCA\Deck\Service\LabelService;
|
||||
|
||||
/**
|
||||
* Class BoardApiController
|
||||
@@ -35,18 +35,21 @@ use OCP\IRequest;
|
||||
* @package OCA\Deck\Controller
|
||||
*/
|
||||
class LabelApiController extends ApiController {
|
||||
private $labelService;
|
||||
private $userId;
|
||||
|
||||
/**
|
||||
* @param string $appName
|
||||
* @param IRequest $request
|
||||
* @param LabelService $labelService
|
||||
* @param $userId
|
||||
*/
|
||||
public function __construct(
|
||||
$appName,
|
||||
IRequest $request,
|
||||
private LabelService $labelService,
|
||||
private $userId,
|
||||
) {
|
||||
public function __construct($appName, IRequest $request, LabelService $labelService, $userId) {
|
||||
parent::__construct($appName, $request);
|
||||
$this->labelService = $labelService;
|
||||
$this->userId = $userId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @CORS
|
||||
|
||||
@@ -24,16 +24,15 @@
|
||||
namespace OCA\Deck\Controller;
|
||||
|
||||
use OCA\Deck\Service\LabelService;
|
||||
use OCP\AppFramework\Controller;
|
||||
use OCP\IRequest;
|
||||
use OCP\AppFramework\Controller;
|
||||
|
||||
class LabelController extends Controller {
|
||||
public function __construct(
|
||||
$appName,
|
||||
IRequest $request,
|
||||
private LabelService $labelService,
|
||||
) {
|
||||
private $labelService;
|
||||
|
||||
public function __construct($appName, IRequest $request, LabelService $labelService) {
|
||||
parent::__construct($appName, $request);
|
||||
$this->labelService = $labelService;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,13 +32,17 @@ use OCP\AppFramework\OCSController;
|
||||
use OCP\IRequest;
|
||||
|
||||
class OverviewApiController extends OCSController {
|
||||
public function __construct(
|
||||
$appName,
|
||||
IRequest $request,
|
||||
private OverviewService $dashboardService,
|
||||
private $userId,
|
||||
) {
|
||||
|
||||
/** @var OverviewService */
|
||||
private $dashboardService;
|
||||
|
||||
/** @var string */
|
||||
private $userId;
|
||||
|
||||
public function __construct($appName, IRequest $request, OverviewService $dashboardService, $userId) {
|
||||
parent::__construct($appName, $request);
|
||||
$this->dashboardService = $dashboardService;
|
||||
$this->userId = $userId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,53 +23,71 @@
|
||||
|
||||
namespace OCA\Deck\Controller;
|
||||
|
||||
use \OCP\AppFramework\Http\RedirectResponse;
|
||||
use OCA\Deck\Db\Acl;
|
||||
use OCA\Deck\Db\CardMapper;
|
||||
use OCA\Deck\Service\BoardService;
|
||||
use OCA\Deck\Service\CardService;
|
||||
use OCA\Deck\AppInfo\Application;
|
||||
use OCA\Deck\Service\ConfigService;
|
||||
use OCA\Deck\Service\PermissionService;
|
||||
use OCA\Files\Event\LoadSidebar;
|
||||
use OCA\Text\Event\LoadEditor;
|
||||
use OCA\Viewer\Event\LoadViewer;
|
||||
use OCP\AppFramework\Controller;
|
||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
||||
use OCP\AppFramework\Http\ContentSecurityPolicy;
|
||||
use OCP\AppFramework\Http\TemplateResponse;
|
||||
use OCP\AppFramework\Services\IInitialState;
|
||||
use OCP\Collaboration\Resources\LoadAdditionalScriptsEvent as CollaborationResourcesEvent;
|
||||
use OCP\EventDispatcher\IEventDispatcher;
|
||||
use OCP\IConfig;
|
||||
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 $permissionService;
|
||||
private IInitialStateService $initialState;
|
||||
private ConfigService $configService;
|
||||
private IEventDispatcher $eventDispatcher;
|
||||
private CardMapper $cardMapper;
|
||||
private IURLGenerator $urlGenerator;
|
||||
private CardService $cardService;
|
||||
private IConfig $config;
|
||||
|
||||
public function __construct(
|
||||
string $AppName,
|
||||
IRequest $request,
|
||||
private PermissionService $permissionService,
|
||||
private IInitialState $initialState,
|
||||
private BoardService $boardService,
|
||||
private ConfigService $configService,
|
||||
private IEventDispatcher $eventDispatcher,
|
||||
private CardMapper $cardMapper,
|
||||
private IURLGenerator $urlGenerator,
|
||||
private CardService $cardService,
|
||||
private IConfig $config,
|
||||
) {
|
||||
PermissionService $permissionService,
|
||||
IInitialStateService $initialStateService,
|
||||
ConfigService $configService,
|
||||
IEventDispatcher $eventDispatcher,
|
||||
CardMapper $cardMapper,
|
||||
IURLGenerator $urlGenerator,
|
||||
CardService $cardService,
|
||||
IConfig $config
|
||||
) {
|
||||
parent::__construct($AppName, $request);
|
||||
|
||||
$this->permissionService = $permissionService;
|
||||
$this->initialState = $initialStateService;
|
||||
$this->configService = $configService;
|
||||
$this->eventDispatcher = $eventDispatcher;
|
||||
$this->cardMapper = $cardMapper;
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
$this->cardService = $cardService;
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
#[NoAdminRequired]
|
||||
#[NoCSRFRequired]
|
||||
public function index(): TemplateResponse {
|
||||
$this->initialState->provideInitialState('maxUploadSize', (int)\OCP\Util::uploadLimit());
|
||||
$this->initialState->provideInitialState('canCreate', $this->permissionService->canCreate());
|
||||
$this->initialState->provideInitialState('config', $this->configService->getAll());
|
||||
|
||||
$this->initialState->provideInitialState('initialBoards', $this->boardService->findAll());
|
||||
/**
|
||||
* Handle main html view from templates/main.php
|
||||
* This will return the main angular application
|
||||
*
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*/
|
||||
public function index() {
|
||||
$this->initialState->provideInitialState(Application::APP_ID, 'maxUploadSize', (int)\OCP\Util::uploadLimit());
|
||||
$this->initialState->provideInitialState(Application::APP_ID, 'canCreate', $this->permissionService->canCreate());
|
||||
$this->initialState->provideInitialState(Application::APP_ID, 'config', $this->configService->getAll());
|
||||
|
||||
$this->eventDispatcher->dispatchTyped(new LoadSidebar());
|
||||
$this->eventDispatcher->dispatchTyped(new CollaborationResourcesEvent());
|
||||
@@ -95,32 +113,10 @@ class PageController extends Controller {
|
||||
return $response;
|
||||
}
|
||||
|
||||
#[NoAdminRequired]
|
||||
#[NoCSRFRequired]
|
||||
public function indexList(): TemplateResponse {
|
||||
return $this->index();
|
||||
}
|
||||
|
||||
#[NoAdminRequired]
|
||||
#[NoCSRFRequired]
|
||||
public function indexBoard(int $boardId): TemplateResponse {
|
||||
return $this->index();
|
||||
}
|
||||
|
||||
#[NoAdminRequired]
|
||||
#[NoCSRFRequired]
|
||||
public function indexBoardDetails(int $boardId): TemplateResponse {
|
||||
return $this->index();
|
||||
}
|
||||
|
||||
#[NoAdminRequired]
|
||||
#[NoCSRFRequired]
|
||||
public function indexCard(int $cardId): TemplateResponse {
|
||||
return $this->index();
|
||||
}
|
||||
|
||||
#[NoAdminRequired]
|
||||
#[NoCSRFRequired]
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*/
|
||||
public function redirectToCard($cardId): RedirectResponse {
|
||||
try {
|
||||
$this->permissionService->checkPermission($this->cardMapper, $cardId, Acl::PERMISSION_READ);
|
||||
|
||||
@@ -34,12 +34,15 @@ use OCP\AppFramework\OCSController;
|
||||
use OCP\IRequest;
|
||||
|
||||
class SearchController extends OCSController {
|
||||
public function __construct(
|
||||
string $appName,
|
||||
IRequest $request,
|
||||
private SearchService $searchService,
|
||||
) {
|
||||
|
||||
/**
|
||||
* @var SearchService
|
||||
*/
|
||||
private $searchService;
|
||||
|
||||
public function __construct(string $appName, IRequest $request, SearchService $searchService) {
|
||||
parent::__construct($appName, $request);
|
||||
$this->searchService = $searchService;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,28 +24,35 @@ declare(strict_types=1);
|
||||
|
||||
namespace OCA\Deck\Controller;
|
||||
|
||||
use OCA\Deck\Db\Acl;
|
||||
use OCA\Deck\Db\BoardMapper;
|
||||
use OCA\Deck\Service\PermissionService;
|
||||
use OCA\Deck\Service\SessionService;
|
||||
use OCA\Deck\Service\PermissionService;
|
||||
use OCA\Deck\Db\BoardMapper;
|
||||
use OCP\AppFramework\Db\DoesNotExistException;
|
||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\AppFramework\OCSController;
|
||||
use OCP\IRequest;
|
||||
use OCA\Deck\Db\Acl;
|
||||
|
||||
class SessionController extends OCSController {
|
||||
private SessionService $sessionService;
|
||||
private PermissionService $permissionService;
|
||||
private BoardMapper $boardMapper;
|
||||
|
||||
public function __construct($appName,
|
||||
IRequest $request,
|
||||
private SessionService $sessionService,
|
||||
private PermissionService $permissionService,
|
||||
private BoardMapper $boardMapper,
|
||||
SessionService $sessionService,
|
||||
PermissionService $permissionService,
|
||||
BoardMapper $boardMapper
|
||||
) {
|
||||
parent::__construct($appName, $request);
|
||||
$this->sessionService = $sessionService;
|
||||
$this->permissionService = $permissionService;
|
||||
$this->boardMapper = $boardMapper;
|
||||
}
|
||||
|
||||
#[NoAdminRequired]
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
*/
|
||||
public function create(int $boardId): DataResponse {
|
||||
$this->permissionService->checkPermission($this->boardMapper, $boardId, Acl::PERMISSION_READ);
|
||||
|
||||
@@ -55,7 +62,11 @@ class SessionController extends OCSController {
|
||||
]);
|
||||
}
|
||||
|
||||
#[NoAdminRequired]
|
||||
/**
|
||||
* notifies the server that the session is still active
|
||||
* @NoAdminRequired
|
||||
* @param $boardId
|
||||
*/
|
||||
public function sync(int $boardId, string $token): DataResponse {
|
||||
$this->permissionService->checkPermission($this->boardMapper, $boardId, Acl::PERMISSION_READ);
|
||||
try {
|
||||
@@ -66,12 +77,13 @@ class SessionController extends OCSController {
|
||||
}
|
||||
}
|
||||
|
||||
#[NoAdminRequired]
|
||||
#[NoCSRFRequired]
|
||||
public function close(int $boardId, string $token = null): DataResponse {
|
||||
if ($token === null) {
|
||||
return new DataResponse();
|
||||
}
|
||||
/**
|
||||
* delete a session if existing
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
* @param $boardId
|
||||
*/
|
||||
public function close(int $boardId, string $token) {
|
||||
$this->permissionService->checkPermission($this->boardMapper, $boardId, Acl::PERMISSION_READ);
|
||||
$this->sessionService->closeSession($boardId, $token);
|
||||
return new DataResponse();
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
|
||||
namespace OCA\Deck\Controller;
|
||||
|
||||
use OCA\Deck\Service\BoardService;
|
||||
use OCA\Deck\Service\StackService;
|
||||
use OCA\Deck\StatusException;
|
||||
use OCP\AppFramework\ApiController;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\IRequest;
|
||||
use OCA\Deck\Service\StackService;
|
||||
use OCA\Deck\Service\BoardService;
|
||||
use Sabre\HTTP\Util;
|
||||
|
||||
/**
|
||||
@@ -39,16 +39,18 @@ use Sabre\HTTP\Util;
|
||||
* @package OCA\Deck\Controller
|
||||
*/
|
||||
class StackApiController extends ApiController {
|
||||
private $boardService;
|
||||
private $stackService;
|
||||
|
||||
/**
|
||||
* @param string $appName
|
||||
* @param IRequest $request
|
||||
* @param StackService $stackService
|
||||
*/
|
||||
public function __construct(
|
||||
$appName,
|
||||
IRequest $request,
|
||||
private StackService $stackService,
|
||||
private BoardService $boardService,
|
||||
) {
|
||||
public function __construct($appName, IRequest $request, StackService $stackService, BoardService $boardService) {
|
||||
parent::__construct($appName, $request);
|
||||
$this->stackService = $stackService;
|
||||
$this->boardService = $boardService;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,18 +25,17 @@ namespace OCA\Deck\Controller;
|
||||
|
||||
use OCA\Deck\Service\StackService;
|
||||
|
||||
use OCP\AppFramework\Controller;
|
||||
|
||||
use OCP\IRequest;
|
||||
|
||||
use OCP\AppFramework\Controller;
|
||||
|
||||
class StackController extends Controller {
|
||||
public function __construct(
|
||||
string $appName,
|
||||
IRequest $request,
|
||||
private StackService $stackService,
|
||||
private $userId,
|
||||
) {
|
||||
private $userId;
|
||||
private $stackService;
|
||||
public function __construct($appName, IRequest $request, StackService $stackService, $userId) {
|
||||
parent::__construct($appName, $request);
|
||||
$this->userId = $userId;
|
||||
$this->stackService = $stackService;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
|
||||
namespace OCA\Deck\Cron;
|
||||
|
||||
use OCA\Deck\Activity\ActivityManager;
|
||||
use OCA\Deck\Db\CardMapper;
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
use OCP\BackgroundJob\Job;
|
||||
use OCA\Deck\Activity\ActivityManager;
|
||||
use OCA\Deck\Db\CardMapper;
|
||||
|
||||
class CardDescriptionActivity extends Job {
|
||||
|
||||
|
||||
@@ -24,14 +24,14 @@
|
||||
|
||||
namespace OCA\Deck\Cron;
|
||||
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
use OCP\BackgroundJob\TimedJob;
|
||||
use OCA\Deck\Db\AttachmentMapper;
|
||||
use OCA\Deck\Db\BoardMapper;
|
||||
use OCA\Deck\Db\CardMapper;
|
||||
use OCA\Deck\InvalidAttachmentType;
|
||||
use OCA\Deck\Service\AttachmentService;
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
use OCP\BackgroundJob\IJob;
|
||||
use OCP\BackgroundJob\TimedJob;
|
||||
|
||||
class DeleteCron extends TimedJob {
|
||||
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
|
||||
namespace OCA\Deck\Cron;
|
||||
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
use OCP\BackgroundJob\Job;
|
||||
use OCA\Deck\Db\Card;
|
||||
use OCA\Deck\Db\CardMapper;
|
||||
use OCA\Deck\Notification\NotificationHelper;
|
||||
use OCP\AppFramework\Db\DoesNotExistException;
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
use OCP\BackgroundJob\Job;
|
||||
use OCP\ILogger;
|
||||
|
||||
class ScheduledNotifications extends Job {
|
||||
|
||||
@@ -39,8 +39,8 @@ class SessionsCleanup extends TimedJob {
|
||||
|
||||
|
||||
public function __construct(ITimeFactory $time,
|
||||
SessionService $sessionService,
|
||||
ILogger $logger) {
|
||||
SessionService $sessionService,
|
||||
ILogger $logger) {
|
||||
parent::__construct($time);
|
||||
$this->sessionService = $sessionService;
|
||||
$this->logger = $logger;
|
||||
|
||||
@@ -40,7 +40,7 @@ use OCP\IL10N;
|
||||
use OCP\IURLGenerator;
|
||||
use OCP\Util;
|
||||
|
||||
class DeckWidgetUpcoming implements IAPIWidget, IButtonWidget, IIconWidget {
|
||||
class DeckWidget implements IAPIWidget, IButtonWidget, IIconWidget {
|
||||
private IL10N $l10n;
|
||||
private OverviewService $dashboardService;
|
||||
private IURLGenerator $urlGenerator;
|
||||
@@ -1,85 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2020 Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace OCA\Deck\Dashboard;
|
||||
|
||||
use OCP\Dashboard\IWidget;
|
||||
use OCP\IL10N;
|
||||
|
||||
class DeckWidgetToday implements IWidget {
|
||||
|
||||
/**
|
||||
*
|
||||
* @var IL10N
|
||||
*/
|
||||
private $l10n;
|
||||
|
||||
public function __construct(IL10N $l10n) {
|
||||
$this->l10n = $l10n;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getId(): string {
|
||||
return 'deckToday';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getTitle(): string {
|
||||
return $this->l10n->t('Cards due today');
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getOrder(): int {
|
||||
return 20;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getIconClass(): string {
|
||||
return 'icon-deck';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getUrl(): ?string {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function load(): void {
|
||||
\OCP\Util::addScript('deck', 'deck-dashboard');
|
||||
}
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2020 Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace OCA\Deck\Dashboard;
|
||||
|
||||
use OCP\Dashboard\IWidget;
|
||||
use OCP\IL10N;
|
||||
|
||||
class DeckWidgetTomorrow implements IWidget {
|
||||
|
||||
/**
|
||||
*
|
||||
* @var IL10N
|
||||
*/
|
||||
private $l10n;
|
||||
|
||||
public function __construct(IL10N $l10n) {
|
||||
$this->l10n = $l10n;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getId(): string {
|
||||
return 'deckTomorrow';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getTitle(): string {
|
||||
return $this->l10n->t('Cards due tomorrow');
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getOrder(): int {
|
||||
return 20;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getIconClass(): string {
|
||||
return 'icon-deck';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getUrl(): ?string {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function load(): void {
|
||||
\OCP\Util::addScript('deck', 'deck-dashboard');
|
||||
}
|
||||
}
|
||||
@@ -29,8 +29,8 @@ use OCP\AppFramework\Db\DoesNotExistException;
|
||||
use OCP\AppFramework\Db\QBMapper;
|
||||
use OCP\DB\QueryBuilder\IQueryBuilder;
|
||||
use OCP\IDBConnection;
|
||||
use OCP\IGroupManager;
|
||||
use OCP\IUserManager;
|
||||
use OCP\IGroupManager;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
/** @template-extends QBMapper<Board> */
|
||||
@@ -159,7 +159,7 @@ class BoardMapper extends QBMapper implements IPermissionMapper {
|
||||
}
|
||||
|
||||
public function findAllForUser(string $userId, ?int $since = null, bool $includeArchived = true, ?int $before = null,
|
||||
?string $term = null): array {
|
||||
?string $term = null): array {
|
||||
$useCache = ($since === -1 && $includeArchived === true && $before === null && $term === null);
|
||||
if (!isset($this->userBoardCache[$userId]) || !$useCache) {
|
||||
$groups = $this->groupManager->getUserGroupIds(
|
||||
@@ -198,7 +198,7 @@ class BoardMapper extends QBMapper implements IPermissionMapper {
|
||||
* Find all boards for a given user
|
||||
*/
|
||||
public function findAllByUser(string $userId, ?int $limit = null, ?int $offset = null, ?int $since = null,
|
||||
bool $includeArchived = true, ?int $before = null, ?string $term = null): array {
|
||||
bool $includeArchived = true, ?int $before = null, ?string $term = null): array {
|
||||
// FIXME this used to be a UNION to get boards owned by $userId and the user shares in one single query
|
||||
// Is it possible with the query builder?
|
||||
$qb = $this->db->getQueryBuilder();
|
||||
@@ -305,7 +305,7 @@ class BoardMapper extends QBMapper implements IPermissionMapper {
|
||||
* Find all boards for a given user
|
||||
*/
|
||||
public function findAllByGroups(string $userId, array $groups, ?int $limit = null, ?int $offset = null, ?int $since = null,
|
||||
bool $includeArchived = true, ?int $before = null, ?string $term = null): array {
|
||||
bool $includeArchived = true, ?int $before = null, ?string $term = null): array {
|
||||
if (count($groups) <= 0) {
|
||||
return [];
|
||||
}
|
||||
@@ -359,7 +359,7 @@ class BoardMapper extends QBMapper implements IPermissionMapper {
|
||||
}
|
||||
|
||||
public function findAllByCircles(string $userId, ?int $limit = null, ?int $offset = null, ?int $since = null,
|
||||
bool $includeArchived = true, ?int $before = null, ?string $term = null) {
|
||||
bool $includeArchived = true, ?int $before = null, ?string $term = null) {
|
||||
$circles = $this->circlesService->getUserCircles($userId);
|
||||
if (count($circles) === 0) {
|
||||
return [];
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2016 Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
@@ -42,8 +39,6 @@ use Sabre\VObject\Component\VCalendar;
|
||||
* @method int getDeletedAt()
|
||||
* @method void setDeletedAt(int $deletedAt)
|
||||
* @method bool getNotified()
|
||||
* @method ?DateTime getDone()
|
||||
* @method void setDone(?DateTime $done)
|
||||
*
|
||||
* @method void setLabels(Label[] $labels)
|
||||
* @method null|Label[] getLabels()
|
||||
@@ -90,7 +85,6 @@ class Card extends RelationalEntity {
|
||||
protected $owner;
|
||||
protected $order;
|
||||
protected $archived = false;
|
||||
protected $done = null;
|
||||
protected $duedate;
|
||||
protected $notified = false;
|
||||
protected $deletedAt = 0;
|
||||
@@ -114,7 +108,6 @@ class Card extends RelationalEntity {
|
||||
$this->addType('lastModified', 'integer');
|
||||
$this->addType('createdAt', 'integer');
|
||||
$this->addType('archived', 'boolean');
|
||||
$this->addType('done', 'datetime');
|
||||
$this->addType('notified', 'boolean');
|
||||
$this->addType('deletedAt', 'integer');
|
||||
$this->addType('duedate', 'datetime');
|
||||
@@ -148,21 +141,18 @@ class Card extends RelationalEntity {
|
||||
$event->add('RELATED-TO', 'deck-stack-' . $this->getStackId());
|
||||
|
||||
// FIXME: For write support: CANCELLED / IN-PROCESS handling
|
||||
if ($this->getDone() || $this->getArchived()) {
|
||||
$event->STATUS = $this->getArchived() ? "COMPLETED" : "NEEDS-ACTION";
|
||||
if ($this->getArchived()) {
|
||||
$date = new DateTime();
|
||||
$date->setTimestamp($this->getLastModified());
|
||||
$event->STATUS = 'COMPLETED';
|
||||
$event->COMPLETED = $this->getDone() ? $this->getDone() : $this->getArchived();
|
||||
} else {
|
||||
$event->STATUS = 'NEEDS-ACTION';
|
||||
$event->COMPLETED = $date;
|
||||
//$event->add('PERCENT-COMPLETE', 100);
|
||||
}
|
||||
if (count($this->getLabels()) > 0) {
|
||||
$event->CATEGORIES = array_map(function ($label) {
|
||||
return $label->getTitle();
|
||||
}, $this->getLabels());
|
||||
}
|
||||
|
||||
// $event->add('PERCENT-COMPLETE', 100);
|
||||
|
||||
$labels = $this->getLabels() ?? [];
|
||||
$event->CATEGORIES = array_map(function ($label): string {
|
||||
return $label->getTitle();
|
||||
}, $labels);
|
||||
|
||||
$event->SUMMARY = $this->getTitle();
|
||||
$event->DESCRIPTION = $this->getDescription();
|
||||
@@ -189,7 +179,7 @@ class Card extends RelationalEntity {
|
||||
return 'card';
|
||||
}
|
||||
|
||||
public function getETag(): string {
|
||||
public function getETag() {
|
||||
return md5((string)$this->getLastModified());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,7 +263,6 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
||||
->where($qb->expr()->in('s.board_id', $qb->createNamedParameter($boardIds, IQueryBuilder::PARAM_INT_ARRAY)))
|
||||
->andWhere($qb->expr()->isNotNull('c.duedate'))
|
||||
->andWhere($qb->expr()->eq('c.archived', $qb->createNamedParameter(false, IQueryBuilder::PARAM_BOOL)))
|
||||
->andWhere($qb->expr()->isNull('done'))
|
||||
->andWhere($qb->expr()->eq('c.deleted_at', $qb->createNamedParameter(0, IQueryBuilder::PARAM_INT)))
|
||||
->andWhere($qb->expr()->eq('s.deleted_at', $qb->createNamedParameter(0, IQueryBuilder::PARAM_INT)))
|
||||
->andWhere($qb->expr()->eq('b.archived', $qb->createNamedParameter(false, IQueryBuilder::PARAM_BOOL)))
|
||||
@@ -285,7 +284,6 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
||||
)
|
||||
// Filter out archived/deleted cards and board
|
||||
->andWhere($qb->expr()->eq('c.archived', $qb->createNamedParameter(false, IQueryBuilder::PARAM_BOOL)))
|
||||
->andWhere($qb->expr()->isNull('done'))
|
||||
->andWhere($qb->expr()->eq('c.deleted_at', $qb->createNamedParameter(0, IQueryBuilder::PARAM_INT)))
|
||||
->andWhere($qb->expr()->eq('s.deleted_at', $qb->createNamedParameter(0, IQueryBuilder::PARAM_INT)))
|
||||
->andWhere($qb->expr()->eq('b.archived', $qb->createNamedParameter(false, IQueryBuilder::PARAM_BOOL)))
|
||||
@@ -300,7 +298,6 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
||||
->where($qb->expr()->lt('duedate', $qb->createFunction('NOW()')))
|
||||
->andWhere($qb->expr()->eq('notified', $qb->createNamedParameter(false, IQueryBuilder::PARAM_BOOL)))
|
||||
->andWhere($qb->expr()->eq('archived', $qb->createNamedParameter(false, IQueryBuilder::PARAM_BOOL)))
|
||||
->andWhere($qb->expr()->isNull('done'))
|
||||
->andWhere($qb->expr()->eq('deleted_at', $qb->createNamedParameter(0, IQueryBuilder::PARAM_INT)));
|
||||
return $this->findEntities($qb);
|
||||
}
|
||||
@@ -309,7 +306,8 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
||||
$qb = $this->db->getQueryBuilder();
|
||||
$qb->select('id', 'title', 'duedate', 'notified', 'description_prev', 'last_editor', 'description')
|
||||
->from('deck_cards')
|
||||
->where($qb->expr()->isNotNull('last_editor'));
|
||||
->where($qb->expr()->isNotNull('last_editor'))
|
||||
->andWhere($qb->expr()->isNotNull('description_prev'));
|
||||
return $this->findEntities($qb);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
|
||||
namespace OCA\Deck\Db;
|
||||
|
||||
use OCP\ICache;
|
||||
use OCP\ICacheFactory;
|
||||
use OCP\ICache;
|
||||
use OCP\IDBConnection;
|
||||
use OCP\IRequest;
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ class RelationalEntity extends Entity implements \JsonSerializable {
|
||||
$reflection = new \ReflectionClass($this);
|
||||
$json = [];
|
||||
foreach ($properties as $property => $value) {
|
||||
if (!str_starts_with($property, '_') && $reflection->hasProperty($property)) {
|
||||
if (strpos($property, '_') !== 0 && $reflection->hasProperty($property)) {
|
||||
$propertyReflection = $reflection->getProperty($property);
|
||||
if (!$propertyReflection->isPrivate() && !in_array($property, $this->_resolvedProperties, true)) {
|
||||
$json[$property] = $this->getter($property);
|
||||
@@ -129,7 +129,7 @@ class RelationalEntity extends Entity implements \JsonSerializable {
|
||||
|
||||
public function __call(string $methodName, array $args) {
|
||||
$attr = lcfirst(substr($methodName, 7));
|
||||
if (array_key_exists($attr, $this->_resolvedProperties) && str_starts_with($methodName, 'resolve')) {
|
||||
if (array_key_exists($attr, $this->_resolvedProperties) && strpos($methodName, 'resolve') === 0) {
|
||||
if ($this->_resolvedProperties[$attr] !== null) {
|
||||
return $this->_resolvedProperties[$attr];
|
||||
}
|
||||
@@ -137,7 +137,7 @@ class RelationalEntity extends Entity implements \JsonSerializable {
|
||||
}
|
||||
|
||||
$attr = lcfirst(substr($methodName, 3));
|
||||
if (array_key_exists($attr, $this->_resolvedProperties) && str_starts_with($methodName, 'set')) {
|
||||
if (array_key_exists($attr, $this->_resolvedProperties) && strpos($methodName, 'set') === 0) {
|
||||
if ($args[0] !== null && !is_scalar($args[0])) {
|
||||
$args[0] = $args[0]['primaryKey'];
|
||||
}
|
||||
|
||||
@@ -28,9 +28,9 @@ use OCP\AppFramework\Db\Entity;
|
||||
use OCP\AppFramework\Db\MultipleObjectsReturnedException;
|
||||
use OCP\Cache\CappedMemoryCache;
|
||||
use OCP\DB\QueryBuilder\IQueryBuilder;
|
||||
use OCP\IDBConnection;
|
||||
use OCP\ICache;
|
||||
use OCP\ICacheFactory;
|
||||
use OCP\IDBConnection;
|
||||
|
||||
/** @template-extends DeckMapper<Stack> */
|
||||
class StackMapper extends DeckMapper implements IPermissionMapper {
|
||||
|
||||
@@ -37,7 +37,7 @@ class User extends RelationalObject {
|
||||
public function getObjectSerialization() {
|
||||
return [
|
||||
'uid' => $this->getObject()->getUID(),
|
||||
'displayname' => $this->getDisplayName(),
|
||||
'displayname' => $this->getObject()->getDisplayName(),
|
||||
'type' => Acl::PERMISSION_TYPE_USER
|
||||
];
|
||||
}
|
||||
|
||||
@@ -51,11 +51,11 @@ class BeforeTemplateRenderedListener implements IEventListener {
|
||||
Util::addStyle('deck', 'deck');
|
||||
|
||||
$pathInfo = $this->request->getPathInfo();
|
||||
if (str_starts_with($pathInfo, '/apps/calendar')) {
|
||||
if (strpos($pathInfo, '/apps/calendar') === 0) {
|
||||
Util::addScript('deck', 'deck-calendar');
|
||||
}
|
||||
|
||||
if (str_starts_with($pathInfo, '/call/') || str_starts_with($pathInfo, '/apps/spreed')) {
|
||||
if (strpos($pathInfo, '/call/') === 0 || strpos($pathInfo, '/apps/spreed') === 0) {
|
||||
Util::addScript('deck', 'deck-talk');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,13 +27,13 @@ declare(strict_types=1);
|
||||
namespace OCA\Deck\Listeners;
|
||||
|
||||
use OCA\Deck\Db\StackMapper;
|
||||
use OCA\Deck\NotifyPushEvents;
|
||||
use OCA\Deck\Event\AAclEvent;
|
||||
use OCA\Deck\Event\ACardEvent;
|
||||
use OCA\Deck\Event\BoardUpdatedEvent;
|
||||
use OCA\Deck\Event\CardUpdatedEvent;
|
||||
use OCA\Deck\Event\SessionClosedEvent;
|
||||
use OCA\Deck\Event\SessionCreatedEvent;
|
||||
use OCA\Deck\NotifyPushEvents;
|
||||
use OCA\Deck\Service\SessionService;
|
||||
use OCA\NotifyPush\Queue\IQueue;
|
||||
use OCP\EventDispatcher\Event;
|
||||
|
||||
@@ -21,7 +21,7 @@ class ResourceAdditionalScriptsListener implements IEventListener {
|
||||
return;
|
||||
}
|
||||
|
||||
if (str_starts_with($this->request->getPathInfo(), '/call/')) {
|
||||
if (strpos($this->request->getPathInfo(), '/call/') === 0) {
|
||||
// Talk integration has its own entrypoint which already includes collections handling
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -24,16 +24,16 @@
|
||||
namespace OCA\Deck\Middleware;
|
||||
|
||||
use OCA\Deck\Controller\PageController;
|
||||
use OCA\Deck\Exceptions\ConflictException;
|
||||
use OCA\Deck\StatusException;
|
||||
use OCA\Deck\Exceptions\ConflictException;
|
||||
use OCP\AppFramework\Db\DoesNotExistException;
|
||||
use OCP\AppFramework\Http\JSONResponse;
|
||||
use OCP\AppFramework\Middleware;
|
||||
use OCP\AppFramework\Http\JSONResponse;
|
||||
use OCP\AppFramework\OCS\OCSException;
|
||||
use OCP\AppFramework\OCSController;
|
||||
use OCP\IConfig;
|
||||
use OCP\ILogger;
|
||||
use OCP\IRequest;
|
||||
use OCP\IConfig;
|
||||
|
||||
class ExceptionMiddleware extends Middleware {
|
||||
|
||||
@@ -109,7 +109,7 @@ class ExceptionMiddleware extends Middleware {
|
||||
], $exception->getStatus());
|
||||
}
|
||||
|
||||
if (str_starts_with(get_class($controller), 'OCA\\Deck\\Controller\\')) {
|
||||
if (strpos(get_class($controller), 'OCA\\Deck\\Controller\\') === 0) {
|
||||
$response = [
|
||||
'status' => 500,
|
||||
'message' => $exceptionMessage,
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2023 Thanos kamber <thanos.kamber@gmail.com>
|
||||
*
|
||||
* @author Thanos kamber <thanos.kamber@gmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace OCA\Deck\Migration;
|
||||
|
||||
use Closure;
|
||||
use OCP\DB\ISchemaWrapper;
|
||||
use OCP\DB\Types;
|
||||
use OCP\Migration\IOutput;
|
||||
use OCP\Migration\SimpleMigrationStep;
|
||||
|
||||
/**
|
||||
* Auto-generated migration step: Please modify to your needs!
|
||||
*/
|
||||
class Version1011Date20230901010840 extends SimpleMigrationStep {
|
||||
/**
|
||||
* @param IOutput $output
|
||||
* @param Closure $schemaClosure
|
||||
* @param array $options
|
||||
* @return null|ISchemaWrapper
|
||||
*/
|
||||
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
|
||||
/** @var ISchemaWrapper $schema */
|
||||
$schema = $schemaClosure();
|
||||
|
||||
$table = $schema->getTable('deck_cards');
|
||||
if (!$table->hasColumn('done')) {
|
||||
$table->addColumn('done', Types::DATETIME, [
|
||||
'default' => null,
|
||||
'notnull' => false,
|
||||
]);
|
||||
|
||||
return $schema;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2023 Your name <your@email.com>
|
||||
*
|
||||
* @author Your name <your@email.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace OCA\Deck\Migration;
|
||||
|
||||
use Closure;
|
||||
use OCP\DB\ISchemaWrapper;
|
||||
use OCP\Migration\IOutput;
|
||||
use OCP\Migration\SimpleMigrationStep;
|
||||
|
||||
class Version1011Date20231106160059 extends SimpleMigrationStep {
|
||||
|
||||
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
|
||||
$schema = $schemaClosure();
|
||||
|
||||
$createIndex = false;
|
||||
|
||||
$table = $schema->getTable('deck_cards');
|
||||
|
||||
if (!$table->hasIndex('idx_last_editor')) {
|
||||
$createIndex = true;
|
||||
}
|
||||
|
||||
if (!$createIndex) {
|
||||
$index = $table->getIndex('idx_last_editor');
|
||||
if (in_array('description_prev', $index->getColumns(), true)) {
|
||||
$table->dropIndex('idx_last_editor');
|
||||
$createIndex = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($createIndex) {
|
||||
$table->addIndex(['last_editor'], 'idx_last_editor');
|
||||
return $schema;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -66,7 +66,7 @@ class Version10800Date20220422061816 extends SimpleMigrationStep {
|
||||
$indexAdded = $this->addIndex($schema,
|
||||
'deck_cards',
|
||||
'idx_last_editor', [
|
||||
'last_editor' /*, 'description_prev' */
|
||||
'last_editor', 'description_prev'
|
||||
], [],
|
||||
// Adding a partial index on the description_prev as it is only used for a NULL check
|
||||
['lengths' => [null, 1]]
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (c) 2023 Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace OCA\Deck\Model;
|
||||
|
||||
/**
|
||||
* This is a helper abstraction to allow usage of optional parameters
|
||||
* which hold a nullable value. The actual null value of the parameter
|
||||
* is used to indicate if it has been set or not. The containing value
|
||||
* will then still allow having null as a value
|
||||
*
|
||||
* Example use case: Have a nullable database column,
|
||||
* but only update it if it is passed
|
||||
*
|
||||
* @template T
|
||||
*/
|
||||
class OptionalNullableValue {
|
||||
|
||||
/** @var ?T */
|
||||
private mixed $value;
|
||||
|
||||
/** @param ?T $value */
|
||||
public function __construct(mixed $value) {
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
/** @return ?T */
|
||||
public function getValue(): mixed {
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -38,9 +38,9 @@ class BoardReferenceProvider implements IReferenceProvider {
|
||||
private IL10N $l10n;
|
||||
|
||||
public function __construct(BoardService $boardService,
|
||||
IURLGenerator $urlGenerator,
|
||||
IL10N $l10n,
|
||||
?string $userId) {
|
||||
IURLGenerator $urlGenerator,
|
||||
IL10N $l10n,
|
||||
?string $userId) {
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
$this->boardService = $boardService;
|
||||
$this->userId = $userId;
|
||||
@@ -55,8 +55,8 @@ class BoardReferenceProvider implements IReferenceProvider {
|
||||
$startIndex = $this->urlGenerator->getAbsoluteURL('/index.php/apps/' . Application::APP_ID);
|
||||
|
||||
// link example: https://nextcloud.local/index.php/apps/deck/#/board/2
|
||||
$noIndexMatch = preg_match('/^' . preg_quote($start, '/') . '(?:\/#!?)?\/board\/[0-9]+$/', $referenceText) === 1;
|
||||
$indexMatch = preg_match('/^' . preg_quote($startIndex, '/') . '(?:\/#!?)?\/board\/[0-9]+$/', $referenceText) === 1;
|
||||
$noIndexMatch = preg_match('/^' . preg_quote($start, '/') . '\/#\/board\/[0-9]+$/', $referenceText) === 1;
|
||||
$indexMatch = preg_match('/^' . preg_quote($startIndex, '/') . '\/#\/board\/[0-9]+$/', $referenceText) === 1;
|
||||
|
||||
return $noIndexMatch || $indexMatch;
|
||||
}
|
||||
@@ -108,9 +108,9 @@ class BoardReferenceProvider implements IReferenceProvider {
|
||||
$start = $this->urlGenerator->getAbsoluteURL('/apps/' . Application::APP_ID);
|
||||
$startIndex = $this->urlGenerator->getAbsoluteURL('/index.php/apps/' . Application::APP_ID);
|
||||
|
||||
preg_match('/^' . preg_quote($start, '/') . '(?:\/#!?)?\/board\/([0-9]+)$/', $url, $matches);
|
||||
preg_match('/^' . preg_quote($start, '/') . '\/#\/board\/([0-9]+)$/', $url, $matches);
|
||||
if (!$matches) {
|
||||
preg_match('/^' . preg_quote($startIndex, '/') . '(?:\/#!?)?\/board\/([0-9]+)$/', $url, $matches);
|
||||
preg_match('/^' . preg_quote($startIndex, '/') . '\/#\/board\/([0-9]+)$/', $url, $matches);
|
||||
}
|
||||
if ($matches && count($matches) > 1) {
|
||||
return (int) $matches[1];
|
||||
|
||||
@@ -47,11 +47,11 @@ class CardReferenceProvider extends ADiscoverableReferenceProvider implements IS
|
||||
private IL10N $l10n;
|
||||
|
||||
public function __construct(CardService $cardService,
|
||||
BoardService $boardService,
|
||||
StackService $stackService,
|
||||
IURLGenerator $urlGenerator,
|
||||
IL10N $l10n,
|
||||
?string $userId) {
|
||||
BoardService $boardService,
|
||||
StackService $stackService,
|
||||
IURLGenerator $urlGenerator,
|
||||
IL10N $l10n,
|
||||
?string $userId) {
|
||||
$this->cardService = $cardService;
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
$this->boardService = $boardService;
|
||||
@@ -108,14 +108,10 @@ class CardReferenceProvider extends ADiscoverableReferenceProvider implements IS
|
||||
$startIndex = $this->urlGenerator->getAbsoluteURL('/index.php/apps/' . Application::APP_ID);
|
||||
|
||||
// link example: https://nextcloud.local/index.php/apps/deck/#/board/2/card/11
|
||||
$noIndexMatchFull = preg_match('/^' . preg_quote($start, '/') . '(?:\/#!?)?\/board\/[0-9]+\/card\/[0-9]+$/', $referenceText) === 1;
|
||||
$indexMatchFull = preg_match('/^' . preg_quote($startIndex, '/') . '(?:\/#!?)?\/board\/[0-9]+\/card\/[0-9]+$/', $referenceText) === 1;
|
||||
$noIndexMatch = preg_match('/^' . preg_quote($start, '/') . '\/#\/board\/[0-9]+\/card\/[0-9]+$/', $referenceText) === 1;
|
||||
$indexMatch = preg_match('/^' . preg_quote($startIndex, '/') . '\/#\/board\/[0-9]+\/card\/[0-9]+$/', $referenceText) === 1;
|
||||
|
||||
// link example: https://nextcloud.local/index.php/apps/deck/card/11
|
||||
$noIndexMatch = preg_match('/^' . preg_quote($start, '/') . '\/card\/[0-9]+$/', $referenceText) === 1;
|
||||
$indexMatch = preg_match('/^' . preg_quote($startIndex, '/') . '\/card\/[0-9]+$/', $referenceText) === 1;
|
||||
|
||||
return $noIndexMatchFull || $indexMatchFull || $noIndexMatch || $indexMatch;
|
||||
return $noIndexMatch || $indexMatch;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -125,17 +121,16 @@ class CardReferenceProvider extends ADiscoverableReferenceProvider implements IS
|
||||
if ($this->matchReference($referenceText)) {
|
||||
$ids = $this->getBoardCardId($referenceText);
|
||||
if ($ids !== null) {
|
||||
[, $cardId] = $ids;
|
||||
[$boardId, $cardId] = $ids;
|
||||
try {
|
||||
$card = $this->cardService->find((int) $cardId)->jsonSerialize();
|
||||
$board = $this->boardService->find((int) $boardId)->jsonSerialize();
|
||||
$stack = $this->stackService->find((int) $card['stackId'])->jsonSerialize();
|
||||
$board = $this->boardService->find((int) $stack['boardId'])->jsonSerialize();
|
||||
} catch (NoPermissionException $e) {
|
||||
// Skip throwing if user has no permissions
|
||||
return null;
|
||||
}
|
||||
|
||||
$boardId = $board['id'];
|
||||
|
||||
$card = $this->sanitizeSerializedCard($card);
|
||||
$board = $this->sanitizeSerializedBoard($board);
|
||||
@@ -160,14 +155,14 @@ class CardReferenceProvider extends ADiscoverableReferenceProvider implements IS
|
||||
$result = $cardDetails->jsonSerialize();
|
||||
unset($result['assignedUsers']);
|
||||
return $result;
|
||||
}, $stack['cards'] ?? []);
|
||||
}, $stack['cards']);
|
||||
|
||||
return $stack;
|
||||
}
|
||||
|
||||
private function sanitizeSerializedBoard(array $board): array {
|
||||
unset($board['labels']);
|
||||
$board['owner'] = $board['owner']?->jsonSerialize();
|
||||
$board['owner'] = $board['owner']->jsonSerialize();
|
||||
unset($board['acl']);
|
||||
unset($board['users']);
|
||||
|
||||
@@ -177,18 +172,18 @@ class CardReferenceProvider extends ADiscoverableReferenceProvider implements IS
|
||||
private function sanitizeSerializedCard(array $card): array {
|
||||
$card['labels'] = array_map(function (Label $label) {
|
||||
return $label->jsonSerialize();
|
||||
}, $card['labels'] ?? []);
|
||||
}, $card['labels']);
|
||||
$card['assignedUsers'] = array_map(function (Assignment $assignment) {
|
||||
$result = $assignment->jsonSerialize();
|
||||
$result['participant'] = $result['participant']->jsonSerialize();
|
||||
return $result;
|
||||
}, $card['assignedUsers'] ?? []);
|
||||
$card['owner'] = $card['owner']?->jsonSerialize() ?? $card['owner'];
|
||||
}, $card['assignedUsers']);
|
||||
$card['owner'] = $card['owner']->jsonSerialize();
|
||||
unset($card['relatedStack']);
|
||||
unset($card['relatedBoard']);
|
||||
$card['attachments'] = array_map(function (Attachment $attachment) {
|
||||
return $attachment->jsonSerialize();
|
||||
}, $card['attachments'] ?? []);
|
||||
}, $card['attachments']);
|
||||
|
||||
return $card;
|
||||
}
|
||||
@@ -197,26 +192,16 @@ class CardReferenceProvider extends ADiscoverableReferenceProvider implements IS
|
||||
$start = $this->urlGenerator->getAbsoluteURL('/apps/' . Application::APP_ID);
|
||||
$startIndex = $this->urlGenerator->getAbsoluteURL('/index.php/apps/' . Application::APP_ID);
|
||||
|
||||
preg_match('/^' . preg_quote($start, '/') . '(?:\/#!?)?\/board\/([0-9]+)\/card\/([0-9]+)$/', $url, $matches);
|
||||
preg_match('/^' . preg_quote($start, '/') . '\/#\/board\/([0-9]+)\/card\/([0-9]+)$/', $url, $matches);
|
||||
if ($matches && count($matches) > 2) {
|
||||
return [$matches[1], $matches[2]];
|
||||
}
|
||||
|
||||
preg_match('/^' . preg_quote($startIndex, '/') . '(?:\/#!?)?\/board\/([0-9]+)\/card\/([0-9]+)$/', $url, $matches2);
|
||||
preg_match('/^' . preg_quote($startIndex, '/') . '\/#\/board\/([0-9]+)\/card\/([0-9]+)$/', $url, $matches2);
|
||||
if ($matches2 && count($matches2) > 2) {
|
||||
return [$matches2[1], $matches2[2]];
|
||||
}
|
||||
|
||||
preg_match('/^' . preg_quote($start, '/') . '\/card\/([0-9]+)$/', $url, $matches);
|
||||
if ($matches && count($matches) > 1) {
|
||||
return [null, $matches[1]];
|
||||
}
|
||||
|
||||
preg_match('/^' . preg_quote($startIndex, '/') . '\/card\/([0-9]+)$/', $url, $matches2);
|
||||
if ($matches2 && count($matches2) > 1) {
|
||||
return [null, $matches2[1]];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,12 +48,12 @@ class CommentReferenceProvider implements IReferenceProvider {
|
||||
private CommentService $commentService;
|
||||
|
||||
public function __construct(CardService $cardService,
|
||||
BoardService $boardService,
|
||||
StackService $stackService,
|
||||
CommentService $commentService,
|
||||
IURLGenerator $urlGenerator,
|
||||
IL10N $l10n,
|
||||
?string $userId) {
|
||||
BoardService $boardService,
|
||||
StackService $stackService,
|
||||
CommentService $commentService,
|
||||
IURLGenerator $urlGenerator,
|
||||
IL10N $l10n,
|
||||
?string $userId) {
|
||||
$this->cardService = $cardService;
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
$this->boardService = $boardService;
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace OCA\Deck\Reference;
|
||||
|
||||
use OCA\Deck\AppInfo\Application;
|
||||
use OCP\Collaboration\Reference\ADiscoverableReferenceProvider;
|
||||
use OCP\Collaboration\Reference\IReference;
|
||||
use OCP\IL10N;
|
||||
|
||||
use OCP\IURLGenerator;
|
||||
|
||||
class CreateCardReferenceProvider extends ADiscoverableReferenceProvider {
|
||||
|
||||
public function __construct(
|
||||
private IL10N $l10n,
|
||||
private IURLGenerator $urlGenerator,
|
||||
private ?string $userId) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getId(): string {
|
||||
return 'create-new-deck-card';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getTitle(): string {
|
||||
return $this->l10n->t('Create a new deck card');
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getOrder(): int {
|
||||
return 10;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getIconUrl(): string {
|
||||
return $this->urlGenerator->getAbsoluteURL(
|
||||
$this->urlGenerator->imagePath(Application::APP_ID, 'deck-dark.svg')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function matchReference(string $referenceText): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function resolveReference(string $referenceText): ?IReference {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getCachePrefix(string $referenceId): string {
|
||||
return $this->userId ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
* We don't use the userId here but rather a reference unique id
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getCacheKey(string $referenceId): ?string {
|
||||
return $referenceId;
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,7 @@ class CardSearchResultEntry extends SearchResultEntry {
|
||||
),
|
||||
$card->getTitle(),
|
||||
$board->getTitle() . ' » ' . $stack->getTitle(),
|
||||
$urlGenerator->linkToRouteAbsolute('deck.page.redirectToCard', ['cardId' => $card->getId()]),
|
||||
$urlGenerator->linkToRouteAbsolute('deck.page.index') . '#/board/' . $board->getId() . '/card/' . $card->getId(),
|
||||
'icon-deck'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ class FilterStringParser {
|
||||
public function __construct(IL10N $l10n) {
|
||||
$this->l10n = $l10n;
|
||||
}
|
||||
|
||||
|
||||
public function parse(?string $filter): SearchQuery {
|
||||
$query = new SearchQuery();
|
||||
if (empty($filter)) {
|
||||
@@ -71,7 +71,7 @@ class FilterStringParser {
|
||||
}
|
||||
|
||||
private function parseFilterToken(SearchQuery $query, string $token): bool {
|
||||
if (!str_contains($token, ':')) {
|
||||
if (strpos($token, ':') === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ namespace OCA\Deck\Service;
|
||||
use OCA\Deck\Activity\ActivityManager;
|
||||
use OCA\Deck\AppInfo\Application;
|
||||
use OCA\Deck\BadRequestException;
|
||||
use OCA\Deck\Cache\AttachmentCacheHelper;
|
||||
use OCA\Deck\Db\Acl;
|
||||
use OCA\Deck\Db\Attachment;
|
||||
use OCA\Deck\Db\AttachmentMapper;
|
||||
@@ -35,6 +34,7 @@ use OCA\Deck\Db\ChangeHelper;
|
||||
use OCA\Deck\InvalidAttachmentType;
|
||||
use OCA\Deck\NoPermissionException;
|
||||
use OCA\Deck\NotFoundException;
|
||||
use OCA\Deck\Cache\AttachmentCacheHelper;
|
||||
use OCA\Deck\StatusException;
|
||||
use OCA\Deck\Validators\AttachmentServiceValidator;
|
||||
use OCP\AppFramework\Db\IMapperException;
|
||||
|
||||
@@ -27,17 +27,13 @@ namespace OCA\Deck\Service;
|
||||
use OCA\Deck\Activity\ActivityManager;
|
||||
use OCA\Deck\Activity\ChangeSet;
|
||||
use OCA\Deck\AppInfo\Application;
|
||||
use OCA\Deck\BadRequestException;
|
||||
use OCA\Deck\Db\Acl;
|
||||
use OCA\Deck\Db\AclMapper;
|
||||
use OCA\Deck\Db\AssignmentMapper;
|
||||
use OCA\Deck\Db\Board;
|
||||
use OCA\Deck\Db\BoardMapper;
|
||||
use OCA\Deck\Db\CardMapper;
|
||||
use OCA\Deck\Db\ChangeHelper;
|
||||
use OCA\Deck\Db\IPermissionMapper;
|
||||
use OCA\Deck\Db\Label;
|
||||
use OCA\Deck\Db\LabelMapper;
|
||||
use OCA\Deck\Db\Session;
|
||||
use OCA\Deck\Db\SessionMapper;
|
||||
use OCA\Deck\Db\Stack;
|
||||
@@ -45,20 +41,24 @@ use OCA\Deck\Db\StackMapper;
|
||||
use OCA\Deck\Event\AclCreatedEvent;
|
||||
use OCA\Deck\Event\AclDeletedEvent;
|
||||
use OCA\Deck\Event\AclUpdatedEvent;
|
||||
use OCA\Deck\Event\BoardUpdatedEvent;
|
||||
use OCA\Deck\NoPermissionException;
|
||||
use OCA\Deck\Notification\NotificationHelper;
|
||||
use OCA\Deck\Validators\BoardServiceValidator;
|
||||
use OCP\AppFramework\Db\DoesNotExistException;
|
||||
use OCP\AppFramework\Db\MultipleObjectsReturnedException;
|
||||
use OCP\DB\Exception as DbException;
|
||||
use OCP\EventDispatcher\IEventDispatcher;
|
||||
use OCP\IConfig;
|
||||
use OCP\IDBConnection;
|
||||
use OCP\IGroupManager;
|
||||
use OCP\IL10N;
|
||||
use OCP\IURLGenerator;
|
||||
use OCP\DB\Exception as DbException;
|
||||
use OCA\Deck\Db\Board;
|
||||
use OCA\Deck\Db\BoardMapper;
|
||||
use OCA\Deck\Db\LabelMapper;
|
||||
use OCP\IUserManager;
|
||||
use OCA\Deck\BadRequestException;
|
||||
use OCA\Deck\Event\BoardUpdatedEvent;
|
||||
use OCA\Deck\Validators\BoardServiceValidator;
|
||||
use OCP\IURLGenerator;
|
||||
use OCP\Server;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
@@ -145,7 +145,7 @@ class BoardService {
|
||||
* Get all boards that are shared with a user, their groups or circles
|
||||
*/
|
||||
public function getUserBoards(?int $since = null, bool $includeArchived = true, ?int $before = null,
|
||||
?string $term = null): array {
|
||||
?string $term = null): array {
|
||||
return $this->boardMapper->findAllForUser($this->userId, $since, $includeArchived, $before, $term);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,31 +28,29 @@ namespace OCA\Deck\Service;
|
||||
|
||||
use OCA\Deck\Activity\ActivityManager;
|
||||
use OCA\Deck\Activity\ChangeSet;
|
||||
use OCA\Deck\BadRequestException;
|
||||
use OCA\Deck\Db\Acl;
|
||||
use OCA\Deck\Db\Assignment;
|
||||
use OCA\Deck\Db\AssignmentMapper;
|
||||
use OCA\Deck\Db\BoardMapper;
|
||||
use OCA\Deck\Db\Card;
|
||||
use OCA\Deck\Db\CardMapper;
|
||||
use OCA\Deck\Db\Acl;
|
||||
use OCA\Deck\Db\ChangeHelper;
|
||||
use OCA\Deck\Db\Label;
|
||||
use OCA\Deck\Db\LabelMapper;
|
||||
use OCA\Deck\Db\StackMapper;
|
||||
use OCA\Deck\Event\CardCreatedEvent;
|
||||
use OCA\Deck\Event\CardDeletedEvent;
|
||||
use OCA\Deck\Event\CardUpdatedEvent;
|
||||
use OCA\Deck\Model\CardDetails;
|
||||
use OCA\Deck\Model\OptionalNullableValue;
|
||||
use OCA\Deck\NoPermissionException;
|
||||
use OCA\Deck\Notification\NotificationHelper;
|
||||
use OCA\Deck\Db\BoardMapper;
|
||||
use OCA\Deck\Db\LabelMapper;
|
||||
use OCA\Deck\StatusException;
|
||||
use OCA\Deck\BadRequestException;
|
||||
use OCA\Deck\Validators\CardServiceValidator;
|
||||
use OCP\Comments\ICommentsManager;
|
||||
use OCP\EventDispatcher\IEventDispatcher;
|
||||
use OCP\IRequest;
|
||||
use OCP\IURLGenerator;
|
||||
use OCP\IUserManager;
|
||||
use OCP\IURLGenerator;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class CardService {
|
||||
@@ -157,12 +155,7 @@ class CardService {
|
||||
$card->setAssignedUsers($cardAssignedUsers);
|
||||
}
|
||||
|
||||
return array_map(
|
||||
function (Card $card): CardDetails {
|
||||
return new CardDetails($card);
|
||||
},
|
||||
$cards
|
||||
);
|
||||
return $cards;
|
||||
}
|
||||
public function fetchDeleted($boardId) {
|
||||
$this->cardServiceValidator->check(compact('boardId'));
|
||||
@@ -285,9 +278,6 @@ class CardService {
|
||||
* @param $description
|
||||
* @param $order
|
||||
* @param $duedate
|
||||
* @param $deletedAt
|
||||
* @param $archived
|
||||
* @param $done
|
||||
* @return \OCP\AppFramework\Db\Entity
|
||||
* @throws StatusException
|
||||
* @throws \OCA\Deck\NoPermissionException
|
||||
@@ -295,7 +285,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, ?OptionalNullableValue $done = null) {
|
||||
public function update($id, $title, $stackId, $type, $owner, $description = '', $order = 0, $duedate = null, $deletedAt = null, $archived = null) {
|
||||
$this->cardServiceValidator->check(compact('id', 'title', 'stackId', 'type', 'owner', 'order'));
|
||||
|
||||
$this->permissionService->checkPermission($this->cardMapper, $id, Acl::PERMISSION_EDIT, allowDeletedCard: true);
|
||||
@@ -353,9 +343,6 @@ class CardService {
|
||||
if ($archived !== null) {
|
||||
$card->setArchived($archived);
|
||||
}
|
||||
if ($done !== null) {
|
||||
$card->setDone($done->getValue());
|
||||
}
|
||||
|
||||
|
||||
// Trigger update events before setting description as it is handled separately
|
||||
@@ -526,57 +513,6 @@ class CardService {
|
||||
return $newCard;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $id
|
||||
* @return \OCA\Deck\Db\Card
|
||||
* @throws StatusException
|
||||
* @throws \OCA\Deck\NoPermissionException
|
||||
* @throws \OCP\AppFramework\Db\DoesNotExistException
|
||||
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
|
||||
* @throws BadRequestException
|
||||
*/
|
||||
public function done(int $id): Card {
|
||||
$this->permissionService->checkPermission($this->cardMapper, $id, Acl::PERMISSION_EDIT);
|
||||
if ($this->boardService->isArchived($this->cardMapper, $id)) {
|
||||
throw new StatusException('Operation not allowed. This board is archived.');
|
||||
}
|
||||
$card = $this->cardMapper->find($id);
|
||||
$card->setDone(new \DateTime());
|
||||
$newCard = $this->cardMapper->update($card);
|
||||
$this->notificationHelper->markDuedateAsRead($card);
|
||||
$this->activityManager->triggerEvent(ActivityManager::DECK_OBJECT_CARD, $newCard, ActivityManager::SUBJECT_CARD_UPDATE_DONE);
|
||||
$this->changeHelper->cardChanged($id, false);
|
||||
|
||||
$this->eventDispatcher->dispatchTyped(new CardUpdatedEvent($card));
|
||||
|
||||
return $newCard;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $id
|
||||
* @return \OCA\Deck\Db\Card
|
||||
* @throws StatusException
|
||||
* @throws \OCA\Deck\NoPermissionException
|
||||
* @throws \OCP\AppFramework\Db\DoesNotExistException
|
||||
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
|
||||
* @throws BadRequestException
|
||||
*/
|
||||
public function undone(int $id): Card {
|
||||
$this->permissionService->checkPermission($this->cardMapper, $id, Acl::PERMISSION_EDIT);
|
||||
if ($this->boardService->isArchived($this->cardMapper, $id)) {
|
||||
throw new StatusException('Operation not allowed. This board is archived.');
|
||||
}
|
||||
$card = $this->cardMapper->find($id);
|
||||
$card->setDone(null);
|
||||
$newCard = $this->cardMapper->update($card);
|
||||
$this->activityManager->triggerEvent(ActivityManager::DECK_OBJECT_CARD, $newCard, ActivityManager::SUBJECT_CARD_UPDATE_UNDONE);
|
||||
$this->changeHelper->cardChanged($id, false);
|
||||
|
||||
$this->eventDispatcher->dispatchTyped(new CardUpdatedEvent($card));
|
||||
|
||||
return $newCard;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $cardId
|
||||
* @param $labelId
|
||||
|
||||
@@ -190,7 +190,8 @@ class CommentService {
|
||||
}
|
||||
|
||||
private function formatComment(IComment $comment, $addReplyTo = false): array {
|
||||
$actorDisplayName = $this->userManager->getDisplayName($comment->getActorId()) ?? $comment->getActorId();
|
||||
$user = $this->userManager->get($comment->getActorId());
|
||||
$actorDisplayName = $user !== null ? $user->getDisplayName() : $comment->getActorId();
|
||||
|
||||
$formattedComment = [
|
||||
'id' => (int)$comment->getId(),
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
namespace OCA\Deck\Service;
|
||||
|
||||
use OCA\Deck\AppInfo\Application;
|
||||
use OCA\Deck\BadRequestException;
|
||||
use OCA\Deck\Db\BoardMapper;
|
||||
use OCP\IConfig;
|
||||
use OCP\IL10N;
|
||||
use OCA\Deck\BadRequestException;
|
||||
use OCP\PreConditionNotMetException;
|
||||
|
||||
class DefaultBoardService {
|
||||
@@ -39,13 +39,13 @@ class DefaultBoardService {
|
||||
private $l10n;
|
||||
|
||||
public function __construct(
|
||||
IL10N $l10n,
|
||||
BoardMapper $boardMapper,
|
||||
BoardService $boardService,
|
||||
StackService $stackService,
|
||||
CardService $cardService,
|
||||
IConfig $config
|
||||
) {
|
||||
IL10N $l10n,
|
||||
BoardMapper $boardMapper,
|
||||
BoardService $boardService,
|
||||
StackService $stackService,
|
||||
CardService $cardService,
|
||||
IConfig $config
|
||||
) {
|
||||
$this->boardService = $boardService;
|
||||
$this->stackService = $stackService;
|
||||
$this->cardService = $cardService;
|
||||
|
||||
@@ -25,8 +25,8 @@ namespace OCA\Deck\Service;
|
||||
|
||||
use OCA\Deck\Db\Attachment;
|
||||
use OCA\Deck\Db\AttachmentMapper;
|
||||
use OCA\Deck\Exceptions\ConflictException;
|
||||
use OCA\Deck\StatusException;
|
||||
use OCA\Deck\Exceptions\ConflictException;
|
||||
use OCP\AppFramework\Http\StreamResponse;
|
||||
use OCP\Files\IAppData;
|
||||
use OCP\Files\IMimeTypeDetector;
|
||||
|
||||
@@ -250,7 +250,6 @@ class BoardImportService {
|
||||
$this->getImportSystem()->updateAcl($code, $acl);
|
||||
} catch (\Exception $e) {
|
||||
$this->addError('Failed to import acl rule for ' . $acl->getParticipant(), $e);
|
||||
|
||||
}
|
||||
}
|
||||
$this->getBoard()->setAcl($aclList);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
},
|
||||
"token": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-fA-FT]{64,76}$"
|
||||
"pattern": "^[0-9a-fA-F]{64}$"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
|
||||
namespace OCA\Deck\Service;
|
||||
|
||||
use OCA\Deck\BadRequestException;
|
||||
use OCA\Deck\Db\Acl;
|
||||
use OCA\Deck\Db\ChangeHelper;
|
||||
use OCA\Deck\Db\Label;
|
||||
use OCA\Deck\Db\Acl;
|
||||
use OCA\Deck\Db\LabelMapper;
|
||||
use OCA\Deck\StatusException;
|
||||
use OCA\Deck\BadRequestException;
|
||||
use OCA\Deck\Validators\LabelServiceValidator;
|
||||
|
||||
class LabelService {
|
||||
@@ -50,7 +50,7 @@ class LabelService {
|
||||
BoardService $boardService,
|
||||
ChangeHelper $changeHelper,
|
||||
LabelServiceValidator $labelServiceValidator
|
||||
) {
|
||||
) {
|
||||
$this->labelMapper = $labelMapper;
|
||||
$this->permissionService = $permissionService;
|
||||
$this->boardService = $boardService;
|
||||
|
||||
@@ -29,11 +29,11 @@ namespace OCA\Deck\Service;
|
||||
|
||||
use OCA\Deck\Db\AssignmentMapper;
|
||||
use OCA\Deck\Db\Board;
|
||||
use OCA\Deck\Db\BoardMapper;
|
||||
use OCA\Deck\Db\CardMapper;
|
||||
use OCA\Deck\Db\LabelMapper;
|
||||
use OCA\Deck\Model\CardDetails;
|
||||
use OCP\Comments\ICommentsManager;
|
||||
use OCA\Deck\Db\BoardMapper;
|
||||
use OCA\Deck\Db\LabelMapper;
|
||||
use OCP\IUserManager;
|
||||
|
||||
class OverviewService {
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
namespace OCA\Deck\Service;
|
||||
|
||||
use OCP\Cache\CappedMemoryCache;
|
||||
use OCA\Circles\Model\Member;
|
||||
use OCA\Deck\Db\Acl;
|
||||
use OCA\Deck\Db\AclMapper;
|
||||
@@ -34,7 +35,6 @@ use OCA\Deck\Db\User;
|
||||
use OCA\Deck\NoPermissionException;
|
||||
use OCP\AppFramework\Db\DoesNotExistException;
|
||||
use OCP\AppFramework\Db\MultipleObjectsReturnedException;
|
||||
use OCP\Cache\CappedMemoryCache;
|
||||
use OCP\IConfig;
|
||||
use OCP\IGroupManager;
|
||||
use OCP\ILogger;
|
||||
@@ -159,7 +159,6 @@ class PermissionService {
|
||||
|
||||
$permissions = $this->getPermissions($boardId, $userId);
|
||||
if ($permissions[$permission] === true) {
|
||||
|
||||
if (!$allowDeletedCard && $mapper instanceof CardMapper) {
|
||||
$card = $mapper->find($id);
|
||||
if ($card->getDeletedAt() > 0) {
|
||||
|
||||
@@ -115,7 +115,8 @@ class SearchService {
|
||||
$card = Card::fromRow($cardRow);
|
||||
// TODO: Only perform one enrich call here
|
||||
$self->cardService->enrichCards([$card]);
|
||||
$displayName = $this->userManager->getDisplayName($comment->getActorId()) ?? '';
|
||||
$user = $this->userManager->get($comment->getActorId());
|
||||
$displayName = $user ? $user->getDisplayName() : '';
|
||||
return new CommentSearchResultEntry($comment->getId(), $comment->getMessage(), $displayName, $card, $this->urlGenerator, $this->l10n);
|
||||
}, $matchedComments);
|
||||
}
|
||||
|
||||
@@ -26,12 +26,12 @@ namespace OCA\Deck\Service;
|
||||
|
||||
use OCA\Deck\Db\Session;
|
||||
use OCA\Deck\Db\SessionMapper;
|
||||
use OCA\Deck\Event\SessionClosedEvent;
|
||||
use OCA\Deck\Event\SessionCreatedEvent;
|
||||
use OCA\NotifyPush\Queue\IQueue;
|
||||
use OCA\Deck\Event\SessionClosedEvent;
|
||||
use OCP\AppFramework\Db\DoesNotExistException;
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
use OCP\EventDispatcher\IEventDispatcher;
|
||||
use OCA\NotifyPush\Queue\IQueue;
|
||||
use OCP\Security\ISecureRandom;
|
||||
|
||||
class SessionService {
|
||||
|
||||
@@ -99,7 +99,15 @@ class StackService {
|
||||
return;
|
||||
}
|
||||
|
||||
$stack->setCards($this->cardService->enrichCards($cards));
|
||||
$this->cardService->enrichCards($cards);
|
||||
$cards = array_map(
|
||||
function (Card $card): CardDetails {
|
||||
return new CardDetails($card);
|
||||
},
|
||||
$cards
|
||||
);
|
||||
|
||||
$stack->setCards($cards);
|
||||
}
|
||||
|
||||
private function enrichStacksWithCards($stacks, $since = -1) {
|
||||
|
||||
@@ -30,9 +30,9 @@ use OC\Files\Filesystem;
|
||||
use OCA\Deck\Service\ConfigService;
|
||||
use OCP\EventDispatcher\IEventDispatcher;
|
||||
use OCP\Server;
|
||||
use OCP\Share\Events\BeforeShareCreatedEvent;
|
||||
use OCP\Share\Events\VerifyMountPointEvent;
|
||||
use OCP\Share\IShare;
|
||||
use Symfony\Component\EventDispatcher\GenericEvent;
|
||||
|
||||
class Listener {
|
||||
private ConfigService $configService;
|
||||
@@ -45,11 +45,11 @@ class Listener {
|
||||
/**
|
||||
* @psalm-suppress UndefinedClass
|
||||
*/
|
||||
$dispatcher->addListener(BeforeShareCreatedEvent::class, [self::class, 'listenPreShare'], 1000);
|
||||
$dispatcher->addListener('OCP\Share::preShare', [self::class, 'listenPreShare'], 1000);
|
||||
$dispatcher->addListener(VerifyMountPointEvent::class, [self::class, 'listenVerifyMountPointEvent'], 1000);
|
||||
}
|
||||
|
||||
public static function listenPreShare(BeforeShareCreatedEvent $event): void {
|
||||
public static function listenPreShare(GenericEvent $event): void {
|
||||
/** @var self $listener */
|
||||
$listener = Server::get(self::class);
|
||||
$listener->overwriteShareTarget($event);
|
||||
@@ -61,8 +61,9 @@ class Listener {
|
||||
$listener->overwriteMountPoint($event);
|
||||
}
|
||||
|
||||
public function overwriteShareTarget(BeforeShareCreatedEvent $event): void {
|
||||
$share = $event->getShare();
|
||||
public function overwriteShareTarget(GenericEvent $event): void {
|
||||
/** @var IShare $share */
|
||||
$share = $event->getSubject();
|
||||
|
||||
if ($share->getShareType() !== IShare::TYPE_DECK
|
||||
&& $share->getShareType() !== DeckShareProvider::SHARE_TYPE_DECK_USER) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user