mirror of
https://github.com/wekan/wekan.git
synced 2026-12-03 06:59:41 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7ba10de7ca | ||
|
|
529b56070c | ||
|
|
b901eabbe8 | ||
|
|
2c3c341a24 | ||
|
|
a7b9cb757d | ||
|
|
b85a1b4c3f | ||
|
|
669c999108 | ||
|
|
d4781f7109 | ||
|
|
ede3a6a465 | ||
|
|
2757420911 | ||
|
|
1ad00a9bf4 | ||
|
|
1650585dba | ||
|
|
eaabe86b91 | ||
|
|
e9b5d3b7bd | ||
|
|
d86f2be606 | ||
|
|
ec4b501fc1 | ||
|
|
b02cd66e94 | ||
|
|
8b72c4ad3e | ||
|
|
ffcb88bda2 | ||
|
|
410c90f2e1 | ||
|
|
f7d3e8b76f | ||
|
|
5ac5ebcab2 | ||
|
|
6a2e20d533 | ||
|
|
c557f3f4a7 | ||
|
|
a06ac78eed | ||
|
|
790e908c60 | ||
|
|
3d99f32903 | ||
|
|
48af3c2a6f | ||
|
|
69b84e5bf4 | ||
|
|
a6e34b542f | ||
|
|
07a252412d | ||
|
|
6103a408c1 | ||
|
|
bfa76c0336 | ||
|
|
f903383297 | ||
|
|
8811a8e859 | ||
|
|
53d10dc427 | ||
|
|
7269c2767f | ||
|
|
fb36e4af5f | ||
|
|
a2923a6591 | ||
|
|
3ca49dcbb2 | ||
|
|
0e844410a2 | ||
|
|
a854ce91dc | ||
|
|
ff42e16e37 | ||
|
|
a4cde50edc | ||
|
|
b5415e4d7d | ||
|
|
f0a11a9574 | ||
|
|
3ae484014c | ||
|
|
2a3ebcb9ff | ||
|
|
af7082e359 | ||
|
|
3f36b49079 | ||
|
|
b6ce696029 | ||
|
|
6eca89ae2f | ||
|
|
36179889f9 | ||
|
|
ea8836080d | ||
|
|
1fcdeeb60f | ||
|
|
e7a2a4a583 | ||
|
|
79d1706893 | ||
|
|
802493d76c | ||
|
|
9a09e792a9 | ||
|
|
96d8b7cf3f | ||
|
|
56ad2221a9 | ||
|
|
4c6bb7d36b | ||
|
|
e6db086827 | ||
|
|
9ce539e498 | ||
|
|
5a92400d37 | ||
|
|
fce538085b | ||
|
|
de92f4006f | ||
|
|
a918c65288 | ||
|
|
150f26e6af | ||
|
|
e2329da283 | ||
|
|
ddcd0339c5 | ||
|
|
38ad008f1d | ||
|
|
7b1a65c40a | ||
|
|
c1368dcdd3 | ||
|
|
90c0ec8736 | ||
|
|
8b6d287f66 | ||
|
|
caffa08a55 | ||
|
|
e241d30604 | ||
|
|
b80e496631 | ||
|
|
5561658ac2 | ||
|
|
92b0291bda | ||
|
|
240a87e9cf | ||
|
|
e7545fedda | ||
|
|
744b7fed03 | ||
|
|
ac3f424028 | ||
|
|
4b88117c6b | ||
|
|
06e17c935b | ||
|
|
3522c10d2b | ||
|
|
4d363b7227 | ||
|
|
cb83ff6a59 | ||
|
|
62ad32a076 | ||
|
|
a4710251ef | ||
|
|
02e2ead429 | ||
|
|
d7d31ee384 | ||
|
|
5aba3a283e | ||
|
|
635e9b2b20 | ||
|
|
eb72cca676 | ||
|
|
a166852f9d | ||
|
|
35db09442c | ||
|
|
eacfb642e9 | ||
|
|
57710d36ce | ||
|
|
f130d54eb4 | ||
|
|
39dbfae711 | ||
|
|
157e3d3d36 | ||
|
|
de8d471440 | ||
|
|
bdefa3f80b | ||
|
|
18390c8107 | ||
|
|
07a6d4e6a3 | ||
|
|
6c0d998e57 | ||
|
|
be23dda0c9 | ||
|
|
0082f3675b | ||
|
|
f550827b9e | ||
|
|
fb86cb1dc7 | ||
|
|
c031b819de | ||
|
|
abcaddc66c | ||
|
|
6969bc2d8f | ||
|
|
1fad064732 | ||
|
|
d140a37813 | ||
|
|
95cf88110c | ||
|
|
d078411947 | ||
|
|
c1c57a8d0a | ||
|
|
234a4442b0 | ||
|
|
6ecc6191aa | ||
|
|
e92d08b114 | ||
|
|
50121bdbcd | ||
|
|
e5f371ec61 | ||
|
|
e3250ff16d | ||
|
|
d9c19bebeb | ||
|
|
a17d39c67f | ||
|
|
4aa5bcc185 | ||
|
|
63247d0f18 | ||
|
|
167ba3beb4 | ||
|
|
80ecb7bee4 | ||
|
|
a1d6bfbf98 | ||
|
|
4144d159a4 | ||
|
|
c1452a5e97 | ||
|
|
e21c921dce | ||
|
|
ff79beec52 | ||
|
|
0576bfd364 | ||
|
|
5469498306 | ||
|
|
657685228d | ||
|
|
b658199017 | ||
|
|
c014afa5f9 | ||
|
|
ab68a65874 | ||
|
|
4ecc164692 | ||
|
|
77c2baca65 | ||
|
|
0f1daaf99d | ||
|
|
0134f3031f | ||
|
|
123dfbfb4d | ||
|
|
304d49c654 | ||
|
|
9c9ccca61b | ||
|
|
af55800134 | ||
|
|
5bb27abe7e | ||
|
|
4e3d56fe2a | ||
|
|
0e2c4d491e | ||
|
|
076291d11a | ||
|
|
71636df9cd | ||
|
|
db1d9b4416 | ||
|
|
aa9c9dc8ca | ||
|
|
fcbf0664c2 | ||
|
|
9f3ea4e131 | ||
|
|
0a305a1a06 | ||
|
|
8a1c65f79f | ||
|
|
cf3f64f3a7 | ||
|
|
4264c841d0 | ||
|
|
69f3e85d3b | ||
|
|
419f84dd0b | ||
|
|
679bb2adaa | ||
|
|
cdb7d678e7 | ||
|
|
cac28dc69c | ||
|
|
4d727c5bc3 | ||
|
|
5ebae77cd3 | ||
|
|
773c0d3b01 | ||
|
|
c686b4b720 | ||
|
|
b967d467f9 | ||
|
|
0e8a0cfd66 | ||
|
|
6812ddecc3 | ||
|
|
799302498c | ||
|
|
b92b230a00 | ||
|
|
311d6de48d | ||
|
|
e3b9bbf91d | ||
|
|
7776a7032d | ||
|
|
3f5bdc839b | ||
|
|
f8d2c41210 | ||
|
|
497f8864fb | ||
|
|
334536e61e | ||
|
|
16a6b02c70 | ||
|
|
0a6da9099e | ||
|
|
f74c35e846 | ||
|
|
a2afd6b54c | ||
|
|
41dee6e696 | ||
|
|
18cf5d233b | ||
|
|
1c9c95d648 | ||
|
|
6505f07eaa | ||
|
|
95fad4f883 | ||
|
|
6e1846a135 | ||
|
|
98fd23a926 | ||
|
|
759b2babfb | ||
|
|
5658e81ad4 | ||
|
|
6c05df084e | ||
|
|
4319105cb8 | ||
|
|
1fd98020f8 | ||
|
|
78d74341d7 | ||
|
|
4984897d22 | ||
|
|
fee91e9db5 | ||
|
|
c077f27366 | ||
|
|
713addf4a6 | ||
|
|
da9c970702 | ||
|
|
a7badd317c | ||
|
|
3041ab94e2 | ||
|
|
e0c1ba0a9f | ||
|
|
4aa70ae4e9 | ||
|
|
53e2acb31f | ||
|
|
01cccd24b0 | ||
|
|
e1cba70443 | ||
|
|
375ec9ac72 | ||
|
|
b9d99c4589 | ||
|
|
acd7259a56 | ||
|
|
0f9357a02c | ||
|
|
3009277371 | ||
|
|
daad33a169 | ||
|
|
61a87a80b3 | ||
|
|
15681c57b4 | ||
|
|
9c4f9542c0 | ||
|
|
2cfd89d3c8 | ||
|
|
d5834ae820 | ||
|
|
d7f3f14425 | ||
|
|
30eedce0ba | ||
|
|
fd4a043b9f | ||
|
|
cd0aaff233 | ||
|
|
15274549e2 | ||
|
|
1c3d756a1a | ||
|
|
e3e4b7416a | ||
|
|
18e68439db | ||
|
|
11e45c7bc8 | ||
|
|
ba76be11ad | ||
|
|
f68831b96c | ||
|
|
6155c22b38 | ||
|
|
4e43fe42b8 | ||
|
|
c319f45bf1 | ||
|
|
aaa6932987 | ||
|
|
ee848b4d3c | ||
|
|
55831ca749 | ||
|
|
0624242370 | ||
|
|
9380a71180 | ||
|
|
66fef46c3e | ||
|
|
b11bb436e2 | ||
|
|
42167fb4ac | ||
|
|
a9a1863df7 | ||
|
|
7caa1842b8 | ||
|
|
c37461a7b8 | ||
|
|
6bf9eaceb8 | ||
|
|
f7a4b0d203 | ||
|
|
7978b5575a | ||
|
|
7071f2208c | ||
|
|
daddcc58fc | ||
|
|
aad3d3cee2 | ||
|
|
8249b0a5db | ||
|
|
7d5c3db752 | ||
|
|
95adef1ac0 | ||
|
|
79c3d7440b | ||
|
|
4cf1696e88 | ||
|
|
2dee6aeac2 | ||
|
|
4b9d1d7281 | ||
|
|
35ac8755be | ||
|
|
4b7b5970a4 | ||
|
|
0353f3131f | ||
|
|
5a3dc85e19 | ||
|
|
5067c397c1 | ||
|
|
5db1378ef7 | ||
|
|
47976e4005 | ||
|
|
26ed90419f | ||
|
|
dea05a9680 | ||
|
|
6024c3529f | ||
|
|
8fe25ff52d | ||
|
|
4531f1e491 | ||
|
|
32bd202967 | ||
|
|
466833a2ff | ||
|
|
9713f0c7e3 | ||
|
|
202829a3e1 | ||
|
|
d22725aeaa | ||
|
|
93e83be807 | ||
|
|
7dd6ddbcef | ||
|
|
eaae7e6fac | ||
|
|
9dc0a92771 | ||
|
|
ada3f36b85 | ||
|
|
ce2fefdf12 | ||
|
|
fa51c0eb03 | ||
|
|
f79727b43f | ||
|
|
82c5693848 | ||
|
|
087a1e345d | ||
|
|
84b8f29d73 | ||
|
|
ad2e5b6392 | ||
|
|
d0ded8d95a | ||
|
|
784b270832 | ||
|
|
84009dc5e3 | ||
|
|
05fbecd54d | ||
|
|
af3b5478ab | ||
|
|
d6d45ec303 | ||
|
|
5e070865b2 | ||
|
|
1294885c33 | ||
|
|
d1be025e9a | ||
|
|
2991f66f4c | ||
|
|
de7c132d95 | ||
|
|
e05a0d0461 | ||
|
|
bd042cf7c9 | ||
|
|
1bae512ac3 | ||
|
|
8f9ffda2fd | ||
|
|
c75eedeb8b | ||
|
|
6c7de244ba | ||
|
|
5c00556c53 | ||
|
|
2e454ee9a5 | ||
|
|
8d3f8b4a1e | ||
|
|
68514e9bbf | ||
|
|
761a0fd2f3 | ||
|
|
0ac045dea0 | ||
|
|
afec9a196e | ||
|
|
11519795e0 | ||
|
|
40c82a6990 | ||
|
|
6eb3cde2bb | ||
|
|
f605964731 | ||
|
|
32605a5294 | ||
|
|
6fe7ac7dbc | ||
|
|
2bdae80dc2 | ||
|
|
3efa96385b | ||
|
|
94940de3ba | ||
|
|
907f81bc52 | ||
|
|
e4e098a3ce | ||
|
|
47bd72e96e | ||
|
|
9f6ac047d1 | ||
|
|
d65bbe7ca3 | ||
|
|
5230527e56 | ||
|
|
b5c6dec9c5 | ||
|
|
ab3eab190c | ||
|
|
77012fa68b | ||
|
|
0490227a3a | ||
|
|
d768b03a1c | ||
|
|
1668a6ef92 | ||
|
|
16e784fe92 | ||
|
|
1a1e3add86 | ||
|
|
20c90141d4 | ||
|
|
bf029363d9 | ||
|
|
a355e3b3b2 | ||
|
|
1ad0f6b1ec | ||
|
|
102cf74427 | ||
|
|
1bc748bfb6 | ||
|
|
dfb10098ce | ||
|
|
b79f2c78b0 | ||
|
|
85538b1267 | ||
|
|
5d778fd794 | ||
|
|
ef6a57e8b6 | ||
|
|
d28464321a | ||
|
|
45e7e90643 | ||
|
|
764cb2a458 | ||
|
|
1cf356f38e | ||
|
|
c6cd93f684 | ||
|
|
703f1365fb | ||
|
|
c412d82185 | ||
|
|
0bd07c2a1b | ||
|
|
c15f26943c | ||
|
|
d9302baefb | ||
|
|
683aaefd94 | ||
|
|
3601445fdc | ||
|
|
71ab1f733f | ||
|
|
8ba3c8b2c0 | ||
|
|
9db969a0cd | ||
|
|
fb53ff2b00 | ||
|
|
2487f03d88 | ||
|
|
d25057f95b | ||
|
|
72429f3c2c | ||
|
|
ccafdd2222 | ||
|
|
ddfb4f9285 | ||
|
|
bd4cd7a8e2 | ||
|
|
737d86d495 | ||
|
|
ebf1ae41d5 | ||
|
|
c70de04fcd | ||
|
|
7971846285 | ||
|
|
db71d8f4b6 | ||
|
|
34595d0f50 | ||
|
|
120ba0603f | ||
|
|
144e927d58 | ||
|
|
6dbd3b22b8 | ||
|
|
83dbb65113 | ||
|
|
a141f71d78 | ||
|
|
61d8ecebe9 | ||
|
|
95840ee6bc | ||
|
|
4777a989f5 | ||
|
|
9edd97eb59 | ||
|
|
32d70ed167 | ||
|
|
f024eb3542 | ||
|
|
ada3f88d64 | ||
|
|
4aaf9860c1 | ||
|
|
f4dca7fa8b | ||
|
|
e125295325 | ||
|
|
3ded7736ca | ||
|
|
177a648cef | ||
|
|
9093261ec0 | ||
|
|
8082c345a4 | ||
|
|
38d6ba562f | ||
|
|
e122b863d8 | ||
|
|
b1f730c881 | ||
|
|
2252998313 | ||
|
|
6400b6a6ba | ||
|
|
565ca87135 | ||
|
|
e2c78f34d7 | ||
|
|
88a1d0bf8e | ||
|
|
6ca7f67684 | ||
|
|
790b903ba8 | ||
|
|
4697cf7a5c | ||
|
|
717cc988ef | ||
|
|
80fdd54628 | ||
|
|
353a355876 | ||
|
|
17354601ea | ||
|
|
02fe563122 | ||
|
|
bc56d73487 | ||
|
|
12dbc7c774 | ||
|
|
faaacdc153 | ||
|
|
d6efcc3ae5 | ||
|
|
3fc5f25186 | ||
|
|
be29e0bd95 | ||
|
|
7b2989584a | ||
|
|
9c5c747579 | ||
|
|
f64aefa8fb | ||
|
|
cc8ff2f5d2 | ||
|
|
69e26769ab | ||
|
|
52c3804074 | ||
|
|
bd1b864996 | ||
|
|
a7022051dc | ||
|
|
9ed5592216 | ||
|
|
2aba27640e | ||
|
|
16eb6fd21f | ||
|
|
2e32407859 | ||
|
|
c3116c4ce9 | ||
|
|
10e36d6bcc | ||
|
|
24c64e34d3 | ||
|
|
f4ea968cfa | ||
|
|
d09a359322 | ||
|
|
9cdba1ebe4 | ||
|
|
559f8e5582 | ||
|
|
af59e2c28a | ||
|
|
7ec28a7b39 | ||
|
|
1b7e7a97be | ||
|
|
2693b918b5 | ||
|
|
c32ed768ac | ||
|
|
54dea725d6 | ||
|
|
9d464bed49 | ||
|
|
d5ab750650 | ||
|
|
549f7ab84a | ||
|
|
871a8fae29 | ||
|
|
9ef2b99e43 | ||
|
|
c363b05a81 | ||
|
|
b1038b3a91 | ||
|
|
d7ae163ce3 | ||
|
|
0665c16023 | ||
|
|
39191b8c27 | ||
|
|
4fafb6824e | ||
|
|
7fa021e33d | ||
|
|
386fb2c22e | ||
|
|
ecc0dc70c0 | ||
|
|
58dc07fb82 | ||
|
|
1c625e94c9 | ||
|
|
7ee16e5265 | ||
|
|
8bfd1a016b | ||
|
|
8a08a9a449 | ||
|
|
1b3508c66a | ||
|
|
cbc04f8391 | ||
|
|
eb3327e7e5 | ||
|
|
352cfa1148 | ||
|
|
bd424a9060 | ||
|
|
0f7f912eeb | ||
|
|
a69ef1e2eb | ||
|
|
7b3750b3da | ||
|
|
e05fce84d0 | ||
|
|
6ac28fabc5 | ||
|
|
32768efd72 | ||
|
|
a54381ff3e | ||
|
|
1769ee3e00 | ||
|
|
5648d0edf8 | ||
|
|
02d389f334 | ||
|
|
1e31086033 | ||
|
|
b93c632a7d | ||
|
|
70111a0445 | ||
|
|
4d381a2cd3 | ||
|
|
2b27199ea8 | ||
|
|
8a6adac935 | ||
|
|
ebe726de5f | ||
|
|
b9dd1fa571 | ||
|
|
181cbc7465 | ||
|
|
7c13f6411e | ||
|
|
03bbe5445e | ||
|
|
9a71294274 | ||
|
|
869b89495c | ||
|
|
50e4c70ecc | ||
|
|
ea13537ef9 | ||
|
|
00feb28fc1 | ||
|
|
35a4a64ed6 | ||
|
|
5fd14f961c | ||
|
|
71508455f5 | ||
|
|
161d5f6e99 | ||
|
|
33eab53d3f | ||
|
|
ef910b5e60 | ||
|
|
31a7fd0227 | ||
|
|
c5a0c53592 | ||
|
|
484ba36a1b | ||
|
|
f99e453cd7 | ||
|
|
70a42b6bdf | ||
|
|
acbbb8ab6d | ||
|
|
1c93eb1fc8 | ||
|
|
2c385d8e81 | ||
|
|
aa7434ceb5 | ||
|
|
3dbc5b4a5c | ||
|
|
047ac5d2d5 | ||
|
|
e7a48029c1 | ||
|
|
58c188628b | ||
|
|
024679c5c2 | ||
|
|
13f2508041 | ||
|
|
29935bca4f | ||
|
|
2568d5692c | ||
|
|
759b9f0fad | ||
|
|
7e52d5eb32 | ||
|
|
d02841719e | ||
|
|
07d8635bbb | ||
|
|
1176a023af | ||
|
|
5d4535a760 | ||
|
|
6f7a2fb879 | ||
|
|
fc438993aa | ||
|
|
7b150b49be | ||
|
|
ba4d2210dd | ||
|
|
4ed672d47e | ||
|
|
809294f7c3 | ||
|
|
b17574fe43 | ||
|
|
4cbcdf67a9 | ||
|
|
45082358a5 | ||
|
|
9832f833ba | ||
|
|
6c267974f8 | ||
|
|
1be0f407d7 | ||
|
|
de658e2e10 | ||
|
|
ead814881e | ||
|
|
09a8c200a9 | ||
|
|
01716b1344 | ||
|
|
a55cbb05df | ||
|
|
b99093224b | ||
|
|
247ea89861 | ||
|
|
2c32e8d02d | ||
|
|
e99599b2d8 | ||
|
|
1d7ed914e1 | ||
|
|
84663142ac | ||
|
|
6ce2d38904 | ||
|
|
d18611712d | ||
|
|
8e5cca1b07 | ||
|
|
161510e922 | ||
|
|
00df37be5d | ||
|
|
be26f3f7f4 | ||
|
|
17a7e9f50b | ||
|
|
f5e5f41844 | ||
|
|
196766836f | ||
|
|
ad2c414e79 | ||
|
|
30693070e6 | ||
|
|
a7f9906357 | ||
|
|
fe7072413d | ||
|
|
2c7fa630ad | ||
|
|
bdaeb3feec | ||
|
|
a1c438233b | ||
|
|
83da74fed3 | ||
|
|
80033c02d2 | ||
|
|
92a03876e0 | ||
|
|
d7db2c9422 | ||
|
|
5b15b4210d | ||
|
|
07cd40949e | ||
|
|
eb9572ce1b | ||
|
|
2450fc5da7 | ||
|
|
f3f3ffeb71 | ||
|
|
974e6869bb | ||
|
|
e69d012dd3 | ||
|
|
46b24cca99 | ||
|
|
3e291af8d5 | ||
|
|
d79f445837 | ||
|
|
b504a40c8e | ||
|
|
719c959af6 | ||
|
|
e08e0de3e9 | ||
|
|
cbb5d03728 | ||
|
|
a9b9de0e9c | ||
|
|
adb7f042d8 | ||
|
|
f1ad8a9b1e | ||
|
|
cde317c525 | ||
|
|
1e8b865b15 | ||
|
|
dd3ab552b6 | ||
|
|
c68f685c4f | ||
|
|
34d4eef59a | ||
|
|
03b8e1fc81 | ||
|
|
d7a4c8b66e | ||
|
|
d791b86b5a | ||
|
|
b826b3b5ed | ||
|
|
2daf68ce54 | ||
|
|
05ed215a5e | ||
|
|
2f7296f65c | ||
|
|
f9fbb8ef7b | ||
|
|
5eb8605bee | ||
|
|
a19c9648fd | ||
|
|
9a3481bf44 | ||
|
|
80a4a86ecf | ||
|
|
e84a76a2b7 | ||
|
|
27d4a6d4b4 | ||
|
|
3cff9dec86 | ||
|
|
a5fc737267 | ||
|
|
1bcd3f3bc2 | ||
|
|
5ffcb0efe6 | ||
|
|
58b715fb7d | ||
|
|
1933de038d | ||
|
|
eeb54f750b | ||
|
|
334d54d65f | ||
|
|
785983d8c0 | ||
|
|
1114a35f59 | ||
|
|
972f7c44c3 | ||
|
|
0abfbba309 | ||
|
|
faf52889f8 | ||
|
|
58ec1201c3 | ||
|
|
bca81a252b | ||
|
|
81704727ad | ||
|
|
522b2bb901 | ||
|
|
c1e00982a8 | ||
|
|
036bcf0eae | ||
|
|
d7e90a30d8 | ||
|
|
7bf5ec42ff | ||
|
|
afc8ac3cb7 | ||
|
|
450dfad1ca | ||
|
|
0b6e6eaac8 | ||
|
|
08415686fc | ||
|
|
e3cfad03ee | ||
|
|
2bf2b449b3 | ||
|
|
dfcf9bb730 | ||
|
|
621a12541d | ||
|
|
bcd9333f86 | ||
|
|
7db82d9a01 | ||
|
|
0ae131f79c | ||
|
|
ccefb1ae53 | ||
|
|
05c5f39ac6 | ||
|
|
2668c5a26e | ||
|
|
d5558d79f2 | ||
|
|
15d7e96433 | ||
|
|
cbf732c593 | ||
|
|
6746686c6b | ||
|
|
1c69e0d3ff | ||
|
|
5ff1f37479 | ||
|
|
bf045706cd | ||
|
|
7007ef2cbb | ||
|
|
741eb7c2ec | ||
|
|
98b1657867 | ||
|
|
0b3ba34f7b | ||
|
|
4493a966c3 | ||
|
|
1ca4503952 | ||
|
|
2941ebf286 | ||
|
|
a41dd6965e | ||
|
|
59a8a95352 | ||
|
|
c8d2e8d948 | ||
|
|
49b9431b70 | ||
|
|
c90ad6cc02 | ||
|
|
8a9d1e8466 | ||
|
|
5f08796207 | ||
|
|
cd58155219 | ||
|
|
a07fce5dd2 | ||
|
|
9d32594f15 | ||
|
|
d69c3538c2 | ||
|
|
df763ece66 | ||
|
|
f7d1609e65 | ||
|
|
c789d7b9df | ||
|
|
c366034356 | ||
|
|
eb2d6fd0dd | ||
|
|
791ec860f5 | ||
|
|
f07586f4a1 | ||
|
|
89a2bd61f5 | ||
|
|
0842dfdd44 | ||
|
|
bedf4234fa | ||
|
|
0a066b4dc4 | ||
|
|
afef2f193c | ||
|
|
bd1caa6871 | ||
|
|
5cc5d09799 | ||
|
|
0243626ef8 | ||
|
|
f1f006ef85 | ||
|
|
daa2bf7ffb | ||
|
|
40c2db38ac | ||
|
|
012f9c37aa | ||
|
|
2ecd681754 | ||
|
|
5602c3c589 | ||
|
|
caa313dec0 | ||
|
|
bcfb74acdc | ||
|
|
d8ca486e20 | ||
|
|
06c4a9efdc | ||
|
|
d0b90f9bef | ||
|
|
66df7270fc | ||
|
|
3471961cd8 | ||
|
|
d451354059 | ||
|
|
9b7929c37e | ||
|
|
77abf2f3c5 | ||
|
|
2c3782552f | ||
|
|
e3cfa48695 | ||
|
|
6b94274c2d | ||
|
|
2704476a4b | ||
|
|
36bb3f5059 | ||
|
|
44781f9df5 | ||
|
|
3714956790 | ||
|
|
7660331199 | ||
|
|
7db4a342df | ||
|
|
a458e67801 | ||
|
|
7df8cc4de6 | ||
|
|
b99506b8dc | ||
|
|
e374663188 | ||
|
|
36e10b7d1d | ||
|
|
b63c38ea24 | ||
|
|
6f86639052 | ||
|
|
3dbac46824 | ||
|
|
7fa04e2b78 | ||
|
|
837a343e1d | ||
|
|
01a3327adb | ||
|
|
f6d658c669 | ||
|
|
ce05c3969f | ||
|
|
f09aba59f0 | ||
|
|
c31f8a25f8 | ||
|
|
85dcf53583 | ||
|
|
a2b8d706db | ||
|
|
967ef1fbaa | ||
|
|
fdf2282ee9 | ||
|
|
7f410ab91c | ||
|
|
76fbdcc71d | ||
|
|
f9c6c39308 | ||
|
|
ea925cd307 | ||
|
|
37a68a6403 | ||
|
|
4e7bef8b89 | ||
|
|
cbfb657c50 | ||
|
|
c2612f3be8 | ||
|
|
f3926642ce | ||
|
|
999ad6ec4f | ||
|
|
15a6ef3c3d | ||
|
|
3fb0e0378b | ||
|
|
b4b7265f45 | ||
|
|
aaa57d75b7 | ||
|
|
ff796357a7 | ||
|
|
8fb86f5f7d | ||
|
|
961621d88a | ||
|
|
b7ab2d17a9 | ||
|
|
7458b7b2f4 | ||
|
|
368571847b | ||
|
|
9943248ed4 | ||
|
|
917a8a8df9 | ||
|
|
8b4a219d9e | ||
|
|
6a4585f614 | ||
|
|
1e9d0d2a10 | ||
|
|
6a7fd4f180 | ||
|
|
a4a43e5e94 | ||
|
|
f9255933b4 | ||
|
|
080fdf9ad7 | ||
|
|
d6155d5719 | ||
|
|
ea3eca25d6 | ||
|
|
c5feee3f99 | ||
|
|
b61aa2a9a0 | ||
|
|
0d18c1f49c | ||
|
|
0e7900cfe5 | ||
|
|
742ea784ba | ||
|
|
636cb24509 | ||
|
|
eadcb48698 | ||
|
|
ca62a5bce5 | ||
|
|
bd914a8a8c | ||
|
|
c6fcba33a2 | ||
|
|
0290b53703 | ||
|
|
06e642d04b | ||
|
|
cbc74f815e | ||
|
|
03f2342c54 | ||
|
|
1aef26206d | ||
|
|
f91d591d35 | ||
|
|
8b0ee7635d | ||
|
|
1e46db79e9 | ||
|
|
9a061eb218 | ||
|
|
671237b36d | ||
|
|
615111742e | ||
|
|
7bf0e8ab00 | ||
|
|
53f8bdccf8 | ||
|
|
99db892cd4 | ||
|
|
e3c1b4387e | ||
|
|
16018ea13e | ||
|
|
aca70a5c5b | ||
|
|
5264ee0a72 | ||
|
|
a24bef78eb | ||
|
|
03eb27ab75 | ||
|
|
f85fb9f15d | ||
|
|
7d9f0fae0b | ||
|
|
374c783078 | ||
|
|
f9d95f1760 | ||
|
|
4f8922eccb | ||
|
|
88d1d16928 | ||
|
|
29e5dbac46 | ||
|
|
d427516c8c | ||
|
|
55b850b97c | ||
|
|
f009caf77d | ||
|
|
e39811905a | ||
|
|
b1e73d5711 | ||
|
|
1aef004154 | ||
|
|
9c4201fbd6 | ||
|
|
b15e0d06e9 | ||
|
|
f0254b69cd | ||
|
|
76d6a049d0 | ||
|
|
ca1d39d126 | ||
|
|
a5464e4e0b | ||
|
|
4bb9e3e30d | ||
|
|
2e57fd3426 | ||
|
|
bc78cfb8c5 | ||
|
|
1116bc5978 | ||
|
|
c4882e5116 | ||
|
|
9dbc68c5e7 | ||
|
|
6e4953b91d | ||
|
|
ecd9e3c30c | ||
|
|
e942637a19 | ||
|
|
95017954ca | ||
|
|
2610642bda | ||
|
|
e9b70fd03b | ||
|
|
53c268a30c | ||
|
|
76e2f7acfc | ||
|
|
ad218c29b7 | ||
|
|
479610e8ea | ||
|
|
59e8b89c16 | ||
|
|
ad29f6d6d5 | ||
|
|
aef47a4a13 | ||
|
|
8f73afad54 | ||
|
|
cadf9cac15 | ||
|
|
ac1dca83ba | ||
|
|
6b302ad53d | ||
|
|
8fc0cfdba8 | ||
|
|
f4cb20f04f | ||
|
|
259e6e7411 | ||
|
|
62ea0759bb | ||
|
|
a875d3a2f3 | ||
|
|
65748fb1e8 | ||
|
|
0d5db89ee9 | ||
|
|
86d78c8c3d | ||
|
|
6c766bbf05 | ||
|
|
40d4c2b135 | ||
|
|
ac8ced6c07 | ||
|
|
71742c2412 | ||
|
|
7931a87918 | ||
|
|
92900310fc | ||
|
|
44928baf7e | ||
|
|
6e0aeca6e6 | ||
|
|
05b93ecff4 | ||
|
|
c8788cda45 | ||
|
|
657103f2c0 | ||
|
|
bfb378bbf9 | ||
|
|
ff8d419844 | ||
|
|
f18226fd53 | ||
|
|
8b944d75a9 | ||
|
|
d818503aee | ||
|
|
79b141ca4e | ||
|
|
50b93edb01 | ||
|
|
c89dee349b | ||
|
|
7012a23376 | ||
|
|
8df042398a | ||
|
|
28bbf63aae | ||
|
|
2032e3d41a | ||
|
|
a664959360 | ||
|
|
f9dbb80cfb | ||
|
|
5f164d5176 | ||
|
|
2c6bb622ef | ||
|
|
a5300d26df | ||
|
|
bd369c19ed | ||
|
|
b4ca9a9806 | ||
|
|
d81f06d1f2 | ||
|
|
d40308ae01 | ||
|
|
26acde56d6 | ||
|
|
30d7da505b | ||
|
|
218afcddaa | ||
|
|
8b7b60f4bb | ||
|
|
2a8e0579d8 | ||
|
|
8c788b37f3 | ||
|
|
7c5c8ee34f | ||
|
|
4c9b16ed4e | ||
|
|
552263c08d | ||
|
|
96071956d9 | ||
|
|
0527dc65e4 | ||
|
|
bf89278139 | ||
|
|
404c159619 | ||
|
|
60c2eefaf4 | ||
|
|
2d9fda59ff | ||
|
|
a8b6c5b790 | ||
|
|
831c7166b4 | ||
|
|
36ddce6910 | ||
|
|
843a25b1b0 | ||
|
|
3d0e04978f | ||
|
|
fea574a4ed | ||
|
|
8fb594f372 | ||
|
|
e9db455d76 | ||
|
|
be6fd5d46d | ||
|
|
c119a9d12f | ||
|
|
afbaea915f | ||
|
|
ef47ced9d3 | ||
|
|
4dd91b9466 | ||
|
|
bcd7388623 | ||
|
|
e6bc459beb | ||
|
|
cbba1c8a8b | ||
|
|
e9994e96c7 | ||
|
|
345f292699 | ||
|
|
656a0735c5 | ||
|
|
ce98b29a01 | ||
|
|
0c979b259d | ||
|
|
7094085174 | ||
|
|
6782c02345 | ||
|
|
956e923e9d | ||
|
|
384e99b31a | ||
|
|
5dfe390e05 | ||
|
|
901571ec60 | ||
|
|
db091b3c18 | ||
|
|
94f3665aff | ||
|
|
1518bf164a | ||
|
|
a326fb1c3d | ||
|
|
3a22f83f25 | ||
|
|
8d894396ff | ||
|
|
de89d99323 | ||
|
|
97872b0c96 | ||
|
|
33da6b983f | ||
|
|
a56bba1682 | ||
|
|
aa9d580694 | ||
|
|
0c6f0da660 | ||
|
|
f4713fb419 | ||
|
|
950e435ab0 | ||
|
|
249e777947 | ||
|
|
e1bbf16516 | ||
|
|
b5888ce996 | ||
|
|
4d7e6e06cb | ||
|
|
7a88abce86 | ||
|
|
b52253f333 | ||
|
|
8ed1045438 | ||
|
|
18efc21d26 | ||
|
|
10df7dfc6a | ||
|
|
9f6ab1229c | ||
|
|
49b0753721 | ||
|
|
d382f4b7ef | ||
|
|
31b0f9f82b | ||
|
|
cad48cf65c | ||
|
|
8a11c53711 | ||
|
|
6fdeeab508 | ||
|
|
304937389e | ||
|
|
a43e538835 | ||
|
|
a58d0079d1 | ||
|
|
25041e5203 | ||
|
|
d2fa633496 | ||
|
|
4b180a37d8 | ||
|
|
c1a2e2ba3d | ||
|
|
8dc1f7dc59 | ||
|
|
56be31e976 | ||
|
|
e4fc619254 | ||
|
|
8a6483152f | ||
|
|
941401c252 | ||
|
|
12a55fcaf1 | ||
|
|
dd8f1740ef | ||
|
|
ea935d18d1 | ||
|
|
9b4bba155d | ||
|
|
fb2ef535a4 | ||
|
|
d14489a8f6 | ||
|
|
4b117e0837 | ||
|
|
5dd7f965e1 | ||
|
|
642ac97662 | ||
|
|
843d2b8738 | ||
|
|
d260fe16e6 | ||
|
|
4e4a884d85 | ||
|
|
d5ecdadea1 | ||
|
|
aa7f53f8e5 | ||
|
|
3ef62851e5 | ||
|
|
ca40854013 | ||
|
|
6b2c2bb866 | ||
|
|
992f1a0f1e | ||
|
|
73b6f099b5 | ||
|
|
34b82299bd | ||
|
|
3628544694 | ||
|
|
3fee842242 | ||
|
|
2e6fae2211 | ||
|
|
b17f250f6d | ||
|
|
12a88a79f8 | ||
|
|
6a96278e73 | ||
|
|
a99605ea2a | ||
|
|
0236002182 | ||
|
|
4980acb921 | ||
|
|
675cdc3062 | ||
|
|
6c757b55fc | ||
|
|
e7cba172d0 | ||
|
|
fd5c2c96c2 | ||
|
|
2da4158615 | ||
|
|
98c909f8f0 | ||
|
|
b2ccffd801 | ||
|
|
680b671244 | ||
|
|
ced0d6f4e0 | ||
|
|
eb5b949d5d | ||
|
|
51328310ee | ||
|
|
50540f4d89 | ||
|
|
6d285445a8 | ||
|
|
e562bb578b | ||
|
|
a1a6f506b0 | ||
|
|
77fe2cd88a | ||
|
|
66fb03a6f8 | ||
|
|
e5e30bd628 | ||
|
|
424e2a72d5 | ||
|
|
ed361f8cdb | ||
|
|
064688a756 | ||
|
|
38f7921381 | ||
|
|
a6e10bf740 | ||
|
|
baa6776735 | ||
|
|
cbe0daf970 | ||
|
|
6b8ec1ec47 | ||
|
|
c249cabb4c | ||
|
|
442e6841ce | ||
|
|
36f07d6b77 | ||
|
|
7dd303c6d0 | ||
|
|
4d7ecf7b3f | ||
|
|
6a7eadf6db | ||
|
|
0a1e1c1cd1 | ||
|
|
f93738ce99 | ||
|
|
5e8c1a6ba0 | ||
|
|
8e7c80b419 | ||
|
|
56c7a80da7 | ||
|
|
59f97c3e17 | ||
|
|
c44e82ee0f | ||
|
|
6d236fcce2 | ||
|
|
add7704d1a | ||
|
|
54a395272b | ||
|
|
c940f81d93 | ||
|
|
5b2d9f20da | ||
|
|
2bd27f6de1 | ||
|
|
3a3ed2603e | ||
|
|
0b495fc175 | ||
|
|
b31dc0cd52 | ||
|
|
05e7415260 | ||
|
|
85ce4cd688 | ||
|
|
d4f96a39e5 | ||
|
|
d22276e3c7 | ||
|
|
0d768aa305 | ||
|
|
535ce44ebb | ||
|
|
54ab509a93 | ||
|
|
3dfc6e2654 | ||
|
|
7c1e326d72 | ||
|
|
ed4a5c82fd | ||
|
|
66d61576d4 | ||
|
|
6f2d48b638 | ||
|
|
ba6021eb5c | ||
|
|
990467e3fe | ||
|
|
1fa08b3409 | ||
|
|
a270a18798 | ||
|
|
e15a030daf | ||
|
|
822b286e62 | ||
|
|
9fcae7eb8e | ||
|
|
0227d08e22 | ||
|
|
ebf9eb68cf | ||
|
|
88205b88ee | ||
|
|
2fb112f9cc | ||
|
|
51fe700691 | ||
|
|
d6d3aa31c2 | ||
|
|
fff267b06c | ||
|
|
e1825e926a | ||
|
|
9c93daad1e | ||
|
|
15d983ca0f | ||
|
|
708c7a2dac | ||
|
|
4242f3d6fd | ||
|
|
abfc556974 | ||
|
|
def3da3ac6 | ||
|
|
cd88d297c2 | ||
|
|
f12811e09f | ||
|
|
2f3daa07c9 | ||
|
|
b716ff9c06 | ||
|
|
162aa3c245 | ||
|
|
ece97475ee | ||
|
|
c0fd2ca650 | ||
|
|
e1a693f645 | ||
|
|
34bee6213f | ||
|
|
2f7a1d7d91 | ||
|
|
9b342beafa | ||
|
|
0dcc4fb31a | ||
|
|
ebcb627b7e | ||
|
|
e1b55d1e9c | ||
|
|
788f867021 | ||
|
|
c12347a0ad | ||
|
|
05c7524069 | ||
|
|
4f76fb2c35 | ||
|
|
50cd31ba4b | ||
|
|
31c26d53dd | ||
|
|
23ec68d77a | ||
|
|
82746f69a2 | ||
|
|
2832b976cc | ||
|
|
6fcddc253e | ||
|
|
2df92cc777 | ||
|
|
5b57c7ad92 | ||
|
|
1f011bd7f1 | ||
|
|
dfee7fdbd6 | ||
|
|
9bf3d88616 | ||
|
|
e7129d0c87 | ||
|
|
e8d6ccb8c7 | ||
|
|
7ab3e8b75b | ||
|
|
7c248c3bb7 | ||
|
|
261081c8d2 | ||
|
|
a495edf319 | ||
|
|
ece353273d | ||
|
|
947220845a | ||
|
|
b5a8105fbc | ||
|
|
7aeecb8656 | ||
|
|
d5ee7d547d | ||
|
|
08b81dc571 | ||
|
|
933caf94a5 | ||
|
|
0d0401655f | ||
|
|
e49cc06b18 | ||
|
|
e0f0917f12 | ||
|
|
9327ac6b3a | ||
|
|
56ee1ce4a6 | ||
|
|
fa7915b160 | ||
|
|
05fcb4ba49 | ||
|
|
b524f3c5ce | ||
|
|
99245eef8e | ||
|
|
70202ab865 | ||
|
|
c5bf26c274 | ||
|
|
ea6d9d13ef | ||
|
|
9c81e92c30 | ||
|
|
8e48a01100 | ||
|
|
66e10e5b76 | ||
|
|
c57d5402c8 | ||
|
|
be94604c33 | ||
|
|
0df94a66b3 | ||
|
|
f8e717aaf9 | ||
|
|
e2d4c92de1 | ||
|
|
b63c9fd208 | ||
|
|
7d38c3784e | ||
|
|
106105876f | ||
|
|
4b84711962 | ||
|
|
299a3090a2 | ||
|
|
cf826b330a | ||
|
|
49a3f3638c | ||
|
|
e4c465b86e | ||
|
|
e71f48a279 | ||
|
|
b9067ad361 | ||
|
|
23418472c8 | ||
|
|
d0ea9d976a | ||
|
|
94138336d0 | ||
|
|
613f3f2dcf | ||
|
|
76ccd99421 | ||
|
|
e90c393b4f | ||
|
|
61c76bfa57 | ||
|
|
7d4f2be075 | ||
|
|
eb09758ac8 | ||
|
|
4768f38574 | ||
|
|
1e90959153 | ||
|
|
4f8d327629 | ||
|
|
5334c97c26 | ||
|
|
3f54b7ae4b | ||
|
|
35d1e692d3 | ||
|
|
010e1d8907 | ||
|
|
f28072cfb3 | ||
|
|
efae096390 | ||
|
|
1f21b49199 | ||
|
|
9001d7316e | ||
|
|
88ffd90c4a | ||
|
|
94e201ea8a | ||
|
|
769e310f4c | ||
|
|
a1c8ee3faa | ||
|
|
a7da74c2f9 | ||
|
|
c74f4f1ed2 | ||
|
|
c5ee75d828 | ||
|
|
b3fde5c6a4 | ||
|
|
65ff0c17c9 | ||
|
|
7d0520c163 | ||
|
|
3d305a93fc | ||
|
|
cf71248e78 | ||
|
|
efbcfb1e78 | ||
|
|
129d1a9ae0 | ||
|
|
8ecb9fef3e | ||
|
|
b38178fad9 | ||
|
|
6d3d823ba2 | ||
|
|
84d8b7e865 | ||
|
|
2e1c1c8b31 | ||
|
|
e8a7baf5b7 | ||
|
|
eb76148fad | ||
|
|
f294f46564 | ||
|
|
4ae0ceb36e | ||
|
|
188b6cbabf | ||
|
|
f5cc5c5759 | ||
|
|
ca808a9bdd | ||
|
|
96c3b01e77 | ||
|
|
939be2a06c | ||
|
|
68ea119611 | ||
|
|
478efbf327 | ||
|
|
44d63dc9aa | ||
|
|
11b2826e0e | ||
|
|
b9ea9bf4e5 | ||
|
|
e61cdd326b | ||
|
|
b0522f217c | ||
|
|
b2466b993c | ||
|
|
03ea0d5355 | ||
|
|
a0239f1c49 | ||
|
|
ba577d9e69 | ||
|
|
c3739f7091 | ||
|
|
cce317544f | ||
|
|
8b4add855f | ||
|
|
cac787acd9 | ||
|
|
071d265875 | ||
|
|
f8d03afc5e | ||
|
|
ce6d6cb74a | ||
|
|
991a65b4e6 | ||
|
|
1fe8df03d7 | ||
|
|
87d2923009 | ||
|
|
9b3736cb23 | ||
|
|
61c2923613 | ||
|
|
ed0d88d36c | ||
|
|
2684390c30 | ||
|
|
c9cc245656 | ||
|
|
e468d8d6ab | ||
|
|
31e933a00f | ||
|
|
68f16a0ad5 | ||
|
|
bee9cda5a4 | ||
|
|
a770f47810 | ||
|
|
55d18d35b2 | ||
|
|
485a6e092e | ||
|
|
b6f3e79f1e | ||
|
|
59f1433437 | ||
|
|
b7505eba1d | ||
|
|
666ae4d073 | ||
|
|
1a935dcc79 | ||
|
|
2966b5489d | ||
|
|
d137abaf2f | ||
|
|
0f57a10687 | ||
|
|
a1b3e3a546 | ||
|
|
72f41f1194 | ||
|
|
393a726b45 | ||
|
|
38c7887db3 | ||
|
|
1d2267984f | ||
|
|
a8e5ec067a | ||
|
|
da2bf8f66a | ||
|
|
9a75a1cea7 | ||
|
|
591459ba2d | ||
|
|
e93cdbef0a | ||
|
|
79a5cb0b13 | ||
|
|
97e14451be | ||
|
|
c6cf3b8551 | ||
|
|
5781df270a | ||
|
|
a6474274e4 | ||
|
|
f25b33ec3e | ||
|
|
4e670ccb46 | ||
|
|
60ec994c5e | ||
|
|
34ac954a92 | ||
|
|
ffd040bb4a | ||
|
|
9f5b8418bc | ||
|
|
91573cbb79 | ||
|
|
2c55a4fe16 | ||
|
|
90c9732481 | ||
|
|
ac577d43e2 | ||
|
|
52288c5f38 | ||
|
|
c0bfc97e76 | ||
|
|
5a363b4914 | ||
|
|
2e3d9936e6 | ||
|
|
da52065dfb | ||
|
|
57f78534d9 | ||
|
|
8646e306a1 | ||
|
|
d22b77b857 | ||
|
|
d84007f091 | ||
|
|
dc26f89854 | ||
|
|
4c115526b3 | ||
|
|
5f7ae807cd | ||
|
|
9e2fdaadc0 | ||
|
|
90facfe4d3 | ||
|
|
2be4866a3c | ||
|
|
5911d62975 | ||
|
|
c915b7fdf7 | ||
|
|
6d00304cd4 | ||
|
|
4ec4164fed | ||
|
|
03c2a73280 | ||
|
|
0274d7d1a3 | ||
|
|
32892640b4 | ||
|
|
a76fd7d476 | ||
|
|
8207175096 | ||
|
|
fcebff5e70 | ||
|
|
566535b584 | ||
|
|
b4ae088cb9 | ||
|
|
bf3898e32b | ||
|
|
535890cfc4 | ||
|
|
e205a75ad2 | ||
|
|
e052916545 | ||
|
|
7081fcea5a | ||
|
|
b24be81135 | ||
|
|
8002241cf1 | ||
|
|
8dbcbfa3dc | ||
|
|
b4041574e4 | ||
|
|
fed3a2b023 | ||
|
|
5ceea21788 | ||
|
|
d8b22b5456 | ||
|
|
c1398c95f1 | ||
|
|
01b0cd0593 | ||
|
|
2de3072711 | ||
|
|
6eb0896b70 | ||
|
|
f80679e0f1 | ||
|
|
3c9f8f4e54 | ||
|
|
ba1ce65c91 | ||
|
|
8ea4454b02 | ||
|
|
752011dd73 | ||
|
|
b6fd369daf | ||
|
|
bdbed8d76d | ||
|
|
a3e08d0e37 | ||
|
|
5cb67d3769 | ||
|
|
c592051a45 | ||
|
|
8e8af2d647 | ||
|
|
18032c1721 | ||
|
|
89ef872785 | ||
|
|
5b1b99dbb5 | ||
|
|
74ff428a2e | ||
|
|
91f5f0a6b8 | ||
|
|
2061d905e2 | ||
|
|
4ca88a5767 | ||
|
|
d5ee067ea5 | ||
|
|
efb9c6b8b4 | ||
|
|
463039a8a1 | ||
|
|
279d07010e | ||
|
|
be7467120b | ||
|
|
4fe3014829 | ||
|
|
1218bd1cc8 | ||
|
|
e215e36a8d | ||
|
|
ff0447b726 | ||
|
|
6fff1eaed1 | ||
|
|
c948e79075 | ||
|
|
656b7bfd66 | ||
|
|
7199c7fe35 | ||
|
|
66743ea0b8 | ||
|
|
3f497943df | ||
|
|
5cfed2552c | ||
|
|
e8a08ece7e | ||
|
|
a1df70ed91 | ||
|
|
d8fe2fbf18 | ||
|
|
b348233eaf | ||
|
|
7e2edf54ff | ||
|
|
a36732b7fc | ||
|
|
e251eb67ba | ||
|
|
e6a3c9f2df | ||
|
|
6fc8e3a667 | ||
|
|
2ad17931ce | ||
|
|
8f105e9efe | ||
|
|
e426dcbe11 | ||
|
|
9739bddfe6 | ||
|
|
2d35e5b75f | ||
|
|
00ddd139b9 | ||
|
|
9d9f14bbb3 | ||
|
|
0f88e82797 | ||
|
|
58dc46932f | ||
|
|
31812a68a9 | ||
|
|
72eeceec44 | ||
|
|
1b987e787c | ||
|
|
a068872a39 | ||
|
|
f5f07f6c31 | ||
|
|
365e83e6e2 | ||
|
|
d174da5091 | ||
|
|
031a8b78d1 | ||
|
|
ca6a5533a1 | ||
|
|
57c79d6f5d | ||
|
|
3aada40dc0 | ||
|
|
028ae7b66e | ||
|
|
0a4cb321b4 | ||
|
|
5e6a7f3890 | ||
|
|
b8a9150aba | ||
|
|
e2cc20c0de | ||
|
|
6f3fbbe300 | ||
|
|
8239c4e818 | ||
|
|
61d69e8070 | ||
|
|
59097e7d9d | ||
|
|
85db1ba366 | ||
|
|
7b335e25be | ||
|
|
b217435303 | ||
|
|
bd34b8406e | ||
|
|
fd1dff742e | ||
|
|
f2efaeebeb | ||
|
|
2592f2411e | ||
|
|
3ae66c5870 | ||
|
|
47332fa88f | ||
|
|
c7ecf1b876 | ||
|
|
3f93cc119c | ||
|
|
4c44d72ff9 | ||
|
|
bb208b0900 | ||
|
|
3832b2bcf5 | ||
|
|
70f0b3a40b | ||
|
|
7a35afe7e2 | ||
|
|
b34331f3eb | ||
|
|
59b0a9bf66 | ||
|
|
b4d1da83d6 | ||
|
|
09782df3b5 | ||
|
|
bbc3c2b805 | ||
|
|
e49d4a2f03 | ||
|
|
53462a035b | ||
|
|
48be13689c | ||
|
|
4ad7fd4f00 | ||
|
|
efdfb081c8 | ||
|
|
820f762325 | ||
|
|
e23026513a | ||
|
|
b7a55a0184 | ||
|
|
950592d1c8 | ||
|
|
c7b02a8098 | ||
|
|
079e0a9398 | ||
|
|
5298ae34e0 | ||
|
|
0f00a82a07 | ||
|
|
413c1dda23 | ||
|
|
dfacf17eef | ||
|
|
eb6cd7cec9 | ||
|
|
3545875104 | ||
|
|
8203e48269 | ||
|
|
a6265ba62c | ||
|
|
9f4186429f | ||
|
|
010b4c6d0e | ||
|
|
b8054be0be | ||
|
|
ec280e50ec | ||
|
|
a4705f06ba | ||
|
|
4843f6c403 | ||
|
|
8a0db3f42a | ||
|
|
1b11365ab2 | ||
|
|
61115643a4 | ||
|
|
410e2d5849 | ||
|
|
a85ec72963 | ||
|
|
40cb30a732 | ||
|
|
ae2261647c | ||
|
|
31310ace16 | ||
|
|
e08344ce73 | ||
|
|
22b4ea09dc | ||
|
|
fc08df3613 | ||
|
|
b2df043d25 | ||
|
|
464823f0b8 | ||
|
|
d49874cdb7 | ||
|
|
f517dc4f39 | ||
|
|
bb1a3e1147 | ||
|
|
92ed79dd19 | ||
|
|
3a9c7ea456 | ||
|
|
fb4187850d | ||
|
|
dfe06d370c | ||
|
|
b5f45db513 | ||
|
|
4c610cde59 | ||
|
|
0870e20191 | ||
|
|
e919c2e827 | ||
|
|
870ba1d362 | ||
|
|
c48d7b5837 | ||
|
|
05b2d28890 | ||
|
|
33d3b49c6c | ||
|
|
5cf8a40d03 | ||
|
|
8749a19373 | ||
|
|
af8ba25bff | ||
|
|
7a8564a518 | ||
|
|
e34b1a592a | ||
|
|
49289850b7 | ||
|
|
2352f5fbea | ||
|
|
f6bdb3c926 | ||
|
|
e6d4229f14 | ||
|
|
f63e4b091f | ||
|
|
2bf2f3243c | ||
|
|
a126a01201 | ||
|
|
23faf78669 | ||
|
|
7badc8fbc8 | ||
|
|
5b68b5e9d1 | ||
|
|
6d1920dfe5 | ||
|
|
6886b2ea03 | ||
|
|
88256e64e2 | ||
|
|
26de82761f | ||
|
|
ef0f4925e7 | ||
|
|
b1356dce9a | ||
|
|
f8b02913fe | ||
|
|
297660e04c | ||
|
|
22fdf3c5e7 | ||
|
|
389a16622f | ||
|
|
5404ecc872 | ||
|
|
4e3d2c5e93 | ||
|
|
a39eb56609 | ||
|
|
292c61a409 | ||
|
|
84fe7da69c | ||
|
|
890981a91b | ||
|
|
656f59a958 | ||
|
|
9430cf06e3 | ||
|
|
2634493125 | ||
|
|
0cf21a8db1 | ||
|
|
69567ca11c | ||
|
|
736ca96b03 | ||
|
|
48c35236b9 | ||
|
|
bcccc26f1a | ||
|
|
0080bcd48f | ||
|
|
006f249fd9 | ||
|
|
f7042d0ecd | ||
|
|
f4ec808e4a | ||
|
|
c182847dec | ||
|
|
4db2213fa8 | ||
|
|
feb86c033a | ||
|
|
55e5d81bce |
No files matched your search
@@ -21,7 +21,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
# The Dockerfile does not build WeKan from source — it DOWNLOADS the prebuilt
|
||||
# release zip (wekan-<VERSION>-amd64.zip) that release-all.yml publishes, and
|
||||
# release zip (wekan-<VERSION>-linux-x64-musl.zip) that release-all.yml publishes, and
|
||||
# `exit 8`s if it is missing. So this image can only be built once the release
|
||||
# for the version pinned in the Dockerfile is up. On a push during the release
|
||||
# window (the version was just bumped but the release job has not attached the
|
||||
@@ -37,19 +37,19 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
VERSION="$(sed -n 's/^ARG VERSION=//p' Dockerfile | head -1)"
|
||||
asset="wekan-${VERSION}-amd64.zip"
|
||||
asset="wekan-${VERSION}-linux-x64-musl.zip"
|
||||
# The list is read whole BEFORE matching. `gh … | grep -q` lets grep exit
|
||||
# at the first match while gh is still writing; gh gets SIGPIPE, pipefail
|
||||
# makes the pipeline fail, and a PUBLISHED asset was reported missing - the
|
||||
# v12.39 Mac apps were skipped that way, with the bundles already attached.
|
||||
assets="$(gh release view "v${VERSION}" --repo "${GITHUB_CTX_REPOSITORY}" \
|
||||
--json assets --jq '.assets[].name' 2>/dev/null || true)"
|
||||
if grep -qx "$asset" <<< "$assets"; then
|
||||
if grep -Fqx "$asset" <<< "$assets" && grep -Fqx "$asset.sha256sum" <<< "$assets"; then
|
||||
echo "build=yes" >> "$GITHUB_OUTPUT"
|
||||
echo "OK: $asset is on the v${VERSION} release; building the image."
|
||||
else
|
||||
echo "build=no" >> "$GITHUB_OUTPUT"
|
||||
echo "::notice::$asset is not on the v${VERSION} release yet - skipping. release-all.yml builds the image once the release is published."
|
||||
echo "::notice::$asset or its checksum is not on the v${VERSION} release yet - skipping. release-all.yml builds the image once the release is published."
|
||||
fi
|
||||
|
||||
- name: Build the Docker image
|
||||
|
||||
@@ -113,13 +113,16 @@ jobs:
|
||||
echo "skip=true" >> "$GITHUB_OUTPUT"; exit 0
|
||||
fi
|
||||
eval "$(printf '%s\n' "$out" | grep -E '^node_(url|sha256|kind)=')"
|
||||
[ "$node_kind" = tar.xz ] || { echo "::error::expected a tar.xz musl Node.js, got $node_kind"; exit 1; }
|
||||
bash releases/fetch.sh -o node-musl.tar.xz "$node_url"
|
||||
[ -n "$node_sha256" ] || { echo "::error::$node_url has no published SHA256."; exit 1; }
|
||||
echo "$node_sha256 node-musl.tar.xz" | sha256sum -c -
|
||||
mkdir -p musl-tools
|
||||
tar -xJf node-musl.tar.xz --strip-components=1 -C musl-tools
|
||||
rm -f node-musl.tar.xz
|
||||
bash releases/fetch.sh -o node-musl.download "$node_url"
|
||||
echo "$node_sha256 node-musl.download" | sha256sum -c -
|
||||
mkdir -p musl-tools/bin
|
||||
case "$node_kind" in
|
||||
tar.xz) tar -xJf node-musl.download --strip-components=1 -C musl-tools ;;
|
||||
binary) install -m 755 node-musl.download musl-tools/bin/node ;;
|
||||
*) echo "::error::unexpected musl Node.js asset kind $node_kind"; exit 1 ;;
|
||||
esac
|
||||
rm -f node-musl.download
|
||||
file musl-tools/bin/node bundle/ferretdb
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
|
||||
@@ -131,6 +134,7 @@ jobs:
|
||||
docker run --rm -v "$PWD:/work" -w /work -e ARCH \
|
||||
alpine:3.23 sh -ec '
|
||||
apk add --no-cache bash coreutils curl file python3 make g++ linux-headers binutils libstdc++ libgcc libatomic
|
||||
if [ ! -x musl-tools/bin/npm ]; then apk add --no-cache npm; fi
|
||||
bash releases/musl/build-bundle.sh "$ARCH"'
|
||||
|
||||
- name: Package
|
||||
|
||||
@@ -471,6 +471,21 @@ directly after the merge.
|
||||
- `.tools/w/FerretDB` specifics — FerretDB `.go` files must contain **no**
|
||||
application-specific names (say "the client" / "a Meteor 3 driver" / a bare
|
||||
`#NNNN`); its `CHANGELOG.md` may use `wekan/wekan#NNNN`.
|
||||
- `.tools/w/omi` specifics — **new features and fixes go into Omi itself**
|
||||
(its FreePascal server, `public/server.pas` and its `public/omi*.pas`
|
||||
units), **not into gitea-patches' scripts** (`mirror/`, the Python
|
||||
github-to-gitea, gitea-to-gitlab and gitea-to-sourceforge). **Every Omi
|
||||
feature has to work with Omi alone: without a running Gitea server, and
|
||||
without Go or any other program Omi does not build itself** - there is no
|
||||
Gitea server and no Go for the Amiga, which Omi is built for
|
||||
(`releases/amiga/build.sh`). So Omi reads and writes its own `.omi`
|
||||
repositories and a Gitea folder's files directly, speaks git's smart HTTP
|
||||
in Pascal (`public/omigit.pas`) rather than running the `git` program, and
|
||||
is tested with its own tests under `tests/`. Where the Amiga lacks
|
||||
something - FreePascal has no TLS there, so `https://` cannot be reached -
|
||||
the feature still works through `http://` (a TLS proxy on another
|
||||
machine), and the docs say so. A gitea-patches script that does the same
|
||||
job is a reference for WHAT to do, not a place to add it.
|
||||
|
||||
### CHANGELOG
|
||||
|
||||
|
||||
+5215
-4529
File diff suppressed because it is too large.
Load diff
+44
-47
@@ -5,64 +5,61 @@ each one changed and the project status are in
|
||||
Written by `node releases/changelog-short.mjs` from CHANGELOG-big.md:
|
||||
make changes there.
|
||||
|
||||
# v13.35 2026-11-27 WeKan ® release
|
||||
# v13.40 2026-12-02 WeKan ® release
|
||||
|
||||
A **due date that is not due soon is grey** again, on the card
|
||||
and the minicard, instead of a yellow that looked almost like the amber of
|
||||
"due soon".
|
||||
Native **WeKan board imports** preserve required list fields
|
||||
and handle **Notion** and **Planka** synchronization metadata. Multiline
|
||||
board labels save correctly. **OpenProject** transfers preserve assignees and
|
||||
milestone dates and budgets. List Sync can write back compatible type
|
||||
changes and budget choices.
|
||||
**Jira** transfers retain description panels and API exports preserve inline
|
||||
formatting. List Sync can also read and update Jira start dates. The
|
||||
**Univention App Center** package starts with the shell-free WeKan image.
|
||||
|
||||
[All changes in v13.35](CHANGELOG-big.md#v1335-2026-11-27-wekan--release)
|
||||
[All changes in v13.40](CHANGELOG-big.md#v1340-2026-12-02-wekan--release)
|
||||
|
||||
# v13.34 2026-11-26 WeKan ® release
|
||||
# v13.39 2026-12-02 WeKan ® release
|
||||
|
||||
The **Docker image runs on musl** for amd64 and arm64, on a root
|
||||
of Alpine packages only, without the glibc and GCC runtime that held every
|
||||
finding of its security scan. WeKan's default database runs on **FerretDB
|
||||
v1.116.0**, whose one static binary is also **mongosh, sh and bash, written in
|
||||
Go**, so `docker exec -it wekan-ferretdb mongosh wekan` works again. The
|
||||
**wekan-gantt-gpl** snap and Docker image are no longer published, and
|
||||
**wekan-ondra** users get one script that moves them to the wekan snap.
|
||||
**Minicards are compact again**, and a board sets its own **due date
|
||||
colours**.
|
||||
The export menu sends selected WeKan cards to a chosen **Jira**
|
||||
project and issue type, including start and due dates, labels, dependencies and
|
||||
subtasks
|
||||
where Jira supports them. Direct **OpenProject** exports can preserve parent
|
||||
relationships and supported dependencies between exported cards. **Checkboxes**
|
||||
use the same style in Legal Pages, board settings, and other forms. **Planka**
|
||||
List Sync sends new checklists and tasks to Planka and synchronizes edits and
|
||||
deletions in both directions. The **REST API** can update several cards in one
|
||||
request while checking each card’s revision. Administrators can set a default
|
||||
board template per feature profile.
|
||||
|
||||
[All changes in v13.34](CHANGELOG-big.md#v1334-2026-11-26-wekan--release)
|
||||
[All changes in v13.39](CHANGELOG-big.md#v1339-2026-12-02-wekan--release)
|
||||
|
||||
# v13.33 2026-11-26 WeKan ® release
|
||||
# v13.38 2026-12-02 WeKan ® release
|
||||
|
||||
The Docker entrypoint logs **no value read from the environment**
|
||||
(two GitHub CodeQL alerts). A **board export without archived items** moves a
|
||||
board to another WeKan without its archive, the **UCS App Center** publisher
|
||||
works with the distroless FerretDB image again, and **Walloon** is Walloon
|
||||
instead of French and invented words. Omi gets its Gitea orphan strings in every
|
||||
language, and the Azure Blob test no longer hangs.
|
||||
**Jira**, **OpenProject**, **Redmine**, **Asana**, **ClickUp**
|
||||
and **Linear** imports and List Sync carry more planning details, comments,
|
||||
files and dependencies. **REST** supports board-wide card sync and threaded
|
||||
comments, and hides deleted lists and cards. **History** shows archive and
|
||||
restore statuses, **Docker** checks application and database readiness, and
|
||||
**LDAP** supports ordered fallback servers. **Workload** uses each
|
||||
assignee’s remaining effort. **Auto-archive** keeps recently active subtasks.
|
||||
|
||||
[All changes in v13.33](CHANGELOG-big.md#v1333-2026-11-26-wekan--release)
|
||||
[All changes in v13.38](CHANGELOG-big.md#v1338-2026-12-02-wekan--release)
|
||||
|
||||
# v13.32 2026-11-25 WeKan ® release
|
||||
# v13.37 2026-11-30 WeKan ® release
|
||||
|
||||
Every bundle, snap and Docker image is **about 220 MiB
|
||||
smaller**: translations are one copy on the server, and neither a test build's
|
||||
files, the TypeScript compiler nor Azure's sign-in libraries ship any more.
|
||||
Languages that are a copy of another, such as en-IT, no longer fail on the
|
||||
server. Minicards are **compact again**, and their caret and menu can be
|
||||
hidden; the health checks survive odd data and a nightly **mongodump**. The
|
||||
Docker image's start no longer logs paths read
|
||||
from the environment, as **GitHub CodeQL** found, and the documentation says
|
||||
the license rule plainly: **permissive licenses, no GPL**.
|
||||
Jira imports from **Jira Server and Data Center** as formatted
|
||||
text, with its people, watchers, worklogs and attachments, checked against
|
||||
**OpenProject's Jira Migrator**. A list can be synced with **OpenProject**,
|
||||
**Microsoft To Do**, **Google Tasks**, **KanbanFlow**, **Planka** and **Trello**
|
||||
too. The Problems panel shows the latest History integrity check and opens
|
||||
Data health findings for review. Todoist projects can be imported, and
|
||||
their active tasks can sync into a WeKan list.
|
||||
|
||||
[All changes in v13.32](CHANGELOG-big.md#v1332-2026-11-25-wekan--release)
|
||||
[All changes in v13.37](CHANGELOG-big.md#v1337-2026-11-30-wekan--release)
|
||||
|
||||
# v13.31 2026-11-25 WeKan ® release
|
||||
# v13.36 2026-11-27 WeKan ® release
|
||||
|
||||
A person can **download everything WeKan holds about them**
|
||||
and **be erased everywhere**; an operator publishes a **privacy notice, terms
|
||||
and imprint**, can **require accepting them**, and limits how long records are
|
||||
kept. Administrators **export their lists as CSV**, see **who downloaded what**,
|
||||
check a **Compliance** checklist; the pages pass **WCAG 2.2 AA** checks, and
|
||||
every
|
||||
release carries a **CycloneDX SBOM**, with **security.txt** from the security
|
||||
contact. **Problems / Summary** groups **sign-in refusals by reason** with the
|
||||
fix for each, the **delay after a wrong password** is applied at last, the
|
||||
**Docker image is distroless**, and the server tests pass again.
|
||||
Filtering a board by **yourself as assignee** now survives a page
|
||||
refresh, as filtering by anybody else already did.
|
||||
|
||||
[All changes in v13.31](CHANGELOG-big.md#v1331-2026-11-25-wekan--release)
|
||||
[All changes in v13.36](CHANGELOG-big.md#v1336-2026-11-27-wekan--release)
|
||||
@@ -471,6 +471,21 @@ directly after the merge.
|
||||
- `.tools/w/FerretDB` specifics — FerretDB `.go` files must contain **no**
|
||||
application-specific names (say "the client" / "a Meteor 3 driver" / a bare
|
||||
`#NNNN`); its `CHANGELOG.md` may use `wekan/wekan#NNNN`.
|
||||
- `.tools/w/omi` specifics — **new features and fixes go into Omi itself**
|
||||
(its FreePascal server, `public/server.pas` and its `public/omi*.pas`
|
||||
units), **not into gitea-patches' scripts** (`mirror/`, the Python
|
||||
github-to-gitea, gitea-to-gitlab and gitea-to-sourceforge). **Every Omi
|
||||
feature has to work with Omi alone: without a running Gitea server, and
|
||||
without Go or any other program Omi does not build itself** - there is no
|
||||
Gitea server and no Go for the Amiga, which Omi is built for
|
||||
(`releases/amiga/build.sh`). So Omi reads and writes its own `.omi`
|
||||
repositories and a Gitea folder's files directly, speaks git's smart HTTP
|
||||
in Pascal (`public/omigit.pas`) rather than running the `git` program, and
|
||||
is tested with its own tests under `tests/`. Where the Amiga lacks
|
||||
something - FreePascal has no TLS there, so `https://` cannot be reached -
|
||||
the feature still works through `http://` (a TLS proxy on another
|
||||
machine), and the docs say so. A gitea-patches script that does the same
|
||||
job is a reference for WHAT to do, not a place to add it.
|
||||
|
||||
### CHANGELOG
|
||||
|
||||
|
||||
+4
-2
@@ -62,7 +62,7 @@ FROM --platform=$BUILDPLATFORM debian:trixie AS bundle
|
||||
|
||||
ARG TARGETARCH
|
||||
ARG TARGETVARIANT
|
||||
ARG VERSION=13.35
|
||||
ARG VERSION=13.40
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
COPY --chmod=755 releases/check-telemetry.py /tmp/check-telemetry.py
|
||||
@@ -293,7 +293,7 @@ LABEL org.opencontainers.image.source="https://github.com/wekan/wekan"
|
||||
ENV \
|
||||
DEBUG=false \
|
||||
DDP_TRANSPORT=sockjs \
|
||||
NODE_VERSION=v26.13.1 \
|
||||
NODE_VERSION=v26.14.0 \
|
||||
METEOR_RELEASE=METEOR@3.6.1 \
|
||||
USE_EDGE=false \
|
||||
NPM_VERSION=12.2.3 \
|
||||
@@ -563,6 +563,7 @@ COPY --chmod=644 releases/ferretdb/recovery-bridge.mjs /build/recovery-bridge.mj
|
||||
# serve the "waiting for database" page instead of leaving the web port unbound
|
||||
# for a reverse proxy to time out on.
|
||||
COPY --chmod=644 releases/ferretdb/db-ready.mjs /build/db-ready.mjs
|
||||
COPY --chmod=644 releases/ferretdb/healthcheck.mjs /build/healthcheck.mjs
|
||||
|
||||
# UCS runs this same image with an explicit migration command,
|
||||
# `/usr/local/bin/node /opt/ucs-migration/start.mjs`. Only that temporary
|
||||
@@ -575,6 +576,7 @@ COPY releases/nextcloud/capability.json /build/nextcloud-exapp-capability.json
|
||||
USER wekan
|
||||
ENV PORT=8080
|
||||
EXPOSE $PORT
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 CMD ["/usr/local/bin/node", "/build/healthcheck.mjs"]
|
||||
STOPSIGNAL SIGKILL
|
||||
WORKDIR /build
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
appId: wekan-public/apps/77b94f60-dec9-0136-304e-16ff53095928
|
||||
appVersion: "v13.35.0"
|
||||
appVersion: "v13.40.0"
|
||||
files:
|
||||
userUploads:
|
||||
- README.md
|
||||
|
||||
@@ -15,12 +15,12 @@ the changelog only says what changed.
|
||||
|
||||
`tests/todoFile.test.cjs` checks this shape.
|
||||
|
||||
**Where things are** (2026-11-24). Each repository's own TODO.md has the
|
||||
**Where things are** (2026-11-28). Each repository's own TODO.md has the
|
||||
details; WeKan's are below.
|
||||
|
||||
| Repository | In progress, or not verified yet | Needs a person |
|
||||
| --- | --- | --- |
|
||||
| WeKan | - | The Firefox and WebKit stages, on a host; push the security fixes of ferretdb-test, hx, minio-metadata, trello-attachments-downloader and the caddy plugins; Dependabot off in 16 repositories; the dev-only glob 13 |
|
||||
| WeKan | Import, Export and Sync of OpenProject and Jira (planned) | The Firefox and WebKit stages, on a host; push the security fixes of ferretdb-test, hx, minio-metadata, trello-attachments-downloader and the caddy plugins; Dependabot off in 16 repositories |
|
||||
| [gitea-patches](https://github.com/wekan/gitea-patches/blob/main/TODO.md) | 90 new upstream Gitea strings not yet in Finnish | Run "Migrate all Gitea to backups" with `--dry-run` first |
|
||||
| [omi](https://github.com/wekan/omi/blob/main/TODO.md) | Delete and import not yet run on a real Gitea folder or against the real GitHub; the import has no reactions, review comments, LFS, Actions or fork branches | Stop and back up Gitea before the first real write |
|
||||
| [welite](https://github.com/wekan/welite/blob/main/TODO.md) | WeKan data folders: no zip archives, GridFS or object-storage downloads, avatars or cross-target builds yet; retro-browser acceptance | - |
|
||||
@@ -67,17 +67,6 @@ details; WeKan's are below.
|
||||
- wekango: confirm the review of the new mongo-tools license notices (only
|
||||
permissive attributions changed).
|
||||
|
||||
## Needs a maintainer decision on the intended contract
|
||||
|
||||
|
||||
- WeKan's dev-only `glob` 13.0.6 under `@babel/cli`, which builds the vendored
|
||||
`npm-packages/`, is in the range of GHSA-3g3m-2fjr-6pw4 (medium,
|
||||
CVE-2026-118773: 9.0.0 to 14.0.1). The bundle's own `glob` is 14.0.3, which
|
||||
is patched. `@babel/cli` 8.0.6 asks for `^13.0.0`, and the advisory names no
|
||||
patched 13 (13.0.7 is inside its range), so the fix is an override to glob
|
||||
14 - a major version over what `@babel/cli` asks for - or waiting for a
|
||||
`@babel/cli` that takes 14.
|
||||
|
||||
## Repositories left out, and why
|
||||
|
||||
- wepica: too old; its failing Dependabot runs are not fixed (decided
|
||||
@@ -97,14 +86,64 @@ details; WeKan's are below.
|
||||
WeKan's Card Settings specs toggle them in desktop Chromium and pass; it
|
||||
needs the reporter's details to reproduce - which popup, whether as a board
|
||||
admin, and the browser console's error. The comment's spacing is fixed.)
|
||||
- The WebKit stage cannot run in the Flatpak sandbox: MiniBrowser needs its own
|
||||
sandbox, and turning that off is not allowed there. Run it on a host.
|
||||
- Firefox cannot run in the Flatpak sandbox either: Playwright's Firefox 159
|
||||
needs NSS 3.126, newer than the runtime's, and with a newer NSS supplied it
|
||||
still crashes, as its own sandbox cannot create a user namespace there -
|
||||
the same as WebKit, and turning that sandbox off is not allowed. Run the Firefox stage on a host -
|
||||
in particular the Shop, webhooks, Admin Panel addresses and accessibility
|
||||
(47) specs, which pass in Chromium.
|
||||
- Finish the full Firefox and WebKit Playwright verification with the Docker
|
||||
backend on the host. The Firefox run on 2026-12-02 reported 4,000 passed,
|
||||
15 failed and 224 skipped. The 15 failures passed targeted reruns after
|
||||
the relevant fixes. A full Firefox run on the updated checkout and the
|
||||
full WebKit results are still pending.
|
||||
|
||||
## Feature requests: Import, Export and Sync with other programs
|
||||
|
||||
Asked on 2026-11-28. One Import, Export and Sync of OpenProject and Jira with
|
||||
WeKan, so that all their data can be imported and shown in WeKan.
|
||||
Completed import, export and sync changes are recorded in the
|
||||
[Upcoming changelog](CHANGELOG-big.md#upcoming-wekan--release).
|
||||
|
||||
- **One Import / Export / Sync in every hamburger menu** (asked 2026-11-28):
|
||||
the swimlane's, the list's, the card's and the board's menus each offer
|
||||
Import, Export and Sync with any program that can, choosing the program and
|
||||
typing its API key, token or password in the popup. One capability catalog
|
||||
should drive the available operations and directions. The scoped file
|
||||
catalog now supplies import formats and export scope and extensions.
|
||||
List Sync and its settings share provider directions and API project
|
||||
lookup. Scoped API import and direct Jira and OpenProject export use the
|
||||
provider catalog. New API providers and additional Sync targets still
|
||||
need to use the shared definitions.
|
||||
- **Other file-only providers** still need API import and Sync using
|
||||
stable external task IDs. See
|
||||
[the API package review](docs/Features/Board-Sidebar/Board-Settings/Import-Export/Sync.md#api-packages-on-npm-checked-2026-11-28).
|
||||
- **Notion** still needs durable resumption for bulk imports above the 256 MiB decoded
|
||||
or 64 MiB encoded server checkpoint budget, support for List Sync Markdown
|
||||
above 6 MiB per page and one-time imports above 7 MiB.
|
||||
- **Jira Cloud and Data Center** still need additional rich formatting
|
||||
in write-back, including other Jira Cloud document structures and Data Center
|
||||
macro combinations. More writable
|
||||
fields in List Sync also remain open.
|
||||
- **More Jira project records**: recover historical commitments that cannot be reconstructed from imported issues,
|
||||
and preserve other project-wide records.
|
||||
- **Export to the service**: the OpenProject export menu creates work
|
||||
packages with their title, optional description, start and due dates,
|
||||
writable work estimates and progress, parent relationships, and supported
|
||||
dependencies between selected cards. The export can also match one card
|
||||
assignee to an eligible destination user. Responsible and other person
|
||||
fields remain open.
|
||||
The Jira export menu creates issues with a title, optional description,
|
||||
due dates, supported start dates, labels, matching priorities and versions, Jira component assignments,
|
||||
and mapped time estimates in the
|
||||
selected project and issue type.
|
||||
It creates supported dependency links and exports first-level children
|
||||
using the selected Jira subtask type. Support more fields in both services.
|
||||
Verify the Jira Cloud hierarchy export against a live project with levels
|
||||
above Epic.
|
||||
- **Sync more than a list**: add swimlane and single-card Sync targets,
|
||||
each with Sync Settings and History in its own menu. Support additional
|
||||
custom fields and people mappings.
|
||||
- **Two-way sync** for more Jira and OpenProject fields, as GitLab's write-back
|
||||
(`models/lib/listSyncWriteBack.js`).
|
||||
- **The rest of their data shown in WeKan**: other OpenProject work package
|
||||
fields in Sync and custom field types without a WeKan equivalent remain open.
|
||||
Each remaining record is imported, shown on the card or board, exported
|
||||
back, and kept by Sync.
|
||||
|
||||
## Need accounts on the tools, or a running copy of one
|
||||
|
||||
@@ -120,6 +159,12 @@ color, Blocked), and a WeKan board's every field by
|
||||
`tests/wekanCardFields.test.cjs`. What is left needs what this checkout does
|
||||
not have:
|
||||
|
||||
- Jira Server and Data Center, checked with a real instance: WeKan's Jira
|
||||
import was compared on 2026-11-28 with OpenProject's Jira Migrator
|
||||
(opf/openproject `app/workers/import/jira_*`, which reads
|
||||
`/rest/api/2/search?fields=*all&expand=changelog`) without one, and
|
||||
OpenProject's Sync against its documented API v3 without a running copy;
|
||||
what is not imported yet is in the feature requests above.
|
||||
- Each tool's newest release, checked with a real export file of it: Planner,
|
||||
Wrike, Teamwork, Businessmap, MeisterTask, Quire and Jira - the
|
||||
proprietary ones, whose current export is only seen with an account
|
||||
|
||||
@@ -18,6 +18,8 @@ syntax = """=== Wekan API Python CLI: Shows IDs for addcard ===
|
||||
# AUTHORID is USERID that writes card or custom field.
|
||||
If *nix: chmod +x api.py => ./api.py users
|
||||
Syntax:
|
||||
python3 api.py request METHOD /PATH [OPTIONS] # Call any WeKan HTTP API route
|
||||
python3 api.py request --help # Request options
|
||||
User API:
|
||||
python3 api.py user # Current user and list of current user boards
|
||||
python3 api.py users # All users
|
||||
@@ -29,8 +31,9 @@ If *nix: chmod +x api.py => ./api.py users
|
||||
python3 api.py swimlanes BOARDID # Swimlanes of BOARDID
|
||||
python3 api.py lists BOARDID # Lists of BOARDID
|
||||
python3 api.py list BOARDID LISTID # Info of LISTID
|
||||
python3 api.py createlist BOARDID LISTTITLE # Create list
|
||||
python3 api.py createlist BOARDID LISTTITLE [SWIMLANEID] # Omit for default swimlane or pass '' to share across swimlanes
|
||||
python3 api.py editlist BOARDID LISTID NEWLISTTITLE # Edit list title
|
||||
python3 api.py editlistswimlane BOARDID LISTID SWIMLANEID # Pass '' to share across swimlanes
|
||||
python3 api.py editlistcolor BOARDID LISTID COLOR (Color available: `white`, `green`, `yellow`, `orange`, `red`, `purple`, `blue`, `sky`, `lime`, `pink`, `black`, `silver`, `peachpuff`, `crimson`, `plum`, `darkgreen`, `slateblue`, `magenta`, `gold`, `navy`, `gray`, `saddlebrown`, `paleturquoise`, `mistyrose`, `indigo`) # Edit list color
|
||||
python3 api.py addcard AUTHORID BOARDID SWIMLANEID LISTID CARDTITLE CARDDESCRIPTION
|
||||
python3 api.py editcard BOARDID LISTID CARDID NEWCARDTITLE NEWCARDDESCRIPTION
|
||||
@@ -154,6 +157,137 @@ If *nix: chmod +x api.py => ./api.py users
|
||||
python3 api.py editallteamfeature FIELD true|false # Set one team feature on ALL teams
|
||||
"""
|
||||
|
||||
def request_with_revision(method, url, resource_url, headers, **options):
|
||||
current = requests.get(resource_url, headers=headers)
|
||||
current.raise_for_status()
|
||||
revision = current.headers.get('ETag')
|
||||
if not revision:
|
||||
raise RuntimeError('The resource response did not include a revision (ETag)')
|
||||
response = requests.request(method, url, headers={**headers, 'If-Match': revision}, **options)
|
||||
response.raise_for_status()
|
||||
return response
|
||||
|
||||
|
||||
def put_with_revision(url, resource_url, headers, **options):
|
||||
return request_with_revision('PUT', url, resource_url, headers, **options)
|
||||
|
||||
|
||||
def run_api_request(argv, default_url, default_username, default_password):
|
||||
import argparse
|
||||
import os
|
||||
from contextlib import ExitStack
|
||||
from urllib.parse import urlsplit
|
||||
|
||||
parser = argparse.ArgumentParser(prog='api.py request')
|
||||
parser.add_argument('method', help='HTTP method, such as GET, POST, PUT, PATCH or DELETE')
|
||||
parser.add_argument('path', help='Path on the WeKan server, including any query string')
|
||||
parser.add_argument('--url', default=os.environ.get('WEKAN_URL', default_url), help='WeKan base URL')
|
||||
parser.add_argument('--no-auth', action='store_true', help='Skip automatic authentication')
|
||||
parser.add_argument('-H', '--header', action='append', default=[], metavar='NAME: VALUE')
|
||||
parser.add_argument('--revision-from', metavar='PATH', help='Read an ETag from this path and send it as If-Match')
|
||||
body = parser.add_mutually_exclusive_group()
|
||||
body.add_argument('--json', metavar='JSON')
|
||||
body.add_argument('--json-file', metavar='PATH', help='Send a JSON file, or - for stdin')
|
||||
body.add_argument('--data-file', metavar='PATH', help='Send raw bytes from a file, or - for stdin')
|
||||
parser.add_argument('--form', action='append', default=[], metavar='NAME=VALUE')
|
||||
parser.add_argument('--file', action='append', default=[], metavar='NAME=PATH', help='Upload a multipart file')
|
||||
parser.add_argument('-o', '--output', metavar='PATH', help='Save the successful response body to a file')
|
||||
parser.add_argument('--show-headers', action='store_true', help='Print response status and headers to stderr')
|
||||
args = parser.parse_args(argv)
|
||||
|
||||
base = args.url.rstrip('/')
|
||||
origin = urlsplit(base)
|
||||
if origin.scheme not in ('http', 'https') or not origin.hostname or origin.username is not None or origin.query or origin.fragment:
|
||||
parser.error('WeKan URL must be an HTTP(S) base URL without credentials, a query, or a fragment')
|
||||
|
||||
def endpoint(path):
|
||||
if not path.startswith('/') or path.startswith('//') or '\\' in path or '#' in path or any(ord(c) < 32 for c in path):
|
||||
parser.error('paths must start with one slash and point to the WeKan server')
|
||||
return base + path
|
||||
|
||||
url = endpoint(args.path)
|
||||
revision_url = endpoint(args.revision_from) if args.revision_from else None
|
||||
headers = requests.structures.CaseInsensitiveDict()
|
||||
for header in args.header:
|
||||
name, separator, value = header.partition(':')
|
||||
if not separator or not name.strip():
|
||||
parser.error('--header requires NAME: VALUE')
|
||||
headers[name.strip()] = value.strip()
|
||||
if revision_url and 'If-Match' in headers:
|
||||
parser.error('use either --revision-from or an explicit If-Match header')
|
||||
if (args.form or args.file) and any(value is not None for value in (args.json, args.json_file, args.data_file)):
|
||||
parser.error('form and file uploads cannot be combined with a JSON or raw body')
|
||||
|
||||
def fields(items):
|
||||
result = []
|
||||
for item in items:
|
||||
key, separator, value = item.partition('=')
|
||||
if not key or not separator:
|
||||
parser.error('form fields and file parts require NAME=VALUE')
|
||||
result.append((key, value))
|
||||
return result
|
||||
|
||||
try:
|
||||
with ExitStack() as stack:
|
||||
session = stack.enter_context(requests.Session())
|
||||
form = fields(args.form)
|
||||
files = [(name, stack.enter_context(open(path, 'rb'))) for name, path in fields(args.file)]
|
||||
options = {}
|
||||
if args.json is not None:
|
||||
options['data'] = json.dumps(json.loads(args.json)).encode('utf-8')
|
||||
headers.setdefault('Content-Type', 'application/json')
|
||||
elif args.json_file is not None:
|
||||
source = sys.stdin if args.json_file == '-' else stack.enter_context(open(args.json_file, encoding='utf-8'))
|
||||
options['data'] = json.dumps(json.load(source)).encode('utf-8')
|
||||
headers.setdefault('Content-Type', 'application/json')
|
||||
elif args.data_file is not None:
|
||||
options['data'] = sys.stdin.buffer if args.data_file == '-' else stack.enter_context(open(args.data_file, 'rb'))
|
||||
elif form or files:
|
||||
options.update(data=form, files=files)
|
||||
|
||||
if 'Authorization' not in headers and not args.no_auth:
|
||||
token = os.environ.get('WEKAN_API_TOKEN')
|
||||
if not token:
|
||||
with session.post(base + '/users/login', json={
|
||||
'username': os.environ.get('WEKAN_USERNAME', default_username),
|
||||
'password': os.environ.get('WEKAN_PASSWORD', default_password),
|
||||
}, allow_redirects=False, timeout=30) as login:
|
||||
if not 200 <= login.status_code < 300:
|
||||
raise ValueError(f'WeKan login failed with HTTP {login.status_code}')
|
||||
token = login.json().get('token')
|
||||
if not token:
|
||||
raise ValueError('WeKan login did not return a token')
|
||||
headers['Authorization'] = 'Bearer ' + token
|
||||
|
||||
if revision_url:
|
||||
revision_headers = {name: value for name, value in headers.items()
|
||||
if name.lower() not in ('content-type', 'content-length')}
|
||||
with session.get(revision_url, headers=revision_headers, allow_redirects=False, timeout=30) as current:
|
||||
if not 200 <= current.status_code < 300:
|
||||
raise ValueError(f'Revision read failed with HTTP {current.status_code}')
|
||||
if 'ETag' not in current.headers:
|
||||
raise ValueError('The revision response did not include an ETag')
|
||||
headers['If-Match'] = current.headers['ETag']
|
||||
|
||||
with session.request(args.method.upper(), url, headers=headers, stream=True,
|
||||
allow_redirects=False, timeout=30, **options) as response:
|
||||
if args.show_headers:
|
||||
print(f'HTTP {response.status_code}', file=sys.stderr)
|
||||
for name, value in response.headers.items():
|
||||
print(f'{name}: {value}', file=sys.stderr)
|
||||
successful = 200 <= response.status_code < 300
|
||||
target = stack.enter_context(open(args.output, 'wb')) if successful and args.output else sys.stdout.buffer
|
||||
if not successful:
|
||||
print(f'WeKan request returned HTTP {response.status_code}', file=sys.stderr)
|
||||
target = sys.stderr.buffer
|
||||
for chunk in response.iter_content(chunk_size=65536):
|
||||
target.write(chunk)
|
||||
return 0 if successful else 1
|
||||
except (OSError, ValueError, requests.RequestException) as error:
|
||||
print(f'WeKan request failed: {error}', file=sys.stderr)
|
||||
return 1
|
||||
|
||||
|
||||
if arguments == 0:
|
||||
print(syntax)
|
||||
sys.exit()
|
||||
@@ -175,6 +309,9 @@ password = 'testtest'
|
||||
|
||||
wekanurl = 'http://localhost:4000/'
|
||||
|
||||
if sys.argv[1] == 'request':
|
||||
sys.exit(run_api_request(sys.argv[2:], wekanurl, username, password))
|
||||
|
||||
# ------- SETTINGS END -------------
|
||||
|
||||
"""
|
||||
@@ -217,6 +354,11 @@ python3 api.py createlist dYZ 'Test'
|
||||
|
||||
{"_id":"7Kp"}
|
||||
|
||||
# Create a shared list, share an existing list, or bind it to a swimlane:
|
||||
python3 api.py createlist dYZ 'Shared tasks' ''
|
||||
python3 api.py editlistswimlane dYZ 7Kp ''
|
||||
python3 api.py editlistswimlane dYZ 7Kp Jiv
|
||||
|
||||
# python3 api.py addcard AUTHORID BOARDID SWIMLANEID LISTID CARDTITLE CARDDESCRIPTION
|
||||
|
||||
python3 api.py addcard ppg dYZ Jiv 7Kp 'Test card' 'Test description'
|
||||
@@ -322,7 +464,7 @@ if arguments == 8:
|
||||
if new_card_id:
|
||||
edcard = wekanurl + apiboards + boardid + s + l + s + listid + s + cs + s + new_card_id
|
||||
put_data = {'labelIds': labelIds}
|
||||
requests.put(edcard, data=put_data, headers=headers)
|
||||
put_with_revision(edcard, wekanurl + '/api/cards/' + cardid, headers, data=put_data)
|
||||
print("=== EDIT CARD ===\n")
|
||||
body = requests.get(edcard, headers=headers)
|
||||
data2 = body.text.replace('}', "}\n")
|
||||
@@ -365,7 +507,7 @@ if arguments == 6:
|
||||
print(edcard)
|
||||
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
|
||||
put_data = {'title': '{}'.format(newcardtitle), 'description': '{}'.format(newcarddescription)}
|
||||
requests.put(edcard, data=put_data, headers=headers)
|
||||
put_with_revision(edcard, wekanurl + '/api/cards/' + cardid, headers, data=put_data)
|
||||
print("=== EDIT CARD ===\n")
|
||||
body = requests.get(edcard, headers=headers)
|
||||
data2 = body.text.replace('}',"}\n")
|
||||
@@ -385,7 +527,7 @@ if arguments == 6:
|
||||
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
|
||||
post_data = {'_id': '{}'.format(customfieldid), 'value': '{}'.format(newcustomfieldvalue)}
|
||||
#print(post_data)
|
||||
body = requests.post(edfield, data=post_data, headers=headers)
|
||||
body = request_with_revision('POST', edfield, wekanurl + '/api/cards/' + cardid, headers, data=post_data)
|
||||
print("=== EDIT CUSTOMFIELD ===\n")
|
||||
data2 = body.text.replace('}',"}\n")
|
||||
print(data2)
|
||||
@@ -404,7 +546,7 @@ if arguments == 5:
|
||||
print(edcard)
|
||||
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
|
||||
put_data = {'labelIds': labelIds}
|
||||
requests.put(edcard, data=put_data, headers=headers)
|
||||
put_with_revision(edcard, wekanurl + '/api/cards/' + cardid, headers, data=put_data)
|
||||
print("=== ADD LABEL ===\n")
|
||||
body = requests.get(edcard, headers=headers)
|
||||
data2 = body.text.replace('}',"}\n")
|
||||
@@ -430,7 +572,7 @@ if arguments == 5:
|
||||
print(edcard)
|
||||
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
|
||||
put_data = {'color': '{}'.format(newcolor)}
|
||||
requests.put(edcard, data=put_data, headers=headers)
|
||||
put_with_revision(edcard, wekanurl + '/api/cards/' + cardid, headers, data=put_data)
|
||||
print("=== EDIT CARD COLOR ===\n")
|
||||
body = requests.get(edcard, headers=headers)
|
||||
data2 = body.text.replace('}', "}\n")
|
||||
@@ -449,13 +591,20 @@ if arguments >= 4:
|
||||
print(edlist)
|
||||
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
|
||||
put_data = {'title': '{}'.format(newlisttitle)}
|
||||
requests.put(edlist, data=put_data, headers=headers)
|
||||
put_with_revision(edlist, edlist, headers, data=put_data)
|
||||
print("=== EDIT LIST ===\n")
|
||||
body = requests.get(edlist, headers=headers)
|
||||
data2 = body.text.replace('}', "}\n")
|
||||
print(data2)
|
||||
# ------- EDIT LIST END -----------
|
||||
|
||||
if sys.argv[1] == 'editlistswimlane':
|
||||
boardid, listid, swimlaneid = sys.argv[2:5]
|
||||
url = wekanurl + apiboards + boardid + s + l + s + listid
|
||||
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
|
||||
response = put_with_revision(url, url, headers, json={'swimlaneId': swimlaneid})
|
||||
print(response.text)
|
||||
|
||||
if sys.argv[1] == 'editlistcolor':
|
||||
|
||||
# ------- EDIT LIST COLOR START -----------
|
||||
@@ -475,7 +624,7 @@ if arguments >= 4:
|
||||
print(edlist)
|
||||
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
|
||||
put_data = {'color': '{}'.format(newcolor)}
|
||||
requests.put(edlist, data=put_data, headers=headers)
|
||||
put_with_revision(edlist, edlist, headers, data=put_data)
|
||||
print("=== EDIT LIST COLOR ===\n")
|
||||
body = requests.get(edlist, headers=headers)
|
||||
data2 = body.text.replace('}', "}\n")
|
||||
@@ -593,6 +742,22 @@ if arguments >= 4:
|
||||
print("Checklist Info:")
|
||||
print(checklist_info)
|
||||
|
||||
if arguments in (3, 4) and sys.argv[1] == 'createlist':
|
||||
|
||||
# ------- CREATE LIST START -----------
|
||||
boardid = sys.argv[2]
|
||||
listtitle = sys.argv[3]
|
||||
list = wekanurl + apiboards + boardid + s + l
|
||||
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
|
||||
post_data = {'title': '{}'.format(listtitle)}
|
||||
if arguments >= 4:
|
||||
post_data['swimlaneId'] = sys.argv[4]
|
||||
body = requests.post(list, json=post_data, headers=headers)
|
||||
body.raise_for_status()
|
||||
print("=== CREATE LIST ===\n")
|
||||
print(body.text)
|
||||
# ------- CREATE LIST END -----------
|
||||
|
||||
if arguments == 3:
|
||||
|
||||
if sys.argv[1] == 'editboardtitle':
|
||||
@@ -606,7 +771,7 @@ if arguments == 3:
|
||||
|
||||
post_data = {'title': boardtitle}
|
||||
|
||||
body = requests.put(edboardtitle, json=post_data, headers=headers)
|
||||
body = put_with_revision(edboardtitle, wekanurl + apiboards + boardid, headers, json=post_data)
|
||||
print("=== EDIT BOARD TITLE ===\n")
|
||||
#body = requests.get(edboardtitle, headers=headers)
|
||||
data2 = body.text.replace('}',"}\n")
|
||||
@@ -643,19 +808,6 @@ if arguments == 3:
|
||||
|
||||
# ------- COPY BOARD END -----------
|
||||
|
||||
if sys.argv[1] == 'createlist':
|
||||
|
||||
# ------- CREATE LIST START -----------
|
||||
boardid = sys.argv[2]
|
||||
listtitle = sys.argv[3]
|
||||
list = wekanurl + apiboards + boardid + s + l
|
||||
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
|
||||
post_data = {'title': '{}'.format(listtitle)}
|
||||
body = requests.post(list, data=post_data, headers=headers)
|
||||
print("=== CREATE LIST ===\n")
|
||||
print(body.text)
|
||||
# ------- CREATE LIST END -----------
|
||||
|
||||
if sys.argv[1] == 'list':
|
||||
|
||||
# ------- LIST OF BOARD START -----------
|
||||
@@ -1417,7 +1569,7 @@ if arguments >= 1:
|
||||
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey), 'Content-Type': 'application/json'}
|
||||
# Empty array clears the field; send as JSON so the array type is preserved.
|
||||
put_data = {field: ids if ids else []}
|
||||
body = requests.put(edcard, json=put_data, headers=headers)
|
||||
body = put_with_revision(edcard, wekanurl + '/api/cards/' + cardid, headers, json=put_data)
|
||||
print("=== SET CARD {} ===\n".format(field.upper()))
|
||||
print(body.text)
|
||||
# ------- SET CARD MEMBERS / ASSIGNEES END -----------
|
||||
@@ -1446,7 +1598,7 @@ if arguments >= 1:
|
||||
edcard = wekanurl + apiboards + boardid + s + l + s + listid + s + cs + s + cardid
|
||||
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
|
||||
put_data = {datemap[datetype]: datevalue}
|
||||
requests.put(edcard, data=put_data, headers=headers)
|
||||
put_with_revision(edcard, wekanurl + '/api/cards/' + cardid, headers, data=put_data)
|
||||
print("=== SET CARD DATE {} ===\n".format(datetype.upper()))
|
||||
print(body.text)
|
||||
# ------- SET CARD DATE END -----------
|
||||
@@ -1467,7 +1619,7 @@ if arguments >= 1:
|
||||
# NOTE: this REPLACES the card's labels. Bulk add/remove (merge) is not yet
|
||||
# implemented server-side, see Issue #5819 in CHANGELOG-big.md "Upcoming".
|
||||
put_data = {'labelIds': labelids if labelids else []}
|
||||
body = requests.put(edcard, json=put_data, headers=headers)
|
||||
body = put_with_revision(edcard, wekanurl + '/api/cards/' + cardid, headers, json=put_data)
|
||||
print("=== SET CARD LABELS ===\n")
|
||||
print(body.text)
|
||||
# ------- SET CARD LABELS END -----------
|
||||
@@ -1490,7 +1642,7 @@ if arguments >= 1:
|
||||
'newSwimlaneId': newswimlaneid,
|
||||
'newListId': newlistid,
|
||||
}
|
||||
requests.put(edcard, data=put_data, headers=headers)
|
||||
put_with_revision(edcard, wekanurl + '/api/cards/' + cardid, headers, data=put_data)
|
||||
print("=== MOVE CARD ===\n")
|
||||
print(body.text)
|
||||
# ------- MOVE CARD END -----------
|
||||
@@ -1888,7 +2040,7 @@ if arguments >= 5 and sys.argv[1] == 'setcardcomplete':
|
||||
dueComplete = sys.argv[5]
|
||||
url = wekanurl + apiboards + boardid + s + l + s + listid + s + cs + s + cardid
|
||||
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey), 'Content-Type': 'application/json'}
|
||||
body = requests.put(url, json={'dueComplete': dueComplete}, headers=headers)
|
||||
body = put_with_revision(url, wekanurl + '/api/cards/' + cardid, headers, json={'dueComplete': dueComplete})
|
||||
print(body.text)
|
||||
|
||||
if arguments >= 5 and sys.argv[1] == 'setcardstickers':
|
||||
@@ -1898,7 +2050,7 @@ if arguments >= 5 and sys.argv[1] == 'setcardstickers':
|
||||
stickers = json.loads(sys.argv[5])
|
||||
url = wekanurl + apiboards + boardid + s + l + s + listid + s + cs + s + cardid
|
||||
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey), 'Content-Type': 'application/json'}
|
||||
body = requests.put(url, json={'stickers': stickers}, headers=headers)
|
||||
body = put_with_revision(url, wekanurl + '/api/cards/' + cardid, headers, json={'stickers': stickers})
|
||||
print(body.text)
|
||||
|
||||
if arguments >= 5 and sys.argv[1] == 'setcardlocations':
|
||||
@@ -1908,7 +2060,7 @@ if arguments >= 5 and sys.argv[1] == 'setcardlocations':
|
||||
locations = json.loads(sys.argv[5])
|
||||
url = wekanurl + apiboards + boardid + s + l + s + listid + s + cs + s + cardid
|
||||
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey), 'Content-Type': 'application/json'}
|
||||
body = requests.put(url, json={'locations': locations}, headers=headers)
|
||||
body = put_with_revision(url, wekanurl + '/api/cards/' + cardid, headers, json={'locations': locations})
|
||||
print(body.text)
|
||||
|
||||
# ------- CARD STICKERS / LOCATIONS / COMPLETE END -----------
|
||||
@@ -2040,10 +2192,10 @@ TEXT_IMPORT_SOURCES = {'markdown', 'todotxt', 'taskwarrior', 'focalboard', 'todo
|
||||
'linear', 'ticktick', 'clickup', 'nullboard', 'pivotal', 'redmine', 'superproductivity',
|
||||
'quire', 'orgmode', 'leo', 'opml', 'vikunja', 'notion', 'plane',
|
||||
'mail', 'ical', 'mattermost', 'whatsapp', 'evernote', 'slack', 'googletakeout', 'rocketchat', 'fizzy',
|
||||
'azuredevops', 'mslists', 'msproject'}
|
||||
'azuredevops', 'mslists', 'msproject', 'wordpress', 'blogger'}
|
||||
|
||||
def import_document(source, filepath):
|
||||
import base64, csv, io, os
|
||||
import base64, csv, io, os, re
|
||||
ext = os.path.splitext(filepath)[1].lower()
|
||||
if source in EXCEL_IMPORT_SOURCES or (source == 'plane' and ext == '.xlsx'):
|
||||
with open(filepath, 'rb') as f:
|
||||
@@ -2058,15 +2210,29 @@ def import_document(source, filepath):
|
||||
with open(filepath, encoding='utf-8-sig') as f:
|
||||
text = f.read()
|
||||
if source == 'csv':
|
||||
# As the import page: a file whose first line has a tab is read with
|
||||
# tabs, so a value with a comma in it stays one value; otherwise the
|
||||
# separator with more of it on the first line, a semicolon or a comma.
|
||||
first = text.split('\n', 1)[0]
|
||||
if '\t' in first:
|
||||
delimiter = '\t'
|
||||
else:
|
||||
delimiter = ';' if first.count(';') > first.count(',') else ','
|
||||
return [row for row in csv.reader(io.StringIO(text), delimiter=delimiter)]
|
||||
# Match the browser's first-record separator detection.
|
||||
quoted = False
|
||||
commas = semicolons = 0
|
||||
delimiter = ','
|
||||
records = re.sub(r'^(?:[ \t]*(?:\r\n|\n|\r))+', '', text)
|
||||
for char in records:
|
||||
if char == '"':
|
||||
quoted = not quoted
|
||||
if quoted:
|
||||
continue
|
||||
if char in '\r\n':
|
||||
break
|
||||
if char == '\t':
|
||||
delimiter = '\t'
|
||||
break
|
||||
if char == ',':
|
||||
commas += 1
|
||||
if char == ';':
|
||||
semicolons += 1
|
||||
if delimiter != '\t' and semicolons > commas:
|
||||
delimiter = ';'
|
||||
return [row for row in csv.reader(io.StringIO(records), delimiter=delimiter)
|
||||
if any(cell.strip() for cell in row)]
|
||||
if source in TEXT_IMPORT_SOURCES:
|
||||
return text
|
||||
return json.loads(text)
|
||||
@@ -2102,24 +2268,57 @@ elif arguments >= 3 and sys.argv[1] == 'importboardfrom':
|
||||
# board - what the import page's "Import many boards" does. --split makes one
|
||||
# board per project (per swimlane) of each file, for the generalized importer.
|
||||
# python3 api.py importboardsfrom SOURCE [--split] FILE_OR_DIR ...
|
||||
def many_import_files(source, paths):
|
||||
import os, zipfile
|
||||
def many_import_files(source, paths, extraction_root):
|
||||
import os, tempfile, zipfile, zlib
|
||||
files = []
|
||||
for path in paths:
|
||||
if os.path.isdir(path):
|
||||
for root, _, names in os.walk(path):
|
||||
files.extend(os.path.join(root, name) for name in sorted(names) if not name.startswith('.'))
|
||||
elif path.lower().endswith('.zip') and source not in ZIP_IMPORT_SOURCES and source != 'wekan':
|
||||
import tempfile
|
||||
target = tempfile.mkdtemp(prefix='wekan-import-')
|
||||
with zipfile.ZipFile(path) as archive:
|
||||
for info in archive.infolist():
|
||||
elif path.lower().endswith('.zip'):
|
||||
try:
|
||||
opened = zipfile.ZipFile(path)
|
||||
except (OSError, zipfile.BadZipFile) as error:
|
||||
print('{}: not imported: {}'.format(path, error))
|
||||
continue
|
||||
with opened as archive:
|
||||
def board_json(info):
|
||||
name = info.filename
|
||||
return (not info.is_dir() and '/' not in name and '\\' not in name
|
||||
and not name.startswith('.') and name.lower().endswith('.json'))
|
||||
|
||||
entries = archive.infolist()
|
||||
if source != 'wekan' and source in ZIP_IMPORT_SOURCES:
|
||||
visible = [info for info in entries if not info.is_dir()
|
||||
and not any(part.startswith('.') or part == '__MACOSX'
|
||||
for part in info.filename.split('/'))
|
||||
and info.filename != 'skipped.txt']
|
||||
board_zips = [info for info in visible if '/' not in info.filename
|
||||
and '\\' not in info.filename and info.filename.lower().endswith('.zip')]
|
||||
bulk_zip = (os.path.basename(path).lower() == 'wekan-boards-{}.zip'.format(source)
|
||||
or bool(visible) and len(visible) == len(board_zips))
|
||||
if not bulk_zip:
|
||||
files.append(path)
|
||||
continue
|
||||
entries = board_zips
|
||||
if source == 'wekan':
|
||||
boards = [info for info in entries if board_json(info)]
|
||||
if len(boards) <= 1 and any(info.filename.split('/')[-1] == 'wekan.json' for info in entries):
|
||||
files.append(path)
|
||||
continue
|
||||
entries = boards
|
||||
target = tempfile.mkdtemp(dir=extraction_root)
|
||||
for info in entries:
|
||||
name = info.filename
|
||||
if info.is_dir() or name.startswith('__MACOSX/') or os.path.basename(name).startswith('.'):
|
||||
continue
|
||||
if os.path.isabs(name) or '..' in name.split('/'):
|
||||
continue
|
||||
archive.extract(info, target)
|
||||
try:
|
||||
archive.extract(info, target)
|
||||
except (OSError, RuntimeError, zipfile.BadZipFile, zlib.error) as error:
|
||||
print('{}/{}: not imported: {}'.format(path, name, error))
|
||||
continue
|
||||
files.append(os.path.join(target, name))
|
||||
else:
|
||||
files.append(path)
|
||||
@@ -2132,18 +2331,20 @@ if arguments >= 3 and sys.argv[1] == 'importboardsfrom':
|
||||
paths = [path for path in rest if path != '--split']
|
||||
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey), 'Content-Type': 'application/json'}
|
||||
url = wekanurl + apiboards + 'import/' + source
|
||||
for filepath in many_import_files(source, paths):
|
||||
try:
|
||||
if source == 'wekan' and filepath.lower().endswith('.zip'):
|
||||
print('{}: {}'.format(filepath, post_wekan_zip(filepath).text))
|
||||
continue
|
||||
body = {'board': import_document(source, filepath)}
|
||||
if split:
|
||||
body['splitBy'] = 'swimlane'
|
||||
response = requests.post(url, headers=headers, json=body)
|
||||
print('{}: {}'.format(filepath, response.text))
|
||||
except Exception as error:
|
||||
print('{}: not imported: {}'.format(filepath, error))
|
||||
from tempfile import TemporaryDirectory
|
||||
with TemporaryDirectory(prefix='wekan-import-') as extraction_root:
|
||||
for filepath in many_import_files(source, paths, extraction_root):
|
||||
try:
|
||||
if source == 'wekan' and filepath.lower().endswith('.zip'):
|
||||
print('{}: {}'.format(filepath, post_wekan_zip(filepath).text))
|
||||
continue
|
||||
body = {'board': import_document(source, filepath)}
|
||||
if split:
|
||||
body['splitBy'] = 'swimlane'
|
||||
response = requests.post(url, headers=headers, json=body)
|
||||
print('{}: {}'.format(filepath, response.text))
|
||||
except Exception as error:
|
||||
print('{}: not imported: {}'.format(filepath, error))
|
||||
|
||||
# Export all boards: every board the user can export, in FORMAT, in one
|
||||
# download - Excel as one workbook with a sheet per board, every other format
|
||||
|
||||
@@ -2080,13 +2080,14 @@ set "PORT=3000"
|
||||
set "WRITABLE_PATH=%WRITABLE_ABS%"
|
||||
set "WITH_API=true"
|
||||
set "DEFAULT_METEOR_REACTIVITY_ORDER=changeStreams,oplog,polling"
|
||||
REM SyncBleed: the List Sync specs' mock tracker is on 127.0.0.1; allow only that host.
|
||||
REM The API import and List Sync specs use a local test tracker on 127.0.0.1.
|
||||
set "LIST_SYNC_ALLOWED_PRIVATE_HOSTS=127.0.0.1"
|
||||
set "API_IMPORT_ALLOWED_PRIVATE_HOSTS=127.0.0.1"
|
||||
REM FrameBleed: the Docker and Snap default browser policy.
|
||||
set "BROWSER_POLICY_ENABLED=true"
|
||||
echo ==^> Starting the WeKan test server on http://localhost:3000 from .build\bundle ^(precompiled - no rebuild^).
|
||||
start "WekanTestServer" /MIN /D "%REPO%" cmd /c "(echo ===== WeKan test server [bundle node :3000 db :3001/meteor] started: %DATE% %TIME% =====) 1>%RUN_LOGDIR%\wekan-test-server.log 2>&1 & "%NODE_BIN%" "%REPO%\.build\bundle\main.js" 1>>%RUN_LOGDIR%\wekan-test-server.log 2>&1"
|
||||
set "MONGO_URL=" & set "ROOT_URL=" & set "PORT=" & set "WRITABLE_PATH=" & set "WITH_API=" & set "DEFAULT_METEOR_REACTIVITY_ORDER=" & set "LIST_SYNC_ALLOWED_PRIVATE_HOSTS=" & set "BROWSER_POLICY_ENABLED="
|
||||
set "MONGO_URL=" & set "ROOT_URL=" & set "PORT=" & set "WRITABLE_PATH=" & set "WITH_API=" & set "DEFAULT_METEOR_REACTIVITY_ORDER=" & set "LIST_SYNC_ALLOWED_PRIVATE_HOSTS=" & set "API_IMPORT_ALLOWED_PRIVATE_HOSTS=" & set "BROWSER_POLICY_ENABLED="
|
||||
|
||||
REM 6) Wait for :3000 to answer (bundle boots in seconds; curl-timeout poll).
|
||||
call :wait_server_ready
|
||||
|
||||
@@ -1201,9 +1201,14 @@ function start_spec_test_server(){
|
||||
local writable="$WEKAN_DIR/.tools/test-writable"
|
||||
mkdir -p "$writable/files"
|
||||
export WEKAN_FILES_PATH="$writable/files" WEKAN_FILES_PATH_HOST="$writable/files"
|
||||
# The email specs own a local SMTP listener on this port.
|
||||
export WEKAN_TEST_SMTP_PORT="${WEKAN_TEST_SMTP_PORT:-2525}"
|
||||
echo "==> Starting the WeKan test server on http://localhost:3000 (log: $logdir/wekan-test-server.log)."
|
||||
MONGO_URL="$WEKAN_MONGO_URL" ROOT_URL="http://localhost:3000" PORT=3000 \
|
||||
WRITABLE_PATH="$writable" WITH_API=true \
|
||||
WRITABLE_PATH="$writable" WITH_API=true BROWSER_POLICY_ENABLED=true \
|
||||
MAIL_URL="smtp://127.0.0.1:$WEKAN_TEST_SMTP_PORT" EMAIL_NOTIFICATION_TIMEOUT=100 \
|
||||
LIST_SYNC_ALLOWED_PRIVATE_HOSTS="${LIST_SYNC_ALLOWED_PRIVATE_HOSTS:-127.0.0.1}" \
|
||||
API_IMPORT_ALLOWED_PRIVATE_HOSTS="${API_IMPORT_ALLOWED_PRIVATE_HOSTS:-127.0.0.1}" \
|
||||
DEFAULT_METEOR_REACTIVITY_ORDER="changeStreams,oplog,polling" \
|
||||
NODE_OPTIONS="${WEKAN_TEST_NODE_OPTIONS:---max-old-space-size=4096}" \
|
||||
"$NODE_BIN" "$BUNDLE_DIR/main.js" >> "$logdir/wekan-test-server.log" 2>&1 &
|
||||
@@ -1260,6 +1265,7 @@ function run_playwright_spec(){
|
||||
fi
|
||||
local args=("$spec")
|
||||
[ -n "$grep" ] && args+=(--grep "$grep")
|
||||
local WEKAN_TEST_SMTP_PORT="${WEKAN_TEST_SMTP_PORT:-}"
|
||||
local logdir
|
||||
logdir="$(log_directory test-playwright-spec)" || return $?
|
||||
mkdir -p "$logdir"; logdir="$(cd "$logdir" && pwd)"
|
||||
@@ -1638,6 +1644,7 @@ function run_all_tests(){
|
||||
# guard refuses unless the administrator allows that exact host. Only the
|
||||
# test server allows it; the specs use other internal names for refusals.
|
||||
export LIST_SYNC_ALLOWED_PRIVATE_HOSTS=127.0.0.1
|
||||
export API_IMPORT_ALLOWED_PRIVATE_HOSTS=127.0.0.1
|
||||
# The Docker and Snap default, so the browser tests see the framing policy
|
||||
# (FrameBleed) the way a real install sends it.
|
||||
export BROWSER_POLICY_ENABLED=true
|
||||
@@ -3405,7 +3412,7 @@ for _once in 1; do
|
||||
#---------------------------------------------------------------------
|
||||
# Logging of terminal output to console and to .tools/log/wekan-log.log at end of this line: 2>&1 | tee "$(one_log dev-server)"
|
||||
#WARN_WHEN_USING_OLD_API=true NODE_OPTIONS="--trace-warnings"
|
||||
DEFAULT_METEOR_REACTIVITY_ORDER="changeStreams,oplog,polling" DDP_TRANSPORT=sockjs DEBUG="${DEBUG:-false}" WRITABLE_PATH=.. WITH_API=true ROOT_URL=http://localhost:3000 "${DEV_COMMAND[@]}" --port 3000 2>&1 | tee "$(one_log dev-server)"
|
||||
DEFAULT_METEOR_REACTIVITY_ORDER="changeStreams,oplog,polling" DDP_TRANSPORT=sockjs DEBUG="${DEBUG:-false}" WRITABLE_PATH=.. WITH_API=true BROWSER_POLICY_ENABLED="${BROWSER_POLICY_ENABLED:-true}" ROOT_URL=http://localhost:3000 "${DEV_COMMAND[@]}" --port 3000 2>&1 | tee "$(one_log dev-server)"
|
||||
#---------------------------------------------------------------------
|
||||
break
|
||||
;;
|
||||
|
||||
@@ -192,7 +192,10 @@ template(name="activity")
|
||||
|
||||
|
||||
//- I don't understand this part ----------------------------------------
|
||||
if(currentData.timeKey)
|
||||
if($eq activity.activityType 'cardReminder')
|
||||
| {{_ 'notifications'}} · {{{cardLink}}}
|
||||
i.activity-meta {{ displayDate currentData.timeValue 'LLL' }}
|
||||
else if(currentData.timeKey)
|
||||
| {{_ activity.activityType }}
|
||||
= ' '
|
||||
//- A date cleared has no new value (server/lib/timingChangeActivity.js):
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
.comment-editor-hint {
|
||||
margin-block-end: 4px;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.new-comment {
|
||||
position: relative;
|
||||
/* #6805: the room for the avatar is on the side the avatar is drawn - the
|
||||
|
||||
@@ -15,7 +15,9 @@ template(name="commentForm")
|
||||
a.js-cancel-reply(title="{{_ 'close' }}")
|
||||
i.fa.fa-times-thin
|
||||
form.js-new-comment-form
|
||||
+editor(class="js-new-comment-input" labelKey="comment")
|
||||
with commentEditorHint
|
||||
.comment-editor-hint#comment-editor-hint-text(dir="auto")= this
|
||||
+editor(class="js-new-comment-input" labelKey="comment" describedBy=commentEditorHintId)
|
||||
| {{getUnsavedValue 'cardComment' currentCard._id}}
|
||||
.add-controls
|
||||
button.primary.confirm.clear.js-add-comment(type="submit") {{_ 'comment'}}
|
||||
@@ -49,8 +51,22 @@ template(name="comment")
|
||||
i.fa.fa-times-thin
|
||||
else
|
||||
.comment-text
|
||||
+viewer
|
||||
= text
|
||||
with visibleOpenProjectJournal
|
||||
if comment
|
||||
+viewer
|
||||
= comment
|
||||
details.openproject-journal(open)
|
||||
summary OpenProject · {{_ 'activity'}}
|
||||
if author
|
||||
span.openproject-journal-author {{author}}
|
||||
ul
|
||||
each details
|
||||
li
|
||||
+viewer
|
||||
= this
|
||||
else
|
||||
+viewer
|
||||
= text
|
||||
+commentReactions(reactions=reactions commentId=_id)
|
||||
span(title=createdAt).comment-meta
|
||||
//- Issue #4757: the timestamp is a real permalink (card URL +
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { TAPi18n } from '/imports/i18n';
|
||||
import { isSubmitKey } from '/models/lib/editorSubmitKey';
|
||||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
import CardComments, { canEditComment, resolveParentId } from '/models/cardComments';
|
||||
@@ -70,7 +71,18 @@ Template.commentForm.onDestroyed(function () {
|
||||
commentFormIsOpen.set(false);
|
||||
});
|
||||
|
||||
function activeCommentEditorHint() {
|
||||
const hints = ReactiveCache.getCurrentSetting()?.commentEditorHints;
|
||||
const language = TAPi18n.getLanguage() || 'en';
|
||||
return hints?.[language] || hints?.[language.split(/[-_]/)[0]] || hints?.default;
|
||||
}
|
||||
|
||||
Template.commentForm.helpers({
|
||||
commentEditorHintId() {
|
||||
return activeCommentEditorHint() ? 'comment-editor-hint-text' : undefined;
|
||||
},
|
||||
commentEditorHint: activeCommentEditorHint,
|
||||
|
||||
commentFormIsOpen() {
|
||||
return commentFormIsOpen.get();
|
||||
},
|
||||
@@ -173,7 +185,12 @@ function commentPermalinkFor(comment) {
|
||||
return url ? `${url}#comment-${comment._id}` : '';
|
||||
}
|
||||
|
||||
const { matchesOpenProjectJournalText } = require('/models/lib/openProjectDurations');
|
||||
|
||||
Template.comment.helpers({
|
||||
visibleOpenProjectJournal() {
|
||||
return matchesOpenProjectJournalText(this.text, this.openProjectJournal) ? this.openProjectJournal : null;
|
||||
},
|
||||
// The element id `comments.jade` anchors this comment to, so a permalink's
|
||||
// `#comment-<id>` fragment has something to scroll to.
|
||||
commentDomId() {
|
||||
|
||||
@@ -9,6 +9,7 @@ const {
|
||||
} = require('/models/lib/allBoardsUrls');
|
||||
import { TAPi18n } from '/imports/i18n';
|
||||
import { BoardMultiSelection } from '/client/lib/boardMultiSelection';
|
||||
import { massExportFilename } from '/models/lib/exportFields';
|
||||
import { massExportFormats, massExportUrl } from '/client/components/boards/exportScope';
|
||||
import { allBoardsSearchVar, allBoardsMenuVar } from '/client/lib/allBoardsView';
|
||||
import {
|
||||
@@ -194,7 +195,7 @@ Template.exportAllBoardsPopup.helpers({
|
||||
return massExportFormats().map(format => ({
|
||||
label: format.label,
|
||||
url: massExportUrl(format.key, boardIds),
|
||||
filename: format.key === 'excel' ? 'wekan-boards.xlsx' : `wekan-boards-${format.key}.zip`,
|
||||
filename: massExportFilename(format.key),
|
||||
}));
|
||||
},
|
||||
});
|
||||
|
||||
@@ -27,6 +27,7 @@ import { Filter } from '/client/lib/filter';
|
||||
import {
|
||||
parseBoardFilterQueryParams,
|
||||
buildBoardFilterQueryParams,
|
||||
withCurrentUser,
|
||||
} from '/client/lib/filterQueryParams';
|
||||
import { migrationProgressManager } from '/client/components/settings/migrationProgress';
|
||||
import { focusFirstControl } from '/client/lib/accessibility';
|
||||
@@ -86,10 +87,14 @@ Template.board.onCreated(function () {
|
||||
.filter(Boolean)
|
||||
.forEach(u => usernames.add(u));
|
||||
|
||||
const users = ReactiveCache.getUsers(
|
||||
{ username: { $in: Array.from(usernames) } },
|
||||
{ fields: { _id: 1, username: 1 } },
|
||||
) || [];
|
||||
// #6948: the current user is not among the board's users (#6919).
|
||||
const users = withCurrentUser(
|
||||
ReactiveCache.getUsers(
|
||||
{ username: { $in: Array.from(usernames) } },
|
||||
{ fields: { _id: 1, username: 1 } },
|
||||
) || [],
|
||||
Meteor.users.findOne(Meteor.userId(), { fields: { username: 1 } }),
|
||||
);
|
||||
|
||||
const { assigneeIds, memberIds, labelIds } = parseBoardFilterQueryParams(
|
||||
{ assignee: assigneeParam, member: memberParam, label: labelParam },
|
||||
@@ -127,10 +132,13 @@ Template.board.onCreated(function () {
|
||||
}
|
||||
|
||||
const userIds = new Set([...assigneeIds, ...memberIds]);
|
||||
const users = ReactiveCache.getUsers(
|
||||
{ _id: { $in: Array.from(userIds) } },
|
||||
{ fields: { _id: 1, username: 1 } },
|
||||
) || [];
|
||||
const users = withCurrentUser(
|
||||
ReactiveCache.getUsers(
|
||||
{ _id: { $in: Array.from(userIds) } },
|
||||
{ fields: { _id: 1, username: 1 } },
|
||||
) || [],
|
||||
Meteor.users.findOne(Meteor.userId(), { fields: { username: 1 } }),
|
||||
);
|
||||
|
||||
const queryParams = buildBoardFilterQueryParams(
|
||||
{ assigneeIds, memberIds, labelIds },
|
||||
@@ -268,9 +276,8 @@ Template.board.onCreated(function () {
|
||||
Tracker.nonreactive(() => this.ensureDefaultSwimlane(currentBoardId));
|
||||
// Also detect + run the shared board data-repairs once the board is ready.
|
||||
Tracker.nonreactive(() => this.maybeRepairBoard(currentBoardId));
|
||||
// #4540: apply any ?assignee=/?member=/?label= URL filter params now
|
||||
// that the board and its members/labels are loaded.
|
||||
Tracker.nonreactive(() => this.applyQueryParamFilters(currentBoardId));
|
||||
// #4540's ?assignee=/?member=/?label= URL filter params are applied in
|
||||
// the URL sync autorun below, once the current user is loaded too.
|
||||
}
|
||||
});
|
||||
|
||||
@@ -285,6 +292,20 @@ Template.board.onCreated(function () {
|
||||
if (!currentBoardId || !this.isBoardReady.get()) {
|
||||
return;
|
||||
}
|
||||
// #4540: apply the URL's filter params once, before anything writes the
|
||||
// URL. #6948: not before the signed-in user's own document (and its
|
||||
// username) has arrived - after a refresh it comes from the accounts
|
||||
// publication, maybe after the board - or `?assignee=<own username>`
|
||||
// resolves to nobody and the write below removes it from the URL.
|
||||
if (!this._queryFiltersApplied.has(currentBoardId)) {
|
||||
const ownUserId = Meteor.userId();
|
||||
const ownUser = ownUserId
|
||||
&& Meteor.users.findOne(ownUserId, { fields: { username: 1 } });
|
||||
if (Meteor.loggingIn() || (ownUserId && !(ownUser && ownUser.username))) {
|
||||
return;
|
||||
}
|
||||
Tracker.nonreactive(() => this.applyQueryParamFilters(currentBoardId));
|
||||
}
|
||||
this.syncFilterQueryParams(currentBoardId);
|
||||
});
|
||||
});
|
||||
@@ -556,12 +577,12 @@ Template.boardBody.onRendered(function () {
|
||||
style.id = 'wekan-accessible-focus-style';
|
||||
style.innerHTML = `
|
||||
/* Focus indicator */
|
||||
button:focus, [role="button"]:focus, a:focus, input:focus, select:focus, textarea:focus, .dropdown-menu:focus, .js-board-view-swimlanes:focus, .js-add-card:focus {
|
||||
button:focus, [role="button"]:focus, a:focus, input:not([type="checkbox"]):focus, select:focus, textarea:focus, .dropdown-menu:focus, .js-board-view-swimlanes:focus, .js-add-card:focus {
|
||||
outline: 3px solid #005fcc !important;
|
||||
outline-offset: 2px !important;
|
||||
}
|
||||
/* Input borders */
|
||||
input, textarea, select {
|
||||
input:not([type="checkbox"]), textarea, select {
|
||||
border: 2px solid #222 !important;
|
||||
}
|
||||
/* Plus icon for adding a new card */
|
||||
|
||||
@@ -1424,10 +1424,10 @@ THEME - Apple Glass Pastel
|
||||
.board-color-appleglasspastel input.primary,
|
||||
.board-color-appleglasspastel .sidebar .sidebar-content .sidebar-btn,
|
||||
.board-color-appleglasspastel .selected-calendar-picker button.primary {
|
||||
/* Tinted glass: the blue with a highlight across its upper half. */
|
||||
/* Keep white text readable across the glass highlight. */
|
||||
background:
|
||||
linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 55%),
|
||||
#2563eb;
|
||||
linear-gradient(180deg, rgba(255, 255, 255, 0.20) 0%, rgba(255, 255, 255, 0) 55%),
|
||||
#1e40af;
|
||||
border: 0;
|
||||
border-radius: 999px;
|
||||
box-shadow:
|
||||
@@ -1442,10 +1442,20 @@ THEME - Apple Glass Pastel
|
||||
.board-color-appleglasspastel button.primary:hover,
|
||||
.board-color-appleglasspastel input.primary:hover,
|
||||
.board-color-appleglasspastel .selected-calendar-picker button.primary:hover {
|
||||
background: #1d4ed8;
|
||||
background: #1e3a8a;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.board-color-appleglasspastel .card-details button.js-reminder-date.add-label {
|
||||
background: #dbeafe;
|
||||
}
|
||||
.board-color-appleglasspastel .card-details button.js-reminder-date.add-label:hover {
|
||||
background: #bfdbfe;
|
||||
}
|
||||
.board-color-appleglasspastel .card-details button.js-reminder-date.add-label .fa {
|
||||
color: #1e3a8a;
|
||||
}
|
||||
|
||||
.board-color-appleglasspastel input[type="email"],
|
||||
.board-color-appleglasspastel input[type="password"],
|
||||
.board-color-appleglasspastel input[type="text"],
|
||||
@@ -1457,7 +1467,7 @@ THEME - Apple Glass Pastel
|
||||
color: #111827;
|
||||
}
|
||||
|
||||
.board-color-appleglasspastel input:focus,
|
||||
.board-color-appleglasspastel input:where(:not([type="checkbox"])):focus,
|
||||
.board-color-appleglasspastel textarea:focus,
|
||||
.board-color-appleglasspastel select:focus {
|
||||
border-color: #2563eb;
|
||||
@@ -2396,7 +2406,7 @@ THEME - Modern Dark
|
||||
background-color: #777 !important;
|
||||
}
|
||||
.board-color-moderndark button,
|
||||
.board-color-moderndark input:not([type=file]),
|
||||
.board-color-moderndark input:not([type=file]):where(:not([type="checkbox"])),
|
||||
.board-color-moderndark select,
|
||||
.board-color-moderndark textarea {
|
||||
border-radius: 7px;
|
||||
@@ -3340,7 +3350,7 @@ THEME - Clean Dark
|
||||
color: rgba(255, 255, 255, 0.85) !important;
|
||||
}
|
||||
|
||||
.board-color-cleandark input {
|
||||
.board-color-cleandark input:where(:not([type="checkbox"])) {
|
||||
font-size: calc(16px * var(--wekan-ui-font-scale, 1));
|
||||
font-weight: 400;
|
||||
line-height: calc(24px * var(--wekan-ui-font-scale, 1));
|
||||
@@ -4103,7 +4113,7 @@ THEME - Clean Light
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.board-color-cleanlight input {
|
||||
.board-color-cleanlight input:where(:not([type="checkbox"])) {
|
||||
font-size: calc(16px * var(--wekan-ui-font-scale, 1));
|
||||
font-weight: 400;
|
||||
line-height: calc(24px * var(--wekan-ui-font-scale, 1));
|
||||
@@ -4117,8 +4127,8 @@ THEME - Clean Light
|
||||
color: rgba(10, 10, 20, 0.5) !important;
|
||||
}
|
||||
|
||||
.board-color-cleanlight input:focus,
|
||||
.board-color-cleandark input:focus {
|
||||
.board-color-cleanlight input:where(:not([type="checkbox"])):focus,
|
||||
.board-color-cleandark input:where(:not([type="checkbox"])):focus {
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
@@ -347,22 +347,23 @@ template(name="boardViewMenu")
|
||||
cannot be read without hovering - so the button says which view is on.
|
||||
The bar wraps to a second row when it runs out of width, which is what
|
||||
makes a word beside the icon affordable. docs/Features/Header-Bar/Header.md
|
||||
a.board-header-btn.js-toggle-board-view(title="{{boardViewName}}")
|
||||
i.fa.fa-caret-down
|
||||
if $eq boardView 'board-view-swimlanes'
|
||||
i.fa.fa-th-large
|
||||
if $eq boardView 'board-view-lists'
|
||||
i.fa.fa-trello
|
||||
if $eq boardView 'board-view-cal'
|
||||
i.fa.fa-calendar
|
||||
if $eq boardView 'board-view-calendar-mode'
|
||||
i.fa.fa-calendar-check-o
|
||||
if $eq boardView 'board-view-gantt'
|
||||
i.fa.fa-bar-chart
|
||||
if $eq boardView 'board-view-table'
|
||||
i.fa.fa-table
|
||||
if $eq boardView 'board-view-stats'
|
||||
i.fa.fa-pie-chart
|
||||
span.board-header-btn-label= boardViewName
|
||||
//- The open view's ? (featureHelp.jade), after the menu that names it.
|
||||
+featureHelp(id=boardViewHelp)
|
||||
.board-view-controls
|
||||
a.board-header-btn.js-toggle-board-view(title="{{boardViewName}}")
|
||||
i.fa.fa-caret-down
|
||||
if $eq boardView 'board-view-swimlanes'
|
||||
i.fa.fa-th-large
|
||||
if $eq boardView 'board-view-lists'
|
||||
i.fa.fa-trello
|
||||
if $eq boardView 'board-view-cal'
|
||||
i.fa.fa-calendar
|
||||
if $eq boardView 'board-view-calendar-mode'
|
||||
i.fa.fa-calendar-check-o
|
||||
if $eq boardView 'board-view-gantt'
|
||||
i.fa.fa-bar-chart
|
||||
if $eq boardView 'board-view-table'
|
||||
i.fa.fa-table
|
||||
if $eq boardView 'board-view-stats'
|
||||
i.fa.fa-pie-chart
|
||||
span.board-header-btn-label= boardViewName
|
||||
//- The open view's ? (featureHelp.jade), after the menu that names it.
|
||||
+featureHelp(id=boardViewHelp)
|
||||
@@ -626,54 +626,16 @@ async function createOneBoard(tpl, title, addTemplateContainer, spaceId) {
|
||||
} else {
|
||||
const visibility = tpl.visibility.get();
|
||||
|
||||
// #4205: when the user has marked a board template as their default,
|
||||
// apply it automatically - the same "type a name and click Create" flow
|
||||
// that used to always start blank now reuses the EXACT copyBoard call the
|
||||
// manual "Template" picker already makes (Template.searchElementPopup's
|
||||
// 'click .js-minicard' handler, client/components/lists/listBody.js) -
|
||||
// only the source (the default template's board) and the typed title
|
||||
// differ. Nothing changes for a user who has not set a default.
|
||||
const currentUser = ReactiveCache.getCurrentUser();
|
||||
const defaultTemplateBoardId = currentUser
|
||||
&& currentUser.profile
|
||||
&& currentUser.profile.defaultBoardTemplateBoardId;
|
||||
|
||||
if (defaultTemplateBoardId) {
|
||||
await new Promise((resolve) => {
|
||||
Meteor.call(
|
||||
'copyBoard',
|
||||
defaultTemplateBoardId,
|
||||
{
|
||||
sort: ReactiveCache.getBoards({ archived: false }).length,
|
||||
type: 'board',
|
||||
title,
|
||||
},
|
||||
(err, newBoardId) => {
|
||||
if (err) {
|
||||
// Stale/removed default (should self-heal via boardRemover, but
|
||||
// guard against a race): fall back to a blank board rather than
|
||||
// leaving Create silently broken.
|
||||
console.error(err);
|
||||
} else {
|
||||
tpl.boardId.set(newBoardId);
|
||||
}
|
||||
resolve();
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
if (!tpl.boardId.get()) {
|
||||
tpl.boardId.set(
|
||||
await Meteor.callAsync('createBoardWithInitialSwimlanes', {
|
||||
title,
|
||||
slug,
|
||||
permission: visibility,
|
||||
migrationVersion: 1,
|
||||
swimlanes: [{ title: 'Default' }],
|
||||
}),
|
||||
);
|
||||
}
|
||||
tpl.boardId.set(
|
||||
await Meteor.callAsync('createBoardWithInitialSwimlanes', {
|
||||
title,
|
||||
slug,
|
||||
permission: visibility,
|
||||
migrationVersion: 1,
|
||||
swimlanes: [{ title: 'Default' }],
|
||||
personalTemplateSort: ReactiveCache.getBoards({ archived: false }).length,
|
||||
}),
|
||||
);
|
||||
|
||||
// Assign to space if one was selected
|
||||
if (spaceId) {
|
||||
|
||||
@@ -44,8 +44,9 @@ template(name="exportScopeSelect")
|
||||
applies to and whether it is a link or an action, and this lays them out.
|
||||
template(name="exportScopeBody")
|
||||
.export-board-panes
|
||||
.export-board-pane.export-board-pane-select
|
||||
+exportScopeSelect
|
||||
unless importedPeople.length
|
||||
.export-board-pane.export-board-pane-select
|
||||
+exportScopeSelect
|
||||
.export-board-pane.export-board-pane-formats
|
||||
if isImportMode
|
||||
//- #1173: the same popup, the other direction. The checkboxes in the
|
||||
@@ -58,12 +59,51 @@ template(name="exportScopeBody")
|
||||
it another way.
|
||||
if canImport
|
||||
p.quiet {{_ 'import-here-instruction'}}
|
||||
label
|
||||
| {{scopedJsonFormatNames}} — {{_ 'import-members-mode-heading'}}
|
||||
select.js-scoped-import-people-mode
|
||||
option(value="") —
|
||||
option(value="me") {{_ 'import-members-mode-me'}}
|
||||
if canMapImportedPeople
|
||||
option(value="review") {{_ 'import-members-mode-map'}}
|
||||
details
|
||||
summary {{_ 'import-attachment-auth'}}
|
||||
p.quiet {{_ 'import-attachment-auth-hint'}}
|
||||
label
|
||||
| {{_ 'import-attachment-auth-url'}}
|
||||
input.js-scoped-import-url(type="url")
|
||||
label
|
||||
| {{_ 'api-import-username'}}
|
||||
input.js-scoped-import-username(type="text")
|
||||
label
|
||||
| {{_ 'import-attachment-auth-token'}}
|
||||
input.js-scoped-import-token(type="password" autocomplete="off")
|
||||
ul.pop-over-list
|
||||
li
|
||||
label.js-import-file-label
|
||||
i.fa.fa-download
|
||||
| {{_ 'import'}} / JSON, .zip
|
||||
input.js-import-file(type="file" accept=".json,application/json,.zip,application/zip" hidden)
|
||||
| {{_ 'import'}} / {{scopedImportFileLabels}}
|
||||
input.js-import-file(type="file" accept=scopedImportFileAccept disabled=importBusy hidden)
|
||||
if scopedApiServices.length
|
||||
label
|
||||
| {{_ 'api-import-choose'}}
|
||||
select.js-scoped-import-api-service(disabled=importBusy)
|
||||
option(value="") —
|
||||
each scopedApiServices
|
||||
option(value=key) {{name}}
|
||||
each scopedApiImportSelection
|
||||
+apiImportFetch
|
||||
if importedPeople.length
|
||||
form.js-scoped-import-people
|
||||
each importedPeople
|
||||
label
|
||||
| {{name}}
|
||||
select(data-source="{{key}}")
|
||||
option(value="") —
|
||||
each importMemberChoices
|
||||
option(value="{{userId}}") {{name}}
|
||||
button.primary(type="submit") {{_ 'import'}}
|
||||
button.js-cancel-scoped-import-people(type="button") {{_ 'cancel'}}
|
||||
if importBusy
|
||||
p.quiet {{_ 'importing'}}
|
||||
if importError
|
||||
@@ -71,6 +111,8 @@ template(name="exportScopeBody")
|
||||
if importDone
|
||||
p.quiet {{_ 'import-done'}} {{importDone}}
|
||||
else
|
||||
each directApiExportServices
|
||||
+directApiExport
|
||||
each formatGroups
|
||||
if heading
|
||||
hr
|
||||
@@ -83,11 +125,77 @@ template(name="exportScopeBody")
|
||||
i.fa(class="{{icon}}")
|
||||
| {{label}}
|
||||
else
|
||||
//- The server supplies the localized, scope-aware filename.
|
||||
a(href="{{url}}" download)
|
||||
//- Server download names take precedence where supplied.
|
||||
a(href="{{url}}" download="{{downloadName}}")
|
||||
i.fa(class="{{icon}}")
|
||||
| {{label}}
|
||||
|
||||
template(name="directApiExport")
|
||||
details
|
||||
summary {{name}} API
|
||||
form.js-direct-api-export-form
|
||||
each credentialFields
|
||||
label
|
||||
| {{_ label}}
|
||||
if showEmail
|
||||
| / {{_ 'email'}}
|
||||
input(type=type name=name required=required autocomplete="off" disabled=exportBusy)
|
||||
button(type="submit" value="list" disabled=exportBusy) {{_ 'search'}}
|
||||
if exportProjects.length
|
||||
label
|
||||
| {{_ 'list-sync-project-key'}}
|
||||
select(name="project" disabled=exportBusy)
|
||||
if directExport.issueTypes
|
||||
option(value="")
|
||||
each exportProjects
|
||||
option(value=id) {{name}}
|
||||
if issueTypes.length
|
||||
label
|
||||
| {{_ 'type'}}
|
||||
select(name="issueType" disabled=exportBusy)
|
||||
each issueTypes
|
||||
option(value=id) {{name}}
|
||||
if subtaskTypes.length
|
||||
label
|
||||
| {{_ 'subtasks'}} ({{_ 'type'}})
|
||||
select(name="subtaskType" disabled=exportBusy)
|
||||
option(value="") {{_ 'custom-field-dropdown-none'}}
|
||||
each subtaskTypes
|
||||
option(value=id) {{name}}
|
||||
if canSubmitExport
|
||||
button.primary(type="submit" value="export" disabled=exportBusy) {{_ 'export'}}
|
||||
if exportBusy
|
||||
p(role="status") {{_ 'loading'}}
|
||||
if exportMessage
|
||||
p(role="status") {{_ exportMessage}}
|
||||
with exportResult
|
||||
p(role="status") {{_ 'completed'}} {{created.length}}
|
||||
ul
|
||||
each created
|
||||
li {{id}}
|
||||
if dependencyResult this
|
||||
p(role="status") {{dependencyResult this}}
|
||||
if skippedParents
|
||||
p {{_ 'export-card-subtasks'}} — {{_ 'sync-report-skipped'}} {{skippedParents}}
|
||||
if skippedWorkFields
|
||||
p(role="status") {{_ 'custom-fields'}} — {{_ 'sync-report-skipped'}} {{skippedWorkFields}}
|
||||
if skippedTimeEstimates
|
||||
p(role="status") {{_ 'workload-estimated-hours'}} — {{_ 'sync-report-skipped'}} {{skippedTimeEstimates}}
|
||||
if skippedStartDates
|
||||
p(role="status") {{_ 'cloud-start-date'}} — {{_ 'sync-report-skipped'}} {{skippedStartDates}}
|
||||
if skippedDueDates
|
||||
p(role="status") {{_ 'due-date'}} — {{_ 'sync-report-skipped'}} {{skippedDueDates}}
|
||||
if skippedLabels
|
||||
p(role="status") {{_ 'labels'}} — {{_ 'sync-report-skipped'}} {{skippedLabels}}
|
||||
if stoppedAt
|
||||
p(role="status")
|
||||
if exportUnknown
|
||||
| {{_ 'flow-unknown'}} ({{stoppedAt}})
|
||||
else
|
||||
| {{_ 'error'}} {{status}} ({{stoppedAt}})
|
||||
if remaining
|
||||
p {{_ 'pending'}} {{remaining}}
|
||||
|
||||
template(name="exportSwimlanePopup")
|
||||
+exportScopeBody(swimlaneId=_id title=title)
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
import { restoreNotionImportProgress, saveNotionImportProgress } from '/client/lib/notionImportRecovery';
|
||||
import { fetchNotionImportBatches } from '/models/lib/notionImportBatches';
|
||||
import { BOARD_API_IMPORT_SERVICES, DIRECT_API_EXPORT_SERVICES } from '/models/lib/apiImportServices';
|
||||
import { documentForFile } from '/models/lib/importManyFiles';
|
||||
import { cleanPart } from '/models/lib/exportFilename';
|
||||
import { EXTERNAL_JSON_FILE_FORMATS, SCOPED_EXTERNAL_EXPORT_FORMATS, SCOPED_EXTERNAL_JSON_FORMATS, SCOPED_FILE_FORMATS, SINGLE_BOARD_STREAMING_FORMATS, externalExportScope, exportFileExtension, scopedImportFileFormat } from '/models/lib/exportFields';
|
||||
// ITS OWN TEMPLATE FIRST. This module is imported by sidebar.js, by
|
||||
// cardDetails.js and by the import page, and any of them can be evaluated
|
||||
// before client/features/boards.js gets to the .jade - at which point
|
||||
@@ -12,6 +18,7 @@
|
||||
// import costs nothing.
|
||||
import './exportScope.jade';
|
||||
import { ReactiveDict } from 'meteor/reactive-dict';
|
||||
import { ReactiveVar } from 'meteor/reactive-var';
|
||||
import { Template } from 'meteor/templating';
|
||||
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
@@ -52,8 +59,7 @@ function selectedFields() {
|
||||
|
||||
// The scope a popup was opened with: {} for a board, {swimlaneId} or {listId}
|
||||
// for the other two.
|
||||
function currentScope() {
|
||||
const data = Template.currentData() || {};
|
||||
function currentScope(data = Template.currentData() || {}) {
|
||||
const scope = {};
|
||||
if (data.swimlaneId) scope.swimlaneId = data.swimlaneId;
|
||||
if (data.listId) scope.listId = data.listId;
|
||||
@@ -84,6 +90,8 @@ function exportUrl(path, extra = {}) {
|
||||
const boardId = Session.get('currentBoard');
|
||||
const data = Template.currentData() || {};
|
||||
const route = routeFor(path);
|
||||
const format = path.split('/').at(-1);
|
||||
const externalCardScope = data.cardId && SCOPED_EXTERNAL_EXPORT_FORMATS.includes(format) ? { cardId: data.cardId } : {};
|
||||
const params = { boardId };
|
||||
if (route.includes(':listId')) params.listId = data.listId;
|
||||
if (route.includes(':cardId')) params.cardId = data.cardId;
|
||||
@@ -91,6 +99,7 @@ function exportUrl(path, extra = {}) {
|
||||
authToken: Accounts._storedLoginToken(),
|
||||
fields: selectedFields().join(','),
|
||||
...currentScope(),
|
||||
...externalCardScope,
|
||||
...exportLocaleParams(),
|
||||
...extra,
|
||||
});
|
||||
@@ -104,29 +113,24 @@ importState.set('busy', false);
|
||||
importState.set('error', '');
|
||||
importState.set('done', '');
|
||||
|
||||
// A WeKan export is either the document itself or a .zip with the document
|
||||
// inside it. Reading the .zip in the BROWSER is what keeps the server out of it:
|
||||
// the method takes the same object either way, so there is one import path and
|
||||
// not two.
|
||||
async function readExportFile(file) {
|
||||
const name = String(file.name || '').toLowerCase();
|
||||
if (!name.endsWith('.zip')) {
|
||||
// A .json already carries its attachments as base64 under `file`, which is
|
||||
// what the importer reads.
|
||||
return JSON.parse(await file.text());
|
||||
}
|
||||
function isArchiveImport(file) {
|
||||
return scopedImportFileFormat(file.name)?.importTransport === 'archive';
|
||||
}
|
||||
|
||||
// ZIP imports are dispatched to the streaming server route before this
|
||||
// helper is called. Refuse a future accidental browser-side unpack instead
|
||||
// of pulling a second ZIP implementation into every board chunk.
|
||||
throw new Error('import-zip-must-stream-to-server');
|
||||
async function readExportFile(file) {
|
||||
if (isArchiveImport(file)) throw new Error('import-zip-must-stream-to-server');
|
||||
const { importTransport, scopedTextFormat } = scopedImportFileFormat(file.name) || {};
|
||||
if (importTransport === 'excel') return documentForFile('excel', file.name, new Uint8Array(await file.arrayBuffer()));
|
||||
const text = await file.text();
|
||||
const document = scopedTextFormat ? { scopedTextFormat, text } : JSON.parse(text);
|
||||
return Array.isArray(document) ? { scopedJsonRows: document } : document;
|
||||
}
|
||||
|
||||
// A .json is small enough to travel as a document: it is parsed here and sent
|
||||
// over DDP, which is the path the per-menu import has always used.
|
||||
function importJsonDocument(doc, target) {
|
||||
function importJsonDocument(doc, target, attachmentAuth, peopleOptions, fields) {
|
||||
return new Promise((resolve, reject) => {
|
||||
Meteor.call('importScoped', target, doc, selectedFields(),
|
||||
Meteor.call('importScoped', target, doc, fields, attachmentAuth, peopleOptions,
|
||||
(err, res) => (err ? reject(err) : resolve(res)));
|
||||
});
|
||||
}
|
||||
@@ -144,7 +148,7 @@ async function uploadZipImport(file, target) {
|
||||
}
|
||||
const response = await fetch(`/api/import/zip?${params.toString()}`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/zip' },
|
||||
headers: { 'Content-Type': SCOPED_FILE_FORMATS.zip.mimeType },
|
||||
body: file,
|
||||
});
|
||||
const answer = await response.json().catch(() => ({}));
|
||||
@@ -163,8 +167,9 @@ async function uploadZipImport(file, target) {
|
||||
// the other. One table, rendered by one template, is the answer to both.
|
||||
//
|
||||
// `scopes: ['board']` marks a format that only makes sense for a whole board -
|
||||
// the HTML archive, the dependency graph, the CSV columns, and the exports
|
||||
// written for another tool. Everything else is offered wherever the popup is,
|
||||
// the HTML archive, the dependency graph, and the exports
|
||||
// written for another tool unless it has a scoped export. Everything else is
|
||||
// offered wherever the popup is,
|
||||
// because `exportUrl` already carries the scope: a swimlane, a list and a card
|
||||
// each differ from a board by a query parameter, not by a route.
|
||||
//
|
||||
@@ -206,24 +211,23 @@ const EXPORT_FORMAT_GROUPS = [
|
||||
{
|
||||
key: 'csv',
|
||||
heading: 'CSV',
|
||||
scopes: BOARD_ONLY,
|
||||
entries: [
|
||||
{ key: 'csv', icon: 'fa-upload', label: '(,)', path: 'export/csv', ext: 'csv', query: { delimiter: ',' } },
|
||||
{ key: 'scsv', icon: 'fa-upload', label: '(;)', path: 'export/csv', ext: 'csv', query: { delimiter: ';' } },
|
||||
{ key: 'tsv', icon: 'fa-upload', label: 'TSV', path: 'export/csv', ext: 'tsv', query: { delimiter: '\t' } },
|
||||
{ key: 'tsv', icon: 'fa-upload', label: 'TSV', path: 'export/csv', ext: 'csv', query: { delimiter: '\t' } },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'json',
|
||||
heading: 'JSON',
|
||||
entries: [
|
||||
{ key: 'json', icon: 'fa-file-code-o', label: 'JSON', path: 'export', ext: 'json' },
|
||||
{ key: 'json', icon: 'fa-file-code-o', label: SCOPED_FILE_FORMATS.json.label, path: SCOPED_FILE_FORMATS.json.path, ext: 'json' },
|
||||
{
|
||||
key: 'json-no-attachments',
|
||||
icon: 'fa-file-code-o',
|
||||
labelKey: 'export-board-without-attachments',
|
||||
labelPrefix: 'JSON',
|
||||
path: 'export',
|
||||
path: SCOPED_FILE_FORMATS.json.path,
|
||||
ext: 'json',
|
||||
query: { attachments: 'false' },
|
||||
},
|
||||
@@ -234,7 +238,7 @@ const EXPORT_FORMAT_GROUPS = [
|
||||
icon: 'fa-file-code-o',
|
||||
labelKey: 'export-board-without-archive',
|
||||
labelPrefix: 'JSON',
|
||||
path: 'export',
|
||||
path: SCOPED_FILE_FORMATS.json.path,
|
||||
ext: 'json',
|
||||
query: { archived: 'false' },
|
||||
},
|
||||
@@ -243,7 +247,7 @@ const EXPORT_FORMAT_GROUPS = [
|
||||
icon: 'fa-file-archive-o',
|
||||
labelKey: 'attachments',
|
||||
labelPrefix: '.zip',
|
||||
path: 'exportZip',
|
||||
path: SCOPED_FILE_FORMATS.zip.path,
|
||||
ext: 'zip',
|
||||
},
|
||||
// Straight into Trello through its API (server/trelloApiExport.js), not
|
||||
@@ -252,13 +256,12 @@ const EXPORT_FORMAT_GROUPS = [
|
||||
// Trello's board.json with the cards' attachments as files, the .zip
|
||||
// the Trello import reads (server/lib/renderExternalExport.js streamTrelloZip).
|
||||
{ key: 'trellozip', icon: 'fa-file-archive-o', labelKey: 'attachments', labelPrefix: 'Trello .zip', path: 'export/trellozip', ext: 'zip', scopes: BOARD_ONLY },
|
||||
{ key: 'kanboard', icon: 'fa-upload', label: 'Kanboard', path: 'export/kanboard', ext: 'json', scopes: BOARD_ONLY },
|
||||
{ key: 'markdown', icon: 'fa-file-text-o', label: 'Markdown', path: 'export/markdown', ext: 'md', scopes: BOARD_ONLY },
|
||||
{ key: 'leo', icon: 'fa-sitemap', label: 'Leo', path: 'export/leo', ext: 'leo', scopes: BOARD_ONLY },
|
||||
{ key: 'opml', icon: 'fa-indent', label: 'OPML', path: 'export/opml', ext: 'opml', scopes: BOARD_ONLY },
|
||||
{ key: 'orgmode', icon: 'fa-list-alt', label: 'Org mode', path: 'export/orgmode', ext: 'org', scopes: BOARD_ONLY },
|
||||
{ key: 'mbox', icon: 'fa-envelope-o', label: 'Mail (mbox)', path: 'export/mbox', ext: 'mbox', scopes: BOARD_ONLY },
|
||||
{ key: 'enex', icon: 'fa-sticky-note', label: 'Evernote (.enex)', path: 'export/enex', ext: 'enex', scopes: BOARD_ONLY },
|
||||
{ key: 'markdown', icon: 'fa-file-text-o', label: 'Markdown', path: 'export/markdown', ext: 'md' },
|
||||
{ key: 'leo', icon: 'fa-sitemap', label: 'Leo', path: 'export/leo', ext: 'leo' },
|
||||
{ key: 'opml', icon: 'fa-indent', label: 'OPML', path: 'export/opml', ext: 'opml' },
|
||||
{ key: 'orgmode', icon: 'fa-list-alt', label: 'Org mode', path: 'export/orgmode', ext: 'org' },
|
||||
{ key: 'mbox', icon: 'fa-envelope-o', label: 'Mail (mbox)', path: 'export/mbox', ext: 'mbox' },
|
||||
{ key: 'enex', icon: 'fa-sticky-note', label: 'Evernote (.enex)', path: 'export/enex', ext: 'enex' },
|
||||
{ key: 'mattermost', icon: 'fa-comments', label: 'Mattermost', path: 'export/mattermost', ext: 'jsonl', scopes: BOARD_ONLY },
|
||||
{ key: 'rocketchat', icon: 'fa-comments', label: 'Rocket.Chat', path: 'export/rocketchat', ext: 'zip', scopes: BOARD_ONLY },
|
||||
// Websites (docs/Features/Board-Sidebar/Board-Settings/Import-Export/Website/README.md).
|
||||
@@ -268,13 +271,12 @@ const EXPORT_FORMAT_GROUPS = [
|
||||
{ key: 'blogger', icon: 'fa-rss', label: 'Blogger (.xml)', path: 'export/blogger', ext: 'xml', scopes: BOARD_ONLY },
|
||||
{ key: 'markdownsite', icon: 'fa-file-code-o', label: 'Hugo, Jekyll, Eleventy, Astro (.zip)', path: 'export/markdownsite', ext: 'zip', scopes: BOARD_ONLY },
|
||||
{ key: 'htmlsite', icon: 'fa-globe', label: 'HTML website (.zip)', path: 'export/htmlsite', ext: 'zip', scopes: BOARD_ONLY },
|
||||
{ key: 'todotxt', icon: 'fa-list-ul', label: 'todo.txt', path: 'export/todotxt', ext: 'txt', scopes: BOARD_ONLY },
|
||||
{ key: 'taskwarrior', icon: 'fa-terminal', label: 'Taskwarrior', path: 'export/taskwarrior', ext: 'json', scopes: BOARD_ONLY },
|
||||
{ key: 'todotxt', icon: 'fa-list-ul', label: 'todo.txt', path: 'export/todotxt', ext: 'txt' },
|
||||
{ key: 'focalboard', icon: 'fa-th-large', label: 'Focalboard', path: 'export/focalboard', ext: 'jsonl', scopes: BOARD_ONLY },
|
||||
{ key: 'todoist', icon: 'fa-check-square-o', label: 'Todoist', path: 'export/todoist', ext: 'csv', scopes: BOARD_ONLY },
|
||||
{ key: 'planner', icon: 'fa-th-list', label: 'Microsoft Planner', path: 'export/planner', ext: 'xlsx', scopes: BOARD_ONLY },
|
||||
{ key: 'azuredevops', icon: 'fa-th-list', label: 'Azure DevOps Boards', path: 'export/azuredevops', ext: 'csv', scopes: BOARD_ONLY },
|
||||
{ key: 'mslists', icon: 'fa-list', label: 'Microsoft Lists', path: 'export/mslists', ext: 'csv', scopes: BOARD_ONLY },
|
||||
{ key: 'todoist', icon: 'fa-check-square-o', label: 'Todoist', path: 'export/todoist', ext: 'csv' },
|
||||
{ key: 'planner', icon: 'fa-th-list', label: 'Microsoft Planner', path: 'export/planner', ext: 'xlsx' },
|
||||
{ key: 'azuredevops', icon: 'fa-th-list', label: 'Azure DevOps Boards', path: 'export/azuredevops', ext: 'csv' },
|
||||
{ key: 'mslists', icon: 'fa-list', label: 'Microsoft Lists', path: 'export/mslists', ext: 'csv' },
|
||||
{ key: 'msproject', icon: 'fa-tasks', label: 'Microsoft Project (XML)', path: 'export/msproject', ext: 'xml', scopes: BOARD_ONLY },
|
||||
{ key: 'outlook', icon: 'fa-envelope-o', label: 'Microsoft Outlook (.eml)', path: 'export/outlook', ext: 'zip', scopes: BOARD_ONLY },
|
||||
{ key: 'teams', icon: 'fa-comments', label: 'Microsoft Teams', path: 'export/teams', ext: 'json', scopes: BOARD_ONLY },
|
||||
@@ -289,38 +291,29 @@ const EXPORT_FORMAT_GROUPS = [
|
||||
{ key: 'sandstormradicalecontacts', icon: 'fa-archive', label: 'Sandstorm Radicale address book', path: 'export/sandstormradicalecontacts', ext: 'zip', scopes: BOARD_ONLY },
|
||||
{ key: 'sandstormdavros', icon: 'fa-archive', label: 'Sandstorm Davros', path: 'export/sandstormdavros', ext: 'zip', scopes: BOARD_ONLY },
|
||||
{ key: 'sandstormhackercms', icon: 'fa-archive', label: 'Sandstorm Hacker CMS', path: 'export/sandstormhackercms', ext: 'zip', scopes: BOARD_ONLY },
|
||||
{ key: 'meistertask', icon: 'fa-tasks', label: 'MeisterTask', path: 'export/meistertask', ext: 'csv', scopes: BOARD_ONLY },
|
||||
{ key: 'obsidian', icon: 'fa-diamond', label: 'Obsidian Kanban', path: 'export/obsidian', ext: 'md', scopes: BOARD_ONLY },
|
||||
{ key: 'linear', icon: 'fa-bars', label: 'Linear', path: 'export/linear', ext: 'csv', scopes: BOARD_ONLY },
|
||||
{ key: 'ticktick', icon: 'fa-check-circle-o', label: 'TickTick', path: 'export/ticktick', ext: 'csv', scopes: BOARD_ONLY },
|
||||
{ key: 'clickup', icon: 'fa-check-square', label: 'ClickUp', path: 'export/clickup', ext: 'csv', scopes: BOARD_ONLY },
|
||||
{ key: 'meistertask', icon: 'fa-tasks', label: 'MeisterTask', path: 'export/meistertask', ext: 'csv' },
|
||||
{ key: 'obsidian', icon: 'fa-diamond', label: 'Obsidian Kanban', path: 'export/obsidian', ext: 'md' },
|
||||
{ key: 'linear', icon: 'fa-bars', label: 'Linear', path: 'export/linear', ext: 'csv' },
|
||||
{ key: 'ticktick', icon: 'fa-check-circle-o', label: 'TickTick', path: 'export/ticktick', ext: 'csv' },
|
||||
{ key: 'clickup', icon: 'fa-check-square', label: 'ClickUp', path: 'export/clickup', ext: 'csv' },
|
||||
{ key: 'nullboard', icon: 'fa-sticky-note-o', label: 'Nullboard', path: 'export/nullboard', ext: 'nbx', scopes: BOARD_ONLY },
|
||||
{ key: 'kanri', icon: 'fa-columns', label: 'Kanri', path: 'export/kanri', ext: 'json', scopes: BOARD_ONLY },
|
||||
{ key: 'pivotal', icon: 'fa-flag', label: 'Pivotal Tracker', path: 'export/pivotal', ext: 'csv', scopes: BOARD_ONLY },
|
||||
{ key: 'redmine', icon: 'fa-bug', label: 'Redmine', path: 'export/redmine', ext: 'csv', scopes: BOARD_ONLY },
|
||||
{ key: 'pivotal', icon: 'fa-flag', label: 'Pivotal Tracker', path: 'export/pivotal', ext: 'csv' },
|
||||
{ key: 'redmine', icon: 'fa-bug', label: 'Redmine', path: 'export/redmine', ext: 'csv' },
|
||||
{ key: 'tasksorg', icon: 'fa-check-circle-o', label: 'Tasks.org', path: 'export/tasksorg', ext: 'json', scopes: BOARD_ONLY },
|
||||
{ key: 'monday', icon: 'fa-table', label: 'monday.com', path: 'export/monday', ext: 'xlsx', scopes: BOARD_ONLY },
|
||||
{ key: 'monday', icon: 'fa-table', label: 'monday.com', path: 'export/monday', ext: 'xlsx' },
|
||||
{ key: 'superproductivity', icon: 'fa-check-circle-o', label: 'Super Productivity', path: 'export/superproductivity', ext: 'json', scopes: BOARD_ONLY },
|
||||
{ key: 'vikunja', icon: 'fa-file-archive-o', label: 'Vikunja', path: 'export/vikunja', ext: 'zip', scopes: BOARD_ONLY },
|
||||
{ key: 'fizzy', icon: 'fa-file-archive-o', label: 'Fizzy', path: 'export/fizzy', ext: 'zip', scopes: BOARD_ONLY },
|
||||
{ key: 'wrike', icon: 'fa-table', label: 'Wrike', path: 'export/wrike', ext: 'xlsx', scopes: BOARD_ONLY },
|
||||
{ key: 'wrike', icon: 'fa-table', label: 'Wrike', path: 'export/wrike', ext: 'xlsx' },
|
||||
{ key: 'wrikeworkflow', icon: 'fa-sitemap', label: 'Wrike workflow', path: 'export/wrikeworkflow', ext: 'json', scopes: BOARD_ONLY },
|
||||
{ key: 'teamwork', icon: 'fa-table', label: 'Teamwork.com', path: 'export/teamwork', ext: 'xlsx', scopes: BOARD_ONLY },
|
||||
{ key: 'businessmap', icon: 'fa-table', label: 'Businessmap (Kanbanize)', path: 'export/businessmap', ext: 'xlsx', scopes: BOARD_ONLY },
|
||||
{ key: 'quire', icon: 'fa-sitemap', label: 'Quire', path: 'export/quire', ext: 'csv', scopes: BOARD_ONLY },
|
||||
{ key: 'notion', icon: 'fa-table', label: 'Notion', path: 'export/notion', ext: 'csv', scopes: BOARD_ONLY },
|
||||
...[
|
||||
['trello', 'Trello'], ['jira', 'Jira'], ['deck', 'NextCloud Deck'],
|
||||
['openproject', 'OpenProject'], ['github', 'GitHub'], ['gitlab', 'GitLab'],
|
||||
['gitea', 'Gitea'], ['forgejo', 'Forgejo'], ['asana', 'Asana'],
|
||||
['zenkit', 'Zenkit'], ['taiga', 'Taiga'],
|
||||
].map(([format, label]) => ({
|
||||
key: format,
|
||||
icon: 'fa-upload',
|
||||
label,
|
||||
path: `export/${format}`,
|
||||
ext: 'json',
|
||||
scopes: BOARD_ONLY,
|
||||
{ key: 'teamwork', icon: 'fa-table', label: 'Teamwork.com', path: 'export/teamwork', ext: 'xlsx' },
|
||||
{ key: 'businessmap', icon: 'fa-table', label: 'Businessmap (Kanbanize)', path: 'export/businessmap', ext: 'xlsx' },
|
||||
{ key: 'quire', icon: 'fa-sitemap', label: 'Quire', path: 'export/quire', ext: 'csv' },
|
||||
{ key: 'notion', icon: 'fa-table', label: 'Notion', path: 'export/notion', ext: 'csv' },
|
||||
...EXTERNAL_JSON_FILE_FORMATS.map(({ key, label, boardOnly }) => ({
|
||||
key, label, icon: key === 'taskwarrior' ? 'fa-terminal' : 'fa-upload', path: `export/${key}`, ext: 'json',
|
||||
...(boardOnly ? { scopes: BOARD_ONLY } : {}),
|
||||
})),
|
||||
],
|
||||
},
|
||||
@@ -336,6 +329,11 @@ function isBoardScope() {
|
||||
}
|
||||
|
||||
function entryApplies(entry) {
|
||||
if (SCOPED_EXTERNAL_EXPORT_FORMATS.includes(entry.key)) {
|
||||
const { cardId, listId, swimlaneId, checklistId } = Template.currentData() || {};
|
||||
const scope = Object.fromEntries(Object.entries({ cardId, listId, swimlaneId, checklistId }).filter(([, id]) => id));
|
||||
return externalExportScope(entry.key, scope) !== null;
|
||||
}
|
||||
return !entry.scopes || entry.scopes.includes('board') === isBoardScope();
|
||||
}
|
||||
|
||||
@@ -343,6 +341,7 @@ function entryApplies(entry) {
|
||||
// carries its URL; the response supplies its localized, scope-aware filename.
|
||||
// A group whose every entry is out of scope is dropped, heading and all.
|
||||
function resolvedFormatGroups() {
|
||||
const ownerName = cleanPart(Template.currentData()?.title, 'WeKan');
|
||||
return EXPORT_FORMAT_GROUPS
|
||||
.filter(group => !group.scopes || group.scopes.includes('board') === isBoardScope())
|
||||
.map(group => ({
|
||||
@@ -355,6 +354,8 @@ function resolvedFormatGroups() {
|
||||
? `${entry.labelPrefix} (${TAPi18n.__(entry.labelKey)})`
|
||||
: TAPi18n.__(entry.labelKey))
|
||||
: entry.label,
|
||||
downloadName: /^export\/[a-z]+$/.test(entry.path || '') && entry.path !== 'export/csv'
|
||||
? `${ownerName}-${entry.key}.${exportFileExtension(entry.key)}` : '',
|
||||
url: entry.path ? exportUrl(`/api/boards/:boardId/${entry.path}`, entry.query || {}) : '',
|
||||
})),
|
||||
}))
|
||||
@@ -405,6 +406,15 @@ const scopeHelpers = {
|
||||
importBusy() { return importState.get('busy'); },
|
||||
importError() { return importState.get('error'); },
|
||||
importDone() { return importState.get('done'); },
|
||||
scopedImportFileLabels() {
|
||||
return Object.values(SCOPED_FILE_FORMATS).filter(format => format.providers)
|
||||
.map(({ label, providers }) => `${label} (${providers.join(', ')})`).join(', ');
|
||||
},
|
||||
scopedImportFileAccept() {
|
||||
return Object.entries(SCOPED_FILE_FORMATS)
|
||||
.flatMap(([extension, { mimeType }]) => mimeType ? [`.${extension}`, mimeType] : []).join(',');
|
||||
},
|
||||
scopedJsonFormatNames() { return SCOPED_EXTERNAL_JSON_FORMATS.map(({ label, importLabel }) => importLabel || label).join(', '); },
|
||||
exportFields() {
|
||||
return BOARD_EXPORT_FIELDS.map(({ field, label }) => ({
|
||||
field,
|
||||
@@ -426,6 +436,98 @@ const scopeHelpers = {
|
||||
// One helper object, registered on both halves: the checkbox list is its own
|
||||
// template so the layout can put it in a pane, and it asks the same questions.
|
||||
Template.exportScopeBody.helpers(scopeHelpers);
|
||||
Template.exportScopeBody.onCreated(function () {
|
||||
this.people = new ReactiveDict();
|
||||
this.apiService = new ReactiveVar(null);
|
||||
});
|
||||
|
||||
function scopedImportTarget(data) {
|
||||
return { boardId: Session.get('currentBoard'), ...currentScope(data), ...(data.cardId ? { cardId: data.cardId } : {}) };
|
||||
}
|
||||
|
||||
async function applyScopedDocument(template, doc, target, attachmentAuth, peopleMode, fields) {
|
||||
template.pendingImport = null;
|
||||
template.people.set('rows', []);
|
||||
if (peopleMode === 'review') {
|
||||
const rows = await importJsonDocument(doc, target, null, { preview: true }, fields);
|
||||
if (template.view.isDestroyed) return;
|
||||
if (rows.length) {
|
||||
template.pendingImport = { doc, target, attachmentAuth, fields };
|
||||
template.people.set('rows', rows);
|
||||
return;
|
||||
}
|
||||
}
|
||||
showImportCounts(await importJsonDocument(doc, target, attachmentAuth, peopleMode === 'me', fields));
|
||||
}
|
||||
|
||||
Template.exportScopeBody.helpers({
|
||||
directApiExportServices() {
|
||||
if (Meteor.settings.public?.sandstorm || Template.currentData()?.checklistId) return [];
|
||||
const target = scopedImportTarget(Template.currentData() || {});
|
||||
return DIRECT_API_EXPORT_SERVICES.map(service => ({ ...service, target }));
|
||||
},
|
||||
scopedApiServices() {
|
||||
return Meteor.settings.public?.sandstorm ? [] : BOARD_API_IMPORT_SERVICES;
|
||||
},
|
||||
scopedApiImportSelection() {
|
||||
const template = Template.instance();
|
||||
const choice = template.apiService.get();
|
||||
if (!choice) return [];
|
||||
const { service, target } = choice;
|
||||
return [{ _id: service, service, scopedImport: async ({ id, credentials, fields }) => {
|
||||
if (importState.get('busy')) return;
|
||||
const peopleMode = template.find('.js-scoped-import-people-mode')?.value;
|
||||
const { token, url = '', username = '' } = credentials;
|
||||
const attachmentAuth = token ? { token, url, username } : null;
|
||||
importState.set('error', '');
|
||||
importState.set('done', '');
|
||||
importState.set('busy', true);
|
||||
try {
|
||||
let doc;
|
||||
let checkpointKey;
|
||||
if (service === 'notionapi') {
|
||||
checkpointKey = JSON.stringify([Meteor.userId(), id, fields, target]);
|
||||
const remembered = template.notionImportProgress;
|
||||
const progress = remembered?.key === checkpointKey && remembered.token === token
|
||||
? remembered.progress : await restoreNotionImportProgress(checkpointKey, token);
|
||||
if (template.view.isDestroyed) return;
|
||||
let complete = false;
|
||||
doc = await fetchNotionImportBatches(cursor => Meteor.callAsync('apiImportFetch', service, credentials, id, fields, cursor), 8, {
|
||||
progress,
|
||||
onProgress: async next => {
|
||||
complete = next.cursor === null;
|
||||
template.notionImportProgress = { key: checkpointKey, token, progress: next };
|
||||
await saveNotionImportProgress(checkpointKey, token, next);
|
||||
},
|
||||
});
|
||||
if (!complete) throw new Error(TAPi18n.__('history-request-retry'));
|
||||
} else {
|
||||
doc = await Meteor.callAsync('apiImportFetch', service, credentials, id, fields);
|
||||
}
|
||||
if (!template.view.isDestroyed) {
|
||||
await applyScopedDocument(template, { scopedApiSource: service, scopedApiDocument: doc }, target, attachmentAuth, peopleMode, fields);
|
||||
if (checkpointKey) {
|
||||
template.notionImportProgress = null;
|
||||
await saveNotionImportProgress(checkpointKey, token, null);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
importState.set('busy', false);
|
||||
}
|
||||
} }];
|
||||
},
|
||||
canMapImportedPeople() {
|
||||
return Boolean(ReactiveCache.getBoard(Session.get('currentBoard'))?.hasAdmin(Meteor.userId()));
|
||||
},
|
||||
importedPeople() { return Template.instance().people.get('rows'); },
|
||||
importMemberChoices() {
|
||||
const board = ReactiveCache.getBoard(Session.get('currentBoard'));
|
||||
return (board?.members || []).filter(member => member.isActive).map(({ userId }) => {
|
||||
const user = ReactiveCache.getUser(userId);
|
||||
return { userId, name: user?.profile?.fullname || user?.username || userId };
|
||||
});
|
||||
},
|
||||
});
|
||||
Template.exportScopeSelect.helpers(scopeHelpers);
|
||||
|
||||
// THE TOGGLES, BOUND ON THE DOCUMENT - and deliberately not as a template event
|
||||
@@ -480,35 +582,54 @@ Meteor.startup(() => {
|
||||
}, true);
|
||||
});
|
||||
|
||||
function showImportCounts(counts) {
|
||||
importState.set('done', Object.entries(counts || {})
|
||||
.filter(([, n]) => n > 0)
|
||||
.map(([what, n]) => `${n} ${what}`)
|
||||
.join(', ') || '0');
|
||||
}
|
||||
|
||||
Template.exportScopeBody.events({
|
||||
async 'change .js-import-file'(event) {
|
||||
'change .js-scoped-import-api-service'(event, template) {
|
||||
const service = event.currentTarget.value;
|
||||
template.apiService.set(service ? { service, target: scopedImportTarget(Template.currentData() || {}) } : null);
|
||||
},
|
||||
async 'change .js-import-file'(event, template) {
|
||||
const file = event.currentTarget.files && event.currentTarget.files[0];
|
||||
if (!file) return;
|
||||
const data = Template.currentData() || {};
|
||||
const target = {
|
||||
boardId: Session.get('currentBoard'),
|
||||
...currentScope(),
|
||||
};
|
||||
// A card's menu imports below THAT card, so the target is the card the popup
|
||||
// was opened on - the same id the export side uses as its scope.
|
||||
if (data.cardId) target.cardId = data.cardId;
|
||||
if (importState.get('busy')) {
|
||||
event.currentTarget.value = '';
|
||||
return;
|
||||
}
|
||||
template.pendingImport = null;
|
||||
template.people.set('rows', []);
|
||||
const target = scopedImportTarget(Template.currentData() || {});
|
||||
|
||||
importState.set('error', '');
|
||||
importState.set('done', '');
|
||||
importState.set('busy', true);
|
||||
const tokenField = template.find('.js-scoped-import-token');
|
||||
const token = tokenField?.value;
|
||||
const peopleMode = template.find('.js-scoped-import-people-mode')?.value;
|
||||
const fields = selectedFields();
|
||||
if (tokenField) tokenField.value = '';
|
||||
const attachmentAuth = token ? {
|
||||
url: template.find('.js-scoped-import-url')?.value.trim() || '',
|
||||
username: template.find('.js-scoped-import-username')?.value.trim() || '',
|
||||
token,
|
||||
} : null;
|
||||
try {
|
||||
const counts = String(file.name || '').toLowerCase().endsWith('.zip')
|
||||
if (isArchiveImport(file)) {
|
||||
// A .zip goes to the server AS A FILE. Unpacking it here and sending
|
||||
// base64 over DDP is what made a large archive expensive: 2 GB of
|
||||
// attachments became 2.7 GB in one message. The route streams it to
|
||||
// disk, reads the archive's directory, and pipes one attachment at a
|
||||
// time into storage.
|
||||
? await uploadZipImport(file, target)
|
||||
: await importJsonDocument(await readExportFile(file), target);
|
||||
importState.set('done', Object.entries(counts || {})
|
||||
.filter(([, n]) => n > 0)
|
||||
.map(([what, n]) => `${n} ${what}`)
|
||||
.join(', ') || '0');
|
||||
showImportCounts(await uploadZipImport(file, target));
|
||||
return;
|
||||
}
|
||||
const doc = await readExportFile(file);
|
||||
await applyScopedDocument(template, doc, target, attachmentAuth, peopleMode, fields);
|
||||
} catch (error) {
|
||||
const message = error && error.message === 'import-not-wekan-export'
|
||||
? 'import-not-wekan-export'
|
||||
@@ -522,6 +643,30 @@ Template.exportScopeBody.events({
|
||||
event.currentTarget.value = '';
|
||||
}
|
||||
},
|
||||
async 'submit .js-scoped-import-people'(event, template) {
|
||||
event.preventDefault();
|
||||
const pending = template.pendingImport;
|
||||
if (!pending || importState.get('busy')) return;
|
||||
const mapping = [...event.currentTarget.querySelectorAll('select[data-source]')]
|
||||
.filter(select => select.value)
|
||||
.map(select => ({ source: select.dataset.source, userId: select.value }));
|
||||
template.pendingImport = null;
|
||||
template.people.set('rows', []);
|
||||
importState.set('busy', true);
|
||||
try {
|
||||
showImportCounts(await importJsonDocument(pending.doc, pending.target, pending.attachmentAuth, { mapping }, pending.fields));
|
||||
} catch (error) {
|
||||
importState.set('error', 'import-scoped-failed');
|
||||
console.error('scoped import failed', error);
|
||||
} finally {
|
||||
importState.set('busy', false);
|
||||
}
|
||||
},
|
||||
'click .js-cancel-scoped-import-people'(event, template) {
|
||||
event.preventDefault();
|
||||
template.pendingImport = null;
|
||||
template.people.set('rows', []);
|
||||
},
|
||||
});
|
||||
|
||||
// "Export all boards" (server/routes/exportAllBoards.js): the formats of this
|
||||
@@ -534,7 +679,10 @@ function massExportFormats() {
|
||||
EXPORT_FORMAT_GROUPS.forEach(group => group.entries.forEach(entry => {
|
||||
if (entry.key === 'excel') out.push({ key: 'excel', label: 'Excel' });
|
||||
else if (['csv', 'scsv', 'tsv'].includes(entry.key)) out.push({ key: entry.key, label: entry.key === 'tsv' ? 'TSV' : `CSV ${entry.label}` });
|
||||
else if (/^export\/[a-z]+$/.test(entry.path || '') && entry.path !== 'export/csv') out.push({ key: entry.path.slice(7), label: entry.label });
|
||||
else if (/^export\/[a-z]+$/.test(entry.path || '') && entry.path !== 'export/csv') {
|
||||
const key = entry.path.slice(7);
|
||||
if (!SINGLE_BOARD_STREAMING_FORMATS.includes(key)) out.push({ key, label: entry.label });
|
||||
}
|
||||
}));
|
||||
return out;
|
||||
}
|
||||
@@ -556,3 +704,119 @@ export {
|
||||
massExportUrl,
|
||||
exportUrl as exportUrlFor,
|
||||
};
|
||||
|
||||
|
||||
Template.directApiExport.onCreated(function () {
|
||||
this.state = new ReactiveDict();
|
||||
});
|
||||
|
||||
Template.directApiExport.helpers({
|
||||
credentialFields() {
|
||||
return Template.currentData().fields.map(field => ({
|
||||
...field,
|
||||
type: field.secret ? 'password' : (field.name === 'url' ? 'url' : 'text'),
|
||||
showEmail: field.name === 'username',
|
||||
}));
|
||||
},
|
||||
exportBusy() { return Template.instance().state.get('busy'); },
|
||||
exportProjects() { return Template.instance().state.get('projects'); },
|
||||
exportMessage() { return Template.instance().state.get('message'); },
|
||||
exportResult() { return Template.instance().state.get('result'); },
|
||||
dependencyResult(result) {
|
||||
if (typeof result?.createdDependencies !== 'number') return '';
|
||||
const counts = [`${TAPi18n.__('completed')} ${result.createdDependencies}`];
|
||||
if (result.skippedDependencies) counts.push(`${TAPi18n.__('sync-report-skipped')} ${result.skippedDependencies}`);
|
||||
const failure = result.dependencyFailure;
|
||||
if (failure) {
|
||||
counts.push(failure.outcome === 'unknown' ? TAPi18n.__('flow-unknown') : `${TAPi18n.__('error')} ${failure.status}`);
|
||||
if (failure.remaining) counts.push(`${TAPi18n.__('pending')} ${failure.remaining}`);
|
||||
}
|
||||
return `${TAPi18n.__('card-dependencies')}: ${counts.join(' · ')}`;
|
||||
},
|
||||
exportUnknown() { return Template.instance().state.get('result')?.outcome === 'unknown'; },
|
||||
issueTypes() { return (Template.instance().state.get('issueTypes') || []).filter(type => !type.subtask); },
|
||||
subtaskTypes() {
|
||||
return !Template.currentData().target.cardId && selection.get('subtasks')
|
||||
? (Template.instance().state.get('issueTypes') || []).filter(type => type.subtask)
|
||||
: [];
|
||||
},
|
||||
canSubmitExport() {
|
||||
return !Template.currentData().directExport.issueTypes || Template.instance().state.get('issueTypes')?.some(type => !type.subtask);
|
||||
},
|
||||
});
|
||||
|
||||
function directExportCredentials(form, fields) {
|
||||
return Object.fromEntries(fields.map(({ name }) => [name, form.elements.namedItem(name).value])
|
||||
.filter(([, value]) => value !== ''));
|
||||
}
|
||||
|
||||
async function runDirectExportRequest(template, request, onFailure = 'error') {
|
||||
const { state } = template;
|
||||
state.set({ busy: true, message: '', result: null });
|
||||
try {
|
||||
const update = await request();
|
||||
if (!template.view.isDestroyed) state.set(update);
|
||||
} catch (error) {
|
||||
if (!template.view.isDestroyed) {
|
||||
state.set('message', error.error === 'invocation-failed' ? onFailure : 'error');
|
||||
}
|
||||
} finally {
|
||||
if (!template.view.isDestroyed) state.set('busy', false);
|
||||
}
|
||||
}
|
||||
|
||||
Template.directApiExport.events({
|
||||
'input input'(event, template) {
|
||||
template.state.set({ projects: [], issueTypes: [] });
|
||||
},
|
||||
async 'change select[name=project]'(event, template) {
|
||||
const { fields: credentialFields, directExport, target: { boardId, ...scope } } = Template.currentData();
|
||||
if (!directExport.issueTypes || template.state.get('busy')) return;
|
||||
const project = event.currentTarget.value;
|
||||
template.state.set('issueTypes', []);
|
||||
if (!project) {
|
||||
template.state.set('message', '');
|
||||
return;
|
||||
}
|
||||
const credentials = directExportCredentials(event.currentTarget.form, credentialFields);
|
||||
await runDirectExportRequest(template, async () => {
|
||||
const issueTypes = await Meteor.callAsync(directExport.listMethod, boardId, scope, credentials, project);
|
||||
return { issueTypes, message: issueTypes.length ? '' : 'no-results' };
|
||||
});
|
||||
},
|
||||
async 'submit form'(event, template) {
|
||||
event.preventDefault();
|
||||
if (template.state.get('busy')) return;
|
||||
const form = event.currentTarget;
|
||||
const submitter = event.submitter || event.originalEvent?.submitter;
|
||||
const { fields: credentialFields, directExport, target: { boardId, ...scope } } = Template.currentData();
|
||||
const credentials = directExportCredentials(form, credentialFields);
|
||||
if (submitter?.value !== 'export') {
|
||||
template.state.set({ projects: [], issueTypes: [] });
|
||||
await runDirectExportRequest(template, async () => {
|
||||
const projects = await Meteor.callAsync(directExport.listMethod, boardId, scope, credentials);
|
||||
return { projects, message: projects.length ? '' : 'no-results' };
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const projectId = form.elements.namedItem('project')?.value;
|
||||
const issueType = form.elements.namedItem('issueType')?.value;
|
||||
const subtaskType = form.elements.namedItem('subtaskType')?.value;
|
||||
if (!projectId || (directExport.issueTypes && !issueType)) return;
|
||||
for (const { name, secret } of credentialFields) {
|
||||
if (secret) form.elements.namedItem(name).value = '';
|
||||
}
|
||||
template.state.set({ projects: [], issueTypes: [] });
|
||||
const fields = ['title', ...selectedFields().filter(field => directExport.fields.includes(field))];
|
||||
const args = [boardId, scope, credentials, projectId, ...(directExport.issueTypes ? [issueType] : []), fields];
|
||||
if (directExport.issueTypes && subtaskType) args.push(subtaskType);
|
||||
await runDirectExportRequest(template, async () => {
|
||||
const result = await Meteor.applyAsync(directExport.writeMethod, args, {
|
||||
noRetry: true,
|
||||
returnServerResultPromise: true,
|
||||
});
|
||||
return { result };
|
||||
}, 'flow-unknown');
|
||||
},
|
||||
});
|
||||
@@ -4,7 +4,7 @@
|
||||
.scrum-view form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding-block: 12px; }
|
||||
.scrum-view label { display: flex; flex-direction: column; gap: 4px; max-width: 100%; }
|
||||
.scrum-view textarea { resize: both; min-width: 140px; max-width: 100%; box-sizing: border-box; }
|
||||
.scrum-view select, .scrum-view input { max-width: 100%; box-sizing: border-box; }
|
||||
.scrum-view select, .scrum-view input:where(:not([type="checkbox"])) { max-width: 100%; box-sizing: border-box; }
|
||||
.scrum-view button { white-space: normal; height: auto; min-height: 32px; }
|
||||
.scrum-planning { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; }
|
||||
.scrum-table-scroll { max-width: 100%; overflow-x: auto; }
|
||||
@@ -17,22 +17,6 @@
|
||||
.scrum-metadata label { display: block; margin-block: 6px; }
|
||||
.scrum-metadata textarea { resize: both; max-width: 100%; box-sizing: border-box; }
|
||||
.scrum-field-settings label { gap: 8px; align-items: center; margin-block: 8px; }
|
||||
/* Scrum forms use labelled native checkboxes; global material form rules hide them. */
|
||||
.scrum-view input[type="checkbox"], .scrum-field-settings input[type="checkbox"] {
|
||||
display: inline-block;
|
||||
visibility: visible;
|
||||
position: static;
|
||||
inset-inline-start: auto;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
min-height: 0;
|
||||
flex: 0 0 16px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
appearance: auto;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.scrum-chart { margin-block: 16px; border-block-end: 1px solid currentColor; }
|
||||
.scrum-chart-row { margin: 12px 0; overflow-wrap: anywhere; }
|
||||
.scrum-chart-series { display: grid; grid-template-columns: minmax(100px, 1fr) 3fr; gap: 4px 12px; margin-block: 8px; }
|
||||
|
||||
@@ -212,11 +212,7 @@
|
||||
.shop-saved {
|
||||
color: #2e7d32;
|
||||
}
|
||||
/* The shop's forms use labelled native checkboxes and radio buttons, not the
|
||||
hidden material inputs of the rest of WeKan. */
|
||||
.shop-view input[type="checkbox"],
|
||||
.shop-view input[type="radio"],
|
||||
.shop-settings input[type="checkbox"] {
|
||||
.shop-view input[type="radio"] {
|
||||
display: inline-block;
|
||||
visibility: visible;
|
||||
position: static;
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
template(name="assigneeEffortBoardSettings")
|
||||
if allowed
|
||||
form.js-assignee-effort-settings
|
||||
h3 {{_ 'set-estimation'}}
|
||||
label
|
||||
input(name="enabled" type="checkbox" checked=settings.enabled)
|
||||
| {{_ 'assignees'}}
|
||||
label
|
||||
| {{_ 'scrum-estimate-unit'}}
|
||||
select(name="unit")
|
||||
option(value="hours" selected="{{$eq settings.unit 'hours'}}") {{_ 'hours'}}
|
||||
option(value="days" selected="{{$eq settings.unit 'days'}}") {{_ 'days'}}
|
||||
label
|
||||
| {{_ 'edit'}}
|
||||
select(name="writers")
|
||||
option(value="self" selected="{{$eq settings.writers 'self'}}") {{_ 'assignee'}}
|
||||
option(value="admins" selected="{{$eq settings.writers 'admins'}}") {{_ 'board-admin'}}
|
||||
option(value="members" selected="{{$eq settings.writers 'members'}}") {{_ 'all-board-members'}}
|
||||
if error
|
||||
p.warning(role="alert")= error
|
||||
button.primary(type="submit" disabled=busy) {{_ 'save'}}
|
||||
|
||||
template(name="assigneeEffortEditor")
|
||||
with effort
|
||||
section.card-details-section.assignee-effort
|
||||
h3 {{_ 'set-estimation'}}
|
||||
p
|
||||
| {{_ 'scrum-estimate'}} {{estimated}} {{unit}}
|
||||
| · {{_ 'estimated-time-remaining'}} {{remaining}} {{unit}}
|
||||
each row in rows
|
||||
form.js-assignee-effort-row(data-assignee-id=row.id)
|
||||
strong= row.name
|
||||
label
|
||||
| {{_ 'scrum-estimate'}} ({{unit}})
|
||||
input(type="number" name="estimated" min="0" step="any" value=row.estimated required disabled=row.readOnly)
|
||||
label
|
||||
| {{_ 'estimated-time-remaining'}} ({{unit}})
|
||||
input(type="number" name="remaining" min="0" step="any" value=row.remaining required disabled=row.readOnly)
|
||||
if row.editable
|
||||
button.primary(type="submit" disabled=busy) {{_ 'save'}}
|
||||
if row.hasValues
|
||||
button(type="submit" value="clear" formnovalidate disabled=busy) {{_ 'delete'}}
|
||||
if error
|
||||
p.warning(role="alert")= error
|
||||
@@ -0,0 +1,108 @@
|
||||
import './assigneeEffort.jade';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { ReactiveVar } from 'meteor/reactive-var';
|
||||
import { Session } from 'meteor/session';
|
||||
import { TAPi18n } from '/imports/i18n';
|
||||
import Boards from '/models/boards';
|
||||
import Cards from '/models/cards';
|
||||
const { memberCan } = require('/models/lib/boardRoleCapabilities');
|
||||
const {
|
||||
assigneeEffortSettings, activeAssigneeEffort, assigneeEffortTotals, assigneeEffortFromHours,
|
||||
} = require('/models/lib/assigneeEffort');
|
||||
|
||||
const boardAdmin = (board, userId) => (board?.members || []).some(member =>
|
||||
member.userId === userId && member.isActive !== false && member.isAdmin === true,
|
||||
);
|
||||
function boardSettings() {
|
||||
const boardId = Session.get('currentBoard');
|
||||
return boardId && Boards.findOne(boardId);
|
||||
}
|
||||
|
||||
async function save(template, method, ...args) {
|
||||
template.error.set('');
|
||||
template.busy.set(true);
|
||||
try {
|
||||
await Meteor.callAsync(method, ...args);
|
||||
} catch (error) {
|
||||
template.error.set(error.reason || error.message);
|
||||
} finally {
|
||||
template.busy.set(false);
|
||||
}
|
||||
}
|
||||
|
||||
for (const template of [Template.assigneeEffortBoardSettings, Template.assigneeEffortEditor]) {
|
||||
template.onCreated(function () {
|
||||
this.error = new ReactiveVar('');
|
||||
this.busy = new ReactiveVar(false);
|
||||
});
|
||||
template.helpers({
|
||||
error: () => Template.instance().error.get(),
|
||||
busy: () => Template.instance().busy.get(),
|
||||
});
|
||||
}
|
||||
|
||||
Template.assigneeEffortBoardSettings.helpers({
|
||||
allowed: () => boardAdmin(boardSettings(), Meteor.userId()),
|
||||
settings: () => assigneeEffortSettings(boardSettings()?.assigneeEffortSettings),
|
||||
});
|
||||
|
||||
Template.assigneeEffortBoardSettings.events({
|
||||
'submit .js-assignee-effort-settings'(event, template) {
|
||||
event.preventDefault();
|
||||
const board = boardSettings();
|
||||
if (!board) return;
|
||||
const { enabled, unit, writers } = event.currentTarget.elements;
|
||||
return save(template, 'assigneeEffort.settings', board._id, {
|
||||
enabled: enabled.checked, unit: unit.value, writers: writers.value,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
Template.assigneeEffortEditor.helpers({
|
||||
effort() {
|
||||
const card = Cards.findOne(this.cardId);
|
||||
if (!card || card.archived || card.deletedAt) return null;
|
||||
const board = Boards.findOne(card.boardId);
|
||||
const settings = assigneeEffortSettings(board?.assigneeEffortSettings);
|
||||
if (!settings.enabled || !card.assignees?.length) return null;
|
||||
const rows = activeAssigneeEffort(card);
|
||||
const byId = new Map(rows.map(row => [row.userId, row]));
|
||||
const totals = assigneeEffortTotals(rows);
|
||||
const display = hours => assigneeEffortFromHours(hours, settings.unit);
|
||||
const userId = Meteor.userId();
|
||||
const allowed = board?.members?.some(member => member.userId === userId && member.isActive === true) &&
|
||||
memberCan(board, userId, 'write');
|
||||
return {
|
||||
unit: TAPi18n.__(settings.unit),
|
||||
estimated: display(totals.estimatedHours),
|
||||
remaining: display(totals.remainingHours),
|
||||
rows: [...new Set(card.assignees)].map(id => {
|
||||
const row = byId.get(id);
|
||||
const editable = allowed && (settings.writers === 'members' ||
|
||||
(settings.writers === 'self' ? id === userId : boardAdmin(board, userId)));
|
||||
return {
|
||||
id, editable, readOnly: !editable,
|
||||
name: Meteor.users.findOne(id)?.username || id,
|
||||
estimated: row ? display(row.estimatedHours) : '',
|
||||
remaining: row ? display(row.remainingHours) : '',
|
||||
hasValues: !!row,
|
||||
};
|
||||
}),
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
Template.assigneeEffortEditor.events({
|
||||
'submit .js-assignee-effort-row'(event, template) {
|
||||
event.preventDefault();
|
||||
const card = Cards.findOne(template.data.cardId);
|
||||
if (!card) return;
|
||||
const form = event.currentTarget;
|
||||
const clear = event.originalEvent?.submitter?.value === 'clear' || event.submitter?.value === 'clear';
|
||||
const values = clear ? null : {
|
||||
estimated: form.elements.estimated.valueAsNumber,
|
||||
remaining: form.elements.remaining.valueAsNumber,
|
||||
};
|
||||
return save(template, 'assigneeEffort.set', card.boardId, card._id, form.dataset.assigneeId, values);
|
||||
},
|
||||
});
|
||||
@@ -193,6 +193,6 @@ template(name="attachmentActionsPopup")
|
||||
| {{_ 'add-background-image'}}
|
||||
|
||||
template(name="attachmentRenamePopup")
|
||||
input.js-edit-attachment-name(type='text' autofocus value="{{getNameWithoutExtension}}" dir="auto")
|
||||
input.js-edit-attachment-name(type='text' autofocus value="{{name}}" dir="auto")
|
||||
.edit-controls.clearfix
|
||||
button.primary.confirm.js-submit-edit-attachment-name(type="submit") {{_ 'save'}}
|
||||
@@ -8,7 +8,7 @@ import { generateUniversalAttachmentUrl } from '/models/lib/universalUrlGenerato
|
||||
import { canThumbnail, thumbnailUrl } from '/models/lib/attachmentThumbnail';
|
||||
import { liveAttachments } from '/models/lib/attachmentSoftDelete';
|
||||
import DOMPurify from 'dompurify';
|
||||
import { sanitizeHTML, sanitizeText } from '/imports/lib/secureDOMPurify';
|
||||
import { sanitizeHTML } from '/imports/lib/secureDOMPurify';
|
||||
import { openZipAttachment } from '/client/lib/zipAttachmentViewer';
|
||||
import { openOfficeAttachment } from '/client/lib/officeAttachmentViewer';
|
||||
import uploadProgressManager from '../../lib/uploadProgressManager';
|
||||
@@ -931,14 +931,6 @@ Template.attachmentActionsPopup.events({
|
||||
},
|
||||
});
|
||||
|
||||
Template.attachmentRenamePopup.helpers({
|
||||
getNameWithoutExtension() {
|
||||
// A literal suffix, never a RegExp built from the file's extension.
|
||||
const suffix = `.${this.extension}`;
|
||||
return this.name.endsWith(suffix) ? this.name.slice(0, -suffix.length) : this.name;
|
||||
},
|
||||
});
|
||||
|
||||
Template.attachmentRenamePopup.events({
|
||||
'keydown input.js-edit-attachment-name'(evt, tpl) {
|
||||
// enter = save
|
||||
@@ -949,14 +941,8 @@ Template.attachmentRenamePopup.events({
|
||||
'click button.js-submit-edit-attachment-name'(event, tpl) {
|
||||
// save button pressed
|
||||
event.preventDefault();
|
||||
// A migrated attachment can lack extensionWithDot; its extension is enough.
|
||||
const suffix = this.extensionWithDot || (this.extension ? `.${this.extension}` : '');
|
||||
const name = tpl.$('.js-edit-attachment-name')[0]
|
||||
.value
|
||||
.trim() + suffix;
|
||||
if (name === sanitizeText(name)) {
|
||||
Meteor.call('renameAttachment', this._id, name);
|
||||
}
|
||||
const name = tpl.find('.js-edit-attachment-name').value.trim();
|
||||
if (name) Meteor.call('renameAttachment', this._id, name);
|
||||
Popup.back();
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { dropdownPickerItems } from '/models/lib/customFieldsWD';
|
||||
import { formatDateForDisplay } from '/client/lib/dateDisplay';
|
||||
import { TAPi18n } from '/imports/i18n';
|
||||
import {
|
||||
@@ -429,6 +430,17 @@ Template['cardCustomField-currency'].events({
|
||||
});
|
||||
|
||||
// cardCustomField-date
|
||||
function storedCalendarDay(value) {
|
||||
const date = new Date(value);
|
||||
return value && isValidDate(date) ? date.toISOString().slice(0, 10) : undefined;
|
||||
}
|
||||
|
||||
// Translate the stored UTC calendar day into the local date picker's draft.
|
||||
function dateOnlyDraft(value) {
|
||||
const day = storedCalendarDay(value);
|
||||
return day ? new Date(day + 'T12:00:00') : new Date(NaN);
|
||||
}
|
||||
|
||||
Template['cardCustomField-date'].onCreated(function () {
|
||||
this.card = getCurrentCardFromContext();
|
||||
this.customFieldId = Template.currentData()._id;
|
||||
@@ -439,7 +451,8 @@ Template['cardCustomField-date'].onCreated(function () {
|
||||
self.view.onViewDestroyed(dateNowTicker.unsubscribe);
|
||||
|
||||
self.autorun(() => {
|
||||
self.date.set(new Date(Template.currentData().value));
|
||||
const { value, definition } = Template.currentData();
|
||||
self.date.set(definition?.settings?.openProjectDateOnly ? dateOnlyDraft(value) : new Date(value));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -455,10 +468,12 @@ Template['cardCustomField-date'].helpers({
|
||||
return user.isShowWeekOfYear();
|
||||
},
|
||||
showDate() {
|
||||
return formatDateForDisplay(Template.instance().date.get(), true);
|
||||
return formatDateForDisplay(Template.instance().date.get(), !this.definition?.settings?.openProjectDateOnly);
|
||||
},
|
||||
showISODate() {
|
||||
return Template.instance().date.get().toISOString();
|
||||
return this.definition?.settings?.openProjectDateOnly
|
||||
? storedCalendarDay(this.value)
|
||||
: Template.instance().date.get().toISOString();
|
||||
},
|
||||
classes() {
|
||||
const tpl = Template.instance();
|
||||
@@ -474,7 +489,9 @@ Template['cardCustomField-date'].helpers({
|
||||
// initial due date - so its tooltip is led by the field's own name, never by
|
||||
// the Start date's "Starts on".
|
||||
showTitle() {
|
||||
const date = formatDateForDisplay(Template.instance().date.get(), true, value => value.toLocaleString());
|
||||
const dateOnly = this.definition?.settings?.openProjectDateOnly;
|
||||
const date = formatDateForDisplay(Template.instance().date.get(), !dateOnly,
|
||||
value => dateOnly ? value.toLocaleDateString() : value.toLocaleString());
|
||||
const name = String(this.definition?.name || '').trim();
|
||||
return name ? `${name}: ${date}` : date;
|
||||
},
|
||||
@@ -490,8 +507,10 @@ Template['cardCustomField-date'].events({
|
||||
// cardCustomField-datePopup
|
||||
Template['cardCustomField-datePopup'].onCreated(function () {
|
||||
const data = Template.currentData();
|
||||
const dateOnly = Boolean(data.definition?.settings?.openProjectDateOnly);
|
||||
setupDatePicker(this, {
|
||||
initialDate: data.value ? data.value : undefined,
|
||||
dateOnly,
|
||||
initialDate: dateOnly ? dateOnlyDraft(data.value) : data.value || undefined,
|
||||
storeDate: (date, card) => card.setCustomField(data._id, date),
|
||||
deleteDate: card => card.setCustomField(data._id, ''),
|
||||
});
|
||||
@@ -510,8 +529,8 @@ Template['cardCustomField-dropdown'].onCreated(function () {
|
||||
const data = Template.currentData();
|
||||
this.card = getCurrentCardFromContext();
|
||||
this.customFieldId = data._id;
|
||||
this._items = data.definition.settings.dropdownItems;
|
||||
this.items = this._items.slice(0);
|
||||
this._items = data.definition.settings.dropdownItems || [];
|
||||
this.items = dropdownPickerItems(this._items);
|
||||
this.items.unshift({
|
||||
_id: '',
|
||||
name: TAPi18n.__('custom-field-dropdown-none'),
|
||||
@@ -563,7 +582,7 @@ Template['cardCustomField-dropdownMultiSelect'].onCreated(function () {
|
||||
|
||||
Template['cardCustomField-dropdownMultiSelect'].helpers({
|
||||
items() {
|
||||
return Template.instance()._items;
|
||||
return dropdownPickerItems(Template.instance()._items);
|
||||
},
|
||||
isChecked(itemId) {
|
||||
return Template.instance().checked.get().includes(itemId);
|
||||
|
||||
@@ -39,6 +39,18 @@ template(name="cardReceivedDate")
|
||||
template(name="cardStartDate")
|
||||
+dateBadgeBody(canModifyCard=canModifyCard baseClass="card-date" showTitle=showTitle classes=classes showISODate=showISODate showDate=showDate showWeekOfYear=showWeekOfYear showWeek=showWeek)
|
||||
|
||||
template(name="cardReminderDate")
|
||||
if showReminderControl
|
||||
.card-details-item.card-details-item-reminder
|
||||
h3.card-details-item-title
|
||||
i.fa.fa-bell-o
|
||||
| {{_ 'notifications'}}
|
||||
if card.reminderAt
|
||||
+dateBadgeBody(canModifyCard=canModifyCard titleKey="notifications" baseClass="card-date reminder-date" showISODate=reminderDateISO showDate=reminderDateText)
|
||||
else
|
||||
button.card-label.add-label.js-reminder-date(type="button" aria-label="{{_ 'notifications'}}" title="{{_ 'notifications'}}")
|
||||
i.fa.fa-plus
|
||||
|
||||
template(name="cardDueDate")
|
||||
+dateBadgeBody(canModifyCard=canModifyCard baseClass="card-date" showTitle=showTitle classes=classes showISODate=showISODate showDate=showDate showWeekOfYear=showWeekOfYear showWeek=showWeek)
|
||||
|
||||
@@ -72,6 +84,9 @@ template(name="editCardReceivedDatePopup")
|
||||
template(name="editCardStartDatePopup")
|
||||
+editDateForm(showDate=showDate showTime=showTime error=error datePicker=datePicker)
|
||||
|
||||
template(name="editCardReminderDatePopup")
|
||||
+editDateForm(showDate=showDate showTime=showTime error=error datePicker=datePicker)
|
||||
|
||||
template(name="editCardDueDatePopup")
|
||||
+editDateForm(showDate=showDate showTime=showTime error=error datePicker=datePicker)
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { TAPi18n } from '/imports/i18n';
|
||||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
import { Utils } from '/client/lib/utils';
|
||||
import { currentUserWith } from '/client/lib/currentUserWith';
|
||||
import {
|
||||
setupDatePicker,
|
||||
@@ -88,6 +89,42 @@ Template.editCardStartDatePopup.onRendered(function () {
|
||||
|
||||
Template.editCardStartDatePopup.helpers(datePickerHelpers());
|
||||
|
||||
Template.editCardReminderDatePopup.onCreated(function () {
|
||||
setupDatePicker(this, {
|
||||
defaultTime: formatDateTime(now()),
|
||||
initialDate: Template.currentData().reminderAt || undefined,
|
||||
storeDate(date, card) {
|
||||
return card.setReminder(date);
|
||||
},
|
||||
deleteDate(card) {
|
||||
return card.setReminder(null);
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
Template.editCardReminderDatePopup.onRendered(function () {
|
||||
datePickerRendered(this);
|
||||
});
|
||||
|
||||
Template.editCardReminderDatePopup.helpers(datePickerHelpers());
|
||||
|
||||
Template.cardReminderDate.helpers({
|
||||
showReminderControl() {
|
||||
const { card, canModifyCard } = Template.currentData();
|
||||
return canModifyCard || !!card.reminderAt;
|
||||
},
|
||||
reminderDateText() {
|
||||
return formatCardDateForDisplay(Template.currentData().card.reminderAt, true);
|
||||
},
|
||||
reminderDateISO() {
|
||||
return Template.currentData().card.reminderAt?.toISOString();
|
||||
},
|
||||
});
|
||||
|
||||
Template.cardReminderDate.events({
|
||||
'click .js-reminder-date, click .js-edit-date': openDateEditor('editCardReminderDate', { titleKey: 'notifications' }),
|
||||
});
|
||||
|
||||
// editCardDueDatePopup
|
||||
Template.editCardDueDatePopup.onCreated(function () {
|
||||
const card = Template.currentData();
|
||||
@@ -146,11 +183,11 @@ function cardFromDateContext(data = Template.currentData()) {
|
||||
// open the popup with THAT surrounding template's Card, not with the event's
|
||||
// `this`. The plus buttons do not need this because they already live directly
|
||||
// in cardDetails with the Card as their data context.
|
||||
function openDateEditor(name) {
|
||||
function openDateEditor(name, options) {
|
||||
return function (event, templateInstance) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
Popup.open(name).call(
|
||||
Popup.open(name, options).call(
|
||||
cardFromDateContext(templateInstance.data),
|
||||
event,
|
||||
templateInstance,
|
||||
@@ -328,7 +365,19 @@ for (const [kind, spec] of Object.entries(CARD_DATE_KINDS)) {
|
||||
this.date.set(new Date(spec.read(cardFromDateContext())));
|
||||
});
|
||||
});
|
||||
Template[name].helpers(cardDateHelpers(spec.helpers));
|
||||
const helpers = cardDateHelpers(spec.helpers);
|
||||
if (name.startsWith('minicard')) {
|
||||
helpers.showDate = function () {
|
||||
const tpl = Template.instance();
|
||||
const card = cardFromDateContext();
|
||||
const board = ReactiveCache.getBoard(card.boardId);
|
||||
const date = tpl.date.get();
|
||||
const formatted = formatCardDateForDisplay(date, board?.showMinicardDateTime !== false);
|
||||
if (kind !== 'Due' || board?.showMinicardDateRelative === false || card.getEnd()) return formatted;
|
||||
return formatted + ' (' + dueCountdownText(date, tpl.now.get()) + ')';
|
||||
};
|
||||
}
|
||||
Template[name].helpers(helpers);
|
||||
Template[name].events({
|
||||
'click .js-edit-date': openDateEditor(spec.editor),
|
||||
});
|
||||
@@ -346,7 +395,7 @@ Template.minicardCustomFieldDate.onCreated(function () {
|
||||
|
||||
Template.minicardCustomFieldDate.helpers(cardDateHelpers({
|
||||
showDate() {
|
||||
return formatCardDateForDisplay(Template.instance().date.get(), true);
|
||||
return formatCardDateForDisplay(Template.instance().date.get(), Utils.getCurrentBoard()?.showMinicardDateTime !== false);
|
||||
},
|
||||
showTitle() {
|
||||
const tpl = Template.instance();
|
||||
|
||||
@@ -1530,3 +1530,28 @@ body.desktop-mode .card-details.card-details-position-pending:not(.card-details-
|
||||
.card-details .card-details-section .card-details-item-text-notes {
|
||||
flex: 0 0 100%;
|
||||
}
|
||||
|
||||
/* Jira Cloud status labels show their text even without a color match. */
|
||||
.card-details div[data-jira-panel] {
|
||||
border-inline-start: 3px solid currentColor;
|
||||
margin-block: 0.75em;
|
||||
padding-inline-start: 0.75em;
|
||||
}
|
||||
|
||||
.card-details span[data-jira-status] {
|
||||
border: 1px solid var(--jira-status-color, currentColor);
|
||||
background-color: color-mix(in srgb, var(--jira-status-color, currentColor) 12%, transparent);
|
||||
border-radius: 0.3em;
|
||||
padding: 0.05em 0.35em;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.card-details span[data-jira-status^="blue/"] { --jira-status-color: #3b82f6; }
|
||||
.card-details span[data-jira-status^="green/"] { --jira-status-color: #22c55e; }
|
||||
.card-details span[data-jira-status^="purple/"] { --jira-status-color: #a855f7; }
|
||||
.card-details span[data-jira-status^="red/"] { --jira-status-color: #ef4444; }
|
||||
.card-details span[data-jira-status^="yellow/"] { --jira-status-color: #eab308; }
|
||||
|
||||
.card-details span[data-jira-cell-block] {
|
||||
display: block;
|
||||
}
|
||||
@@ -165,6 +165,7 @@ template(name="cardDetails")
|
||||
.card-details-left
|
||||
|
||||
.card-details-items
|
||||
+assigneeEffortEditor(cardId=_id)
|
||||
//- ONE SECTION MODEL (2026-10-28): the opened card draws Card Settings'
|
||||
sections (models/lib/cardSettingsSections.js) in the board's
|
||||
`cardSettingsSectionOrder` - the order Card Settings' Card pane shows
|
||||
@@ -224,6 +225,8 @@ template(name="cardDetails")
|
||||
gated nothing; Board Settings / Card now has its row and this is what
|
||||
the row hides.
|
||||
if currentBoard.allowsActivities
|
||||
if jiraIssueHistory.length
|
||||
+jiraSourceHistory(this)
|
||||
if currentUser.isBoardAdmin
|
||||
//- OUTSIDE .activity-title, which is `display: flex`: a rule inside it
|
||||
becomes a flex item and renders as a short line beside the heading
|
||||
@@ -245,6 +248,23 @@ template(name="cardDetails")
|
||||
else
|
||||
+activities(card=this mode="card")
|
||||
|
||||
template(name="jiraSourceHistory")
|
||||
details.jira-source-history
|
||||
summary Jira · {{_ 'history'}}
|
||||
ol
|
||||
each event in jiraIssueHistory
|
||||
li
|
||||
if event.created
|
||||
time(datetime=event.created) {{displayDate event.created 'LLL'}}
|
||||
if event.author
|
||||
span.jira-source-history-author {{event.author}}
|
||||
ul
|
||||
each change in event.changes
|
||||
li
|
||||
strong {{change.field}}
|
||||
if jiraHistoryHasValues change
|
||||
span {{jiraHistoryFrom change}} → {{jiraHistoryTo change}}
|
||||
|
||||
template(name="cardFieldSectionLabels")
|
||||
+cardSectionHeader(section="labels" icon="fa-tag" label="labels")
|
||||
if isSectionOpen "labels"
|
||||
@@ -258,7 +278,7 @@ template(name="cardFieldSectionLabels")
|
||||
a(class="{{#if canModifyCard}}js-add-labels{{else}}is-disabled{{/if}}" title="{{_ 'card-labels-title'}}")
|
||||
each labels
|
||||
//- Labels text, Show on Card: the words, or coloured chips without them.
|
||||
span.card-label(class="{{labelColorClass color}}" class="{{#if hiddenCardLabelText}}card-label-no-text{{/if}}" style="{{labelColorStyle color}}" title=name)
|
||||
span.card-label(class="{{labelColorClass color}}" class="{{#if hiddenCardLabelText}}card-label-no-text{{/if}}" style="{{labelColorStyle color}}" title="{{name}}{{#if jiraComponent.description}} — {{jiraComponent.description}}{{/if}}")
|
||||
unless hiddenCardLabelText
|
||||
+viewer
|
||||
= name
|
||||
@@ -395,6 +415,10 @@ template(name="cardFieldSectionDate")
|
||||
else
|
||||
span.card-details-forecast-text.quiet {{_ 'forecast-not-enough'}}
|
||||
|
||||
unless isLinkedBoard
|
||||
unless isLinkedCard
|
||||
+cardReminderDate(card=this canModifyCard=canModifyCard)
|
||||
|
||||
template(name="cardFieldSectionMembers")
|
||||
+cardSectionHeader(section="members" icon="fa-users" label="members")
|
||||
if isSectionOpen "members"
|
||||
@@ -406,7 +430,7 @@ template(name="cardFieldSectionMembers")
|
||||
if currentBoard.allowsMembers
|
||||
.card-details-item.card-details-item-members
|
||||
each userId in getMembers
|
||||
+userAvatar(userId=userId cardId=_id)
|
||||
+cardUserAvatar(userId=userId cardId=_id board=currentBoard side="card")
|
||||
| {{! XXX Hack to hide syntaxic coloration /// }}
|
||||
if canModifyCard
|
||||
unless currentUser.isWorker
|
||||
@@ -419,7 +443,7 @@ template(name="cardFieldSectionMembers")
|
||||
i.fa.fa-user
|
||||
| {{_ 'assignee'}}
|
||||
each userId in getAssignees
|
||||
+userAvatar(userId=userId cardId=_id assignee=true)
|
||||
+cardUserAvatar(userId=userId cardId=_id assignee=true board=currentBoard side="card")
|
||||
| {{! XXX Hack to hide syntaxic coloration /// }}
|
||||
if canModifyCard
|
||||
a.assignee.add-assignee.card-details-item-add-button.js-add-assignees(title="{{_ 'assignee'}}")
|
||||
@@ -436,7 +460,7 @@ template(name="cardFieldSectionMembers")
|
||||
i.fa.fa-user
|
||||
| {{_ 'creator'}}
|
||||
|
||||
+userAvatar(userId=userId noRemove=true)
|
||||
+cardUserAvatar(userId=userId noRemove=true board=currentBoard side="card")
|
||||
| {{! XXX Hack to hide syntaxic coloration /// }}
|
||||
|
||||
|
||||
@@ -455,7 +479,7 @@ template(name="cardFieldSectionMembers")
|
||||
+editCardRequesterForm
|
||||
else
|
||||
each userId in getRequesters
|
||||
+userAvatar(userId=userId cardId=_id noRemove=true)
|
||||
+cardUserAvatar(userId=userId cardId=_id noRemove=true board=currentBoard side="card")
|
||||
if getRequestedBy
|
||||
+viewer
|
||||
= getRequestedBy
|
||||
@@ -471,7 +495,7 @@ template(name="cardFieldSectionMembers")
|
||||
i.fa.fa-plus(aria-hidden="true")
|
||||
else
|
||||
each userId in getRequesters
|
||||
+userAvatar(userId=userId noRemove=true)
|
||||
+cardUserAvatar(userId=userId noRemove=true board=currentBoard side="card")
|
||||
if getRequestedBy
|
||||
+viewer
|
||||
= getRequestedBy
|
||||
@@ -488,7 +512,7 @@ template(name="cardFieldSectionMembers")
|
||||
+editCardAssignerForm
|
||||
else
|
||||
each userId in getAssigners
|
||||
+userAvatar(userId=userId cardId=_id noRemove=true)
|
||||
+cardUserAvatar(userId=userId cardId=_id noRemove=true board=currentBoard side="card")
|
||||
if getAssignedBy
|
||||
+viewer
|
||||
= getAssignedBy
|
||||
@@ -504,7 +528,7 @@ template(name="cardFieldSectionMembers")
|
||||
i.fa.fa-plus(aria-hidden="true")
|
||||
else
|
||||
each userId in getAssigners
|
||||
+userAvatar(userId=userId noRemove=true)
|
||||
+cardUserAvatar(userId=userId noRemove=true board=currentBoard side="card")
|
||||
if getAssignedBy
|
||||
+viewer
|
||||
= getAssignedBy
|
||||
@@ -625,6 +649,29 @@ template(name="cardFieldSectionTime")
|
||||
+cardSectionHeader(section="time" icon="fa-clock-o" label="time")
|
||||
if isSectionOpen "time"
|
||||
.card-details-group-body
|
||||
if visibleOpenProjectTimeEntries.length
|
||||
.card-details-item.openproject-time-entries
|
||||
h3.card-details-item-title OpenProject · {{_ 'time-entries'}}
|
||||
with openProjectBrowsePage
|
||||
p.openproject-time-entry-count {{_ 'showing'}} {{start}}–{{end}} {{_ 'of'}} {{total}}
|
||||
button.js-openproject-time-entries-page(type="button" data-direction="-1" disabled=previousDisabled) {{_ 'previous'}}
|
||||
button.js-openproject-time-entries-page(type="button" data-direction="1" disabled=nextDisabled) {{_ 'next'}}
|
||||
button.js-openproject-time-entries-close(type="button") {{_ 'close'}}
|
||||
+openProjectTimeEntryRows(entries=rows)
|
||||
else
|
||||
if openProjectTimeEntriesOmitted
|
||||
p.openproject-time-entry-count {{_ 'showing'}} {{visibleOpenProjectTimeEntries.length}} {{_ 'of'}} {{openProjectTimeEntryTotal}}
|
||||
if canExportOpenProjectTimeEntries
|
||||
button.js-browse-openproject-time-entries(type="button" disabled=openProjectBrowseLoading) {{_ 'view-all'}}
|
||||
unless exportDisabled
|
||||
button.js-export-openproject-time-entries(type="button" disabled=timeEntriesExportBusy) {{_ 'export-csv'}}
|
||||
if openProjectBrowseLoading
|
||||
p(role="status") {{_ 'loading'}}
|
||||
if openProjectBrowseError
|
||||
p.error(role="alert") {{_ 'error'}}
|
||||
if timeEntriesExportFailed
|
||||
p.error(role="alert") {{_ 'error'}}
|
||||
+openProjectTimeEntryRows(entries=visibleOpenProjectTimeEntries)
|
||||
each field in orderedTimeFields
|
||||
if $eq field "spentTime"
|
||||
if currentBoard.allowsSpentTime
|
||||
@@ -695,6 +742,14 @@ template(name="cardFieldSectionVote")
|
||||
else
|
||||
+cardSectionHeader(section="vote" icon="fa-thumbs-up" label="vote-question")
|
||||
if isSectionOpen "vote"
|
||||
if visibleJiraVoters.length
|
||||
.card-details-item.jira-synced-voters
|
||||
h3.card-details-item-title Jira · {{_ 'voting'}}
|
||||
ul
|
||||
each visibleJiraVoters
|
||||
li
|
||||
+userAvatar(userId=_id)
|
||||
span {{username}}
|
||||
if getVoteQuestion
|
||||
if getVoteEnd
|
||||
+voteEndDate
|
||||
@@ -1908,3 +1963,15 @@ template(name="cardDrawingPopup")
|
||||
rect.card-drawing-resize-handle.js-drawing-resize-handle(x=hx y=hy width=size height=size)
|
||||
title {{_ 'card-drawing-resize'}}
|
||||
span.card-drawing-canvas-resize.js-drawing-canvas-resize(role="separator" tabindex="0" title="{{_ 'card-drawing-resize-canvas'}}" aria-label="{{_ 'card-drawing-resize-canvas'}}")
|
||||
|
||||
template(name="openProjectTimeEntryRows")
|
||||
ul.time-entry-list
|
||||
each entry in entries
|
||||
li
|
||||
if entry.date
|
||||
span.time-entry-date {{entry.date}}
|
||||
span.time-entry-hours {{entry.hours}} {{_ 'workload-hours-short'}}
|
||||
if entry.author
|
||||
span.time-entry-who {{entry.author}}
|
||||
if entry.note
|
||||
span.time-entry-note {{entry.note}}
|
||||
@@ -11,6 +11,7 @@ import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
|
||||
import { ReactiveVar } from 'meteor/reactive-var';
|
||||
import { resolveShowCardLabelText } from '/client/lib/minicardLabelText';
|
||||
const { isCardFieldHiddenOnBoard } = require('/models/lib/cardFieldVisibility');
|
||||
const { syncSourceKey } = require('/models/lib/listSyncSourceIdentity');
|
||||
import { cardBoardView } from '/client/components/cards/cardAddFields';
|
||||
import { hasUnreadComments } from '/models/lib/unreadComments';
|
||||
import {
|
||||
@@ -737,6 +738,118 @@ Template.registerHelper('cardHasUnreadComments', function cardHasUnreadComments(
|
||||
const comments = ReactiveCache.getCardComments({ cardId: this._id }) || [];
|
||||
return comments.length > 0 && hasUnreadComments(comments, user.getCardLastViewedAt(this._id));
|
||||
});
|
||||
function visibleOpenProjectTimeEntries(card) {
|
||||
if (card?.syncSourceType !== 'openproject' || !card.openProjectTimeEntries?.length) return [];
|
||||
const list = typeof card.list === 'function' ? card.list() : null;
|
||||
const source = list?.syncSource;
|
||||
if (list?.archived || source?.type !== 'openproject' || source.enabled === false ||
|
||||
!source.fields?.includes('timeEntries')) return [];
|
||||
try {
|
||||
return syncSourceKey(source) === card.syncSourceKey ? card.openProjectTimeEntries : [];
|
||||
} catch {
|
||||
// A legacy or incomplete configuration cannot identify these rows.
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
const OPENPROJECT_ENTRY_PAGE_SIZE = 50;
|
||||
|
||||
Template.cardFieldSectionTime.onCreated(function () {
|
||||
this.timeEntriesExport = new ReactiveVar(null);
|
||||
this.timeEntriesBrowse = new ReactiveVar(null);
|
||||
this.autorun(() => {
|
||||
const card = Template.currentData();
|
||||
const list = card?.list?.();
|
||||
const key = card && Utils.canModifyCard(card) && visibleOpenProjectTimeEntries(card).length
|
||||
? JSON.stringify([card._id, card.syncSourceKey, list?.syncRevision]) : null;
|
||||
if (this.timeEntriesBrowseKey === key) return;
|
||||
this.timeEntriesBrowseKey = key;
|
||||
this.timeEntriesBrowse.set(null);
|
||||
});
|
||||
});
|
||||
Template.cardFieldSectionTime.helpers({
|
||||
canExportOpenProjectTimeEntries() {
|
||||
return this.openProjectTimeEntriesOmitted > 0 && !this.archived && Utils.canModifyCard(this);
|
||||
},
|
||||
timeEntriesExportBusy() {
|
||||
return Template.instance().timeEntriesExport.get() === 'loading';
|
||||
},
|
||||
timeEntriesExportFailed() {
|
||||
return Template.instance().timeEntriesExport.get() === 'error';
|
||||
},
|
||||
visibleOpenProjectTimeEntries() {
|
||||
return visibleOpenProjectTimeEntries(this);
|
||||
},
|
||||
openProjectBrowsePage() {
|
||||
const state = Template.instance().timeEntriesBrowse.get();
|
||||
if (!state?.entries) return null;
|
||||
const total = state.entries.length;
|
||||
const end = Math.min(total, state.offset + OPENPROJECT_ENTRY_PAGE_SIZE);
|
||||
return {
|
||||
rows: state.entries.slice(state.offset, end),
|
||||
start: total ? state.offset + 1 : 0, end, total,
|
||||
previousDisabled: state.offset === 0, nextDisabled: end >= total,
|
||||
};
|
||||
},
|
||||
openProjectBrowseLoading() {
|
||||
return Template.instance().timeEntriesBrowse.get()?.loading;
|
||||
},
|
||||
openProjectBrowseError() {
|
||||
return Template.instance().timeEntriesBrowse.get()?.error;
|
||||
},
|
||||
openProjectTimeEntryTotal() {
|
||||
return this.openProjectTimeEntries.length + this.openProjectTimeEntriesOmitted;
|
||||
},
|
||||
});
|
||||
|
||||
Template.cardFieldSectionTime.events({
|
||||
async 'click .js-browse-openproject-time-entries'(event, instance) {
|
||||
event.preventDefault();
|
||||
if (instance.timeEntriesBrowse.get()?.loading) return;
|
||||
const pending = { loading: true };
|
||||
instance.timeEntriesBrowse.set(pending);
|
||||
try {
|
||||
const entries = await Meteor.callAsync('browseOpenProjectCardTimeEntries', this._id);
|
||||
if (instance.view.isDestroyed || instance.timeEntriesBrowse.get() !== pending) return;
|
||||
instance.timeEntriesBrowse.set({ entries, offset: entries.length > 500 ? 500 : 0 });
|
||||
} catch {
|
||||
if (!instance.view.isDestroyed && instance.timeEntriesBrowse.get() === pending) {
|
||||
instance.timeEntriesBrowse.set({ error: true });
|
||||
}
|
||||
}
|
||||
},
|
||||
'click .js-openproject-time-entries-close'(event, instance) {
|
||||
instance.timeEntriesBrowse.set(null);
|
||||
},
|
||||
'click .js-openproject-time-entries-page'(event, instance) {
|
||||
const state = instance.timeEntriesBrowse.get();
|
||||
if (!state?.entries) return;
|
||||
const delta = Number(event.currentTarget.dataset.direction) * OPENPROJECT_ENTRY_PAGE_SIZE;
|
||||
const offset = state.offset + delta;
|
||||
if (offset >= 0 && offset < state.entries.length) instance.timeEntriesBrowse.set({ ...state, offset });
|
||||
},
|
||||
async 'click .js-export-openproject-time-entries'(event, instance) {
|
||||
event.preventDefault();
|
||||
if (instance.timeEntriesExport.get() === 'loading') return;
|
||||
instance.timeEntriesExport.set('loading');
|
||||
try {
|
||||
const csv = await Meteor.callAsync('exportOpenProjectCardTimeEntries', this._id);
|
||||
if (instance.view.isDestroyed) return;
|
||||
const url = URL.createObjectURL(new Blob([csv], { type: 'text/csv;charset=utf-8' }));
|
||||
const link = document.createElement('a');
|
||||
link.href = url;
|
||||
link.download = 'openproject-time-entries.csv';
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
link.remove();
|
||||
setTimeout(() => URL.revokeObjectURL(url), 1000);
|
||||
instance.timeEntriesExport.set(null);
|
||||
} catch {
|
||||
if (!instance.view.isDestroyed) instance.timeEntriesExport.set('error');
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Template.registerHelper('cardListTitle', function cardListTitle() {
|
||||
const list = typeof this.list === 'function' ? this.list() : null;
|
||||
return list && list.title;
|
||||
@@ -945,7 +1058,7 @@ function cardSectionHasContent(card, board, id) {
|
||||
|| (board.allowsSwimlaneNameOnCard && swimlane && swimlane.title)
|
||||
|| (board.allowsCardButtonsOnCard !== false && cardHasButtons(card)));
|
||||
}
|
||||
case 'time': return Boolean(board.allowsSpentTime || board.allowsFlowtime || board.allowsPomodoro);
|
||||
case 'time': return Boolean(visibleOpenProjectTimeEntries(card).length || board.allowsSpentTime || board.allowsFlowtime || board.allowsPomodoro);
|
||||
case 'customFields': return may && board.allowsCustomFields !== false;
|
||||
case 'vote': return Boolean(board.allowsVote);
|
||||
case 'poker': return Boolean(board.allowsPoker);
|
||||
@@ -1142,6 +1255,18 @@ function isCardSectionOpen(section) {
|
||||
return state === undefined ? true : state;
|
||||
}
|
||||
|
||||
Template.jiraSourceHistory.helpers({
|
||||
jiraHistoryHasValues(change) {
|
||||
return ['fromString', 'from', 'toString', 'to'].some(key => change[key] !== undefined);
|
||||
},
|
||||
jiraHistoryFrom(change) {
|
||||
return change.fromString ?? change.from ?? '—';
|
||||
},
|
||||
jiraHistoryTo(change) {
|
||||
return change.toString ?? change.to ?? '—';
|
||||
},
|
||||
});
|
||||
|
||||
Template.registerHelper('isSectionOpen', isCardSectionOpen);
|
||||
|
||||
// "Attachments (3)" - the count the heading carried before it became a section,
|
||||
@@ -1976,6 +2101,25 @@ Template.cardSubtasksMenuPopup.events({
|
||||
Popup.open('boardSubtaskSettings')(event);
|
||||
},
|
||||
});
|
||||
Template.cardFieldSectionVote.helpers({
|
||||
visibleJiraVoters() {
|
||||
if (this.syncSourceType !== 'jira' || !this.jiraSyncedVoterIds?.length) return [];
|
||||
const list = this.list?.();
|
||||
const source = list?.syncSource;
|
||||
if (list?.archived || source?.type !== 'jira' || source.enabled === false ||
|
||||
!source.fields?.includes('jiraVoterIdentities')) return [];
|
||||
try {
|
||||
if (syncSourceKey(source) !== this.syncSourceKey) return [];
|
||||
} catch {
|
||||
return [];
|
||||
}
|
||||
const board = ReactiveCache.getBoard(this.boardId);
|
||||
const active = new Set((board?.members || []).filter(member => member?.isActive === true).map(member => member.userId));
|
||||
return this.jiraSyncedVoterIds.filter(id => active.has(id))
|
||||
.map(id => ReactiveCache.getUser(id)).filter(Boolean);
|
||||
},
|
||||
});
|
||||
|
||||
Template.cardFieldSectionVote.events({
|
||||
'click .js-section-edit-voting': Popup.open('cardStartVoting'),
|
||||
});
|
||||
|
||||
@@ -1,20 +1,4 @@
|
||||
/* The Kanban and Scrum flow fields (docs/Features/Cards/Flow-Fields.md). */
|
||||
/* Blocked is a labelled native checkbox; the app-wide material form rule hides
|
||||
native checkboxes three ways (display, visibility, an offset), so all three
|
||||
are undone, as in scrumView.css. */
|
||||
.card-flow-blocked-toggle input[type="checkbox"] {
|
||||
display: inline-block;
|
||||
visibility: visible;
|
||||
position: static;
|
||||
inset-inline-start: auto;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
min-height: 0;
|
||||
margin: 0;
|
||||
margin-inline-end: 4px;
|
||||
padding: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.card-details-item-flow-blocked.is-blocked .card-details-item-title,
|
||||
.card-flow-blocked-text {
|
||||
color: #c0392b;
|
||||
|
||||
@@ -32,10 +32,14 @@ template(name="cardTimeEntries")
|
||||
label(for="time-entry-date") {{_ 'date'}}
|
||||
input#time-entry-date(type="date" name="date" value=today required)
|
||||
label(for="time-entry-hours") {{_ 'hours'}}
|
||||
input#time-entry-hours(type="number" name="hours" min="0.01" max="1000" step="0.25" required)
|
||||
input#time-entry-hours(type="number" name="hours" min="0.0001" max="1000" step="any" required)
|
||||
label(for="time-entry-note") {{_ 'workload-note'}}
|
||||
input#time-entry-note(type="text" name="note" maxlength="500")
|
||||
button.primary(type="submit") {{_ 'time-entry-log'}}
|
||||
if editingEntry
|
||||
button.primary(type="submit" disabled=savingEntry) {{_ 'save'}}
|
||||
button.js-time-entry-cancel(type="button" disabled=savingEntry) {{_ 'cancel'}}
|
||||
else
|
||||
button.primary(type="submit" disabled=savingEntry) {{_ 'time-entry-log'}}
|
||||
if entryError
|
||||
.warning {{entryError}}
|
||||
if entries.length
|
||||
@@ -61,6 +65,8 @@ template(name="cardTimeEntries")
|
||||
| {{_ 'time-entry-rejected'}}
|
||||
if entry.approvalNote
|
||||
| : {{entry.approvalNote}}
|
||||
if entry.editable
|
||||
button.js-time-entry-edit(type="button" data-id=entry._id disabled=savingEntry) {{_ 'edit'}}
|
||||
if entry.invoiced
|
||||
span.time-entry-invoiced(title="{{_ 'time-entry-invoiced'}}")
|
||||
i.fa.fa-file-text-o
|
||||
|
||||
@@ -120,9 +120,15 @@ Template.cardSpentTime.events({
|
||||
// The card's time by day (server/timeEntries.js).
|
||||
Template.cardTimeEntries.onCreated(function () {
|
||||
this.entries = new ReactiveVar([]);
|
||||
this.editingId = new ReactiveVar(null);
|
||||
this.saving = new ReactiveVar(false);
|
||||
this.resetEntry = () => {
|
||||
this.editingId.set(null);
|
||||
const form = this.find('.js-time-entry-add');
|
||||
if (form) form.reset();
|
||||
};
|
||||
this.error = new ReactiveVar('');
|
||||
this.load = () => {
|
||||
const { cardId } = Template.currentData() || {};
|
||||
this.load = (cardId = this.data?.cardId) => {
|
||||
if (!cardId) return Promise.resolve();
|
||||
return Meteor.callAsync('timeEntriesOfCard', cardId)
|
||||
.then(result => { this.entries.set(result.entries); this.error.set(''); })
|
||||
@@ -139,6 +145,8 @@ Template.cardTimeEntries.onCreated(function () {
|
||||
Template.cardTimeEntries.helpers({
|
||||
entries: () => Template.instance().entries.get(),
|
||||
entryError: () => Template.instance().error.get(),
|
||||
editingEntry: () => !!Template.instance().editingId.get(),
|
||||
savingEntry: () => Template.instance().saving.get(),
|
||||
today: () => new Date().toISOString().slice(0, 10),
|
||||
});
|
||||
|
||||
@@ -148,9 +156,34 @@ Template.cardTimeEntries.events({
|
||||
const form = evt.currentTarget;
|
||||
const entry = { date: form.elements.date.value, hours: parseFloat(form.elements.hours.value) };
|
||||
if (form.elements.note.value.trim()) entry.note = form.elements.note.value.trim();
|
||||
Meteor.callAsync('timeEntryAdd', Template.currentData().cardId, entry)
|
||||
.then(() => { form.elements.hours.value = ''; form.elements.note.value = ''; return tpl.load(); })
|
||||
.catch(error => tpl.error.set((error && (error.reason || error.message)) || String(error)));
|
||||
if (tpl.saving.get()) return;
|
||||
const editingId = tpl.editingId.get();
|
||||
const cardId = Template.currentData().cardId;
|
||||
tpl.saving.set(true);
|
||||
const request = editingId ? Meteor.callAsync('timeEntryEdit', editingId, entry)
|
||||
: Meteor.callAsync('timeEntryAdd', cardId, entry);
|
||||
request.then(async saved => {
|
||||
if (saved) tpl.resetEntry();
|
||||
await tpl.load(cardId);
|
||||
if (!saved) tpl.error.set(TAPi18n.__('error'));
|
||||
})
|
||||
.catch(error => tpl.error.set((error && (error.reason || error.message)) || String(error)))
|
||||
.finally(() => tpl.saving.set(false));
|
||||
},
|
||||
'click .js-time-entry-edit'(evt, tpl) {
|
||||
if (tpl.saving.get()) return;
|
||||
const id = evt.currentTarget.getAttribute('data-id');
|
||||
const entry = tpl.entries.get().find(row => row._id === id && row.editable);
|
||||
if (!entry) return;
|
||||
const form = tpl.find('.js-time-entry-add');
|
||||
tpl.editingId.set(id);
|
||||
form.elements.date.value = entry.date;
|
||||
form.elements.hours.value = entry.hours;
|
||||
form.elements.note.value = entry.note;
|
||||
form.elements.hours.focus();
|
||||
},
|
||||
'click .js-time-entry-cancel'(_evt, tpl) {
|
||||
tpl.resetEntry();
|
||||
},
|
||||
'click .js-time-entry-remove'(evt, tpl) {
|
||||
evt.preventDefault();
|
||||
|
||||
@@ -147,7 +147,6 @@ textarea.js-edit-checklist-item {
|
||||
margin-bottom: 2px;
|
||||
display: block;
|
||||
overflow-wrap: anywhere;
|
||||
max-width: 420px;
|
||||
}
|
||||
.checklist-item span.fa.checklistitem-handle {
|
||||
padding-top: 2px;
|
||||
|
||||
@@ -19,10 +19,6 @@
|
||||
margin: 0;
|
||||
font-weight: normal;
|
||||
}
|
||||
.from-text-choice input[type="checkbox"] {
|
||||
width: auto;
|
||||
margin: 0;
|
||||
}
|
||||
.from-text-title {
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ Template.cardLabelsPopup.events({
|
||||
|
||||
Template.createLabelPopup.events({
|
||||
// Create the new label
|
||||
'submit .create-label'(event, templateInstance) {
|
||||
async 'submit .create-label'(event, templateInstance) {
|
||||
event.preventDefault();
|
||||
const board = getCardLabelBoard(templateInstance.data);
|
||||
if (!board) {
|
||||
@@ -245,7 +245,7 @@ Template.createLabelPopup.events({
|
||||
}
|
||||
color = color || getFallbackLabelColor();
|
||||
const dueAt = readLabelDueAt(templateInstance);
|
||||
board.addLabel(name, color, dueAt);
|
||||
await board.addLabel(name, color, dueAt);
|
||||
Popup.back();
|
||||
},
|
||||
});
|
||||
|
||||
@@ -393,17 +393,17 @@ template(name="minicard")
|
||||
if getAssignees
|
||||
.minicard-assignees.js-minicard-assignees
|
||||
each getAssignees
|
||||
+userAvatar(userId=this)
|
||||
+cardUserAvatar(userId=this board=currentBoard side="minicard")
|
||||
if $eq field "members"
|
||||
if showMembers
|
||||
if getMembers
|
||||
.minicard-members.js-minicard-members
|
||||
each getMembers
|
||||
+userAvatar(userId=this)
|
||||
+cardUserAvatar(userId=this board=currentBoard side="minicard")
|
||||
if $eq field "creator"
|
||||
if showCreatorOnMinicard
|
||||
.minicard-creator
|
||||
+userAvatar(userId=getCreatorId noRemove=true)
|
||||
+cardUserAvatar(userId=getCreatorId noRemove=true board=currentBoard side="minicard")
|
||||
if $eq field "checklists"
|
||||
if shouldShowChecklistAtMinicard
|
||||
each shouldShowChecklistAtMinicard
|
||||
@@ -466,7 +466,7 @@ template(name="minicard")
|
||||
.minicard-requested-by(title="{{_ 'requested-by'}}")
|
||||
i.fa.fa-shopping-cart
|
||||
each userId in getRequesters
|
||||
+userAvatar(userId=userId noRemove=true)
|
||||
+cardUserAvatar(userId=userId noRemove=true board=currentBoard side="minicard")
|
||||
if getRequestedBy
|
||||
span {{ getRequestedBy }}
|
||||
if $eq field "assignedBy"
|
||||
@@ -475,7 +475,7 @@ template(name="minicard")
|
||||
.minicard-assigned-by(title="{{_ 'assigned-by'}}")
|
||||
i.fa.fa-user-plus
|
||||
each userId in getAssigners
|
||||
+userAvatar(userId=userId noRemove=true)
|
||||
+cardUserAvatar(userId=userId noRemove=true board=currentBoard side="minicard")
|
||||
if getAssignedBy
|
||||
span {{ getAssignedBy }}
|
||||
if $eq field "flowtime"
|
||||
|
||||
@@ -59,23 +59,6 @@
|
||||
color: #777;
|
||||
}
|
||||
|
||||
/* Labelled native checkboxes: the app-wide material form rule
|
||||
(client/components/forms/forms.css) hides native checkboxes three ways -
|
||||
display, visibility, an offset - which left these with a label and no box
|
||||
to tick or see ticked. All three are undone, as in cardFlow.css. */
|
||||
.cloud-panel input[type="checkbox"] {
|
||||
display: inline-block;
|
||||
visibility: visible;
|
||||
position: static;
|
||||
inset-inline-start: auto;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
min-height: 0;
|
||||
margin: 0;
|
||||
margin-inline-end: 4px;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
/* Support tickets: the support board's Open / In progress / Done lists, side
|
||||
by side as Board View / Lists draws a board, wrapping on a narrow screen. */
|
||||
.cloud-ticket-columns {
|
||||
|
||||
@@ -1,20 +1,3 @@
|
||||
/* This popup uses labelled native checkboxes, not hidden material inputs. */
|
||||
.js-date-format-form input[type="checkbox"] {
|
||||
display: inline-block;
|
||||
visibility: visible;
|
||||
position: static;
|
||||
inset-inline-start: auto;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
min-height: 0;
|
||||
flex: 0 0 16px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
margin-inline-end: 6px;
|
||||
appearance: auto;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.js-date-format-form > label.flex {
|
||||
align-items: center;
|
||||
}
|
||||
@@ -5,6 +5,18 @@ template(name="boardDateSettingsPopup")
|
||||
a.flex.js-show-week-of-year-toggle(title="{{_ 'show-week-of-year'}}")
|
||||
i.fa(class="{{#if isShowWeekOfYear}}fa-check{{else}}fa-square-o{{/if}}")
|
||||
span {{_ 'show-week-of-year'}}
|
||||
hr
|
||||
strong {{_ 'show-on-minicard'}}
|
||||
div
|
||||
label
|
||||
input.js-minicard-date-display(type="checkbox" data-field="showMinicardDateTime" checked=showMinicardDateTime disabled=notBoardAdmin)
|
||||
| {{_ 'time'}}
|
||||
div
|
||||
label
|
||||
input.js-minicard-date-display(type="checkbox" data-field="showMinicardDateRelative" checked=showMinicardDateRelative disabled=notBoardAdmin)
|
||||
| {{_ 'remaining_time'}}
|
||||
if minicardDateDisplayError
|
||||
p.error(role="alert") {{minicardDateDisplayError}}
|
||||
//- #6947: when this board's due dates turn amber and red, in hours. A
|
||||
board admin's; everybody else reads them.
|
||||
hr
|
||||
|
||||
@@ -121,6 +121,7 @@ Template.dateFormatEditor.events({
|
||||
// #687: the board's CalDAV link, for board admins (server/caldavSync.js).
|
||||
Template.boardDateSettingsPopup.onCreated(function () {
|
||||
this.dueThresholdsError = new ReactiveVar('');
|
||||
this.minicardDateDisplayError = new ReactiveVar('');
|
||||
this.caldav = new ReactiveVar({ url: '', username: '', enabled: false, hasPassword: false });
|
||||
this.caldavMessage = new ReactiveVar('');
|
||||
const board = Utils.getCurrentBoard();
|
||||
@@ -134,6 +135,9 @@ Template.boardDateSettingsPopup.helpers({
|
||||
dueSoonHours() { return dueThresholdsOf(Utils.getCurrentBoard()).soonHours; },
|
||||
overdueAfterHours() { return dueThresholdsOf(Utils.getCurrentBoard()).overdueAfterHours; },
|
||||
notBoardAdmin() { return !ReactiveCache.getCurrentUser()?.isBoardAdmin(); },
|
||||
showMinicardDateTime() { return Utils.getCurrentBoard()?.showMinicardDateTime !== false; },
|
||||
showMinicardDateRelative() { return Utils.getCurrentBoard()?.showMinicardDateRelative !== false; },
|
||||
minicardDateDisplayError() { return Template.instance().minicardDateDisplayError.get(); },
|
||||
dueThresholdsError() { return Template.instance().dueThresholdsError.get(); },
|
||||
caldav() { return Template.instance().caldav.get(); },
|
||||
caldavMessage() { return Template.instance().caldavMessage.get(); },
|
||||
@@ -145,6 +149,19 @@ Template.boardDateSettingsPopup.helpers({
|
||||
});
|
||||
|
||||
Template.boardDateSettingsPopup.events({
|
||||
async 'change .js-minicard-date-display'(event, tpl) {
|
||||
const board = Utils.getCurrentBoard();
|
||||
if (!board) return;
|
||||
const input = event.currentTarget;
|
||||
const { field } = input.dataset;
|
||||
tpl.minicardDateDisplayError.set('');
|
||||
try {
|
||||
await Meteor.callAsync('setBoardMinicardDateDisplay', board._id, field, input.checked);
|
||||
} catch (error) {
|
||||
input.checked = Utils.getCurrentBoard()?.[field] !== false;
|
||||
tpl.minicardDateDisplayError.set(error.reason || error.message);
|
||||
}
|
||||
},
|
||||
// An empty field is the default again (null).
|
||||
async 'submit .js-due-thresholds-form'(event, tpl) {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -16,9 +16,10 @@ template(name="editDateForm")
|
||||
.fields
|
||||
.left
|
||||
+calendarDateInput(inputId="date" inputName="date" fieldClass="js-date-field" value=showDate inline=true)
|
||||
.right
|
||||
label {{_ 'time'}}
|
||||
+calendarTimeInput(inputId="time" inputName="time" fieldClass="js-time-field" value=showTime defaultTime=datePicker.defaultTime)
|
||||
unless datePicker.dateOnly
|
||||
.right
|
||||
label {{_ 'time'}}
|
||||
+calendarTimeInput(inputId="time" inputName="time" fieldClass="js-time-field" value=showTime defaultTime=datePicker.defaultTime)
|
||||
if customFieldControls
|
||||
.custom-field-date-copy
|
||||
+customFieldCopyButton(value=customFieldCopyValue)
|
||||
|
||||
@@ -357,13 +357,32 @@ form.inlined-form .custom-field-copy-control > a.fa-copy,
|
||||
.add-controls .quiet {
|
||||
white-space: nowrap;
|
||||
}
|
||||
[type="checkbox"]:not(:checked),
|
||||
[type="checkbox"]:checked {
|
||||
/* Real checkboxes share the material geometry. Toggle switches draw their
|
||||
own track and keep the input visually hidden. */
|
||||
input.toggle-switch[type="checkbox"] {
|
||||
position: absolute;
|
||||
inset-inline-start: -9999px;
|
||||
visibility: hidden;
|
||||
display: none;
|
||||
}
|
||||
|
||||
input[type="checkbox"]:not(.toggle-switch) {
|
||||
display: inline-block;
|
||||
visibility: visible;
|
||||
inset-inline-start: auto;
|
||||
top: auto;
|
||||
appearance: none;
|
||||
-webkit-appearance: none;
|
||||
box-sizing: content-box;
|
||||
min-height: 0;
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
input[type="checkbox"]:not(.toggle-switch),
|
||||
.materialCheckBox {
|
||||
position: relative;
|
||||
width: 13px;
|
||||
@@ -393,6 +412,7 @@ form.inlined-form .custom-field-copy-control > a.fa-copy,
|
||||
its box, "out of box". `left: -3px` and `margin-right: 6px` put it on the
|
||||
square's left edge in both directions, and 7 + 4 + 6 = 17px is still the
|
||||
square's width, so the label beside it does not move. */
|
||||
input[type="checkbox"]:not(.toggle-switch):checked,
|
||||
.materialCheckBox.is-checked {
|
||||
top: -4px;
|
||||
left: -3px;
|
||||
@@ -408,6 +428,34 @@ form.inlined-form .custom-field-copy-control > a.fa-copy,
|
||||
backface-visibility: hidden;
|
||||
transform-origin: 100% 100%;
|
||||
}
|
||||
input[type="checkbox"]:not(.toggle-switch):checked {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
input[type="checkbox"]:not(.toggle-switch):disabled {
|
||||
cursor: default;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
input[type="checkbox"]:not(.toggle-switch):focus-visible {
|
||||
outline: 2px solid var(--theme-accent, #2573a7);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
label:has(> input[type="checkbox"]:not(.toggle-switch):focus-visible) {
|
||||
outline: 2px solid var(--theme-accent, #2573a7);
|
||||
outline-offset: 2px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
label > input[type="checkbox"]:not(.toggle-switch):focus-visible {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
label > input[type="checkbox"]:not(.toggle-switch):not(:checked) {
|
||||
margin-inline-end: 6px;
|
||||
}
|
||||
|
||||
.button-link {
|
||||
background: #fff;
|
||||
background: linear-gradient(#fff, #f5f5f5);
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
template(name="personalApiTokensPopup")
|
||||
if tokenPolicy
|
||||
if tokenPolicy.enabled
|
||||
form.js-create-personal-api-token
|
||||
label
|
||||
| {{_ 'name'}}
|
||||
input(type="text" name="name" maxlength="100" required)
|
||||
label
|
||||
| {{_ 'personal-api-token-expiry'}}
|
||||
input(type="datetime-local" name="expiresAt" value=expiryDefault required)
|
||||
p.quiet {{_ 'personal-api-token-max-days'}} {{tokenPolicy.maxDays}}
|
||||
label
|
||||
| {{_ 'personal-api-token-scope'}}
|
||||
select(name="scope")
|
||||
option(value="read") {{_ 'read-only'}}
|
||||
option(value="write") {{_ 'personal-api-token-write'}}
|
||||
label
|
||||
| {{_ 'personal-api-token-board-ids'}}
|
||||
input(type="text" name="boards" autocomplete="off")
|
||||
button.primary(type="submit") {{_ 'create'}}
|
||||
else
|
||||
p {{_ 'r-rule-disabled'}}
|
||||
if secret
|
||||
label
|
||||
| {{_ 'personal-api-token-once'}}
|
||||
textarea(readonly rows="3" autocomplete="off") {{secret}}
|
||||
ul
|
||||
each tokenRows
|
||||
li
|
||||
strong {{name}}
|
||||
| — {{_ scopeKey}}
|
||||
div {{_ 'personal-api-token-expiry'}} {{expiresText}}
|
||||
if lastUsedText
|
||||
div {{_ 'api-last-called'}} {{lastUsedText}}
|
||||
if revokedAt
|
||||
span {{_ 'r-rule-disabled'}}
|
||||
else
|
||||
button.js-revoke-personal-api-token(type="button" data-id=publicId) {{_ 'personal-api-token-revoke'}}
|
||||
if tokenError
|
||||
p.error(role="alert") {{tokenError}}
|
||||
|
||||
template(name="personalApiTokensAdmin")
|
||||
section
|
||||
h2.admin-pane-group-title {{_ 'personal-api-tokens'}}
|
||||
if tokenPolicy
|
||||
form.js-personal-api-token-policy
|
||||
label
|
||||
input(type="checkbox" name="enabled" checked=tokenPolicy.enabled)
|
||||
| {{_ 'r-rule-enabled'}}
|
||||
label
|
||||
| {{_ 'personal-api-token-max-days'}}
|
||||
input(type="number" name="maxDays" min="1" max="365" value=tokenPolicy.maxDays required)
|
||||
button.primary(type="submit") {{_ 'save'}}
|
||||
ul
|
||||
each tokenRows
|
||||
li
|
||||
strong {{username}}
|
||||
| — {{name}} — {{_ scopeKey}} —
|
||||
if active
|
||||
| {{_ 'r-rule-enabled'}}
|
||||
else
|
||||
| {{_ 'r-rule-disabled'}}
|
||||
| — {{expiresText}}
|
||||
button.js-refresh-personal-api-token-report(type="button") {{_ 'refresh'}}
|
||||
button.js-personal-api-token-csv(type="button") {{_ 'export-csv'}}
|
||||
if hasPreviousTokenPage
|
||||
button.js-personal-api-token-page(type="button" data-direction="-1") {{_ 'previous'}}
|
||||
if hasNextTokenPage
|
||||
button.js-personal-api-token-page(type="button" data-direction="1") {{_ 'next'}}
|
||||
+tablePage(usageTable)
|
||||
if tokenError
|
||||
p.error(role="alert") {{tokenError}}
|
||||
@@ -0,0 +1,148 @@
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Template } from 'meteor/templating';
|
||||
import { ReactiveVar } from 'meteor/reactive-var';
|
||||
import { buildHeader, buildRows } from '/models/lib/tablePage';
|
||||
import './personalApiTokens.jade';
|
||||
|
||||
const { addressReportColumns } = require('/models/lib/addressReportColumns');
|
||||
const formatTime = date => date ? new Date(date).toLocaleString() : '';
|
||||
const PER_PAGE = 50;
|
||||
|
||||
function reportError(instance, error) {
|
||||
instance.error.set(error.reason || error.message);
|
||||
}
|
||||
|
||||
async function refresh(instance, isAdmin, offset = 0) {
|
||||
instance.error.set('');
|
||||
try {
|
||||
instance.state.set(await Meteor.callAsync(isAdmin ? 'personalApiTokens.admin' : 'personalApiTokens.list',
|
||||
...(isAdmin ? [offset] : [])));
|
||||
instance.offset.set(offset);
|
||||
} catch (error) { reportError(instance, error); }
|
||||
}
|
||||
|
||||
for (const name of ['personalApiTokensPopup', 'personalApiTokensAdmin']) {
|
||||
const tpl = Template[name];
|
||||
tpl.onCreated(function () {
|
||||
this.state = new ReactiveVar(null);
|
||||
this.error = new ReactiveVar('');
|
||||
this.offset = new ReactiveVar(0);
|
||||
this.secret = new ReactiveVar('');
|
||||
refresh(this, name === 'personalApiTokensAdmin');
|
||||
});
|
||||
tpl.helpers({
|
||||
tokenPolicy() { return Template.instance().state.get()?.policy; },
|
||||
tokenError() { return Template.instance().error.get(); },
|
||||
tokenRows() {
|
||||
return (Template.instance().state.get()?.tokens || []).map(row => ({
|
||||
...row,
|
||||
expiresText: formatTime(row.expiresAt),
|
||||
lastUsedText: formatTime(row.lastUsed),
|
||||
scopeKey: row.scope === 'read' ? 'read-only' : 'personal-api-token-write',
|
||||
}));
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Template.personalApiTokensPopup.helpers({
|
||||
secret() { return Template.instance().secret.get(); },
|
||||
expiryDefault() {
|
||||
const date = new Date(Date.now() + 86400000);
|
||||
date.setMinutes(date.getMinutes() - date.getTimezoneOffset());
|
||||
return date.toISOString().slice(0, 16);
|
||||
},
|
||||
});
|
||||
|
||||
Template.personalApiTokensPopup.events({
|
||||
async 'submit .js-create-personal-api-token'(event, instance) {
|
||||
event.preventDefault();
|
||||
const form = event.currentTarget;
|
||||
const input = new FormData(form);
|
||||
instance.error.set('');
|
||||
instance.secret.set('');
|
||||
const button = form.querySelector('button[type="submit"]');
|
||||
button.disabled = true;
|
||||
try {
|
||||
instance.secret.set(await Meteor.callAsync('personalApiTokens.create', {
|
||||
name: input.get('name'),
|
||||
expiresAt: new Date(input.get('expiresAt')),
|
||||
scope: input.get('scope'),
|
||||
boards: input.get('boards').split(/[\s,]+/).filter(Boolean),
|
||||
}));
|
||||
form.reset();
|
||||
await refresh(instance, false);
|
||||
} catch (error) { reportError(instance, error); }
|
||||
finally { button.disabled = false; }
|
||||
},
|
||||
async 'click .js-revoke-personal-api-token'(event, instance) {
|
||||
try {
|
||||
await Meteor.callAsync('personalApiTokens.revoke', event.currentTarget.dataset.id);
|
||||
instance.secret.set('');
|
||||
await refresh(instance, false);
|
||||
} catch (error) { reportError(instance, error); }
|
||||
},
|
||||
});
|
||||
|
||||
const usageColumns = [
|
||||
{ labelKey: 'username', value: row => row.username },
|
||||
{ labelKey: 'name', value: row => row.tokenName },
|
||||
...addressReportColumns({ map: true }),
|
||||
{ labelKey: 'board-id', value: row => row.boardId },
|
||||
{ labelKey: 'action', value: row => row.action },
|
||||
{ labelKey: 'status', value: row => row.status },
|
||||
{ labelKey: 'api-calls', value: row => row.count },
|
||||
{ labelKey: 'api-first-called', value: row => formatTime(row.startedAt) },
|
||||
{ labelKey: 'api-last-called', value: row => formatTime(row.endedAt) },
|
||||
];
|
||||
|
||||
Template.personalApiTokensAdmin.helpers({
|
||||
usageTable() {
|
||||
const instance = Template.instance();
|
||||
const state = instance.state.get();
|
||||
const rows = state?.usage || [];
|
||||
return { header: buildHeader(usageColumns), rows: buildRows(rows, usageColumns),
|
||||
rowCount: rows.length, hideControls: true, emptyKey: 'api-no-calls' };
|
||||
},
|
||||
hasPreviousTokenPage() { return Template.instance().offset.get() > 0; },
|
||||
hasNextTokenPage() {
|
||||
const state = Template.instance().state.get();
|
||||
return state?.usage.length === PER_PAGE || state?.tokens.length === PER_PAGE;
|
||||
},
|
||||
});
|
||||
|
||||
Template.personalApiTokensAdmin.events({
|
||||
async 'submit .js-personal-api-token-policy'(event, instance) {
|
||||
event.preventDefault();
|
||||
const input = new FormData(event.currentTarget);
|
||||
try {
|
||||
await Meteor.callAsync('personalApiTokens.configure', input.has('enabled'), Number(input.get('maxDays')));
|
||||
await refresh(instance, true, instance.offset.get());
|
||||
} catch (error) { reportError(instance, error); }
|
||||
},
|
||||
'click .js-refresh-personal-api-token-report'(event, instance) {
|
||||
refresh(instance, true, instance.offset.get());
|
||||
},
|
||||
'click .js-personal-api-token-page'(event, instance) {
|
||||
refresh(instance, true, Math.max(0, instance.offset.get() + Number(event.currentTarget.dataset.direction) * PER_PAGE));
|
||||
},
|
||||
async 'click .js-personal-api-token-csv'(event, instance) {
|
||||
const button = event.currentTarget;
|
||||
button.disabled = true;
|
||||
try {
|
||||
const parts = ['User ID,Username,Token,IPv4,IPv6,Country,Latitude,Longitude,Board ID,Action,HTTP status,Count,Started UTC,Ended UTC\r\n'];
|
||||
let after = null;
|
||||
do {
|
||||
const batch = await Meteor.callAsync('personalApiTokens.exportUsage', after);
|
||||
parts.push(batch.csv);
|
||||
after = batch.next;
|
||||
} while (after);
|
||||
const url = URL.createObjectURL(new Blob(parts, { type: 'text/csv;charset=utf-8' }));
|
||||
const link = document.createElement('a');
|
||||
link.href = url;
|
||||
link.download = 'personal-api-token-usage.csv';
|
||||
link.click();
|
||||
Meteor.setTimeout(() => URL.revokeObjectURL(url), 1000);
|
||||
} catch (error) { reportError(instance, error); }
|
||||
finally { button.disabled = false; }
|
||||
},
|
||||
});
|
||||
@@ -84,6 +84,10 @@ template(name="historyTable")
|
||||
class="{{#if row.isSelected}}is-checked{{/if}}")
|
||||
td.history-change
|
||||
span.history-change-type {{_ row.changeTypeKey}}
|
||||
if row.authorName
|
||||
span.quiet.history-author {{row.authorName}}
|
||||
if row.sourceLabel
|
||||
span.quiet.history-source {{row.sourceLabel}}
|
||||
if row.groupKey
|
||||
span.quiet.history-group {{_ row.groupKey}}
|
||||
td.history-content
|
||||
|
||||
@@ -107,6 +107,7 @@ Template.historyTable.onCreated(function () {
|
||||
function summarise(row) {
|
||||
const content = row.newContent || row.previousContent;
|
||||
if (!content) return '';
|
||||
if (row.entityType === 'board' && row.group === 'labels') return content.label?.name || row.entityId;
|
||||
if (row.entityType === 'scrum') {
|
||||
return (content.records || []).map(entry => {
|
||||
const doc = entry.document;
|
||||
@@ -117,6 +118,9 @@ function summarise(row) {
|
||||
const state = content.rule ? content : row.previousContent;
|
||||
return [state?.rule?.title, state?.trigger?.desc || state?.trigger?.activityType, state?.action?.desc || state?.action?.actionType, TAPi18n.__(content.rule ? (content.rule.enabled === false ? 'r-rule-disabled' : 'r-rule-enabled') : 'history-change-removed')].filter(Boolean).join(' — ');
|
||||
}
|
||||
if (content.field === 'archived' && typeof content.value === 'boolean') {
|
||||
return TAPi18n.__(content.value ? 'archived' : 'history-change-restored');
|
||||
}
|
||||
if (typeof content.value === 'string') return content.value;
|
||||
// An emptied field has no text to show; an em dash reads as "nothing here" in
|
||||
// every language, which a translated word would have needed 197 files to do.
|
||||
@@ -179,6 +183,8 @@ Template.historyTable.helpers({
|
||||
changeTypeKey: changeTypeKey(row.changeType),
|
||||
groupKey: GROUP_KEYS[row.group] || null,
|
||||
contentSummary: summarise(row),
|
||||
authorName: ReactiveCache.getUser(row.userId, { fields: { username: 1 } })?.username || row.userId,
|
||||
sourceLabel: row.source === 'rest' ? 'REST API' : row.source === 'web' ? 'Web / DDP' : '',
|
||||
prettyWhen: formatDateForDisplay(row.createdAt, true, formatDateTime),
|
||||
isSelected: selected.includes(row._id),
|
||||
attachment: attachmentForRow(row),
|
||||
|
||||
@@ -8,22 +8,12 @@
|
||||
// data.csvMapping, and the server checks it against the file again.
|
||||
import { ReactiveVar } from 'meteor/reactive-var';
|
||||
import { TAPi18n } from '/imports/i18n';
|
||||
import { CSV_IMPORT_FIELDS, csvSeparatorOf, normalizeHeader } from '/models/lib/csvImportMapping';
|
||||
import { CSV_IMPORT_FIELDS, normalizeHeader } from '/models/lib/csvImportMapping';
|
||||
import { csvGetMembersToMap, csvMembersFromNames } from './csvMembersMapper';
|
||||
|
||||
const Papa = require('papaparse');
|
||||
|
||||
// The import template instance the step belongs to: one import page at a time.
|
||||
let activeImportTpl = null;
|
||||
|
||||
// CSV/TSV text as rows. A text whose first line has a tab is parsed with tab
|
||||
// as the separator, so a TSV value that holds a comma stays one value.
|
||||
export function parseCsvImportText(text) {
|
||||
const input = String(text == null ? '' : text).replace(/^/, '');
|
||||
const result = Papa.parse(input, { delimiter: csvSeparatorOf(input), skipEmptyLines: 'greedy' });
|
||||
return result && Array.isArray(result.data) ? result.data : [];
|
||||
}
|
||||
|
||||
// Show the step. `rows` for a CSV/TSV text (read in the browser), or
|
||||
// `excelBase64` for a workbook (read on the server, which answers with the
|
||||
// first board sheet's header and the sheets it found). `membersStep`: the
|
||||
|
||||
@@ -22,7 +22,14 @@ template(name="import")
|
||||
h2 {{_ 'import-many-results-heading'}}
|
||||
ul
|
||||
each manyResults
|
||||
li.import-report-row(class="{{#if ok}}is-imported{{else}}is-failed{{/if}}") {{name}}: {{#if ok}}{{_ 'import-many-imported'}}{{else}}{{error}}{{/if}}
|
||||
li.import-report-row(class="{{#if ok}}is-imported{{else}}is-failed{{/if}}")
|
||||
| {{name}}:
|
||||
if boardUrl
|
||||
a(href="{{boardUrl}}") {{_ 'import-report-open-board'}}
|
||||
else if ok
|
||||
| {{_ 'import-many-imported'}}
|
||||
else
|
||||
| {{this.error}}
|
||||
button.primary.js-import-many-all-boards(type="button") {{_ 'all-boards'}}
|
||||
//- #1173: ONE import page. Every source used to be its own address reached
|
||||
from its own link in the board sidebar, and the page never said which
|
||||
@@ -310,7 +317,7 @@ template(name="importMapMembers")
|
||||
| {{_ 'import-members-map-note' }}
|
||||
.mapping-list
|
||||
each members
|
||||
a.mapping-item.js-select-member(class="{{#if wekanId}}filled{{/if}}")
|
||||
a.mapping-item.js-select-member(data-member-id="{{id}}" class="{{#if wekanId}}filled{{/if}}")
|
||||
.profile-source
|
||||
.full-name= fullName
|
||||
.username
|
||||
@@ -358,23 +365,34 @@ template(name="importMapMembersAddPopup")
|
||||
|
||||
template(name="apiImportFetch")
|
||||
.api-import-fetch
|
||||
p.quiet {{_ 'api-import-desc'}}
|
||||
unless rememberSyncAvailable
|
||||
p.quiet {{_ 'api-import-desc'}}
|
||||
//- API buttons validate credentials independently of the pasted-file form.
|
||||
each fields
|
||||
p
|
||||
label(for="api-import-{{name}}") {{_ label}}
|
||||
if secret
|
||||
input.js-api-import-field(id="api-import-{{name}}" data-name="{{name}}" type="password" autocomplete="off" required=required)
|
||||
input.js-api-import-field(id="api-import-{{name}}" data-name="{{name}}" type="password" autocomplete="off" aria-required="{{#if required}}true{{else}}false{{/if}}")
|
||||
else
|
||||
input.js-api-import-field(id="api-import-{{name}}" data-name="{{name}}" type="text" autocomplete="off" required=required)
|
||||
input.js-api-import-field(id="api-import-{{name}}" data-name="{{name}}" type="text" autocomplete="off" aria-required="{{#if required}}true{{else}}false{{/if}}")
|
||||
p
|
||||
button.js-api-import-list(type="button" disabled=busy) {{_ 'api-import-list'}}
|
||||
if items.length
|
||||
p
|
||||
label(for="api-import-item") {{_ 'api-import-choose'}}
|
||||
select.js-api-import-item(id="api-import-item")
|
||||
select.js-api-import-item(id="api-import-item" multiple=batch disabled=busy)
|
||||
each items
|
||||
option(value=id) {{name}}
|
||||
if rememberSyncAvailable
|
||||
p
|
||||
label
|
||||
input.js-api-import-remember-sync(type="checkbox" disabled=busy)
|
||||
| {{_ 'list-sync-menu'}} — {{_ 'save'}} {{_ 'list-sync-credential'}} (24 {{_ 'hours'}})
|
||||
p
|
||||
button.primary.js-api-import-fetch(type="button" disabled=busy) {{_ 'api-import-fetch'}}
|
||||
if batch
|
||||
p
|
||||
button.js-api-import-select-all(type="button" disabled=busy) {{_ 'select-all'}}
|
||||
button.primary.js-api-import-projects(type="button" disabled=busy) {{_ 'import-many-boards'}}
|
||||
if message
|
||||
p.quiet.js-api-import-message= message
|
||||
+244
-155
@@ -1,3 +1,5 @@
|
||||
import { restoreNotionImportProgress, saveNotionImportProgress } from '/client/lib/notionImportRecovery';
|
||||
import { mergeNotionImportBatch, nextNotionImportCursor } from '/models/lib/notionImportBatches';
|
||||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
import { trelloGetMembersToMap } from './trelloMembersMapper';
|
||||
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
|
||||
@@ -16,16 +18,16 @@ import {
|
||||
} from '/client/components/boards/exportScope';
|
||||
import { pruneImportDocument } from '/models/lib/importParts';
|
||||
import { importDeadlineFor } from '/models/lib/importDeadline';
|
||||
import { slimTaigaDump } from '/models/lib/taigaFormat';
|
||||
import { expandFiles, documentForFile, isGeneralizedSource } from '/models/lib/importManyFiles';
|
||||
import { readBulkImportFiles, expandFiles, documentForFile, isGeneralizedSource } from '/models/lib/importManyFiles';
|
||||
import { IMPORT_SOURCES, importSource as importSourceSpec, acceptFor, isApiImport } from '/models/lib/importSources';
|
||||
import { TAPi18n } from '/imports/i18n';
|
||||
import TrelloImportJobs from '/models/trelloImportJobs';
|
||||
import GithubImportJobs from '/models/githubImportJobs';
|
||||
import { csvMappingData, parseCsvImportText, startCsvMapping } from './csvMapping';
|
||||
import { csvMappingData, startCsvMapping } from './csvMapping';
|
||||
import { parseCsvImportText } from '/models/lib/csvImportMapping';
|
||||
|
||||
const { jiraEstimateCandidates, discoveredJiraEstimateMapping } = require('/models/lib/jiraEstimateMapping');
|
||||
const { attachmentAuthFields } = require('/models/lib/importAttachmentAuth');
|
||||
const { attachmentAuthFields, isAttachmentAuthShape } = require('/models/lib/importAttachmentAuth');
|
||||
|
||||
// The sign-in for an import's attachment files (models/lib/importAttachmentAuth.js),
|
||||
// read from the page when Import is pressed and held only until that import
|
||||
@@ -33,6 +35,10 @@ const { attachmentAuthFields } = require('/models/lib/importAttachmentAuth');
|
||||
// The token field is emptied at once.
|
||||
function takeAttachmentAuth(tpl, importTpl) {
|
||||
importTpl.attachmentAuth = null;
|
||||
importTpl.apiImportProject = null;
|
||||
importTpl.rememberSyncCredential = false;
|
||||
const fetched = tpl.fetchedAttachmentAuth;
|
||||
tpl.fetchedAttachmentAuth = null;
|
||||
if (!attachmentAuthFields(Session.get('importSource'))) return;
|
||||
const field = cls => tpl.find(cls);
|
||||
const value = cls => (field(cls) ? field(cls).value.trim() : '');
|
||||
@@ -40,13 +46,24 @@ function takeAttachmentAuth(tpl, importTpl) {
|
||||
token: value('.js-import-attachment-token') };
|
||||
if (field('.js-import-attachment-token')) field('.js-import-attachment-token').value = '';
|
||||
if (auth.token) importTpl.attachmentAuth = auth;
|
||||
else if (fetched && !field('.js-import-file')?.files.length &&
|
||||
fetched.text === field('.js-import-json')?.value) {
|
||||
importTpl.attachmentAuth = fetched.credentials;
|
||||
importTpl.apiImportProject = fetched.projectId;
|
||||
importTpl.rememberSyncCredential = fetched.rememberSyncCredential;
|
||||
}
|
||||
}
|
||||
|
||||
// Sent with ONE import call, then forgotten.
|
||||
function attachmentAuthData(importTpl) {
|
||||
const auth = importTpl.attachmentAuth;
|
||||
const project = importTpl.apiImportProject;
|
||||
const remember = importTpl.rememberSyncCredential;
|
||||
importTpl.attachmentAuth = null;
|
||||
return auth ? { attachmentAuth: auth } : {};
|
||||
importTpl.apiImportProject = null;
|
||||
importTpl.rememberSyncCredential = false;
|
||||
return auth ? { attachmentAuth: auth, ...(project ? { apiImportProject: project } : {}),
|
||||
...(remember ? { rememberSyncCredential: true } : {}) } : {};
|
||||
}
|
||||
|
||||
// The file streamed to the server for this import (postImportUpload), by its
|
||||
@@ -101,10 +118,11 @@ function _prepareAdditionalData(dataObject) {
|
||||
// is never auto-retried, and a .zip's attachment bytes never touch the realtime
|
||||
// connection at all. The body is either a .zip File (application/zip) or a JSON
|
||||
// string { board, membersMapping } (application/json).
|
||||
async function postTrelloImport(body, contentType) {
|
||||
async function postTrelloImport(body, contentType, query) {
|
||||
const token =
|
||||
(window.localStorage && window.localStorage.getItem('Meteor.loginToken')) || '';
|
||||
const resp = await fetch('/import-trello', {
|
||||
const url = query ? `/import-trello?${new URLSearchParams(query)}` : '/import-trello';
|
||||
const resp = await fetch(url, {
|
||||
method: 'POST',
|
||||
credentials: 'same-origin',
|
||||
headers: {
|
||||
@@ -300,6 +318,7 @@ Template.import.onCreated(function () {
|
||||
// Who the file's people become (models/lib/importMembersMode.js): the
|
||||
// page's choice, or placeholders when the import skips the people step.
|
||||
this.membersMode = chosenMembersMode(skipMapping);
|
||||
this.trelloZipUploadId = null;
|
||||
// "Import many boards": files chosen there are imported, each as its own
|
||||
// board, instead of the single file or text above.
|
||||
const manyEl = this.find('.js-import-many-files');
|
||||
@@ -325,7 +344,7 @@ Template.import.onCreated(function () {
|
||||
if (spec.package) {
|
||||
const zipEl = this.find('.js-import-zip-file');
|
||||
if (zipEl && zipEl.files && zipEl.files[0]) {
|
||||
await this.importTrelloZip(zipEl.files[0]);
|
||||
await this.importTrelloZip(zipEl.files[0], this.membersMode === 'map' && !skipMapping);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -349,11 +368,13 @@ Template.import.onCreated(function () {
|
||||
}
|
||||
this.upload = null;
|
||||
this.uploadExtras = null;
|
||||
// Jira too: its people are read from the uploaded file by the server.
|
||||
if (file && (spec.creator === 'generalized' || dataSource === 'jira' || dataSource === 'csv')) {
|
||||
const pastedTaiga = !file && dataSource === 'taiga' ? this.find('.js-import-json')?.value : '';
|
||||
const uploadFile = file || (pastedTaiga?.trim() ? new Blob([pastedTaiga], { type: 'application/json' }) : null);
|
||||
// Large Taiga dumps can also arrive as pasted JSON.
|
||||
if (uploadFile && (spec.creator === 'generalized' || dataSource === 'jira' || dataSource === 'csv')) {
|
||||
// Streamed to the server's disk, never read into this page whole.
|
||||
try {
|
||||
this.upload = await postImportUpload(dataSource, file);
|
||||
this.upload = await postImportUpload(dataSource, uploadFile);
|
||||
} catch (e) {
|
||||
this.setError((e && e.message) || 'import-upload-failed');
|
||||
return;
|
||||
@@ -418,9 +439,6 @@ Template.import.onCreated(function () {
|
||||
const wsEl = this.find('.js-import-workspace-name');
|
||||
this.workspaceName = wsEl && wsEl.value ? wsEl.value.trim() : '';
|
||||
}
|
||||
// A Taiga dump embeds every attachment as base64; they are not imported,
|
||||
// so they are not sent (models/lib/taigaFormat.js).
|
||||
if (dataSource === 'taiga') doc = slimTaigaDump(doc);
|
||||
this.importedData.set(doc);
|
||||
// The people: the generalized importer's are read by the server's parser
|
||||
// (mapPeopleOrImport); WeKan, Trello and Jira read their own.
|
||||
@@ -483,12 +501,9 @@ Template.import.onCreated(function () {
|
||||
this.importMany = async (source, fileList) => {
|
||||
this.setError('');
|
||||
this.manyResults.set(null);
|
||||
const chosen = [];
|
||||
for (const file of Array.from(fileList)) {
|
||||
chosen.push({ name: file.name, bytes: new Uint8Array(await file.arrayBuffer()) });
|
||||
}
|
||||
const { chosen, skipped: unreadable } = await readBulkImportFiles(Array.from(fileList));
|
||||
const { files, skipped } = expandFiles(source, chosen);
|
||||
const results = skipped.map(reason => ({ name: reason, ok: false, error: '' }));
|
||||
const results = [...unreadable, ...skipped].map(reason => ({ name: reason, ok: false, error: '' }));
|
||||
const split = splitByProject(source);
|
||||
// One person at a time cannot be chosen for many files: their people are
|
||||
// placeholders, or all the person importing.
|
||||
@@ -502,8 +517,18 @@ Template.import.onCreated(function () {
|
||||
let doc;
|
||||
if (source === 'wekan' && /\.zip$/i.test(name)) {
|
||||
// Unpacked on the server, with its attachment files.
|
||||
await postWekanZipAsNewBoard(bytes, membersMode);
|
||||
results.push({ name, ok: true, error: '' });
|
||||
const boardId = await postWekanZipAsNewBoard(bytes, membersMode);
|
||||
results.push({ name, boardId, ok: true, error: '' });
|
||||
continue;
|
||||
}
|
||||
if (source === 'taiga') {
|
||||
const upload = await postImportUpload(source, new File([bytes], name.split('/').pop()));
|
||||
const fields = selectedFields();
|
||||
const boardId = await Meteor.callAsync('importBoard', {}, {
|
||||
membersMapping: {}, membersMode, importFields: fields, uploadId: upload.uploadId,
|
||||
...auth, ...(split ? { splitBy: 'swimlane' } : {}),
|
||||
}, source, null);
|
||||
results.push({ name, boardId, ok: !!boardId, error: boardId ? '' : TAPi18n.__('error-json-malformed') });
|
||||
continue;
|
||||
}
|
||||
if (source === 'wekan') {
|
||||
@@ -512,7 +537,6 @@ Template.import.onCreated(function () {
|
||||
} else {
|
||||
doc = documentForFile(source, name, bytes);
|
||||
}
|
||||
if (source === 'taiga') doc = slimTaigaDump(doc);
|
||||
let boardId;
|
||||
if (source === 'trello') {
|
||||
const result = await postTrelloImport(JSON.stringify({ board: doc, membersMapping: {}, membersMode }), 'application/json');
|
||||
@@ -521,7 +545,7 @@ Template.import.onCreated(function () {
|
||||
boardId = await Meteor.callAsync('importBoard', pruneImportDocument(doc, selectedFields()),
|
||||
{ membersMapping: {}, membersMode, importFields: selectedFields(), ...auth, ...(split ? { splitBy: 'swimlane' } : {}) }, source, null);
|
||||
}
|
||||
results.push({ name, ok: !!boardId, error: boardId ? '' : TAPi18n.__('error-json-malformed') });
|
||||
results.push({ name, boardId, ok: !!boardId, error: boardId ? '' : TAPi18n.__('error-json-malformed') });
|
||||
} catch (e) {
|
||||
results.push({ name, ok: false, error: String((e && (e.reason || e.error || e.message)) || e) });
|
||||
}
|
||||
@@ -530,29 +554,47 @@ Template.import.onCreated(function () {
|
||||
this.manyResults.set(results);
|
||||
};
|
||||
|
||||
this.importTrelloZip = async (zipFile) => {
|
||||
this.importTrelloZip = async (zipFile, previewPeople) => {
|
||||
this.setError('');
|
||||
const wsEl = this.find('.js-import-workspace-name');
|
||||
const workspaceName = wsEl && wsEl.value ? wsEl.value.trim() : '';
|
||||
this.workspaceName = wsEl && wsEl.value ? wsEl.value.trim() : '';
|
||||
|
||||
this.zipImporting.set(true);
|
||||
let result;
|
||||
try {
|
||||
result = await postTrelloImport(zipFile, 'application/zip');
|
||||
result = await postTrelloImport(zipFile, 'application/zip', previewPeople
|
||||
? { previewPeople: '1' } : { membersMode: this.membersMode === 'me' ? 'me' : 'placeholder' });
|
||||
} catch (e) {
|
||||
this.zipImporting.set(false);
|
||||
this.setError((e && e.message) || 'import-trello-failed');
|
||||
return;
|
||||
} finally {
|
||||
this.zipImporting.set(false);
|
||||
}
|
||||
this.zipImporting.set(false);
|
||||
if (previewPeople) {
|
||||
this.trelloZipUploadId = result.uploadId;
|
||||
this.membersToMap.set(trelloGetMembersToMap(result));
|
||||
if (result.members.length) this.nextStep();
|
||||
else await this.finishImport();
|
||||
return;
|
||||
}
|
||||
this.completeTrelloZip(result);
|
||||
};
|
||||
|
||||
(result.boardIds || []).forEach(boardId => {
|
||||
if (workspaceName) {
|
||||
assignBoardToNamedWorkspace(boardId, workspaceName);
|
||||
}
|
||||
});
|
||||
this.completeTrelloZip = result => {
|
||||
const boardIds = result.boardIds || [];
|
||||
if (!boardIds.length) {
|
||||
this.setError('import-trello-failed');
|
||||
return;
|
||||
}
|
||||
if (this.workspaceName) {
|
||||
boardIds.forEach(boardId => assignBoardToNamedWorkspace(boardId, this.workspaceName));
|
||||
}
|
||||
Session.set('fromBoard', null);
|
||||
// Go to All Boards, where the newly imported boards appear.
|
||||
if (boardIds.length === 1) {
|
||||
openOrReportImportedBoard(boardIds[0], '');
|
||||
return;
|
||||
}
|
||||
// Multiple imported boards are available together on All Boards.
|
||||
FlowRouter.go('home');
|
||||
};
|
||||
|
||||
@@ -577,6 +619,25 @@ Template.import.onCreated(function () {
|
||||
// navigating away — that forces an empty re-render mid-teardown and can
|
||||
// throw "Can't select in removed DomRange". We navigate away, which
|
||||
// destroys the import templates.
|
||||
if (this.trelloZipUploadId) {
|
||||
if (this.zipImporting.get()) return;
|
||||
this.zipImporting.set(true);
|
||||
try {
|
||||
const result = await postTrelloImport(
|
||||
JSON.stringify({ uploadId: this.trelloZipUploadId, membersMapping: mappingById }),
|
||||
'application/json', { commitZip: '1' },
|
||||
);
|
||||
this.completeTrelloZip(result);
|
||||
} catch (e) {
|
||||
this._currentStepIndex.set(0);
|
||||
this.setError((e && e.message) || 'import-trello-failed');
|
||||
} finally {
|
||||
this.trelloZipUploadId = null;
|
||||
this.zipImporting.set(false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.importSource === 'trello') {
|
||||
let result;
|
||||
try {
|
||||
@@ -677,7 +738,11 @@ Template.import.helpers({
|
||||
return Template.instance().manyProgress.get();
|
||||
},
|
||||
manyResults() {
|
||||
return Template.instance().manyResults.get();
|
||||
const rows = Template.instance().manyResults.get();
|
||||
return rows?.map(row => ({
|
||||
...row,
|
||||
boardUrl: row.ok && row.boardId ? FlowRouter.path('board', { id: row.boardId, slug: 'board' }) : '',
|
||||
}));
|
||||
},
|
||||
importSources() {
|
||||
const setting = ReactiveCache.getCurrentSetting();
|
||||
@@ -831,6 +896,9 @@ Template.importTextarea.onCreated(function () {
|
||||
});
|
||||
|
||||
Template.importTextarea.events({
|
||||
'change .js-import-file, input .js-import-json'(event, tpl) {
|
||||
tpl.fetchedAttachmentAuth = null;
|
||||
},
|
||||
'input .js-import-json'(evt, tpl) {
|
||||
if (Session.get('importSource') !== 'jira') return;
|
||||
let data = null;
|
||||
@@ -871,11 +939,7 @@ Template.importTextarea.events({
|
||||
},
|
||||
});
|
||||
|
||||
// Module-level reference so popup children can access importMapMembers methods
|
||||
let _importMapMembersTpl = null;
|
||||
|
||||
Template.importMapMembers.onCreated(function () {
|
||||
_importMapMembersTpl = this;
|
||||
this.usersLoaded = new ReactiveVar(false);
|
||||
|
||||
this.members = () => {
|
||||
@@ -890,55 +954,9 @@ Template.importMapMembers.onCreated(function () {
|
||||
}
|
||||
};
|
||||
|
||||
this._setPropertyForMember = (property, value, memberId, unset = false) => {
|
||||
const listOfMembers = this.members();
|
||||
let finder = null;
|
||||
if (memberId) {
|
||||
finder = member => member.id === memberId;
|
||||
} else {
|
||||
finder = member => member.selected;
|
||||
}
|
||||
listOfMembers.forEach(member => {
|
||||
if (finder(member)) {
|
||||
if (value !== null) {
|
||||
member[property] = value;
|
||||
} else {
|
||||
delete member[property];
|
||||
}
|
||||
if (!unset) {
|
||||
// we shortcut if we don't care about unsetting the others
|
||||
return false;
|
||||
}
|
||||
} else if (unset) {
|
||||
delete member[property];
|
||||
}
|
||||
return true;
|
||||
});
|
||||
// Session.get gives us a copy, we have to set it back so it sticks
|
||||
this._refreshMembers(listOfMembers);
|
||||
};
|
||||
|
||||
this.setSelectedMember = (memberId) => {
|
||||
return this._setPropertyForMember('selected', true, memberId, true);
|
||||
};
|
||||
|
||||
this.getMember = (memberId = null) => {
|
||||
const allMembers = this.members();
|
||||
let finder = null;
|
||||
if (memberId) {
|
||||
finder = user => user.id === memberId;
|
||||
} else {
|
||||
finder = user => user.selected;
|
||||
}
|
||||
return allMembers.find(finder);
|
||||
};
|
||||
|
||||
this.mapSelectedMember = (wekanId) => {
|
||||
return this._setPropertyForMember('wekanId', wekanId, null);
|
||||
};
|
||||
|
||||
this.unmapMember = (memberId) => {
|
||||
return this._setPropertyForMember('wekanId', null, memberId);
|
||||
this.setMemberMapping = (memberId, wekanId) => {
|
||||
this._refreshMembers(this.members().map(member =>
|
||||
member.id === memberId ? { ...member, wekanId } : member));
|
||||
};
|
||||
|
||||
this.autorun(() => {
|
||||
@@ -976,12 +994,6 @@ Template.importMapMembers.onCreated(function () {
|
||||
});
|
||||
});
|
||||
|
||||
Template.importMapMembers.onDestroyed(function () {
|
||||
if (_importMapMembersTpl === this) {
|
||||
_importMapMembersTpl = null;
|
||||
}
|
||||
});
|
||||
|
||||
Template.importMapMembers.helpers({
|
||||
usersLoaded() {
|
||||
return Template.instance().usersLoaded;
|
||||
@@ -1009,34 +1021,18 @@ Template.importMapMembers.events({
|
||||
}
|
||||
},
|
||||
'click .js-select-member'(evt, tpl) {
|
||||
const memberToMap = Template.currentData();
|
||||
if (memberToMap.wekan) {
|
||||
// todo xxx ask for confirmation?
|
||||
tpl.unmapMember(memberToMap.id);
|
||||
} else {
|
||||
tpl.setSelectedMember(memberToMap.id);
|
||||
Popup.open('importMapMembersAdd')(evt);
|
||||
}
|
||||
const memberId = evt.currentTarget.dataset.memberId;
|
||||
if (!memberId) return;
|
||||
Popup.open('importMapMembersAdd', {
|
||||
dataContext: { selectUser: wekanId => tpl.setMemberMapping(memberId, wekanId) },
|
||||
})(evt);
|
||||
},
|
||||
});
|
||||
|
||||
// Global reactive variables for import member popup
|
||||
const importMemberPopupState = {
|
||||
searching: new ReactiveVar(false),
|
||||
searchResults: new ReactiveVar([]),
|
||||
noResults: new ReactiveVar(false),
|
||||
searchTimeout: null,
|
||||
};
|
||||
|
||||
Template.importMapMembersAddPopup.onCreated(function () {
|
||||
this.searching = importMemberPopupState.searching;
|
||||
this.searchResults = importMemberPopupState.searchResults;
|
||||
this.noResults = importMemberPopupState.noResults;
|
||||
this.searchTimeout = null;
|
||||
|
||||
this.searching.set(false);
|
||||
this.searchResults.set([]);
|
||||
this.noResults.set(false);
|
||||
this.searching = new ReactiveVar(false);
|
||||
this.searchResults = new ReactiveVar([]);
|
||||
this.noResults = new ReactiveVar(false);
|
||||
});
|
||||
|
||||
Template.importMapMembersAddPopup.onRendered(function () {
|
||||
@@ -1048,41 +1044,39 @@ Template.importMapMembersAddPopup.onRendered(function () {
|
||||
});
|
||||
|
||||
Template.importMapMembersAddPopup.onDestroyed(function () {
|
||||
if (this.searchTimeout) {
|
||||
clearTimeout(this.searchTimeout);
|
||||
}
|
||||
clearTimeout(this.searchTimeout);
|
||||
this.searchSubscription?.stop();
|
||||
this.searching.set(false);
|
||||
});
|
||||
|
||||
function importPerformSearch(tpl, query) {
|
||||
if (!query || query.length < 2) {
|
||||
tpl.searchResults.set([]);
|
||||
tpl.noResults.set(false);
|
||||
return;
|
||||
}
|
||||
|
||||
tpl.searching.set(true);
|
||||
tpl.searchSubscription?.stop();
|
||||
tpl.searchResults.set([]);
|
||||
tpl.noResults.set(false);
|
||||
|
||||
const results = UserSearchIndex.search(query, { limit: 20 }).fetch();
|
||||
tpl.searchResults.set(results);
|
||||
tpl.searching.set(false);
|
||||
const eligible = query.length >= 2 && query.length <= 128;
|
||||
tpl.searching.set(eligible);
|
||||
if (!eligible) return;
|
||||
|
||||
if (results.length === 0) {
|
||||
tpl.noResults.set(true);
|
||||
}
|
||||
tpl.searchSubscription = tpl.subscribe('user-search', query, {
|
||||
onReady() {
|
||||
if (tpl.view.isDestroyed || tpl.find('.js-search-member-input')?.value.trim() !== query) return;
|
||||
const results = UserSearchIndex.search(query, { limit: 20 }).fetch();
|
||||
tpl.searchResults.set(results);
|
||||
tpl.searching.set(false);
|
||||
tpl.noResults.set(results.length === 0);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// Map the currently-selected imported member to a WeKan user and close the popup.
|
||||
function importMapToUser(wekanId) {
|
||||
if (wekanId && _importMapMembersTpl) {
|
||||
_importMapMembersTpl.mapSelectedMember(wekanId);
|
||||
}
|
||||
function importMapToUser(tpl, wekanId) {
|
||||
tpl.data.selectUser(wekanId);
|
||||
Popup.back();
|
||||
}
|
||||
|
||||
Template.importMapMembersAddPopup.events({
|
||||
'click .js-select-import'(event) {
|
||||
'click .js-select-import'(event, tpl) {
|
||||
// Map to the WeKan user _id carried on the .js-select-import anchor's data-id.
|
||||
// Reading it from the anchor (event.currentTarget) is robust to the click
|
||||
// landing on a child node (the avatar or the name span), where
|
||||
@@ -1091,7 +1085,7 @@ Template.importMapMembersAddPopup.events({
|
||||
// template; the earlier fix from `__originalId` to `_id` was correct but read
|
||||
// the wrong context.)
|
||||
const id = event.currentTarget.getAttribute('data-id');
|
||||
if (id) importMapToUser(id);
|
||||
if (id) importMapToUser(tpl, id);
|
||||
},
|
||||
// Enter selects the first (highlighted) search result, so a name can be assigned
|
||||
// by keyboard without a mouse click.
|
||||
@@ -1100,14 +1094,11 @@ Template.importMapMembersAddPopup.events({
|
||||
event.preventDefault();
|
||||
const results = tpl.searchResults.get();
|
||||
if (results && results.length) {
|
||||
importMapToUser(results[0]._id);
|
||||
importMapToUser(tpl, results[0]._id);
|
||||
}
|
||||
}
|
||||
},
|
||||
'keyup .js-search-member-input'(event, tpl) {
|
||||
if (event.keyCode === 13) {
|
||||
return; // handled on keydown
|
||||
}
|
||||
'input .js-search-member-input'(event, tpl) {
|
||||
const query = event.target.value.trim();
|
||||
|
||||
if (tpl.searchTimeout) {
|
||||
@@ -1122,13 +1113,13 @@ Template.importMapMembersAddPopup.events({
|
||||
|
||||
Template.importMapMembersAddPopup.helpers({
|
||||
searchResults() {
|
||||
return importMemberPopupState.searchResults.get();
|
||||
return Template.instance().searchResults.get();
|
||||
},
|
||||
searching() {
|
||||
return importMemberPopupState.searching;
|
||||
return Template.instance().searching;
|
||||
},
|
||||
noResults() {
|
||||
return importMemberPopupState.noResults;
|
||||
return Template.instance().noResults;
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1522,6 +1513,8 @@ Template.apiImportFetch.onCreated(function () {
|
||||
|
||||
Template.apiImportFetch.helpers({
|
||||
fields() { return (apiImportService(Template.currentData().service) || { fields: [] }).fields; },
|
||||
batch() { return !Template.currentData().scopedImport && apiImportService(Template.currentData().service)?.batch; },
|
||||
rememberSyncAvailable() { return !Template.currentData().scopedImport && ['jira', 'openproject'].includes(Template.currentData().service); },
|
||||
items() { return Template.instance().items.get(); },
|
||||
busy() { return Template.instance().busy.get(); },
|
||||
message() { return Template.instance().message.get(); },
|
||||
@@ -1546,6 +1539,7 @@ Template.apiImportFetch.events({
|
||||
tpl.busy.set(true);
|
||||
tpl.message.set('');
|
||||
Meteor.call('apiImportList', Template.currentData().service, apiImportCredentials(tpl), (error, items) => {
|
||||
if (tpl.view.isDestroyed) return;
|
||||
if (error) return apiImportFailed(tpl, error);
|
||||
tpl.busy.set(false);
|
||||
tpl.items.set(items || []);
|
||||
@@ -1553,22 +1547,117 @@ Template.apiImportFetch.events({
|
||||
return undefined;
|
||||
});
|
||||
},
|
||||
'click .js-api-import-fetch'(event, tpl) {
|
||||
event.preventDefault();
|
||||
const id = String(tpl.$('.js-api-import-item').val() || '');
|
||||
'click .js-api-import-select-all'(event, tpl) {
|
||||
for (const option of tpl.find('.js-api-import-item').options) option.selected = true;
|
||||
},
|
||||
async 'click .js-api-import-projects'(event, tpl) {
|
||||
const selected = [...tpl.find('.js-api-import-item').selectedOptions];
|
||||
if (!selected.length || tpl.busy.get()) return;
|
||||
const parent = findParentTemplateInstance(tpl, 'import');
|
||||
if (!parent) return;
|
||||
const service = Template.currentData().service;
|
||||
const credentials = apiImportCredentials(tpl);
|
||||
tpl.busy.set(true);
|
||||
tpl.message.set('');
|
||||
Meteor.call('apiImportFetch', Template.currentData().service, apiImportCredentials(tpl), id, (error, data) => {
|
||||
parent.manyResults.set(null);
|
||||
parent.manyProgress.set(TAPi18n.__('import-many-boards'));
|
||||
tpl.$('.js-api-import-field[type="password"]').val('');
|
||||
try {
|
||||
const result = await Meteor.applyAsync('apiImportProjects',
|
||||
[service, credentials, selected.map(option => option.value), selectedFields(), chosenMembersMode(true),
|
||||
!!tpl.find('.js-api-import-remember-sync')?.checked],
|
||||
{ noRetry: true });
|
||||
const names = new Map(selected.map(option => [option.value, option.text]));
|
||||
const completed = new Set(result.filter(row => row.ok).map(row => row.id));
|
||||
tpl.items.set(tpl.items.get().filter(item => !completed.has(item.id)));
|
||||
parent.manyResults.set(result.map(row => ({
|
||||
name: names.get(row.id), boardId: row.boardId, ok: row.ok, error: row.ok ? '' : TAPi18n.__(row.error || 'error-json-malformed'),
|
||||
})));
|
||||
} catch (error) {
|
||||
apiImportFailed(tpl, error);
|
||||
} finally {
|
||||
parent.manyProgress.set('');
|
||||
tpl.busy.set(false);
|
||||
}
|
||||
},
|
||||
async 'click .js-api-import-fetch'(event, tpl) {
|
||||
event.preventDefault();
|
||||
const selected = tpl.find('.js-api-import-item').selectedOptions;
|
||||
if (selected.length !== 1 || tpl.busy.get()) return;
|
||||
const id = selected[0].value;
|
||||
tpl.busy.set(true);
|
||||
tpl.message.set('');
|
||||
const service = Template.currentData().service;
|
||||
const credentials = apiImportCredentials(tpl);
|
||||
const { scopedImport } = Template.currentData();
|
||||
if (scopedImport) {
|
||||
const fields = selectedFields();
|
||||
tpl.$('.js-api-import-field[type="password"]').val('');
|
||||
try {
|
||||
await scopedImport({ id, credentials, fields });
|
||||
} catch (error) {
|
||||
if (!tpl.view.isDestroyed) apiImportFailed(tpl, error);
|
||||
} finally {
|
||||
if (!tpl.view.isDestroyed) tpl.busy.set(false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
const parent = findParentTemplateInstance(tpl, 'importTextarea');
|
||||
const rememberSyncCredential = !!tpl.find('.js-api-import-remember-sync')?.checked;
|
||||
if (parent) parent.fetchedAttachmentAuth = null;
|
||||
const fields = selectedFields();
|
||||
const applyFetchedDocument = (error, data) => {
|
||||
if (error) return apiImportFailed(tpl, error);
|
||||
tpl.busy.set(false);
|
||||
tpl.$('.js-api-import-field[type="password"]').val('');
|
||||
const textarea = document.getElementById('import-textarea');
|
||||
const textarea = parent?.find('.js-import-json');
|
||||
if (textarea) {
|
||||
textarea.value = JSON.stringify(data);
|
||||
const text = JSON.stringify(data);
|
||||
textarea.value = text;
|
||||
textarea.dispatchEvent(new Event('input', { bubbles: true }));
|
||||
if ((apiImportService(service)?.batch || attachmentAuthFields(service)) && credentials.token && isAttachmentAuthShape(credentials)) {
|
||||
// This credential is for the fetched document only, through the
|
||||
// upcoming import. Editing or replacing the document drops it.
|
||||
parent.fetchedAttachmentAuth = { text, credentials, projectId: id, rememberSyncCredential };
|
||||
}
|
||||
}
|
||||
tpl.message.set(TAPi18n.__('api-import-fetched'));
|
||||
return undefined;
|
||||
});
|
||||
};
|
||||
if (service !== 'notionapi') {
|
||||
Meteor.call('apiImportFetch', service, credentials, id, fields, applyFetchedDocument);
|
||||
return;
|
||||
}
|
||||
const key = JSON.stringify([Meteor.userId(), id, fields]);
|
||||
try {
|
||||
const remembered = tpl.notionImportProgress;
|
||||
let progress = remembered?.key === key && remembered.token === credentials.token
|
||||
? remembered.progress : await restoreNotionImportProgress(key, credentials.token);
|
||||
if (tpl.view.isDestroyed) return;
|
||||
progress ||= { cursor: '', document: null };
|
||||
for (let batch = 0; batch < 8; batch += 1) {
|
||||
const response = await Meteor.applyAsync('apiImportFetch',
|
||||
[service, credentials, id, fields, progress.cursor], { noRetry: true });
|
||||
if (tpl.view.isDestroyed) return;
|
||||
const document = mergeNotionImportBatch(progress.document, response);
|
||||
const cursor = nextNotionImportCursor(progress.document, response, progress.cursor);
|
||||
if (cursor === null) {
|
||||
tpl.notionImportProgress = null;
|
||||
await saveNotionImportProgress(key, credentials.token, null);
|
||||
if (tpl.view.isDestroyed) return;
|
||||
applyFetchedDocument(null, document);
|
||||
return;
|
||||
}
|
||||
const checkpoint = { document, cursor };
|
||||
tpl.notionImportProgress = { key, token: credentials.token, progress: checkpoint };
|
||||
await saveNotionImportProgress(key, credentials.token, checkpoint);
|
||||
if (tpl.view.isDestroyed) return;
|
||||
if (cursor === progress.cursor) break;
|
||||
progress = checkpoint;
|
||||
}
|
||||
applyFetchedDocument(null, tpl.notionImportProgress.progress.document);
|
||||
} catch (error) {
|
||||
if (!tpl.view.isDestroyed) applyFetchedDocument(error);
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -32,28 +32,6 @@
|
||||
margin: 0.5rem 1rem;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
/* Native checkboxes, labelled: the global material form rules hide every
|
||||
checkbox (as in scrumView.css), which left the acceptance dialog, the sign-up
|
||||
box and the Legal pages switches with nothing to tick. The label around each
|
||||
is the target, so the whole line ticks it. */
|
||||
.legal-acceptance-page input[type="checkbox"],
|
||||
.legal-page-check input[type="checkbox"],
|
||||
.impersonate-emergency input[type="checkbox"],
|
||||
.attachment-encryption-new input[type="checkbox"] {
|
||||
display: inline-block;
|
||||
visibility: visible;
|
||||
position: static;
|
||||
inset-inline-start: auto;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
min-height: 0;
|
||||
flex: 0 0 18px;
|
||||
padding: 0;
|
||||
margin: 0 0.4rem 0 0;
|
||||
vertical-align: middle;
|
||||
appearance: auto;
|
||||
cursor: pointer;
|
||||
}
|
||||
.legal-acceptance-page,
|
||||
.legal-page-check,
|
||||
.impersonate-emergency label,
|
||||
|
||||
@@ -20,6 +20,14 @@ import {
|
||||
require('/client/lib/jquery-ui.js');
|
||||
|
||||
const { calculateIndex } = Utils;
|
||||
const { missingListEntryFields } = require('/models/lib/listEntryRequirements');
|
||||
|
||||
function promptListEntryFields(card, list, missing) {
|
||||
const fields = missing.map(field => field.name || TAPi18n.__(field.labelKey));
|
||||
window.alert([TAPi18n.__('moveCardPopup-title') + ' — ' + list.title, ...fields.map(field => '* ' + field)].join('\n'));
|
||||
Utils.goCardId(card._id);
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// #6409 List width: a single, simple model.
|
||||
@@ -137,6 +145,7 @@ function effectiveListWidth(list) {
|
||||
fixedEnabled,
|
||||
fixedWidth,
|
||||
sharedWidth: list.width,
|
||||
defaultWidth: ReactiveCache.getBoard(list.boardId)?.defaultListWidth,
|
||||
personalMode,
|
||||
personalWidth,
|
||||
});
|
||||
@@ -426,6 +435,20 @@ Template.listBody.onRendered(function () {
|
||||
// Blaze with the below query.
|
||||
$cards.sortable('cancel');
|
||||
|
||||
if (listData.entryRequirements?.length) {
|
||||
const cards = MultiSelection.isActive()
|
||||
? ReactiveCache.getCards(MultiSelection.getMongoSelector()) : [droppedCard];
|
||||
const definitions = ReactiveCache.getCustomFields({ boardIds: targetBoardId });
|
||||
for (const card of cards) {
|
||||
if (card.listId === listId) continue;
|
||||
const missing = missingListEntryFields(listData, card, definitions);
|
||||
if (!missing.length) continue;
|
||||
if (boardComponent) boardComponent.setIsDragging(false);
|
||||
promptListEntryFields(card, listData, missing);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// #3826: the drop landed between two cards whose sorts do not strictly
|
||||
// increase (duplicate -1 sorts from subtask creation, or legacy data).
|
||||
// Repair the sibling sorts with the minimal bumps that make the visible
|
||||
|
||||
@@ -76,3 +76,14 @@ template(name="minicardSplitDone")
|
||||
if splitDone
|
||||
span.minicard-split-toggle.is-done(title="{{_ 'split-done'}}")
|
||||
i.fa.fa-check-circle
|
||||
|
||||
template(name="listEntryRequirementsPopup")
|
||||
form.js-list-entry-requirements-form
|
||||
fieldset
|
||||
legend {{_ 'moveCardPopup-title'}} — {{_ 'custom-fields'}} / {{_ 'date'}} *
|
||||
each entryOptions
|
||||
label
|
||||
input(type="checkbox" value=id checked=checked)
|
||||
| {{entryLabel}}
|
||||
button.primary(type="submit") {{_ 'save'}}
|
||||
p.js-list-entry-requirements-status(role="status")
|
||||
@@ -132,3 +132,29 @@ Template.minicardSplitDone.events({
|
||||
.catch(error => window.alert((error && (error.reason || error.error)) || String(error)));
|
||||
},
|
||||
});
|
||||
|
||||
const { listEntryOptions } = require('/models/lib/listEntryRequirements');
|
||||
|
||||
Template.listEntryRequirementsPopup.helpers({
|
||||
entryOptions() {
|
||||
const list = ReactiveCache.getList(this._id) || this;
|
||||
return listEntryOptions(ReactiveCache.getCustomFields({ boardIds: list.boardId })).map(option => ({
|
||||
...option, checked: list.entryRequirements?.includes(option.id),
|
||||
}));
|
||||
},
|
||||
entryLabel() {
|
||||
return this.name || TAPi18n.__(this.labelKey);
|
||||
},
|
||||
});
|
||||
Template.listEntryRequirementsPopup.events({
|
||||
async 'submit .js-list-entry-requirements-form'(event, instance) {
|
||||
event.preventDefault();
|
||||
const requirements = [...event.currentTarget.querySelectorAll('input:checked')].map(input => input.value);
|
||||
try {
|
||||
await Meteor.callAsync('setListEntryRequirements', this._id, requirements);
|
||||
Popup.back();
|
||||
} catch (error) {
|
||||
instance.find('.js-list-entry-requirements-status').textContent = error.reason || error.message;
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -272,6 +272,10 @@ template(name="listActionPopup")
|
||||
h4.menu-group-heading {{_ 'settings'}}
|
||||
if currentUser.isBoardAdmin
|
||||
ul.pop-over-list
|
||||
li
|
||||
a.js-list-entry-requirements
|
||||
i.fa.fa-check-square-o
|
||||
| {{_ 'moveCardPopup-title'}} — {{_ 'custom-fields'}} / {{_ 'date'}} *
|
||||
li
|
||||
a.js-set-wip-limit
|
||||
i.fa.fa-ban
|
||||
@@ -468,12 +472,39 @@ template(name="listSyncPopup")
|
||||
each listSyncSourceTypes
|
||||
option(value="{{this}}" selected="{{#if isCurrentSyncType this}}selected{{/if}}") {{listSyncSourceLabel this}}
|
||||
if isSyncTypeSelected
|
||||
label {{_ 'list-sync-url'}}
|
||||
p
|
||||
input.list-sync-url.js-list-sync-url(type="text" value="{{currentSyncUrl}}" placeholder="{{_ 'list-sync-url-placeholder'}}")
|
||||
//- A hosted service of models/lib/apiSyncSources.js has its own address.
|
||||
unless syncFixedUrl
|
||||
label {{_ 'list-sync-url'}}
|
||||
p
|
||||
input.list-sync-url.js-list-sync-url(type="text" value="{{currentSyncUrl}}" placeholder="{{_ 'list-sync-url-placeholder'}}")
|
||||
label {{_ 'list-sync-project-key'}}
|
||||
p
|
||||
input.list-sync-project-key.js-list-sync-project-key(type="text" value="{{currentSyncProjectKey}}" placeholder="{{_ 'list-sync-project-key-placeholder'}}")
|
||||
if supportsSyncStatus
|
||||
label(for="list-sync-status-id") {{_ 'status'}} #
|
||||
p
|
||||
input.js-list-sync-status-id(id="list-sync-status-id" type="text" inputmode="numeric" pattern="[1-9][0-9]*" maxlength="16" value="{{currentSyncStatusId}}" placeholder="{{_ 'predicate-all'}}")
|
||||
if supportsSyncFilter
|
||||
label(for="list-sync-filter-id") {{_ 'filter'}} #
|
||||
p
|
||||
input.js-list-sync-filter-id(id="list-sync-filter-id" type="text" inputmode="numeric" pattern="[1-9][0-9]*" maxlength="16" value="{{currentSyncFilterId}}")
|
||||
if showOpenProjectTimeActivity
|
||||
label(for="openproject-time-activity-id") {{_ 'time-entries'}} · {{_ 'activity'}} #
|
||||
p
|
||||
input.js-openproject-time-activity-id(id="openproject-time-activity-id" type="text" inputmode="numeric" pattern="[1-9][0-9]*" maxlength="16" value="{{currentOpenProjectTimeActivityId}}")
|
||||
//- A service WeKan imports from through its API: what there is to sync,
|
||||
listed with the sign-in typed below (apiImportList), so its id need
|
||||
not be looked up by hand.
|
||||
if isApiSyncType
|
||||
p
|
||||
button.js-list-sync-find(type="button" disabled=syncFinding) {{_ 'api-import-list'}}
|
||||
if syncFoundItems.length
|
||||
p
|
||||
select.js-list-sync-found
|
||||
each syncFoundItems
|
||||
option(value=id selected="{{#if isCurrentSyncProject id}}selected{{/if}}") {{name}}
|
||||
if syncFindMessage
|
||||
p.quiet.js-list-sync-find-message= syncFindMessage
|
||||
//- A grain reaches a tracker only through an API a member allowed in the
|
||||
Sandstorm Powerbox, for the SAVED source (server/sandstormEgress.js).
|
||||
if isSandstorm
|
||||
@@ -497,7 +528,7 @@ template(name="listSyncPopup")
|
||||
p
|
||||
a.flex.js-toggle-sync-field(data-field=field)
|
||||
.materialCheckBox(class="{{#if checked}}is-checked{{/if}}")
|
||||
span {{_ label}}
|
||||
span {{label}}
|
||||
if syncTimeEnabled
|
||||
p.quiet {{_ 'sync-time-estimate-hint'}}
|
||||
if syncPlanningEnabled
|
||||
@@ -506,7 +537,10 @@ template(name="listSyncPopup")
|
||||
p
|
||||
a.flex.js-toggle-sync-operation(data-operation=operation)
|
||||
.materialCheckBox(class="{{#if checked}}is-checked{{/if}}")
|
||||
span {{_ label}}
|
||||
if text
|
||||
span {{text}}
|
||||
else
|
||||
span {{_ label}}
|
||||
if syncEstimateEnabled
|
||||
if syncEstimateGitlab
|
||||
label {{_ 'sync-estimate-source'}}
|
||||
@@ -519,6 +553,12 @@ template(name="listSyncPopup")
|
||||
each syncEstimateFields
|
||||
option(value=_id selected=selected) {{name}}
|
||||
p.quiet {{_ 'sync-estimate-field-gitlab-hint'}}
|
||||
else if syncEstimateBoardNumber
|
||||
label {{_ 'sync-estimate-field-gitlab'}}
|
||||
select.js-list-sync-estimate-field
|
||||
option(value="") {{_ 'sync-estimate-field-gitlab'}}
|
||||
each syncEstimateFields
|
||||
option(value=_id selected=selected) {{name}}
|
||||
else
|
||||
label {{_ 'sync-estimate-field'}}
|
||||
select.js-list-sync-estimate-field
|
||||
@@ -541,7 +581,16 @@ template(name="listSyncPopup")
|
||||
if listSyncLastError
|
||||
p.list-sync-error {{_ 'list-sync-last-error'}}: {{ listSyncLastError }}
|
||||
if listSyncWriteBackError
|
||||
p.list-sync-error {{_ 'sync-write-back-error'}}: {{ listSyncWriteBackError }}
|
||||
if isCurrentSyncType 'todoistapi'
|
||||
p.list-sync-error Todoist: {{ listSyncWriteBackError }}
|
||||
else if isCurrentSyncType 'googletasks'
|
||||
p.list-sync-error Google Tasks: {{ listSyncWriteBackError }}
|
||||
else if isCurrentSyncType 'mstodo'
|
||||
p.list-sync-error Microsoft To Do: {{ listSyncWriteBackError }}
|
||||
else if isCurrentSyncType 'trellolist'
|
||||
p.list-sync-error Trello: {{ listSyncWriteBackError }}
|
||||
else
|
||||
p.list-sync-error {{_ 'sync-write-back-error'}}: {{ listSyncWriteBackError }}
|
||||
p
|
||||
button.js-list-sync-save.primary(type="submit") {{_ 'save'}}
|
||||
button.js-list-sync-preview(type="button" disabled=syncBusy) {{_ 'sync-preview-button'}}
|
||||
@@ -562,6 +611,8 @@ template(name="listSyncPopup")
|
||||
p {{_ 'sync-preview-create'}}: {{created}}
|
||||
p {{_ 'sync-preview-update'}}: {{updated}}
|
||||
p {{_ 'sync-preview-archive'}}: {{archived}}
|
||||
if hasTimeEntryCount
|
||||
p.sync-time-entries-updated {{_ 'sync-preview-update'}} — {{_ 'time-entries'}} ({{timeEntriesUpdated}})
|
||||
each sourceRows
|
||||
p {{path}}: {{count}} — {{_ reasonLabel}}
|
||||
if coverage.source.truncated
|
||||
@@ -580,6 +631,8 @@ template(name="listSyncPopup")
|
||||
p {{_ 'sync-preview-create'}}: {{created}}
|
||||
p {{_ 'sync-preview-update'}}: {{updated}}
|
||||
p {{_ 'sync-preview-archive'}}: {{archived}}
|
||||
if hierarchyCatalogsUpdated
|
||||
p.sync-hierarchy-catalogs-updated {{_ 'sync-preview-update'}} — {{_ 'custom-fields'}} ({{hierarchyCatalogsUpdated}})
|
||||
each syncPreviewItems
|
||||
p
|
||||
strong {{_ actionLabel}}: {{externalId}} — {{title}}
|
||||
@@ -609,7 +662,7 @@ template(name="listSyncPopup")
|
||||
p.quiet {{_ 'sync-conflict-hint'}}
|
||||
each syncConflicts
|
||||
.list-sync-conflict
|
||||
strong {{externalId}} — {{_ label}}
|
||||
strong {{externalId}} — {{label}}
|
||||
if creation
|
||||
p {{_ 'event-source'}}
|
||||
else
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { OPENPROJECT_ROLLUP_NAMES, OPENPROJECT_DERIVED_DATES, OPENPROJECT_BOOLEAN_FIELDS, OPENPROJECT_MILESTONE_FIELD, OPENPROJECT_TEXT_FIELDS } from '/models/lib/openProjectDurations';
|
||||
import { JIRA_VOTES_FIELD } from '/models/lib/jiraVotes';
|
||||
import { titlesFromComposer } from '/client/components/forms/multilineTitleChoice';
|
||||
import { relativePosition } from '/models/lib/relativePosition';
|
||||
import { formatDateForDisplay } from '/client/lib/dateDisplay';
|
||||
@@ -41,9 +43,9 @@ import {
|
||||
// server/methods/listSync.js. SYNC_CAPABLE_SOURCES is the same list those
|
||||
// methods validate `type` against, reused here so the picker can never offer
|
||||
// a source the backend would reject.
|
||||
import { SYNC_CAPABLE_SOURCES } from '/models/lib/externalParsers';
|
||||
// The services WeKan imports from through their API, as Sync sources.
|
||||
import { SYNC_CAPABLE_SOURCES, listSyncProvider, listSyncFields, API_SYNC_SOURCES, apiSyncFixedUrl } from '/models/lib/apiSyncSources';
|
||||
const { ISSUE_DETAIL_SOURCES } = require('/models/lib/listSyncIssueDetails');
|
||||
const { WRITE_BACK_SOURCES } = require('/models/lib/listSyncWriteBack');
|
||||
import { fromNow } from '/imports/lib/dateUtils';
|
||||
|
||||
let listsColors;
|
||||
@@ -622,6 +624,7 @@ Template.listActionPopup.events({
|
||||
Meteor.call('setStickyListHeaders', list.boardId, enabled);
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-list-entry-requirements': Popup.open('listEntryRequirements', { titleKey: 'moveCardPopup-title' }),
|
||||
'click .js-set-wip-limit': Popup.open('setWipLimit'),
|
||||
'click .js-list-policy': Popup.open('listPolicy'),
|
||||
async 'click .js-toggle-list-split'(event) {
|
||||
@@ -923,18 +926,29 @@ Template.setListColorPopup.events({
|
||||
// only: reads the list's own (already published, credential-free) syncSource
|
||||
// fields and calls the configuration, Sync and conflict-resolution methods in
|
||||
// server/methods/listSync.js. Authority and fresh comparison checks stay there.
|
||||
const syncFieldLabel = field => ({ spentTime: 'spent-time-hours', estimate: 'scrum-estimate',
|
||||
const supportsProjectLookup = type => !Meteor.settings.public?.sandstorm &&
|
||||
Boolean(listSyncProvider(type)?.projectLookup);
|
||||
|
||||
function clearProjectLookup(tpl) {
|
||||
tpl.projectLookup = null;
|
||||
tpl.syncFoundItems.set([]);
|
||||
tpl.syncFindMessage.set('');
|
||||
tpl.syncFinding.set(false);
|
||||
}
|
||||
|
||||
const syncFieldLabel = field => ({ notionPeople: 'members', taskOrder: 'sort', timeEntries: 'time-entries', openProjectHierarchy: 'custom-fields', dueDate: 'due-date', dueComplete: 'due-complete', startDate: 'card-start', comments: 'comments', subtasks: 'subtasks', dependencies: 'card-dependencies', spentTime: 'spent-time-hours', estimate: 'scrum-estimate',
|
||||
originalEstimate: 'sync-original-time', remainingEstimate: 'sync-remaining-time',
|
||||
// Scrum planning (models/lib/listSyncPlanning.js); `scrum` is how a preview
|
||||
// names a card whose planning changes.
|
||||
sprint: 'sync-planning-sprint', releases: 'sync-planning-releases', scrum: 'sync-planning-fields' })[field] || field;
|
||||
// The fields each source can sync: planning only where its issues carry it
|
||||
// (models/lib/listSyncPlanning.js SOURCE_PLANNING).
|
||||
const syncFieldChoices = type => (type === 'jira'
|
||||
? ['title', 'description', 'spentTime', 'estimate', 'originalEstimate', 'remainingEstimate', 'sprint', 'releases']
|
||||
: type === 'gitlab' ? ['title', 'description', 'estimate', 'sprint', 'releases']
|
||||
: type ? ['title', 'description', 'releases'] : ['title', 'description']);
|
||||
|
||||
const openProjectDerivedNames = { ...OPENPROJECT_ROLLUP_NAMES, ...OPENPROJECT_DERIVED_DATES, ...OPENPROJECT_BOOLEAN_FIELDS, ...Object.fromEntries(Object.entries(OPENPROJECT_TEXT_FIELDS).map(([field, { name }]) => [field, name])), openProjectMilestone: OPENPROJECT_MILESTONE_FIELD };
|
||||
function syncFieldText(field) {
|
||||
if (field === 'reminderDate') return 'Microsoft To Do · Reminder';
|
||||
if (field === 'jiraVotes') return JIRA_VOTES_FIELD;
|
||||
if (field === 'jiraHistory') return `Jira · ${TAPi18n.__('history')}`;
|
||||
if (field === 'jiraVoterIdentities') return `Jira · ${TAPi18n.__('vote-public')}`;
|
||||
return openProjectDerivedNames[field] || TAPi18n.__(syncFieldLabel(field));
|
||||
}
|
||||
Template.listSyncPopup.onCreated(function () {
|
||||
const tpl = this;
|
||||
const list = Template.currentData();
|
||||
@@ -942,6 +956,15 @@ Template.listSyncPopup.onCreated(function () {
|
||||
// at whatever the list already has, then tracks the user's picks so the
|
||||
// form fields below (url/projectKey/credential) show/hide live.
|
||||
tpl.selectedSyncType = new ReactiveVar((list && list.syncSource && list.syncSource.type) || '');
|
||||
tpl.importSyncSource = new ReactiveVar(null);
|
||||
if (list?._id && !list.syncSource?.type) {
|
||||
Meteor.call('listSyncImportSource', list._id, (error, source) => {
|
||||
if (error || !source || tpl.view.isDestroyed || tpl.selectedSyncType.get()) return;
|
||||
tpl.importSyncSource.set(source);
|
||||
tpl.selectedSyncType.set(source.type);
|
||||
if (source.hasCredential) tpl.hasCredential.set(true);
|
||||
});
|
||||
}
|
||||
tpl.selectedSyncEnabled = new ReactiveVar(
|
||||
!(list && list.syncSource && list.syncSource.enabled === false),
|
||||
);
|
||||
@@ -958,8 +981,14 @@ Template.listSyncPopup.onCreated(function () {
|
||||
archiveCards: list?.syncSource?.archiveCards !== false,
|
||||
issueDetails: list?.syncSource?.issueDetails === true,
|
||||
writeBack: list?.syncSource?.writeBack === true,
|
||||
jiraServicePublicComments: !!list?.syncSource?.jiraServicePublicCommentsSince,
|
||||
writeBackState: !!(list?.syncSource?.todoistStateSince || list?.syncSource?.googleTasksStateSince || list?.syncSource?.mstodoStateSince || list?.syncSource?.trelloStateSince),
|
||||
});
|
||||
tpl.hasCredential = new ReactiveVar(false);
|
||||
// What a service has to sync (apiImportList), for the project picker.
|
||||
tpl.syncFoundItems = new ReactiveVar([]);
|
||||
tpl.syncFinding = new ReactiveVar(false);
|
||||
tpl.syncFindMessage = new ReactiveVar('');
|
||||
tpl.syncNowResult = new ReactiveVar('');
|
||||
tpl.syncNowSuccess = new ReactiveVar(true);
|
||||
tpl.syncConflicts = new ReactiveVar([]);
|
||||
@@ -1002,6 +1031,7 @@ Template.listSyncPopup.helpers({
|
||||
return (Template.instance().runReports.get() || []).map(report => ({ ...report,
|
||||
when: new Date(report.startedAt).toLocaleString(),
|
||||
hasCounts: report.created !== undefined,
|
||||
hasTimeEntryCount: Number.isSafeInteger(report.timeEntriesUpdated),
|
||||
statusLabel: `sync-report-${report.status}`,
|
||||
sourceRows: (report.coverage?.source?.rows || []).map(row => ({ ...row,
|
||||
reasonLabel: `sync-source-${row.reason}`,
|
||||
@@ -1012,8 +1042,7 @@ Template.listSyncPopup.helpers({
|
||||
syncPreviewItems() {
|
||||
return (Template.instance().syncPreview.get()?.items || []).map(row => ({ ...row,
|
||||
actionLabel: `sync-preview-${row.action}`,
|
||||
fieldsText: row.fields.map(field => TAPi18n.__(field === 'syncLastSource' ? 'sync-preview-baseline' :
|
||||
syncFieldLabel(field))).join(', '),
|
||||
fieldsText: row.fields.map(field => field === 'syncLastSource' ? TAPi18n.__('sync-preview-baseline') : syncFieldText(field)).join(', '),
|
||||
}));
|
||||
},
|
||||
syncSourceOmissions() {
|
||||
@@ -1029,27 +1058,41 @@ Template.listSyncPopup.helpers({
|
||||
}));
|
||||
},
|
||||
syncConflicts() { return Template.instance().syncConflicts.get().filter(row => row.fingerprint).map(row => ({
|
||||
...row, label: row.creation ? 'sync-conflict-creation' : row.archive ? 'sync-conflict-archive' : row.duplicate ? 'sync-conflict-duplicate' : syncFieldLabel(row.field),
|
||||
...row, label: row.creation ? TAPi18n.__('sync-conflict-creation') : row.archive ? TAPi18n.__('sync-conflict-archive') : row.duplicate ? TAPi18n.__('sync-conflict-duplicate') : syncFieldText(row.field),
|
||||
})); },
|
||||
syncBusy() { return Template.instance().syncBusy.get(); },
|
||||
syncOperations() {
|
||||
const selected = Template.instance().selectedSyncOperations.get();
|
||||
const type = Template.instance().selectedSyncType.get();
|
||||
const provider = listSyncProvider(type);
|
||||
return [
|
||||
{ operation: 'createCards', label: 'add-card', checked: selected.createCards },
|
||||
{ operation: 'archiveCards', label: 'archive-card', checked: selected.archiveCards },
|
||||
// GitHub, GitLab, Gitea and Forgejo issues: their comments, labels,
|
||||
// state and files too (models/lib/listSyncIssueDetails.js).
|
||||
...(ISSUE_DETAIL_SOURCES.includes(Template.instance().selectedSyncType.get())
|
||||
...(ISSUE_DETAIL_SOURCES.includes(type)
|
||||
? [{ operation: 'issueDetails', label: 'sync-issue-details', checked: selected.issueDetails }] : []),
|
||||
// #2698: GitLab - WeKan's changes written back to the issues.
|
||||
...(WRITE_BACK_SOURCES.includes(Template.instance().selectedSyncType.get())
|
||||
? [{ operation: 'writeBack', label: 'sync-write-back', checked: selected.writeBack }] : []),
|
||||
...(provider?.writeBack ? [{
|
||||
operation: 'writeBack', label: 'sync-write-back', checked: selected.writeBack,
|
||||
text: provider.writeBack.length
|
||||
? `WeKan → ${provider.name} (${provider.writeBack.map(field => TAPi18n.__(field)).join(', ')})`
|
||||
: '',
|
||||
}] : []),
|
||||
...(type === 'jira' && selected.writeBack && Template.instance().selectedSyncFields.get().includes('comments') ? [{
|
||||
operation: 'jiraServicePublicComments', checked: selected.jiraServicePublicComments,
|
||||
text: `WeKan → Jira Service Management (${TAPi18n.__('comments')} · ${TAPi18n.__('public')})`,
|
||||
}] : []),
|
||||
...(['todoistapi', 'googletasks', 'mstodo', 'trellolist'].includes(type) && selected.writeBack ? [{
|
||||
operation: 'writeBackState', checked: selected.writeBackState,
|
||||
text: `WeKan → ${type === 'todoistapi' ? 'Todoist' : type === 'googletasks' ? 'Google Tasks' : type === 'mstodo' ? 'Microsoft To Do' : 'Trello'} (${TAPi18n.__('archive-card')}, ${TAPi18n.__('restore')})`,
|
||||
}] : []),
|
||||
];
|
||||
},
|
||||
syncEstimateEnabled() {
|
||||
return ['jira', 'gitlab'].includes(Template.instance().selectedSyncType.get()) &&
|
||||
return ['jira', 'gitlab', 'openproject', 'notionapi'].includes(Template.instance().selectedSyncType.get()) &&
|
||||
Template.instance().selectedSyncFields.get().includes('estimate');
|
||||
},
|
||||
syncEstimateBoardNumber() { return ['openproject', 'notionapi'].includes(Template.instance().selectedSyncType.get()); },
|
||||
syncEstimateGitlab() { return Template.instance().selectedSyncType.get() === 'gitlab'; },
|
||||
syncEstimateSources() {
|
||||
const selected = Template.instance().selectedEstimateSource.get();
|
||||
@@ -1059,25 +1102,29 @@ Template.listSyncPopup.helpers({
|
||||
},
|
||||
syncEstimateFields() {
|
||||
const selected = Template.instance().selectedEstimateField.get();
|
||||
const gitlab = Template.instance().selectedSyncType.get() === 'gitlab';
|
||||
const type = Template.instance().selectedSyncType.get();
|
||||
const fields = ReactiveCache.getCustomFields({ boardIds: Template.currentData().boardId, type: 'number' });
|
||||
// GitLab writes into any numeric field the administrator picks.
|
||||
if (gitlab) return fields.map(field => ({ _id: field._id, selected: field._id === selected, name: field.name }));
|
||||
if (['openproject', 'notionapi'].includes(type)) return fields.filter(field => !field.adminOnly)
|
||||
.map(field => ({ _id: field._id, selected: field._id === selected, name: field.name }));
|
||||
if (type === 'gitlab') return fields.map(field => ({ _id: field._id, selected: field._id === selected, name: field.name }));
|
||||
return fields
|
||||
.filter(field => field.settings?.jiraEstimateFieldId && field.settings?.jiraEstimateUnit)
|
||||
.map(field => ({ _id: field._id, selected: field._id === selected,
|
||||
name: `${field.name} (${field.settings.jiraEstimateFieldId}, ${field.settings.jiraEstimateUnit})` }));
|
||||
},
|
||||
syncTimeEnabled() {
|
||||
return Template.instance().selectedSyncFields.get().some(field => ['originalEstimate', 'remainingEstimate'].includes(field));
|
||||
const tpl = Template.instance();
|
||||
return tpl.selectedSyncType.get() === 'jira' &&
|
||||
tpl.selectedSyncFields.get().some(field => ['originalEstimate', 'remainingEstimate'].includes(field));
|
||||
},
|
||||
syncPlanningEnabled() {
|
||||
return Template.instance().selectedSyncFields.get().some(field => ['sprint', 'releases'].includes(field));
|
||||
},
|
||||
syncTextFields() {
|
||||
const fields = Template.instance().selectedSyncFields.get();
|
||||
const choices = syncFieldChoices(Template.instance().selectedSyncType.get());
|
||||
return choices.map(field => ({ field, label: syncFieldLabel(field), checked: fields.includes(field) }));
|
||||
const choices = listSyncFields(Template.instance().selectedSyncType.get());
|
||||
return choices.map(field => ({ field, label: syncFieldText(field), checked: fields.includes(field) }));
|
||||
},
|
||||
listSyncSourceTypes() {
|
||||
return SYNC_CAPABLE_SOURCES;
|
||||
@@ -1085,14 +1132,7 @@ Template.listSyncPopup.helpers({
|
||||
listSyncSourceLabel(type) {
|
||||
// Technical identifiers (source names), not language content - same
|
||||
// reasoning as the LDAP env-var badges not being translated.
|
||||
const labels = {
|
||||
jira: 'Jira',
|
||||
github: 'GitHub',
|
||||
gitlab: 'GitLab',
|
||||
gitea: 'Gitea',
|
||||
forgejo: 'Forgejo',
|
||||
};
|
||||
return labels[type] || type;
|
||||
return listSyncProvider(type)?.name || type;
|
||||
},
|
||||
isCurrentSyncType(type) {
|
||||
return Template.instance().selectedSyncType.get() === type;
|
||||
@@ -1100,13 +1140,56 @@ Template.listSyncPopup.helpers({
|
||||
isSyncTypeSelected() {
|
||||
return !!Template.instance().selectedSyncType.get();
|
||||
},
|
||||
isApiSyncType() {
|
||||
return supportsProjectLookup(Template.instance().selectedSyncType.get());
|
||||
},
|
||||
syncFixedUrl() {
|
||||
return !!apiSyncFixedUrl(Template.instance().selectedSyncType.get());
|
||||
},
|
||||
syncFoundItems() {
|
||||
return Template.instance().syncFoundItems.get();
|
||||
},
|
||||
syncFinding() {
|
||||
return Template.instance().syncFinding.get();
|
||||
},
|
||||
syncFindMessage() {
|
||||
return Template.instance().syncFindMessage.get();
|
||||
},
|
||||
isCurrentSyncProject(id) {
|
||||
const list = Template.currentData();
|
||||
return !!list && !!list.syncSource && list.syncSource.projectKey === id;
|
||||
},
|
||||
currentSyncUrl() {
|
||||
const list = Template.currentData();
|
||||
return (list && list.syncSource && list.syncSource.url) || '';
|
||||
const tpl = Template.instance();
|
||||
const source = list?.syncSource || tpl.importSyncSource.get();
|
||||
return source?.type === tpl.selectedSyncType.get() ? source.url : '';
|
||||
},
|
||||
currentSyncProjectKey() {
|
||||
const list = Template.currentData();
|
||||
return (list && list.syncSource && list.syncSource.projectKey) || '';
|
||||
const tpl = Template.instance();
|
||||
const source = list?.syncSource || tpl.importSyncSource.get();
|
||||
return source?.type === tpl.selectedSyncType.get() ? source.projectKey : '';
|
||||
},
|
||||
supportsSyncStatus() {
|
||||
return ['jira', 'openproject'].includes(Template.instance().selectedSyncType.get());
|
||||
},
|
||||
supportsSyncFilter() {
|
||||
return ['jira', 'openproject'].includes(Template.instance().selectedSyncType.get());
|
||||
},
|
||||
showOpenProjectTimeActivity() {
|
||||
const tpl = Template.instance();
|
||||
return tpl.selectedSyncType.get() === 'openproject' && tpl.selectedSyncOperations.get().writeBack === true &&
|
||||
tpl.selectedSyncFields.get().includes('timeEntries');
|
||||
},
|
||||
currentOpenProjectTimeActivityId() {
|
||||
return Template.currentData()?.syncSource?.openProjectTimeActivityId || '';
|
||||
},
|
||||
currentSyncFilterId() {
|
||||
return Template.currentData()?.syncSource?.filterId || '';
|
||||
},
|
||||
currentSyncStatusId() {
|
||||
return Template.currentData()?.syncSource?.statusId || '';
|
||||
},
|
||||
currentSyncUsername() {
|
||||
const list = Template.currentData();
|
||||
@@ -1145,6 +1228,44 @@ Template.listSyncPopup.helpers({
|
||||
});
|
||||
|
||||
Template.listSyncPopup.events({
|
||||
// A service's own list of what can be synced, with the sign-in typed in
|
||||
// this popup - sent for this one request, as the API import does.
|
||||
async 'click .js-list-sync-find'(event, tpl) {
|
||||
event.preventDefault();
|
||||
const type = tpl.selectedSyncType.get();
|
||||
if (!supportsProjectLookup(type) || tpl.syncFinding.get()) return;
|
||||
const token = tpl.$('.js-list-sync-token').val() || '';
|
||||
const username = (tpl.$('.js-list-sync-username').val() || '').trim();
|
||||
const url = (tpl.$('.js-list-sync-url').val() || '').trim();
|
||||
const sign = API_SYNC_SOURCES[type]?.sign;
|
||||
const credentials = sign === 'token' ? { token } : sign === 'keytoken' ? { key: username, token }
|
||||
: sign === 'password' ? { url, username, password: token }
|
||||
: { url, token, ...(type === 'jira' && username ? { username } : {}) };
|
||||
const request = {};
|
||||
tpl.projectLookup = request;
|
||||
tpl.syncFinding.set(true);
|
||||
tpl.syncFindMessage.set('');
|
||||
try {
|
||||
const saved = tpl.importSyncSource.get();
|
||||
const reuse = !token && !username && saved?.hasCredential && saved.type === type && saved.url === url;
|
||||
const items = reuse ? await Meteor.callAsync('listSyncImportProjects', Template.currentData()._id, type, url)
|
||||
: await Meteor.callAsync('apiImportList', type, credentials);
|
||||
if (tpl.view.isDestroyed || tpl.projectLookup !== request) return;
|
||||
tpl.syncFoundItems.set(items || []);
|
||||
if (!items || !items.length) tpl.syncFindMessage.set(TAPi18n.__('api-import-nothing'));
|
||||
else if (!tpl.$('.js-list-sync-project-key').val()) tpl.$('.js-list-sync-project-key').val(items[0].id);
|
||||
} catch (error) {
|
||||
if (tpl.view.isDestroyed || tpl.projectLookup !== request) return;
|
||||
tpl.syncFoundItems.set([]);
|
||||
tpl.syncFindMessage.set(`${TAPi18n.__('api-import-failed')}: ${error.reason || error.message}`);
|
||||
} finally {
|
||||
if (tpl.projectLookup === request) tpl.syncFinding.set(false);
|
||||
}
|
||||
},
|
||||
'change .js-list-sync-found'(event, tpl) {
|
||||
tpl.clearSyncPreview();
|
||||
tpl.$('.js-list-sync-project-key').val(event.currentTarget.value);
|
||||
},
|
||||
async 'click .js-sandstorm-sync-grant'(evt, tpl) {
|
||||
evt.preventDefault();
|
||||
tpl.syncGrantError.set('');
|
||||
@@ -1169,9 +1290,13 @@ Template.listSyncPopup.events({
|
||||
else tpl.runReports.set(reports);
|
||||
});
|
||||
},
|
||||
'input .js-list-sync-url, input .js-list-sync-project-key, input .js-list-sync-token, input .js-list-sync-username'(event, tpl) {
|
||||
'input .js-list-sync-project-key, input .js-list-sync-status-id, input .js-list-sync-filter-id'(event, tpl) {
|
||||
tpl.clearSyncPreview();
|
||||
},
|
||||
'input .js-list-sync-url, input .js-list-sync-token, input .js-list-sync-username'(event, tpl) {
|
||||
tpl.clearSyncPreview();
|
||||
clearProjectLookup(tpl);
|
||||
},
|
||||
'click .js-list-sync-preview'(event, tpl) {
|
||||
event.preventDefault();
|
||||
if (tpl.syncBusy.get()) return;
|
||||
@@ -1237,8 +1362,9 @@ Template.listSyncPopup.events({
|
||||
},
|
||||
'change .js-list-sync-type'(event, tpl) {
|
||||
tpl.clearSyncPreview();
|
||||
clearProjectLookup(tpl);
|
||||
tpl.selectedSyncType.set(event.currentTarget.value);
|
||||
const kept = syncFieldChoices(event.currentTarget.value);
|
||||
const kept = listSyncFields(event.currentTarget.value);
|
||||
tpl.selectedSyncFields.set(tpl.selectedSyncFields.get().filter(field => kept.includes(field)));
|
||||
},
|
||||
'click a.js-toggle-list-sync-enabled'(event, tpl) {
|
||||
@@ -1258,13 +1384,18 @@ Template.listSyncPopup.events({
|
||||
const url = tpl.$('.js-list-sync-url').val() || '';
|
||||
const token = tpl.$('.js-list-sync-token').val() || '';
|
||||
const username = tpl.$('.js-list-sync-username').val() || '';
|
||||
const imported = tpl.importSyncSource.get();
|
||||
const config = {
|
||||
type,
|
||||
url,
|
||||
projectKey,
|
||||
...(['jira', 'openproject'].includes(type) ? { statusId: tpl.find('.js-list-sync-status-id')?.value || '' } : {}),
|
||||
...(['jira', 'openproject'].includes(type) ? { filterId: tpl.find('.js-list-sync-filter-id')?.value || '' } : {}),
|
||||
...(type === 'openproject' && tpl.selectedSyncOperations.get().writeBack && tpl.selectedSyncFields.get().includes('timeEntries')
|
||||
? { openProjectTimeActivityId: tpl.find('.js-openproject-time-activity-id')?.value || '' } : {}),
|
||||
enabled: tpl.selectedSyncEnabled.get(),
|
||||
fields: tpl.selectedSyncFields.get(),
|
||||
...(['jira', 'gitlab'].includes(type) && tpl.selectedSyncFields.get().includes('estimate')
|
||||
...(['jira', 'gitlab', 'openproject', 'notionapi'].includes(type) && tpl.selectedSyncFields.get().includes('estimate')
|
||||
? { estimateCustomFieldId: tpl.selectedEstimateField.get(),
|
||||
...(type === 'gitlab' ? { estimateSourceField: tpl.selectedEstimateSource.get() } : {}) } : {}),
|
||||
...tpl.selectedSyncOperations.get(),
|
||||
@@ -1272,6 +1403,8 @@ Template.listSyncPopup.events({
|
||||
// Switching source requires entering a credential for the new source.
|
||||
token: token || null,
|
||||
username,
|
||||
...(!token && !username && imported?.hasCredential && imported.type === type && imported.url === url
|
||||
? { reuseImportCredential: true } : {}),
|
||||
};
|
||||
Meteor.call('setListSyncSource', list._id, config, (err) => {
|
||||
tpl.$('.js-list-sync-token').val('');
|
||||
|
||||
@@ -173,20 +173,3 @@
|
||||
color: #b71c1c;
|
||||
margin-inline-start: 0.3em;
|
||||
}
|
||||
|
||||
/* Labelled native checkboxes: the app-wide material form rule
|
||||
(client/components/forms/forms.css) hides native checkboxes three ways -
|
||||
display, visibility, an offset - which left these with a label and no box
|
||||
to tick or see ticked. All three are undone, as in cardFlow.css. */
|
||||
.billing-page input[type="checkbox"] {
|
||||
display: inline-block;
|
||||
visibility: visible;
|
||||
position: static;
|
||||
inset-inline-start: auto;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
min-height: 0;
|
||||
margin: 0;
|
||||
margin-inline-end: 4px;
|
||||
flex: none;
|
||||
}
|
||||
@@ -1,25 +1,6 @@
|
||||
.board-drag-settings { width: 100%; margin-bottom: 16px; }
|
||||
.board-drag-settings th { text-align: start; }
|
||||
.board-drag-settings th:last-child, .board-drag-settings td:last-child { text-align: center; }
|
||||
.board-drag-settings input[type=checkbox] { width: auto; min-height: 0; margin: 4px; }
|
||||
/* #6820: forms.css gives every input 9px 14px of padding and a border; on a
|
||||
16px native checkbox that left the browser about 2px to draw in, so a ticked
|
||||
box was a small blue dot beside an unticked square. A native checkbox keeps
|
||||
no padding, border or background of a text field. */
|
||||
.board-drag-settings input[type=checkbox] {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: none;
|
||||
box-shadow: none;
|
||||
display: inline-block;
|
||||
visibility: visible;
|
||||
position: static;
|
||||
inset-inline-start: auto;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
appearance: auto;
|
||||
transform: none;
|
||||
}
|
||||
/* Select all / Unselect all centred under their "Draggable" heading, as the
|
||||
heading and its checkboxes are. */
|
||||
.board-drag-settings th .board-settings-column-actions { justify-content: center; }
|
||||
@@ -8,6 +8,7 @@ template(name="editor")
|
||||
class="{{class}}"
|
||||
id=id
|
||||
aria-label=labelText
|
||||
aria-describedby=describedBy
|
||||
autofocus=autofocus
|
||||
placeholder="{{_ 'comment-placeholder'}}")
|
||||
+Template.contentBlock
|
||||
|
||||
@@ -222,18 +222,14 @@ Blaze.Template.registerHelper(
|
||||
}
|
||||
return member;
|
||||
}), ...specialHandles])];
|
||||
const mentionRegex = /\B@([\w.-]*)/gi;
|
||||
// Jira Cloud mentions carry their own account ID and display label.
|
||||
const mentionRegex = /<span\b[^>]*\bdata-jira-mention="[^"]*"[^>]*>[^<]*<\/span>|\B@([\w.-]*)/gi;
|
||||
|
||||
let currentMention;
|
||||
while ((currentMention = mentionRegex.exec(content)) !== null) {
|
||||
const [fullMention, quoteduser, simple] = currentMention;
|
||||
const username = quoteduser || simple;
|
||||
content = content.replace(mentionRegex, (fullMention, username) => {
|
||||
if (!username) return fullMention;
|
||||
const knowedUser = findWhere(knowedUsers, { username });
|
||||
if (!knowedUser) {
|
||||
continue;
|
||||
}
|
||||
if (!knowedUser) return fullMention;
|
||||
|
||||
const linkValue = [' ', at, knowedUser.username];
|
||||
let linkClass = 'atMention js-open-member';
|
||||
if (knowedUser.userId === Meteor.userId()) {
|
||||
linkClass += ' me';
|
||||
@@ -263,8 +259,8 @@ Blaze.Template.registerHelper(
|
||||
[' ', at, displayText],
|
||||
);
|
||||
|
||||
content = content.replace(fullMention, Blaze.toHTML(link));
|
||||
}
|
||||
return Blaze.toHTML(link);
|
||||
});
|
||||
|
||||
return HTML.Raw(sanitizeHTML(content, { stripLinks, urlSchemes }));
|
||||
}),
|
||||
@@ -323,6 +319,10 @@ Template.viewer.onRendered(function () {
|
||||
});
|
||||
|
||||
Template.viewer.events({
|
||||
'click details > summary'(event) {
|
||||
// Let the browser toggle the section without opening a surrounding editor.
|
||||
event.stopPropagation();
|
||||
},
|
||||
// Viewer sometimes have click-able wrapper around them (for instance to edit
|
||||
// the corresponding text). Clicking a link shouldn't fire these actions, stop
|
||||
// we stop these event at the viewer component level.
|
||||
|
||||
@@ -65,9 +65,12 @@
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
/* The Board View menu in the header bar: beside the view's button. */
|
||||
.board-header-btn + .feature-help-btn {
|
||||
margin-inline-start: 2px;
|
||||
/* Keep the help button with its menu when the header wraps. */
|
||||
.board-view-controls {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex: 0 0 auto;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
/* A popup's title bar places its maximize and close buttons absolutely at its
|
||||
|
||||
@@ -719,25 +719,6 @@ a:not(.disabled).is-active i.fa {
|
||||
.viewer em {
|
||||
font-style: italic;
|
||||
}
|
||||
/* wekan/wekan#2419: a GFM task-list item ("- [ ] Task") renders a disabled
|
||||
native checkbox, which forms.css would otherwise hide like every bare
|
||||
checkbox in the app. */
|
||||
.viewer input[type="checkbox"]:not(:checked),
|
||||
.viewer input[type="checkbox"]:checked {
|
||||
/* #6820: no text-field padding, or a ticked box is drawn as a dot. */
|
||||
min-height: 0;
|
||||
padding: 0;
|
||||
display: inline-block;
|
||||
visibility: visible;
|
||||
position: static;
|
||||
inset-inline-start: auto;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
margin: 0;
|
||||
margin-inline-end: 6px;
|
||||
vertical-align: middle;
|
||||
appearance: auto;
|
||||
}
|
||||
.viewer pre,
|
||||
.viewer code {
|
||||
padding: 10px 12px 7px;
|
||||
|
||||
@@ -187,20 +187,3 @@
|
||||
.workload-person-utilization.is-below {
|
||||
color: #b71c1c;
|
||||
}
|
||||
|
||||
/* Labelled native checkboxes: the app-wide material form rule
|
||||
(client/components/forms/forms.css) hides native checkboxes three ways -
|
||||
display, visibility, an offset - which left these with a label and no box
|
||||
to tick or see ticked. All three are undone, as in cardFlow.css. */
|
||||
.workload-page input[type="checkbox"] {
|
||||
display: inline-block;
|
||||
visibility: visible;
|
||||
position: static;
|
||||
inset-inline-start: auto;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
min-height: 0;
|
||||
margin: 0;
|
||||
margin-inline-end: 4px;
|
||||
flex: none;
|
||||
}
|
||||
@@ -23,33 +23,10 @@
|
||||
max-height: 65vh;
|
||||
padding-inline-end: 10px;
|
||||
}
|
||||
.rules-lists-item .js-rule-select {
|
||||
.rules-lists-item input.js-rule-select[type="checkbox"] {
|
||||
float: inline-start;
|
||||
margin: 6px 8px 0 0;
|
||||
}
|
||||
/* #6749: the rule selection checkboxes are NATIVE inputs, and forms.css hides
|
||||
every native checkbox app-wide (WeKan draws its own .materialCheckBox) with
|
||||
display: none, visibility: hidden AND a -9999px offset. So the boxes were
|
||||
never on screen: "Select all" / "Unselect all" changed their state, but there
|
||||
was nothing to see change, and no rule could be ticked one at a time for
|
||||
"Delete selected" / "Export selected" either. Undo all three parts of that
|
||||
rule here, plus the 41px form-field height forms.css gives every input. The
|
||||
selector carries the attribute so it outranks `[type="checkbox"]:checked`. */
|
||||
.rules-lists-item input.js-rule-select[type="checkbox"] {
|
||||
display: inline-block;
|
||||
visibility: visible;
|
||||
position: static;
|
||||
inset-inline-start: auto;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
min-height: 0;
|
||||
flex: 0 0 16px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
appearance: auto;
|
||||
-webkit-appearance: checkbox;
|
||||
cursor: pointer;
|
||||
}
|
||||
.rules-lists-item .js-edit-rule-input {
|
||||
width: 60%;
|
||||
}
|
||||
@@ -500,21 +477,6 @@
|
||||
/* Icons on themed action buttons must share their readable foreground. */
|
||||
.rules-page button.primary i.fa { color: inherit; }
|
||||
|
||||
/* Native, keyboard-accessible attachment choice in the mail action form. */
|
||||
.trigger-content-mail #email-attachments,
|
||||
.trigger-content-mail #email-discussion,
|
||||
.trigger-content-mail #email-card-details {
|
||||
display: inline-block;
|
||||
visibility: visible;
|
||||
position: static;
|
||||
inset-inline-start: auto;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
min-height: 0;
|
||||
padding: 0;
|
||||
margin-inline-end: 6px;
|
||||
appearance: auto;
|
||||
}
|
||||
/* #3195: insert a variable into the text field last focused. */
|
||||
.rule-variable-picker {
|
||||
display: flex;
|
||||
|
||||
@@ -24,6 +24,7 @@ template(name="adminProblems")
|
||||
+spinner
|
||||
else if isPane 'report-summary'
|
||||
+problemsSummary
|
||||
+ldapTestConnection(diagnosticsOnly=true)
|
||||
else if isPane 'features-performance'
|
||||
+featuresPerformance
|
||||
else if isPane 'features-backup'
|
||||
@@ -67,6 +68,26 @@ template(name="officeReport")
|
||||
+tablePage(tablePageData)
|
||||
|
||||
template(name="eventStreamReport")
|
||||
if isSecurityReport
|
||||
section.admin-problem-item
|
||||
h2 {{_ 'history'}}
|
||||
each historyIntegrityCsvLinks
|
||||
a.button(href="{{url}}" download)
|
||||
i.fa.fa-download
|
||||
| {{_ labelKey}}
|
||||
with historyIntegrityScan
|
||||
p {{_ 'last-run'}}: {{at}}
|
||||
dl
|
||||
dt Checked history rows
|
||||
dd {{checked}}
|
||||
dt Checksum mismatches
|
||||
dd {{checksumMismatches}}
|
||||
dt Concurrent history forks (undo unavailable for affected changes)
|
||||
dd {{concurrentForks}}
|
||||
dt Other integrity findings
|
||||
dd {{otherFailures}}
|
||||
else
|
||||
p {{_ 'last-run'}}: {{_ 'data-health-never-run'}}
|
||||
//- Security / Speed / Tests / CPU usage all render through the shared table
|
||||
//- page (docs/Features/Table.md). CPU usage additionally passes the live
|
||||
//- figure as the status row between the title and the controls.
|
||||
@@ -145,10 +166,21 @@ template(name="featuresPerformance")
|
||||
li.layout-form
|
||||
.title {{_ 'cards-loading'}}
|
||||
p.description {{_ 'cards-loading-description'}}
|
||||
unless exportDisabled
|
||||
li.layout-form
|
||||
h3 {{_ 'export-csv'}}
|
||||
each performanceCsvLinks
|
||||
p
|
||||
a.js-table-page-csv.button(href="{{url}}" data-dataset="{{name}}" download)
|
||||
i.fa.fa-download
|
||||
| {{_ labelKey}}
|
||||
|
||||
//- Admin Panel / Settings / Security (moved from Problems on 2026-11-19).
|
||||
template(name="featuresSecurity")
|
||||
ul.setting-detail
|
||||
if currentUser.isAdmin
|
||||
li
|
||||
+personalApiTokensAdmin
|
||||
li
|
||||
+adminPanelAllowedAddresses
|
||||
li
|
||||
@@ -240,6 +272,8 @@ template(name="fileStatusAudit")
|
||||
button.js-file-audit-cancel(type="button") Cancel check
|
||||
if result
|
||||
button.js-file-audit-download(type="button") Download status summary
|
||||
each csvLinks
|
||||
a.js-file-audit-csv(href=url) {{_ labelKey}}
|
||||
if error
|
||||
p(role="alert") {{error}}
|
||||
if result
|
||||
@@ -294,6 +328,8 @@ template(name="syncRecoveryReportRow")
|
||||
p {{_ 'sync-preview-create'}}: {{created}}
|
||||
p {{_ 'sync-preview-update'}}: {{updated}}
|
||||
p {{_ 'sync-preview-archive'}}: {{archived}}
|
||||
if hasTimeEntryCount
|
||||
p.sync-time-entries-updated {{_ 'sync-preview-update'}} — {{_ 'time-entries'}} ({{timeEntriesUpdated}})
|
||||
each sourceRows
|
||||
p {{path}}: {{count}} — {{_ reasonLabel}}
|
||||
each normalizedRows
|
||||
@@ -423,6 +459,8 @@ template(name="syncRuleEmailLegacyCommands")
|
||||
section.sync-rule-email-legacy-commands
|
||||
h2 {{_ 'rule-email-legacy-heading'}}
|
||||
p.quiet {{_ 'rule-email-legacy-description'}}
|
||||
each csvLinks
|
||||
a.js-rule-email-legacy-csv(href=url download) {{_ labelKey}}
|
||||
if error
|
||||
p.error(role="alert") {{error}}
|
||||
if rows.length
|
||||
@@ -460,6 +498,8 @@ template(name="listSyncStuckOperations")
|
||||
section.list-sync-stuck-operations
|
||||
h2 {{_ 'stuck-sync-operation-heading'}}
|
||||
p.quiet {{_ 'stuck-sync-operation-description'}}
|
||||
each csvLinks
|
||||
a.js-stuck-list-sync-csv(href=url download) {{_ labelKey}}
|
||||
if error
|
||||
p.error(role="alert") {{error}}
|
||||
if rows.length
|
||||
@@ -497,6 +537,8 @@ template(name="interruptedImports")
|
||||
section.interrupted-imports
|
||||
h2 {{_ 'interrupted-import-heading'}}
|
||||
p.quiet {{_ 'interrupted-import-description'}}
|
||||
each csvLinks
|
||||
a.js-interrupted-import-csv(href=url download) {{_ labelKey}}
|
||||
if error
|
||||
p.error(role="alert") {{error}}
|
||||
if rows.length
|
||||
|
||||
@@ -862,11 +862,17 @@ function reportTablePageData(tmpl) {
|
||||
totalPages: info.totalPages,
|
||||
hasPrev: info.hasPrev,
|
||||
hasNext: info.hasNext,
|
||||
// WP-10: every board, and who has which role on which board.
|
||||
csvLinks: reportId === 'report-boards' ? adminCsvLinks([
|
||||
{ name: 'boards', labelKey: 'export-csv' },
|
||||
{ name: 'board-roles', labelKey: 'export-csv-board-roles' },
|
||||
]) : [],
|
||||
]) : adminCsvLinks(({
|
||||
'report-recovery': ['recovery-events'],
|
||||
'report-broken': ['broken-cards'],
|
||||
'report-cards': ['cards'],
|
||||
'report-files': ['files'],
|
||||
'report-rules': ['rules'],
|
||||
'report-impersonation': ['impersonation'],
|
||||
}[reportId] || []).map(name => ({ name, labelKey: 'export-csv' }))),
|
||||
};
|
||||
}
|
||||
// Broken cards has no template of its own any more: it is a column spec in
|
||||
@@ -969,6 +975,7 @@ Template.instrumentationReport.helpers({
|
||||
const info = pageInfo(all.length, t.page.get(), TABLE_PAGE_ROWS_PER_PAGE);
|
||||
return {
|
||||
header: buildHeader(INSTRUMENTATION_COLUMNS),
|
||||
csvLinks: adminCsvLinks([{ name: 'instrumentation', labelKey: 'export-csv' }]),
|
||||
rows: buildRows(all.slice(info.skip, info.skip + info.limit), INSTRUMENTATION_COLUMNS),
|
||||
rowCount: all.length,
|
||||
total: all.length,
|
||||
@@ -1010,6 +1017,17 @@ Template.instrumentationReport.events({
|
||||
|
||||
Template.eventStreamReport.onCreated(function () {
|
||||
this.stream = this.data.stream;
|
||||
this.historyIntegrity = new ReactiveVar(null);
|
||||
if (this.stream === 'security') {
|
||||
const loadHistoryIntegrity = () => {
|
||||
if (!Meteor.userId()) return;
|
||||
Meteor.call('historyIntegrityStatus', (error, status) => {
|
||||
if (!error) this.historyIntegrity.set(status);
|
||||
});
|
||||
};
|
||||
this.autorun(loadHistoryIntegrity);
|
||||
this.historyIntegrityTimer = Meteor.setInterval(loadHistoryIntegrity, 30000);
|
||||
}
|
||||
this.page = new ReactiveVar(1);
|
||||
this.total = new ReactiveVar(0);
|
||||
this.rows = new ReactiveVar([]);
|
||||
@@ -1055,6 +1073,7 @@ Template.eventStreamReport.onCreated(function () {
|
||||
});
|
||||
|
||||
Template.eventStreamReport.onDestroyed(function () {
|
||||
if (this.historyIntegrityTimer) Meteor.clearInterval(this.historyIntegrityTimer);
|
||||
if (this.cpuTimer) Meteor.clearInterval(this.cpuTimer);
|
||||
});
|
||||
|
||||
@@ -1193,6 +1212,20 @@ function diskStatus(current) {
|
||||
}
|
||||
|
||||
Template.eventStreamReport.helpers({
|
||||
isSecurityReport() {
|
||||
return Template.instance().stream === 'security';
|
||||
},
|
||||
historyIntegrityCsvLinks() {
|
||||
return adminCsvLinks([{ name: 'history-integrity', labelKey: 'export-csv' }]);
|
||||
},
|
||||
historyIntegrityScan() {
|
||||
const status = Template.instance().historyIntegrity.get();
|
||||
return status && {
|
||||
...status,
|
||||
at: formatEventAt(status.at),
|
||||
otherFailures: status.failures - status.checksumMismatches - status.concurrentForks,
|
||||
};
|
||||
},
|
||||
tablePageData() {
|
||||
const t = Template.instance();
|
||||
const rows = t.rows.get() || [];
|
||||
@@ -1206,7 +1239,17 @@ Template.eventStreamReport.helpers({
|
||||
// means WITH_API is off.
|
||||
emptyKey: t.stream === 'api' ? 'api-no-calls' : 'no-new-problems',
|
||||
// WP-10: every summarised security problem, for an incident report.
|
||||
csvLinks: t.stream === 'security' ? adminCsvLinks([{ name: 'security', labelKey: 'export-csv' }]) : [],
|
||||
csvLinks: t.stream === 'security' ? adminCsvLinks([
|
||||
{ name: 'security', labelKey: 'export-csv' },
|
||||
{ name: 'security-events', labelKey: 'summary' },
|
||||
])
|
||||
: t.stream === 'api' ? adminCsvLinks([
|
||||
{ name: 'api-usage-details', labelKey: 'export-csv' },
|
||||
{ name: 'api-usage', labelKey: 'summary' },
|
||||
]) : adminCsvLinks([
|
||||
{ name: `${t.stream}-events`, labelKey: 'export-csv' },
|
||||
...(['cpu', 'ram', 'disk'].includes(t.stream) ? [{ name: `${t.stream}-current`, labelKey: 'current' }] : []),
|
||||
]),
|
||||
searchTerm: t.search.get(),
|
||||
header: buildHeader(columnsFor(t.stream)),
|
||||
rows: buildRows(rows, columnsFor(t.stream)),
|
||||
@@ -1357,6 +1400,15 @@ const featurePaneEvents = {
|
||||
toggleSettingField('enablePermanentDelete');
|
||||
},
|
||||
};
|
||||
Template.featuresPerformance.helpers({
|
||||
performanceCsvLinks() {
|
||||
return adminCsvLinks([
|
||||
{ name: 'speed-events', labelKey: 'speedReportTitle' },
|
||||
{ name: 'instrumentation', labelKey: 'instrumentationReportTitle' },
|
||||
]);
|
||||
},
|
||||
});
|
||||
|
||||
for (const tpl of [Template.featuresPerformance, Template.featuresSecurity,
|
||||
Template.featuresDelete, Template.featuresNotifications]) {
|
||||
tpl.helpers(featurePaneHelpers);
|
||||
@@ -1413,6 +1465,7 @@ Template.officeReport.helpers({
|
||||
const rows = t.rows.get() || [];
|
||||
const info = pageInfo(t.total.get(), t.page.get(), OFFICES_PER_PAGE);
|
||||
return {
|
||||
csvLinks: adminCsvLinks([{ name: 'offices', labelKey: 'export-csv' }]),
|
||||
// No title: the pane heading is the open menu entry's own label, once, for
|
||||
// every Admin Panel pane (docs/Features/All-Boards/Left-Menu.md).
|
||||
descKey: 'office-report-desc',
|
||||
@@ -1475,6 +1528,7 @@ Template.fileStatusAudit.onDestroyed(function () {
|
||||
Meteor.clearInterval(this.timer);
|
||||
});
|
||||
Template.fileStatusAudit.helpers({
|
||||
csvLinks() { return adminCsvLinks([{ name: 'file-status-audit', labelKey: 'export-csv' }]); },
|
||||
result() { return Template.instance().result.get(); },
|
||||
running() { return Template.instance().result.get()?.state === 'running'; },
|
||||
error() { return Template.instance().error.get(); },
|
||||
@@ -1556,8 +1610,10 @@ Template.syncRecoveryReports.helpers({
|
||||
return {
|
||||
header: buildHeader([{ labelKey: 'date' }, { labelKey: 'list' }, { labelKey: 'status' }, { labelKey: 'details' }]),
|
||||
rowTemplate: 'syncRecoveryReportRow', emptyKey: 'sync-report-empty',
|
||||
csvLinks: adminCsvLinks([{ name: 'sync-run-reports', labelKey: 'export-csv' }]),
|
||||
docs: result.rows.map(row => ({ ...row, started: formatDate(row.startedAt),
|
||||
hasCounts: row.created !== undefined, statusLabel: `sync-report-${row.status}`,
|
||||
hasCounts: row.created !== undefined, hasTimeEntryCount: Number.isSafeInteger(row.timeEntriesUpdated),
|
||||
statusLabel: `sync-report-${row.status}`,
|
||||
sourceRows: (row.coverage?.source?.rows || []).map(field => ({ ...field, reasonLabel: `sync-source-${field.reason}` })),
|
||||
normalizedRows: (row.coverage?.rows || []).map(field => ({ ...field, reasonLabel: `sync-source-${field.reason}` })),
|
||||
})),
|
||||
@@ -1619,6 +1675,7 @@ Template.emailRecoveryReports.helpers({
|
||||
header: buildHeader([{ labelKey: 'username' }, { labelKey: 'status' }, { labelKey: 'email-recovery-queued' },
|
||||
{ labelKey: 'date' }, { labelKey: 'actions' }]),
|
||||
rowTemplate: 'emailRecoveryReportRow', emptyKey: 'email-recovery-empty',
|
||||
csvLinks: adminCsvLinks([{ name: 'email-recovery', labelKey: 'export-csv' }]),
|
||||
docs: result.rows.map(row => ({ ...row, busy: t.busy.get(),
|
||||
statusLabel: row.paused ? 'email-recovery-paused' : row.failed ? 'email-recovery-attention' : 'email-recovery-pending',
|
||||
failureRows: (row.failures || []).map(failure => ({ ...failure, labelKey: `email-failure-${failure.reason}` })),
|
||||
@@ -1695,6 +1752,7 @@ Template.activityNotificationRecoveryReports.helpers({
|
||||
return { header: buildHeader([{ labelKey: 'activity' }, { labelKey: 'board' }, { labelKey: 'status' },
|
||||
{ labelKey: 'date' }, { labelKey: 'actions' }]),
|
||||
rowTemplate: 'activityNotificationRecoveryRow', emptyKey: 'activity-recovery-empty',
|
||||
csvLinks: adminCsvLinks([{ name: 'activity-notification-recovery', labelKey: 'export-csv' }]),
|
||||
docs: result.rows.map(row => ({ ...row, showPaused: row.paused && row.status !== 'cancelled', statusLabel: `activity-recovery-status-${row.status}`,
|
||||
createdText: row.createdAt ? formatDate(row.createdAt) : '—', retryDisabled: t.busy.get() || !row.canRetry,
|
||||
controlDisabled: t.busy.get() || !row.canControl, controlLabel: row.paused ? 'activity-recovery-resume' : 'activity-recovery-pause' })),
|
||||
@@ -1843,6 +1901,7 @@ Template.syncRuleEmailRecoveryReports.helpers({
|
||||
return { header: buildHeader([{ labelKey: 'rule-email-recovery-identifiers' }, { labelKey: 'status' },
|
||||
{ labelKey: 'rule-email-recovery-started' }, { labelKey: 'rule-email-recovery-finished' }, { labelKey: 'actions' }]),
|
||||
rowTemplate: 'syncRuleEmailRecoveryRow', emptyKey: 'rule-email-recovery-empty',
|
||||
csvLinks: adminCsvLinks([{ name: 'sync-rule-email-attempts', labelKey: 'export-csv' }]),
|
||||
docs: result.rows.map(row => ({ ...row, statusLabel: `rule-email-recovery-${row.status}`,
|
||||
canReview: row.status === 'unconfirmed' && !!row.commandId,
|
||||
startedText: row.startedAt ? formatDate(row.startedAt) : '—', finishedText: row.finishedAt ? formatDate(row.finishedAt) : '—' })),
|
||||
@@ -1916,6 +1975,7 @@ Template.syncRuleEmailLegacyCommands.onCreated(function () {
|
||||
this.load();
|
||||
});
|
||||
Template.syncRuleEmailLegacyCommands.helpers({
|
||||
csvLinks() { return adminCsvLinks([{ name: 'sync-rule-email-legacy', labelKey: 'export-csv' }]); },
|
||||
error() { return Template.instance().error.get(); },
|
||||
busy() { return Template.instance().busy.get(); },
|
||||
rows() {
|
||||
@@ -1977,6 +2037,7 @@ Template.listSyncStuckOperations.onCreated(function () {
|
||||
this.load();
|
||||
});
|
||||
Template.listSyncStuckOperations.helpers({
|
||||
csvLinks() { return adminCsvLinks([{ name: 'stuck-list-sync', labelKey: 'export-csv' }]); },
|
||||
error() { return Template.instance().error.get(); },
|
||||
busy() { return Template.instance().busy.get(); },
|
||||
truncated() { return Template.instance().result.get().truncated; },
|
||||
@@ -2034,6 +2095,7 @@ Template.interruptedImports.onCreated(function () {
|
||||
this.load();
|
||||
});
|
||||
Template.interruptedImports.helpers({
|
||||
csvLinks() { return adminCsvLinks([{ name: 'interrupted-imports', labelKey: 'export-csv' }]); },
|
||||
error() { return Template.instance().error.get(); },
|
||||
busy() { return Template.instance().busy.get(); },
|
||||
truncated() { return Template.instance().result.get().truncated; },
|
||||
|
||||
@@ -73,10 +73,11 @@ template(name="ldapTestConnection")
|
||||
if result.get
|
||||
li.accounts-form
|
||||
span(class="{{resultClass}}")= result.get
|
||||
//- Sync now: runs the LDAP background sync once (ldap_sync_now), with the
|
||||
//- import/update settings in effect.
|
||||
li.accounts-form
|
||||
button.js-ldap-sync-now.primary(disabled=syncing.get) {{_ 'ldap-sync-now'}}
|
||||
if syncResult.get
|
||||
unless diagnosticsOnly
|
||||
//- Sync now: runs the LDAP background sync once (ldap_sync_now), with the
|
||||
//- import/update settings in effect.
|
||||
li.accounts-form
|
||||
span.js-ldap-sync-result(class="{{syncResultClass}}")= syncResult.get
|
||||
button.js-ldap-sync-now.primary(disabled=syncing.get) {{_ 'ldap-sync-now'}}
|
||||
if syncResult.get
|
||||
li.accounts-form
|
||||
span.js-ldap-sync-result(class="{{syncResultClass}}")= syncResult.get
|
||||
@@ -133,18 +133,16 @@ Template.ldapTestConnection.events({
|
||||
// in effect, Admin Panel or environment variable.
|
||||
'click button.js-ldap-test-connection'(event, tpl) {
|
||||
tpl.result.set('...');
|
||||
Meteor.call('ldap_test_connection', (err) => {
|
||||
if (err) {
|
||||
tpl.success.set(false);
|
||||
tpl.result.set(
|
||||
TAPi18n.__('ldap-test-connection-error', {
|
||||
sprintf: [err.reason || err.message || ''],
|
||||
}),
|
||||
);
|
||||
} else {
|
||||
tpl.success.set(true);
|
||||
tpl.result.set(TAPi18n.__('ldap-test-connection-success'));
|
||||
}
|
||||
Meteor.call('ldap_test_connection', (err, result) => {
|
||||
const attempts = err?.details || result?.connectionAttempts;
|
||||
const trace = Array.isArray(attempts) ? attempts.map(({ url, answered }) =>
|
||||
`${url} ${answered ? '✓' : '✗'}`,
|
||||
).join(' · ') : '';
|
||||
tpl.success.set(!err);
|
||||
const message = err
|
||||
? TAPi18n.__('ldap-test-connection-error', { sprintf: [err.reason || err.message || ''] })
|
||||
: TAPi18n.__('ldap-test-connection-success');
|
||||
tpl.result.set([message, trace].filter(Boolean).join(' · '));
|
||||
});
|
||||
},
|
||||
});
|
||||
@@ -74,7 +74,9 @@ template(name="backupRunsStatus")
|
||||
else
|
||||
p.form-text.text-muted {{_ 'list-sync-last-synced-never'}}
|
||||
if settingsLink
|
||||
each backupCsvLinks
|
||||
a.admin-report-action.js-backup-runs-csv(href=url) {{_ labelKey}}
|
||||
p
|
||||
a.js-open-backup-settings(href=backupSettingsPath)
|
||||
a.admin-report-action.js-open-backup-settings(href=backupSettingsPath)
|
||||
i.fa.fa-cog
|
||||
| {{_ 'backup-schedule'}}
|
||||
@@ -4,6 +4,7 @@ import { ReactiveVar } from 'meteor/reactive-var';
|
||||
import { Session } from 'meteor/session';
|
||||
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
|
||||
import { TAPi18n } from '/imports/i18n';
|
||||
import { adminCsvLinks } from '/client/lib/adminCsvLinks';
|
||||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
|
||||
// Admin Panel backup status and history (backupRunsStatus.jade): the recorded runs
|
||||
@@ -48,6 +49,7 @@ Template.backupRunsStatus.onCreated(function () {
|
||||
});
|
||||
|
||||
Template.backupRunsStatus.helpers({
|
||||
backupCsvLinks() { return adminCsvLinks([{ name: 'backup-runs', labelKey: 'export-csv' }]); },
|
||||
backupHealth() {
|
||||
const h = Template.instance().history.get();
|
||||
return h && h.health;
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
template(name="complianceReport")
|
||||
.compliance-report
|
||||
p.quiet {{_ 'compliance-info'}}
|
||||
each csvLinks
|
||||
a.js-compliance-csv(href=url download) {{_ labelKey}}
|
||||
if loading
|
||||
+spinner
|
||||
else
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Meteor } from 'meteor/meteor';
|
||||
import { ReactiveVar } from 'meteor/reactive-var';
|
||||
import { Template } from 'meteor/templating';
|
||||
import { adminPath } from '/models/lib/adminUrls';
|
||||
import { adminCsvLinks } from '/client/lib/adminCsvLinks';
|
||||
|
||||
const { STATUS_KEYS } = require('/models/lib/complianceChecks');
|
||||
|
||||
@@ -15,6 +16,7 @@ Template.complianceReport.onCreated(function () {
|
||||
});
|
||||
|
||||
Template.complianceReport.helpers({
|
||||
csvLinks() { return adminCsvLinks([{ name: 'compliance', labelKey: 'export-csv' }]); },
|
||||
loading() { return Template.instance().rows.get() === null; },
|
||||
rows() {
|
||||
return (Template.instance().rows.get() || []).map(row => ({
|
||||
|
||||
@@ -2,6 +2,7 @@ import { ReactiveVar } from 'meteor/reactive-var';
|
||||
import { Template } from 'meteor/templating';
|
||||
import { formatDateForDisplay } from '/client/lib/dateDisplay';
|
||||
import { buildFilters, buildHeader, buildRows, pageInfo } from '/models/lib/tablePage';
|
||||
import { adminCsvLinks } from '/client/lib/adminCsvLinks';
|
||||
import { errorMessage } from '/client/lib/errorMessage';
|
||||
|
||||
// Admin Panel / Problems / Password length: the two settings and the table of
|
||||
@@ -98,6 +99,7 @@ Template.passwordLengthReport.helpers({
|
||||
id: 'password-length-status', labelKey: 'status', current: t.filter.get(), options: FILTER_OPTIONS,
|
||||
}]),
|
||||
header: buildHeader(COLUMNS),
|
||||
csvLinks: adminCsvLinks([{ name: 'password-length', labelKey: 'export-csv' }]),
|
||||
rows: buildRows(rows, COLUMNS),
|
||||
rowCount: rows.length,
|
||||
totalCount: t.total.get(),
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
template(name="problemsSummary")
|
||||
.global-search-results-list-wrapper
|
||||
h1 {{_ 'summary'}}
|
||||
each summaryCsvLinks
|
||||
a.button(href="{{url}}" download)
|
||||
i.fa.fa-download
|
||||
| {{_ labelKey}}
|
||||
|
||||
//- Status overview: migrations / repairs in progress + detected problems.
|
||||
//- Same data as `snap run wekan.problems`.
|
||||
@@ -25,6 +29,53 @@ template(name="problemsSummary")
|
||||
span.admin-problem-count {{problem.count}}
|
||||
br
|
||||
span.quiet {{problem.detail}}
|
||||
if detailedHealthCheck problem.checkId
|
||||
.admin-problem-actions
|
||||
button.js-health-details(type="button" data-check=problem.checkId aria-expanded="{{#if healthDetailsFor problem.checkId}}true{{else}}false{{/if}}") {{_ 'details'}}
|
||||
each dataHealthDetailCsvLinks problem.checkId
|
||||
a.js-data-health-detail-csv(href=url) {{_ labelKey}}
|
||||
with healthDetailsFor problem.checkId
|
||||
if loading
|
||||
+spinner
|
||||
else if error
|
||||
p.error(role="alert") {{error}}
|
||||
else
|
||||
unless rows.length
|
||||
p {{_ 'no-results'}}
|
||||
ul
|
||||
each row in rows
|
||||
li
|
||||
if healthBoardUrl row
|
||||
a(href="{{healthBoardUrl row}}") {{#if row.title}}{{row.title}}{{else}}{{row.boardId}}{{/if}}
|
||||
if row.number
|
||||
span · {{_ 'card-number'}} {{row.number}}
|
||||
ul
|
||||
each card in row.cards
|
||||
li
|
||||
if healthCardUrl row card._id
|
||||
a(href="{{healthCardUrl row card._id}}") {{#if card.title}}{{card.title}}{{else}}{{card._id}}{{/if}}
|
||||
else
|
||||
span {{card._id}}
|
||||
if row.members.length
|
||||
form.js-health-members(data-board=row.boardId)
|
||||
label
|
||||
| {{_ 'members'}}
|
||||
select(name="member" required)
|
||||
option(value="") {{_ 'members'}}
|
||||
each row.members
|
||||
option(value=id) {{label}}
|
||||
button(type="submit") {{_ 'board-admin'}}
|
||||
span.js-health-member-error.error(role="alert")
|
||||
if offset
|
||||
button.js-health-page(type="button" data-step="-10") {{_ 'previous'}}
|
||||
if hasNext
|
||||
button.js-health-page(type="button" data-step="10") {{_ 'next'}}
|
||||
else if problem.examples.length
|
||||
details
|
||||
summary {{_ 'details'}}
|
||||
ul
|
||||
each problem.examples
|
||||
li {{this}}
|
||||
//- Broken cards are one of the two detected problems the admin can
|
||||
//- fix from here: run the repair migration over every board.
|
||||
if isBrokenCards problem
|
||||
@@ -80,6 +131,14 @@ template(name="problemsSummary")
|
||||
//- Problems/Data-Health.md; each finding explains itself above.
|
||||
h2 {{_ 'data-health'}}
|
||||
p.quiet {{_ 'last-run'}}: {{dataHealthStatus}}
|
||||
each dataHealthCsvLinks
|
||||
a.admin-report-action.js-data-health-csv(href=url) {{_ labelKey}}
|
||||
details.js-data-health-finding-csv
|
||||
summary {{_ 'details'}} (CSV)
|
||||
ul
|
||||
each dataHealthFindingCsvLinks
|
||||
li
|
||||
a(href=url data-dataset=name download) {{_ labelKey}}
|
||||
.admin-problem-actions
|
||||
button.js-data-health-scan.primary(disabled="{{#if dataHealthScanning}}disabled{{/if}}")
|
||||
if dataHealthScanning
|
||||
@@ -93,6 +152,8 @@ template(name="problemsSummary")
|
||||
//- still sees one generic message (models/lib/loginRefusals.js).
|
||||
if loginRefusals.length
|
||||
h2 {{_ 'login-refusals'}}
|
||||
each loginRefusalCsvLinks
|
||||
a.js-login-refusals-csv(href=url) {{_ labelKey}}
|
||||
table.admin-login-refusals
|
||||
tbody
|
||||
each loginRefusals
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
|
||||
import { adminCsvLinks } from '/client/lib/adminCsvLinks';
|
||||
import { TAPi18n } from '/imports/i18n';
|
||||
|
||||
// Admin Panel → Problems → Summary page: a checkbox list of problem areas
|
||||
@@ -42,6 +44,15 @@ Template.problemsSummary.onCreated(function () {
|
||||
this.status = new ReactiveVar(null);
|
||||
// Data health: which check is being repaired, which waits for its
|
||||
// confirming second click, and what each repair said.
|
||||
this.healthDetails = new ReactiveVar(null);
|
||||
this.loadHealthDetails = (checkId, offset) => {
|
||||
const request = { checkId, offset, loading: true };
|
||||
this.healthDetails.set(request);
|
||||
Meteor.call('dataHealthDetails', checkId, offset, (error, page) => {
|
||||
if (this.healthDetails.get() !== request) return;
|
||||
this.healthDetails.set({ checkId, offset, ...page, error: error?.reason || error?.message });
|
||||
});
|
||||
};
|
||||
this.dataHealthRepairing = new ReactiveVar(null);
|
||||
this.dataHealthConfirming = new ReactiveVar(null);
|
||||
this.dataHealthResults = new ReactiveVar({});
|
||||
@@ -66,9 +77,27 @@ Template.problemsSummary.onDestroyed(function () {
|
||||
});
|
||||
|
||||
Template.problemsSummary.helpers({
|
||||
summaryCsvLinks() {
|
||||
return adminCsvLinks([{ name: 'problems-summary', labelKey: 'export-csv' }]);
|
||||
},
|
||||
detailedHealthCheck(checkId) {
|
||||
return checkId === 'board-no-admin' || checkId === 'card-duplicate-number';
|
||||
},
|
||||
healthDetailsFor(checkId) {
|
||||
const state = Template.instance().healthDetails.get();
|
||||
return state?.checkId === checkId ? state : null;
|
||||
},
|
||||
healthBoardUrl(row) {
|
||||
return row.boardId ? FlowRouter.path('board', { id: row.boardId, slug: row.slug || 'board' }) : '';
|
||||
},
|
||||
healthCardUrl(row, cardId) {
|
||||
return row.boardId ? FlowRouter.path('card', { boardId: row.boardId, slug: row.slug || 'board', cardId }) : '';
|
||||
},
|
||||
|
||||
areas() {
|
||||
return Template.instance().areas.get();
|
||||
},
|
||||
loginRefusalCsvLinks() { return adminCsvLinks([{ name: 'login-refusals', labelKey: 'export-csv' }]); },
|
||||
loginRefusals() {
|
||||
return Template.instance().loginRefusals.get();
|
||||
},
|
||||
@@ -118,6 +147,21 @@ Template.problemsSummary.helpers({
|
||||
const s = tpl.status.get();
|
||||
return tpl.dataHealthScanRequested.get() || !!(s && s.dataHealth && s.dataHealth.running);
|
||||
},
|
||||
dataHealthDetailCsvLinks(checkId) {
|
||||
return adminCsvLinks([{ name: `data-health-${checkId}`, labelKey: 'export-csv' }]);
|
||||
},
|
||||
dataHealthCsvLinks() { return adminCsvLinks([{ name: 'data-health', labelKey: 'export-csv' }]); },
|
||||
dataHealthFindingCsvLinks() {
|
||||
return adminCsvLinks([
|
||||
{ name: 'data-health-orphan-records', labelKey: 'details' },
|
||||
{ name: 'data-health-broken-references', labelKey: 'links-heading' },
|
||||
{ name: 'data-health-card-placement', labelKey: 'broken-cards' },
|
||||
{ name: 'data-health-board-membership', labelKey: 'members' },
|
||||
{ name: 'data-health-custom-fields', labelKey: 'custom-fields' },
|
||||
{ name: 'data-health-board-structure', labelKey: 'lists' },
|
||||
{ name: 'data-health-duplicate-email', labelKey: 'people' },
|
||||
]);
|
||||
},
|
||||
dataHealthStatus() {
|
||||
const s = Template.instance().status.get();
|
||||
const d = s && s.dataHealth;
|
||||
@@ -146,6 +190,34 @@ Template.problemsSummary.helpers({
|
||||
});
|
||||
|
||||
Template.problemsSummary.events({
|
||||
'click .js-health-details'(event, template) {
|
||||
const checkId = event.currentTarget.dataset.check;
|
||||
if (template.healthDetails.get()?.checkId === checkId) template.healthDetails.set(null);
|
||||
else template.loadHealthDetails(checkId, 0);
|
||||
},
|
||||
'click .js-health-page'(event, template) {
|
||||
const state = template.healthDetails.get();
|
||||
template.loadHealthDetails(state.checkId, state.offset + Number(event.currentTarget.dataset.step));
|
||||
},
|
||||
'submit .js-health-members'(event, template) {
|
||||
event.preventDefault();
|
||||
const form = event.currentTarget;
|
||||
const memberId = form.elements.member.value;
|
||||
const submit = form.querySelector('button[type=submit]');
|
||||
if (!memberId || submit.disabled) return;
|
||||
submit.disabled = true;
|
||||
Meteor.call('dataHealthPromoteBoardMember', form.dataset.board, memberId, error => {
|
||||
if (error) {
|
||||
submit.disabled = false;
|
||||
form.querySelector('.js-health-member-error').textContent = error.reason || error.message;
|
||||
return;
|
||||
}
|
||||
const state = template.healthDetails.get();
|
||||
if (state?.checkId === 'board-no-admin') template.loadHealthDetails(state.checkId, state.offset);
|
||||
template.reload();
|
||||
});
|
||||
},
|
||||
|
||||
// Run the broken-card repair migration over every board. The button stays
|
||||
// disabled while it runs; when it finishes the overview is reloaded so the
|
||||
// "Broken cards N" count reflects the repair straight away.
|
||||
|
||||
@@ -399,138 +399,6 @@ body.left-menu-resizing-active {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
/* ── Checkboxes ──────────────────────────────────────────────────────────────
|
||||
ONE checkbox for the whole Admin Panel: the same one the rest of WeKan draws
|
||||
(`.materialCheckBox`, forms.css), which is what Admin Panel / Settings /
|
||||
Announcement shows for "Active System-Wide Announcement".
|
||||
|
||||
Two problems this fixes at once.
|
||||
|
||||
1. Some panes - the storage Read toggles, the Organizations and Teams feature
|
||||
columns, the Backup checkboxes, Attachments / Limits / Avatars, the Problems
|
||||
summary - use a NATIVE <input type="checkbox">. forms.css hides every native
|
||||
checkbox app-wide (WeKan draws its own), so those either did not show at all,
|
||||
or were re-enabled pane by pane and then drawn by the BROWSER: on Ubuntu a big
|
||||
orange box, which has nothing to do with the chosen theme (it was orange even
|
||||
under clearblue) and matched nothing else on the page.
|
||||
2. Each pane that re-enabled them picked its own size, so no two agreed.
|
||||
|
||||
The declarations below are `.materialCheckBox` and `.materialCheckBox.is-checked`
|
||||
applied to the input itself - the SAME grey square when unchecked, the SAME morph
|
||||
into a green tick when checked, and the same `transition: 0.2s` that animates
|
||||
between them. Not a tick drawn over the box with a pseudo-element: that gets the
|
||||
checked state right and loses both the unchecked square and the animation.
|
||||
|
||||
`appearance: none` is the one addition, to take the browser's own rendering out
|
||||
of it. If these panes ever move to the `.materialCheckBox` markup, this whole
|
||||
block can go. */
|
||||
.setting-content input[type="checkbox"] {
|
||||
/* Beat the app-wide "hide the native checkbox" rule for the Admin Panel only.
|
||||
* That rule hides in three ways at once - display, visibility, AND a
|
||||
* `inset-inline-start: -9999px` offset - so all three have to be undone. Undoing
|
||||
* two of them leaves the box on screen but 9999px to the side: invisible when
|
||||
* unchecked, and visible when checked ONLY because the checked state below sets
|
||||
* its own -3px offset. That is exactly what "only the tick shows" was. */
|
||||
visibility: visible;
|
||||
display: inline-block;
|
||||
inset-inline-start: auto;
|
||||
top: auto;
|
||||
appearance: none;
|
||||
-webkit-appearance: none;
|
||||
box-sizing: content-box;
|
||||
/* forms.css styles every input that is not a file input as a FORM FIELD:
|
||||
* `min-height: 41px`, a grey background, a 6px radius, 9px padding and a 14px
|
||||
* bottom margin. Everything but the min-height is overridden by the material
|
||||
* declarations below - but a 41px floor turns a 13px box into a tall rectangle,
|
||||
* and stretches the tick it becomes. `input[type="radio"]` resets it the same way
|
||||
* a few lines further down that file, for the same reason. */
|
||||
min-height: 0;
|
||||
min-width: 0;
|
||||
/* …then exactly .materialCheckBox. */
|
||||
position: relative;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
z-index: 0;
|
||||
border: 2px solid #5a5a5a;
|
||||
border-radius: 1px;
|
||||
transition: 0.2s;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
/* Written as forms.css writes it: `flex-shrink: 0` and `flex: none` mean the
|
||||
same thing here, and tests/adminCheckboxStyle.test.cjs compares the two
|
||||
rules declaration by declaration - so saying it differently would read as a
|
||||
difference between the Admin Panel's checkbox and everybody else's. */
|
||||
flex: none;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* …and exactly .materialCheckBox.is-checked: the square becomes the tick, which is
|
||||
what the transition above animates. */
|
||||
/* #6465: THE FOCUS RING MUST NOT BE DRAWN ON THE ROTATED BOX.
|
||||
The checked state below turns the square into a tick by making two borders
|
||||
transparent and rotating the element 40deg. A browser draws its focus ring
|
||||
around the element as it is - rotated - so a checkbox that is both checked and
|
||||
focused (which is exactly what a checkbox you just clicked is) comes out as a
|
||||
blue DIAMOND sitting where the tick should be. That is the glitch reported on
|
||||
the Problems page.
|
||||
|
||||
The ring is not simply removed: keyboard users need to see where they are. It
|
||||
moves to the row that CONTAINS the checkbox, which is not rotated - every one
|
||||
of these lives inside a label (problemsSummary.jade: `label.admin-problem-item
|
||||
> input.js-problem-check`) - so the indicator is a normal rectangle around the
|
||||
whole row, which is easier to see than a 13px box anyway.
|
||||
|
||||
`:focus-visible` rather than `:focus`, so clicking with a mouse does not leave
|
||||
a ring behind; `:focus-within` is the fallback where :has() is not supported,
|
||||
and lands on the same element. */
|
||||
.setting-content input[type="checkbox"]:focus,
|
||||
.setting-content input[type="checkbox"]:focus-visible {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.setting-content label:has(> input[type="checkbox"]:focus-visible) {
|
||||
outline: 2px solid #2573a7;
|
||||
outline-offset: 2px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.setting-content input[type="checkbox"]:checked {
|
||||
top: -4px;
|
||||
left: -3px;
|
||||
width: 7px;
|
||||
height: 15px;
|
||||
margin-right: 6px;
|
||||
border-top: 2px solid transparent;
|
||||
border-left: 2px solid transparent;
|
||||
border-bottom: 2px solid #3cb500;
|
||||
border-right: 2px solid #3cb500;
|
||||
border-radius: 0;
|
||||
transform: rotate(40deg);
|
||||
-webkit-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
transform-origin: 100% 100%;
|
||||
}
|
||||
|
||||
.setting-content input[type="checkbox"]:focus-visible {
|
||||
outline: 2px solid var(--theme-accent, #2573a7);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.setting-content input[type="checkbox"]:disabled {
|
||||
cursor: default;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
/* A checkbox written as `label > input + text` (Attachments / Limits / Avatars,
|
||||
the Backup checkboxes) needs the gap the `.materialCheckBox` markup gets from its
|
||||
own layout, or the box and its words touch. The checked state adds its own
|
||||
margin - the same one the material checkbox adds - so this is the unchecked one. */
|
||||
.setting-content label > input[type="checkbox"] {
|
||||
margin-inline-end: 6px;
|
||||
}
|
||||
|
||||
/* Admin Panel / Attachments / Backup, the schedule's day: buttons, not a field.
|
||||
The weekly one is seven days in the reader's own language - the text field it
|
||||
replaces only ever accepted an English day name typed exactly right. The monthly
|
||||
@@ -1048,3 +916,12 @@ a.js-team-feature-all {
|
||||
min-height: 24px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* Keep the report links large enough for WCAG 2.5.8 target size. */
|
||||
.admin-report-action {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.25em;
|
||||
min-inline-size: 24px;
|
||||
min-block-size: 24px;
|
||||
}
|
||||
@@ -465,6 +465,10 @@ template(name='tableVisibilityModeSettings')
|
||||
.form-group
|
||||
label {{_ 'feature-profile-name'}}
|
||||
input.wekan-form-control.js-feature-profile-name(type="text" value=profile.name maxlength="100" aria-label="{{_ 'feature-profile-name'}}")
|
||||
.form-group
|
||||
label
|
||||
| {{_ 'set-default-board-template'}} — {{_ 'board-id'}} ({{_ 'optional'}})
|
||||
input.wekan-form-control.js-feature-profile-board-template(type="text" value=profile.boardTemplateId maxlength="64")
|
||||
.title {{_ 'feature-profile-hides'}}
|
||||
each row in profile.rows
|
||||
a.flex.js-toggle-feature.js-feature-profile-hide(data-feature=row.key)
|
||||
@@ -489,6 +493,18 @@ template(name='tableVisibilityModeSettings')
|
||||
//- The one exception is "Change color" below, which an Organization's own
|
||||
//- admin sets for their Organization (models/lib/tenantAdmin.js themeTarget).
|
||||
if isSiteAdmin
|
||||
li
|
||||
h2.admin-pane-group-title {{_ 'avatars'}} — {{_ 'fullname'}}
|
||||
li.tableVisibilityMode-form
|
||||
label
|
||||
input.js-admin-avatar-full-names(type="checkbox" data-side="minicard" checked=currentSetting.showMinicardAvatarFullNames)
|
||||
| {{_ 'show-on-minicard'}}
|
||||
li.tableVisibilityMode-form
|
||||
label
|
||||
input.js-admin-avatar-full-names(type="checkbox" data-side="card" checked=currentSetting.showCardAvatarFullNames)
|
||||
| {{_ 'show-on-card'}}
|
||||
li.admin-pane-group-separator
|
||||
hr
|
||||
li
|
||||
h2.admin-pane-group-title {{_ 'all-boards-hide'}}
|
||||
//- One checkbox per setting instead of a Yes/No pair: each of these is on or
|
||||
@@ -571,6 +587,22 @@ template(name='tableVisibilityModeSettings')
|
||||
button.js-visibility-date-save.primary {{_ 'save'}}
|
||||
li.admin-pane-group-separator
|
||||
hr
|
||||
li.tableVisibilityMode-form
|
||||
h2.admin-pane-group-title {{_ 'comment'}} — {{_ 'help'}}
|
||||
form.js-comment-editor-hint-form
|
||||
.form-group
|
||||
label(for="comment-editor-hint-language") {{_ 'language'}}
|
||||
select.wekan-form-control#comment-editor-hint-language
|
||||
option(value="default") {{_ 'default'}}
|
||||
each commentHintLanguages
|
||||
option(value=tag)= name
|
||||
.form-group
|
||||
label(for="comment-editor-hint") {{_ 'comment'}} — {{_ 'help'}} ({{_ 'optional'}})
|
||||
input.wekan-form-control#comment-editor-hint(type="text" maxlength="300" value=commentHintValue dir="auto")
|
||||
button.primary(type="submit") {{_ 'save'}}
|
||||
span.js-comment-editor-hint-status(role="status")
|
||||
li.admin-pane-group-separator
|
||||
hr
|
||||
//- #6939: the width every card details window opens at, in percent of the
|
||||
browser window, until a user drags their own (models/lib/cardDetailsWidth.js).
|
||||
li
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import languages from '/imports/i18n/languages';
|
||||
import { cardAvatarNameField } from '/models/lib/cardAvatarNames';
|
||||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
import { Session } from 'meteor/session';
|
||||
import { leftMenuData, paneTitle } from '/models/lib/leftMenu';
|
||||
@@ -588,6 +590,7 @@ Template.setting.events({
|
||||
// #6736: the pilot users' usernames are not published (the flag is on each
|
||||
// user, visible only to that user), so the site admin's page asks for them.
|
||||
Template.tableVisibilityModeSettings.onCreated(function () {
|
||||
this.commentHintLanguage = new ReactiveVar('default');
|
||||
this.featurePilotUsernames = new ReactiveVar('');
|
||||
// #6837: the feature profiles, with the names of what they apply to. The
|
||||
// page edits these rows; Save sends them all (saveFeatureProfiles).
|
||||
@@ -610,6 +613,7 @@ function readFeatureProfiles(instance) {
|
||||
return {
|
||||
_id: row.dataset.profileId || undefined,
|
||||
name: $row.find('.js-feature-profile-name').val() || '',
|
||||
boardTemplateId: $row.find('.js-feature-profile-board-template').val() || '',
|
||||
hidden: $row.find('.js-feature-profile-hide').toArray()
|
||||
.filter(a => $(a).find('.materialCheckBox').hasClass('is-checked')).map(a => a.dataset.feature),
|
||||
usernames: $row.find('.js-feature-profile-users').val() || '',
|
||||
@@ -620,6 +624,12 @@ function readFeatureProfiles(instance) {
|
||||
}
|
||||
|
||||
Template.tableVisibilityModeSettings.helpers({
|
||||
commentHintValue() {
|
||||
return ReactiveCache.getCurrentSetting()?.commentEditorHints?.[Template.instance().commentHintLanguage.get()] || '';
|
||||
},
|
||||
commentHintLanguages() {
|
||||
return Object.values(languages).map(({ tag, name }) => ({ tag, name }));
|
||||
},
|
||||
// Which of the three panes this is: 'appearance' (the default), 'features'
|
||||
// or 'profiles' (Template.setting renders it once per pane).
|
||||
isPart(part) {
|
||||
@@ -706,6 +716,12 @@ function saveVisibilitySettings($set) {
|
||||
}
|
||||
|
||||
Template.tableVisibilityModeSettings.events({
|
||||
async 'change .js-admin-avatar-full-names'(event) {
|
||||
const settings = ReactiveCache.getCurrentSetting();
|
||||
const field = cardAvatarNameField(event.currentTarget.dataset.side);
|
||||
if (!settings?._id) return;
|
||||
await Settings.updateAsync(settings._id, { $set: { [field]: event.currentTarget.checked } });
|
||||
},
|
||||
async 'change input.js-site-logo-upload'(event, tpl) {
|
||||
const input = event.currentTarget;
|
||||
const file = input.files?.[0];
|
||||
@@ -825,7 +841,8 @@ Template.tableVisibilityModeSettings.events({
|
||||
const unknown = [...result.unknown.usernames, ...result.unknown.teams, ...result.unknown.orgs];
|
||||
status.text(unknown.length ? `${TAPi18n.__('feature-profile-unknown')} ${unknown.join(', ')}` : TAPi18n.__('feature-saved'));
|
||||
} catch (error) {
|
||||
status.text(error.reason || error.error || error.message);
|
||||
status.text(['board-not-found', 'invalid-board-template'].includes(error.error)
|
||||
? TAPi18n.__('board-not-found') : error.reason || error.error || error.message);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -858,6 +875,22 @@ Template.tableVisibilityModeSettings.events({
|
||||
}
|
||||
},
|
||||
|
||||
'change #comment-editor-hint-language'(event, instance) {
|
||||
instance.commentHintLanguage.set(event.currentTarget.value);
|
||||
instance.$('.js-comment-editor-hint-status').text('');
|
||||
},
|
||||
async 'submit .js-comment-editor-hint-form'(event, instance) {
|
||||
event.preventDefault();
|
||||
const status = instance.$('.js-comment-editor-hint-status');
|
||||
try {
|
||||
await Meteor.callAsync('setCommentEditorHint',
|
||||
instance.$('#comment-editor-hint-language').val(), instance.$('#comment-editor-hint').val());
|
||||
status.text(TAPi18n.__('feature-saved'));
|
||||
} catch (error) {
|
||||
status.text(error.reason || error.message);
|
||||
}
|
||||
},
|
||||
|
||||
// #6939: empty = 520px; otherwise a whole percentage, 30 to 95.
|
||||
'click button.js-visibility-card-width-save'(event, instance) {
|
||||
const { clampDefaultPercent } = require('/models/lib/cardDetailsWidth');
|
||||
|
||||
@@ -30,43 +30,44 @@ template(name="tablePage")
|
||||
if statusTemplate
|
||||
.table-page-status
|
||||
+Template.dynamic(template=statusTemplate data=statusData)
|
||||
.table-page-controls
|
||||
input.js-table-page-search(type="search" placeholder="{{_ 'search'}}" aria-label="{{_ 'search'}}" value="{{searchTerm}}")
|
||||
//- Filters, actions and the total are ON by default: supply them and they
|
||||
//- render. They came from Admin Panel / People, where they were hand-written
|
||||
//- into that page's own markup; they are general enough for any table.
|
||||
each filters
|
||||
//- Named by its labelKey, or by its plain label when a filter gives one
|
||||
//- (adminProblems.js) - a select with neither has no accessible name.
|
||||
select.js-table-page-filter(data-filter="{{id}}" title="{{#if labelKey}}{{_ labelKey}}{{else}}{{label}}{{/if}}" aria-label="{{#if labelKey}}{{_ labelKey}}{{else}}{{label}}{{/if}}")
|
||||
each options
|
||||
option(value="{{value}}" selected="{{selected}}")
|
||||
if labelKey
|
||||
| {{_ labelKey}}
|
||||
else
|
||||
| {{label}}
|
||||
each actions
|
||||
button.js-table-page-action(data-action="{{id}}" class="{{cls}}")
|
||||
if icon
|
||||
i.fa(class="{{icon}}")
|
||||
| {{_ labelKey}}
|
||||
//- WP-10: the whole list as CSV (server/routes/adminCsvExport.js), for
|
||||
//- the pages that pass csvLinks (client/lib/adminCsvLinks.js).
|
||||
each csvLinks
|
||||
a.js-table-page-csv.button(href="{{url}}" data-dataset="{{name}}" download)
|
||||
i.fa.fa-download
|
||||
| {{_ labelKey}}
|
||||
if total
|
||||
span.table-page-total
|
||||
if totalLabelKey
|
||||
| {{_ totalLabelKey}}
|
||||
| {{total}}
|
||||
.table-page-pagination
|
||||
button.js-table-page-prev(class="{{#unless hasPrev}}disabled{{/unless}}" title="{{_ 'previous'}}")
|
||||
| <
|
||||
span.table-page-page-info {{page}} / {{totalPages}}
|
||||
button.js-table-page-next(class="{{#unless hasNext}}disabled{{/unless}}" title="{{_ 'next'}}")
|
||||
| >
|
||||
unless hideControls
|
||||
.table-page-controls
|
||||
input.js-table-page-search(type="search" placeholder="{{_ 'search'}}" aria-label="{{_ 'search'}}" value="{{searchTerm}}")
|
||||
//- Filters, actions and the total are ON by default: supply them and they
|
||||
//- render. They came from Admin Panel / People, where they were hand-written
|
||||
//- into that page's own markup; they are general enough for any table.
|
||||
each filters
|
||||
//- Named by its labelKey, or by its plain label when a filter gives one
|
||||
//- (adminProblems.js) - a select with neither has no accessible name.
|
||||
select.js-table-page-filter(data-filter="{{id}}" title="{{#if labelKey}}{{_ labelKey}}{{else}}{{label}}{{/if}}" aria-label="{{#if labelKey}}{{_ labelKey}}{{else}}{{label}}{{/if}}")
|
||||
each options
|
||||
option(value="{{value}}" selected="{{selected}}")
|
||||
if labelKey
|
||||
| {{_ labelKey}}
|
||||
else
|
||||
| {{label}}
|
||||
each actions
|
||||
button.js-table-page-action(data-action="{{id}}" class="{{cls}}")
|
||||
if icon
|
||||
i.fa(class="{{icon}}")
|
||||
| {{_ labelKey}}
|
||||
//- WP-10: the whole list as CSV (server/routes/adminCsvExport.js), for
|
||||
//- the pages that pass csvLinks (client/lib/adminCsvLinks.js).
|
||||
each csvLinks
|
||||
a.js-table-page-csv.button(href="{{url}}" data-dataset="{{name}}" download)
|
||||
i.fa.fa-download
|
||||
| {{_ labelKey}}
|
||||
if total
|
||||
span.table-page-total
|
||||
if totalLabelKey
|
||||
| {{_ totalLabelKey}}
|
||||
| {{total}}
|
||||
.table-page-pagination
|
||||
button.js-table-page-prev(class="{{#unless hasPrev}}disabled{{/unless}}" title="{{_ 'previous'}}")
|
||||
| <
|
||||
span.table-page-page-info {{page}} / {{totalPages}}
|
||||
button.js-table-page-next(class="{{#unless hasNext}}disabled{{/unless}}" title="{{_ 'next'}}")
|
||||
| >
|
||||
//- The table is ALWAYS rendered, empty or not. Its header carries controls on
|
||||
//- several pages - the "New" link of Organizations, Teams, People and
|
||||
//- Translation, the select-all pairs - so hiding the whole table when there
|
||||
|
||||
@@ -3,6 +3,7 @@ import { Template } from 'meteor/templating';
|
||||
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
|
||||
import { formatDateForDisplay } from '/client/lib/dateDisplay';
|
||||
import { buildFilters, buildHeader, pageInfo } from '/models/lib/tablePage';
|
||||
import { adminCsvLinks } from '/client/lib/adminCsvLinks';
|
||||
import { webhooksOff } from '/client/lib/webhooksSwitch';
|
||||
|
||||
// Admin Panel / Problems / Webhooks: every integration, its board or Global,
|
||||
@@ -73,6 +74,7 @@ Template.webhooksReport.helpers({
|
||||
}]),
|
||||
header: buildHeader(COLUMNS),
|
||||
rowTemplate: 'webhooksReportRow',
|
||||
csvLinks: adminCsvLinks([{ name: 'webhooks', labelKey: 'export-csv' }]),
|
||||
docs,
|
||||
rowCount: docs.length,
|
||||
total: t.total.get(),
|
||||
|
||||
@@ -711,34 +711,13 @@ body.sidebar-resizing-active {
|
||||
.pop-over-list-subheading + .pop-over-list {
|
||||
margin-top: 0;
|
||||
}
|
||||
/* #6699: this editor uses real, labelled checkboxes. Undo all three parts
|
||||
of forms.css's material-checkbox hiding rule in this popup only. */
|
||||
.wip-limit-groups input[type="checkbox"] {
|
||||
/* #6820: no text-field padding, or a ticked box is drawn as a dot. */
|
||||
min-height: 0;
|
||||
padding: 0;
|
||||
display: inline-block;
|
||||
visibility: visible;
|
||||
position: static;
|
||||
inset-inline-start: auto;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
flex: 0 0 16px;
|
||||
margin-inline-end: 6px;
|
||||
appearance: auto;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wip-limit-groups label.flex {
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
/* Keep native filter controls visible despite the application's custom inputs. */
|
||||
.filter-native-choice input[type="checkbox"],
|
||||
.filter-native-choice input[type="radio"],
|
||||
.js-card-date-range input[type="checkbox"] {
|
||||
.filter-native-choice input[type="radio"] {
|
||||
display: inline-block;
|
||||
visibility: visible;
|
||||
position: static;
|
||||
@@ -750,6 +729,7 @@ body.sidebar-resizing-active {
|
||||
margin-inline-end: 6px;
|
||||
appearance: auto;
|
||||
}
|
||||
|
||||
/* Why a date range was refused, below its buttons (sidebarFilters.js,
|
||||
rangeRefused): the browser's own bubble covered those buttons in Firefox. */
|
||||
.filter-date-range-error {
|
||||
@@ -800,3 +780,18 @@ body.sidebar-resizing-active {
|
||||
.board-view-settings .board-view-settings-group-heading:first-child {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
.board-info-on-my-boards .auto-archive-setting {
|
||||
margin-block-end: 5px;
|
||||
margin-inline-start: 35px;
|
||||
}
|
||||
|
||||
.board-info-on-my-boards .auto-archive-setting label {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.board-info-on-my-boards .auto-archive-setting input {
|
||||
display: block;
|
||||
inline-size: 7rem;
|
||||
max-inline-size: 100%;
|
||||
}
|
||||
@@ -251,7 +251,7 @@ template(name="boardInfoOnMyBoardsPopup")
|
||||
input.js-card-aging-days(type="number" min="1" value="{{cardAgingDays2}}" title="{{_ 'card-aging-tier2'}}")
|
||||
input.js-card-aging-days(type="number" min="1" value="{{cardAgingDays3}}" title="{{_ 'card-aging-tier3'}}")
|
||||
//- Nextcloud Deck-style auto-archive: empty = off.
|
||||
div.check-div.auto-archive-setting
|
||||
.auto-archive-setting
|
||||
label(for="auto-archive-days")
|
||||
i.fa.fa-archive
|
||||
| {{_ 'auto-archive-days'}}
|
||||
@@ -277,6 +277,7 @@ template(name="boardInfoOnMyBoardsPopup")
|
||||
own. Whoever may not change the board sees the board's rows disabled and
|
||||
may still set their own ("Labels text").
|
||||
template(name="boardCardSettingsPopup")
|
||||
+assigneeEffortBoardSettings
|
||||
//- BOTH sides at once (docs/Features/Cards/Card-Settings.md): the Minicard
|
||||
pane first - at the start, the left in a left-to-right page - and the Card
|
||||
pane after it, side by side when the popup is wide enough and stacked
|
||||
@@ -357,6 +358,9 @@ template(name="cardSettingsInline")
|
||||
i.fa(class="{{#if paneCollapsed}}fa-caret-right{{else}}fa-caret-down{{/if}}" aria-hidden="true")
|
||||
h3.card-settings-pane-title {{paneTitle}}
|
||||
.card-settings-pane-body.js-card-settings-pane-body(hidden=paneCollapsed)
|
||||
label.card-settings-board-option
|
||||
input.js-board-avatar-full-names(type="checkbox" checked=avatarFullNamesEnabled disabled="{{#unless canModifyBoard}}disabled{{/unless}}")
|
||||
| {{_ 'avatars'}} — {{_ 'fullname'}}
|
||||
.card-settings-inline-sections.js-card-settings-sections-sortable(data-side="{{showSide}}")
|
||||
each section in inlineSections
|
||||
+cardSettingsInlineSection(section=section side=showSide)
|
||||
@@ -643,6 +647,19 @@ template(name="outgoingWebhooksPopup")
|
||||
textarea.js-outgoing-webhooks-title(rows="2" placeholder="{{_ 'webhook-title'}}" name="title")= title
|
||||
input.js-outgoing-webhooks-url(type="text" name="url" value=url aria-label="{{_ 'settings-group-url'}}")
|
||||
input.js-outgoing-webhooks-token(placeholder="{{_ 'webhook-token' }}" type="text" value=token name="token")
|
||||
label
|
||||
span {{_ 'email-bounces-provider-key'}}
|
||||
input(type="password" name="signingSecret" autocomplete="new-password" maxlength="1024")
|
||||
p.quiet {{_ 'cloud-secret-keep-blank'}}
|
||||
label
|
||||
input(type="checkbox" name="clearSigningSecret")
|
||||
span {{_ 'email-to-card-clear-secret'}}
|
||||
fieldset
|
||||
legend {{_ 'filter'}}
|
||||
each webhookChangedFieldOptions
|
||||
label
|
||||
input(type="checkbox" name="changedField" value=field checked=checked)
|
||||
span {{_ labelKey}}
|
||||
select.js-outgoing-webhooks-type(name="type" aria-label="{{_ 'type'}}")
|
||||
each _type in types
|
||||
if($eq _type this.type)
|
||||
@@ -672,6 +689,15 @@ template(name="outgoingWebhooksPopup")
|
||||
textarea.js-outgoing-webhooks-title(rows="2" placeholder="{{_ 'webhook-title'}}" name="title")
|
||||
input.js-outgoing-webhooks-url(placeholder="{{_ 'settings-group-url' }}" type="text" name="url")
|
||||
input.js-outgoing-webhooks-token(placeholder="{{_ 'webhook-token' }}" type="text" name="token")
|
||||
label
|
||||
span {{_ 'email-bounces-provider-key'}}
|
||||
input(type="password" name="signingSecret" autocomplete="new-password" maxlength="1024")
|
||||
fieldset
|
||||
legend {{_ 'filter'}}
|
||||
each webhookChangedFieldOptions
|
||||
label
|
||||
input(type="checkbox" name="changedField" value=field checked=checked)
|
||||
span {{_ labelKey}}
|
||||
select.js-outgoing-webhooks-type(name="type" aria-label="{{_ 'type'}}")
|
||||
each _type in types
|
||||
option(value=_type) {{_ _type}}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { cardAvatarNameField, showsCardAvatarNames } from '/models/lib/cardAvatarNames';
|
||||
import { currentRulesAccess } from '/client/lib/rulesAccess';
|
||||
import '/client/components/forms/dateFormatSettings';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
@@ -1317,6 +1318,12 @@ Template.membersWidget.events({
|
||||
});
|
||||
|
||||
Template.outgoingWebhooksPopup.helpers({
|
||||
webhookChangedFieldOptions() {
|
||||
const { CHANGED_FIELDS } = require('/models/lib/webhookChangedFields');
|
||||
return Object.entries(CHANGED_FIELDS).map(([field, labelKey]) => ({
|
||||
field, labelKey, checked: this.changedFields?.includes(field),
|
||||
}));
|
||||
},
|
||||
// #2026 / #1377: the activity picker of an existing webhook (this).
|
||||
webhookPicker() {
|
||||
const { pickerState } = require('/models/lib/webhookActivityPicker');
|
||||
@@ -1407,7 +1414,12 @@ Template.outgoingWebhooksPopup.events({
|
||||
}
|
||||
// #1297: present only in an existing webhook's form.
|
||||
const dmToggle = $(evt.target).find('.js-toggle-webhook-mattermost-dm');
|
||||
const secret = evt.target.elements.signingSecret.value;
|
||||
const clearSecret = evt.target.elements.clearSigningSecret?.checked;
|
||||
const changedFields = Array.from(evt.target.querySelectorAll('[name="changedField"]:checked'), input => input.value);
|
||||
const values = {
|
||||
changedFields,
|
||||
...(secret && !clearSecret ? { signingSecret: secret } : {}),
|
||||
url,
|
||||
type,
|
||||
token,
|
||||
@@ -1439,6 +1451,7 @@ Template.outgoingWebhooksPopup.events({
|
||||
} else if (integration && integration._id) {
|
||||
await Integrations.updateAsync(integration._id, {
|
||||
$set: values,
|
||||
...(clearSecret ? { $unset: { signingSecret: '' } } : {}),
|
||||
});
|
||||
} else if (url) {
|
||||
await Integrations.insertAsync({
|
||||
@@ -3353,6 +3366,10 @@ Template.cardSettingsInline.helpers({
|
||||
...boardCardSettingsHelpers,
|
||||
inlineSections() { return inlineSectionsOf(Template.instance(), Template.currentData()); },
|
||||
showSide() { return Template.instance().showSide.get(); },
|
||||
avatarFullNamesEnabled() {
|
||||
return showsCardAvatarNames(Utils.getCurrentBoard(), ReactiveCache.getCurrentSetting(),
|
||||
Template.instance().showSide.get());
|
||||
},
|
||||
paneTitle() {
|
||||
return TAPi18n.__(Template.instance().showSide.get() === 'minicard' ? 'show-on-minicard' : 'show-on-card');
|
||||
},
|
||||
@@ -3555,6 +3572,12 @@ const paneEvents = Object.fromEntries(Object.entries(cardSettingsEvents).map(([k
|
||||
|
||||
Template.cardSettingsInline.events({
|
||||
...paneEvents,
|
||||
async 'change .js-board-avatar-full-names'(event, tpl) {
|
||||
const board = Utils.getCurrentBoard();
|
||||
if (!board || !Utils.canModifyBoard()) return;
|
||||
const field = cardAvatarNameField(tpl.showSide.get());
|
||||
await Boards.updateAsync(board._id, { $set: { [field]: event.currentTarget.checked } });
|
||||
},
|
||||
// The caret at the top of a pane: the whole pane, only its header left.
|
||||
async 'click .js-toggle-card-settings-pane'(evt, tpl) {
|
||||
evt.preventDefault();
|
||||
|
||||
@@ -381,6 +381,21 @@ Template.createCustomFieldPopup.events({
|
||||
data.settings.jiraEstimateFieldId = editing.settings.jiraEstimateFieldId;
|
||||
data.settings.jiraEstimateUnit = editing.settings.jiraEstimateUnit;
|
||||
}
|
||||
if (data.type === 'text' && editing.settings?.openProjectFormattable) {
|
||||
data.settings.openProjectFormattable = true;
|
||||
}
|
||||
if (data.type === 'text' && editing.settings?.openProjectLink) {
|
||||
data.settings.openProjectLink = true;
|
||||
}
|
||||
if (data.type === editing.type && editing.settings?.openProjectScalarType) {
|
||||
data.settings.openProjectScalarType = editing.settings.openProjectScalarType;
|
||||
}
|
||||
if (data.type === 'date' && editing.settings?.openProjectDateOnly) {
|
||||
data.settings.openProjectDateOnly = true;
|
||||
}
|
||||
if (editing.settings?.openProjectCommentKey) {
|
||||
data.settings.openProjectCommentKey = editing.settings.openProjectCommentKey;
|
||||
}
|
||||
CustomFields.update(currentData._id, { $set: data });
|
||||
}
|
||||
|
||||
|
||||
@@ -222,3 +222,20 @@
|
||||
.member .member-account-badge.inactive {
|
||||
background: #95a5a6;
|
||||
}
|
||||
|
||||
.card-avatar-with-name {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
vertical-align: middle;
|
||||
max-width: 100%;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.card-avatar-with-name .member {
|
||||
flex: 0 0 24px;
|
||||
}
|
||||
|
||||
.card-avatar-full-name {
|
||||
min-width: 0;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
@@ -1,3 +1,11 @@
|
||||
template(name="cardUserAvatar")
|
||||
if avatarFullName
|
||||
span.card-avatar-with-name
|
||||
+userAvatar
|
||||
span.card-avatar-full-name(aria-hidden="true")= avatarFullName
|
||||
else
|
||||
+userAvatar
|
||||
|
||||
template(name="userAvatar")
|
||||
//- WCAG 2.5.3 Label in Name: the visible text of an initials avatar is its initials,
|
||||
//- so the accessible name starts with them (initialsInName). A picture has no text.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { showsCardAvatarNames } from '/models/lib/cardAvatarNames';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
import { ReactiveVar } from 'meteor/reactive-var';
|
||||
@@ -44,6 +45,14 @@ const AVATAR_USER_FIELDS = {
|
||||
isActive: 1,
|
||||
};
|
||||
|
||||
Template.cardUserAvatar.helpers({
|
||||
avatarFullName() {
|
||||
if (!showsCardAvatarNames(this.board, ReactiveCache.getCurrentSetting(), this.side)) return '';
|
||||
const user = ReactiveCache.getUser(this.userId, { fields: INITIALS_USER_FIELDS });
|
||||
return user?.profile?.fullname?.trim() || '';
|
||||
},
|
||||
});
|
||||
|
||||
Template.userAvatar.helpers({
|
||||
// WCAG 2.5.3 Label in Name: an avatar drawn as initials shows those letters as
|
||||
// text, so the link's accessible name has to contain them. The name is the
|
||||
|
||||
@@ -435,6 +435,10 @@ template(name="changeSettingsPopup")
|
||||
menu) side by side in the same .pop-over, so the popup's data-popup would
|
||||
restyle those too. userForm.css
|
||||
ul.pop-over-list.change-settings-list
|
||||
li
|
||||
a.js-personal-api-tokens
|
||||
i.fa.fa-key
|
||||
| {{_ 'personal-api-tokens'}}
|
||||
li
|
||||
a.js-toggle-desktop-drag-handles
|
||||
i.fa.fa-arrows
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Accounts } from 'meteor/accounts-base';
|
||||
import '/client/components/forms/dateFormatSettings';
|
||||
import '/client/components/forms/personalApiTokens';
|
||||
import { accountOperationErrorKey } from '/client/lib/accountOperationError';
|
||||
import { languageFlags, languageLabelParts } from '/imports/i18n/languageFlags';
|
||||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
@@ -585,6 +586,7 @@ Template.changeSettingsPopup.helpers({
|
||||
});
|
||||
|
||||
Template.changeSettingsPopup.events({
|
||||
'click .js-personal-api-tokens': Popup.open('personalApiTokens', { titleKey: 'personal-api-tokens' }),
|
||||
'keypress/paste #show-cards-count-at'() {
|
||||
let keyCode = event.keyCode;
|
||||
let charCode = String.fromCharCode(keyCode);
|
||||
|
||||
@@ -118,6 +118,7 @@ import '/client/components/main/structuralSelection';
|
||||
import '/client/components/main/boardDragSettings';
|
||||
|
||||
import './components/main/boardSettingsColumnActions';
|
||||
import './components/cards/assigneeEffort';
|
||||
|
||||
// Sandstorm's shell bridge (grain URL and title, the Powerbox picker, the
|
||||
// relative Meteor.absoluteUrl) and the isSandstorm template helper. It does
|
||||
|
||||
@@ -42,6 +42,7 @@ function formatDate(date) {
|
||||
export function setupDatePicker(tpl, {
|
||||
defaultTime = '1970-01-01 08:00:00',
|
||||
initialDate,
|
||||
dateOnly = false,
|
||||
storeDate,
|
||||
deleteDate,
|
||||
} = {}) {
|
||||
@@ -51,6 +52,7 @@ export function setupDatePicker(tpl, {
|
||||
card,
|
||||
date: new ReactiveVar(initialDate && isValidDate(new Date(initialDate)) ? new Date(initialDate) : new Date('invalid')),
|
||||
defaultTime,
|
||||
dateOnly,
|
||||
storeDate,
|
||||
deleteDate,
|
||||
};
|
||||
@@ -202,7 +204,7 @@ export function datePickerEvents() {
|
||||
// alone ('13'), with am/pm, etc. (#2903) - and is rejected the same
|
||||
// way a bad 'HH:mm' always was.
|
||||
const dateValue = normalizeDigits(evt.target.date.value);
|
||||
const rawTime = normalizeDigits(evt.target.time.value);
|
||||
const rawTime = normalizeDigits(evt.target.time?.value || '');
|
||||
let timeValue;
|
||||
if (rawTime) {
|
||||
timeValue = parseTimeInput(rawTime);
|
||||
@@ -250,7 +252,8 @@ export function datePickerEvents() {
|
||||
return;
|
||||
}
|
||||
|
||||
await datePicker.storeDate(newCompleteDate, datePicker.card);
|
||||
const storedDate = datePicker.dateOnly ? new Date(`${dateValue}T00:00:00.000Z`) : newCompleteDate;
|
||||
await datePicker.storeDate(storedDate, datePicker.card);
|
||||
// FerretDB does not always wake Meteor's already-running observer for an
|
||||
// update made through the async collection path. Restart the current
|
||||
// board publication so the saved badge replaces the add-date control
|
||||
|
||||
@@ -39,6 +39,24 @@ export function resolveUsernamesToIds(usernames, users) {
|
||||
.filter(Boolean);
|
||||
}
|
||||
|
||||
// #6948: the board publication never sends the signed-in user's own
|
||||
// document (#6919, server/lib/notCurrentUser.js) - it comes from the accounts
|
||||
// publication instead - so a lookup by username among the board's users
|
||||
// misses `?assignee=<own username>`. Adds the current user ({ _id, username })
|
||||
// to the candidates when it is not among them already.
|
||||
export function withCurrentUser(users, currentUser) {
|
||||
const list = (users || []).slice();
|
||||
if (
|
||||
currentUser &&
|
||||
currentUser._id &&
|
||||
currentUser.username &&
|
||||
!list.some(user => user && user._id === currentUser._id)
|
||||
) {
|
||||
list.push({ _id: currentUser._id, username: currentUser.username });
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
// Resolves a list of label names (case-insensitive) to label `_id`s using the
|
||||
// board's own labels array ({ _id, name, color }).
|
||||
export function resolveLabelNamesToIds(labelNames, labels) {
|
||||
|
||||
@@ -92,7 +92,8 @@ export function trayClearItemHtml(activity) {
|
||||
if (!activity || !activity.activityType) return '';
|
||||
const delivery = trayDeliveryFor(activity.boardId);
|
||||
if (delivery.layout !== 'clear') return '';
|
||||
const description = `act-${activity.activityType}`;
|
||||
const { activitySentenceKey } = require('/models/lib/activityFeed');
|
||||
const description = activitySentenceKey(activity.activityType);
|
||||
// An activity with no sentence of its own keeps the classic line.
|
||||
if (TAPi18n.__(description) === description) return '';
|
||||
return renderNotificationItem({
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
const SLOT = 'wekan.notionImportProgress';
|
||||
const encoder = new TextEncoder();
|
||||
const lifetime = 60 * 60 * 1000;
|
||||
|
||||
async function encryptionKey(token) {
|
||||
const digest = await crypto.subtle.digest('SHA-256', encoder.encode(token));
|
||||
return crypto.subtle.importKey('raw', digest, 'AES-GCM', false, ['encrypt', 'decrypt']);
|
||||
}
|
||||
|
||||
async function streamBytes(bytes, transform) {
|
||||
return new Uint8Array(await new Response(new Blob([bytes]).stream().pipeThrough(transform)).arrayBuffer());
|
||||
}
|
||||
|
||||
async function checkpointDatabase(action, id, value) {
|
||||
const database = await new Promise((resolve, reject) => {
|
||||
const request = indexedDB.open('wekanNotionImport', 1);
|
||||
request.onupgradeneeded = () => {
|
||||
request.result.createObjectStore('checkpoints').createIndex('expiresAt', 'expiresAt');
|
||||
};
|
||||
request.onsuccess = () => resolve(request.result);
|
||||
request.onerror = () => reject(request.error);
|
||||
});
|
||||
try {
|
||||
return await new Promise((resolve, reject) => {
|
||||
const transaction = database.transaction('checkpoints', action === 'get' ? 'readonly' : 'readwrite');
|
||||
const store = transaction.objectStore('checkpoints');
|
||||
if (action === 'put') {
|
||||
const expired = store.index('expiresAt').openCursor(IDBKeyRange.upperBound(Date.now()));
|
||||
expired.onsuccess = () => {
|
||||
const cursor = expired.result;
|
||||
if (!cursor) return;
|
||||
cursor.delete();
|
||||
cursor.continue();
|
||||
};
|
||||
}
|
||||
const request = action === 'put' ? store.put(value, id) : store[action](id);
|
||||
transaction.oncomplete = () => resolve(request.result);
|
||||
transaction.onabort = () => reject(transaction.error);
|
||||
});
|
||||
} finally {
|
||||
database.close();
|
||||
}
|
||||
}
|
||||
|
||||
export async function restoreNotionImportProgress(key, token) {
|
||||
try {
|
||||
const saved = JSON.parse(sessionStorage.getItem(SLOT));
|
||||
if (saved?.key !== key || saved.expiresAt <= Date.now()) return null;
|
||||
const ciphertext = saved.id ? (await checkpointDatabase('get', saved.id))?.contents : Uint8Array.fromBase64(saved.contents);
|
||||
if (!ciphertext) return null;
|
||||
const plaintext = await crypto.subtle.decrypt({
|
||||
name: 'AES-GCM',
|
||||
iv: Uint8Array.fromBase64(saved.iv),
|
||||
additionalData: encoder.encode(key),
|
||||
}, await encryptionKey(token), ciphertext);
|
||||
const bytes = new Uint8Array(plaintext);
|
||||
const decoded = bytes[0] === 0x1f && bytes[1] === 0x8b
|
||||
? await streamBytes(bytes, new DecompressionStream('gzip')) : bytes;
|
||||
return JSON.parse(new TextDecoder().decode(decoded));
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
export async function saveNotionImportProgress(key, token, progress) {
|
||||
try {
|
||||
const previous = JSON.parse(sessionStorage.getItem(SLOT));
|
||||
if (!progress) {
|
||||
if (previous?.key === key) {
|
||||
sessionStorage.removeItem(SLOT);
|
||||
if (previous.id) await checkpointDatabase('delete', previous.id);
|
||||
}
|
||||
return;
|
||||
}
|
||||
const bytes = encoder.encode(JSON.stringify(progress));
|
||||
const compressed = typeof CompressionStream === 'function' && typeof DecompressionStream === 'function'
|
||||
? await streamBytes(bytes, new CompressionStream('gzip')) : bytes;
|
||||
const payload = compressed.length < bytes.length ? compressed : bytes;
|
||||
const iv = crypto.getRandomValues(new Uint8Array(12));
|
||||
const contents = await crypto.subtle.encrypt({
|
||||
name: 'AES-GCM', iv, additionalData: encoder.encode(key),
|
||||
}, await encryptionKey(token), payload);
|
||||
const meta = { key, expiresAt: Date.now() + lifetime, iv: iv.toBase64() };
|
||||
try {
|
||||
sessionStorage.setItem(SLOT, JSON.stringify({ ...meta, contents: new Uint8Array(contents).toBase64() }));
|
||||
} catch {
|
||||
const id = crypto.randomUUID();
|
||||
await checkpointDatabase('put', id, { contents, expiresAt: meta.expiresAt });
|
||||
try {
|
||||
sessionStorage.setItem(SLOT, JSON.stringify({ ...meta, id }));
|
||||
} catch (error) {
|
||||
await checkpointDatabase('delete', id);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
if (previous?.id) await checkpointDatabase('delete', previous.id);
|
||||
} catch {
|
||||
// The in-memory checkpoint remains usable if the browser cannot store it.
|
||||
}
|
||||
}
|
||||
+67
-1
@@ -133,4 +133,70 @@ The card's ID is returned in the format:
|
||||
|
||||
# In Wekan code
|
||||
|
||||
If you believe that code is the best documentation, be our guest: [models/cards.js](../../models/cards.js "Card API code")
|
||||
If you believe that code is the best documentation, be our guest: [models/cards.js](../../models/cards.js "Card API code")
|
||||
## Synchronize the cards on a board
|
||||
|
||||
`GET /api/boards/:boardId/cards` returns the active cards in one array. Each
|
||||
entry includes both placement IDs, `createdAt` and `userId`, plus the fields
|
||||
returned by the list-scoped card endpoint.
|
||||
|
||||
Add `?modifiedSince=2026-11-30T12:00:00.000Z` to receive
|
||||
`{ "cards": [...], "removedIds": [...] }`. The timestamp is inclusive.
|
||||
`removedIds` lists cards that are no longer active on this board after an
|
||||
archive, deletion or cross-board move. This delta relies on the board's retained
|
||||
activity history. Do a full refresh if the previous sync predates that history.
|
||||
|
||||
These GET responses and the existing list and swimlane card collections
|
||||
return an `ETag`. Send its value in `If-None-Match` on a subsequent request to
|
||||
the same URL to receive HTTP 304 when the response is unchanged.
|
||||
|
||||
## Per-assignee effort
|
||||
|
||||
A board with per-assignee estimates enabled includes `assigneeEffort` in card
|
||||
and card-list responses. It contains the board's `unit` (`hours` or `days`),
|
||||
an `assignees` array with `userId`, `estimated` and `remaining`, and `totals`
|
||||
with the two sums. A day represents eight hours.
|
||||
|
||||
Send `PUT /api/boards/:boardId/cards/:cardId/assignee-effort/:assigneeId`
|
||||
with `{"estimated":15,"remaining":4}` in the board's unit, or
|
||||
`{"clear":true}` to clear the row. The person must be assigned to the card.
|
||||
The board chooses which users with card write access can save an entry.
|
||||
|
||||
## Update cards in bulk
|
||||
|
||||
Send `PUT /api/boards/:boardId/cards/bulk` with 1 to 500 card updates. Get
|
||||
each card's `revision` from `GET /api/cards/:cardId`. Use the same names
|
||||
in `fields` as for single-card updates. Use `customFields` to update
|
||||
values of fields already attached to the card. Other values are preserved.
|
||||
|
||||
```json
|
||||
{
|
||||
"cards": [
|
||||
{
|
||||
"cardId": "card-id",
|
||||
"revision": "123456789",
|
||||
"fields": { "title": "New title" },
|
||||
"customFields": [{ "_id": "custom-field-id", "value": "New value" }]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
With `api.py`, save the request body as `updates.json` and run
|
||||
|
||||
```sh
|
||||
python3 api.py request PUT /api/boards/BOARDID/cards/bulk --json-file updates.json
|
||||
```
|
||||
|
||||
Read the `results` array even when the response is HTTP 200. Its entries
|
||||
follow request order and report each card's `status` and `updated` flag.
|
||||
A stale revision returns 412 and a missing revision returns 428 for that
|
||||
entry. Successful cards are updated independently and appear in activity.
|
||||
|
||||
### Required fields when moving into a list
|
||||
|
||||
If the destination has an entry rule, a single-card update can supply the
|
||||
required dates or custom field values in the same revision-protected request.
|
||||
A refusal returns HTTP 422 with `code: "list-entry-requirements"` and a
|
||||
`missingFields` array. The card stays in its current list. Bulk updates report
|
||||
the same status and missing fields on the affected card's result.
|
||||
Loaded 100 of 689 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user