mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-18 21:55:12 -04:00
Compare commits
475 Commits
paging
...
v1.7.3.376
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cea6aae9e1 | ||
|
|
1697cee680 | ||
|
|
ce8c90a125 | ||
|
|
c8ad3d6edd | ||
|
|
ebe01913c2 | ||
|
|
07cb19f9f3 | ||
|
|
7f51c44829 | ||
|
|
07f816f9fd | ||
|
|
a4a50b880c | ||
|
|
79361d92cb | ||
|
|
ecda75152e | ||
|
|
37a4e7c228 | ||
|
|
1a66d23bfe | ||
|
|
a26aa4bd1e | ||
|
|
a5d83459e9 | ||
|
|
4bfaab4b21 | ||
|
|
5764950b10 | ||
|
|
470b57316a | ||
|
|
f546b9a3b0 | ||
|
|
cc28c90e39 | ||
|
|
6e21e892bc | ||
|
|
62d868f0e9 | ||
|
|
27b36fe501 | ||
|
|
fc80efd15f | ||
|
|
9b75ba6ca0 | ||
|
|
d42649c4df | ||
|
|
53adfb750c | ||
|
|
ac487f9b40 | ||
|
|
6dd354bf1a | ||
|
|
b747d0a321 | ||
|
|
0e6cec6f54 | ||
|
|
65cf7c1009 | ||
|
|
5f9c3585f4 | ||
|
|
a9d1d4be90 | ||
|
|
a94ed11b21 | ||
|
|
3fab8fb0db | ||
|
|
5e52627799 | ||
|
|
b9a28f243e | ||
|
|
146e7ca7b6 | ||
|
|
1488fb7570 | ||
|
|
0fc52ae16f | ||
|
|
5218bea705 | ||
|
|
ac33330c7c | ||
|
|
041a7c571f | ||
|
|
5d73c6aa91 | ||
|
|
ef9a3a4f2a | ||
|
|
3ce3f8acdd | ||
|
|
9bac2992b5 | ||
|
|
4a88b70f40 | ||
|
|
c9b1d0d958 | ||
|
|
a5b5e7a3a5 | ||
|
|
376202e2af | ||
|
|
6b698b33be | ||
|
|
1706728230 | ||
|
|
cb520b2264 | ||
|
|
193335e2a8 | ||
|
|
1c98727cf3 | ||
|
|
ab5b321385 | ||
|
|
96340909f1 | ||
|
|
bd6a37dc8c | ||
|
|
a663cebada | ||
|
|
2ce5618499 | ||
|
|
94c91d4c3f | ||
|
|
79fbb2d0d7 | ||
|
|
e2e52746bb | ||
|
|
21cc96d683 | ||
|
|
e68b45636e | ||
|
|
ce68fe4105 | ||
|
|
712404ddca | ||
|
|
826828e8ec | ||
|
|
252740519f | ||
|
|
062fd77e1b | ||
|
|
6769055b6b | ||
|
|
90e92c0b66 | ||
|
|
7eac11f57a | ||
|
|
02a3c1b224 | ||
|
|
57efa6d0b1 | ||
|
|
cee52147bc | ||
|
|
a1abcd6c93 | ||
|
|
18e2757d37 | ||
|
|
8790a6f06a | ||
|
|
4fafdb2cd2 | ||
|
|
bfc06fc8bc | ||
|
|
9f4f6a5726 | ||
|
|
d9ace9a862 | ||
|
|
95691c7476 | ||
|
|
90f2020e59 | ||
|
|
6afa1dc8ba | ||
|
|
e8139f2a5b | ||
|
|
45328db2c7 | ||
|
|
e55d6b827a | ||
|
|
34cd68fa07 | ||
|
|
aed3f9f887 | ||
|
|
6880e67507 | ||
|
|
e0e1b1494e | ||
|
|
20df31919d | ||
|
|
8785fe02e8 | ||
|
|
b2b877a8c3 | ||
|
|
0de302ad48 | ||
|
|
06391489cf | ||
|
|
8fcceb0702 | ||
|
|
f20319fff1 | ||
|
|
20bcc00662 | ||
|
|
c4af3e746f | ||
|
|
660a162b7e | ||
|
|
20a3cad7fb | ||
|
|
77fe3f78fe | ||
|
|
d777cb8e29 | ||
|
|
15e7cc7ea8 | ||
|
|
04cf061275 | ||
|
|
d4cdeac69a | ||
|
|
e60fe05ee0 | ||
|
|
9a4c23797a | ||
|
|
acfdb5bae3 | ||
|
|
e2e65627ee | ||
|
|
4b8906ea62 | ||
|
|
f0c5d8ceea | ||
|
|
427802a50e | ||
|
|
0c9eae244a | ||
|
|
75ff2f41d3 | ||
|
|
d1ba208243 | ||
|
|
4e03ebadc4 | ||
|
|
0155ff60fd | ||
|
|
f0915638f3 | ||
|
|
56eb58aed1 | ||
|
|
8a891d07cf | ||
|
|
40a932cd28 | ||
|
|
4a81630073 | ||
|
|
0ff0fe2e68 | ||
|
|
51e33740b0 | ||
|
|
119164f729 | ||
|
|
ef0f8e25fd | ||
|
|
d21debe77f | ||
|
|
a3ccc3d0cf | ||
|
|
46d930e903 | ||
|
|
4561859c2b | ||
|
|
83166fb0b5 | ||
|
|
b98f9a945d | ||
|
|
e658e3fe48 | ||
|
|
9042525f22 | ||
|
|
7b551a0af1 | ||
|
|
31c2917bad | ||
|
|
419cce53f7 | ||
|
|
48cd1d9f6b | ||
|
|
8bd6a313b7 | ||
|
|
7cb465787e | ||
|
|
0b610ff9c8 | ||
|
|
5187460298 | ||
|
|
f0d9b43480 | ||
|
|
a1081cc554 | ||
|
|
c4bb1ba69a | ||
|
|
3a4c8db98c | ||
|
|
a522796798 | ||
|
|
e012eda0cf | ||
|
|
72ab2b34c4 | ||
|
|
aaba5b7499 | ||
|
|
455b76c45c | ||
|
|
596d3297da | ||
|
|
d05128ca33 | ||
|
|
f5b57db753 | ||
|
|
f7d7cca982 | ||
|
|
7c5409383e | ||
|
|
98db8f8bf8 | ||
|
|
88e793d76d | ||
|
|
0f31af6b89 | ||
|
|
65adf30f59 | ||
|
|
da75519524 | ||
|
|
ed1fb58242 | ||
|
|
d5daf6791c | ||
|
|
1f1a345d25 | ||
|
|
76a2f51533 | ||
|
|
8c0bc9ab4e | ||
|
|
b0c2b9119b | ||
|
|
87fdf17926 | ||
|
|
0f1b466a19 | ||
|
|
ea635e685b | ||
|
|
73f23d56dc | ||
|
|
f14ccebf3a | ||
|
|
9539e4d481 | ||
|
|
e40ccc49ad | ||
|
|
9fd3eb4d6b | ||
|
|
78aab80703 | ||
|
|
868394d588 | ||
|
|
d5e5697db8 | ||
|
|
d1e39f206a | ||
|
|
b59d89f308 | ||
|
|
bf5855beb4 | ||
|
|
2d36adf865 | ||
|
|
ef1ad59f59 | ||
|
|
59b6e8af27 | ||
|
|
3ae1917d3b | ||
|
|
5864a090e4 | ||
|
|
fcfec1b859 | ||
|
|
65541017dd | ||
|
|
7fe9942c28 | ||
|
|
360827708f | ||
|
|
0509335387 | ||
|
|
f54212a809 | ||
|
|
ea0eb2efa7 | ||
|
|
ce430433e5 | ||
|
|
5437aac346 | ||
|
|
b02188acf4 | ||
|
|
6897ed0b3f | ||
|
|
b3ddf2f9cd | ||
|
|
d9ce9eb0b2 | ||
|
|
29ab1801db | ||
|
|
19ff73dad0 | ||
|
|
c455f1a113 | ||
|
|
b8793d8783 | ||
|
|
ce34940287 | ||
|
|
dcb19a66b0 | ||
|
|
b3bc92e60e | ||
|
|
1b17d38564 | ||
|
|
d8c7361205 | ||
|
|
7a0dd0bc0d | ||
|
|
c02bfb5930 | ||
|
|
d0fbb1f49a | ||
|
|
aafdefe2f0 | ||
|
|
96234c0fe1 | ||
|
|
8b5648d7bd | ||
|
|
1fc79f9e9b | ||
|
|
ec40761757 | ||
|
|
0a8e4eb092 | ||
|
|
ade961fad5 | ||
|
|
81b1c0e445 | ||
|
|
0fe54ed36a | ||
|
|
337828ff9c | ||
|
|
fb34294d2e | ||
|
|
931e3cf42d | ||
|
|
051930455e | ||
|
|
eba5413250 | ||
|
|
cc2f50544b | ||
|
|
450c6d7af5 | ||
|
|
bdc0178e44 | ||
|
|
aa9705846e | ||
|
|
7559a87bc8 | ||
|
|
6a7fe30171 | ||
|
|
2b0f4e18e7 | ||
|
|
4a5a986220 | ||
|
|
38ae17a99f | ||
|
|
9a72da2803 | ||
|
|
3bba76caab | ||
|
|
47ceabc834 | ||
|
|
48bb3196dd | ||
|
|
4c4ebdf17c | ||
|
|
b5706a0d55 | ||
|
|
d946ef4a9e | ||
|
|
48ec5bbaa1 | ||
|
|
2bcdae44c7 | ||
|
|
541b8b4f7f | ||
|
|
8dd79c38d5 | ||
|
|
615b85fffe | ||
|
|
ceab19caf9 | ||
|
|
3d61719a2c | ||
|
|
befb354913 | ||
|
|
10bbaee55d | ||
|
|
131550b92d | ||
|
|
5f83da9725 | ||
|
|
1ca8ff5012 | ||
|
|
061a0c0da8 | ||
|
|
4cc2706ee5 | ||
|
|
32691832a5 | ||
|
|
48977de3b8 | ||
|
|
34fbb3e135 | ||
|
|
d38f2614d3 | ||
|
|
ecc5439464 | ||
|
|
795274e7e1 | ||
|
|
eb96fbe956 | ||
|
|
2f1fb396a5 | ||
|
|
20c085a979 | ||
|
|
4990e537eb | ||
|
|
f8111ac7ba | ||
|
|
cb1fd39cb3 | ||
|
|
5e9094b54c | ||
|
|
746d84cf83 | ||
|
|
bbe3241b83 | ||
|
|
a86aa4c5d3 | ||
|
|
a753f721d1 | ||
|
|
202836110e | ||
|
|
1a5e41d831 | ||
|
|
e1d0e2c799 | ||
|
|
92e7a38bd0 | ||
|
|
008f238dda | ||
|
|
40125046fa | ||
|
|
1fd188fe7a | ||
|
|
5e5699fbbe | ||
|
|
d61275e6db | ||
|
|
dca3e939f0 | ||
|
|
26ac66c0e1 | ||
|
|
649b301444 | ||
|
|
78ed2a1af0 | ||
|
|
a4854b7b5f | ||
|
|
97edf495bd | ||
|
|
d10bdf4676 | ||
|
|
03647143e3 | ||
|
|
8090dc9983 | ||
|
|
5bc1f345c0 | ||
|
|
4ef01f5640 | ||
|
|
f13d5c5a14 | ||
|
|
dc8773cf79 | ||
|
|
cad774e250 | ||
|
|
b28eee578a | ||
|
|
5b8c7d0b79 | ||
|
|
8bdc7a6db7 | ||
|
|
cb189b8f61 | ||
|
|
24468db376 | ||
|
|
9b10cea556 | ||
|
|
d8fb71d501 | ||
|
|
fc39a11ece | ||
|
|
40dc4de47d | ||
|
|
a0e2f3324c | ||
|
|
1bcc3b426e | ||
|
|
66f5fd2a26 | ||
|
|
b5e5701791 | ||
|
|
1a9b202afe | ||
|
|
309f42bac5 | ||
|
|
ed330ea657 | ||
|
|
fc6a31ea78 | ||
|
|
25ba9195cf | ||
|
|
681f06e321 | ||
|
|
af7fb442d2 | ||
|
|
2061b9142f | ||
|
|
b97f6f8ddf | ||
|
|
f31c0bb1de | ||
|
|
65e6aa05c3 | ||
|
|
fb20b3e61b | ||
|
|
b8a77830aa | ||
|
|
d2ba52cdce | ||
|
|
43f881c442 | ||
|
|
4a5e923999 | ||
|
|
57e1b6b4a0 | ||
|
|
9cc60760c3 | ||
|
|
2811feb14e | ||
|
|
46af9223bc | ||
|
|
025156978b | ||
|
|
d3ca861aea | ||
|
|
c9249ed583 | ||
|
|
94cc56d0f6 | ||
|
|
c8addc0d62 | ||
|
|
2015156061 | ||
|
|
742c680014 | ||
|
|
b1add3f649 | ||
|
|
65d6d518d7 | ||
|
|
bc8ba5ca02 | ||
|
|
6aebc4ee01 | ||
|
|
9bbe51253b | ||
|
|
88fbc30be2 | ||
|
|
5fdc6ee25d | ||
|
|
4eb5a2d613 | ||
|
|
122883053a | ||
|
|
28d09cd384 | ||
|
|
17be8bb68a | ||
|
|
c5baded3d6 | ||
|
|
349cfacdca | ||
|
|
788fa6d96a | ||
|
|
fbea5bbc06 | ||
|
|
d667c7d853 | ||
|
|
a9e1204a9b | ||
|
|
88e3f86262 | ||
|
|
1c173fc984 | ||
|
|
6e8f3d814a | ||
|
|
14e105e37e | ||
|
|
9e0deb8f74 | ||
|
|
245e573089 | ||
|
|
5e8bfa2ffb | ||
|
|
555c924e50 | ||
|
|
8404b85624 | ||
|
|
dc5e6d29e1 | ||
|
|
8c42b7a69b | ||
|
|
3a6ebdef8a | ||
|
|
5f57957462 | ||
|
|
12526c1bb3 | ||
|
|
29f049f766 | ||
|
|
40f4e1b82a | ||
|
|
065fbb30bf | ||
|
|
ea24a81ef7 | ||
|
|
451f60319f | ||
|
|
c6ed5d65e0 | ||
|
|
4e5cd05bbd | ||
|
|
6b2b953686 | ||
|
|
31c05be9de | ||
|
|
bc852c0b55 | ||
|
|
18651d8be1 | ||
|
|
1608095345 | ||
|
|
7700014ceb | ||
|
|
3fbc2912f0 | ||
|
|
3192990874 | ||
|
|
fb908e8e19 | ||
|
|
8e60c707b2 | ||
|
|
a184bb0784 | ||
|
|
e5ccbaaf24 | ||
|
|
362e0acad1 | ||
|
|
54d06460d0 | ||
|
|
c11bcf4c41 | ||
|
|
2e58583263 | ||
|
|
bf7f769f13 | ||
|
|
7820a83a5d | ||
|
|
d937bdac69 | ||
|
|
ebca32af46 | ||
|
|
21bda07510 | ||
|
|
f638cf34d1 | ||
|
|
b7fcdb5356 | ||
|
|
2e4fa9d06d | ||
|
|
9b50fc40ca | ||
|
|
3c60159df0 | ||
|
|
e075003c8b | ||
|
|
b19202d9f5 | ||
|
|
2784ee8ce6 | ||
|
|
5aa4a5faaa | ||
|
|
1d00b40f90 | ||
|
|
93dd378ade | ||
|
|
534ca73bf8 | ||
|
|
bceebc34c1 | ||
|
|
26f700731b | ||
|
|
1ac1c94b55 | ||
|
|
a7a2ccd9b8 | ||
|
|
b0e01fefdc | ||
|
|
b86a4fd670 | ||
|
|
3ea43d711a | ||
|
|
049b4ba4d8 | ||
|
|
8d39a7f315 | ||
|
|
e94b0b8960 | ||
|
|
538abcc47b | ||
|
|
ac3047f0cc | ||
|
|
4348ebe187 | ||
|
|
d4c5e39c9c | ||
|
|
1a7b6aecf1 | ||
|
|
ab5b799ecf | ||
|
|
972ee8f6a9 | ||
|
|
7dfff0690a | ||
|
|
0de1640e9c | ||
|
|
4c52856999 | ||
|
|
88329ff104 | ||
|
|
f90d66376e | ||
|
|
4c47955e3f | ||
|
|
38d5739406 | ||
|
|
ebcb50619e | ||
|
|
0576c6af03 | ||
|
|
7385e7281b | ||
|
|
e22cb5c2c9 | ||
|
|
2d216fac5d | ||
|
|
88e5d34fcf | ||
|
|
22cab3a63f | ||
|
|
577477c42d | ||
|
|
e211436eb5 | ||
|
|
bb1ebda753 | ||
|
|
455511c854 | ||
|
|
8b09f5dd1f | ||
|
|
0b9b671849 | ||
|
|
5dfaa0db4b | ||
|
|
65a954b831 | ||
|
|
db84e82779 | ||
|
|
05b477e9d1 | ||
|
|
ed8a979fc6 | ||
|
|
6482509a1d | ||
|
|
0e82899958 | ||
|
|
02ad2379a5 | ||
|
|
1bc000e912 | ||
|
|
d9f2ad0a2b | ||
|
|
0e2cc7851f | ||
|
|
b637733f68 | ||
|
|
aaaedf1cd7 | ||
|
|
a8e2b1520a | ||
|
|
dbeb725cda | ||
|
|
7b244b022c | ||
|
|
fa4534dcff | ||
|
|
8323d13a1d | ||
|
|
99d315979e | ||
|
|
ff16043a06 | ||
|
|
13230dc36f | ||
|
|
c0383ad5f5 | ||
|
|
c2599ef2e7 | ||
|
|
2cd1679918 | ||
|
|
545d47b05c | ||
|
|
1290d68f29 |
@@ -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
|
||||||
@@ -258,7 +267,7 @@ dotnet_diagnostic.CA5401.severity = suggestion
|
|||||||
|
|
||||||
dotnet_diagnostic.SYSLIB0014.severity = none
|
dotnet_diagnostic.SYSLIB0014.severity = none
|
||||||
|
|
||||||
[*.{js,html,js,hbs,less,css}]
|
[*.{js,jsx,ts,tsx,html,hbs,less,css}]
|
||||||
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
|
|
||||||
}
|
|
||||||
7
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
7
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -71,3 +71,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
|
||||||
|
|||||||
11
.github/label-actions.yml
vendored
11
.github/label-actions.yml
vendored
@@ -7,10 +7,19 @@
|
|||||||
to be a support request. Please hop over onto our [Discord](https://prowlarr.com/discord)
|
to be a support request. Please hop over onto our [Discord](https://prowlarr.com/discord)
|
||||||
or [Subreddit](https://reddit.com/r/prowlarr)
|
or [Subreddit](https://reddit.com/r/prowlarr)
|
||||||
close: true
|
close: true
|
||||||
|
close-reason: 'not planned'
|
||||||
|
|
||||||
'Type: Indexer Request':
|
'Type: Indexer Request':
|
||||||
comment: >
|
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 indexer request. Please use our Indexer request [site](https://requests.prowlarr.com/)
|
to be a indexer request. Please use our Indexer request [site](https://requests.prowlarr.com/)
|
||||||
close: true
|
close: true
|
||||||
|
close-reason: 'not planned'
|
||||||
|
|
||||||
|
'Status: Logs Needed':
|
||||||
|
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/prowlarr/troubleshooting#logging-and-log-files).
|
||||||
19
.github/labeler.yml
vendored
Normal file
19
.github/labeler.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
'Area: API':
|
||||||
|
- src/Prowlarr.Api.V1/**/*
|
||||||
|
|
||||||
|
'Area: Db-migration':
|
||||||
|
- src/NzbDrone.Core/Datastore/Migration/*
|
||||||
|
|
||||||
|
'Area: Download Clients':
|
||||||
|
- src/NzbDrone.Core/Download/Clients/**/*
|
||||||
|
|
||||||
|
'Area: Indexer':
|
||||||
|
- src/NzbDrone.Core/Indexers/**/*
|
||||||
|
|
||||||
|
'Area: Notifications':
|
||||||
|
- src/NzbDrone.Core/Notifications/**/*
|
||||||
|
|
||||||
|
'Area: UI':
|
||||||
|
- frontend/**/*
|
||||||
|
- package.json
|
||||||
|
- yarn.lock
|
||||||
4
.github/workflows/label-actions.yml
vendored
4
.github/workflows/label-actions.yml
vendored
@@ -18,6 +18,6 @@ jobs:
|
|||||||
action:
|
action:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: dessant/label-actions@v2
|
- uses: dessant/label-actions@v3
|
||||||
with:
|
with:
|
||||||
process-only: 'issues, prs'
|
process-only: 'issues, prs'
|
||||||
|
|||||||
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: ''
|
||||||
|
|||||||
@@ -9,13 +9,13 @@ variables:
|
|||||||
testsFolder: './_tests'
|
testsFolder: './_tests'
|
||||||
yarnCacheFolder: $(Pipeline.Workspace)/.yarn
|
yarnCacheFolder: $(Pipeline.Workspace)/.yarn
|
||||||
nugetCacheFolder: $(Pipeline.Workspace)/.nuget/packages
|
nugetCacheFolder: $(Pipeline.Workspace)/.nuget/packages
|
||||||
majorVersion: '1.3.1'
|
majorVersion: '1.7.3'
|
||||||
minorVersion: $[counter('minorVersion', 1)]
|
minorVersion: $[counter('minorVersion', 1)]
|
||||||
prowlarrVersion: '$(majorVersion).$(minorVersion)'
|
prowlarrVersion: '$(majorVersion).$(minorVersion)'
|
||||||
buildName: '$(Build.SourceBranchName).$(prowlarrVersion)'
|
buildName: '$(Build.SourceBranchName).$(prowlarrVersion)'
|
||||||
sentryOrg: 'servarr'
|
sentryOrg: 'servarr'
|
||||||
sentryUrl: 'https://sentry.servarr.com'
|
sentryUrl: 'https://sentry.servarr.com'
|
||||||
dotnetVersion: '6.0.405'
|
dotnetVersion: '6.0.408'
|
||||||
innoVersion: '6.2.0'
|
innoVersion: '6.2.0'
|
||||||
nodeVersion: '16.x'
|
nodeVersion: '16.x'
|
||||||
windowsImage: 'windows-2022'
|
windowsImage: 'windows-2022'
|
||||||
@@ -362,7 +362,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="${PROWLARRVERSION}-${BUILD_SOURCEBRANCHNAME}"
|
RELEASENAME="Prowlarr@${PROWLARRVERSION}-${BUILD_SOURCEBRANCHNAME}"
|
||||||
sentry-cli releases new --finalize -p prowlarr -p prowlarr-ui -p prowlarr-update "${RELEASENAME}"
|
sentry-cli releases new --finalize -p prowlarr -p prowlarr-ui -p prowlarr-update "${RELEASENAME}"
|
||||||
sentry-cli releases -p prowlarr-ui files "${RELEASENAME}" upload-sourcemaps _output/UI/ --rewrite
|
sentry-cli releases -p prowlarr-ui files "${RELEASENAME}" upload-sourcemaps _output/UI/ --rewrite
|
||||||
sentry-cli releases set-commits --auto "${RELEASENAME}"
|
sentry-cli releases set-commits --auto "${RELEASENAME}"
|
||||||
@@ -1003,7 +1003,7 @@ stages:
|
|||||||
git add .
|
git add .
|
||||||
if git status | grep -q modified
|
if git status | grep -q modified
|
||||||
then
|
then
|
||||||
git commit -am 'Automated API Docs update'
|
git commit -am 'Automated API Docs update [skip ci]'
|
||||||
git push -f --set-upstream origin api-docs
|
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/prowlarr/prowlarr/pulls -d '{"head":"api-docs","base":"develop","title":"Update API docs"}'
|
curl -X POST -H "Authorization: token ${GITHUBTOKEN}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/prowlarr/prowlarr/pulls -d '{"head":"api-docs","base":"develop","title":"Update API docs"}'
|
||||||
else
|
else
|
||||||
|
|||||||
8
docs.sh
8
docs.sh
@@ -3,9 +3,9 @@ PLATFORM=$1
|
|||||||
if [ "$PLATFORM" = "Windows" ]; then
|
if [ "$PLATFORM" = "Windows" ]; then
|
||||||
RUNTIME="win-x64"
|
RUNTIME="win-x64"
|
||||||
elif [ "$PLATFORM" = "Linux" ]; then
|
elif [ "$PLATFORM" = "Linux" ]; then
|
||||||
WHERE="linux-x64"
|
RUNTIME="linux-x64"
|
||||||
elif [ "$PLATFORM" = "Mac" ]; then
|
elif [ "$PLATFORM" = "Mac" ]; then
|
||||||
WHERE="osx-x64"
|
RUNTIME="osx-x64"
|
||||||
else
|
else
|
||||||
echo "Platform must be provided as first arguement: Windows, Linux or Mac"
|
echo "Platform must be provided as first arguement: Windows, Linux or Mac"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -27,7 +27,7 @@ dotnet clean $slnFile -c Release
|
|||||||
dotnet msbuild -restore $slnFile -p:Configuration=Debug -p:Platform=$platform -p:RuntimeIdentifiers=$RUNTIME -t:PublishAllRids
|
dotnet msbuild -restore $slnFile -p:Configuration=Debug -p:Platform=$platform -p:RuntimeIdentifiers=$RUNTIME -t:PublishAllRids
|
||||||
|
|
||||||
dotnet new tool-manifest
|
dotnet new tool-manifest
|
||||||
dotnet tool install --version 6.3.0 Swashbuckle.AspNetCore.Cli
|
dotnet tool install --version 6.5.0 Swashbuckle.AspNetCore.Cli
|
||||||
|
|
||||||
dotnet tool run swagger tofile --output ./src/Prowlarr.Api.V1/openapi.json "$outputFolder/net6.0/$RUNTIME/prowlarr.console.dll" v1 &
|
dotnet tool run swagger tofile --output ./src/Prowlarr.Api.V1/openapi.json "$outputFolder/net6.0/$RUNTIME/prowlarr.console.dll" v1 &
|
||||||
|
|
||||||
@@ -35,4 +35,4 @@ sleep 30
|
|||||||
|
|
||||||
kill %1
|
kill %1
|
||||||
|
|
||||||
exit 0
|
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,19 @@
|
|||||||
|
// eslint-disable @typescript-eslint/no-var-requires
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
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: {
|
||||||
@@ -41,7 +46,9 @@ module.exports = {
|
|||||||
'react',
|
'react',
|
||||||
'react-hooks',
|
'react-hooks',
|
||||||
'simple-import-sort',
|
'simple-import-sort',
|
||||||
'import'
|
'import',
|
||||||
|
'@typescript-eslint',
|
||||||
|
'prettier'
|
||||||
],
|
],
|
||||||
|
|
||||||
settings: {
|
settings: {
|
||||||
@@ -224,7 +231,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 +322,9 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
overrides: [
|
overrides: [
|
||||||
{
|
{
|
||||||
files: ['*.js'],
|
files: [
|
||||||
|
'*.js'
|
||||||
|
],
|
||||||
rules: {
|
rules: {
|
||||||
'simple-import-sort/imports': [
|
'simple-import-sort/imports': [
|
||||||
'error',
|
'error',
|
||||||
@@ -330,6 +339,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"
|
||||||
|
],
|
||||||
|
}
|
||||||
@@ -17,7 +17,8 @@ module.exports = {
|
|||||||
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';
|
||||||
@@ -37,13 +39,18 @@ module.exports = (env) => {
|
|||||||
},
|
},
|
||||||
|
|
||||||
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'
|
||||||
},
|
},
|
||||||
fallback: {
|
fallback: {
|
||||||
buffer: false,
|
buffer: false,
|
||||||
@@ -58,23 +65,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,
|
||||||
@@ -82,7 +89,8 @@ module.exports = (env) => {
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
new MiniCssExtractPlugin({
|
new MiniCssExtractPlugin({
|
||||||
filename: 'Content/styles.css'
|
filename: 'Content/styles.css',
|
||||||
|
chunkFilename: 'Content/[id]-[chunkhash].css'
|
||||||
}),
|
}),
|
||||||
|
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
@@ -129,6 +137,8 @@ module.exports = (env) => {
|
|||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
new ForkTsCheckerWebpackPlugin(),
|
||||||
|
|
||||||
new LiveReloadPlugin()
|
new LiveReloadPlugin()
|
||||||
],
|
],
|
||||||
|
|
||||||
@@ -142,8 +152,8 @@ module.exports = (env) => {
|
|||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
test: /\.jsx?$/,
|
test: [/\.jsx?$/, /\.tsx?$/],
|
||||||
exclude: /[\\/]node_modules[\\/](?!(@sentry\/browser|@sentry\/integrations|chart.js|filesize|normalize.css)[\\/])/,
|
exclude: /[\\/]node_modules[\\/](?!(@sentry|chart\.js|filesize)[\\/])/,
|
||||||
use: [
|
use: [
|
||||||
{
|
{
|
||||||
loader: 'babel-loader',
|
loader: 'babel-loader',
|
||||||
@@ -173,6 +183,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: {
|
||||||
@@ -241,18 +252,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
|
|
||||||
}
|
|
||||||
@@ -7,13 +7,13 @@ import PageConnector from 'Components/Page/PageConnector';
|
|||||||
import ApplyTheme from './ApplyTheme';
|
import ApplyTheme from './ApplyTheme';
|
||||||
import AppRoutes from './AppRoutes';
|
import AppRoutes from './AppRoutes';
|
||||||
|
|
||||||
function App({ store, history }) {
|
function App({ store, history, hasTranslationsError }) {
|
||||||
return (
|
return (
|
||||||
<DocumentTitle title={window.Prowlarr.instanceName}>
|
<DocumentTitle title={window.Prowlarr.instanceName}>
|
||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
<ConnectedRouter history={history}>
|
<ConnectedRouter history={history}>
|
||||||
<ApplyTheme>
|
<ApplyTheme>
|
||||||
<PageConnector>
|
<PageConnector hasTranslationsError={hasTranslationsError}>
|
||||||
<AppRoutes app={App} />
|
<AppRoutes app={App} />
|
||||||
</PageConnector>
|
</PageConnector>
|
||||||
</ApplyTheme>
|
</ApplyTheme>
|
||||||
@@ -25,7 +25,8 @@ function App({ store, history }) {
|
|||||||
|
|
||||||
App.propTypes = {
|
App.propTypes = {
|
||||||
store: PropTypes.object.isRequired,
|
store: PropTypes.object.isRequired,
|
||||||
history: PropTypes.object.isRequired
|
history: PropTypes.object.isRequired,
|
||||||
|
hasTranslationsError: PropTypes.bool.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
export default App;
|
export default App;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { Redirect, Route } from 'react-router-dom';
|
|||||||
import NotFound from 'Components/NotFound';
|
import NotFound from 'Components/NotFound';
|
||||||
import Switch from 'Components/Router/Switch';
|
import Switch from 'Components/Router/Switch';
|
||||||
import HistoryConnector from 'History/HistoryConnector';
|
import HistoryConnector from 'History/HistoryConnector';
|
||||||
import IndexerIndexConnector from 'Indexer/Index/IndexerIndexConnector';
|
import IndexerIndex from 'Indexer/Index/IndexerIndex';
|
||||||
import StatsConnector from 'Indexer/Stats/StatsConnector';
|
import StatsConnector from 'Indexer/Stats/StatsConnector';
|
||||||
import SearchIndexConnector from 'Search/SearchIndexConnector';
|
import SearchIndexConnector from 'Search/SearchIndexConnector';
|
||||||
import ApplicationSettingsConnector from 'Settings/Applications/ApplicationSettingsConnector';
|
import ApplicationSettingsConnector from 'Settings/Applications/ApplicationSettingsConnector';
|
||||||
@@ -38,7 +38,7 @@ function AppRoutes(props) {
|
|||||||
<Route
|
<Route
|
||||||
exact={true}
|
exact={true}
|
||||||
path="/"
|
path="/"
|
||||||
component={IndexerIndexConnector}
|
component={IndexerIndex}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
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;
|
||||||
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;
|
||||||
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;
|
||||||
83
frontend/src/App/SelectContext.tsx
Normal file
83
frontend/src/App/SelectContext.tsx
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
import { cloneDeep } from 'lodash';
|
||||||
|
import React, { useCallback, useEffect } from 'react';
|
||||||
|
import useSelectState, { SelectState } from 'Helpers/Hooks/useSelectState';
|
||||||
|
import ModelBase from './ModelBase';
|
||||||
|
|
||||||
|
export type SelectContextAction =
|
||||||
|
| { type: 'reset' }
|
||||||
|
| { type: 'selectAll' }
|
||||||
|
| { type: 'unselectAll' }
|
||||||
|
| {
|
||||||
|
type: 'toggleSelected';
|
||||||
|
id: number;
|
||||||
|
isSelected: boolean;
|
||||||
|
shiftKey: boolean;
|
||||||
|
}
|
||||||
|
| {
|
||||||
|
type: 'removeItem';
|
||||||
|
id: number;
|
||||||
|
}
|
||||||
|
| {
|
||||||
|
type: 'updateItems';
|
||||||
|
items: ModelBase[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type SelectDispatch = (action: SelectContextAction) => void;
|
||||||
|
|
||||||
|
interface SelectProviderOptions<T extends ModelBase> {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
children: any;
|
||||||
|
items: Array<T>;
|
||||||
|
}
|
||||||
|
|
||||||
|
const SelectContext = React.createContext<
|
||||||
|
[SelectState, SelectDispatch] | undefined
|
||||||
|
>(cloneDeep(undefined));
|
||||||
|
|
||||||
|
export function SelectProvider<T extends ModelBase>(
|
||||||
|
props: SelectProviderOptions<T>
|
||||||
|
) {
|
||||||
|
const { items } = props;
|
||||||
|
const [state, dispatch] = useSelectState();
|
||||||
|
|
||||||
|
const dispatchWrapper = useCallback(
|
||||||
|
(action: SelectContextAction) => {
|
||||||
|
switch (action.type) {
|
||||||
|
case 'reset':
|
||||||
|
case 'removeItem':
|
||||||
|
dispatch(action);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
dispatch({
|
||||||
|
...action,
|
||||||
|
items,
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[items, dispatch]
|
||||||
|
);
|
||||||
|
|
||||||
|
const value: [SelectState, SelectDispatch] = [state, dispatchWrapper];
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
dispatch({ type: 'updateItems', items });
|
||||||
|
}, [items, dispatch]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<SelectContext.Provider value={value}>
|
||||||
|
{props.children}
|
||||||
|
</SelectContext.Provider>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function useSelect() {
|
||||||
|
const context = React.useContext(SelectContext);
|
||||||
|
|
||||||
|
if (context === undefined) {
|
||||||
|
throw new Error('useSelect must be used within a SelectProvider');
|
||||||
|
}
|
||||||
|
|
||||||
|
return context;
|
||||||
|
}
|
||||||
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;
|
||||||
44
frontend/src/App/State/AppState.ts
Normal file
44
frontend/src/App/State/AppState.ts
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import IndexerAppState, { IndexerIndexAppState } from './IndexerAppState';
|
||||||
|
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 {
|
||||||
|
indexerIndex: IndexerIndexAppState;
|
||||||
|
indexers: IndexerAppState;
|
||||||
|
settings: SettingsAppState;
|
||||||
|
tags: TagsAppState;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AppState;
|
||||||
8
frontend/src/App/State/ClientSideCollectionAppState.ts
Normal file
8
frontend/src/App/State/ClientSideCollectionAppState.ts
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import { CustomFilter } from './AppState';
|
||||||
|
|
||||||
|
interface ClientSideCollectionAppState {
|
||||||
|
totalItems: number;
|
||||||
|
customFilters: CustomFilter[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ClientSideCollectionAppState;
|
||||||
33
frontend/src/App/State/IndexerAppState.ts
Normal file
33
frontend/src/App/State/IndexerAppState.ts
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
import Column from 'Components/Table/Column';
|
||||||
|
import SortDirection from 'Helpers/Props/SortDirection';
|
||||||
|
import Indexer from 'Indexer/Indexer';
|
||||||
|
import AppSectionState, {
|
||||||
|
AppSectionDeleteState,
|
||||||
|
AppSectionSaveState,
|
||||||
|
} from './AppSectionState';
|
||||||
|
import { Filter, FilterBuilderProp } from './AppState';
|
||||||
|
|
||||||
|
export interface IndexerIndexAppState {
|
||||||
|
isTestingAll: boolean;
|
||||||
|
sortKey: string;
|
||||||
|
sortDirection: SortDirection;
|
||||||
|
secondarySortKey: string;
|
||||||
|
secondarySortDirection: SortDirection;
|
||||||
|
view: string;
|
||||||
|
|
||||||
|
tableOptions: {
|
||||||
|
showSearchAction: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
selectedFilterKey: string;
|
||||||
|
filterBuilderProps: FilterBuilderProp<Indexer>[];
|
||||||
|
filters: Filter[];
|
||||||
|
columns: Column[];
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IndexerAppState
|
||||||
|
extends AppSectionState<Indexer>,
|
||||||
|
AppSectionDeleteState,
|
||||||
|
AppSectionSaveState {}
|
||||||
|
|
||||||
|
export default IndexerAppState;
|
||||||
33
frontend/src/App/State/SettingsAppState.ts
Normal file
33
frontend/src/App/State/SettingsAppState.ts
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
import AppSectionState, {
|
||||||
|
AppSectionDeleteState,
|
||||||
|
AppSectionSaveState,
|
||||||
|
} from 'App/State/AppSectionState';
|
||||||
|
import Application from 'typings/Application';
|
||||||
|
import DownloadClient from 'typings/DownloadClient';
|
||||||
|
import Notification from 'typings/Notification';
|
||||||
|
import { UiSettings } from 'typings/UiSettings';
|
||||||
|
|
||||||
|
export interface ApplicationAppState
|
||||||
|
extends AppSectionState<Application>,
|
||||||
|
AppSectionDeleteState,
|
||||||
|
AppSectionSaveState {}
|
||||||
|
|
||||||
|
export interface DownloadClientAppState
|
||||||
|
extends AppSectionState<DownloadClient>,
|
||||||
|
AppSectionDeleteState,
|
||||||
|
AppSectionSaveState {}
|
||||||
|
|
||||||
|
export interface NotificationAppState
|
||||||
|
extends AppSectionState<Notification>,
|
||||||
|
AppSectionDeleteState {}
|
||||||
|
|
||||||
|
export type UiSettingsAppState = AppSectionState<UiSettings>;
|
||||||
|
|
||||||
|
interface SettingsAppState {
|
||||||
|
applications: ApplicationAppState;
|
||||||
|
downloadClients: DownloadClientAppState;
|
||||||
|
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;
|
||||||
11
frontend/src/Components/Alert.css.d.ts
vendored
Normal file
11
frontend/src/Components/Alert.css.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'alert': string;
|
||||||
|
'danger': string;
|
||||||
|
'info': string;
|
||||||
|
'success': string;
|
||||||
|
'warning': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -4,7 +4,9 @@ import React from 'react';
|
|||||||
import { kinds } from 'Helpers/Props';
|
import { kinds } from 'Helpers/Props';
|
||||||
import styles from './Alert.css';
|
import styles from './Alert.css';
|
||||||
|
|
||||||
function Alert({ className, kind, children, ...otherProps }) {
|
function Alert(props) {
|
||||||
|
const { className, kind, children, ...otherProps } = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
@@ -19,8 +21,8 @@ function Alert({ className, kind, children, ...otherProps }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Alert.propTypes = {
|
Alert.propTypes = {
|
||||||
className: PropTypes.string.isRequired,
|
className: PropTypes.string,
|
||||||
kind: PropTypes.oneOf(kinds.all).isRequired,
|
kind: PropTypes.oneOf(kinds.all),
|
||||||
children: PropTypes.node.isRequired
|
children: PropTypes.node.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
9
frontend/src/Components/Card.css.d.ts
vendored
Normal file
9
frontend/src/Components/Card.css.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'card': string;
|
||||||
|
'overlay': string;
|
||||||
|
'underlay': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
7
frontend/src/Components/DescriptionList/DescriptionList.css.d.ts
vendored
Normal file
7
frontend/src/Components/DescriptionList/DescriptionList.css.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'descriptionList': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -17,7 +17,7 @@ class DescriptionListItem extends Component {
|
|||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span>
|
<div>
|
||||||
<DescriptionListItemTitle
|
<DescriptionListItemTitle
|
||||||
className={titleClassName}
|
className={titleClassName}
|
||||||
>
|
>
|
||||||
@@ -29,7 +29,7 @@ class DescriptionListItem extends Component {
|
|||||||
>
|
>
|
||||||
{data}
|
{data}
|
||||||
</DescriptionListItemDescription>
|
</DescriptionListItemDescription>
|
||||||
</span>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
7
frontend/src/Components/DescriptionList/DescriptionListItemDescription.css.d.ts
vendored
Normal file
7
frontend/src/Components/DescriptionList/DescriptionListItemDescription.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;
|
||||||
7
frontend/src/Components/DescriptionList/DescriptionListItemTitle.css.d.ts
vendored
Normal file
7
frontend/src/Components/DescriptionList/DescriptionListItemTitle.css.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'title': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
7
frontend/src/Components/DragPreviewLayer.css.d.ts
vendored
Normal file
7
frontend/src/Components/DragPreviewLayer.css.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'dragLayer': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -25,6 +25,10 @@
|
|||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.version {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: $breakpointMedium) {
|
@media only screen and (max-width: $breakpointMedium) {
|
||||||
.image {
|
.image {
|
||||||
height: 250px;
|
height: 250px;
|
||||||
|
|||||||
12
frontend/src/Components/Error/ErrorBoundaryError.css.d.ts
vendored
Normal file
12
frontend/src/Components/Error/ErrorBoundaryError.css.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'container': string;
|
||||||
|
'details': string;
|
||||||
|
'image': string;
|
||||||
|
'imageContainer': string;
|
||||||
|
'message': string;
|
||||||
|
'version': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
import PropTypes from 'prop-types';
|
|
||||||
import React from 'react';
|
|
||||||
import styles from './ErrorBoundaryError.css';
|
|
||||||
|
|
||||||
function ErrorBoundaryError(props) {
|
|
||||||
const {
|
|
||||||
className,
|
|
||||||
messageClassName,
|
|
||||||
detailsClassName,
|
|
||||||
message,
|
|
||||||
error,
|
|
||||||
info
|
|
||||||
} = props;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className={className}>
|
|
||||||
<div className={messageClassName}>
|
|
||||||
{message}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className={styles.imageContainer}>
|
|
||||||
<img
|
|
||||||
className={styles.image}
|
|
||||||
src={`${window.Prowlarr.urlBase}/Content/Images/error.png`}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<details className={detailsClassName}>
|
|
||||||
{
|
|
||||||
error &&
|
|
||||||
<div>
|
|
||||||
{error.toString()}
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
|
|
||||||
<div className={styles.info}>
|
|
||||||
{info.componentStack}
|
|
||||||
</div>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
ErrorBoundaryError.propTypes = {
|
|
||||||
className: PropTypes.string.isRequired,
|
|
||||||
messageClassName: PropTypes.string.isRequired,
|
|
||||||
detailsClassName: PropTypes.string.isRequired,
|
|
||||||
message: PropTypes.string.isRequired,
|
|
||||||
error: PropTypes.object.isRequired,
|
|
||||||
info: PropTypes.object.isRequired
|
|
||||||
};
|
|
||||||
|
|
||||||
ErrorBoundaryError.defaultProps = {
|
|
||||||
className: styles.container,
|
|
||||||
messageClassName: styles.message,
|
|
||||||
detailsClassName: styles.details,
|
|
||||||
message: 'There was an error loading this content'
|
|
||||||
};
|
|
||||||
|
|
||||||
export default ErrorBoundaryError;
|
|
||||||
76
frontend/src/Components/Error/ErrorBoundaryError.tsx
Normal file
76
frontend/src/Components/Error/ErrorBoundaryError.tsx
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
import React, { useEffect, useState } from 'react';
|
||||||
|
import StackTrace from 'stacktrace-js';
|
||||||
|
import styles from './ErrorBoundaryError.css';
|
||||||
|
|
||||||
|
interface ErrorBoundaryErrorProps {
|
||||||
|
className: string;
|
||||||
|
messageClassName: string;
|
||||||
|
detailsClassName: string;
|
||||||
|
message: string;
|
||||||
|
error: Error;
|
||||||
|
info: {
|
||||||
|
componentStack: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function ErrorBoundaryError(props: ErrorBoundaryErrorProps) {
|
||||||
|
const {
|
||||||
|
className = styles.container,
|
||||||
|
messageClassName = styles.message,
|
||||||
|
detailsClassName = styles.details,
|
||||||
|
message = 'There was an error loading this content',
|
||||||
|
error,
|
||||||
|
info,
|
||||||
|
} = props;
|
||||||
|
|
||||||
|
const [detailedError, setDetailedError] = useState<
|
||||||
|
StackTrace.StackFrame[] | null
|
||||||
|
>(null);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (error) {
|
||||||
|
StackTrace.fromError(error).then((de) => {
|
||||||
|
setDetailedError(de);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
setDetailedError(null);
|
||||||
|
}
|
||||||
|
}, [error, setDetailedError]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={className}>
|
||||||
|
<div className={messageClassName}>{message}</div>
|
||||||
|
|
||||||
|
<div className={styles.imageContainer}>
|
||||||
|
<img
|
||||||
|
className={styles.image}
|
||||||
|
src={`${window.Prowlarr.urlBase}/Content/Images/error.png`}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<details className={detailsClassName}>
|
||||||
|
{error ? <div>{error.message}</div> : null}
|
||||||
|
|
||||||
|
{detailedError ? (
|
||||||
|
detailedError.map((d, index) => {
|
||||||
|
return (
|
||||||
|
<div key={index}>
|
||||||
|
{` at ${d.functionName} (${d.fileName}:${d.lineNumber}:${d.columnNumber})`}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})
|
||||||
|
) : (
|
||||||
|
<div>{info.componentStack}</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{
|
||||||
|
<div className={styles.version}>
|
||||||
|
Version: {window.Prowlarr.version}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</details>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ErrorBoundaryError;
|
||||||
8
frontend/src/Components/FieldSet.css.d.ts
vendored
Normal file
8
frontend/src/Components/FieldSet.css.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'fieldSet': string;
|
||||||
|
'legend': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
7
frontend/src/Components/FileBrowser/FileBrowserModal.css.d.ts
vendored
Normal file
7
frontend/src/Components/FileBrowser/FileBrowserModal.css.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'modal': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
12
frontend/src/Components/FileBrowser/FileBrowserModalContent.css.d.ts
vendored
Normal file
12
frontend/src/Components/FileBrowser/FileBrowserModalContent.css.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'faqLink': string;
|
||||||
|
'loading': string;
|
||||||
|
'mappedDrivesWarning': string;
|
||||||
|
'modalBody': string;
|
||||||
|
'pathInput': string;
|
||||||
|
'scroller': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import ReactDOM from 'react-dom';
|
|
||||||
import Alert from 'Components/Alert';
|
import Alert from 'Components/Alert';
|
||||||
import PathInput from 'Components/Form/PathInput';
|
import PathInput from 'Components/Form/PathInput';
|
||||||
import Button from 'Components/Link/Button';
|
import Button from 'Components/Link/Button';
|
||||||
@@ -39,7 +38,7 @@ class FileBrowserModalContent extends Component {
|
|||||||
constructor(props, context) {
|
constructor(props, context) {
|
||||||
super(props, context);
|
super(props, context);
|
||||||
|
|
||||||
this._scrollerNode = null;
|
this._scrollerRef = React.createRef();
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
isFileBrowserModalOpen: false,
|
isFileBrowserModalOpen: false,
|
||||||
@@ -57,21 +56,10 @@ class FileBrowserModalContent extends Component {
|
|||||||
currentPath !== prevState.currentPath
|
currentPath !== prevState.currentPath
|
||||||
) {
|
) {
|
||||||
this.setState({ currentPath });
|
this.setState({ currentPath });
|
||||||
this._scrollerNode.scrollTop = 0;
|
this._scrollerRef.current.scrollTop = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Control
|
|
||||||
|
|
||||||
setScrollerRef = (ref) => {
|
|
||||||
if (ref) {
|
|
||||||
this._scrollerNode = ReactDOM.findDOMNode(ref);
|
|
||||||
} else {
|
|
||||||
this._scrollerNode = null;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Listeners
|
// Listeners
|
||||||
|
|
||||||
@@ -145,7 +133,7 @@ class FileBrowserModalContent extends Component {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<Scroller
|
<Scroller
|
||||||
ref={this.setScrollerRef}
|
ref={this._scrollerRef}
|
||||||
className={styles.scroller}
|
className={styles.scroller}
|
||||||
scrollDirection={scrollDirections.BOTH}
|
scrollDirection={scrollDirections.BOTH}
|
||||||
>
|
>
|
||||||
|
|||||||
7
frontend/src/Components/FileBrowser/FileBrowserRow.css.d.ts
vendored
Normal file
7
frontend/src/Components/FileBrowser/FileBrowserRow.css.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'type': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
9
frontend/src/Components/Filter/Builder/DateFilterBuilderRowValue.css.d.ts
vendored
Normal file
9
frontend/src/Components/Filter/Builder/DateFilterBuilderRowValue.css.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'container': string;
|
||||||
|
'numberInput': string;
|
||||||
|
'selectInput': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
10
frontend/src/Components/Filter/Builder/FilterBuilderModalContent.css.d.ts
vendored
Normal file
10
frontend/src/Components/Filter/Builder/FilterBuilderModalContent.css.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'label': string;
|
||||||
|
'labelContainer': string;
|
||||||
|
'labelInputContainer': string;
|
||||||
|
'rows': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
10
frontend/src/Components/Filter/Builder/FilterBuilderRow.css.d.ts
vendored
Normal file
10
frontend/src/Components/Filter/Builder/FilterBuilderRow.css.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'actionsContainer': string;
|
||||||
|
'filterRow': string;
|
||||||
|
'inputContainer': string;
|
||||||
|
'valueInputContainer': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -202,7 +202,7 @@ class FilterBuilderRow extends Component {
|
|||||||
key: availablePropFilter.name,
|
key: availablePropFilter.name,
|
||||||
value: availablePropFilter.label
|
value: availablePropFilter.label
|
||||||
};
|
};
|
||||||
});
|
}).sort((a, b) => a.value.localeCompare(b.value));
|
||||||
|
|
||||||
const ValueComponent = getRowValueConnector(selectedFilterBuilderProp);
|
const ValueComponent = getRowValueConnector(selectedFilterBuilderProp);
|
||||||
|
|
||||||
|
|||||||
10
frontend/src/Components/Filter/Builder/FilterBuilderRowValueTag.css.d.ts
vendored
Normal file
10
frontend/src/Components/Filter/Builder/FilterBuilderRowValueTag.css.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'isLastTag': string;
|
||||||
|
'label': string;
|
||||||
|
'or': string;
|
||||||
|
'tag': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -9,13 +9,13 @@ import FilterBuilderRowValue from './FilterBuilderRowValue';
|
|||||||
function createMapStateToProps() {
|
function createMapStateToProps() {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
(state) => state.indexers,
|
(state) => state.indexers,
|
||||||
(qualityProfiles) => {
|
(indexers) => {
|
||||||
const {
|
const {
|
||||||
isFetching,
|
isFetching,
|
||||||
isPopulated,
|
isPopulated,
|
||||||
error,
|
error,
|
||||||
items
|
items
|
||||||
} = qualityProfiles;
|
} = indexers;
|
||||||
|
|
||||||
const tagList = items.map((item) => {
|
const tagList = items.map((item) => {
|
||||||
return {
|
return {
|
||||||
|
|||||||
9
frontend/src/Components/Filter/CustomFilters/CustomFilter.css.d.ts
vendored
Normal file
9
frontend/src/Components/Filter/CustomFilters/CustomFilter.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;
|
||||||
|
'customFilter': string;
|
||||||
|
'label': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
7
frontend/src/Components/Filter/CustomFilters/CustomFiltersModalContent.css.d.ts
vendored
Normal file
7
frontend/src/Components/Filter/CustomFilters/CustomFiltersModalContent.css.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'addButtonContainer': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -5,6 +5,7 @@ import { connect } from 'react-redux';
|
|||||||
import { createSelector } from 'reselect';
|
import { createSelector } from 'reselect';
|
||||||
import createSortedSectionSelector from 'Store/Selectors/createSortedSectionSelector';
|
import createSortedSectionSelector from 'Store/Selectors/createSortedSectionSelector';
|
||||||
import sortByName from 'Utilities/Array/sortByName';
|
import sortByName from 'Utilities/Array/sortByName';
|
||||||
|
import translate from 'Utilities/String/translate';
|
||||||
import SelectInput from './SelectInput';
|
import SelectInput from './SelectInput';
|
||||||
|
|
||||||
function createMapStateToProps() {
|
function createMapStateToProps() {
|
||||||
@@ -23,7 +24,7 @@ function createMapStateToProps() {
|
|||||||
if (includeNoChange) {
|
if (includeNoChange) {
|
||||||
values.unshift({
|
values.unshift({
|
||||||
key: 'noChange',
|
key: 'noChange',
|
||||||
value: 'No Change',
|
value: translate('NoChange'),
|
||||||
disabled: true
|
disabled: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
15
frontend/src/Components/Form/AutoSuggestInput.css.d.ts
vendored
Normal file
15
frontend/src/Components/Form/AutoSuggestInput.css.d.ts
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'hasError': string;
|
||||||
|
'hasWarning': string;
|
||||||
|
'input': string;
|
||||||
|
'inputContainer': string;
|
||||||
|
'suggestion': string;
|
||||||
|
'suggestionHighlighted': string;
|
||||||
|
'suggestionsContainer': string;
|
||||||
|
'suggestionsContainerOpen': string;
|
||||||
|
'suggestionsList': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
12
frontend/src/Components/Form/CaptchaInput.css.d.ts
vendored
Normal file
12
frontend/src/Components/Form/CaptchaInput.css.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'captchaInputWrapper': string;
|
||||||
|
'hasButton': string;
|
||||||
|
'hasError': string;
|
||||||
|
'hasWarning': string;
|
||||||
|
'input': string;
|
||||||
|
'recaptchaWrapper': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
18
frontend/src/Components/Form/CheckInput.css.d.ts
vendored
Normal file
18
frontend/src/Components/Form/CheckInput.css.d.ts
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'checkbox': string;
|
||||||
|
'container': string;
|
||||||
|
'dangerIsChecked': string;
|
||||||
|
'helpText': string;
|
||||||
|
'input': string;
|
||||||
|
'isDisabled': string;
|
||||||
|
'isIndeterminate': string;
|
||||||
|
'isNotChecked': string;
|
||||||
|
'label': string;
|
||||||
|
'primaryIsChecked': string;
|
||||||
|
'successIsChecked': string;
|
||||||
|
'warningIsChecked': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
8
frontend/src/Components/Form/DeviceInput.css.d.ts
vendored
Normal file
8
frontend/src/Components/Form/DeviceInput.css.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'deviceInputWrapper': string;
|
||||||
|
'input': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import React, { Component } from 'react';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
import { createSelector } from 'reselect';
|
||||||
|
import { fetchDownloadClients } from 'Store/Actions/settingsActions';
|
||||||
|
import sortByName from 'Utilities/Array/sortByName';
|
||||||
|
import EnhancedSelectInput from './EnhancedSelectInput';
|
||||||
|
|
||||||
|
function createMapStateToProps() {
|
||||||
|
return createSelector(
|
||||||
|
(state) => state.settings.downloadClients,
|
||||||
|
(state, { includeAny }) => includeAny,
|
||||||
|
(state, { protocol }) => protocol,
|
||||||
|
(downloadClients, includeAny, protocolFilter) => {
|
||||||
|
const {
|
||||||
|
isFetching,
|
||||||
|
isPopulated,
|
||||||
|
error,
|
||||||
|
items
|
||||||
|
} = downloadClients;
|
||||||
|
|
||||||
|
const values = items
|
||||||
|
.filter((downloadClient) => downloadClient.protocol === protocolFilter)
|
||||||
|
.sort(sortByName)
|
||||||
|
.map((downloadClient) => ({
|
||||||
|
key: downloadClient.id,
|
||||||
|
value: downloadClient.name
|
||||||
|
}));
|
||||||
|
|
||||||
|
if (includeAny) {
|
||||||
|
values.unshift({
|
||||||
|
key: 0,
|
||||||
|
value: '(Any)'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
isFetching,
|
||||||
|
isPopulated,
|
||||||
|
error,
|
||||||
|
values
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const mapDispatchToProps = {
|
||||||
|
dispatchFetchDownloadClients: fetchDownloadClients
|
||||||
|
};
|
||||||
|
|
||||||
|
class DownloadClientSelectInputConnector extends Component {
|
||||||
|
|
||||||
|
//
|
||||||
|
// Lifecycle
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
if (!this.props.isPopulated) {
|
||||||
|
this.props.dispatchFetchDownloadClients();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Listeners
|
||||||
|
|
||||||
|
onChange = ({ name, value }) => {
|
||||||
|
this.props.onChange({ name, value: parseInt(value) });
|
||||||
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
// Render
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<EnhancedSelectInput
|
||||||
|
{...this.props}
|
||||||
|
onChange={this.onChange}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DownloadClientSelectInputConnector.propTypes = {
|
||||||
|
isFetching: PropTypes.bool.isRequired,
|
||||||
|
isPopulated: PropTypes.bool.isRequired,
|
||||||
|
name: PropTypes.string.isRequired,
|
||||||
|
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
||||||
|
values: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
|
includeAny: PropTypes.bool.isRequired,
|
||||||
|
onChange: PropTypes.func.isRequired,
|
||||||
|
dispatchFetchDownloadClients: PropTypes.func.isRequired
|
||||||
|
};
|
||||||
|
|
||||||
|
DownloadClientSelectInputConnector.defaultProps = {
|
||||||
|
includeAny: false,
|
||||||
|
protocol: 'torrent'
|
||||||
|
};
|
||||||
|
|
||||||
|
export default connect(createMapStateToProps, mapDispatchToProps)(DownloadClientSelectInputConnector);
|
||||||
22
frontend/src/Components/Form/EnhancedSelectInput.css.d.ts
vendored
Normal file
22
frontend/src/Components/Form/EnhancedSelectInput.css.d.ts
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'dropdownArrowContainer': string;
|
||||||
|
'dropdownArrowContainerDisabled': string;
|
||||||
|
'dropdownArrowContainerEditable': string;
|
||||||
|
'editableContainer': string;
|
||||||
|
'enhancedSelect': string;
|
||||||
|
'hasError': string;
|
||||||
|
'hasWarning': string;
|
||||||
|
'isDisabled': string;
|
||||||
|
'loading': string;
|
||||||
|
'mobileCloseButton': string;
|
||||||
|
'mobileCloseButtonContainer': string;
|
||||||
|
'options': string;
|
||||||
|
'optionsContainer': string;
|
||||||
|
'optionsModal': string;
|
||||||
|
'optionsModalBody': string;
|
||||||
|
'optionsModalScroller': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -12,9 +12,9 @@ import ModalBody from 'Components/Modal/ModalBody';
|
|||||||
import Portal from 'Components/Portal';
|
import Portal from 'Components/Portal';
|
||||||
import Scroller from 'Components/Scroller/Scroller';
|
import Scroller from 'Components/Scroller/Scroller';
|
||||||
import { icons, scrollDirections, sizes } from 'Helpers/Props';
|
import { icons, scrollDirections, sizes } from 'Helpers/Props';
|
||||||
|
import { isMobile as isMobileUtil } from 'Utilities/browser';
|
||||||
import * as keyCodes from 'Utilities/Constants/keyCodes';
|
import * as keyCodes from 'Utilities/Constants/keyCodes';
|
||||||
import getUniqueElememtId from 'Utilities/getUniqueElementId';
|
import getUniqueElememtId from 'Utilities/getUniqueElementId';
|
||||||
import { isMobile as isMobileUtil } from 'Utilities/mobile';
|
|
||||||
import HintedSelectInputOption from './HintedSelectInputOption';
|
import HintedSelectInputOption from './HintedSelectInputOption';
|
||||||
import HintedSelectInputSelectedValue from './HintedSelectInputSelectedValue';
|
import HintedSelectInputSelectedValue from './HintedSelectInputSelectedValue';
|
||||||
import TextInput from './TextInput';
|
import TextInput from './TextInput';
|
||||||
@@ -113,10 +113,12 @@ class EnhancedSelectInput extends Component {
|
|||||||
this._scheduleUpdate();
|
this._scheduleUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Array.isArray(this.props.value) && prevProps.value !== this.props.value) {
|
if (!Array.isArray(this.props.value)) {
|
||||||
this.setState({
|
if (prevProps.value !== this.props.value || prevProps.values !== this.props.values) {
|
||||||
selectedIndex: getSelectedIndex(this.props)
|
this.setState({
|
||||||
});
|
selectedIndex: getSelectedIndex(this.props)
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -332,6 +334,11 @@ class EnhancedSelectInput extends Component {
|
|||||||
|
|
||||||
const isMultiSelect = Array.isArray(value);
|
const isMultiSelect = Array.isArray(value);
|
||||||
const selectedOption = getSelectedOption(selectedIndex, values);
|
const selectedOption = getSelectedOption(selectedIndex, values);
|
||||||
|
let selectedValue = value;
|
||||||
|
|
||||||
|
if (!values.length) {
|
||||||
|
selectedValue = isMultiSelect ? [] : '';
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@@ -372,15 +379,17 @@ class EnhancedSelectInput extends Component {
|
|||||||
onPress={this.onPress}
|
onPress={this.onPress}
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
isFetching &&
|
isFetching ?
|
||||||
<LoadingIndicator
|
<LoadingIndicator
|
||||||
className={styles.loading}
|
className={styles.loading}
|
||||||
size={20}
|
size={20}
|
||||||
/>
|
/> :
|
||||||
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
!isFetching &&
|
isFetching ?
|
||||||
|
null :
|
||||||
<Icon
|
<Icon
|
||||||
name={icons.CARET_DOWN}
|
name={icons.CARET_DOWN}
|
||||||
/>
|
/>
|
||||||
@@ -400,7 +409,7 @@ class EnhancedSelectInput extends Component {
|
|||||||
onPress={this.onPress}
|
onPress={this.onPress}
|
||||||
>
|
>
|
||||||
<SelectedValueComponent
|
<SelectedValueComponent
|
||||||
value={value}
|
value={selectedValue}
|
||||||
values={values}
|
values={values}
|
||||||
{...selectedValueOptions}
|
{...selectedValueOptions}
|
||||||
{...selectedOption}
|
{...selectedOption}
|
||||||
@@ -418,15 +427,17 @@ class EnhancedSelectInput extends Component {
|
|||||||
>
|
>
|
||||||
|
|
||||||
{
|
{
|
||||||
isFetching &&
|
isFetching ?
|
||||||
<LoadingIndicator
|
<LoadingIndicator
|
||||||
className={styles.loading}
|
className={styles.loading}
|
||||||
size={20}
|
size={20}
|
||||||
/>
|
/> :
|
||||||
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
!isFetching &&
|
isFetching ?
|
||||||
|
null :
|
||||||
<Icon
|
<Icon
|
||||||
name={icons.CARET_DOWN}
|
name={icons.CARET_DOWN}
|
||||||
/>
|
/>
|
||||||
@@ -505,7 +516,7 @@ class EnhancedSelectInput extends Component {
|
|||||||
</Manager>
|
</Manager>
|
||||||
|
|
||||||
{
|
{
|
||||||
isMobile &&
|
isMobile ?
|
||||||
<Modal
|
<Modal
|
||||||
className={styles.optionsModal}
|
className={styles.optionsModal}
|
||||||
size={sizes.EXTRA_SMALL}
|
size={sizes.EXTRA_SMALL}
|
||||||
@@ -555,7 +566,8 @@ class EnhancedSelectInput extends Component {
|
|||||||
}
|
}
|
||||||
</Scroller>
|
</Scroller>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
</Modal>
|
</Modal> :
|
||||||
|
null
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -566,7 +578,7 @@ EnhancedSelectInput.propTypes = {
|
|||||||
className: PropTypes.string,
|
className: PropTypes.string,
|
||||||
disabledClassName: PropTypes.string,
|
disabledClassName: PropTypes.string,
|
||||||
name: PropTypes.string.isRequired,
|
name: PropTypes.string.isRequired,
|
||||||
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.arrayOf(PropTypes.number)]).isRequired,
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.number)]).isRequired,
|
||||||
values: PropTypes.arrayOf(PropTypes.object).isRequired,
|
values: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
isDisabled: PropTypes.bool.isRequired,
|
isDisabled: PropTypes.bool.isRequired,
|
||||||
isFetching: PropTypes.bool.isRequired,
|
isFetching: PropTypes.bool.isRequired,
|
||||||
|
|||||||
14
frontend/src/Components/Form/EnhancedSelectInputOption.css.d.ts
vendored
Normal file
14
frontend/src/Components/Form/EnhancedSelectInputOption.css.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'iconContainer': string;
|
||||||
|
'isDisabled': string;
|
||||||
|
'isHidden': string;
|
||||||
|
'isMobile': string;
|
||||||
|
'isSelected': string;
|
||||||
|
'option': string;
|
||||||
|
'optionCheck': string;
|
||||||
|
'optionCheckInput': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
8
frontend/src/Components/Form/EnhancedSelectInputSelectedValue.css.d.ts
vendored
Normal file
8
frontend/src/Components/Form/EnhancedSelectInputSelectedValue.css.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'isDisabled': string;
|
||||||
|
'selectedValue': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
7
frontend/src/Components/Form/Form.css.d.ts
vendored
Normal file
7
frontend/src/Components/Form/Form.css.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'validationFailures': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -4,7 +4,15 @@ import Alert from 'Components/Alert';
|
|||||||
import { kinds } from 'Helpers/Props';
|
import { kinds } from 'Helpers/Props';
|
||||||
import styles from './Form.css';
|
import styles from './Form.css';
|
||||||
|
|
||||||
function Form({ children, validationErrors, validationWarnings, ...otherProps }) {
|
function Form(props) {
|
||||||
|
const {
|
||||||
|
children,
|
||||||
|
validationErrors,
|
||||||
|
validationWarnings,
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
...otherProps
|
||||||
|
} = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{
|
{
|
||||||
|
|||||||
11
frontend/src/Components/Form/FormGroup.css.d.ts
vendored
Normal file
11
frontend/src/Components/Form/FormGroup.css.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'extraSmall': string;
|
||||||
|
'group': string;
|
||||||
|
'large': string;
|
||||||
|
'medium': string;
|
||||||
|
'small': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
8
frontend/src/Components/Form/FormInputButton.css.d.ts
vendored
Normal file
8
frontend/src/Components/Form/FormInputButton.css.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'button': string;
|
||||||
|
'middleButton': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
14
frontend/src/Components/Form/FormInputGroup.css.d.ts
vendored
Normal file
14
frontend/src/Components/Form/FormInputGroup.css.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'helpLink': string;
|
||||||
|
'inputContainer': string;
|
||||||
|
'inputGroup': string;
|
||||||
|
'inputGroupContainer': string;
|
||||||
|
'inputUnit': string;
|
||||||
|
'inputUnitNumber': string;
|
||||||
|
'pendingChangesContainer': string;
|
||||||
|
'pendingChangesIcon': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Link from 'Components/Link/Link';
|
import Link from 'Components/Link/Link';
|
||||||
import { inputTypes } from 'Helpers/Props';
|
import { inputTypes, kinds } from 'Helpers/Props';
|
||||||
import translate from 'Utilities/String/translate';
|
import translate from 'Utilities/String/translate';
|
||||||
import AppProfileSelectInputConnector from './AppProfileSelectInputConnector';
|
import AppProfileSelectInputConnector from './AppProfileSelectInputConnector';
|
||||||
import AutoCompleteInput from './AutoCompleteInput';
|
import AutoCompleteInput from './AutoCompleteInput';
|
||||||
@@ -10,6 +10,7 @@ import CaptchaInputConnector from './CaptchaInputConnector';
|
|||||||
import CardigannCaptchaInputConnector from './CardigannCaptchaInputConnector';
|
import CardigannCaptchaInputConnector from './CardigannCaptchaInputConnector';
|
||||||
import CheckInput from './CheckInput';
|
import CheckInput from './CheckInput';
|
||||||
import DeviceInputConnector from './DeviceInputConnector';
|
import DeviceInputConnector from './DeviceInputConnector';
|
||||||
|
import DownloadClientSelectInputConnector from './DownloadClientSelectInputConnector';
|
||||||
import EnhancedSelectInput from './EnhancedSelectInput';
|
import EnhancedSelectInput from './EnhancedSelectInput';
|
||||||
import EnhancedSelectInputConnector from './EnhancedSelectInputConnector';
|
import EnhancedSelectInputConnector from './EnhancedSelectInputConnector';
|
||||||
import FormInputHelpText from './FormInputHelpText';
|
import FormInputHelpText from './FormInputHelpText';
|
||||||
@@ -72,6 +73,9 @@ function getComponent(type) {
|
|||||||
case inputTypes.CATEGORY_SELECT:
|
case inputTypes.CATEGORY_SELECT:
|
||||||
return NewznabCategorySelectInputConnector;
|
return NewznabCategorySelectInputConnector;
|
||||||
|
|
||||||
|
case inputTypes.DOWNLOAD_CLIENT_SELECT:
|
||||||
|
return DownloadClientSelectInputConnector;
|
||||||
|
|
||||||
case inputTypes.INDEXER_FLAGS_SELECT:
|
case inputTypes.INDEXER_FLAGS_SELECT:
|
||||||
return IndexerFlagsSelectInputConnector;
|
return IndexerFlagsSelectInputConnector;
|
||||||
|
|
||||||
@@ -253,16 +257,26 @@ FormInputGroup.propTypes = {
|
|||||||
className: PropTypes.string.isRequired,
|
className: PropTypes.string.isRequired,
|
||||||
containerClassName: PropTypes.string.isRequired,
|
containerClassName: PropTypes.string.isRequired,
|
||||||
inputClassName: PropTypes.string,
|
inputClassName: PropTypes.string,
|
||||||
|
name: PropTypes.string.isRequired,
|
||||||
|
value: PropTypes.any,
|
||||||
|
values: PropTypes.arrayOf(PropTypes.any),
|
||||||
type: PropTypes.string.isRequired,
|
type: PropTypes.string.isRequired,
|
||||||
|
kind: PropTypes.oneOf(kinds.all),
|
||||||
|
min: PropTypes.number,
|
||||||
|
max: PropTypes.number,
|
||||||
unit: PropTypes.string,
|
unit: PropTypes.string,
|
||||||
buttons: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
|
buttons: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
|
||||||
helpText: PropTypes.string,
|
helpText: PropTypes.string,
|
||||||
helpTexts: PropTypes.arrayOf(PropTypes.string),
|
helpTexts: PropTypes.arrayOf(PropTypes.string),
|
||||||
helpTextWarning: PropTypes.string,
|
helpTextWarning: PropTypes.string,
|
||||||
helpLink: PropTypes.string,
|
helpLink: PropTypes.string,
|
||||||
|
includeNoChange: PropTypes.bool,
|
||||||
|
includeNoChangeDisabled: PropTypes.bool,
|
||||||
|
selectedValueOptions: PropTypes.object,
|
||||||
pending: PropTypes.bool,
|
pending: PropTypes.bool,
|
||||||
errors: PropTypes.arrayOf(PropTypes.object),
|
errors: PropTypes.arrayOf(PropTypes.object),
|
||||||
warnings: PropTypes.arrayOf(PropTypes.object)
|
warnings: PropTypes.arrayOf(PropTypes.object),
|
||||||
|
onChange: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
FormInputGroup.defaultProps = {
|
FormInputGroup.defaultProps = {
|
||||||
|
|||||||
12
frontend/src/Components/Form/FormInputHelpText.css.d.ts
vendored
Normal file
12
frontend/src/Components/Form/FormInputHelpText.css.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'details': string;
|
||||||
|
'helpText': string;
|
||||||
|
'isCheckInput': string;
|
||||||
|
'isError': string;
|
||||||
|
'isWarning': string;
|
||||||
|
'link': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
11
frontend/src/Components/Form/FormLabel.css.d.ts
vendored
Normal file
11
frontend/src/Components/Form/FormLabel.css.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'hasError': string;
|
||||||
|
'isAdvanced': string;
|
||||||
|
'label': string;
|
||||||
|
'large': string;
|
||||||
|
'small': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -4,16 +4,18 @@ import React from 'react';
|
|||||||
import { sizes } from 'Helpers/Props';
|
import { sizes } from 'Helpers/Props';
|
||||||
import styles from './FormLabel.css';
|
import styles from './FormLabel.css';
|
||||||
|
|
||||||
function FormLabel({
|
function FormLabel(props) {
|
||||||
children,
|
const {
|
||||||
className,
|
children,
|
||||||
errorClassName,
|
className,
|
||||||
size,
|
errorClassName,
|
||||||
name,
|
size,
|
||||||
hasError,
|
name,
|
||||||
isAdvanced,
|
hasError,
|
||||||
...otherProps
|
isAdvanced,
|
||||||
}) {
|
...otherProps
|
||||||
|
} = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<label
|
<label
|
||||||
{...otherProps}
|
{...otherProps}
|
||||||
@@ -31,13 +33,13 @@ function FormLabel({
|
|||||||
}
|
}
|
||||||
|
|
||||||
FormLabel.propTypes = {
|
FormLabel.propTypes = {
|
||||||
children: PropTypes.node.isRequired,
|
children: PropTypes.oneOfType([PropTypes.node, PropTypes.string]).isRequired,
|
||||||
className: PropTypes.string,
|
className: PropTypes.string,
|
||||||
errorClassName: PropTypes.string,
|
errorClassName: PropTypes.string,
|
||||||
size: PropTypes.oneOf(sizes.all),
|
size: PropTypes.oneOf(sizes.all),
|
||||||
name: PropTypes.string,
|
name: PropTypes.string,
|
||||||
hasError: PropTypes.bool,
|
hasError: PropTypes.bool,
|
||||||
isAdvanced: PropTypes.bool.isRequired
|
isAdvanced: PropTypes.bool
|
||||||
};
|
};
|
||||||
|
|
||||||
FormLabel.defaultProps = {
|
FormLabel.defaultProps = {
|
||||||
|
|||||||
9
frontend/src/Components/Form/HintedSelectInputOption.css.d.ts
vendored
Normal file
9
frontend/src/Components/Form/HintedSelectInputOption.css.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'hintText': string;
|
||||||
|
'isMobile': string;
|
||||||
|
'optionText': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -37,7 +37,7 @@ function HintedSelectInputOption(props) {
|
|||||||
|
|
||||||
{
|
{
|
||||||
hint != null &&
|
hint != null &&
|
||||||
<div className={styles.hintText}>
|
<div className={styles.hintText} title={hint}>
|
||||||
{hint}
|
{hint}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
9
frontend/src/Components/Form/HintedSelectInputSelectedValue.css.d.ts
vendored
Normal file
9
frontend/src/Components/Form/HintedSelectInputSelectedValue.css.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'hintText': string;
|
||||||
|
'selectedValue': string;
|
||||||
|
'valueText': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -24,7 +24,7 @@ function HintedSelectInputSelectedValue(props) {
|
|||||||
>
|
>
|
||||||
<div className={styles.valueText}>
|
<div className={styles.valueText}>
|
||||||
{
|
{
|
||||||
isMultiSelect &&
|
isMultiSelect ?
|
||||||
value.map((key, index) => {
|
value.map((key, index) => {
|
||||||
const v = valuesMap[key];
|
const v = valuesMap[key];
|
||||||
return (
|
return (
|
||||||
@@ -32,26 +32,28 @@ function HintedSelectInputSelectedValue(props) {
|
|||||||
{v ? v.value : key}
|
{v ? v.value : key}
|
||||||
</Label>
|
</Label>
|
||||||
);
|
);
|
||||||
})
|
}) :
|
||||||
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
!isMultiSelect && value
|
isMultiSelect ? null : value
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{
|
{
|
||||||
hint != null && includeHint &&
|
hint != null && includeHint ?
|
||||||
<div className={styles.hintText}>
|
<div className={styles.hintText}>
|
||||||
{hint}
|
{hint}
|
||||||
</div>
|
</div> :
|
||||||
|
null
|
||||||
}
|
}
|
||||||
</EnhancedSelectInputSelectedValue>
|
</EnhancedSelectInputSelectedValue>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
HintedSelectInputSelectedValue.propTypes = {
|
HintedSelectInputSelectedValue.propTypes = {
|
||||||
value: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))]).isRequired,
|
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))]).isRequired,
|
||||||
values: PropTypes.arrayOf(PropTypes.object).isRequired,
|
values: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
hint: PropTypes.string,
|
hint: PropTypes.string,
|
||||||
isMultiSelect: PropTypes.bool.isRequired,
|
isMultiSelect: PropTypes.bool.isRequired,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import _ from 'lodash';
|
import { groupBy, map } from 'lodash';
|
||||||
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 { connect } from 'react-redux';
|
||||||
@@ -12,7 +12,7 @@ function createMapStateToProps() {
|
|||||||
(state) => state.indexers,
|
(state) => state.indexers,
|
||||||
(value, indexers) => {
|
(value, indexers) => {
|
||||||
const values = [];
|
const values = [];
|
||||||
const groupedIndexers = _(indexers.items).groupBy((x) => x.protocol).map((val, key) => ({ protocol: key, indexers: val })).value();
|
const groupedIndexers = map(groupBy(indexers.items, 'protocol'), (val, key) => ({ protocol: key, indexers: val }));
|
||||||
|
|
||||||
groupedIndexers.forEach((element) => {
|
groupedIndexers.forEach((element) => {
|
||||||
values.push({
|
values.push({
|
||||||
@@ -21,10 +21,12 @@ function createMapStateToProps() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (element.indexers && element.indexers.length > 0) {
|
if (element.indexers && element.indexers.length > 0) {
|
||||||
element.indexers.forEach((subCat) => {
|
element.indexers.forEach((indexer) => {
|
||||||
values.push({
|
values.push({
|
||||||
key: subCat.id,
|
key: indexer.id,
|
||||||
value: subCat.name,
|
value: indexer.name,
|
||||||
|
hint: `(${indexer.id})`,
|
||||||
|
isDisabled: !indexer.enable,
|
||||||
parentKey: element.protocol === 'usenet' ? -1 : -2
|
parentKey: element.protocol === 'usenet' ? -1 : -2
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -49,7 +51,6 @@ class IndexersSelectInputConnector extends Component {
|
|||||||
// Render
|
// Render
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<EnhancedSelectInput
|
<EnhancedSelectInput
|
||||||
{...this.props}
|
{...this.props}
|
||||||
|
|||||||
10
frontend/src/Components/Form/KeyValueListInput.css.d.ts
vendored
Normal file
10
frontend/src/Components/Form/KeyValueListInput.css.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'hasError': string;
|
||||||
|
'hasWarning': string;
|
||||||
|
'inputContainer': string;
|
||||||
|
'isFocused': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
11
frontend/src/Components/Form/KeyValueListInputItem.css.d.ts
vendored
Normal file
11
frontend/src/Components/Form/KeyValueListInputItem.css.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'buttonWrapper': string;
|
||||||
|
'inputWrapper': string;
|
||||||
|
'itemContainer': string;
|
||||||
|
'keyInput': string;
|
||||||
|
'valueInput': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -10,7 +10,7 @@ function parseValue(props, value) {
|
|||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
if (value == null || value === '') {
|
if (value == null || value === '') {
|
||||||
return min;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
let newValue = isFloat ? parseFloat(value) : parseInt(value);
|
let newValue = isFloat ? parseFloat(value) : parseInt(value);
|
||||||
|
|||||||
7
frontend/src/Components/Form/PasswordInput.css.d.ts
vendored
Normal file
7
frontend/src/Components/Form/PasswordInput.css.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'input': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
10
frontend/src/Components/Form/PathInput.css.d.ts
vendored
Normal file
10
frontend/src/Components/Form/PathInput.css.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'fileBrowserButton': string;
|
||||||
|
'hasFileBrowser': string;
|
||||||
|
'inputWrapper': string;
|
||||||
|
'pathMatch': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -67,6 +67,7 @@ function ProviderFieldFormGroup(props) {
|
|||||||
name,
|
name,
|
||||||
label,
|
label,
|
||||||
helpText,
|
helpText,
|
||||||
|
helpTextWarning,
|
||||||
helpLink,
|
helpLink,
|
||||||
placeholder,
|
placeholder,
|
||||||
value,
|
value,
|
||||||
@@ -100,6 +101,7 @@ function ProviderFieldFormGroup(props) {
|
|||||||
name={name}
|
name={name}
|
||||||
label={label}
|
label={label}
|
||||||
helpText={helpText}
|
helpText={helpText}
|
||||||
|
helpTextWarning={helpTextWarning}
|
||||||
helpLink={helpLink}
|
helpLink={helpLink}
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
value={value}
|
value={value}
|
||||||
@@ -126,6 +128,7 @@ ProviderFieldFormGroup.propTypes = {
|
|||||||
name: PropTypes.string.isRequired,
|
name: PropTypes.string.isRequired,
|
||||||
label: PropTypes.string,
|
label: PropTypes.string,
|
||||||
helpText: PropTypes.string,
|
helpText: PropTypes.string,
|
||||||
|
helpTextWarning: PropTypes.string,
|
||||||
helpLink: PropTypes.string,
|
helpLink: PropTypes.string,
|
||||||
placeholder: PropTypes.string,
|
placeholder: PropTypes.string,
|
||||||
value: PropTypes.any,
|
value: PropTypes.any,
|
||||||
|
|||||||
10
frontend/src/Components/Form/SelectInput.css.d.ts
vendored
Normal file
10
frontend/src/Components/Form/SelectInput.css.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'hasError': string;
|
||||||
|
'hasWarning': string;
|
||||||
|
'isDisabled': string;
|
||||||
|
'select': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
9
frontend/src/Components/Form/TagInput.css.d.ts
vendored
Normal file
9
frontend/src/Components/Form/TagInput.css.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'input': string;
|
||||||
|
'internalInput': string;
|
||||||
|
'isFocused': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -1,8 +1,5 @@
|
|||||||
.inputContainer {
|
.inputContainer {
|
||||||
top: -1px;
|
inset: -1px;
|
||||||
right: -1px;
|
|
||||||
bottom: -1px;
|
|
||||||
left: -1px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: start;
|
align-items: start;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|||||||
7
frontend/src/Components/Form/TagInputInput.css.d.ts
vendored
Normal file
7
frontend/src/Components/Form/TagInputInput.css.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'inputContainer': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
7
frontend/src/Components/Form/TagInputTag.css.d.ts
vendored
Normal file
7
frontend/src/Components/Form/TagInputTag.css.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'tag': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
10
frontend/src/Components/Form/TextArea.css.d.ts
vendored
Normal file
10
frontend/src/Components/Form/TextArea.css.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'hasError': string;
|
||||||
|
'hasWarning': string;
|
||||||
|
'input': string;
|
||||||
|
'readOnly': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
11
frontend/src/Components/Form/TextInput.css.d.ts
vendored
Normal file
11
frontend/src/Components/Form/TextInput.css.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'hasButton': string;
|
||||||
|
'hasError': string;
|
||||||
|
'hasWarning': string;
|
||||||
|
'input': string;
|
||||||
|
'readOnly': string;
|
||||||
|
}
|
||||||
|
export const cssExports: CssExports;
|
||||||
|
export default cssExports;
|
||||||
@@ -112,6 +112,12 @@ class TextInput extends Component {
|
|||||||
this._isMouseTarget = false;
|
this._isMouseTarget = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
onWheel = () => {
|
||||||
|
if (this.props.type === 'number') {
|
||||||
|
this._input.blur();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|
||||||
@@ -161,6 +167,7 @@ class TextInput extends Component {
|
|||||||
onKeyUp={this.onKeyUp}
|
onKeyUp={this.onKeyUp}
|
||||||
onMouseDown={this.onMouseDown}
|
onMouseDown={this.onMouseDown}
|
||||||
onMouseUp={this.onMouseUp}
|
onMouseUp={this.onMouseUp}
|
||||||
|
onWheel={this.onWheel}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
13
frontend/src/Components/Icon.css.d.ts
vendored
Normal file
13
frontend/src/Components/Icon.css.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
// This file is automatically generated.
|
||||||
|
// Please do not change this file!
|
||||||
|
interface CssExports {
|
||||||
|
'danger': string;
|
||||||
|
'default': string;
|
||||||
|
'disabled': string;
|
||||||
|
'info': string;
|
||||||
|
'purple': string;
|
||||||
|
'success': string;
|
||||||
|
'warning': 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