mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
Compare commits
516 Commits
sonarr-pul
...
v0.3.14.23
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2749479283 | ||
|
|
4cbafa76d8 | ||
|
|
73782cc233 | ||
|
|
de396fe9be | ||
|
|
71cb9e1dd7 | ||
|
|
ee5ed57fcc | ||
|
|
d20a049a5a | ||
|
|
a9f77ace37 | ||
|
|
0341a2ec26 | ||
|
|
d6796bbe1a | ||
|
|
9066f8558c | ||
|
|
c4e37528ee | ||
|
|
5937c952af | ||
|
|
0f4bd3c472 | ||
|
|
cf415e61de | ||
|
|
9865e92cea | ||
|
|
1cf956a9d9 | ||
|
|
8989c55c8c | ||
|
|
dc83e0127e | ||
|
|
34eb312426 | ||
|
|
9d5cdebdb2 | ||
|
|
a0ab224acd | ||
|
|
05aa35a54d | ||
|
|
ca7f8775f5 | ||
|
|
2a01e9b445 | ||
|
|
7d30c7d1ea | ||
|
|
50be87e5a4 | ||
|
|
0572d1ac80 | ||
|
|
d2240514d7 | ||
|
|
ad47dc032d | ||
|
|
6c6df7d7d9 | ||
|
|
2121204064 | ||
|
|
61004ea33f | ||
|
|
54c1c7862e | ||
|
|
43dfdc8bf5 | ||
|
|
0d1ae0ca4e | ||
|
|
9902889a30 | ||
|
|
04d7061030 | ||
|
|
fd201912a9 | ||
|
|
c412701a3d | ||
|
|
7451a66365 | ||
|
|
a6431fdb0b | ||
|
|
060b133f6d | ||
|
|
5ed13b942b | ||
|
|
89f3d8167b | ||
|
|
77b027374f | ||
|
|
650490abb2 | ||
|
|
7d2e215d61 | ||
|
|
65ff890c74 | ||
|
|
50c0b0dbaa | ||
|
|
d5f36d0144 | ||
|
|
fab7558bd4 | ||
|
|
3dc86b3a01 | ||
|
|
24ad6134e3 | ||
|
|
033f8c40af | ||
|
|
4c73a619eb | ||
|
|
3ca798e983 | ||
|
|
d9827fd6a6 | ||
|
|
f4f03a853f | ||
|
|
4f4e4bf2ca | ||
|
|
413a70a312 | ||
|
|
a8f2b91010 | ||
|
|
68a4ee6000 | ||
|
|
5196ce311b | ||
|
|
ae92b22727 | ||
|
|
0bccffef01 | ||
|
|
bca899b9c0 | ||
|
|
2bb576a94b | ||
|
|
bb49949853 | ||
|
|
a093061b29 | ||
|
|
df876707c4 | ||
|
|
2af33143ba | ||
|
|
c3c5a47776 | ||
|
|
a21abe0838 | ||
|
|
a32f5f6639 | ||
|
|
4cd45ecc21 | ||
|
|
2c8e0b1ca4 | ||
|
|
bd25c9e3e0 | ||
|
|
ee64b8788b | ||
|
|
7aeada2089 | ||
|
|
e188c9aac0 | ||
|
|
a3ae2359f5 | ||
|
|
5b92905dd4 | ||
|
|
fc402743aa | ||
|
|
b9d53ed732 | ||
|
|
d248747635 | ||
|
|
d70224c811 | ||
|
|
acdf8c8aa8 | ||
|
|
3ed41554ce | ||
|
|
ce808c6d7b | ||
|
|
63b1b56a4f | ||
|
|
a5647bedc8 | ||
|
|
fe659bb79d | ||
|
|
9918535509 | ||
|
|
f9a6db40b8 | ||
|
|
6273d69ed6 | ||
|
|
7012380e95 | ||
|
|
b001ecd698 | ||
|
|
e28becdda4 | ||
|
|
eae06695e8 | ||
|
|
54a9af2ced | ||
|
|
c9b55266fc | ||
|
|
05b64406a4 | ||
|
|
1f37c5387b | ||
|
|
4a6c7042fe | ||
|
|
d7305b9753 | ||
|
|
bd56643eaa | ||
|
|
44e6de2e23 | ||
|
|
b209d047fa | ||
|
|
fd5ab27df6 | ||
|
|
4a89befd79 | ||
|
|
1a30293c33 | ||
|
|
f5c2a6bf51 | ||
|
|
f3d90fdaf1 | ||
|
|
04c5671a0a | ||
|
|
22cc88c5e7 | ||
|
|
ca0c95a2d2 | ||
|
|
419f790d66 | ||
|
|
9fe08429bc | ||
|
|
71f4a88ab3 | ||
|
|
30b283eda3 | ||
|
|
e23d0bbfa1 | ||
|
|
765a2aa01b | ||
|
|
64895c3210 | ||
|
|
03ab84a814 | ||
|
|
b77e5b14e1 | ||
|
|
75efbd45e1 | ||
|
|
00cac507ad | ||
|
|
c4850505b0 | ||
|
|
75213c86a1 | ||
|
|
b8c3a42643 | ||
|
|
8acb034aa6 | ||
|
|
889d32552b | ||
|
|
adc5f4db97 | ||
|
|
9d08050f96 | ||
|
|
f8cffbb4cf | ||
|
|
14aeb66142 | ||
|
|
37e8e11e31 | ||
|
|
bdb2f14936 | ||
|
|
a97af657be | ||
|
|
301127e6dc | ||
|
|
1f95bcae4e | ||
|
|
29118cda45 | ||
|
|
09beaa939d | ||
|
|
2107624f1c | ||
|
|
c1c2076e5c | ||
|
|
c31a797bd8 | ||
|
|
ebb2b4eca3 | ||
|
|
3ec5d9b9fe | ||
|
|
1ad84a7c44 | ||
|
|
9d67c18254 | ||
|
|
2e39c7340c | ||
|
|
f75add984f | ||
|
|
f0f6c3eb35 | ||
|
|
d94f866aeb | ||
|
|
618f07d138 | ||
|
|
3db33c988a | ||
|
|
28e38b7f17 | ||
|
|
ca403e6f31 | ||
|
|
51351dee1d | ||
|
|
2081f2e321 | ||
|
|
c10a32534c | ||
|
|
0e415c6ce3 | ||
|
|
a8eb674071 | ||
|
|
7f8a1cf849 | ||
|
|
a3c0d10240 | ||
|
|
3ddeaaefe2 | ||
|
|
6d99de4fe0 | ||
|
|
8b36a5ce92 | ||
|
|
1202a43466 | ||
|
|
82bc2d1aa4 | ||
|
|
ed9af393b7 | ||
|
|
0799cfc885 | ||
|
|
331d0c9a9c | ||
|
|
03c93c9c84 | ||
|
|
60f6ed030b | ||
|
|
cc70d61735 | ||
|
|
a7b965100d | ||
|
|
8901118aef | ||
|
|
99c17d7698 | ||
|
|
b84e83b082 | ||
|
|
4249f5324a | ||
|
|
9e1630e9a4 | ||
|
|
68b2773913 | ||
|
|
ad446b358e | ||
|
|
423a8ecbe1 | ||
|
|
29a12aa3b0 | ||
|
|
695781dde5 | ||
|
|
4e8ddd3018 | ||
|
|
eb67231a45 | ||
|
|
3d3a458828 | ||
|
|
a11930a03f | ||
|
|
abaf39d67e | ||
|
|
894a5943e4 | ||
|
|
be26647afb | ||
|
|
b319a4bce7 | ||
|
|
f03fd7e95e | ||
|
|
7f25a3c4b1 | ||
|
|
e3247dc505 | ||
|
|
3677fd6d34 | ||
|
|
4f6901b1ff | ||
|
|
ce820f6f73 | ||
|
|
53e6cb24b7 | ||
|
|
7c1ca8acc1 | ||
|
|
5e9e578101 | ||
|
|
156407c541 | ||
|
|
1ef6c60318 | ||
|
|
73b3b1848b | ||
|
|
33fbd95707 | ||
|
|
704635f758 | ||
|
|
263e807de2 | ||
|
|
9ac9bd25c1 | ||
|
|
4ead5186ae | ||
|
|
dea797c375 | ||
|
|
58ba24762b | ||
|
|
fbd7b4fe33 | ||
|
|
fee7fbbff6 | ||
|
|
18253a298e | ||
|
|
22f92150c3 | ||
|
|
4d7a762ee8 | ||
|
|
b11517e2ac | ||
|
|
d5af254f47 | ||
|
|
f09da06f80 | ||
|
|
d3443510b4 | ||
|
|
d73eb1b5f9 | ||
|
|
39778a95bf | ||
|
|
9fccca1154 | ||
|
|
e165663616 | ||
|
|
b49d2312ab | ||
|
|
52221c7cf4 | ||
|
|
ad7b110a0b | ||
|
|
b04b483f86 | ||
|
|
b79941e0a1 | ||
|
|
84d47b1f23 | ||
|
|
17df4d47fb | ||
|
|
b9f89dddc9 | ||
|
|
e3fc469cd3 | ||
|
|
4304685a65 | ||
|
|
7d77b1fbe5 | ||
|
|
1989174801 | ||
|
|
ac4ae9bb4d | ||
|
|
f399d27470 | ||
|
|
c5fd2e3aa0 | ||
|
|
e971d68d67 | ||
|
|
af858ac4aa | ||
|
|
63ea253a6b | ||
|
|
484f2eb3ec | ||
|
|
15190aa61a | ||
|
|
a3aac90bf7 | ||
|
|
dd9cbc4f54 | ||
|
|
4bca0d77b7 | ||
|
|
1316b388ad | ||
|
|
243c88ce56 | ||
|
|
921f170234 | ||
|
|
3e102627f5 | ||
|
|
f3b5f0c5cb | ||
|
|
a53516e821 | ||
|
|
f0f95be57f | ||
|
|
f436d730fe | ||
|
|
f7c135faaf | ||
|
|
8bb52105fd | ||
|
|
e5a1b7a72e | ||
|
|
2f2a521391 | ||
|
|
304d1e3462 | ||
|
|
1d1cc6526d | ||
|
|
690e0b5d96 | ||
|
|
212eedd345 | ||
|
|
0b38743292 | ||
|
|
1def54f246 | ||
|
|
0eeaa1e443 | ||
|
|
7beee07a2c | ||
|
|
924f739d1f | ||
|
|
b187fb23e3 | ||
|
|
ca043b3820 | ||
|
|
c3c9b9afbb | ||
|
|
f225a742cc | ||
|
|
f4fd36061c | ||
|
|
38e39449aa | ||
|
|
484c255fd4 | ||
|
|
f341b5f449 | ||
|
|
eb5654c634 | ||
|
|
e843046d76 | ||
|
|
ef57545221 | ||
|
|
09d44726a4 | ||
|
|
0e2d39f580 | ||
|
|
dbcb0e77a8 | ||
|
|
0186900a54 | ||
|
|
941b30edac | ||
|
|
5c61b6ceb3 | ||
|
|
55959e1112 | ||
|
|
07451cbcde | ||
|
|
1ebdffcd26 | ||
|
|
75119ce9df | ||
|
|
668dc6dfde | ||
|
|
ee989c9c67 | ||
|
|
acac3bd680 | ||
|
|
3b18f3206d | ||
|
|
fcf057a019 | ||
|
|
c7399cdd2b | ||
|
|
08a3682b89 | ||
|
|
3da00f75dc | ||
|
|
60abb298b2 | ||
|
|
c710b117ab | ||
|
|
816f53b36b | ||
|
|
749684e24a | ||
|
|
3a0ca45aa9 | ||
|
|
595efd498e | ||
|
|
dea1060d61 | ||
|
|
f6049b8bf2 | ||
|
|
53ced38221 | ||
|
|
3a3cf8511e | ||
|
|
9ec913337d | ||
|
|
9a2120ae92 | ||
|
|
818d3a94d5 | ||
|
|
4e493b74e6 | ||
|
|
c7eaf1e85c | ||
|
|
31fe15c911 | ||
|
|
2c36a6c25f | ||
|
|
6af56f7a15 | ||
|
|
6e13191c25 | ||
|
|
921ddfc962 | ||
|
|
22f977401a | ||
|
|
113d9a07ef | ||
|
|
0560d65ea1 | ||
|
|
94ff105104 | ||
|
|
9bcf258aa9 | ||
|
|
54985bd4ca | ||
|
|
9e4d551f08 | ||
|
|
8390da1c2a | ||
|
|
44ae043c58 | ||
|
|
bb7e2fc70c | ||
|
|
b05938a9a8 | ||
|
|
1e42ac572e | ||
|
|
649dd0bda0 | ||
|
|
de24aef059 | ||
|
|
10766dd227 | ||
|
|
257d279e43 | ||
|
|
1db333088a | ||
|
|
d1aff31593 | ||
|
|
89dd4d3271 | ||
|
|
fc6c78a54e | ||
|
|
c98f4512df | ||
|
|
0a43481aed | ||
|
|
df6c142250 | ||
|
|
58cf93e360 | ||
|
|
7be282ad12 | ||
|
|
7920378789 | ||
|
|
bdcf336d94 | ||
|
|
3828492226 | ||
|
|
3cab98e2c0 | ||
|
|
c977311227 | ||
|
|
ca775df3d1 | ||
|
|
fecb3895ed | ||
|
|
91fadd5430 | ||
|
|
79d4e1a89a | ||
|
|
149c18dd4f | ||
|
|
3171c6f195 | ||
|
|
baf19897ff | ||
|
|
accd16da71 | ||
|
|
9aa5bee493 | ||
|
|
c22ed7172d | ||
|
|
8ddff3868d | ||
|
|
1307f8f5b1 | ||
|
|
985f0fa4a6 | ||
|
|
e199e40621 | ||
|
|
4734cad9b1 | ||
|
|
c744b00b55 | ||
|
|
c88f4570b3 | ||
|
|
c0e8a3e55a | ||
|
|
1ab34a1692 | ||
|
|
2dc5246180 | ||
|
|
234ad835af | ||
|
|
b5a30af422 | ||
|
|
0463193127 | ||
|
|
8bec6c91c9 | ||
|
|
cb511dc19d | ||
|
|
34f0c1820a | ||
|
|
e33b192881 | ||
|
|
00a532c656 | ||
|
|
501cefa2f4 | ||
|
|
1a3e5fd738 | ||
|
|
751ade0338 | ||
|
|
e6da9d26fd | ||
|
|
ccd8d93e82 | ||
|
|
a0ea9d4750 | ||
|
|
a07b9a19ec | ||
|
|
9ba1caaf94 | ||
|
|
d90a6ebbb1 | ||
|
|
d7575f38a5 | ||
|
|
833fb9347f | ||
|
|
b44f4237d2 | ||
|
|
19eec0cb88 | ||
|
|
43367504a4 | ||
|
|
a11b6088dd | ||
|
|
ba6a3ef564 | ||
|
|
d536e2c582 | ||
|
|
72f1d1cf4d | ||
|
|
07a3ee76aa | ||
|
|
b34cc0790b | ||
|
|
1c59aa1ac4 | ||
|
|
16753a9fc7 | ||
|
|
32a62aec2d | ||
|
|
045f1a85df | ||
|
|
9f3c0cf914 | ||
|
|
b7fb42345c | ||
|
|
44673eb4ee | ||
|
|
ff4594aa08 | ||
|
|
1495fa183f | ||
|
|
2f7d7fb220 | ||
|
|
3f58693780 | ||
|
|
d7b1a36a50 | ||
|
|
b55c09ba3d | ||
|
|
5358b7f7ec | ||
|
|
8e95a87ec3 | ||
|
|
d6112d1d8e | ||
|
|
72ef8b91d4 | ||
|
|
9423ddeb34 | ||
|
|
f7b2bba2e7 | ||
|
|
5609dfa590 | ||
|
|
c43e9eb208 | ||
|
|
0411102f57 | ||
|
|
f26fd39709 | ||
|
|
55308bef8b | ||
|
|
6827ac5670 | ||
|
|
0572bde41e | ||
|
|
0eb88cb516 | ||
|
|
a39be51d3e | ||
|
|
b37fd60b85 | ||
|
|
c827859ba0 | ||
|
|
35b466e4ca | ||
|
|
486ec14ca8 | ||
|
|
86d1250831 | ||
|
|
145422e00a | ||
|
|
3a274bdc4a | ||
|
|
e9ada0b43d | ||
|
|
a2832cf329 | ||
|
|
bbdecb343b | ||
|
|
a857e7c6f4 | ||
|
|
906fb30179 | ||
|
|
28f64d9a46 | ||
|
|
816969d0f5 | ||
|
|
63506e5a72 | ||
|
|
817ea75288 | ||
|
|
7e0eca5657 | ||
|
|
5587af7806 | ||
|
|
a90f5f7b4e | ||
|
|
b97d63cb5b | ||
|
|
10e230cc06 | ||
|
|
5c5c362d96 | ||
|
|
0aec2382fe | ||
|
|
677d5d3374 | ||
|
|
ca0f2be194 | ||
|
|
780df3250f | ||
|
|
508b2d7c8d | ||
|
|
96aeb022ab | ||
|
|
b27f852154 | ||
|
|
3c03413d5a | ||
|
|
c34418b984 | ||
|
|
761a6a9136 | ||
|
|
92c59e158d | ||
|
|
5bc917c9dc | ||
|
|
7c03ca5cdf | ||
|
|
b3cf903a3b | ||
|
|
a4930474a5 | ||
|
|
06baae060d | ||
|
|
4e5c7bc0a3 | ||
|
|
a939adb2b1 | ||
|
|
6858db686c | ||
|
|
7a5e2c248c | ||
|
|
f2d57c6c5e | ||
|
|
32c9734d70 | ||
|
|
2d732f0454 | ||
|
|
20835291e6 | ||
|
|
f5d6b2de11 | ||
|
|
d51f7cc02b | ||
|
|
8d41d0106a | ||
|
|
fd08e9d2c4 | ||
|
|
a1ee6aa8ac | ||
|
|
ddbb8b211f | ||
|
|
bea61edb4e | ||
|
|
db7bb14491 | ||
|
|
7a7039b1f7 | ||
|
|
1978a726bb | ||
|
|
2412b38333 | ||
|
|
dbed46dd5b | ||
|
|
63670f55b0 | ||
|
|
60cc22b543 | ||
|
|
3229d3ef59 | ||
|
|
349a19855a | ||
|
|
b8b364b48e | ||
|
|
571805d05f | ||
|
|
8de7f48b80 | ||
|
|
37a3799c66 | ||
|
|
b1d22b6339 | ||
|
|
a28fd4415e | ||
|
|
c95ffdc4d6 | ||
|
|
e5d8d01105 | ||
|
|
bb9bf743d8 | ||
|
|
99d3e80d0c | ||
|
|
640c0f5d52 | ||
|
|
861e569422 | ||
|
|
d7eedb6079 | ||
|
|
0a1066eee7 | ||
|
|
0f9d8d61a2 | ||
|
|
a2c9ed0b59 | ||
|
|
ea91b3df17 | ||
|
|
f9d5fa37a3 | ||
|
|
fc6a02c2e2 | ||
|
|
362401a847 | ||
|
|
e495f8bcc9 | ||
|
|
934563656c | ||
|
|
6323cae373 | ||
|
|
55999a8bad | ||
|
|
0b3d49db32 | ||
|
|
b3cc5740ee | ||
|
|
e5ad7407a7 |
@@ -36,9 +36,18 @@ dotnet_naming_style.instance_field_style.capitalization = camel_case
|
|||||||
dotnet_naming_style.instance_field_style.required_prefix = _
|
dotnet_naming_style.instance_field_style.required_prefix = _
|
||||||
|
|
||||||
# Prefer "var" everywhere
|
# Prefer "var" everywhere
|
||||||
csharp_style_var_for_built_in_types = true:suggestion
|
csharp_style_var_for_built_in_types = true
|
||||||
csharp_style_var_when_type_is_apparent = true:suggestion
|
csharp_style_var_when_type_is_apparent = true
|
||||||
csharp_style_var_elsewhere = true:suggestion
|
csharp_style_var_elsewhere = true
|
||||||
|
# Prefer "out" variables to be declared inline
|
||||||
|
csharp_style_inlined_variable_declaration = true
|
||||||
|
|
||||||
|
# Using directive is unnecessary.
|
||||||
|
dotnet_diagnostic.IDE0005.severity = error
|
||||||
|
# Use var instead of explicit type
|
||||||
|
dotnet_diagnostic.IDE0007.severity = error
|
||||||
|
# Inline variable declaration
|
||||||
|
dotnet_diagnostic.IDE0018.severity = error
|
||||||
|
|
||||||
# Stylecop Rules
|
# Stylecop Rules
|
||||||
dotnet_diagnostic.SA0001.severity = none
|
dotnet_diagnostic.SA0001.severity = none
|
||||||
@@ -266,7 +275,7 @@ dotnet_diagnostic.CA5397.severity = suggestion
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
[*.{js,html,js,hbs,less,css}]
|
[*.{js,html,hbs,less,css,ts,tsx}]
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"paths": [
|
|
||||||
"frontend/src/**/*.js"
|
|
||||||
],
|
|
||||||
"ignored": [
|
|
||||||
"**/node_modules/**/*"
|
|
||||||
],
|
|
||||||
"port": 5004
|
|
||||||
}
|
|
||||||
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -3,8 +3,7 @@
|
|||||||
|
|
||||||
# Explicitly set bash scripts to have unix endings
|
# Explicitly set bash scripts to have unix endings
|
||||||
*.sh text eol=lf
|
*.sh text eol=lf
|
||||||
distribution/debian/* text eol=lf
|
distribution/osx/Readarr text eol=lf
|
||||||
macOS/Readarr text eol=lf
|
|
||||||
|
|
||||||
# Custom for Visual Studio
|
# Custom for Visual Studio
|
||||||
*.cs diff=csharp
|
*.cs diff=csharp
|
||||||
|
|||||||
9
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
9
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -1,5 +1,5 @@
|
|||||||
name: Bug Report
|
name: Bug Report
|
||||||
description: 'Report a new bug, if you are not 100% certain this is a bug please go to our Reddit or Discord first'
|
description: 'Report a new bug, if you are not 100% certain this is a bug please go to our Discord first'
|
||||||
labels: ['Type: Bug', 'Status: Needs Triage']
|
labels: ['Type: Bug', 'Status: Needs Triage']
|
||||||
body:
|
body:
|
||||||
- type: checkboxes
|
- type: checkboxes
|
||||||
@@ -73,3 +73,10 @@ body:
|
|||||||
Additionally, any additional info? Screenshots? References? Anything that will give us more context about the issue you are encountering!
|
Additionally, any additional info? Screenshots? References? Anything that will give us more context about the issue you are encountering!
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
- type: checkboxes
|
||||||
|
attributes:
|
||||||
|
label: Trace Logs have been provided as applicable. Reports may be closed if the required logs are not provided.
|
||||||
|
description: Trace logs are generally required for all bug reports and contain `trace`. Info logs are invalid for bug reports and do not contain `debug` nor `trace`
|
||||||
|
options:
|
||||||
|
- label: I have read and followed the steps in the wiki link above and provided the required trace logs - the logs contain `trace` - that are relevant and show this issue.
|
||||||
|
required: true
|
||||||
|
|||||||
3
.github/ISSUE_TEMPLATE/config.yml
vendored
3
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -3,6 +3,3 @@ contact_links:
|
|||||||
- name: Support via Discord
|
- name: Support via Discord
|
||||||
url: https://readarr.com/discord
|
url: https://readarr.com/discord
|
||||||
about: Chat with users and devs on support and setup related topics.
|
about: Chat with users and devs on support and setup related topics.
|
||||||
- name: Support via Reddit
|
|
||||||
url: https://reddit.com/r/Readarr
|
|
||||||
about: Discuss and search thru support topics.
|
|
||||||
|
|||||||
28
.github/labeler.yml
vendored
Normal file
28
.github/labeler.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
'Area: API':
|
||||||
|
- src/Readarr.Api.V1/**/*
|
||||||
|
|
||||||
|
'Area: Db-migration':
|
||||||
|
- src/NzbDrone.Core/Datastore/Migration/*
|
||||||
|
|
||||||
|
'Area: Download Clients':
|
||||||
|
- src/NzbDrone.Core/Download/Clients/**/*
|
||||||
|
|
||||||
|
'Area: Import Lists':
|
||||||
|
- src/NzbDrone.Core/ImportLists/**/*
|
||||||
|
|
||||||
|
'Area: Indexer':
|
||||||
|
- src/NzbDrone.Core/Indexers/**/*
|
||||||
|
|
||||||
|
'Area: Notifications':
|
||||||
|
- src/NzbDrone.Core/Notifications/**/*
|
||||||
|
|
||||||
|
'Area: Organizer':
|
||||||
|
- src/NzbDrone.Core/Organizer/**/*
|
||||||
|
|
||||||
|
'Area: Parser':
|
||||||
|
- src/NzbDrone.Core/Parser/**/*
|
||||||
|
|
||||||
|
'Area: UI':
|
||||||
|
- frontend/**/*
|
||||||
|
- package.json
|
||||||
|
- yarn.lock
|
||||||
12
.github/workflows/labeler.yml
vendored
Normal file
12
.github/workflows/labeler.yml
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
name: "Pull Request Labeler"
|
||||||
|
on:
|
||||||
|
- pull_request_target
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
triage:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/labeler@v4
|
||||||
12
.github/workflows/lock.yml
vendored
12
.github/workflows/lock.yml
vendored
@@ -9,13 +9,13 @@ jobs:
|
|||||||
lock:
|
lock:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: dessant/lock-threads@v2
|
- uses: dessant/lock-threads@v4
|
||||||
with:
|
with:
|
||||||
github-token: ${{ github.token }}
|
github-token: ${{ github.token }}
|
||||||
issue-lock-inactive-days: '90'
|
issue-inactive-days: '90'
|
||||||
issue-exclude-created-before: ''
|
exclude-issue-created-before: ''
|
||||||
issue-exclude-labels: ''
|
exclude-any-issue-labels: ''
|
||||||
issue-lock-labels: ''
|
add-issue-labels: ''
|
||||||
issue-lock-comment: ''
|
issue-comment: ''
|
||||||
issue-lock-reason: 'resolved'
|
issue-lock-reason: 'resolved'
|
||||||
process-only: ''
|
process-only: ''
|
||||||
|
|||||||
18
.github/workflows/support.yml
vendored
18
.github/workflows/support.yml
vendored
@@ -8,14 +8,24 @@ jobs:
|
|||||||
support:
|
support:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: dessant/support-requests@v2
|
- uses: dessant/support-requests@v3
|
||||||
with:
|
with:
|
||||||
github-token: ${{ github.token }}
|
github-token: ${{ github.token }}
|
||||||
support-label: 'Type: Support'
|
support-label: 'Type: Support'
|
||||||
issue-comment: >
|
issue-comment: >
|
||||||
:wave: @{issue-author}, we use the issue tracker exclusively
|
:wave: @{issue-author}, we use the issue tracker exclusively
|
||||||
for bug reports and feature requests. However, this issue appears
|
for bug reports and feature requests. However, this issue appears
|
||||||
to be a support request. Please hop over onto our [Discord](https://readarr.com/discord)
|
to be a support request. Please hop over onto our [Discord](https://readarr.com/discord).
|
||||||
or [Subreddit](https://reddit.com/r/readarr)
|
|
||||||
close-issue: true
|
close-issue: true
|
||||||
lock-issue: false
|
lock-issue: false
|
||||||
|
- uses: dessant/support-requests@v3
|
||||||
|
with:
|
||||||
|
github-token: ${{ github.token }}
|
||||||
|
support-label: 'Status: Logs Needed'
|
||||||
|
issue-comment: >
|
||||||
|
:wave: @{issue-author}, In order to help you further we'll need to see logs.
|
||||||
|
You'll need to enable trace logging and replicate the problem that you encountered.
|
||||||
|
Guidance on how to enable trace logging can be found in
|
||||||
|
our [troubleshooting guide](https://wiki.servarr.com/readarr/troubleshooting#logging-and-log-files).
|
||||||
|
close-issue: false
|
||||||
|
lock-issue: false
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -148,3 +148,6 @@ _temp_*/**/*
|
|||||||
## Merge any idea folder
|
## Merge any idea folder
|
||||||
*/**/.idea
|
*/**/.idea
|
||||||
*.iml
|
*.iml
|
||||||
|
|
||||||
|
# API doc generation
|
||||||
|
.config/
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ Note that only one type of a given book is supported. If you want both an audiob
|
|||||||
|
|
||||||
[](https://wiki.servarr.com/readarr)
|
[](https://wiki.servarr.com/readarr)
|
||||||
[](https://readarr.com/discord)
|
[](https://readarr.com/discord)
|
||||||
[](https://www.reddit.com/r/readarr)
|
|
||||||
|
|
||||||
Note: GitHub Issues are for Bugs and Feature Requests Only
|
Note: GitHub Issues are for Bugs and Feature Requests Only
|
||||||
|
|
||||||
|
|||||||
@@ -9,13 +9,14 @@ variables:
|
|||||||
testsFolder: './_tests'
|
testsFolder: './_tests'
|
||||||
yarnCacheFolder: $(Pipeline.Workspace)/.yarn
|
yarnCacheFolder: $(Pipeline.Workspace)/.yarn
|
||||||
nugetCacheFolder: $(Pipeline.Workspace)/.nuget/packages
|
nugetCacheFolder: $(Pipeline.Workspace)/.nuget/packages
|
||||||
majorVersion: '0.1.5'
|
majorVersion: '0.3.14'
|
||||||
minorVersion: $[counter('minorVersion', 1)]
|
minorVersion: $[counter('minorVersion', 1)]
|
||||||
readarrVersion: '$(majorVersion).$(minorVersion)'
|
readarrVersion: '$(majorVersion).$(minorVersion)'
|
||||||
buildName: '$(Build.SourceBranchName).$(readarrVersion)'
|
buildName: '$(Build.SourceBranchName).$(readarrVersion)'
|
||||||
sentryOrg: 'servarr'
|
sentryOrg: 'servarr'
|
||||||
sentryUrl: 'https://sentry.servarr.com'
|
sentryUrl: 'https://sentry.servarr.com'
|
||||||
dotnetVersion: '6.0.302'
|
dotnetVersion: '6.0.417'
|
||||||
|
nodeVersion: '16.X'
|
||||||
innoVersion: '6.2.0'
|
innoVersion: '6.2.0'
|
||||||
windowsImage: 'windows-2022'
|
windowsImage: 'windows-2022'
|
||||||
linuxImage: 'ubuntu-20.04'
|
linuxImage: 'ubuntu-20.04'
|
||||||
@@ -26,6 +27,10 @@ trigger:
|
|||||||
include:
|
include:
|
||||||
- develop
|
- develop
|
||||||
- master
|
- master
|
||||||
|
paths:
|
||||||
|
exclude:
|
||||||
|
- .github
|
||||||
|
- src/Readarr.Api.*/openapi.json
|
||||||
|
|
||||||
pr:
|
pr:
|
||||||
branches:
|
branches:
|
||||||
@@ -33,82 +38,37 @@ pr:
|
|||||||
- develop
|
- develop
|
||||||
paths:
|
paths:
|
||||||
exclude:
|
exclude:
|
||||||
|
- .github
|
||||||
- src/NzbDrone.Core/Localization/Core
|
- src/NzbDrone.Core/Localization/Core
|
||||||
|
- src/Readarr.Api.*/openapi.json
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
- stage: Setup
|
||||||
- stage: Build_Backend_Windows
|
displayName: Setup
|
||||||
displayName: Build Backend
|
|
||||||
dependsOn: []
|
|
||||||
jobs:
|
jobs:
|
||||||
- job: Backend
|
- job:
|
||||||
strategy:
|
displayName: Build Variables
|
||||||
matrix:
|
|
||||||
Windows:
|
|
||||||
osName: 'Windows'
|
|
||||||
imageName: ${{ variables.windowsImage }}
|
|
||||||
enableAnalysis: 'false'
|
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: $(imageName)
|
vmImage: ${{ variables.linuxImage }}
|
||||||
variables:
|
|
||||||
# Disable stylecop here - linting errors get caught by the analyze task
|
|
||||||
EnableAnalyzers: $(enableAnalysis)
|
|
||||||
steps:
|
steps:
|
||||||
# Set the build name properly. The 'name' property won't recursively expand so hack here:
|
# Set the build name properly. The 'name' property won't recursively expand so hack here:
|
||||||
- bash: echo "##vso[build.updatebuildnumber]$READARRVERSION"
|
- bash: echo "##vso[build.updatebuildnumber]$READARRVERSION"
|
||||||
displayName: Set Build Name
|
displayName: Set Build Name
|
||||||
- checkout: self
|
|
||||||
submodules: true
|
|
||||||
fetchDepth: 1
|
|
||||||
- task: UseDotNet@2
|
|
||||||
displayName: 'Install .net core'
|
|
||||||
inputs:
|
|
||||||
version: $(dotnetVersion)
|
|
||||||
- bash: |
|
- bash: |
|
||||||
SDK_PATH="${AGENT_TOOLSDIRECTORY}/dotnet/sdk/${DOTNETVERSION}"
|
if [[ $BUILD_REASON == "PullRequest" ]]; then
|
||||||
BUNDLEDVERSIONS="${SDK_PATH}/Microsoft.NETCoreSdk.BundledVersions.props"
|
git diff origin/develop...HEAD --name-only | grep -E "^(src/|azure-pipelines.yml)"
|
||||||
|
echo $? > not_backend_update
|
||||||
if ! grep -q freebsd-x64 $BUNDLEDVERSIONS; then
|
else
|
||||||
sed -i.ORI 's/osx-x64/osx-x64;freebsd-x64;linux-x86/' $BUNDLEDVERSIONS
|
echo 0 > not_backend_update
|
||||||
fi
|
fi
|
||||||
displayName: Extra Platform Support
|
cat not_backend_update
|
||||||
- task: Cache@2
|
displayName: Check for Backend File Changes
|
||||||
inputs:
|
- publish: not_backend_update
|
||||||
key: 'nuget | "$(Agent.OS)" | $(Build.SourcesDirectory)/src/Directory.Packages.props'
|
artifact: not_backend_update
|
||||||
path: $(nugetCacheFolder)
|
displayName: Publish update type
|
||||||
displayName: Cache NuGet packages
|
- stage: Build_Backend
|
||||||
- bash: ./build.sh --backend --enable-bsd
|
displayName: Build Backend
|
||||||
displayName: Build Readarr Backend
|
dependsOn: Setup
|
||||||
env:
|
|
||||||
NUGET_PACKAGES: $(nugetCacheFolder)
|
|
||||||
- powershell: Get-ChildItem _output\net6.0*,_output\*.Update\* -Recurse | Where { $_.Fullname -notlike "*\publish\*" -and $_.attributes -notlike "*directory*" } | Remove-Item
|
|
||||||
displayName: Clean up intermediate output
|
|
||||||
- publish: $(outputFolder)
|
|
||||||
artifact: '$(osName)Backend'
|
|
||||||
displayName: Publish Backend
|
|
||||||
- publish: '$(testsFolder)/net6.0/win-x64/publish'
|
|
||||||
artifact: win-x64-tests
|
|
||||||
displayName: Publish win-x64 Test Package
|
|
||||||
- publish: '$(testsFolder)/net6.0/linux-x64/publish'
|
|
||||||
artifact: linux-x64-tests
|
|
||||||
displayName: Publish linux-x64 Test Package
|
|
||||||
- publish: '$(testsFolder)/net6.0/linux-x86/publish'
|
|
||||||
artifact: linux-x86-tests
|
|
||||||
displayName: Publish linux-x86 Test Package
|
|
||||||
- publish: '$(testsFolder)/net6.0/linux-musl-x64/publish'
|
|
||||||
artifact: linux-musl-x64-tests
|
|
||||||
displayName: Publish linux-musl-x64 Test Package
|
|
||||||
- publish: '$(testsFolder)/net6.0/freebsd-x64/publish'
|
|
||||||
artifact: freebsd-x64-tests
|
|
||||||
displayName: Publish freebsd-x64 Test Package
|
|
||||||
- publish: '$(testsFolder)/net6.0/osx-x64/publish'
|
|
||||||
artifact: osx-x64-tests
|
|
||||||
displayName: Publish osx-x64 Test Package
|
|
||||||
|
|
||||||
- stage: Build_Backend_Other
|
|
||||||
displayName: Build Backend (Other OS)
|
|
||||||
dependsOn: []
|
|
||||||
jobs:
|
jobs:
|
||||||
- job: Backend
|
- job: Backend
|
||||||
strategy:
|
strategy:
|
||||||
@@ -121,6 +81,10 @@ stages:
|
|||||||
osName: 'Mac'
|
osName: 'Mac'
|
||||||
imageName: ${{ variables.macImage }}
|
imageName: ${{ variables.macImage }}
|
||||||
enableAnalysis: 'false'
|
enableAnalysis: 'false'
|
||||||
|
Windows:
|
||||||
|
osName: 'Windows'
|
||||||
|
imageName: ${{ variables.windowsImage }}
|
||||||
|
enableAnalysis: 'false'
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: $(imageName)
|
vmImage: $(imageName)
|
||||||
@@ -136,22 +100,17 @@ stages:
|
|||||||
inputs:
|
inputs:
|
||||||
version: $(dotnetVersion)
|
version: $(dotnetVersion)
|
||||||
- bash: |
|
- bash: |
|
||||||
SDK_PATH="${AGENT_TOOLSDIRECTORY}/dotnet/sdk/${DOTNETVERSION}"
|
BUNDLEDVERSIONS=${AGENT_TOOLSDIRECTORY}/dotnet/sdk/${DOTNETVERSION}/Microsoft.NETCoreSdk.BundledVersions.props
|
||||||
BUNDLEDVERSIONS="${SDK_PATH}/Microsoft.NETCoreSdk.BundledVersions.props"
|
echo $BUNDLEDVERSIONS
|
||||||
|
if grep -q freebsd-x64 $BUNDLEDVERSIONS; then
|
||||||
if ! grep -q freebsd-x64 $BUNDLEDVERSIONS; then
|
echo "Extra platforms already enabled"
|
||||||
|
else
|
||||||
|
echo "Enabling extra platform support"
|
||||||
sed -i.ORI 's/osx-x64/osx-x64;freebsd-x64;linux-x86/' $BUNDLEDVERSIONS
|
sed -i.ORI 's/osx-x64/osx-x64;freebsd-x64;linux-x86/' $BUNDLEDVERSIONS
|
||||||
fi
|
fi
|
||||||
displayName: Extra Platform Support
|
displayName: Enable Extra Platform Support
|
||||||
- task: Cache@2
|
|
||||||
inputs:
|
|
||||||
key: 'nuget | "$(Agent.OS)" | $(Build.SourcesDirectory)/src/Directory.Packages.props'
|
|
||||||
path: $(nugetCacheFolder)
|
|
||||||
displayName: Cache NuGet packages
|
|
||||||
- bash: ./build.sh --backend --enable-extra-platforms
|
- bash: ./build.sh --backend --enable-extra-platforms
|
||||||
displayName: Build Readarr Backend
|
displayName: Build Readarr Backend
|
||||||
env:
|
|
||||||
NUGET_PACKAGES: $(nugetCacheFolder)
|
|
||||||
- bash: |
|
- bash: |
|
||||||
find ${OUTPUTFOLDER} -type f ! -path "*/publish/*" -exec rm -rf {} \;
|
find ${OUTPUTFOLDER} -type f ! -path "*/publish/*" -exec rm -rf {} \;
|
||||||
find ${OUTPUTFOLDER} -depth -empty -type d -exec rm -r "{}" \;
|
find ${OUTPUTFOLDER} -depth -empty -type d -exec rm -r "{}" \;
|
||||||
@@ -159,10 +118,38 @@ stages:
|
|||||||
find ${TESTSFOLDER} -depth -empty -type d -exec rm -r "{}" \;
|
find ${TESTSFOLDER} -depth -empty -type d -exec rm -r "{}" \;
|
||||||
displayName: Clean up intermediate output
|
displayName: Clean up intermediate output
|
||||||
condition: and(succeeded(), ne(variables['osName'], 'Windows'))
|
condition: and(succeeded(), ne(variables['osName'], 'Windows'))
|
||||||
|
- publish: $(outputFolder)
|
||||||
|
artifact: '$(osName)Backend'
|
||||||
|
displayName: Publish Backend
|
||||||
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
|
- publish: '$(testsFolder)/net6.0/win-x64/publish'
|
||||||
|
artifact: win-x64-tests
|
||||||
|
displayName: Publish win-x64 Test Package
|
||||||
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
|
- publish: '$(testsFolder)/net6.0/linux-x64/publish'
|
||||||
|
artifact: linux-x64-tests
|
||||||
|
displayName: Publish linux-x64 Test Package
|
||||||
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
|
- publish: '$(testsFolder)/net6.0/linux-x86/publish'
|
||||||
|
artifact: linux-x86-tests
|
||||||
|
displayName: Publish linux-x86 Test Package
|
||||||
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
|
- publish: '$(testsFolder)/net6.0/linux-musl-x64/publish'
|
||||||
|
artifact: linux-musl-x64-tests
|
||||||
|
displayName: Publish linux-musl-x64 Test Package
|
||||||
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
|
- publish: '$(testsFolder)/net6.0/freebsd-x64/publish'
|
||||||
|
artifact: freebsd-x64-tests
|
||||||
|
displayName: Publish freebsd-x64 Test Package
|
||||||
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
|
- publish: '$(testsFolder)/net6.0/osx-x64/publish'
|
||||||
|
artifact: osx-x64-tests
|
||||||
|
displayName: Publish osx-x64 Test Package
|
||||||
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
|
|
||||||
- stage: Build_Frontend
|
- stage: Build_Frontend
|
||||||
displayName: Frontend
|
displayName: Frontend
|
||||||
dependsOn: []
|
dependsOn: Setup
|
||||||
jobs:
|
jobs:
|
||||||
- job: Build
|
- job: Build
|
||||||
strategy:
|
strategy:
|
||||||
@@ -182,7 +169,7 @@ stages:
|
|||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
displayName: Set Node.js version
|
displayName: Set Node.js version
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: '12.x'
|
versionSpec: $(nodeVersion)
|
||||||
- checkout: self
|
- checkout: self
|
||||||
submodules: true
|
submodules: true
|
||||||
fetchDepth: 1
|
fetchDepth: 1
|
||||||
@@ -191,7 +178,6 @@ stages:
|
|||||||
key: 'yarn | "$(osName)" | yarn.lock'
|
key: 'yarn | "$(osName)" | yarn.lock'
|
||||||
restoreKeys: |
|
restoreKeys: |
|
||||||
yarn | "$(osName)"
|
yarn | "$(osName)"
|
||||||
yarn
|
|
||||||
path: $(yarnCacheFolder)
|
path: $(yarnCacheFolder)
|
||||||
displayName: Cache Yarn packages
|
displayName: Cache Yarn packages
|
||||||
- bash: ./build.sh --frontend
|
- bash: ./build.sh --frontend
|
||||||
@@ -203,10 +189,10 @@ stages:
|
|||||||
artifact: '$(osName)Frontend'
|
artifact: '$(osName)Frontend'
|
||||||
displayName: Publish Frontend
|
displayName: Publish Frontend
|
||||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
|
|
||||||
- stage: Installer
|
- stage: Installer
|
||||||
dependsOn:
|
dependsOn:
|
||||||
- Build_Backend_Windows
|
- Build_Backend
|
||||||
- Build_Frontend
|
- Build_Frontend
|
||||||
jobs:
|
jobs:
|
||||||
- job: Windows_Installer
|
- job: Windows_Installer
|
||||||
@@ -230,8 +216,8 @@ stages:
|
|||||||
displayName: Fetch Frontend
|
displayName: Fetch Frontend
|
||||||
- bash: |
|
- bash: |
|
||||||
./build.sh --packages --installer
|
./build.sh --packages --installer
|
||||||
cp setup/output/Readarr.*win-x64.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Readarr.${BUILDNAME}.windows-core-x64-installer.exe
|
cp distribution/windows/setup/output/Readarr.*win-x64.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Readarr.${BUILDNAME}.windows-core-x64-installer.exe
|
||||||
cp setup/output/Readarr.*win-x86.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Readarr.${BUILDNAME}.windows-core-x86-installer.exe
|
cp distribution/windows/setup/output/Readarr.*win-x86.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Readarr.${BUILDNAME}.windows-core-x86-installer.exe
|
||||||
displayName: Create Installers
|
displayName: Create Installers
|
||||||
- publish: $(Build.ArtifactStagingDirectory)
|
- publish: $(Build.ArtifactStagingDirectory)
|
||||||
artifact: 'WindowsInstaller'
|
artifact: 'WindowsInstaller'
|
||||||
@@ -239,7 +225,7 @@ stages:
|
|||||||
|
|
||||||
- stage: Packages
|
- stage: Packages
|
||||||
dependsOn:
|
dependsOn:
|
||||||
- Build_Backend_Windows
|
- Build_Backend
|
||||||
- Build_Frontend
|
- Build_Frontend
|
||||||
jobs:
|
jobs:
|
||||||
- job: Other_Packages
|
- job: Other_Packages
|
||||||
@@ -381,7 +367,7 @@ stages:
|
|||||||
- bash: |
|
- bash: |
|
||||||
echo "Uploading source maps to sentry"
|
echo "Uploading source maps to sentry"
|
||||||
curl -sL https://sentry.io/get-cli/ | bash
|
curl -sL https://sentry.io/get-cli/ | bash
|
||||||
RELEASENAME="${READARRVERSION}-${BUILD_SOURCEBRANCHNAME}"
|
RELEASENAME="Readarr@${READARRVERSION}-${BUILD_SOURCEBRANCHNAME}"
|
||||||
sentry-cli releases new --finalize -p readarr -p readarr-ui -p readarr-update "${RELEASENAME}"
|
sentry-cli releases new --finalize -p readarr -p readarr-ui -p readarr-update "${RELEASENAME}"
|
||||||
sentry-cli releases -p readarr-ui files "${RELEASENAME}" upload-sourcemaps _output/UI/ --rewrite
|
sentry-cli releases -p readarr-ui files "${RELEASENAME}" upload-sourcemaps _output/UI/ --rewrite
|
||||||
sentry-cli releases set-commits --auto "${RELEASENAME}"
|
sentry-cli releases set-commits --auto "${RELEASENAME}"
|
||||||
@@ -405,14 +391,29 @@ stages:
|
|||||||
SENTRY_AUTH_TOKEN: $(sentryAuthTokenServarr)
|
SENTRY_AUTH_TOKEN: $(sentryAuthTokenServarr)
|
||||||
SENTRY_ORG: $(sentryOrg)
|
SENTRY_ORG: $(sentryOrg)
|
||||||
SENTRY_URL: $(sentryUrl)
|
SENTRY_URL: $(sentryUrl)
|
||||||
|
|
||||||
- stage: Unit_Test
|
- stage: Unit_Test
|
||||||
displayName: Unit Tests
|
displayName: Unit Tests
|
||||||
dependsOn: Build_Backend_Windows
|
dependsOn: Build_Backend
|
||||||
condition: succeeded()
|
|
||||||
jobs:
|
jobs:
|
||||||
|
- job: Prepare
|
||||||
|
pool:
|
||||||
|
vmImage: ${{ variables.linuxImage }}
|
||||||
|
steps:
|
||||||
|
- checkout: none
|
||||||
|
- task: DownloadPipelineArtifact@2
|
||||||
|
inputs:
|
||||||
|
buildType: 'current'
|
||||||
|
artifactName: 'not_backend_update'
|
||||||
|
targetPath: '.'
|
||||||
|
- bash: echo "##vso[task.setvariable variable=backendNotUpdated;isOutput=true]$(cat not_backend_update)"
|
||||||
|
name: setVar
|
||||||
|
|
||||||
- job: Unit
|
- job: Unit
|
||||||
displayName: Unit Native
|
displayName: Unit Native
|
||||||
|
dependsOn: Prepare
|
||||||
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
||||||
workspace:
|
workspace:
|
||||||
clean: all
|
clean: all
|
||||||
|
|
||||||
@@ -478,6 +479,8 @@ stages:
|
|||||||
|
|
||||||
- job: Unit_Docker
|
- job: Unit_Docker
|
||||||
displayName: Unit Docker
|
displayName: Unit Docker
|
||||||
|
dependsOn: Prepare
|
||||||
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
alpine:
|
alpine:
|
||||||
@@ -491,11 +494,11 @@ stages:
|
|||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: ${{ variables.linuxImage }}
|
vmImage: ${{ variables.linuxImage }}
|
||||||
|
|
||||||
container: $[ variables['containerImage'] ]
|
container: $[ variables['containerImage'] ]
|
||||||
|
|
||||||
timeoutInMinutes: 10
|
timeoutInMinutes: 10
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: UseDotNet@2
|
- task: UseDotNet@2
|
||||||
displayName: 'Install .NET'
|
displayName: 'Install .NET'
|
||||||
@@ -529,12 +532,14 @@ stages:
|
|||||||
testResultsFiles: '**/TestResult.xml'
|
testResultsFiles: '**/TestResult.xml'
|
||||||
testRunTitle: '$(testName) Unit Tests'
|
testRunTitle: '$(testName) Unit Tests'
|
||||||
failTaskOnFailedTests: true
|
failTaskOnFailedTests: true
|
||||||
|
|
||||||
- job: Unit_LinuxCore_Postgres
|
- job: Unit_LinuxCore_Postgres14
|
||||||
displayName: Unit Native LinuxCore with Postgres Database
|
displayName: Unit Native LinuxCore with Postgres14 Database
|
||||||
|
dependsOn: Prepare
|
||||||
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
||||||
variables:
|
variables:
|
||||||
pattern: 'Readarr.*.linux-core-x64.tar.gz'
|
pattern: 'Readarr.*.linux-core-x64.tar.gz'
|
||||||
artifactName: LinuxCoreTests
|
artifactName: linux-x64-tests
|
||||||
Readarr__Postgres__Host: 'localhost'
|
Readarr__Postgres__Host: 'localhost'
|
||||||
Readarr__Postgres__Port: '5432'
|
Readarr__Postgres__Port: '5432'
|
||||||
Readarr__Postgres__User: 'readarr'
|
Readarr__Postgres__User: 'readarr'
|
||||||
@@ -544,7 +549,7 @@ stages:
|
|||||||
vmImage: ${{ variables.linuxImage }}
|
vmImage: ${{ variables.linuxImage }}
|
||||||
|
|
||||||
timeoutInMinutes: 10
|
timeoutInMinutes: 10
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: UseDotNet@2
|
- task: UseDotNet@2
|
||||||
displayName: 'Install .net core'
|
displayName: 'Install .net core'
|
||||||
@@ -555,7 +560,7 @@ stages:
|
|||||||
displayName: Download Test Artifact
|
displayName: Download Test Artifact
|
||||||
inputs:
|
inputs:
|
||||||
buildType: 'current'
|
buildType: 'current'
|
||||||
artifactName: 'linux-x64-Tests'
|
artifactName: $(artifactName)
|
||||||
targetPath: $(testsFolder)
|
targetPath: $(testsFolder)
|
||||||
- bash: find ${TESTSFOLDER} -name "Readarr.Test.Dummy" -exec chmod a+x {} \;
|
- bash: find ${TESTSFOLDER} -name "Readarr.Test.Dummy" -exec chmod a+x {} \;
|
||||||
displayName: Make Test Dummy Executable
|
displayName: Make Test Dummy Executable
|
||||||
@@ -578,15 +583,84 @@ stages:
|
|||||||
inputs:
|
inputs:
|
||||||
testResultsFormat: 'NUnit'
|
testResultsFormat: 'NUnit'
|
||||||
testResultsFiles: '**/TestResult.xml'
|
testResultsFiles: '**/TestResult.xml'
|
||||||
testRunTitle: 'LinuxCore Postgres Unit Tests'
|
testRunTitle: 'LinuxCore Postgres14 Unit Tests'
|
||||||
|
failTaskOnFailedTests: true
|
||||||
|
|
||||||
|
- job: Unit_LinuxCore_Postgres15
|
||||||
|
displayName: Unit Native LinuxCore with Postgres15 Database
|
||||||
|
dependsOn: Prepare
|
||||||
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
||||||
|
variables:
|
||||||
|
pattern: 'Readarr.*.linux-core-x64.tar.gz'
|
||||||
|
artifactName: linux-x64-tests
|
||||||
|
Readarr__Postgres__Host: 'localhost'
|
||||||
|
Readarr__Postgres__Port: '5432'
|
||||||
|
Readarr__Postgres__User: 'readarr'
|
||||||
|
Readarr__Postgres__Password: 'readarr'
|
||||||
|
|
||||||
|
pool:
|
||||||
|
vmImage: ${{ variables.linuxImage }}
|
||||||
|
|
||||||
|
timeoutInMinutes: 10
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- task: UseDotNet@2
|
||||||
|
displayName: 'Install .net core'
|
||||||
|
inputs:
|
||||||
|
version: $(dotnetVersion)
|
||||||
|
- checkout: none
|
||||||
|
- task: DownloadPipelineArtifact@2
|
||||||
|
displayName: Download Test Artifact
|
||||||
|
inputs:
|
||||||
|
buildType: 'current'
|
||||||
|
artifactName: $(artifactName)
|
||||||
|
targetPath: $(testsFolder)
|
||||||
|
- bash: find ${TESTSFOLDER} -name "Readarr.Test.Dummy" -exec chmod a+x {} \;
|
||||||
|
displayName: Make Test Dummy Executable
|
||||||
|
condition: and(succeeded(), ne(variables['osName'], 'Windows'))
|
||||||
|
- bash: |
|
||||||
|
docker run -d --name=postgres15 \
|
||||||
|
-e POSTGRES_PASSWORD=readarr \
|
||||||
|
-e POSTGRES_USER=readarr \
|
||||||
|
-p 5432:5432/tcp \
|
||||||
|
-v /usr/share/zoneinfo/America/Chicago:/etc/localtime:ro \
|
||||||
|
postgres:15
|
||||||
|
displayName: Start postgres
|
||||||
|
- bash: |
|
||||||
|
chmod a+x ${TESTSFOLDER}/test.sh
|
||||||
|
ls -lR ${TESTSFOLDER}
|
||||||
|
${TESTSFOLDER}/test.sh Linux Unit Test
|
||||||
|
displayName: Run Tests
|
||||||
|
- task: PublishTestResults@2
|
||||||
|
displayName: Publish Test Results
|
||||||
|
inputs:
|
||||||
|
testResultsFormat: 'NUnit'
|
||||||
|
testResultsFiles: '**/TestResult.xml'
|
||||||
|
testRunTitle: 'LinuxCore Postgres15 Unit Tests'
|
||||||
failTaskOnFailedTests: true
|
failTaskOnFailedTests: true
|
||||||
|
|
||||||
- stage: Integration
|
- stage: Integration
|
||||||
displayName: Integration
|
displayName: Integration
|
||||||
dependsOn: Packages
|
dependsOn: Packages
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
- job: Prepare
|
||||||
|
pool:
|
||||||
|
vmImage: ${{ variables.linuxImage }}
|
||||||
|
steps:
|
||||||
|
- checkout: none
|
||||||
|
- task: DownloadPipelineArtifact@2
|
||||||
|
inputs:
|
||||||
|
buildType: 'current'
|
||||||
|
artifactName: 'not_backend_update'
|
||||||
|
targetPath: '.'
|
||||||
|
- bash: echo "##vso[task.setvariable variable=backendNotUpdated;isOutput=true]$(cat not_backend_update)"
|
||||||
|
name: setVar
|
||||||
|
|
||||||
- job: Integration_Native
|
- job: Integration_Native
|
||||||
displayName: Integration Native
|
displayName: Integration Native
|
||||||
|
dependsOn: Prepare
|
||||||
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
MacCore:
|
MacCore:
|
||||||
@@ -607,7 +681,7 @@ stages:
|
|||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: $(imageName)
|
vmImage: $(imageName)
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: UseDotNet@2
|
- task: UseDotNet@2
|
||||||
displayName: 'Install .net core'
|
displayName: 'Install .net core'
|
||||||
@@ -629,7 +703,7 @@ stages:
|
|||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
targetPath: $(Build.ArtifactStagingDirectory)
|
||||||
- task: ExtractFiles@1
|
- task: ExtractFiles@1
|
||||||
inputs:
|
inputs:
|
||||||
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
||||||
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
||||||
displayName: Extract Package
|
displayName: Extract Package
|
||||||
- bash: |
|
- bash: |
|
||||||
@@ -648,8 +722,10 @@ stages:
|
|||||||
failTaskOnFailedTests: true
|
failTaskOnFailedTests: true
|
||||||
displayName: Publish Test Results
|
displayName: Publish Test Results
|
||||||
|
|
||||||
- job: Integration_LinuxCore_Postgres
|
- job: Integration_LinuxCore_Postgres14
|
||||||
displayName: Integration Native LinuxCore with Postgres Database
|
displayName: Integration Native LinuxCore with Postgres14 Database
|
||||||
|
dependsOn: Prepare
|
||||||
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
||||||
variables:
|
variables:
|
||||||
pattern: 'Readarr.*.linux-core-x64.tar.gz'
|
pattern: 'Readarr.*.linux-core-x64.tar.gz'
|
||||||
Readarr__Postgres__Host: 'localhost'
|
Readarr__Postgres__Host: 'localhost'
|
||||||
@@ -681,7 +757,7 @@ stages:
|
|||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
targetPath: $(Build.ArtifactStagingDirectory)
|
||||||
- task: ExtractFiles@1
|
- task: ExtractFiles@1
|
||||||
inputs:
|
inputs:
|
||||||
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
||||||
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
||||||
displayName: Extract Package
|
displayName: Extract Package
|
||||||
- bash: |
|
- bash: |
|
||||||
@@ -704,12 +780,77 @@ stages:
|
|||||||
inputs:
|
inputs:
|
||||||
testResultsFormat: 'NUnit'
|
testResultsFormat: 'NUnit'
|
||||||
testResultsFiles: '**/TestResult.xml'
|
testResultsFiles: '**/TestResult.xml'
|
||||||
testRunTitle: 'Integration LinuxCore Postgres Database Integration Tests'
|
testRunTitle: 'Integration LinuxCore Postgres14 Database Integration Tests'
|
||||||
|
failTaskOnFailedTests: true
|
||||||
|
displayName: Publish Test Results
|
||||||
|
|
||||||
|
|
||||||
|
- job: Integration_LinuxCore_Postgres15
|
||||||
|
displayName: Integration Native LinuxCore with Postgres Database
|
||||||
|
dependsOn: Prepare
|
||||||
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
||||||
|
variables:
|
||||||
|
pattern: 'Readarr.*.linux-core-x64.tar.gz'
|
||||||
|
Readarr__Postgres__Host: 'localhost'
|
||||||
|
Readarr__Postgres__Port: '5432'
|
||||||
|
Readarr__Postgres__User: 'readarr'
|
||||||
|
Readarr__Postgres__Password: 'readarr'
|
||||||
|
|
||||||
|
pool:
|
||||||
|
vmImage: ${{ variables.linuxImage }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- task: UseDotNet@2
|
||||||
|
displayName: 'Install .net core'
|
||||||
|
inputs:
|
||||||
|
version: $(dotnetVersion)
|
||||||
|
- checkout: none
|
||||||
|
- task: DownloadPipelineArtifact@2
|
||||||
|
displayName: Download Test Artifact
|
||||||
|
inputs:
|
||||||
|
buildType: 'current'
|
||||||
|
artifactName: 'linux-x64-tests'
|
||||||
|
targetPath: $(testsFolder)
|
||||||
|
- task: DownloadPipelineArtifact@2
|
||||||
|
displayName: Download Build Artifact
|
||||||
|
inputs:
|
||||||
|
buildType: 'current'
|
||||||
|
artifactName: Packages
|
||||||
|
itemPattern: '**/$(pattern)'
|
||||||
|
targetPath: $(Build.ArtifactStagingDirectory)
|
||||||
|
- task: ExtractFiles@1
|
||||||
|
inputs:
|
||||||
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
||||||
|
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
||||||
|
displayName: Extract Package
|
||||||
|
- bash: |
|
||||||
|
mkdir -p ./bin/
|
||||||
|
cp -r -v ${BUILD_ARTIFACTSTAGINGDIRECTORY}/bin/Readarr/. ./bin/
|
||||||
|
displayName: Move Package Contents
|
||||||
|
- bash: |
|
||||||
|
docker run -d --name=postgres15 \
|
||||||
|
-e POSTGRES_PASSWORD=readarr \
|
||||||
|
-e POSTGRES_USER=readarr \
|
||||||
|
-p 5432:5432/tcp \
|
||||||
|
-v /usr/share/zoneinfo/America/Chicago:/etc/localtime:ro \
|
||||||
|
postgres:15
|
||||||
|
displayName: Start postgres
|
||||||
|
- bash: |
|
||||||
|
chmod a+x ${TESTSFOLDER}/test.sh
|
||||||
|
${TESTSFOLDER}/test.sh Linux Integration Test
|
||||||
|
displayName: Run Integration Tests
|
||||||
|
- task: PublishTestResults@2
|
||||||
|
inputs:
|
||||||
|
testResultsFormat: 'NUnit'
|
||||||
|
testResultsFiles: '**/TestResult.xml'
|
||||||
|
testRunTitle: 'Integration LinuxCore Postgres15 Database Integration Tests'
|
||||||
failTaskOnFailedTests: true
|
failTaskOnFailedTests: true
|
||||||
displayName: Publish Test Results
|
displayName: Publish Test Results
|
||||||
|
|
||||||
- job: Integration_FreeBSD
|
- job: Integration_FreeBSD
|
||||||
displayName: Integration Native FreeBSD
|
displayName: Integration Native FreeBSD
|
||||||
|
dependsOn: Prepare
|
||||||
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
||||||
workspace:
|
workspace:
|
||||||
clean: all
|
clean: all
|
||||||
variables:
|
variables:
|
||||||
@@ -754,6 +895,8 @@ stages:
|
|||||||
|
|
||||||
- job: Integration_Docker
|
- job: Integration_Docker
|
||||||
displayName: Integration Docker
|
displayName: Integration Docker
|
||||||
|
dependsOn: Prepare
|
||||||
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
alpine:
|
alpine:
|
||||||
@@ -772,7 +915,7 @@ stages:
|
|||||||
container: $[ variables['containerImage'] ]
|
container: $[ variables['containerImage'] ]
|
||||||
|
|
||||||
timeoutInMinutes: 15
|
timeoutInMinutes: 15
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: UseDotNet@2
|
- task: UseDotNet@2
|
||||||
displayName: 'Install .NET'
|
displayName: 'Install .NET'
|
||||||
@@ -800,7 +943,7 @@ stages:
|
|||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
targetPath: $(Build.ArtifactStagingDirectory)
|
||||||
- task: ExtractFiles@1
|
- task: ExtractFiles@1
|
||||||
inputs:
|
inputs:
|
||||||
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
||||||
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
||||||
displayName: Extract Package
|
displayName: Extract Package
|
||||||
- bash: |
|
- bash: |
|
||||||
@@ -822,7 +965,7 @@ stages:
|
|||||||
- stage: Automation
|
- stage: Automation
|
||||||
displayName: Automation
|
displayName: Automation
|
||||||
dependsOn: Packages
|
dependsOn: Packages
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- job: Automation
|
- job: Automation
|
||||||
strategy:
|
strategy:
|
||||||
@@ -832,20 +975,23 @@ stages:
|
|||||||
artifactName: 'linux-x64'
|
artifactName: 'linux-x64'
|
||||||
imageName: ${{ variables.linuxImage }}
|
imageName: ${{ variables.linuxImage }}
|
||||||
pattern: 'Readarr.*.linux-core-x64.tar.gz'
|
pattern: 'Readarr.*.linux-core-x64.tar.gz'
|
||||||
|
failBuild: true
|
||||||
Mac:
|
Mac:
|
||||||
osName: 'Mac'
|
osName: 'Mac'
|
||||||
artifactName: 'osx-x64'
|
artifactName: 'osx-x64'
|
||||||
imageName: ${{ variables.macImage }}
|
imageName: ${{ variables.macImage }}
|
||||||
pattern: 'Readarr.*.osx-core-x64.tar.gz'
|
pattern: 'Readarr.*.osx-core-x64.tar.gz'
|
||||||
|
failBuild: true
|
||||||
Windows:
|
Windows:
|
||||||
osName: 'Windows'
|
osName: 'Windows'
|
||||||
artifactName: 'win-x64'
|
artifactName: 'win-x64'
|
||||||
imageName: ${{ variables.windowsImage }}
|
imageName: ${{ variables.windowsImage }}
|
||||||
pattern: 'Readarr.*.windows-core-x64.zip'
|
pattern: 'Readarr.*.windows-core-x64.zip'
|
||||||
|
failBuild: true
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: $(imageName)
|
vmImage: $(imageName)
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: UseDotNet@2
|
- task: UseDotNet@2
|
||||||
displayName: 'Install .net core'
|
displayName: 'Install .net core'
|
||||||
@@ -867,7 +1013,7 @@ stages:
|
|||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
targetPath: $(Build.ArtifactStagingDirectory)
|
||||||
- task: ExtractFiles@1
|
- task: ExtractFiles@1
|
||||||
inputs:
|
inputs:
|
||||||
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
||||||
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
||||||
displayName: Extract Package
|
displayName: Extract Package
|
||||||
- bash: |
|
- bash: |
|
||||||
@@ -887,20 +1033,35 @@ stages:
|
|||||||
TargetFolder: '$(Build.ArtifactStagingDirectory)/screenshots'
|
TargetFolder: '$(Build.ArtifactStagingDirectory)/screenshots'
|
||||||
- publish: $(Build.ArtifactStagingDirectory)/screenshots
|
- publish: $(Build.ArtifactStagingDirectory)/screenshots
|
||||||
artifact: '$(osName)AutomationScreenshots'
|
artifact: '$(osName)AutomationScreenshots'
|
||||||
condition: and(succeeded(), eq(variables['System.JobAttempt'], '1'))
|
|
||||||
displayName: Publish Screenshot Bundle
|
displayName: Publish Screenshot Bundle
|
||||||
|
condition: and(succeeded(), eq(variables['System.JobAttempt'], '1'))
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
inputs:
|
inputs:
|
||||||
testResultsFormat: 'NUnit'
|
testResultsFormat: 'NUnit'
|
||||||
testResultsFiles: '**/TestResult.xml'
|
testResultsFiles: '**/TestResult.xml'
|
||||||
testRunTitle: '$(osName) Automation Tests'
|
testRunTitle: '$(osName) Automation Tests'
|
||||||
failTaskOnFailedTests: true
|
failTaskOnFailedTests: $(failBuild)
|
||||||
displayName: Publish Test Results
|
displayName: Publish Test Results
|
||||||
|
|
||||||
- stage: Analyze
|
- stage: Analyze
|
||||||
dependsOn: []
|
dependsOn:
|
||||||
|
- Setup
|
||||||
displayName: Analyze
|
displayName: Analyze
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
- job: Prepare
|
||||||
|
pool:
|
||||||
|
vmImage: ${{ variables.linuxImage }}
|
||||||
|
steps:
|
||||||
|
- checkout: none
|
||||||
|
- task: DownloadPipelineArtifact@2
|
||||||
|
inputs:
|
||||||
|
buildType: 'current'
|
||||||
|
artifactName: 'not_backend_update'
|
||||||
|
targetPath: '.'
|
||||||
|
- bash: echo "##vso[task.setvariable variable=backendNotUpdated;isOutput=true]$(cat not_backend_update)"
|
||||||
|
name: setVar
|
||||||
|
|
||||||
- job: Lint_Frontend
|
- job: Lint_Frontend
|
||||||
displayName: Lint Frontend
|
displayName: Lint Frontend
|
||||||
strategy:
|
strategy:
|
||||||
@@ -917,7 +1078,7 @@ stages:
|
|||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
displayName: Set Node.js version
|
displayName: Set Node.js version
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: '12.x'
|
versionSpec: $(nodeVersion)
|
||||||
- checkout: self
|
- checkout: self
|
||||||
submodules: true
|
submodules: true
|
||||||
fetchDepth: 1
|
fetchDepth: 1
|
||||||
@@ -926,7 +1087,6 @@ stages:
|
|||||||
key: 'yarn | "$(osName)" | yarn.lock'
|
key: 'yarn | "$(osName)" | yarn.lock'
|
||||||
restoreKeys: |
|
restoreKeys: |
|
||||||
yarn | "$(osName)"
|
yarn | "$(osName)"
|
||||||
yarn
|
|
||||||
path: $(yarnCacheFolder)
|
path: $(yarnCacheFolder)
|
||||||
displayName: Cache Yarn packages
|
displayName: Cache Yarn packages
|
||||||
- bash: ./build.sh --lint
|
- bash: ./build.sh --lint
|
||||||
@@ -956,35 +1116,80 @@ stages:
|
|||||||
cliSources: './frontend'
|
cliSources: './frontend'
|
||||||
- task: SonarCloudAnalyze@1
|
- task: SonarCloudAnalyze@1
|
||||||
|
|
||||||
- job: Analyze_Backend
|
- job: Api_Docs
|
||||||
displayName: Backend
|
displayName: API Docs
|
||||||
|
dependsOn: Prepare
|
||||||
|
condition: |
|
||||||
|
and
|
||||||
|
(
|
||||||
|
and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop')),
|
||||||
|
and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
||||||
|
)
|
||||||
|
|
||||||
variables:
|
|
||||||
disable.coverage.autogenerate: 'true'
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: ${{ variables.linuxImage }}
|
vmImage: ${{ variables.windowsImage }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: UseDotNet@2
|
- task: UseDotNet@2
|
||||||
displayName: 'Install .net core 2.1'
|
displayName: 'Install .net core'
|
||||||
inputs:
|
inputs:
|
||||||
version: 2.1.815
|
version: $(dotnetVersion)
|
||||||
- task: UseDotNet@2
|
- checkout: self
|
||||||
displayName: 'Install .net core 3.1'
|
submodules: true
|
||||||
|
persistCredentials: true
|
||||||
|
fetchDepth: 1
|
||||||
|
- bash: ./docs.sh Windows
|
||||||
|
displayName: Create openapi.json
|
||||||
|
- bash: |
|
||||||
|
git config --global user.email "development@lidarr.audio"
|
||||||
|
git config --global user.name "Servarr"
|
||||||
|
git checkout -b api-docs
|
||||||
|
git add .
|
||||||
|
if git status | grep -q modified
|
||||||
|
then
|
||||||
|
git commit -am 'Automated API Docs update'
|
||||||
|
git push -f --set-upstream origin api-docs
|
||||||
|
curl -X POST -H "Authorization: token ${GITHUBTOKEN}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/readarr/readarr/pulls -d '{"head":"api-docs","base":"develop","title":"Update API docs"}'
|
||||||
|
else
|
||||||
|
echo "No changes since last run"
|
||||||
|
fi
|
||||||
|
displayName: Commit API Doc Change
|
||||||
|
continueOnError: true
|
||||||
|
env:
|
||||||
|
GITHUBTOKEN: $(githubToken)
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: 'Copy openapi.json to: $(Build.ArtifactStagingDirectory)'
|
||||||
inputs:
|
inputs:
|
||||||
version: 3.1.413
|
SourceFolder: '$(Build.SourcesDirectory)'
|
||||||
|
Contents: |
|
||||||
|
**/*openapi.json
|
||||||
|
TargetFolder: '$(Build.ArtifactStagingDirectory)/api_docs'
|
||||||
|
- publish: $(Build.ArtifactStagingDirectory)/api_docs
|
||||||
|
artifact: 'APIDocs'
|
||||||
|
displayName: Publish API Docs Bundle
|
||||||
|
condition: and(succeeded(), eq(variables['System.JobAttempt'], '1'))
|
||||||
|
|
||||||
|
- job: Analyze_Backend
|
||||||
|
displayName: Backend
|
||||||
|
dependsOn: Prepare
|
||||||
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
||||||
|
|
||||||
|
variables:
|
||||||
|
disable.coverage.autogenerate: 'true'
|
||||||
|
EnableAnalyzers: 'false'
|
||||||
|
|
||||||
|
pool:
|
||||||
|
vmImage: ${{ variables.windowsImage }}
|
||||||
|
|
||||||
|
steps:
|
||||||
- task: UseDotNet@2
|
- task: UseDotNet@2
|
||||||
displayName: 'Install .net core 5.0'
|
displayName: 'Install .net core'
|
||||||
inputs:
|
inputs:
|
||||||
version: $(dotnetVersion)
|
version: $(dotnetVersion)
|
||||||
- checkout: self # Need history for Sonar analysis
|
- checkout: self # Need history for Sonar analysis
|
||||||
submodules: true
|
submodules: true
|
||||||
- task: Cache@2
|
- powershell: Set-Service SCardSvr -StartupType Manual
|
||||||
inputs:
|
displayName: Enable Windows Test Service
|
||||||
key: 'nuget | "$(Agent.OS)" | $(Build.SourcesDirectory)/src/Directory.Packages.props'
|
|
||||||
path: $(nugetCacheFolder)
|
|
||||||
displayName: Cache NuGet packages
|
|
||||||
|
|
||||||
- task: SonarCloudPrepare@1
|
- task: SonarCloudPrepare@1
|
||||||
condition: eq(variables['System.PullRequest.IsFork'], 'False')
|
condition: eq(variables['System.PullRequest.IsFork'], 'False')
|
||||||
inputs:
|
inputs:
|
||||||
@@ -995,16 +1200,14 @@ stages:
|
|||||||
projectName: 'Readarr'
|
projectName: 'Readarr'
|
||||||
projectVersion: '$(readarrVersion)'
|
projectVersion: '$(readarrVersion)'
|
||||||
extraProperties: |
|
extraProperties: |
|
||||||
sonar.exclusions=**/obj/**,**/*.dll,**/NzbDrone.Core.Test/Files/**/*,./frontend/**,./src/Libraries/**
|
sonar.exclusions=**/obj/**,**/*.dll,**/NzbDrone.Core.Test/Files/**/*,./frontend/**,**/ExternalModules/**,./src/Libraries/**
|
||||||
sonar.coverage.exclusions=**/Readarr.Api.V1/**/*
|
sonar.coverage.exclusions=**/Readarr.Api.V1/**/*
|
||||||
sonar.cs.opencover.reportsPaths=$(Build.SourcesDirectory)/CoverageResults/**/coverage.opencover.xml
|
sonar.cs.opencover.reportsPaths=$(Build.SourcesDirectory)/CoverageResults/**/coverage.opencover.xml
|
||||||
sonar.cs.nunit.reportsPaths=$(Build.SourcesDirectory)/TestResult.xml
|
sonar.cs.nunit.reportsPaths=$(Build.SourcesDirectory)/TestResult.xml
|
||||||
- bash: |
|
- bash: |
|
||||||
./build.sh --backend -f net6.0 -r linux-x64
|
./build.sh --backend -f net6.0 -r win-x64
|
||||||
TEST_DIR=_tests/net6.0/linux-x64/publish/ ./test.sh Linux Unit Coverage
|
TEST_DIR=_tests/net6.0/win-x64/publish/ ./test.sh Windows Unit Coverage
|
||||||
displayName: Coverage Unit Tests
|
displayName: Coverage Unit Tests
|
||||||
env:
|
|
||||||
NUGET_PACKAGES: $(nugetCacheFolder)
|
|
||||||
- task: SonarCloudAnalyze@1
|
- task: SonarCloudAnalyze@1
|
||||||
condition: eq(variables['System.PullRequest.IsFork'], 'False')
|
condition: eq(variables['System.PullRequest.IsFork'], 'False')
|
||||||
displayName: Publish SonarCloud Results
|
displayName: Publish SonarCloud Results
|
||||||
@@ -1027,7 +1230,6 @@ stages:
|
|||||||
- Unit_Test
|
- Unit_Test
|
||||||
- Integration
|
- Integration
|
||||||
- Automation
|
- Automation
|
||||||
- Build_Backend_Other
|
|
||||||
condition: eq(variables['system.pullrequest.isfork'], false)
|
condition: eq(variables['system.pullrequest.isfork'], false)
|
||||||
displayName: Build Status Report
|
displayName: Build Status Report
|
||||||
jobs:
|
jobs:
|
||||||
@@ -1051,3 +1253,4 @@ stages:
|
|||||||
DISCORDCHANNELID: $(discordChannelId)
|
DISCORDCHANNELID: $(discordChannelId)
|
||||||
DISCORDWEBHOOKKEY: $(discordWebhookKey)
|
DISCORDWEBHOOKKEY: $(discordWebhookKey)
|
||||||
DISCORDTHREADID: $(discordThreadId)
|
DISCORDTHREADID: $(discordThreadId)
|
||||||
|
|
||||||
|
|||||||
19
build.sh
19
build.sh
@@ -23,7 +23,7 @@ UpdateVersionNumber()
|
|||||||
echo "Updating Version Info"
|
echo "Updating Version Info"
|
||||||
sed -i'' -e "s/<AssemblyVersion>[0-9.*]\+<\/AssemblyVersion>/<AssemblyVersion>$READARRVERSION<\/AssemblyVersion>/g" src/Directory.Build.props
|
sed -i'' -e "s/<AssemblyVersion>[0-9.*]\+<\/AssemblyVersion>/<AssemblyVersion>$READARRVERSION<\/AssemblyVersion>/g" src/Directory.Build.props
|
||||||
sed -i'' -e "s/<AssemblyConfiguration>[\$()A-Za-z-]\+<\/AssemblyConfiguration>/<AssemblyConfiguration>${BUILD_SOURCEBRANCHNAME}<\/AssemblyConfiguration>/g" src/Directory.Build.props
|
sed -i'' -e "s/<AssemblyConfiguration>[\$()A-Za-z-]\+<\/AssemblyConfiguration>/<AssemblyConfiguration>${BUILD_SOURCEBRANCHNAME}<\/AssemblyConfiguration>/g" src/Directory.Build.props
|
||||||
sed -i'' -e "s/<string>10.0.0.0<\/string>/<string>$READARRVERSION<\/string>/g" macOS/Readarr.app/Contents/Info.plist
|
sed -i'' -e "s/<string>10.0.0.0<\/string>/<string>$READARRVERSION<\/string>/g" distribution/osx/Readarr.app/Contents/Info.plist
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,7 +183,7 @@ PackageMacOSApp()
|
|||||||
|
|
||||||
rm -rf $folder
|
rm -rf $folder
|
||||||
mkdir -p $folder
|
mkdir -p $folder
|
||||||
cp -r macOS/Readarr.app $folder
|
cp -r distribution/osx/Readarr.app $folder
|
||||||
mkdir -p $folder/Readarr.app/Contents/MacOS
|
mkdir -p $folder/Readarr.app/Contents/MacOS
|
||||||
|
|
||||||
echo "Copying Binaries"
|
echo "Copying Binaries"
|
||||||
@@ -245,7 +245,7 @@ BuildInstaller()
|
|||||||
local framework="$1"
|
local framework="$1"
|
||||||
local runtime="$2"
|
local runtime="$2"
|
||||||
|
|
||||||
./_inno/ISCC.exe setup/readarr.iss "//DFramework=$framework" "//DRuntime=$runtime"
|
./_inno/ISCC.exe distribution/windows/setup/readarr.iss "//DFramework=$framework" "//DRuntime=$runtime"
|
||||||
}
|
}
|
||||||
|
|
||||||
InstallInno()
|
InstallInno()
|
||||||
@@ -391,22 +391,21 @@ then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$FRONTEND" = "YES" ];
|
if [[ "$LINT" = "YES" || "$FRONTEND" = "YES" ]];
|
||||||
then
|
then
|
||||||
YarnInstall
|
YarnInstall
|
||||||
RunWebpack
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$LINT" = "YES" ];
|
if [ "$LINT" = "YES" ];
|
||||||
then
|
then
|
||||||
if [ -z "$FRONTEND" ];
|
|
||||||
then
|
|
||||||
YarnInstall
|
|
||||||
fi
|
|
||||||
|
|
||||||
LintUI
|
LintUI
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$FRONTEND" = "YES" ];
|
||||||
|
then
|
||||||
|
RunWebpack
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$PACKAGES" = "YES" ];
|
if [ "$PACKAGES" = "YES" ];
|
||||||
then
|
then
|
||||||
UpdateVersionNumber
|
UpdateVersionNumber
|
||||||
|
|||||||
@@ -44,16 +44,16 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
|
|||||||
|
|
||||||
[Tasks]
|
[Tasks]
|
||||||
Name: "desktopIcon"; Description: "{cm:CreateDesktopIcon}"
|
Name: "desktopIcon"; Description: "{cm:CreateDesktopIcon}"
|
||||||
Name: "windowsService"; Description: "Install Windows Service (Starts when the computer starts as the LocalService user, you will need to change the user to access network shares)"; GroupDescription: "Start automatically"; Flags: exclusive unchecked
|
Name: "windowsService"; Description: "Install Windows Service (Starts when the computer starts as the LocalService user, you will need to change the user to access network shares)"; GroupDescription: "Start automatically"; Flags: exclusive
|
||||||
Name: "startupShortcut"; Description: "Create shortcut in Startup folder (Starts when you log into Windows)"; GroupDescription: "Start automatically"; Flags: exclusive
|
Name: "startupShortcut"; Description: "Create shortcut in Startup folder (Starts when you log into Windows)"; GroupDescription: "Start automatically"; Flags: exclusive unchecked
|
||||||
Name: "none"; Description: "Do not start automatically"; GroupDescription: "Start automatically"; Flags: exclusive unchecked
|
Name: "none"; Description: "Do not start automatically"; GroupDescription: "Start automatically"; Flags: exclusive unchecked
|
||||||
|
|
||||||
[Dirs]
|
[Dirs]
|
||||||
Name: "{app}"; Permissions: users-modify
|
Name: "{app}"; Permissions: users-modify
|
||||||
|
|
||||||
[Files]
|
[Files]
|
||||||
Source: "..\_artifacts\{#Runtime}\{#Framework}\Readarr\Readarr.exe"; DestDir: "{app}\bin"; Flags: ignoreversion
|
Source: "..\..\..\_artifacts\{#Runtime}\{#Framework}\Readarr\Readarr.exe"; DestDir: "{app}\bin"; Flags: ignoreversion
|
||||||
Source: "..\_artifacts\{#Runtime}\{#Framework}\Readarr\*"; Excludes: "Readarr.Update"; DestDir: "{app}\bin"; Flags: ignoreversion recursesubdirs createallsubdirs
|
Source: "..\..\..\_artifacts\{#Runtime}\{#Framework}\Readarr\*"; Excludes: "Readarr.Update"; DestDir: "{app}\bin"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||||
|
|
||||||
[Icons]
|
[Icons]
|
||||||
@@ -72,12 +72,13 @@ Filename: "{app}\bin\Readarr.exe"; Description: "Open Readarr Web UI"; Flags: po
|
|||||||
Filename: "{app}\bin\Readarr.exe"; Description: "Start Readarr"; Flags: postinstall skipifsilent nowait; Tasks: startupShortcut none;
|
Filename: "{app}\bin\Readarr.exe"; Description: "Start Readarr"; Flags: postinstall skipifsilent nowait; Tasks: startupShortcut none;
|
||||||
|
|
||||||
[UninstallRun]
|
[UninstallRun]
|
||||||
Filename: "{app}\bin\Readarr.Console.exe"; Parameters: "/u"; Flags: waituntilterminated skipifdoesntexist
|
Filename: "{app}\bin\readarr.console.exe"; Parameters: "/u"; Flags: waituntilterminated skipifdoesntexist
|
||||||
|
|
||||||
[Code]
|
[Code]
|
||||||
function PrepareToInstall(var NeedsRestart: Boolean): String;
|
function PrepareToInstall(var NeedsRestart: Boolean): String;
|
||||||
var
|
var
|
||||||
ResultCode: Integer;
|
ResultCode: Integer;
|
||||||
begin
|
begin
|
||||||
Exec(ExpandConstant('{commonappdata}\Readarr\bin\Readarr.Console.exe'), '/u', '', 0, ewWaitUntilTerminated, ResultCode)
|
Exec('net', 'stop readarr', '', 0, ewWaitUntilTerminated, ResultCode)
|
||||||
|
Exec('sc', 'delete readarr', '', 0, ewWaitUntilTerminated, ResultCode)
|
||||||
end;
|
end;
|
||||||
38
docs.sh
Normal file
38
docs.sh
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
PLATFORM=$1
|
||||||
|
|
||||||
|
if [ "$PLATFORM" = "Windows" ]; then
|
||||||
|
RUNTIME="win-x64"
|
||||||
|
elif [ "$PLATFORM" = "Linux" ]; then
|
||||||
|
RUNTIME="linux-x64"
|
||||||
|
elif [ "$PLATFORM" = "Mac" ]; then
|
||||||
|
RUNTIME="osx-x64"
|
||||||
|
else
|
||||||
|
echo "Platform must be provided as first arguement: Windows, Linux or Mac"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
outputFolder='_output'
|
||||||
|
testPackageFolder='_tests'
|
||||||
|
|
||||||
|
rm -rf $outputFolder
|
||||||
|
rm -rf $testPackageFolder
|
||||||
|
|
||||||
|
slnFile=src/Readarr.sln
|
||||||
|
|
||||||
|
platform=Posix
|
||||||
|
|
||||||
|
dotnet clean $slnFile -c Debug
|
||||||
|
dotnet clean $slnFile -c Release
|
||||||
|
|
||||||
|
dotnet msbuild -restore $slnFile -p:Configuration=Debug -p:Platform=$platform -p:RuntimeIdentifiers=$RUNTIME -t:PublishAllRids
|
||||||
|
|
||||||
|
dotnet new tool-manifest
|
||||||
|
dotnet tool install --version 6.5.0 Swashbuckle.AspNetCore.Cli
|
||||||
|
|
||||||
|
dotnet tool run swagger tofile --output ./src/Readarr.Api.V1/openapi.json "$outputFolder/net6.0/$RUNTIME/Readarr.console.dll" v1 &
|
||||||
|
|
||||||
|
sleep 45
|
||||||
|
|
||||||
|
kill %1
|
||||||
|
|
||||||
|
exit 0
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
{
|
|
||||||
"remove-empty-rulesets": true,
|
|
||||||
"always-semicolon": true,
|
|
||||||
"color-case": "lower",
|
|
||||||
"block-indent": " ",
|
|
||||||
"color-shorthand": false,
|
|
||||||
"element-case": "lower",
|
|
||||||
"eof-newline": true,
|
|
||||||
"leading-zero": true,
|
|
||||||
"quotes": "double",
|
|
||||||
"sort-order-fallback": "abc",
|
|
||||||
"space-before-colon": "",
|
|
||||||
"space-after-colon": " ",
|
|
||||||
"space-before-combinator": " ",
|
|
||||||
"space-after-combinator": " ",
|
|
||||||
"space-between-declarations": "\n",
|
|
||||||
"space-before-opening-brace": " ",
|
|
||||||
"space-after-opening-brace": "\n",
|
|
||||||
"space-after-selector-delimiter": " ",
|
|
||||||
"space-before-selector-delimiter": "",
|
|
||||||
"space-before-closing-brace": "\n",
|
|
||||||
"strip-spaces": true,
|
|
||||||
"tab-size": true,
|
|
||||||
"unitless-zero": false
|
|
||||||
}
|
|
||||||
@@ -1,335 +0,0 @@
|
|||||||
{
|
|
||||||
"indent": {
|
|
||||||
"value": " ",
|
|
||||||
"FunctionExpression": 1,
|
|
||||||
"ArrayExpression": 1,
|
|
||||||
"ObjectExpression": 1
|
|
||||||
},
|
|
||||||
"lineBreak": {
|
|
||||||
"value": "\n",
|
|
||||||
|
|
||||||
"before": {
|
|
||||||
"ArrayPatternClosing": 0,
|
|
||||||
"ArrayPatternComma": 0,
|
|
||||||
"ArrayPatternOpening": 0,
|
|
||||||
"ArrowFunctionExpressionArrow": 0,
|
|
||||||
"ArrowFunctionExpressionClosingBrace": ">=1",
|
|
||||||
"ArrowFunctionExpressionOpeningBrace": 0,
|
|
||||||
"AssignmentExpression": ">=1",
|
|
||||||
"AssignmentOperator": 0,
|
|
||||||
"BlockStatement": 0,
|
|
||||||
"BreakKeyword": ">=1",
|
|
||||||
"CallExpression": -1,
|
|
||||||
"CallExpressionClosingParentheses": -1,
|
|
||||||
"CallExpressionOpeningParentheses": 0,
|
|
||||||
"CatchClosingBrace": ">=1",
|
|
||||||
"CatchKeyword": 0,
|
|
||||||
"CatchOpeningBrace": 0,
|
|
||||||
"ClassDeclaration": ">=1",
|
|
||||||
"ClassDeclarationClosingBrace": ">=1",
|
|
||||||
"ClassDeclarationOpeningBrace": 0,
|
|
||||||
"ConditionalExpression": ">=1",
|
|
||||||
"DeleteOperator": ">=1",
|
|
||||||
"DoWhileStatement": ">=1",
|
|
||||||
"DoWhileStatementClosingBrace": ">=1",
|
|
||||||
"DoWhileStatementOpeningBrace": 0,
|
|
||||||
"ElseIfStatement": 0,
|
|
||||||
"ElseIfStatementClosingBrace": ">=1",
|
|
||||||
"ElseIfStatementOpeningBrace": 0,
|
|
||||||
"ElseStatement": 0,
|
|
||||||
"ElseStatementClosingBrace": ">=1",
|
|
||||||
"ElseStatementOpeningBrace": 0,
|
|
||||||
"EmptyStatement": -1,
|
|
||||||
"EndOfFile": -1,
|
|
||||||
"FinallyClosingBrace": ">=1",
|
|
||||||
"FinallyKeyword": -1,
|
|
||||||
"FinallyOpeningBrace": 0,
|
|
||||||
"ForInStatement": ">=1",
|
|
||||||
"ForInStatementClosingBrace": ">=1",
|
|
||||||
"ForInStatementExpressionClosing": 0,
|
|
||||||
"ForInStatementExpressionOpening": 0,
|
|
||||||
"ForInStatementOpeningBrace": 0,
|
|
||||||
"ForStatement": ">=1",
|
|
||||||
"ForStatementClosingBrace": ">=1",
|
|
||||||
"ForStatementExpressionClosing": "<2",
|
|
||||||
"ForStatementExpressionOpening": 0,
|
|
||||||
"ForStatementOpeningBrace": 0,
|
|
||||||
"FunctionDeclaration": ">=1",
|
|
||||||
"FunctionDeclarationClosingBrace": ">=1",
|
|
||||||
"FunctionDeclarationOpeningBrace": 0,
|
|
||||||
"FunctionExpression": 0,
|
|
||||||
"FunctionExpressionClosingBrace": 1,
|
|
||||||
"FunctionExpressionOpeningBrace":0,
|
|
||||||
"IIFEClosingParentheses": 0,
|
|
||||||
"IfStatement": ">=1",
|
|
||||||
"IfStatementClosingBrace": ">=1",
|
|
||||||
"IfStatementOpeningBrace": 0,
|
|
||||||
"LogicalExpression": -1,
|
|
||||||
"MemberExpressionClosing": 0,
|
|
||||||
"MemberExpressionOpening": 0,
|
|
||||||
"MemberExpressionPeriod": -1,
|
|
||||||
"MethodDefinition": ">=1",
|
|
||||||
"ObjectExpressionClosingBrace": "<=1",
|
|
||||||
"ObjectPatternClosingBrace": 0,
|
|
||||||
"ObjectPatternComma": 0,
|
|
||||||
"ObjectPatternOpeningBrace": 0,
|
|
||||||
"ParameterDefault": 0,
|
|
||||||
"Property": "<=2",
|
|
||||||
"PropertyValue": 0,
|
|
||||||
"ReturnStatement": -1,
|
|
||||||
"SwitchClosingBrace": ">=1",
|
|
||||||
"SwitchOpeningBrace": 0,
|
|
||||||
"ThisExpression": -1,
|
|
||||||
"ThrowStatement": ">=1",
|
|
||||||
"TryClosingBrace": ">=1",
|
|
||||||
"TryKeyword": -1,
|
|
||||||
"TryOpeningBrace": 0,
|
|
||||||
"VariableDeclaration": ">=1",
|
|
||||||
"VariableDeclarationSemiColon": 0,
|
|
||||||
"VariableDeclarationWithoutInit": ">=1",
|
|
||||||
"VariableName": ">=1",
|
|
||||||
"VariableValue": 0,
|
|
||||||
"WhileStatement": ">=1",
|
|
||||||
"WhileStatementClosingBrace": ">=1",
|
|
||||||
"WhileStatementOpeningBrace": 0
|
|
||||||
},
|
|
||||||
|
|
||||||
"after": {
|
|
||||||
"ArrayPatternClosing": 0,
|
|
||||||
"ArrayPatternComma": 0,
|
|
||||||
"ArrayPatternOpening": 0,
|
|
||||||
"ArrowFunctionExpressionArrow": 0,
|
|
||||||
"ArrowFunctionExpressionClosingBrace": -1,
|
|
||||||
"ArrowFunctionExpressionOpeningBrace": ">=1",
|
|
||||||
"AssignmentExpression": ">=1",
|
|
||||||
"AssignmentOperator": 0,
|
|
||||||
"BlockStatement": 0,
|
|
||||||
"BreakKeyword": -1,
|
|
||||||
"CallExpression": -1,
|
|
||||||
"CallExpressionClosingParentheses": -1,
|
|
||||||
"CallExpressionOpeningParentheses": -1,
|
|
||||||
"CatchClosingBrace": ">=0",
|
|
||||||
"CatchKeyword": 0,
|
|
||||||
"CatchOpeningBrace": ">=1",
|
|
||||||
"ClassDeclaration": ">=1",
|
|
||||||
"ClassDeclarationClosingBrace": ">=1",
|
|
||||||
"ClassDeclarationOpeningBrace": ">=1",
|
|
||||||
"ConditionalExpression": ">=1",
|
|
||||||
"DeleteOperator": ">=1",
|
|
||||||
"DoWhileStatement": ">=1",
|
|
||||||
"DoWhileStatementClosingBrace": 0,
|
|
||||||
"DoWhileStatementOpeningBrace": ">=1",
|
|
||||||
"ElseIfStatement": ">=1",
|
|
||||||
"ElseIfStatementClosingBrace": ">=1",
|
|
||||||
"ElseIfStatementOpeningBrace": ">=1",
|
|
||||||
"ElseStatement": ">=1",
|
|
||||||
"ElseStatementClosingBrace": ">=1",
|
|
||||||
"ElseStatementOpeningBrace": ">=1",
|
|
||||||
"EmptyStatement": -1,
|
|
||||||
"FinallyClosingBrace": ">=1",
|
|
||||||
"FinallyKeyword": -1,
|
|
||||||
"FinallyOpeningBrace": ">=1",
|
|
||||||
"ForInStatement": ">=1",
|
|
||||||
"ForInStatementClosingBrace": ">=1",
|
|
||||||
"ForInStatementExpressionClosing": -1,
|
|
||||||
"ForInStatementExpressionOpening": "<2",
|
|
||||||
"ForInStatementOpeningBrace": ">=1",
|
|
||||||
"ForStatement": ">=1",
|
|
||||||
"ForStatementClosingBrace": ">=1",
|
|
||||||
"ForStatementExpressionClosing": -1,
|
|
||||||
"ForStatementExpressionOpening": "<2",
|
|
||||||
"ForStatementOpeningBrace": ">=1",
|
|
||||||
"FunctionDeclaration": ">=1",
|
|
||||||
"FunctionDeclarationClosingBrace": ">=1",
|
|
||||||
"FunctionDeclarationOpeningBrace": ">=1",
|
|
||||||
"FunctionExpression": 0,
|
|
||||||
"FunctionExpressionClosingBrace": -1,
|
|
||||||
"FunctionExpressionOpeningBrace": 1,
|
|
||||||
"IIFEOpeningParentheses": 0,
|
|
||||||
"IfStatement": ">=1",
|
|
||||||
"IfStatementClosingBrace": ">=1",
|
|
||||||
"IfStatementOpeningBrace": ">=1",
|
|
||||||
"LogicalExpression": -1,
|
|
||||||
"MemberExpressionClosing": 0,
|
|
||||||
"MemberExpressionOpening": 0,
|
|
||||||
"MemberExpressionPeriod": 0,
|
|
||||||
"MethodDefinition": ">=1",
|
|
||||||
"ObjectExpressionOpeningBrace": "<=1",
|
|
||||||
"ObjectPatternClosingBrace": 0,
|
|
||||||
"ObjectPatternComma": 0,
|
|
||||||
"ObjectPatternOpeningBrace": 0,
|
|
||||||
"ParameterDefault": 0,
|
|
||||||
"Property": -1,
|
|
||||||
"PropertyName": 0,
|
|
||||||
"ReturnStatement": -1,
|
|
||||||
"SwitchCaseColon": ">=1",
|
|
||||||
"SwitchClosingBrace": ">=1",
|
|
||||||
"SwitchOpeningBrace": ">=1",
|
|
||||||
"ThisExpression": 0,
|
|
||||||
"ThrowStatement": ">=1",
|
|
||||||
"TryClosingBrace": 0,
|
|
||||||
"TryKeyword": -1,
|
|
||||||
"TryOpeningBrace": ">=1",
|
|
||||||
"VariableDeclaration": ">=1",
|
|
||||||
"VariableDeclarationSemiColon": ">=1",
|
|
||||||
"VariableValue": -1,
|
|
||||||
"WhileStatement": ">=1",
|
|
||||||
"WhileStatementClosingBrace": ">=1",
|
|
||||||
"WhileStatementOpeningBrace": ">=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"whiteSpace": {
|
|
||||||
"value": " ",
|
|
||||||
"removeTrailing": 1,
|
|
||||||
"before": {
|
|
||||||
"ArgumentComma": 0,
|
|
||||||
"ArgumentList": 0,
|
|
||||||
"ArgumentListArrayExpression": 0,
|
|
||||||
"ArgumentListFunctionExpression": 1,
|
|
||||||
"ArgumentListObjectExpression": 0,
|
|
||||||
"ArrayExpressionClosing": 0,
|
|
||||||
"ArrayExpressionComma": 0,
|
|
||||||
"ArrayExpressionOpening": 1,
|
|
||||||
"AssignmentOperator": 1,
|
|
||||||
"BinaryExpression": 0,
|
|
||||||
"BinaryExpressionOperator": 1,
|
|
||||||
"BlockComment": 1,
|
|
||||||
"CallExpression": 1,
|
|
||||||
"CatchClosingBrace": 1,
|
|
||||||
"CatchKeyword": 1,
|
|
||||||
"CatchOpeningBrace": 1,
|
|
||||||
"CatchParameterList": 0,
|
|
||||||
"CommaOperator": 0,
|
|
||||||
"ConditionalExpressionAlternate": 1,
|
|
||||||
"ConditionalExpressionConsequent": 1,
|
|
||||||
"DoWhileStatementClosingBrace": 1,
|
|
||||||
"DoWhileStatementConditional": 1,
|
|
||||||
"DoWhileStatementOpeningBrace": 1,
|
|
||||||
"ElseIfStatementClosingBrace": 1,
|
|
||||||
"ElseIfStatementOpeningBrace": 1,
|
|
||||||
"ElseStatementClosingBrace": 1,
|
|
||||||
"ElseStatementOpeningBrace": 1,
|
|
||||||
"EmptyStatement": 0,
|
|
||||||
"ExpressionClosingParentheses": 0,
|
|
||||||
"FinallyClosingBrace": 1,
|
|
||||||
"FinallyKeyword": -1,
|
|
||||||
"FinallyOpeningBrace": 1,
|
|
||||||
"ForInStatement": 1,
|
|
||||||
"ForInStatementClosingBrace": 1,
|
|
||||||
"ForInStatementExpressionClosing": 0,
|
|
||||||
"ForInStatementExpressionOpening": 1,
|
|
||||||
"ForInStatementOpeningBrace": 1,
|
|
||||||
"ForStatement": 1,
|
|
||||||
"ForStatementClosingBrace": 1,
|
|
||||||
"ForStatementExpressionClosing": 0,
|
|
||||||
"ForStatementExpressionOpening": 1,
|
|
||||||
"ForStatementOpeningBrace": 1,
|
|
||||||
"ForStatementSemicolon": 0,
|
|
||||||
"FunctionDeclarationClosingBrace": 1,
|
|
||||||
"FunctionDeclarationOpeningBrace": 1,
|
|
||||||
"FunctionExpressionClosingBrace": 1,
|
|
||||||
"FunctionExpressionOpeningBrace": 1,
|
|
||||||
"IfStatementClosingBrace": 1,
|
|
||||||
"IfStatementConditionalClosing": 0,
|
|
||||||
"IfStatementConditionalOpening": 1,
|
|
||||||
"IfStatementOpeningBrace": 1,
|
|
||||||
"LineComment": 1,
|
|
||||||
"LogicalExpressionOperator": 1,
|
|
||||||
"MemberExpressionClosing": 0,
|
|
||||||
"ObjectExpressionClosingBrace": 1,
|
|
||||||
"ParameterComma": 0,
|
|
||||||
"ParameterList": 0,
|
|
||||||
"Property": 1,
|
|
||||||
"PropertyName": 1,
|
|
||||||
"PropertyValue": 1,
|
|
||||||
"SwitchDiscriminantClosing": 0,
|
|
||||||
"SwitchDiscriminantOpening": 1,
|
|
||||||
"ThrowKeyword": 1,
|
|
||||||
"TryClosingBrace": 1,
|
|
||||||
"TryKeyword": -1,
|
|
||||||
"TryOpeningBrace": 1,
|
|
||||||
"UnaryExpressionOperator": 0,
|
|
||||||
"VariableName": 1,
|
|
||||||
"VariableValue": 1,
|
|
||||||
"WhileStatementClosingBrace": 1,
|
|
||||||
"WhileStatementConditionalClosing": 0,
|
|
||||||
"WhileStatementConditionalOpening": 1,
|
|
||||||
"WhileStatementOpeningBrace": 1
|
|
||||||
},
|
|
||||||
"after": {
|
|
||||||
"ArgumentComma": 1,
|
|
||||||
"ArgumentList": 0,
|
|
||||||
"ArgumentListArrayExpression": 1,
|
|
||||||
"ArgumentListFunctionExpression": 1,
|
|
||||||
"ArgumentListObjectExpression": 0,
|
|
||||||
"ArrayExpressionClosing": 0,
|
|
||||||
"ArrayExpressionComma": 1,
|
|
||||||
"ArrayExpressionOpening": 0,
|
|
||||||
"AssignmentOperator": 1,
|
|
||||||
"BinaryExpression": 0,
|
|
||||||
"BinaryExpressionOperator": 1,
|
|
||||||
"BlockComment": 1,
|
|
||||||
"CallExpression": 0,
|
|
||||||
"CatchClosingBrace": 1,
|
|
||||||
"CatchKeyword": 1,
|
|
||||||
"CatchOpeningBrace": 1,
|
|
||||||
"CatchParameterList": 0,
|
|
||||||
"CommaOperator": 1,
|
|
||||||
"ConditionalExpressionConsequent": 1,
|
|
||||||
"ConditionalExpressionTest": 1,
|
|
||||||
"DoWhileStatementBody": 1,
|
|
||||||
"DoWhileStatementClosingBrace": 1,
|
|
||||||
"DoWhileStatementOpeningBrace": 1,
|
|
||||||
"ElseIfStatementClosingBrace": 1,
|
|
||||||
"ElseIfStatementOpeningBrace": 1,
|
|
||||||
"ElseStatementClosingBrace": 1,
|
|
||||||
"ElseStatementOpeningBrace": 1,
|
|
||||||
"EmptyStatement": 0,
|
|
||||||
"ExpressionOpeningParentheses": 0,
|
|
||||||
"FinallyClosingBrace": 1,
|
|
||||||
"FinallyKeyword": -1,
|
|
||||||
"FinallyOpeningBrace": 1,
|
|
||||||
"ForInStatement": 1,
|
|
||||||
"ForInStatementClosingBrace": 1,
|
|
||||||
"ForInStatementExpressionClosing": 1,
|
|
||||||
"ForInStatementExpressionOpening": 0,
|
|
||||||
"ForInStatementOpeningBrace": 1,
|
|
||||||
"ForStatement": 1,
|
|
||||||
"ForStatementClosingBrace": 1,
|
|
||||||
"ForStatementExpressionClosing": 1,
|
|
||||||
"ForStatementExpressionOpening": 0,
|
|
||||||
"ForStatementOpeningBrace": 1,
|
|
||||||
"ForStatementSemicolon": 1,
|
|
||||||
"FunctionDeclarationClosingBrace": 0,
|
|
||||||
"FunctionDeclarationOpeningBrace": 0,
|
|
||||||
"FunctionExpressionClosingBrace": 0,
|
|
||||||
"FunctionExpressionOpeningBrace": 0,
|
|
||||||
"FunctionName": 0,
|
|
||||||
"FunctionReservedWord": 0,
|
|
||||||
"IfStatementClosingBrace": 1,
|
|
||||||
"IfStatementConditionalClosing": 0,
|
|
||||||
"IfStatementConditionalOpening": 0,
|
|
||||||
"IfStatementOpeningBrace": 1,
|
|
||||||
"LogicalExpressionOperator": 1,
|
|
||||||
"MemberExpressionOpening": 0,
|
|
||||||
"ObjectExpressionClosingBrace": 0,
|
|
||||||
"ObjectExpressionOpeningBrace": 1,
|
|
||||||
"ParameterComma": 1,
|
|
||||||
"ParameterList": 0,
|
|
||||||
"PropertyName": 0,
|
|
||||||
"PropertyValue": 0,
|
|
||||||
"SwitchDiscriminantClosing": 1,
|
|
||||||
"SwitchDiscriminantOpening": 0,
|
|
||||||
"ThrowKeyword": 1,
|
|
||||||
"TryClosingBrace": 1,
|
|
||||||
"TryKeyword": -1,
|
|
||||||
"TryOpeningBrace": 1,
|
|
||||||
"UnaryExpressionOperator": 0,
|
|
||||||
"VariableName": 1,
|
|
||||||
"WhileStatementClosingBrace": 1,
|
|
||||||
"WhileStatementConditionalClosing": 1,
|
|
||||||
"WhileStatementConditionalOpening": 0,
|
|
||||||
"WhileStatementOpeningBrace": 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +1,2 @@
|
|||||||
**/JsLibraries/**
|
**/JsLibraries/**
|
||||||
|
**/*.css.d.ts
|
||||||
|
|||||||
@@ -1,14 +1,21 @@
|
|||||||
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
|
const path = require('path');
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
|
const typescriptEslintRecommended = require('@typescript-eslint/eslint-plugin').configs.recommended;
|
||||||
|
|
||||||
|
const frontendFolder = __dirname;
|
||||||
|
|
||||||
const dirs = fs
|
const dirs = fs
|
||||||
.readdirSync('frontend/src', { withFileTypes: true })
|
.readdirSync(path.join(frontendFolder, 'src'), { withFileTypes: true })
|
||||||
.filter((dirent) => dirent.isDirectory())
|
.filter((dirent) => dirent.isDirectory())
|
||||||
.map((dirent) => dirent.name)
|
.map((dirent) => dirent.name)
|
||||||
.join('|');
|
.join('|');
|
||||||
|
|
||||||
const frontendFolder = __dirname;
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
|
||||||
parser: '@babel/eslint-parser',
|
parser: '@babel/eslint-parser',
|
||||||
|
|
||||||
env: {
|
env: {
|
||||||
@@ -28,7 +35,7 @@ module.exports = {
|
|||||||
ecmaVersion: 6,
|
ecmaVersion: 6,
|
||||||
sourceType: 'module',
|
sourceType: 'module',
|
||||||
babelOptions: {
|
babelOptions: {
|
||||||
configFile: `${frontendFolder}/babel.config.js`,
|
configFile: `${frontendFolder}/babel.config.js`
|
||||||
},
|
},
|
||||||
ecmaFeatures: {
|
ecmaFeatures: {
|
||||||
modules: true,
|
modules: true,
|
||||||
@@ -41,7 +48,9 @@ module.exports = {
|
|||||||
'react',
|
'react',
|
||||||
'react-hooks',
|
'react-hooks',
|
||||||
'simple-import-sort',
|
'simple-import-sort',
|
||||||
'import'
|
'import',
|
||||||
|
'@typescript-eslint',
|
||||||
|
'prettier'
|
||||||
],
|
],
|
||||||
|
|
||||||
settings: {
|
settings: {
|
||||||
@@ -224,7 +233,7 @@ module.exports = {
|
|||||||
'consistent-this': ['error', 'self'],
|
'consistent-this': ['error', 'self'],
|
||||||
'eol-last': 'error',
|
'eol-last': 'error',
|
||||||
'func-names': 'off',
|
'func-names': 'off',
|
||||||
'func-style': ['error', 'declaration'],
|
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
|
||||||
indent: ['error', 2, { SwitchCase: 1 }],
|
indent: ['error', 2, { SwitchCase: 1 }],
|
||||||
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
|
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
|
||||||
'keyword-spacing': ['error', { before: true, after: true }],
|
'keyword-spacing': ['error', { before: true, after: true }],
|
||||||
@@ -315,7 +324,9 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
overrides: [
|
overrides: [
|
||||||
{
|
{
|
||||||
files: ['*.js'],
|
files: [
|
||||||
|
'*.js'
|
||||||
|
],
|
||||||
rules: {
|
rules: {
|
||||||
'simple-import-sort/imports': [
|
'simple-import-sort/imports': [
|
||||||
'error',
|
'error',
|
||||||
@@ -330,6 +341,52 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: [
|
||||||
|
'*.ts',
|
||||||
|
'*.tsx'
|
||||||
|
],
|
||||||
|
|
||||||
|
parser: '@typescript-eslint/parser',
|
||||||
|
parserOptions: {
|
||||||
|
project: './tsconfig.json'
|
||||||
|
},
|
||||||
|
|
||||||
|
extends: [
|
||||||
|
'prettier'
|
||||||
|
],
|
||||||
|
|
||||||
|
rules: Object.assign(typescriptEslintRecommended.rules, {
|
||||||
|
'no-shadow': 'off',
|
||||||
|
// These should be enabled after cleaning things up
|
||||||
|
'@typescript-eslint/no-unused-vars': 'warn',
|
||||||
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||||
|
'react/prop-types': 'off',
|
||||||
|
'prettier/prettier': 'error',
|
||||||
|
'simple-import-sort/imports': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
groups: [
|
||||||
|
// Packages
|
||||||
|
// Absolute Paths
|
||||||
|
// Relative Paths
|
||||||
|
// Css
|
||||||
|
['^@?\\w', `^(${dirs})(/.*|$)`, '^\\.', '^\\..*css$']
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: [
|
||||||
|
'*.css.d.ts'
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
'filenames/match-exported': 'off',
|
||||||
|
'init-declarations': 'off',
|
||||||
|
'prettier/prettier': 'off'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"js": {
|
|
||||||
"indent_size": 2,
|
|
||||||
"indent_char": " ",
|
|
||||||
"indent_level": 2,
|
|
||||||
"indent_with_tabs": false,
|
|
||||||
"preserve_newlines": true,
|
|
||||||
"brace_style": "collapse",
|
|
||||||
"max_preserve_newlines": 2,
|
|
||||||
"jslint_happy": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
10
frontend/.prettierignore
Normal file
10
frontend/.prettierignore
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# Ignore everything recursively
|
||||||
|
*
|
||||||
|
|
||||||
|
# But not the .ts files
|
||||||
|
!*.ts*
|
||||||
|
|
||||||
|
*css.d.ts
|
||||||
|
|
||||||
|
# Check subdirectories too
|
||||||
|
!*/
|
||||||
6
frontend/.prettierrc.json
Normal file
6
frontend/.prettierrc.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"arrowParens": "always",
|
||||||
|
"endOfLine": "auto",
|
||||||
|
"singleQuote": true,
|
||||||
|
"trailingComma": "es5"
|
||||||
|
}
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"stylelint-order"
|
"stylelint-order"
|
||||||
],
|
],
|
||||||
"ignoreFiles": [
|
"ignoreFiles": [
|
||||||
"frontend/src/Styles/scaffolding.css",
|
"frontend/src/Styles/scaffolding.css",
|
||||||
"**/*.js"
|
"**/*.js"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"at-rule-empty-line-before": [
|
"at-rule-empty-line-before": [
|
||||||
"always",
|
"always",
|
||||||
{
|
{
|
||||||
@@ -15,9 +15,6 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"at-rule-name-case": "lower",
|
|
||||||
"at-rule-name-newline-after": "always-multi-line",
|
|
||||||
"at-rule-name-space-after": "always",
|
|
||||||
"at-rule-no-unknown": [
|
"at-rule-no-unknown": [
|
||||||
true,
|
true,
|
||||||
{
|
{
|
||||||
@@ -28,83 +25,36 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"at-rule-no-vendor-prefix": true,
|
"at-rule-no-vendor-prefix": true,
|
||||||
"at-rule-semicolon-newline-after": "always",
|
|
||||||
"at-rule-semicolon-space-before": "never",
|
|
||||||
"block-closing-brace-empty-line-before": "never",
|
|
||||||
"block-closing-brace-newline-after": "always",
|
|
||||||
"block-closing-brace-newline-before": "always",
|
|
||||||
"block-closing-brace-space-after": "always-single-line",
|
|
||||||
"block-closing-brace-space-before": "always-single-line",
|
|
||||||
"block-no-empty": true,
|
"block-no-empty": true,
|
||||||
"block-opening-brace-newline-after": "always",
|
|
||||||
"block-opening-brace-newline-before": "never-single-line",
|
|
||||||
"block-opening-brace-space-after": "always-single-line",
|
|
||||||
"block-opening-brace-space-before": "always",
|
|
||||||
"color-hex-case": "lower",
|
|
||||||
"color-hex-length": "short",
|
"color-hex-length": "short",
|
||||||
"color-named": "never",
|
"color-named": "never",
|
||||||
"color-no-invalid-hex": true,
|
"color-no-invalid-hex": true,
|
||||||
"comment-whitespace-inside": "always",
|
"comment-whitespace-inside": "always",
|
||||||
"declaration-bang-space-after": "never",
|
|
||||||
"declaration-bang-space-before": "always",
|
|
||||||
"declaration-block-no-duplicate-properties": [
|
"declaration-block-no-duplicate-properties": [
|
||||||
true,
|
true,
|
||||||
{
|
{
|
||||||
"ignoreProperties": [
|
"ignoreProperties": [
|
||||||
"composes"
|
"composes"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"declaration-block-no-redundant-longhand-properties": true,
|
"declaration-block-no-redundant-longhand-properties": true,
|
||||||
"declaration-block-no-shorthand-property-overrides": true,
|
"declaration-block-no-shorthand-property-overrides": true,
|
||||||
"declaration-block-semicolon-newline-after": "always",
|
|
||||||
"declaration-block-semicolon-newline-before": "never-multi-line",
|
|
||||||
"declaration-block-semicolon-space-before": "never",
|
|
||||||
"declaration-block-single-line-max-declarations": 1,
|
"declaration-block-single-line-max-declarations": 1,
|
||||||
"declaration-block-trailing-semicolon": "always",
|
|
||||||
"declaration-colon-space-after": "always",
|
|
||||||
"declaration-colon-space-before": "never",
|
|
||||||
"font-family-name-quotes": "always-unless-keyword",
|
"font-family-name-quotes": "always-unless-keyword",
|
||||||
"function-calc-no-unspaced-operator": true,
|
"function-calc-no-unspaced-operator": true,
|
||||||
"function-comma-newline-after": "never-multi-line",
|
|
||||||
"function-comma-newline-before": "never-multi-line",
|
|
||||||
"function-comma-space-after": "always",
|
|
||||||
"function-comma-space-before": "never",
|
|
||||||
"function-linear-gradient-no-nonstandard-direction": true,
|
"function-linear-gradient-no-nonstandard-direction": true,
|
||||||
"function-name-case": "lower",
|
"function-name-case": "lower",
|
||||||
"function-parentheses-newline-inside": "never-multi-line",
|
|
||||||
"function-parentheses-space-inside": "never",
|
|
||||||
"function-url-quotes": "always",
|
"function-url-quotes": "always",
|
||||||
"function-url-scheme-disallowed-list": [
|
"function-url-scheme-disallowed-list": [
|
||||||
"data"
|
"data"
|
||||||
],
|
],
|
||||||
"function-whitespace-after": "always",
|
|
||||||
"indentation": 2,
|
|
||||||
"keyframe-declaration-no-important": true,
|
"keyframe-declaration-no-important": true,
|
||||||
"length-zero-no-unit": true,
|
"length-zero-no-unit": true,
|
||||||
"max-empty-lines": 1,
|
|
||||||
"max-line-length": [
|
|
||||||
100,
|
|
||||||
{
|
|
||||||
"ignore": [
|
|
||||||
"non-comments"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"max-nesting-depth": 2,
|
"max-nesting-depth": 2,
|
||||||
"media-feature-colon-space-after": "always",
|
|
||||||
"media-feature-colon-space-before": "never",
|
|
||||||
"media-feature-name-case": "lower",
|
|
||||||
"media-feature-name-no-vendor-prefix": true,
|
"media-feature-name-no-vendor-prefix": true,
|
||||||
"media-feature-range-operator-space-after": "always",
|
|
||||||
"media-feature-range-operator-space-before": "always",
|
|
||||||
"no-empty-source": true,
|
"no-empty-source": true,
|
||||||
"no-eol-whitespace": true,
|
|
||||||
"no-extra-semicolons": true,
|
|
||||||
"no-invalid-double-slash-comments": true,
|
"no-invalid-double-slash-comments": true,
|
||||||
"no-missing-end-of-source-newline": true,
|
|
||||||
"number-leading-zero": "always",
|
|
||||||
"number-no-trailing-zeros": true,
|
|
||||||
"order/order": [
|
"order/order": [
|
||||||
"custom-properties",
|
"custom-properties",
|
||||||
"dollar-variables",
|
"dollar-variables",
|
||||||
@@ -132,6 +82,7 @@
|
|||||||
"right",
|
"right",
|
||||||
"bottom",
|
"bottom",
|
||||||
"left",
|
"left",
|
||||||
|
"inset",
|
||||||
"z-index",
|
"z-index",
|
||||||
"display",
|
"display",
|
||||||
"visibility",
|
"visibility",
|
||||||
@@ -343,54 +294,33 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"property-case": "lower",
|
|
||||||
"property-no-vendor-prefix": true,
|
"property-no-vendor-prefix": true,
|
||||||
"rule-empty-line-before": [
|
"rule-empty-line-before": [
|
||||||
"always",
|
"always",
|
||||||
{
|
{
|
||||||
"except": [
|
"except": [
|
||||||
"first-nested"
|
"first-nested"
|
||||||
],
|
],
|
||||||
"ignore": [
|
"ignore": [
|
||||||
"after-comment"
|
"after-comment"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"selector-attribute-brackets-space-inside": "never",
|
|
||||||
"selector-attribute-operator-space-after": "never",
|
|
||||||
"selector-attribute-operator-space-before": "never",
|
|
||||||
"selector-attribute-quotes": "never",
|
"selector-attribute-quotes": "never",
|
||||||
"selector-class-pattern": "^[A-Za-z0-9]+$",
|
"selector-class-pattern": "^[A-Za-z0-9]+$",
|
||||||
"selector-combinator-space-after": "always",
|
|
||||||
"selector-combinator-space-before": "always",
|
|
||||||
"selector-descendant-combinator-no-non-space": true,
|
|
||||||
"selector-list-comma-newline-after": "always",
|
|
||||||
"selector-list-comma-newline-before": "never-multi-line",
|
|
||||||
"selector-list-comma-space-before": "never",
|
|
||||||
"selector-max-attribute": 0,
|
"selector-max-attribute": 0,
|
||||||
"selector-max-class": 3,
|
"selector-max-class": 3,
|
||||||
"selector-max-compound-selectors": 3,
|
"selector-max-compound-selectors": 3,
|
||||||
"selector-max-empty-lines": 0,
|
|
||||||
"selector-max-id": 0,
|
"selector-max-id": 0,
|
||||||
"selector-max-universal": 0,
|
"selector-max-universal": 0,
|
||||||
"selector-pseudo-class-case": "lower",
|
|
||||||
"selector-pseudo-class-parentheses-space-inside": "never",
|
|
||||||
"selector-pseudo-element-case": "lower",
|
|
||||||
"selector-pseudo-element-colon-notation": "double",
|
"selector-pseudo-element-colon-notation": "double",
|
||||||
"selector-pseudo-element-no-unknown": true,
|
"selector-pseudo-element-no-unknown": true,
|
||||||
"selector-type-case": "lower",
|
"selector-type-case": "lower",
|
||||||
"selector-type-no-unknown": true,
|
"selector-type-no-unknown": true,
|
||||||
"shorthand-property-no-redundant-values": true,
|
"shorthand-property-no-redundant-values": true,
|
||||||
"string-no-newline": true,
|
"string-no-newline": true,
|
||||||
"string-quotes": "single",
|
|
||||||
"time-min-milliseconds": 100,
|
"time-min-milliseconds": 100,
|
||||||
"unit-case": "lower",
|
|
||||||
"unit-no-unknown": true,
|
"unit-no-unknown": true,
|
||||||
"value-list-comma-newline-after": "never-multi-line",
|
|
||||||
"value-list-comma-newline-before": "never-multi-line",
|
|
||||||
"value-list-comma-space-after": "always",
|
|
||||||
"value-list-comma-space-before": "never",
|
|
||||||
"value-list-max-empty-lines": 0,
|
|
||||||
"value-no-vendor-prefix": true
|
"value-no-vendor-prefix": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
7
frontend/.vscode/extensions.json
vendored
Normal file
7
frontend/.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"stylelint.vscode-stylelint",
|
||||||
|
"dbaeumer.vscode-eslint",
|
||||||
|
"esbenp.prettier-vscode"
|
||||||
|
]
|
||||||
|
}
|
||||||
23
frontend/.vscode/settings.json
vendored
Normal file
23
frontend/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
// Place your settings in this file to overwrite default and user settings.
|
||||||
|
{
|
||||||
|
"files.insertFinalNewline": true,
|
||||||
|
|
||||||
|
"files.exclude": {
|
||||||
|
"**/node_modules": true,
|
||||||
|
"**/*.d.css": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"editor.formatOnSave": false,
|
||||||
|
"editor.codeActionsOnSave": {
|
||||||
|
"source.fixAll": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"typescript.preferences.quoteStyle": "single",
|
||||||
|
|
||||||
|
"eslint.validate": [
|
||||||
|
"javascript",
|
||||||
|
"javascriptreact",
|
||||||
|
"typescript",
|
||||||
|
"typescriptreact"
|
||||||
|
],
|
||||||
|
}
|
||||||
@@ -4,20 +4,21 @@ module.exports = {
|
|||||||
plugins: [
|
plugins: [
|
||||||
// Stage 1
|
// Stage 1
|
||||||
'@babel/plugin-proposal-export-default-from',
|
'@babel/plugin-proposal-export-default-from',
|
||||||
['@babel/plugin-proposal-optional-chaining', { loose }],
|
['@babel/plugin-transform-optional-chaining', { loose }],
|
||||||
['@babel/plugin-proposal-nullish-coalescing-operator', { loose }],
|
['@babel/plugin-transform-nullish-coalescing-operator', { loose }],
|
||||||
|
|
||||||
// Stage 2
|
// Stage 2
|
||||||
'@babel/plugin-proposal-export-namespace-from',
|
'@babel/plugin-transform-export-namespace-from',
|
||||||
|
|
||||||
// Stage 3
|
// Stage 3
|
||||||
['@babel/plugin-proposal-class-properties', { loose }],
|
['@babel/plugin-transform-class-properties', { loose }],
|
||||||
'@babel/plugin-syntax-dynamic-import'
|
'@babel/plugin-syntax-dynamic-import'
|
||||||
],
|
],
|
||||||
env: {
|
env: {
|
||||||
development: {
|
development: {
|
||||||
presets: [
|
presets: [
|
||||||
['@babel/preset-react', { development: true }]
|
['@babel/preset-react', { development: true }],
|
||||||
|
'@babel/preset-typescript'
|
||||||
],
|
],
|
||||||
plugins: [
|
plugins: [
|
||||||
'babel-plugin-inline-classnames'
|
'babel-plugin-inline-classnames'
|
||||||
@@ -25,7 +26,8 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
production: {
|
production: {
|
||||||
presets: [
|
presets: [
|
||||||
'@babel/preset-react'
|
'@babel/preset-react',
|
||||||
|
'@babel/preset-typescript'
|
||||||
],
|
],
|
||||||
plugins: [
|
plugins: [
|
||||||
'babel-plugin-transform-react-remove-prop-types'
|
'babel-plugin-transform-react-remove-prop-types'
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const FileManagerPlugin = require('filemanager-webpack-plugin');
|
const FileManagerPlugin = require('filemanager-webpack-plugin');
|
||||||
@@ -5,6 +6,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|||||||
const LiveReloadPlugin = require('webpack-livereload-plugin');
|
const LiveReloadPlugin = require('webpack-livereload-plugin');
|
||||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||||
const TerserPlugin = require('terser-webpack-plugin');
|
const TerserPlugin = require('terser-webpack-plugin');
|
||||||
|
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
||||||
|
|
||||||
module.exports = (env) => {
|
module.exports = (env) => {
|
||||||
const uiFolder = 'UI';
|
const uiFolder = 'UI';
|
||||||
@@ -34,17 +36,22 @@ module.exports = (env) => {
|
|||||||
},
|
},
|
||||||
|
|
||||||
entry: {
|
entry: {
|
||||||
index: 'index.js'
|
index: 'index.ts'
|
||||||
},
|
},
|
||||||
|
|
||||||
resolve: {
|
resolve: {
|
||||||
|
extensions: [
|
||||||
|
'.ts',
|
||||||
|
'.tsx',
|
||||||
|
'.js'
|
||||||
|
],
|
||||||
modules: [
|
modules: [
|
||||||
srcFolder,
|
srcFolder,
|
||||||
path.join(srcFolder, 'Shims'),
|
path.join(srcFolder, 'Shims'),
|
||||||
'node_modules'
|
'node_modules'
|
||||||
],
|
],
|
||||||
alias: {
|
alias: {
|
||||||
jquery: 'jquery/src/jquery',
|
jquery: 'jquery/dist/jquery.min',
|
||||||
'react-middle-truncate': 'react-middle-truncate/lib/react-middle-truncate'
|
'react-middle-truncate': 'react-middle-truncate/lib/react-middle-truncate'
|
||||||
},
|
},
|
||||||
fallback: {
|
fallback: {
|
||||||
@@ -60,23 +67,23 @@ module.exports = (env) => {
|
|||||||
output: {
|
output: {
|
||||||
path: distFolder,
|
path: distFolder,
|
||||||
publicPath: '/',
|
publicPath: '/',
|
||||||
filename: '[name].js',
|
filename: '[name]-[contenthash].js',
|
||||||
sourceMapFilename: '[file].map'
|
sourceMapFilename: '[file].map'
|
||||||
},
|
},
|
||||||
|
|
||||||
optimization: {
|
optimization: {
|
||||||
moduleIds: 'deterministic',
|
moduleIds: 'deterministic',
|
||||||
chunkIds: 'named',
|
chunkIds: isProduction ? 'deterministic' : 'named'
|
||||||
splitChunks: {
|
|
||||||
chunks: 'initial',
|
|
||||||
name: 'vendors'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
performance: {
|
performance: {
|
||||||
hints: false
|
hints: false
|
||||||
},
|
},
|
||||||
|
|
||||||
|
experiments: {
|
||||||
|
topLevelAwait: true
|
||||||
|
},
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
__DEV__: !isProduction,
|
__DEV__: !isProduction,
|
||||||
@@ -84,13 +91,15 @@ module.exports = (env) => {
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
new MiniCssExtractPlugin({
|
new MiniCssExtractPlugin({
|
||||||
filename: 'Content/styles.css'
|
filename: 'Content/styles.css',
|
||||||
|
chunkFilename: 'Content/[id]-[chunkhash].css'
|
||||||
}),
|
}),
|
||||||
|
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
template: 'frontend/src/index.ejs',
|
template: 'frontend/src/index.ejs',
|
||||||
filename: 'index.html',
|
filename: 'index.html',
|
||||||
publicPath: '/'
|
publicPath: '/',
|
||||||
|
inject: false
|
||||||
}),
|
}),
|
||||||
|
|
||||||
new FileManagerPlugin({
|
new FileManagerPlugin({
|
||||||
@@ -131,6 +140,8 @@ module.exports = (env) => {
|
|||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
new ForkTsCheckerWebpackPlugin(),
|
||||||
|
|
||||||
new LiveReloadPlugin()
|
new LiveReloadPlugin()
|
||||||
],
|
],
|
||||||
|
|
||||||
@@ -154,7 +165,7 @@ module.exports = (env) => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.js?$/,
|
test: [/\.jsx?$/, /\.tsx?$/],
|
||||||
exclude: /(node_modules|JsLibraries)/,
|
exclude: /(node_modules|JsLibraries)/,
|
||||||
use: [
|
use: [
|
||||||
{
|
{
|
||||||
@@ -185,6 +196,7 @@ module.exports = (env) => {
|
|||||||
exclude: /(node_modules|globals.css)/,
|
exclude: /(node_modules|globals.css)/,
|
||||||
use: [
|
use: [
|
||||||
{ loader: MiniCssExtractPlugin.loader },
|
{ loader: MiniCssExtractPlugin.loader },
|
||||||
|
{ loader: 'css-modules-typescript-loader' },
|
||||||
{
|
{
|
||||||
loader: 'css-loader',
|
loader: 'css-loader',
|
||||||
options: {
|
options: {
|
||||||
@@ -253,18 +265,19 @@ module.exports = (env) => {
|
|||||||
config.resolve.alias['react-dom$'] = 'react-dom/profiling';
|
config.resolve.alias['react-dom$'] = 'react-dom/profiling';
|
||||||
config.resolve.alias['scheduler/tracing'] = 'scheduler/tracing-profiling';
|
config.resolve.alias['scheduler/tracing'] = 'scheduler/tracing-profiling';
|
||||||
|
|
||||||
config.optimization.minimizer = [
|
config.optimization = {
|
||||||
new TerserPlugin({
|
minimize: true,
|
||||||
cache: true,
|
minimizer: [
|
||||||
parallel: true,
|
new TerserPlugin({
|
||||||
sourceMap: true, // Must be set to true if using source-maps in production
|
terserOptions: {
|
||||||
terserOptions: {
|
sourceMap: true, // Must be set to true if using source-maps in production
|
||||||
mangle: false,
|
mangle: false,
|
||||||
keep_classnames: true,
|
keep_classnames: true,
|
||||||
keep_fnames: true
|
keep_fnames: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
];
|
]
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line filenames/match-exported
|
||||||
const loaderUtils = require('loader-utils');
|
const loaderUtils = require('loader-utils');
|
||||||
|
|
||||||
module.exports = function cssVariablesLoader(source) {
|
module.exports = function cssVariablesLoader(source) {
|
||||||
|
|||||||
4
frontend/src/.vscode/settings.json
vendored
4
frontend/src/.vscode/settings.json
vendored
@@ -1,4 +0,0 @@
|
|||||||
// Place your settings in this file to overwrite default and user settings.
|
|
||||||
{
|
|
||||||
"files.insertFinalNewline": true
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
import Alert from 'Components/Alert';
|
||||||
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
||||||
import ConfirmModal from 'Components/Modal/ConfirmModal';
|
import ConfirmModal from 'Components/Modal/ConfirmModal';
|
||||||
import PageContent from 'Components/Page/PageContent';
|
import PageContent from 'Components/Page/PageContent';
|
||||||
@@ -161,16 +162,16 @@ class Blocklist extends Component {
|
|||||||
|
|
||||||
{
|
{
|
||||||
!isAnyFetching && !!error &&
|
!isAnyFetching && !!error &&
|
||||||
<div>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('UnableToLoadBlocklist')}
|
{translate('UnableToLoadBlocklist')}
|
||||||
</div>
|
</Alert>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
isAllPopulated && !error && !items.length &&
|
isAllPopulated && !error && !items.length &&
|
||||||
<div>
|
<Alert kind={kinds.INFO}>
|
||||||
{translate('NoHistoryBlocklist')}
|
{translate('NoHistoryBlocklist')}
|
||||||
</div>
|
</Alert>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -214,7 +215,7 @@ class Blocklist extends Component {
|
|||||||
isOpen={isConfirmRemoveModalOpen}
|
isOpen={isConfirmRemoveModalOpen}
|
||||||
kind={kinds.DANGER}
|
kind={kinds.DANGER}
|
||||||
title={translate('RemoveSelected')}
|
title={translate('RemoveSelected')}
|
||||||
message={translate('RemoveSelectedMessageText')}
|
message={translate('RemoveSelectedItemBlocklistMessageText')}
|
||||||
confirmLabel={translate('RemoveSelected')}
|
confirmLabel={translate('RemoveSelected')}
|
||||||
onConfirm={this.onRemoveSelectedConfirmed}
|
onConfirm={this.onRemoveSelectedConfirmed}
|
||||||
onCancel={this.onConfirmRemoveModalClose}
|
onCancel={this.onConfirmRemoveModalClose}
|
||||||
|
|||||||
9
frontend/src/Activity/Blocklist/BlocklistRow.css.d.ts
vendored
Normal file
9
frontend/src/Activity/Blocklist/BlocklistRow.css.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'actions': string;
|
||||||
|
'indexer': string;
|
||||||
|
'quality': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
7
frontend/src/Activity/History/Details/HistoryDetails.css.d.ts
vendored
Normal file
7
frontend/src/Activity/History/Details/HistoryDetails.css.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'description': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -9,7 +9,7 @@ import Link from 'Components/Link/Link';
|
|||||||
import { icons } from 'Helpers/Props';
|
import { icons } from 'Helpers/Props';
|
||||||
import formatDateTime from 'Utilities/Date/formatDateTime';
|
import formatDateTime from 'Utilities/Date/formatDateTime';
|
||||||
import formatAge from 'Utilities/Number/formatAge';
|
import formatAge from 'Utilities/Number/formatAge';
|
||||||
import formatPreferredWordScore from 'Utilities/Number/formatPreferredWordScore';
|
import formatCustomFormatScore from 'Utilities/Number/formatCustomFormatScore';
|
||||||
import translate from 'Utilities/String/translate';
|
import translate from 'Utilities/String/translate';
|
||||||
import styles from './HistoryDetails.css';
|
import styles from './HistoryDetails.css';
|
||||||
|
|
||||||
@@ -107,8 +107,8 @@ function HistoryDetails(props) {
|
|||||||
{
|
{
|
||||||
customFormatScore && customFormatScore !== '0' ?
|
customFormatScore && customFormatScore !== '0' ?
|
||||||
<DescriptionListItem
|
<DescriptionListItem
|
||||||
title="Custom Format Score"
|
title={translate('CustomFormatScore')}
|
||||||
data={formatPreferredWordScore(customFormatScore)}
|
data={formatCustomFormatScore(customFormatScore)}
|
||||||
/> :
|
/> :
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
@@ -224,8 +224,8 @@ function HistoryDetails(props) {
|
|||||||
{
|
{
|
||||||
customFormatScore && customFormatScore !== '0' ?
|
customFormatScore && customFormatScore !== '0' ?
|
||||||
<DescriptionListItem
|
<DescriptionListItem
|
||||||
title="Custom Format Score"
|
title={translate('CustomFormatScore')}
|
||||||
data={formatPreferredWordScore(customFormatScore)}
|
data={formatCustomFormatScore(customFormatScore)}
|
||||||
/> :
|
/> :
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
@@ -270,8 +270,8 @@ function HistoryDetails(props) {
|
|||||||
{
|
{
|
||||||
customFormatScore && customFormatScore !== '0' ?
|
customFormatScore && customFormatScore !== '0' ?
|
||||||
<DescriptionListItem
|
<DescriptionListItem
|
||||||
title="Custom Format Score"
|
title={translate('CustomFormatScore')}
|
||||||
data={formatPreferredWordScore(customFormatScore)}
|
data={formatCustomFormatScore(customFormatScore)}
|
||||||
/> :
|
/> :
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|||||||
7
frontend/src/Activity/History/Details/HistoryDetailsModal.css.d.ts
vendored
Normal file
7
frontend/src/Activity/History/Details/HistoryDetailsModal.css.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'markAsFailedButton': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
import Alert from 'Components/Alert';
|
||||||
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
||||||
import FilterMenu from 'Components/Menu/FilterMenu';
|
import FilterMenu from 'Components/Menu/FilterMenu';
|
||||||
import PageContent from 'Components/Page/PageContent';
|
import PageContent from 'Components/Page/PageContent';
|
||||||
@@ -11,7 +12,7 @@ import Table from 'Components/Table/Table';
|
|||||||
import TableBody from 'Components/Table/TableBody';
|
import TableBody from 'Components/Table/TableBody';
|
||||||
import TableOptionsModalWrapper from 'Components/Table/TableOptions/TableOptionsModalWrapper';
|
import TableOptionsModalWrapper from 'Components/Table/TableOptions/TableOptionsModalWrapper';
|
||||||
import TablePager from 'Components/Table/TablePager';
|
import TablePager from 'Components/Table/TablePager';
|
||||||
import { align, icons } from 'Helpers/Props';
|
import { align, icons, kinds } from 'Helpers/Props';
|
||||||
import translate from 'Utilities/String/translate';
|
import translate from 'Utilities/String/translate';
|
||||||
import HistoryRowConnector from './HistoryRowConnector';
|
import HistoryRowConnector from './HistoryRowConnector';
|
||||||
|
|
||||||
@@ -85,9 +86,9 @@ class History extends Component {
|
|||||||
|
|
||||||
{
|
{
|
||||||
!isFetchingAny && hasError &&
|
!isFetchingAny && hasError &&
|
||||||
<div>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('UnableToLoadHistory')}
|
{translate('UnableToLoadHistory')}
|
||||||
</div>
|
</Alert>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -95,9 +96,9 @@ class History extends Component {
|
|||||||
// wait for the books to populate because they are never coming.
|
// wait for the books to populate because they are never coming.
|
||||||
|
|
||||||
isPopulated && !hasError && !items.length &&
|
isPopulated && !hasError && !items.length &&
|
||||||
<div>
|
<Alert kind={kinds.INFO}>
|
||||||
No history found
|
{translate('NoHistory')}
|
||||||
</div>
|
</Alert>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
7
frontend/src/Activity/History/HistoryEventTypeCell.css.d.ts
vendored
Normal file
7
frontend/src/Activity/History/HistoryEventTypeCell.css.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'cell': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
11
frontend/src/Activity/History/HistoryRow.css.d.ts
vendored
Normal file
11
frontend/src/Activity/History/HistoryRow.css.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'customFormatScore': string;
|
||||||
|
'details': string;
|
||||||
|
'downloadClient': string;
|
||||||
|
'indexer': string;
|
||||||
|
'releaseGroup': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -8,8 +8,9 @@ import IconButton from 'Components/Link/IconButton';
|
|||||||
import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector';
|
import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector';
|
||||||
import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
||||||
import TableRow from 'Components/Table/TableRow';
|
import TableRow from 'Components/Table/TableRow';
|
||||||
import { icons } from 'Helpers/Props';
|
import Tooltip from 'Components/Tooltip/Tooltip';
|
||||||
import formatPreferredWordScore from 'Utilities/Number/formatPreferredWordScore';
|
import { icons, tooltipPositions } from 'Helpers/Props';
|
||||||
|
import formatCustomFormatScore from 'Utilities/Number/formatCustomFormatScore';
|
||||||
import HistoryDetailsModal from './Details/HistoryDetailsModal';
|
import HistoryDetailsModal from './Details/HistoryDetailsModal';
|
||||||
import HistoryEventTypeCell from './HistoryEventTypeCell';
|
import HistoryEventTypeCell from './HistoryEventTypeCell';
|
||||||
import styles from './HistoryRow.css';
|
import styles from './HistoryRow.css';
|
||||||
@@ -57,6 +58,7 @@ class HistoryRow extends Component {
|
|||||||
book,
|
book,
|
||||||
quality,
|
quality,
|
||||||
customFormats,
|
customFormats,
|
||||||
|
customFormatScore,
|
||||||
qualityCutoffNotMet,
|
qualityCutoffNotMet,
|
||||||
eventType,
|
eventType,
|
||||||
sourceTitle,
|
sourceTitle,
|
||||||
@@ -177,7 +179,14 @@ class HistoryRow extends Component {
|
|||||||
key={name}
|
key={name}
|
||||||
className={styles.customFormatScore}
|
className={styles.customFormatScore}
|
||||||
>
|
>
|
||||||
{formatPreferredWordScore(data.customFormatScore)}
|
<Tooltip
|
||||||
|
anchor={formatCustomFormatScore(
|
||||||
|
customFormatScore,
|
||||||
|
customFormats.length
|
||||||
|
)}
|
||||||
|
tooltip={<BookFormats formats={customFormats} />}
|
||||||
|
position={tooltipPositions.BOTTOM}
|
||||||
|
/>
|
||||||
</TableRowCell>
|
</TableRowCell>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -244,6 +253,7 @@ HistoryRow.propTypes = {
|
|||||||
book: PropTypes.object,
|
book: PropTypes.object,
|
||||||
quality: PropTypes.object.isRequired,
|
quality: PropTypes.object.isRequired,
|
||||||
customFormats: PropTypes.arrayOf(PropTypes.object),
|
customFormats: PropTypes.arrayOf(PropTypes.object),
|
||||||
|
customFormatScore: PropTypes.number.isRequired,
|
||||||
qualityCutoffNotMet: PropTypes.bool.isRequired,
|
qualityCutoffNotMet: PropTypes.bool.isRequired,
|
||||||
eventType: PropTypes.string.isRequired,
|
eventType: PropTypes.string.isRequired,
|
||||||
sourceTitle: PropTypes.string.isRequired,
|
sourceTitle: PropTypes.string.isRequired,
|
||||||
@@ -257,4 +267,8 @@ HistoryRow.propTypes = {
|
|||||||
onMarkAsFailedPress: PropTypes.func.isRequired
|
onMarkAsFailedPress: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
|
HistoryRow.defaultProps = {
|
||||||
|
customFormats: []
|
||||||
|
};
|
||||||
|
|
||||||
export default HistoryRow;
|
export default HistoryRow;
|
||||||
|
|||||||
8
frontend/src/Activity/Queue/ProtocolLabel.css.d.ts
vendored
Normal file
8
frontend/src/Activity/Queue/ProtocolLabel.css.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'torrent': string;
|
||||||
|
'usenet': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
import Alert from 'Components/Alert';
|
||||||
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
||||||
import PageContent from 'Components/Page/PageContent';
|
import PageContent from 'Components/Page/PageContent';
|
||||||
import PageContentBody from 'Components/Page/PageContentBody';
|
import PageContentBody from 'Components/Page/PageContentBody';
|
||||||
@@ -12,7 +13,7 @@ import Table from 'Components/Table/Table';
|
|||||||
import TableBody from 'Components/Table/TableBody';
|
import TableBody from 'Components/Table/TableBody';
|
||||||
import TableOptionsModalWrapper from 'Components/Table/TableOptions/TableOptionsModalWrapper';
|
import TableOptionsModalWrapper from 'Components/Table/TableOptions/TableOptionsModalWrapper';
|
||||||
import TablePager from 'Components/Table/TablePager';
|
import TablePager from 'Components/Table/TablePager';
|
||||||
import { align, icons } from 'Helpers/Props';
|
import { align, icons, kinds } from 'Helpers/Props';
|
||||||
import getRemovedItems from 'Utilities/Object/getRemovedItems';
|
import getRemovedItems from 'Utilities/Object/getRemovedItems';
|
||||||
import hasDifferentItems from 'Utilities/Object/hasDifferentItems';
|
import hasDifferentItems from 'Utilities/Object/hasDifferentItems';
|
||||||
import translate from 'Utilities/String/translate';
|
import translate from 'Utilities/String/translate';
|
||||||
@@ -233,17 +234,17 @@ class Queue extends Component {
|
|||||||
|
|
||||||
{
|
{
|
||||||
!isRefreshing && hasError ?
|
!isRefreshing && hasError ?
|
||||||
<div>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('FailedToLoadQueue')}
|
{translate('FailedToLoadQueue')}
|
||||||
</div> :
|
</Alert> :
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
isAllPopulated && !hasError && !items.length ?
|
isAllPopulated && !hasError && !items.length ?
|
||||||
<div>
|
<Alert kind={kinds.INFO}>
|
||||||
{translate('QueueIsEmpty')}
|
{translate('QueueIsEmpty')}
|
||||||
</div> :
|
</Alert> :
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -337,4 +338,8 @@ Queue.propTypes = {
|
|||||||
onRemoveSelectedPress: PropTypes.func.isRequired
|
onRemoveSelectedPress: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Queue.defaultProps = {
|
||||||
|
count: 0
|
||||||
|
};
|
||||||
|
|
||||||
export default Queue;
|
export default Queue;
|
||||||
|
|||||||
@@ -16,6 +16,12 @@
|
|||||||
width: 150px;
|
width: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.customFormatScore {
|
||||||
|
composes: cell from '~Components/Table/Cells/TableRowCell.css';
|
||||||
|
|
||||||
|
width: 55px;
|
||||||
|
}
|
||||||
|
|
||||||
.actions {
|
.actions {
|
||||||
composes: cell from '~Components/Table/Cells/TableRowCell.css';
|
composes: cell from '~Components/Table/Cells/TableRowCell.css';
|
||||||
|
|
||||||
|
|||||||
11
frontend/src/Activity/Queue/QueueRow.css.d.ts
vendored
Normal file
11
frontend/src/Activity/Queue/QueueRow.css.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'actions': string;
|
||||||
|
'customFormatScore': string;
|
||||||
|
'progress': string;
|
||||||
|
'protocol': string;
|
||||||
|
'quality': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -14,9 +14,11 @@ import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
|||||||
import TableSelectCell from 'Components/Table/Cells/TableSelectCell';
|
import TableSelectCell from 'Components/Table/Cells/TableSelectCell';
|
||||||
import TableRow from 'Components/Table/TableRow';
|
import TableRow from 'Components/Table/TableRow';
|
||||||
import Popover from 'Components/Tooltip/Popover';
|
import Popover from 'Components/Tooltip/Popover';
|
||||||
|
import Tooltip from 'Components/Tooltip/Tooltip';
|
||||||
import { icons, kinds, tooltipPositions } from 'Helpers/Props';
|
import { icons, kinds, tooltipPositions } from 'Helpers/Props';
|
||||||
import InteractiveImportModal from 'InteractiveImport/InteractiveImportModal';
|
import InteractiveImportModal from 'InteractiveImport/InteractiveImportModal';
|
||||||
import formatBytes from 'Utilities/Number/formatBytes';
|
import formatBytes from 'Utilities/Number/formatBytes';
|
||||||
|
import formatCustomFormatScore from 'Utilities/Number/formatCustomFormatScore';
|
||||||
import translate from 'Utilities/String/translate';
|
import translate from 'Utilities/String/translate';
|
||||||
import QueueStatusCell from './QueueStatusCell';
|
import QueueStatusCell from './QueueStatusCell';
|
||||||
import RemoveQueueItemModal from './RemoveQueueItemModal';
|
import RemoveQueueItemModal from './RemoveQueueItemModal';
|
||||||
@@ -44,14 +46,14 @@ class QueueRow extends Component {
|
|||||||
this.setState({ isRemoveQueueItemModalOpen: true });
|
this.setState({ isRemoveQueueItemModalOpen: true });
|
||||||
};
|
};
|
||||||
|
|
||||||
onRemoveQueueItemModalConfirmed = (blocklist, skipredownload) => {
|
onRemoveQueueItemModalConfirmed = (blocklist, skipRedownload) => {
|
||||||
const {
|
const {
|
||||||
onRemoveQueueItemPress,
|
onRemoveQueueItemPress,
|
||||||
onQueueRowModalOpenOrClose
|
onQueueRowModalOpenOrClose
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
onQueueRowModalOpenOrClose(false);
|
onQueueRowModalOpenOrClose(false);
|
||||||
onRemoveQueueItemPress(blocklist, skipredownload);
|
onRemoveQueueItemPress(blocklist, skipRedownload);
|
||||||
|
|
||||||
this.setState({ isRemoveQueueItemModalOpen: false });
|
this.setState({ isRemoveQueueItemModalOpen: false });
|
||||||
};
|
};
|
||||||
@@ -91,6 +93,7 @@ class QueueRow extends Component {
|
|||||||
book,
|
book,
|
||||||
quality,
|
quality,
|
||||||
customFormats,
|
customFormats,
|
||||||
|
customFormatScore,
|
||||||
protocol,
|
protocol,
|
||||||
indexer,
|
indexer,
|
||||||
outputPath,
|
outputPath,
|
||||||
@@ -222,6 +225,24 @@ class QueueRow extends Component {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (name === 'customFormatScore') {
|
||||||
|
return (
|
||||||
|
<TableRowCell
|
||||||
|
key={name}
|
||||||
|
className={styles.customFormatScore}
|
||||||
|
>
|
||||||
|
<Tooltip
|
||||||
|
anchor={formatCustomFormatScore(
|
||||||
|
customFormatScore,
|
||||||
|
customFormats.length
|
||||||
|
)}
|
||||||
|
tooltip={<BookFormats formats={customFormats} />}
|
||||||
|
position={tooltipPositions.BOTTOM}
|
||||||
|
/>
|
||||||
|
</TableRowCell>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (name === 'protocol') {
|
if (name === 'protocol') {
|
||||||
return (
|
return (
|
||||||
<TableRowCell key={name}>
|
<TableRowCell key={name}>
|
||||||
@@ -392,6 +413,7 @@ QueueRow.propTypes = {
|
|||||||
book: PropTypes.object,
|
book: PropTypes.object,
|
||||||
quality: PropTypes.object.isRequired,
|
quality: PropTypes.object.isRequired,
|
||||||
customFormats: PropTypes.arrayOf(PropTypes.object),
|
customFormats: PropTypes.arrayOf(PropTypes.object),
|
||||||
|
customFormatScore: PropTypes.number.isRequired,
|
||||||
protocol: PropTypes.string.isRequired,
|
protocol: PropTypes.string.isRequired,
|
||||||
indexer: PropTypes.string,
|
indexer: PropTypes.string,
|
||||||
outputPath: PropTypes.string,
|
outputPath: PropTypes.string,
|
||||||
@@ -416,6 +438,7 @@ QueueRow.propTypes = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
QueueRow.defaultProps = {
|
QueueRow.defaultProps = {
|
||||||
|
customFormats: [],
|
||||||
isGrabbing: false,
|
isGrabbing: false,
|
||||||
isRemoving: false
|
isRemoving: false
|
||||||
};
|
};
|
||||||
|
|||||||
7
frontend/src/Activity/Queue/QueueStatusCell.css.d.ts
vendored
Normal file
7
frontend/src/Activity/Queue/QueueStatusCell.css.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'status': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -23,7 +23,7 @@ class RemoveQueueItemModal extends Component {
|
|||||||
this.state = {
|
this.state = {
|
||||||
remove: true,
|
remove: true,
|
||||||
blocklist: false,
|
blocklist: false,
|
||||||
skipredownload: false
|
skipRedownload: false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ class RemoveQueueItemModal extends Component {
|
|||||||
this.setState({
|
this.setState({
|
||||||
remove: true,
|
remove: true,
|
||||||
blocklist: false,
|
blocklist: false,
|
||||||
skipredownload: false
|
skipRedownload: false
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -49,8 +49,8 @@ class RemoveQueueItemModal extends Component {
|
|||||||
this.setState({ blocklist: value });
|
this.setState({ blocklist: value });
|
||||||
};
|
};
|
||||||
|
|
||||||
onSkipReDownloadChange = ({ value }) => {
|
onSkipRedownloadChange = ({ value }) => {
|
||||||
this.setState({ skipredownload: value });
|
this.setState({ skipRedownload: value });
|
||||||
};
|
};
|
||||||
|
|
||||||
onRemoveConfirmed = () => {
|
onRemoveConfirmed = () => {
|
||||||
@@ -76,7 +76,7 @@ class RemoveQueueItemModal extends Component {
|
|||||||
isPending
|
isPending
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const { remove, blocklist, skipredownload } = this.state;
|
const { remove, blocklist, skipRedownload } = this.state;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
@@ -124,7 +124,7 @@ class RemoveQueueItemModal extends Component {
|
|||||||
type={inputTypes.CHECK}
|
type={inputTypes.CHECK}
|
||||||
name="blocklist"
|
name="blocklist"
|
||||||
value={blocklist}
|
value={blocklist}
|
||||||
helpText={translate('BlocklistHelpText')}
|
helpText={translate('BlocklistReleaseHelpText')}
|
||||||
onChange={this.onBlocklistChange}
|
onChange={this.onBlocklistChange}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
@@ -137,10 +137,10 @@ class RemoveQueueItemModal extends Component {
|
|||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormInputGroup
|
<FormInputGroup
|
||||||
type={inputTypes.CHECK}
|
type={inputTypes.CHECK}
|
||||||
name="skipredownload"
|
name="skipRedownload"
|
||||||
value={skipredownload}
|
value={skipRedownload}
|
||||||
helpText={translate('SkipredownloadHelpText')}
|
helpText={translate('SkipRedownloadHelpText')}
|
||||||
onChange={this.onSkipReDownloadChange}
|
onChange={this.onSkipRedownloadChange}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
}
|
}
|
||||||
|
|||||||
7
frontend/src/Activity/Queue/RemoveQueueItemsModal.css.d.ts
vendored
Normal file
7
frontend/src/Activity/Queue/RemoveQueueItemsModal.css.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'message': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -24,7 +24,7 @@ class RemoveQueueItemsModal extends Component {
|
|||||||
this.state = {
|
this.state = {
|
||||||
remove: true,
|
remove: true,
|
||||||
blocklist: false,
|
blocklist: false,
|
||||||
skipredownload: false
|
skipRedownload: false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ class RemoveQueueItemsModal extends Component {
|
|||||||
this.setState({
|
this.setState({
|
||||||
remove: true,
|
remove: true,
|
||||||
blocklist: false,
|
blocklist: false,
|
||||||
skipredownload: false
|
skipRedownload: false
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -50,8 +50,8 @@ class RemoveQueueItemsModal extends Component {
|
|||||||
this.setState({ blocklist: value });
|
this.setState({ blocklist: value });
|
||||||
};
|
};
|
||||||
|
|
||||||
onSkipReDownloadChange = ({ value }) => {
|
onSkipRedownloadChange = ({ value }) => {
|
||||||
this.setState({ skipredownload: value });
|
this.setState({ skipRedownload: value });
|
||||||
};
|
};
|
||||||
|
|
||||||
onRemoveConfirmed = () => {
|
onRemoveConfirmed = () => {
|
||||||
@@ -77,7 +77,7 @@ class RemoveQueueItemsModal extends Component {
|
|||||||
allPending
|
allPending
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const { remove, blocklist, skipredownload } = this.state;
|
const { remove, blocklist, skipRedownload } = this.state;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
@@ -89,12 +89,12 @@ class RemoveQueueItemsModal extends Component {
|
|||||||
onModalClose={this.onModalClose}
|
onModalClose={this.onModalClose}
|
||||||
>
|
>
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
Remove Selected Item{selectedCount > 1 ? 's' : ''}
|
{selectedCount > 1 ? translate('RemoveSelectedItems') : translate('RemoveSelectedItem')}
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
|
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<div className={styles.message}>
|
<div className={styles.message}>
|
||||||
Are you sure you want to remove {selectedCount} item{selectedCount > 1 ? 's' : ''} from the queue?
|
{selectedCount > 1 ? translate('RemoveSelectedItemsQueueMessageText', selectedCount) : translate('RemoveSelectedItemQueueMessageText')}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -118,14 +118,14 @@ class RemoveQueueItemsModal extends Component {
|
|||||||
|
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
<FormLabel>
|
<FormLabel>
|
||||||
Add Release{selectedCount > 1 ? 's' : ''} To Blocklist
|
{selectedCount > 1 ? translate('BlocklistReleases') : translate('BlocklistRelease')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
|
|
||||||
<FormInputGroup
|
<FormInputGroup
|
||||||
type={inputTypes.CHECK}
|
type={inputTypes.CHECK}
|
||||||
name="blocklist"
|
name="blocklist"
|
||||||
value={blocklist}
|
value={blocklist}
|
||||||
helpText={translate('BlocklistHelpText')}
|
helpText={translate('BlocklistReleaseHelpText')}
|
||||||
onChange={this.onBlocklistChange}
|
onChange={this.onBlocklistChange}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
@@ -138,10 +138,10 @@ class RemoveQueueItemsModal extends Component {
|
|||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormInputGroup
|
<FormInputGroup
|
||||||
type={inputTypes.CHECK}
|
type={inputTypes.CHECK}
|
||||||
name="skipredownload"
|
name="skipRedownload"
|
||||||
value={skipredownload}
|
value={skipRedownload}
|
||||||
helpText={translate('SkipredownloadHelpText')}
|
helpText={translate('SkipRedownloadHelpText')}
|
||||||
onChange={this.onSkipReDownloadChange}
|
onChange={this.onSkipRedownloadChange}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
}
|
}
|
||||||
@@ -150,14 +150,14 @@ class RemoveQueueItemsModal extends Component {
|
|||||||
|
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button onPress={this.onModalClose}>
|
<Button onPress={this.onModalClose}>
|
||||||
Close
|
{translate('Close')}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
kind={kinds.DANGER}
|
kind={kinds.DANGER}
|
||||||
onPress={this.onRemoveConfirmed}
|
onPress={this.onRemoveConfirmed}
|
||||||
>
|
>
|
||||||
Remove
|
{translate('Remove')}
|
||||||
</Button>
|
</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
|
|||||||
7
frontend/src/Activity/Queue/TimeleftCell.css.d.ts
vendored
Normal file
7
frontend/src/Activity/Queue/TimeleftCell.css.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'timeleft': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
.version {
|
.version {
|
||||||
margin: 0 3px;
|
margin: 0 3px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
font-family: var(--defaultFontFamily);
|
||||||
}
|
}
|
||||||
|
|
||||||
.maintenance {
|
.maintenance {
|
||||||
|
|||||||
9
frontend/src/App/AppUpdatedModalContent.css.d.ts
vendored
Normal file
9
frontend/src/App/AppUpdatedModalContent.css.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'changes': string;
|
||||||
|
'maintenance': string;
|
||||||
|
'version': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -2,6 +2,7 @@ import PropTypes from 'prop-types';
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Button from 'Components/Link/Button';
|
import Button from 'Components/Link/Button';
|
||||||
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
||||||
|
import InlineMarkdown from 'Components/Markdown/InlineMarkdown';
|
||||||
import ModalBody from 'Components/Modal/ModalBody';
|
import ModalBody from 'Components/Modal/ModalBody';
|
||||||
import ModalContent from 'Components/Modal/ModalContent';
|
import ModalContent from 'Components/Modal/ModalContent';
|
||||||
import ModalFooter from 'Components/Modal/ModalFooter';
|
import ModalFooter from 'Components/Modal/ModalFooter';
|
||||||
@@ -64,12 +65,12 @@ function AppUpdatedModalContent(props) {
|
|||||||
return (
|
return (
|
||||||
<ModalContent onModalClose={onModalClose}>
|
<ModalContent onModalClose={onModalClose}>
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
Readarr Updated
|
{translate('AppUpdated', { appName: 'Readarr' })}
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
|
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<div>
|
<div>
|
||||||
Version <span className={styles.version}>{version}</span> of Readarr has been installed, in order to get the latest changes you'll need to reload Readarr.
|
<InlineMarkdown data={translate('AppUpdatedVersion', { appName: 'Readarr', version })} blockClassName={styles.version} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -77,16 +78,14 @@ function AppUpdatedModalContent(props) {
|
|||||||
<div>
|
<div>
|
||||||
{
|
{
|
||||||
!update.changes &&
|
!update.changes &&
|
||||||
<div className={styles.maintenance}>
|
<div className={styles.maintenance}>{translate('MaintenanceRelease')}</div>
|
||||||
{translate('MaintenanceRelease')}
|
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
!!update.changes &&
|
!!update.changes &&
|
||||||
<div>
|
<div>
|
||||||
<div className={styles.changes}>
|
<div className={styles.changes}>
|
||||||
What's new?
|
{translate('WhatsNew')}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<UpdateChanges
|
<UpdateChanges
|
||||||
@@ -113,14 +112,14 @@ function AppUpdatedModalContent(props) {
|
|||||||
<Button
|
<Button
|
||||||
onPress={onSeeChangesPress}
|
onPress={onSeeChangesPress}
|
||||||
>
|
>
|
||||||
Recent Changes
|
{translate('RecentChanges')}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
kind={kinds.PRIMARY}
|
kind={kinds.PRIMARY}
|
||||||
onPress={onModalClose}
|
onPress={onModalClose}
|
||||||
>
|
>
|
||||||
Reload
|
{translate('Reload')}
|
||||||
</Button>
|
</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
|
|||||||
7
frontend/src/App/ConnectionLostModal.css.d.ts
vendored
Normal file
7
frontend/src/App/ConnectionLostModal.css.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'automatic': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -7,6 +7,7 @@ import ModalContent from 'Components/Modal/ModalContent';
|
|||||||
import ModalFooter from 'Components/Modal/ModalFooter';
|
import ModalFooter from 'Components/Modal/ModalFooter';
|
||||||
import ModalHeader from 'Components/Modal/ModalHeader';
|
import ModalHeader from 'Components/Modal/ModalHeader';
|
||||||
import { kinds } from 'Helpers/Props';
|
import { kinds } from 'Helpers/Props';
|
||||||
|
import translate from 'Utilities/String/translate';
|
||||||
import styles from './ConnectionLostModal.css';
|
import styles from './ConnectionLostModal.css';
|
||||||
|
|
||||||
function ConnectionLostModal(props) {
|
function ConnectionLostModal(props) {
|
||||||
@@ -22,16 +23,16 @@ function ConnectionLostModal(props) {
|
|||||||
>
|
>
|
||||||
<ModalContent onModalClose={onModalClose}>
|
<ModalContent onModalClose={onModalClose}>
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
Connection Lost
|
{translate('ConnectionLost')}
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
|
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<div>
|
<div>
|
||||||
Readarr has lost its connection to the backend and will need to be reloaded to restore functionality.
|
{translate('ConnectionLostToBackend', { appName: 'Readarr' })}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.automatic}>
|
<div className={styles.automatic}>
|
||||||
Readarr will try to connect automatically, or you can click reload below.
|
{translate('ConnectionLostReconnect', { appName: 'Readarr' })}
|
||||||
</div>
|
</div>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
@@ -39,7 +40,7 @@ function ConnectionLostModal(props) {
|
|||||||
kind={kinds.PRIMARY}
|
kind={kinds.PRIMARY}
|
||||||
onPress={onModalClose}
|
onPress={onModalClose}
|
||||||
>
|
>
|
||||||
Reload
|
{translate('Reload')}
|
||||||
</Button>
|
</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
|
|||||||
5
frontend/src/App/ModelBase.ts
Normal file
5
frontend/src/App/ModelBase.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
interface ModelBase {
|
||||||
|
id: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ModelBase;
|
||||||
48
frontend/src/App/State/AppSectionState.ts
Normal file
48
frontend/src/App/State/AppSectionState.ts
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
import SortDirection from 'Helpers/Props/SortDirection';
|
||||||
|
|
||||||
|
export interface Error {
|
||||||
|
responseJSON: {
|
||||||
|
message: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AppSectionDeleteState {
|
||||||
|
isDeleting: boolean;
|
||||||
|
deleteError: Error;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AppSectionSaveState {
|
||||||
|
isSaving: boolean;
|
||||||
|
saveError: Error;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PagedAppSectionState {
|
||||||
|
pageSize: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AppSectionSchemaState<T> {
|
||||||
|
isSchemaFetching: boolean;
|
||||||
|
isSchemaPopulated: boolean;
|
||||||
|
schemaError: Error;
|
||||||
|
schema: {
|
||||||
|
items: T[];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AppSectionItemState<T> {
|
||||||
|
isFetching: boolean;
|
||||||
|
isPopulated: boolean;
|
||||||
|
error: Error;
|
||||||
|
item: T;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface AppSectionState<T> {
|
||||||
|
isFetching: boolean;
|
||||||
|
isPopulated: boolean;
|
||||||
|
error: Error;
|
||||||
|
items: T[];
|
||||||
|
sortKey: string;
|
||||||
|
sortDirection: SortDirection;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AppSectionState;
|
||||||
41
frontend/src/App/State/AppState.ts
Normal file
41
frontend/src/App/State/AppState.ts
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
import SettingsAppState from './SettingsAppState';
|
||||||
|
import TagsAppState from './TagsAppState';
|
||||||
|
|
||||||
|
interface FilterBuilderPropOption {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface FilterBuilderProp<T> {
|
||||||
|
name: string;
|
||||||
|
label: string;
|
||||||
|
type: string;
|
||||||
|
valueType?: string;
|
||||||
|
optionsSelector?: (items: T[]) => FilterBuilderPropOption[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PropertyFilter {
|
||||||
|
key: string;
|
||||||
|
value: boolean | string | number | string[] | number[];
|
||||||
|
type: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Filter {
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
filers: PropertyFilter[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CustomFilter {
|
||||||
|
id: number;
|
||||||
|
type: string;
|
||||||
|
label: string;
|
||||||
|
filers: PropertyFilter[];
|
||||||
|
}
|
||||||
|
|
||||||
|
interface AppState {
|
||||||
|
settings: SettingsAppState;
|
||||||
|
tags: TagsAppState;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AppState;
|
||||||
40
frontend/src/App/State/SettingsAppState.ts
Normal file
40
frontend/src/App/State/SettingsAppState.ts
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
import AppSectionState, {
|
||||||
|
AppSectionDeleteState,
|
||||||
|
AppSectionSaveState,
|
||||||
|
} from 'App/State/AppSectionState';
|
||||||
|
import DownloadClient from 'typings/DownloadClient';
|
||||||
|
import ImportList from 'typings/ImportList';
|
||||||
|
import Indexer from 'typings/Indexer';
|
||||||
|
import Notification from 'typings/Notification';
|
||||||
|
import { UiSettings } from 'typings/UiSettings';
|
||||||
|
|
||||||
|
export interface DownloadClientAppState
|
||||||
|
extends AppSectionState<DownloadClient>,
|
||||||
|
AppSectionDeleteState,
|
||||||
|
AppSectionSaveState {}
|
||||||
|
|
||||||
|
export interface ImportListAppState
|
||||||
|
extends AppSectionState<ImportList>,
|
||||||
|
AppSectionDeleteState,
|
||||||
|
AppSectionSaveState {}
|
||||||
|
|
||||||
|
export interface IndexerAppState
|
||||||
|
extends AppSectionState<Indexer>,
|
||||||
|
AppSectionDeleteState,
|
||||||
|
AppSectionSaveState {}
|
||||||
|
|
||||||
|
export interface NotificationAppState
|
||||||
|
extends AppSectionState<Notification>,
|
||||||
|
AppSectionDeleteState {}
|
||||||
|
|
||||||
|
export type UiSettingsAppState = AppSectionState<UiSettings>;
|
||||||
|
|
||||||
|
interface SettingsAppState {
|
||||||
|
downloadClients: DownloadClientAppState;
|
||||||
|
importLists: ImportListAppState;
|
||||||
|
indexers: IndexerAppState;
|
||||||
|
notifications: NotificationAppState;
|
||||||
|
uiSettings: UiSettingsAppState;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default SettingsAppState;
|
||||||
12
frontend/src/App/State/TagsAppState.ts
Normal file
12
frontend/src/App/State/TagsAppState.ts
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import ModelBase from 'App/ModelBase';
|
||||||
|
import AppSectionState, {
|
||||||
|
AppSectionDeleteState,
|
||||||
|
} from 'App/State/AppSectionState';
|
||||||
|
|
||||||
|
export interface Tag extends ModelBase {
|
||||||
|
label: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface TagsAppState extends AppSectionState<Tag>, AppSectionDeleteState {}
|
||||||
|
|
||||||
|
export default TagsAppState;
|
||||||
@@ -7,13 +7,10 @@ function findImage(images, coverType) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getUrl(image, coverType, size) {
|
function getUrl(image, coverType, size) {
|
||||||
if (image) {
|
const imageUrl = image?.url;
|
||||||
// Remove protocol
|
|
||||||
let url = image.url;
|
|
||||||
|
|
||||||
url = url.replace(`${coverType}.jpg`, `${coverType}-${size}.jpg`);
|
if (imageUrl) {
|
||||||
|
return imageUrl.replace(`${coverType}.jpg`, `${coverType}-${size}.jpg`);
|
||||||
return url;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
9
frontend/src/Author/Delete/DeleteAuthorModalContent.css.d.ts
vendored
Normal file
9
frontend/src/Author/Delete/DeleteAuthorModalContent.css.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'deleteFilesMessage': string;
|
||||||
|
'pathContainer': string;
|
||||||
|
'pathIcon': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
7
frontend/src/Author/Details/AuthorAlternateTitles.css.d.ts
vendored
Normal file
7
frontend/src/Author/Details/AuthorAlternateTitles.css.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'alternateTitle': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -44,6 +44,10 @@
|
|||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.filterIcon {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
.authorNavigationButtons {
|
.authorNavigationButtons {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|||||||
18
frontend/src/Author/Details/AuthorDetails.css.d.ts
vendored
Normal file
18
frontend/src/Author/Details/AuthorDetails.css.d.ts
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'authorNavigationButton': string;
|
||||||
|
'authorNavigationButtons': string;
|
||||||
|
'authorUpButton': string;
|
||||||
|
'contentContainer': string;
|
||||||
|
'errorMessage': string;
|
||||||
|
'filterIcon': string;
|
||||||
|
'innerContentBody': string;
|
||||||
|
'metadataMessage': string;
|
||||||
|
'selectedTab': string;
|
||||||
|
'tab': string;
|
||||||
|
'tabContent': string;
|
||||||
|
'tabList': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -239,9 +239,14 @@ class AuthorDetails extends Component {
|
|||||||
saveError,
|
saveError,
|
||||||
isDeleting,
|
isDeleting,
|
||||||
deleteError,
|
deleteError,
|
||||||
statistics
|
statistics = {}
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
|
const {
|
||||||
|
bookFileCount = 0,
|
||||||
|
totalBookCount = 0
|
||||||
|
} = statistics;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
isOrganizeModalOpen,
|
isOrganizeModalOpen,
|
||||||
isRetagModalOpen,
|
isRetagModalOpen,
|
||||||
@@ -392,10 +397,7 @@ class AuthorDetails extends Component {
|
|||||||
name={icons.ARROW_UP}
|
name={icons.ARROW_UP}
|
||||||
size={30}
|
size={30}
|
||||||
title={translate('GoToAuthorListing')}
|
title={translate('GoToAuthorListing')}
|
||||||
to={{
|
to={'/'}
|
||||||
pathname: '/',
|
|
||||||
state: { restoreScrollPosition: true }
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<IconButton
|
<IconButton
|
||||||
@@ -438,7 +440,7 @@ class AuthorDetails extends Component {
|
|||||||
className={styles.tab}
|
className={styles.tab}
|
||||||
selectedClassName={styles.selectedTab}
|
selectedClassName={styles.selectedTab}
|
||||||
>
|
>
|
||||||
{translate('BooksTotal', [statistics.totalBookCount])}
|
{translate('BooksTotal', [totalBookCount])}
|
||||||
</Tab>
|
</Tab>
|
||||||
|
|
||||||
<Tab
|
<Tab
|
||||||
@@ -466,7 +468,7 @@ class AuthorDetails extends Component {
|
|||||||
className={styles.tab}
|
className={styles.tab}
|
||||||
selectedClassName={styles.selectedTab}
|
selectedClassName={styles.selectedTab}
|
||||||
>
|
>
|
||||||
{translate('FilesTotal', [statistics.bookFileCount])}
|
{translate('FilesTotal', [bookFileCount])}
|
||||||
</Tab>
|
</Tab>
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -136,8 +136,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
|
font-weight: 300;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
line-height: 50px;
|
line-height: 30px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
29
frontend/src/Author/Details/AuthorDetailsHeader.css.d.ts
vendored
Normal file
29
frontend/src/Author/Details/AuthorDetailsHeader.css.d.ts
vendored
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'alternateTitlesIconContainer': string;
|
||||||
|
'authorNavigationButton': string;
|
||||||
|
'authorNavigationButtons': string;
|
||||||
|
'authorUpButton': string;
|
||||||
|
'backdrop': string;
|
||||||
|
'backdropOverlay': string;
|
||||||
|
'details': string;
|
||||||
|
'detailsLabel': string;
|
||||||
|
'header': string;
|
||||||
|
'headerContent': string;
|
||||||
|
'info': string;
|
||||||
|
'links': string;
|
||||||
|
'monitorToggleButton': string;
|
||||||
|
'overview': string;
|
||||||
|
'path': string;
|
||||||
|
'poster': string;
|
||||||
|
'qualityProfileName': string;
|
||||||
|
'sizeOnDisk': string;
|
||||||
|
'tags': string;
|
||||||
|
'title': string;
|
||||||
|
'titleContainer': string;
|
||||||
|
'titleRow': string;
|
||||||
|
'toggleMonitoredContainer': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -25,12 +25,7 @@ const defaultFontSize = parseInt(fonts.defaultFontSize);
|
|||||||
const lineHeight = parseFloat(fonts.lineHeight);
|
const lineHeight = parseFloat(fonts.lineHeight);
|
||||||
|
|
||||||
function getFanartUrl(images) {
|
function getFanartUrl(images) {
|
||||||
const fanartImage = images.find((x) => x.coverType === 'fanart');
|
return images.find((x) => x.coverType === 'fanart')?.url;
|
||||||
|
|
||||||
if (fanartImage) {
|
|
||||||
// Remove protocol
|
|
||||||
return fanartImage.url.replace(/^https?:/, '');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class AuthorDetailsHeader extends Component {
|
class AuthorDetailsHeader extends Component {
|
||||||
@@ -92,6 +87,7 @@ class AuthorDetailsHeader extends Component {
|
|||||||
titleWidth
|
titleWidth
|
||||||
} = this.state;
|
} = this.state;
|
||||||
|
|
||||||
|
const fanartUrl = getFanartUrl(images);
|
||||||
const marqueeWidth = titleWidth - (isSmallScreen ? 85 : 160);
|
const marqueeWidth = titleWidth - (isSmallScreen ? 85 : 160);
|
||||||
|
|
||||||
const continuing = status === 'continuing';
|
const continuing = status === 'continuing';
|
||||||
@@ -108,9 +104,11 @@ class AuthorDetailsHeader extends Component {
|
|||||||
<div className={styles.header} style={{ width }} >
|
<div className={styles.header} style={{ width }} >
|
||||||
<div
|
<div
|
||||||
className={styles.backdrop}
|
className={styles.backdrop}
|
||||||
style={{
|
style={
|
||||||
backgroundImage: `url(${getFanartUrl(images)})`
|
fanartUrl ?
|
||||||
}}
|
{ backgroundImage: `url(${fanartUrl})` } :
|
||||||
|
null
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<div className={styles.backdropOverlay} />
|
<div className={styles.backdropOverlay} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
9
frontend/src/Author/Details/AuthorDetailsLinks.css.d.ts
vendored
Normal file
9
frontend/src/Author/Details/AuthorDetailsLinks.css.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'link': string;
|
||||||
|
'linkLabel': string;
|
||||||
|
'links': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -74,7 +74,7 @@ class AuthorDetailsPageConnector extends Component {
|
|||||||
|
|
||||||
if (isFetching && !isPopulated) {
|
if (isFetching && !isPopulated) {
|
||||||
return (
|
return (
|
||||||
<PageContent title='loading'>
|
<PageContent title={translate('Loading')}>
|
||||||
<PageContentBody>
|
<PageContentBody>
|
||||||
<LoadingIndicator />
|
<LoadingIndicator />
|
||||||
</PageContentBody>
|
</PageContentBody>
|
||||||
|
|||||||
23
frontend/src/Author/Details/AuthorDetailsSeason.css.d.ts
vendored
Normal file
23
frontend/src/Author/Details/AuthorDetailsSeason.css.d.ts
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'actionButton': string;
|
||||||
|
'actionMenuIcon': string;
|
||||||
|
'actions': string;
|
||||||
|
'actionsMenu': string;
|
||||||
|
'actionsMenuContent': string;
|
||||||
|
'bookCount': string;
|
||||||
|
'bookType': string;
|
||||||
|
'bookTypeLabel': string;
|
||||||
|
'books': string;
|
||||||
|
'collapseButtonContainer': string;
|
||||||
|
'collapseButtonIcon': string;
|
||||||
|
'episodeCountTooltip': string;
|
||||||
|
'expandButton': string;
|
||||||
|
'expandButtonIcon': string;
|
||||||
|
'header': string;
|
||||||
|
'left': string;
|
||||||
|
'noBooks': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
24
frontend/src/Author/Details/AuthorDetailsSeries.css.d.ts
vendored
Normal file
24
frontend/src/Author/Details/AuthorDetailsSeries.css.d.ts
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'actionButton': string;
|
||||||
|
'actionMenuIcon': string;
|
||||||
|
'actions': string;
|
||||||
|
'actionsMenu': string;
|
||||||
|
'actionsMenuContent': string;
|
||||||
|
'bookCount': string;
|
||||||
|
'bookType': string;
|
||||||
|
'bookTypeLabel': string;
|
||||||
|
'books': string;
|
||||||
|
'collapseButtonContainer': string;
|
||||||
|
'collapseButtonIcon': string;
|
||||||
|
'episodeCountTooltip': string;
|
||||||
|
'expandButton': string;
|
||||||
|
'expandButtonIcon': string;
|
||||||
|
'header': string;
|
||||||
|
'left': string;
|
||||||
|
'noBooks': string;
|
||||||
|
'seriesTitle': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
import _ from 'lodash';
|
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { createSelector } from 'reselect';
|
import { createSelector } from 'reselect';
|
||||||
import createAuthorSelector from 'Store/Selectors/createAuthorSelector';
|
import createAuthorSelector from 'Store/Selectors/createAuthorSelector';
|
||||||
@@ -10,15 +9,11 @@ function createMapStateToProps() {
|
|||||||
createAuthorSelector(),
|
createAuthorSelector(),
|
||||||
createTagsSelector(),
|
createTagsSelector(),
|
||||||
(author, tagList) => {
|
(author, tagList) => {
|
||||||
const tags = _.reduce(author.tags, (acc, tag) => {
|
const tags = author.tags
|
||||||
const matchingTag = _.find(tagList, { id: tag });
|
.map((tagId) => tagList.find((tag) => tag.id === tagId))
|
||||||
|
.filter((tag) => !!tag)
|
||||||
if (matchingTag) {
|
.map((tag) => tag.label)
|
||||||
acc.push(matchingTag.label);
|
.sort((a, b) => a.localeCompare(b));
|
||||||
}
|
|
||||||
|
|
||||||
return acc;
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
tags
|
tags
|
||||||
|
|||||||
13
frontend/src/Author/Details/BookRow.css.d.ts
vendored
Normal file
13
frontend/src/Author/Details/BookRow.css.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'monitored': string;
|
||||||
|
'pageCount': string;
|
||||||
|
'position': string;
|
||||||
|
'rating': string;
|
||||||
|
'releaseDate': string;
|
||||||
|
'status': string;
|
||||||
|
'title': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
7
frontend/src/Author/Details/BookStatus.css.d.ts
vendored
Normal file
7
frontend/src/Author/Details/BookStatus.css.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'center': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
8
frontend/src/Author/Edit/EditAuthorModalContent.css.d.ts
vendored
Normal file
8
frontend/src/Author/Edit/EditAuthorModalContent.css.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'deleteButton': string;
|
||||||
|
'labelIcon': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
12
frontend/src/Author/Editor/AudioTags/RetagAuthorModalContent.css.d.ts
vendored
Normal file
12
frontend/src/Author/Editor/AudioTags/RetagAuthorModalContent.css.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'message': string;
|
||||||
|
'retagIcon': string;
|
||||||
|
'searchForNewBookContainer': string;
|
||||||
|
'searchForNewBookInput': string;
|
||||||
|
'searchForNewBookLabel': string;
|
||||||
|
'searchForNewBookLabelContainer': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
16
frontend/src/Author/Editor/AuthorEditorFooter.css.d.ts
vendored
Normal file
16
frontend/src/Author/Editor/AuthorEditorFooter.css.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'buttonContainer': string;
|
||||||
|
'buttonContainerContent': string;
|
||||||
|
'buttons': string;
|
||||||
|
'deleteSelectedButton': string;
|
||||||
|
'dropdownContainer': string;
|
||||||
|
'footer': string;
|
||||||
|
'inputContainer': string;
|
||||||
|
'organizeSelectedButton': string;
|
||||||
|
'selectedAuthorLabel': string;
|
||||||
|
'tagsButton': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
import MoveAuthorModal from 'Author/MoveAuthor/MoveAuthorModal';
|
import MoveAuthorModal from 'Author/MoveAuthor/MoveAuthorModal';
|
||||||
import MetadataProfileSelectInputConnector from 'Components/Form/MetadataProfileSelectInputConnector';
|
import MetadataProfileSelectInputConnector from 'Components/Form/MetadataProfileSelectInputConnector';
|
||||||
import MonitorNewItemsSelectInput from 'Components/Form/MonitorNewItemsSelectInput';
|
import MonitorNewItemsSelectInput from 'Components/Form/MonitorNewItemsSelectInput';
|
||||||
@@ -9,6 +10,7 @@ import SelectInput from 'Components/Form/SelectInput';
|
|||||||
import SpinnerButton from 'Components/Link/SpinnerButton';
|
import SpinnerButton from 'Components/Link/SpinnerButton';
|
||||||
import PageContentFooter from 'Components/Page/PageContentFooter';
|
import PageContentFooter from 'Components/Page/PageContentFooter';
|
||||||
import { kinds } from 'Helpers/Props';
|
import { kinds } from 'Helpers/Props';
|
||||||
|
import { fetchRootFolders } from 'Store/Actions/Settings/rootFolders';
|
||||||
import translate from 'Utilities/String/translate';
|
import translate from 'Utilities/String/translate';
|
||||||
import AuthorEditorFooterLabel from './AuthorEditorFooterLabel';
|
import AuthorEditorFooterLabel from './AuthorEditorFooterLabel';
|
||||||
import DeleteAuthorModal from './Delete/DeleteAuthorModal';
|
import DeleteAuthorModal from './Delete/DeleteAuthorModal';
|
||||||
@@ -17,6 +19,10 @@ import styles from './AuthorEditorFooter.css';
|
|||||||
|
|
||||||
const NO_CHANGE = 'noChange';
|
const NO_CHANGE = 'noChange';
|
||||||
|
|
||||||
|
const mapDispatchToProps = {
|
||||||
|
dispatchFetchRootFolders: fetchRootFolders
|
||||||
|
};
|
||||||
|
|
||||||
class AuthorEditorFooter extends Component {
|
class AuthorEditorFooter extends Component {
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -39,6 +45,13 @@ class AuthorEditorFooter extends Component {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Lifecycle
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
this.props.dispatchFetchRootFolders();
|
||||||
|
}
|
||||||
|
|
||||||
componentDidUpdate(prevProps) {
|
componentDidUpdate(prevProps) {
|
||||||
const {
|
const {
|
||||||
isSaving,
|
isSaving,
|
||||||
@@ -160,9 +173,9 @@ class AuthorEditorFooter extends Component {
|
|||||||
} = this.state;
|
} = this.state;
|
||||||
|
|
||||||
const monitoredOptions = [
|
const monitoredOptions = [
|
||||||
{ key: NO_CHANGE, value: 'No Change', disabled: true },
|
{ key: NO_CHANGE, value: translate('NoChange'), disabled: true },
|
||||||
{ key: 'monitored', value: 'Monitored' },
|
{ key: 'monitored', value: translate('Monitored') },
|
||||||
{ key: 'unmonitored', value: 'Unmonitored' }
|
{ key: 'unmonitored', value: translate('Unmonitored') }
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -341,7 +354,8 @@ AuthorEditorFooter.propTypes = {
|
|||||||
showMetadataProfile: PropTypes.bool.isRequired,
|
showMetadataProfile: PropTypes.bool.isRequired,
|
||||||
onSaveSelected: PropTypes.func.isRequired,
|
onSaveSelected: PropTypes.func.isRequired,
|
||||||
onOrganizeAuthorPress: PropTypes.func.isRequired,
|
onOrganizeAuthorPress: PropTypes.func.isRequired,
|
||||||
onRetagAuthorPress: PropTypes.func.isRequired
|
onRetagAuthorPress: PropTypes.func.isRequired,
|
||||||
|
dispatchFetchRootFolders: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
export default AuthorEditorFooter;
|
export default connect(undefined, mapDispatchToProps)(AuthorEditorFooter);
|
||||||
|
|||||||
8
frontend/src/Author/Editor/AuthorEditorFooterLabel.css.d.ts
vendored
Normal file
8
frontend/src/Author/Editor/AuthorEditorFooterLabel.css.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'label': string;
|
||||||
|
'savingIcon': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
9
frontend/src/Author/Editor/Delete/DeleteAuthorModalContent.css.d.ts
vendored
Normal file
9
frontend/src/Author/Editor/Delete/DeleteAuthorModalContent.css.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'message': string;
|
||||||
|
'path': string;
|
||||||
|
'pathContainer': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
8
frontend/src/Author/Editor/Organize/OrganizeAuthorModalContent.css.d.ts
vendored
Normal file
8
frontend/src/Author/Editor/Organize/OrganizeAuthorModalContent.css.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'message': string;
|
||||||
|
'renameIcon': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
9
frontend/src/Author/Editor/Tags/TagsModalContent.css.d.ts
vendored
Normal file
9
frontend/src/Author/Editor/Tags/TagsModalContent.css.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'message': string;
|
||||||
|
'renameIcon': string;
|
||||||
|
'result': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -98,10 +98,10 @@ class TagsModalContent extends Component {
|
|||||||
value={applyTags}
|
value={applyTags}
|
||||||
values={applyTagsOptions}
|
values={applyTagsOptions}
|
||||||
helpTexts={[
|
helpTexts={[
|
||||||
translate('ApplyTagsHelpTexts1'),
|
translate('ApplyTagsHelpTextHowToApplyAuthors'),
|
||||||
translate('ApplyTagsHelpTexts2'),
|
translate('ApplyTagsHelpTextAdd'),
|
||||||
translate('ApplyTagsHelpTexts3'),
|
translate('ApplyTagsHelpTextRemove'),
|
||||||
translate('ApplyTagsHelpTexts4')
|
translate('ApplyTagsHelpTextReplace')
|
||||||
]}
|
]}
|
||||||
onChange={this.onInputChange}
|
onChange={this.onInputChange}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Modal from 'Components/Modal/Modal';
|
import Modal from 'Components/Modal/Modal';
|
||||||
|
import { sizes } from 'Helpers/Props';
|
||||||
import AuthorHistoryContentConnector from './AuthorHistoryContentConnector';
|
import AuthorHistoryContentConnector from './AuthorHistoryContentConnector';
|
||||||
import AuthorHistoryModalContent from './AuthorHistoryModalContent';
|
import AuthorHistoryModalContent from './AuthorHistoryModalContent';
|
||||||
|
|
||||||
@@ -14,6 +15,7 @@ function AuthorHistoryModal(props) {
|
|||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
isOpen={isOpen}
|
isOpen={isOpen}
|
||||||
|
size={sizes.EXTRA_LARGE}
|
||||||
onModalClose={onModalClose}
|
onModalClose={onModalClose}
|
||||||
>
|
>
|
||||||
<AuthorHistoryContentConnector
|
<AuthorHistoryContentConnector
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import ModalBody from 'Components/Modal/ModalBody';
|
|||||||
import ModalContent from 'Components/Modal/ModalContent';
|
import ModalContent from 'Components/Modal/ModalContent';
|
||||||
import ModalFooter from 'Components/Modal/ModalFooter';
|
import ModalFooter from 'Components/Modal/ModalFooter';
|
||||||
import ModalHeader from 'Components/Modal/ModalHeader';
|
import ModalHeader from 'Components/Modal/ModalHeader';
|
||||||
|
import translate from 'Utilities/String/translate';
|
||||||
import AuthorHistoryTableContent from './AuthorHistoryTableContent';
|
import AuthorHistoryTableContent from './AuthorHistoryTableContent';
|
||||||
|
|
||||||
class AuthorHistoryModalContent extends Component {
|
class AuthorHistoryModalContent extends Component {
|
||||||
@@ -20,7 +21,7 @@ class AuthorHistoryModalContent extends Component {
|
|||||||
return (
|
return (
|
||||||
<ModalContent onModalClose={onModalClose}>
|
<ModalContent onModalClose={onModalClose}>
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
History
|
{translate('History')}
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
|
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
@@ -31,7 +32,7 @@ class AuthorHistoryModalContent extends Component {
|
|||||||
|
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button onPress={onModalClose}>
|
<Button onPress={onModalClose}>
|
||||||
Close
|
{translate('Close')}
|
||||||
</Button>
|
</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.details,
|
|
||||||
.actions {
|
.actions {
|
||||||
composes: cell from '~Components/Table/Cells/TableRowCell.css';
|
composes: cell from '~Components/Table/Cells/TableRowCell.css';
|
||||||
|
|
||||||
|
|||||||
8
frontend/src/Author/History/AuthorHistoryRow.css.d.ts
vendored
Normal file
8
frontend/src/Author/History/AuthorHistoryRow.css.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'actions': string;
|
||||||
|
'sourceTitle': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -2,6 +2,7 @@ import PropTypes from 'prop-types';
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import HistoryDetailsConnector from 'Activity/History/Details/HistoryDetailsConnector';
|
import HistoryDetailsConnector from 'Activity/History/Details/HistoryDetailsConnector';
|
||||||
import HistoryEventTypeCell from 'Activity/History/HistoryEventTypeCell';
|
import HistoryEventTypeCell from 'Activity/History/HistoryEventTypeCell';
|
||||||
|
import BookFormats from 'Book/BookFormats';
|
||||||
import BookQuality from 'Book/BookQuality';
|
import BookQuality from 'Book/BookQuality';
|
||||||
import Icon from 'Components/Icon';
|
import Icon from 'Components/Icon';
|
||||||
import IconButton from 'Components/Link/IconButton';
|
import IconButton from 'Components/Link/IconButton';
|
||||||
@@ -11,6 +12,7 @@ import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
|||||||
import TableRow from 'Components/Table/TableRow';
|
import TableRow from 'Components/Table/TableRow';
|
||||||
import Popover from 'Components/Tooltip/Popover';
|
import Popover from 'Components/Tooltip/Popover';
|
||||||
import { icons, kinds, tooltipPositions } from 'Helpers/Props';
|
import { icons, kinds, tooltipPositions } from 'Helpers/Props';
|
||||||
|
import formatCustomFormatScore from 'Utilities/Number/formatCustomFormatScore';
|
||||||
import translate from 'Utilities/String/translate';
|
import translate from 'Utilities/String/translate';
|
||||||
import styles from './AuthorHistoryRow.css';
|
import styles from './AuthorHistoryRow.css';
|
||||||
|
|
||||||
@@ -75,6 +77,8 @@ class AuthorHistoryRow extends Component {
|
|||||||
sourceTitle,
|
sourceTitle,
|
||||||
quality,
|
quality,
|
||||||
qualityCutoffNotMet,
|
qualityCutoffNotMet,
|
||||||
|
customFormats,
|
||||||
|
customFormatScore,
|
||||||
date,
|
date,
|
||||||
data,
|
data,
|
||||||
book
|
book
|
||||||
@@ -106,11 +110,19 @@ class AuthorHistoryRow extends Component {
|
|||||||
/>
|
/>
|
||||||
</TableRowCell>
|
</TableRowCell>
|
||||||
|
|
||||||
|
<TableRowCell>
|
||||||
|
<BookFormats formats={customFormats} />
|
||||||
|
</TableRowCell>
|
||||||
|
|
||||||
|
<TableRowCell>
|
||||||
|
{formatCustomFormatScore(customFormatScore, customFormats.length)}
|
||||||
|
</TableRowCell>
|
||||||
|
|
||||||
<RelativeDateCellConnector
|
<RelativeDateCellConnector
|
||||||
date={date}
|
date={date}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TableRowCell className={styles.details}>
|
<TableRowCell className={styles.actions}>
|
||||||
<Popover
|
<Popover
|
||||||
anchor={
|
anchor={
|
||||||
<Icon
|
<Icon
|
||||||
@@ -127,14 +139,13 @@ class AuthorHistoryRow extends Component {
|
|||||||
}
|
}
|
||||||
position={tooltipPositions.LEFT}
|
position={tooltipPositions.LEFT}
|
||||||
/>
|
/>
|
||||||
</TableRowCell>
|
|
||||||
|
|
||||||
<TableRowCell className={styles.actions}>
|
|
||||||
{
|
{
|
||||||
eventType === 'grabbed' &&
|
eventType === 'grabbed' &&
|
||||||
<IconButton
|
<IconButton
|
||||||
title={translate('MarkAsFailed')}
|
title={translate('MarkAsFailed')}
|
||||||
name={icons.REMOVE}
|
name={icons.REMOVE}
|
||||||
|
size={14}
|
||||||
onPress={this.onMarkAsFailedPress}
|
onPress={this.onMarkAsFailedPress}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -160,6 +171,8 @@ AuthorHistoryRow.propTypes = {
|
|||||||
sourceTitle: PropTypes.string.isRequired,
|
sourceTitle: PropTypes.string.isRequired,
|
||||||
quality: PropTypes.object.isRequired,
|
quality: PropTypes.object.isRequired,
|
||||||
qualityCutoffNotMet: PropTypes.bool.isRequired,
|
qualityCutoffNotMet: PropTypes.bool.isRequired,
|
||||||
|
customFormats: PropTypes.arrayOf(PropTypes.object),
|
||||||
|
customFormatScore: PropTypes.number.isRequired,
|
||||||
date: PropTypes.string.isRequired,
|
date: PropTypes.string.isRequired,
|
||||||
data: PropTypes.object.isRequired,
|
data: PropTypes.object.isRequired,
|
||||||
fullAuthor: PropTypes.bool.isRequired,
|
fullAuthor: PropTypes.bool.isRequired,
|
||||||
|
|||||||
9
frontend/src/Author/History/AuthorHistoryTable.css
Normal file
9
frontend/src/Author/History/AuthorHistoryTable.css
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
.container {
|
||||||
|
border: 1px solid var(--borderColor);
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: var(--inputBackgroundColor);
|
||||||
|
|
||||||
|
&:last-of-type {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
7
frontend/src/Author/History/AuthorHistoryTable.css.d.ts
vendored
Normal file
7
frontend/src/Author/History/AuthorHistoryTable.css.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'container': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import AuthorHistoryContentConnector from 'Author/History/AuthorHistoryContentConnector';
|
import AuthorHistoryContentConnector from 'Author/History/AuthorHistoryContentConnector';
|
||||||
import AuthorHistoryTableContent from 'Author/History/AuthorHistoryTableContent';
|
import AuthorHistoryTableContent from 'Author/History/AuthorHistoryTableContent';
|
||||||
|
import styles from './AuthorHistoryTable.css';
|
||||||
|
|
||||||
function AuthorHistoryTable(props) {
|
function AuthorHistoryTable(props) {
|
||||||
const {
|
const {
|
||||||
@@ -8,10 +9,12 @@ function AuthorHistoryTable(props) {
|
|||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AuthorHistoryContentConnector
|
<div className={styles.container}>
|
||||||
component={AuthorHistoryTableContent}
|
<AuthorHistoryContentConnector
|
||||||
{...otherProps}
|
component={AuthorHistoryTableContent}
|
||||||
/>
|
{...otherProps}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
.blankpad {
|
||||||
|
padding-top: 10px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
padding-left: 2em;
|
||||||
|
}
|
||||||
7
frontend/src/Author/History/AuthorHistoryTableContent.css.d.ts
vendored
Normal file
7
frontend/src/Author/History/AuthorHistoryTableContent.css.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'blankpad': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -1,10 +1,14 @@
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
import Alert from 'Components/Alert';
|
||||||
|
import Icon from 'Components/Icon';
|
||||||
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
||||||
import Table from 'Components/Table/Table';
|
import Table from 'Components/Table/Table';
|
||||||
import TableBody from 'Components/Table/TableBody';
|
import TableBody from 'Components/Table/TableBody';
|
||||||
|
import { icons, kinds } from 'Helpers/Props';
|
||||||
import translate from 'Utilities/String/translate';
|
import translate from 'Utilities/String/translate';
|
||||||
import AuthorHistoryRowConnector from './AuthorHistoryRowConnector';
|
import AuthorHistoryRowConnector from './AuthorHistoryRowConnector';
|
||||||
|
import styles from './AuthorHistoryTableContent.css';
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
@@ -13,32 +17,41 @@ const columns = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'book',
|
name: 'book',
|
||||||
label: 'Book',
|
label: () => translate('Book'),
|
||||||
isVisible: true
|
isVisible: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'sourceTitle',
|
name: 'sourceTitle',
|
||||||
label: 'Source Title',
|
label: () => translate( 'SourceTitle'),
|
||||||
isVisible: true
|
isVisible: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'quality',
|
name: 'quality',
|
||||||
label: 'Quality',
|
label: () => translate('Quality'),
|
||||||
|
isVisible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'customFormats',
|
||||||
|
label: () => translate('CustomFormats'),
|
||||||
|
isSortable: false,
|
||||||
|
isVisible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'customFormatScore',
|
||||||
|
label: React.createElement(Icon, {
|
||||||
|
name: icons.SCORE,
|
||||||
|
title: () => translate('CustomFormatScore')
|
||||||
|
}),
|
||||||
|
isSortable: true,
|
||||||
isVisible: true
|
isVisible: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'date',
|
name: 'date',
|
||||||
label: 'Date',
|
label: () => translate('Date'),
|
||||||
isVisible: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'details',
|
|
||||||
label: 'Details',
|
|
||||||
isVisible: true
|
isVisible: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'actions',
|
name: 'actions',
|
||||||
label: 'Actions',
|
|
||||||
isVisible: true
|
isVisible: true
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@@ -62,7 +75,7 @@ class AuthorHistoryTableContent extends Component {
|
|||||||
const hasItems = !!items.length;
|
const hasItems = !!items.length;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<div>
|
||||||
{
|
{
|
||||||
isFetching &&
|
isFetching &&
|
||||||
<LoadingIndicator />
|
<LoadingIndicator />
|
||||||
@@ -70,14 +83,14 @@ class AuthorHistoryTableContent extends Component {
|
|||||||
|
|
||||||
{
|
{
|
||||||
!isFetching && !!error &&
|
!isFetching && !!error &&
|
||||||
<div>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('UnableToLoadHistory')}
|
{translate('UnableToLoadHistory')}
|
||||||
</div>
|
</Alert>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
isPopulated && !hasItems && !error &&
|
isPopulated && !hasItems && !error &&
|
||||||
<div>
|
<div className={styles.blankpad}>
|
||||||
{translate('NoHistory')}
|
{translate('NoHistory')}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@@ -101,7 +114,7 @@ class AuthorHistoryTableContent extends Component {
|
|||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</Table>
|
||||||
}
|
}
|
||||||
</>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
13
frontend/src/Author/Index/AuthorIndex.css.d.ts
vendored
Normal file
13
frontend/src/Author/Index/AuthorIndex.css.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'bannersInnerContentBody': string;
|
||||||
|
'contentBody': string;
|
||||||
|
'contentBodyContainer': string;
|
||||||
|
'errorMessage': string;
|
||||||
|
'pageContentBodyWrapper': string;
|
||||||
|
'postersInnerContentBody': string;
|
||||||
|
'tableInnerContentBody': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -16,7 +16,7 @@ import AuthorIndex from './AuthorIndex';
|
|||||||
function createMapStateToProps() {
|
function createMapStateToProps() {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
createAuthorClientSideCollectionItemsSelector('authorIndex'),
|
createAuthorClientSideCollectionItemsSelector('authorIndex'),
|
||||||
createCommandExecutingSelector(commandNames.REFRESH_AUTHOR),
|
createCommandExecutingSelector(commandNames.BULK_REFRESH_AUTHOR),
|
||||||
createCommandExecutingSelector(commandNames.RSS_SYNC),
|
createCommandExecutingSelector(commandNames.RSS_SYNC),
|
||||||
createCommandExecutingSelector(commandNames.RENAME_AUTHOR),
|
createCommandExecutingSelector(commandNames.RENAME_AUTHOR),
|
||||||
createCommandExecutingSelector(commandNames.RETAG_AUTHOR),
|
createCommandExecutingSelector(commandNames.RETAG_AUTHOR),
|
||||||
@@ -24,17 +24,17 @@ function createMapStateToProps() {
|
|||||||
(
|
(
|
||||||
author,
|
author,
|
||||||
isRefreshingAuthor,
|
isRefreshingAuthor,
|
||||||
|
isRssSyncExecuting,
|
||||||
isOrganizingAuthor,
|
isOrganizingAuthor,
|
||||||
isRetaggingAuthor,
|
isRetaggingAuthor,
|
||||||
isRssSyncExecuting,
|
|
||||||
dimensionsState
|
dimensionsState
|
||||||
) => {
|
) => {
|
||||||
return {
|
return {
|
||||||
...author,
|
...author,
|
||||||
isRefreshingAuthor,
|
isRefreshingAuthor,
|
||||||
|
isRssSyncExecuting,
|
||||||
isOrganizingAuthor,
|
isOrganizingAuthor,
|
||||||
isRetaggingAuthor,
|
isRetaggingAuthor,
|
||||||
isRssSyncExecuting,
|
|
||||||
isSmallScreen: dimensionsState.isSmallScreen
|
isSmallScreen: dimensionsState.isSmallScreen
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
14
frontend/src/Author/Index/AuthorIndexFooter.css.d.ts
vendored
Normal file
14
frontend/src/Author/Index/AuthorIndexFooter.css.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'continuing': string;
|
||||||
|
'ended': string;
|
||||||
|
'footer': string;
|
||||||
|
'legendItem': string;
|
||||||
|
'legendItemColor': string;
|
||||||
|
'missingMonitored': string;
|
||||||
|
'missingUnmonitored': string;
|
||||||
|
'statistics': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
19
frontend/src/Author/Index/Overview/AuthorIndexOverview.css.d.ts
vendored
Normal file
19
frontend/src/Author/Index/Overview/AuthorIndexOverview.css.d.ts
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'actions': string;
|
||||||
|
'container': string;
|
||||||
|
'content': string;
|
||||||
|
'details': string;
|
||||||
|
'editorSelect': string;
|
||||||
|
'ended': string;
|
||||||
|
'info': string;
|
||||||
|
'link': string;
|
||||||
|
'overview': string;
|
||||||
|
'poster': string;
|
||||||
|
'posterContainer': string;
|
||||||
|
'title': string;
|
||||||
|
'titleRow': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user