Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c154de493 | ||
|
|
f64223bd48 | ||
|
|
c13412163b | ||
|
|
86705446fc | ||
|
|
3199af7383 | ||
|
|
a93fd5a828 | ||
|
|
3c7e32d777 | ||
|
|
f6babc72ba | ||
|
|
e295f57849 | ||
|
|
d6e1d0d896 | ||
|
|
6a09a43c92 | ||
|
|
9c08faeba5 | ||
|
|
c2212119f0 | ||
|
|
aaf736ed58 | ||
|
|
84d9ceb8f5 | ||
|
|
a57a352bda | ||
|
|
18fde022dc | ||
|
|
b31983886c | ||
|
|
75b9593f17 | ||
|
|
5ccdf4ef91 | ||
|
|
5c7bdd3519 | ||
|
|
b85944cc70 | ||
|
|
0fee426247 | ||
|
|
f11dea84e2 | ||
|
|
411ad2a370 | ||
|
|
68a69e4587 | ||
|
|
debb88f2e0 | ||
|
|
833e6a5702 | ||
|
|
668158a9be | ||
|
|
40cf9f62ca | ||
|
|
67290e82cb | ||
|
|
2a46fac7d9 | ||
|
|
d8b535197b | ||
|
|
ea9f786310 | ||
|
|
1570a2bd2d | ||
|
|
8dffe92b9b | ||
|
|
ba75cff1f8 | ||
|
|
6d5bd0c447 | ||
|
|
6ff69f5de4 | ||
|
|
50028d44b7 | ||
|
|
df00a15d95 | ||
|
|
fbd6a715c4 | ||
|
|
9a90baa9e5 | ||
|
|
9b03aaa2e6 | ||
|
|
ab9aa52f36 | ||
|
|
16cacca62c | ||
|
|
91f946ad6b | ||
|
|
01e0211174 | ||
|
|
5ec560abcd | ||
|
|
402d99ce0d | ||
|
|
05f3cbd499 | ||
|
|
2d8c70a9b8 | ||
|
|
4a811daa3c | ||
|
|
6025b40bfd | ||
|
|
49b514ce10 | ||
|
|
aa9c1afebc | ||
|
|
efbf5c9772 | ||
|
|
daee8c3803 | ||
|
|
9e9e974c12 | ||
|
|
59e0abf8a0 | ||
|
|
a15a1e0156 | ||
|
|
741147fec1 | ||
|
|
a13eb772c8 | ||
|
|
7cfea559ce | ||
|
|
8a60b22740 | ||
|
|
965ee88a61 | ||
|
|
a525f52d7a | ||
|
|
0eedc23536 | ||
|
|
449ef618e1 | ||
|
|
11aad8e4fd | ||
|
|
14404db271 | ||
|
|
e8eb0210bb | ||
|
|
58f635900f | ||
|
|
f4f40866c0 | ||
|
|
9e3d30a6f8 | ||
|
|
d11eec2a0c | ||
|
|
9b65b35e76 | ||
|
|
511c673684 | ||
|
|
ecdacdb212 | ||
|
|
9d54c68cf0 | ||
|
|
427fabbc34 | ||
|
|
68e5acad62 | ||
|
|
0e679cb351 | ||
|
|
a56e270790 | ||
|
|
46733db6e4 | ||
|
|
38940664cf | ||
|
|
626fda4a83 | ||
|
|
c766bce171 | ||
|
|
3df07be79c | ||
|
|
58ceb3ae12 | ||
|
|
0fbf854042 | ||
|
|
65e3d735b6 | ||
|
|
c01946dfc8 | ||
|
|
8fc018b866 | ||
|
|
2524ecc66d | ||
|
|
3b34731341 | ||
|
|
3d8d414d48 | ||
|
|
0adb876564 | ||
|
|
d51047842d | ||
|
|
e80342ea38 | ||
|
|
c1a50ca027 | ||
|
|
4394063a4c | ||
|
|
b12a36dab5 | ||
|
|
2a69437906 | ||
|
|
f8135577a1 | ||
|
|
fb34f7770c | ||
|
|
d3a344add4 | ||
|
|
86bb4eb575 | ||
|
|
c997ac5c9c | ||
|
|
8ba053e26c | ||
|
|
088b3cfd3c | ||
|
|
3bdb815c11 | ||
|
|
068eb551fd | ||
|
|
8fce6e29d4 | ||
|
|
742bf25144 | ||
|
|
8cb125aada | ||
|
|
6b49914f3c | ||
|
|
b3b93b7555 | ||
|
|
2b43d4e07f | ||
|
|
2720ca9fc9 | ||
|
|
169a1e5186 | ||
|
|
177c9e22cb | ||
|
|
02457993fb | ||
|
|
b280859d41 | ||
|
|
43bd27cd8e | ||
|
|
7921e99126 | ||
|
|
fc74101cee | ||
|
|
c95e4abe0f | ||
|
|
5613329c22 | ||
|
|
6f75829f7a | ||
|
|
acce3bbb01 | ||
|
|
00361d9f59 | ||
|
|
2022f332fb | ||
|
|
297fc5c5fa | ||
|
|
3d4d5ca3ca | ||
|
|
f1c677e7ee | ||
|
|
9e9d91bd0c | ||
|
|
ec57822bf5 | ||
|
|
861778bfd1 | ||
|
|
715921b2c6 | ||
|
|
ebcedf2be2 | ||
|
|
1dbd7cb1f9 | ||
|
|
3076d7f976 | ||
|
|
00b443114b | ||
|
|
1df94a9221 | ||
|
|
e166d1a436 | ||
|
|
542945a1e0 | ||
|
|
75bc276c4a | ||
|
|
e494ad7f4a | ||
|
|
96f8ad7acc | ||
|
|
b8f46e9a5a | ||
|
|
5bba840fd5 | ||
|
|
bb819c7cbd | ||
|
|
deb4b9d641 | ||
|
|
de35b86b05 | ||
|
|
d14535e871 | ||
|
|
e7c0a470d1 | ||
|
|
6faab0ebfb | ||
|
|
96e1fbb7b6 | ||
|
|
714d49e72c | ||
|
|
14131dfa21 | ||
|
|
6c8c834721 | ||
|
|
3de51489e3 | ||
|
|
d849389621 | ||
|
|
53ce2a8f5b | ||
|
|
a170007c9c | ||
|
|
5051fe5e37 | ||
|
|
e6159d0448 | ||
|
|
34a2fbef47 | ||
|
|
616da81371 | ||
|
|
d17260fb76 | ||
|
|
10de589bbe | ||
|
|
b32a7c8606 | ||
|
|
05df5768e3 | ||
|
|
969cbb77ad | ||
|
|
d3559498c3 | ||
|
|
73b1b3420a | ||
|
|
b68427cba0 | ||
|
|
9b94c51ef5 | ||
|
|
3e8652a7bb | ||
|
|
86c97ac87f | ||
|
|
6b56a4f74a | ||
|
|
f87e1a9410 | ||
|
|
ad9d4446c7 | ||
|
|
a0664eaab7 | ||
|
|
4f2d686031 | ||
|
|
58a505b747 | ||
|
|
6fcbc893d2 | ||
|
|
cd883b5798 | ||
|
|
5a76b4f061 | ||
|
|
edea38d11e | ||
|
|
b617ede07f | ||
|
|
482a3d65be | ||
|
|
b866770bc3 | ||
|
|
51f4b5836e | ||
|
|
6151ecafdf | ||
|
|
dc27983e41 | ||
|
|
00cf34fbfe | ||
|
|
ff4345dde4 | ||
|
|
3f64de1e76 | ||
|
|
c033caf5f9 | ||
|
|
a415ffe88a | ||
|
|
1c81057889 | ||
|
|
c357ba0529 | ||
|
|
5b6c01ec6c | ||
|
|
d93087fb78 | ||
|
|
0ba80bcde1 | ||
|
|
9e37ae4555 | ||
|
|
449f242db3 | ||
|
|
1a620e5844 | ||
|
|
bf7cfc815a | ||
|
|
a4cde214ce | ||
|
|
56716fadaa | ||
|
|
40317f0988 | ||
|
|
ab9d0fdf75 | ||
|
|
b9e3a08f60 | ||
|
|
c6fd34315e | ||
|
|
3aea8d770d | ||
|
|
272a71f27b | ||
|
|
5ab91d61b8 | ||
|
|
afa78bc15f | ||
|
|
a213584f1c | ||
|
|
be5efcc48e | ||
|
|
d284a609e3 | ||
|
|
24ef762592 | ||
|
|
8a3e296b90 | ||
|
|
8d9367936a | ||
|
|
25b0508b00 | ||
|
|
daa8e5a6e8 | ||
|
|
6d5bc0aae9 | ||
|
|
6e160e8965 | ||
|
|
4b696553ed | ||
|
|
62683260b1 | ||
|
|
e89be0366a | ||
|
|
92175fbf87 | ||
|
|
347bb91de9 | ||
|
|
a77ef9a7ca | ||
|
|
b9dabe3f4b | ||
|
|
e8594043e9 | ||
|
|
4537bb6732 | ||
|
|
1ba724005c | ||
|
|
5670da0af1 | ||
|
|
7f2470de9c | ||
|
|
d00a98097e | ||
|
|
8771017d99 | ||
|
|
b8d892b49a | ||
|
|
a65ae36813 | ||
|
|
c1fa6ad2c6 | ||
|
|
130eabee35 | ||
|
|
813c644bf9 | ||
|
|
b82d86cf8b | ||
|
|
4aaff86701 | ||
|
|
dfd931d181 | ||
|
|
1c5ec3d67f | ||
|
|
f3f403a224 | ||
|
|
12ccd0e4c2 | ||
|
|
0e4cf12210 | ||
|
|
c33a1e6304 | ||
|
|
cf7c711a84 | ||
|
|
e1f60e4e34 | ||
|
|
928cd541ec | ||
|
|
b561d591bd | ||
|
|
9a3aba40cb | ||
|
|
a847dbb5b9 | ||
|
|
a6a934fde7 | ||
|
|
aa4f36511b | ||
|
|
617408591d | ||
|
|
a00584c3a8 | ||
|
|
5cccf88f70 | ||
|
|
ce4691a6b9 | ||
|
|
3e9fbe14c1 | ||
|
|
311594903b | ||
|
|
6b005a0dac | ||
|
|
66abaabd89 | ||
|
|
3384106476 | ||
|
|
7e0f1f4abd | ||
|
|
8bfb0470c5 | ||
|
|
1c496ca982 | ||
|
|
4888fe4d53 | ||
|
|
9f1eb51132 | ||
|
|
07fe29ba2b | ||
|
|
a910dbdd3c | ||
|
|
713604ccdd | ||
|
|
0012203cfa | ||
|
|
0cce95dd9a | ||
|
|
3b0cdb0e8f | ||
|
|
4089c430ad | ||
|
|
7e6e648df3 | ||
|
|
0296970da2 | ||
|
|
d33bbbbb6f | ||
|
|
7f0b100420 | ||
|
|
26947d248b | ||
|
|
057be26f12 | ||
|
|
f7d0726c75 | ||
|
|
e26df76137 | ||
|
|
d5483ef946 | ||
|
|
09afcf3cd2 | ||
|
|
814f2b1202 | ||
|
|
8656ae0e0d | ||
|
|
e74f57c9aa | ||
|
|
627a64c6c7 | ||
|
|
ef560af7ed | ||
|
|
6645f4cbf0 | ||
|
|
361056f997 | ||
|
|
a66047f5da | ||
|
|
2e47ea6bce | ||
|
|
75520789d6 | ||
|
|
e05fd3e713 | ||
|
|
ba3a55d188 | ||
|
|
458ff4a1aa | ||
|
|
d004ecc148 | ||
|
|
9a7facfd6d | ||
|
|
eeb1f10932 | ||
|
|
908daea0a5 | ||
|
|
7191041960 | ||
|
|
7a5c5b5180 | ||
|
|
5ce82b7ba1 | ||
|
|
dc8a7c99a3 | ||
|
|
e474e6efca | ||
|
|
0e228ae9f6 | ||
|
|
7c4ab838bd | ||
|
|
55ae48fff9 | ||
|
|
96e33caa43 | ||
|
|
222abab50d | ||
|
|
42b1c0d202 | ||
|
|
e7edaa346f | ||
|
|
6262e4e922 | ||
|
|
ea6deaa3e5 | ||
|
|
361b6a1b51 | ||
|
|
cdfe568037 | ||
|
|
4537b6d385 | ||
|
|
71695178b0 | ||
|
|
2e37130f81 | ||
|
|
d96a06cf04 | ||
|
|
383e30a0ed | ||
|
|
357484eca3 | ||
|
|
f37c712c40 | ||
|
|
4d0dd62699 | ||
|
|
4a6695a7cb | ||
|
|
4d05d76072 | ||
|
|
d7ff0bc746 | ||
|
|
125234d577 | ||
|
|
5c09eaf07f | ||
|
|
f58385f14e | ||
|
|
f965c3ef5a | ||
|
|
af1a3d4cbe | ||
|
|
298a9f8768 | ||
|
|
5e29307355 | ||
|
|
89b124b3c8 | ||
|
|
804e9c9458 | ||
|
|
aada5066b1 | ||
|
|
1b5e140346 | ||
|
|
d96090a10d | ||
|
|
8d0239acec | ||
|
|
eeb04bf889 | ||
|
|
4e3344fd47 | ||
|
|
3ebdc7fc2b | ||
|
|
ecd08b9a8a | ||
|
|
addd5f8aad | ||
|
|
1833d75877 | ||
|
|
ded29fd329 | ||
|
|
4ab4ffddcf | ||
|
|
2e8c68dd57 | ||
|
|
9ae4fb7bed | ||
|
|
edf9b2469d | ||
|
|
f85e0e1a67 | ||
|
|
a4bb7ef54a | ||
|
|
04cbbad8a0 | ||
|
|
6c781aff80 | ||
|
|
c75923e715 | ||
|
|
71e6a89e47 | ||
|
|
3089cc71e6 | ||
|
|
20ac20d326 | ||
|
|
d26f0f5cf4 | ||
|
|
517c9d3bd1 | ||
|
|
061364cdba | ||
|
|
7d09d06388 | ||
|
|
e6e264c2fb | ||
|
|
492cd70128 | ||
|
|
001d5fcafd | ||
|
|
6e4059ec87 | ||
|
|
e25b7cedae | ||
|
|
fda5ebeab8 | ||
|
|
5bb2ecb2cc | ||
|
|
bae560dbdb | ||
|
|
747e03292d | ||
|
|
5b0e5fcecc | ||
|
|
920f841fbe | ||
|
|
157fe18a6c | ||
|
|
e16842885d | ||
|
|
51e96c7325 | ||
|
|
7eb86e056e | ||
|
|
b3e4895ec9 | ||
|
|
0a21ce7993 | ||
|
|
6b40d70402 | ||
|
|
2b50d3845c | ||
|
|
6c10bebf5d | ||
|
|
af1f64e555 | ||
|
|
24c3b57012 | ||
|
|
2aee21ed8c | ||
|
|
c1a525d461 | ||
|
|
739cb8c706 | ||
|
|
f3a9bbda4b | ||
|
|
3bd8732eb7 | ||
|
|
07208739a9 | ||
|
|
231522980e | ||
|
|
5758a0294f | ||
|
|
e2b09a7bca | ||
|
|
fae1830d15 | ||
|
|
516327f086 | ||
|
|
0515628c97 | ||
|
|
632b619fe3 | ||
|
|
8ec6f74830 | ||
|
|
34a703c15a | ||
|
|
f9a5d46e75 | ||
|
|
b6ee2b275e | ||
|
|
2fe4897302 | ||
|
|
210e8d26fa | ||
|
|
03a9402032 | ||
|
|
fd9cac5b98 | ||
|
|
6fb06316fc | ||
|
|
7a18409db6 | ||
|
|
05643e3d03 | ||
|
|
de702c98cc | ||
|
|
977e4ade12 | ||
|
|
c9a8d76b8e | ||
|
|
690ef0016c | ||
|
|
ce7a4326b0 | ||
|
|
80a3a3ed06 | ||
|
|
12c1770d2a | ||
|
|
9e20d9fc1e | ||
|
|
1c49f64b3e | ||
|
|
e7d555ee28 | ||
|
|
f1cc9055f9 | ||
|
|
15adf23405 | ||
|
|
890b20561e | ||
|
|
a0df888755 | ||
|
|
5e9f042b43 | ||
|
|
bd9c4426c8 | ||
|
|
0db0171383 | ||
|
|
1cd66932f5 | ||
|
|
ae9a1ac799 | ||
|
|
b5a5317318 | ||
|
|
bd9c7ab8f3 | ||
|
|
777d740fe0 | ||
|
|
cea57daf0d | ||
|
|
c952e39b37 | ||
|
|
1379c82515 | ||
|
|
8fc6b22441 | ||
|
|
0733c8a3c5 | ||
|
|
dc6890c3aa | ||
|
|
e2c6297a3f | ||
|
|
8f95c58955 | ||
|
|
9549fb340b | ||
|
|
deff22634f | ||
|
|
de72a02cf1 | ||
|
|
d9b8e005a0 | ||
|
|
f1e6bfe2f0 | ||
|
|
51e762d8ab | ||
|
|
0266ec64e0 | ||
|
|
4e59d3708c | ||
|
|
88eb68ec63 | ||
|
|
746cf7ab99 | ||
|
|
3319a5c381 | ||
|
|
b2c5fd2879 | ||
|
|
1e7c169acf | ||
|
|
2e5e722e35 | ||
|
|
dd70d69211 | ||
|
|
5a3e2487eb | ||
|
|
939179911f | ||
|
|
23d69e498d | ||
|
|
a1ef3019da | ||
|
|
dbaa652d6e | ||
|
|
defb938ec1 | ||
|
|
f07e7bf995 | ||
|
|
436ecf8bea | ||
|
|
59b9a47960 | ||
|
|
a2ae82d139 | ||
|
|
1af5ef7963 | ||
|
|
8e92ccac50 | ||
|
|
9b44d8c16a | ||
|
|
3ce04a4d72 | ||
|
|
90b52849b9 | ||
|
|
14f2bfe775 | ||
|
|
ec695d2d04 | ||
|
|
57ed808602 | ||
|
|
ea86636a66 | ||
|
|
8e39b87842 | ||
|
|
e0f48173b8 | ||
|
|
2a4adacb04 | ||
|
|
1a08cf2881 | ||
|
|
450bdd22b7 | ||
|
|
0d8087ed52 | ||
|
|
412278687e | ||
|
|
b14548a82e | ||
|
|
6d69fe8717 | ||
|
|
59efd1a075 | ||
|
|
180fb19771 | ||
|
|
7229eb6d76 | ||
|
|
121a1361f2 | ||
|
|
a6f70cc2e9 | ||
|
|
f9861a2a17 | ||
|
|
ff4c614c09 | ||
|
|
4d627f7c64 | ||
|
|
883bfb3d98 | ||
|
|
fc3dc6a947 | ||
|
|
d53d97ee5c | ||
|
|
5fa4fbbdd3 | ||
|
|
b0f5025638 | ||
|
|
a51e24fee9 | ||
|
|
2620464cf6 | ||
|
|
5075663778 | ||
|
|
9b094a5438 | ||
|
|
b06edbd685 | ||
|
|
2ddcd1aec4 | ||
|
|
3195f72fab | ||
|
|
d6f6ea1aa7 | ||
|
|
a76641fe3f | ||
|
|
4879bef088 | ||
|
|
7c488637a8 | ||
|
|
f877c54fcd | ||
|
|
e343bd4f35 | ||
|
|
74b42de916 | ||
|
|
004d985ba8 | ||
|
|
93132e562b | ||
|
|
1b82cbd63b | ||
|
|
45eb7cd427 | ||
|
|
23a5837cd7 | ||
|
|
17e114c200 | ||
|
|
c238d4b952 | ||
|
|
5e31882ae8 | ||
|
|
e3871be36e | ||
|
|
52372d2f98 | ||
|
|
bc81854ee7 | ||
|
|
bb26f9f349 | ||
|
|
9cdd74a279 | ||
|
|
fb58403e23 | ||
|
|
0aea0c0efc | ||
|
|
4e911c5ff5 | ||
|
|
87795b1b78 | ||
|
|
bc88bb0798 | ||
|
|
972eedee54 | ||
|
|
1fca0b0d68 | ||
|
|
01dacd551e | ||
|
|
ee436c3b52 | ||
|
|
4439c59563 | ||
|
|
d2e8e9cf7d | ||
|
|
e4efc30b49 | ||
|
|
5b72f0864b | ||
|
|
9083234318 | ||
|
|
fefd6db99b | ||
|
|
b2b67ab5c1 | ||
|
|
4286febfaf | ||
|
|
a9bed25f9a | ||
|
|
65998deea2 | ||
|
|
09ccac3114 | ||
|
|
97e8593cbc | ||
|
|
2fd72ef644 | ||
|
|
6ba0aba351 | ||
|
|
bc8a2956d9 | ||
|
|
21efed3dcc | ||
|
|
bfed723d4e | ||
|
|
c9574ed611 | ||
|
|
603ecba3f3 | ||
|
|
f988d58e00 | ||
|
|
d930a2bd7a | ||
|
|
4704df4706 | ||
|
|
60105caab8 | ||
|
|
244058c8d4 | ||
|
|
9e9fac24fc | ||
|
|
1b0866b8a2 | ||
|
|
d1183911c8 | ||
|
|
dde587a759 | ||
|
|
e268985dae | ||
|
|
258e2d94e4 | ||
|
|
053ca7f972 | ||
|
|
571e43aeac | ||
|
|
29dcb2fe28 | ||
|
|
e0ae48421e | ||
|
|
5e51d256e7 | ||
|
|
4454be700c | ||
|
|
1eefc5f7e7 | ||
|
|
1fc04dc9cd | ||
|
|
a24383cb57 | ||
|
|
50ecea2044 | ||
|
|
57f48b3e50 | ||
|
|
35a3a332f4 | ||
|
|
2bb2a09b51 | ||
|
|
5f756b3c2e | ||
|
|
846b2d9236 | ||
|
|
d0f3542fef | ||
|
|
239705fd9e | ||
|
|
ed65902499 | ||
|
|
6b3636a65e | ||
|
|
32b2bf5b75 | ||
|
|
0ad4ff4306 | ||
|
|
ee0a3115ab | ||
|
|
d4e014c842 | ||
|
|
1c31bd9d6d | ||
|
|
79b026b64c | ||
|
|
d09a08583f | ||
|
|
f3c7373738 | ||
|
|
3cf75dee49 | ||
|
|
851afe1090 | ||
|
|
09396eb87e | ||
|
|
8261ef2ca0 | ||
|
|
8893d4dcc0 | ||
|
|
4df46d99c0 | ||
|
|
a0bd277014 | ||
|
|
bc65ff6310 | ||
|
|
b7d2b766b8 | ||
|
|
dae928f717 | ||
|
|
dfff6ec67f | ||
|
|
7f59726c3f | ||
|
|
dca4315700 | ||
|
|
8e1b3602e1 | ||
|
|
40e8e99bf8 | ||
|
|
1b0d306fb5 |
No files matched your search
@@ -3,10 +3,10 @@ root = true
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
tab_width = 4
|
||||
tab_width = 2
|
||||
|
||||
[{*.ats,*.cts,*.mts,*.ts,*.tsx}]
|
||||
ij_typescript_spaces_within_imports = true
|
||||
|
||||
@@ -4,7 +4,11 @@ API_SECRET=ABC
|
||||
# separate key for add action
|
||||
API_ADD_KEY=ABC
|
||||
API_ADD_SECRET=ABC
|
||||
# API User Agent
|
||||
API_USER_AGENT=PodcastIndexBot/@[email protected]
|
||||
# This is the port that the UI server starts on
|
||||
PORT=5001
|
||||
# this can be 'development' or 'production'
|
||||
NODE_ENV=development
|
||||
# proof of work difficulty for api endpoints
|
||||
POW_DIFFICULTY=3
|
||||
@@ -0,0 +1,18 @@
|
||||
version: 2
|
||||
updates:
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/" # Looks for workflow files under .github/
|
||||
schedule:
|
||||
interval: "weekly" # Check for updates to GitHub Actions every week
|
||||
# day: "sunday"
|
||||
# timezone: "UTC"
|
||||
# groups:
|
||||
# all-actions:
|
||||
# patterns: [ "*" ]
|
||||
# open-pull-requests-limit: 5
|
||||
# commit-message:
|
||||
# prefix: "actions"
|
||||
# labels:
|
||||
# - "dependencies"
|
||||
# - "github-actions"
|
||||
@@ -0,0 +1,42 @@
|
||||
name: Links
|
||||
|
||||
on:
|
||||
repository_dispatch:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "00 07 * * 6"
|
||||
|
||||
jobs:
|
||||
linkChecker:
|
||||
runs-on: ubuntu-latest
|
||||
# permissions:
|
||||
# issues: write # required for peter-evans/create-issue-from-file
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Link Checker
|
||||
id: lychee
|
||||
uses: lycheeverse/lychee-action@a8c4c7cb88f0c7386610c35eb25108e448569cb0 # for v2.7.0
|
||||
with:
|
||||
fail: false
|
||||
args: |
|
||||
--exclude-path _old --no-progress
|
||||
--exclude-all-private
|
||||
--base-url https://podcastindex.org
|
||||
--remap 'https://developer.mozilla.org/docs/Web/HTTP/Guides/CORS https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS'
|
||||
--include-verbatim --include-wikilinks --include-fragments
|
||||
'./**/*.md' './**/*.tsx' './**/*.json' './ui/**/*.html'
|
||||
|
||||
# --accept '100..=103,200..=299'
|
||||
# --root-dir "$(pwd)"
|
||||
# --suggest # Suggest link replacements for broken links, using a web archive
|
||||
# --user-agent "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0"
|
||||
# https://lychee.cli.rs/guides/cli/
|
||||
|
||||
# - name: Create Issue From File
|
||||
# if: steps.lychee.outputs.exit_code != 0
|
||||
# uses: peter-evans/create-issue-from-file@v5
|
||||
# with:
|
||||
# title: Link Checker Report
|
||||
# content-filepath: ./lychee/out.md
|
||||
# labels: report, automated issue
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Validate JSON
|
||||
uses: nhalstead/[email protected]
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
name: Validate JSONs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths:
|
||||
- 'server/data/**.json'
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
paths:
|
||||
- 'server/data/**.json'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
verify-json-validation:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
|
||||
- name: Validate JSON
|
||||
uses: dsanders11/json-schema-validate-action@79b2d95a446a0d786f7f244ae7764f8370ff3657 # v1.4.0
|
||||
with:
|
||||
schema: ./server/data/apps-schema.json
|
||||
files: ./server/data/apps.json
|
||||
|
||||
# https://github.com/marketplace/actions/json-schema-validate
|
||||
# Alternative
|
||||
# https://github.com/OrRosenblatt/validate-json-action
|
||||
@@ -0,0 +1,17 @@
|
||||
# Languages redirects /us/,en...
|
||||
https://apps.apple.com/
|
||||
https://nodejs.org/
|
||||
# podnews.net/listen redirects to https://podnews.net/podcast/i8xe9/listen?utm_source=podnews.net&utm_medium=email&utm_campaign=podnews.net:2022-03-21
|
||||
https://podnews.net/listen
|
||||
# Redirects to https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md
|
||||
https://podcastindex.org/namespace/1.0
|
||||
# OLD Archive
|
||||
http://www.itunes.com/dtds/podcast-1.0.dtd
|
||||
# TSX
|
||||
https://amboss.space/node/
|
||||
# lychee does not understand search fragments
|
||||
.*:~:text=.*
|
||||
# Paypal works with this
|
||||
https://www.paypal.com/cgi-bin/webscr
|
||||
# GitHub redirect
|
||||
https://github.com/Podcastindex-org/web-ui.git
|
||||
@@ -1,4 +1,4 @@
|
||||
trailingComma: "es5"
|
||||
tabWidth: 4
|
||||
trailingComma: 'es5'
|
||||
tabWidth: 2
|
||||
semi: false
|
||||
singleQuote: true
|
||||
@@ -4,9 +4,9 @@ Podcast Web UI is a project that houses the code for the React app and express s
|
||||
|
||||
- Landing page for PodcastIndex.
|
||||
- Search for podcasts in index.
|
||||
- Simple podcast player for listening
|
||||
- List of apps using the PodcastIndex
|
||||
- Documentation and developer login for credential management
|
||||
- Simple podcast player for listening.
|
||||
- List of apps using the PodcastIndex.
|
||||
- Documentation and developer login for credential management.
|
||||
|
||||
## Project Structure
|
||||
|
||||
@@ -35,34 +35,54 @@ The reason to build a custom express server for serving React and other data is
|
||||
|
||||
### CORS
|
||||
|
||||
The custom express server also is used to [reverse proxy](https://en.wikipedia.org/wiki/Reverse_proxy#:~:text=In%20computer%20networks%2C%20a%20reverse,the%20reverse%20proxy%20server%20itself.) requests through the same domain to prevent [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) issues. Using the same domain to server up the UI content and to send api requests prevents CORS issues in modern browsers.
|
||||
The custom express server also is used to [reverse proxy](https://en.wikipedia.org/wiki/Reverse_proxy) requests through the same domain to prevent [CORS](https://developer.mozilla.org/docs/Web/HTTP/Guides/CORS) issues. Using the same domain to server up the UI content and to send api requests prevents CORS issues in modern browsers.
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Summary
|
||||
```bash
|
||||
git clone https://github.com/Podcastindex-org/web-ui.git && cd "$(basename "$_" .git)"
|
||||
cp .env-example .environments/.env.development # Generate a .env for development
|
||||
cp .env-example .env # Generate a .env for yarn/npm start
|
||||
# Generate a new .env for production
|
||||
sed s/NODE_ENV=development/NODE_ENV=production/ .env-example > .environments/.env.production
|
||||
nvm use # If you want to use .nvmrc Node.js version
|
||||
corepack -v # Check version and instalattion
|
||||
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0 # Disable download prompt
|
||||
corepack enable # Enable dependency
|
||||
#For node 20, or any >16 apply workaournd
|
||||
node -v | grep v16 || export NODE_OPTIONS=--openssl-legacy-provider
|
||||
```
|
||||
### Set .env
|
||||
|
||||
You should see a `.env-example` file. Copy this and remove the `-example`. The file `.env` is ignored by GIT and is needed to set the `API_KEY`, `API_SECRET`, `API_ADD_KEY` and `API_ADD_SECRET` variables
|
||||
You should see a `.env-example` file. Copy this into:
|
||||
- `.env`. For `yarn start `
|
||||
- `.environments/` and change the `-example` to `.development` and/or `.production`.
|
||||
|
||||
The files `.env*` should be on `.gitignore` and are needed to set the `API_KEY`, `API_SECRET`, `API_ADD_KEY` and `API_ADD_SECRET` variables.
|
||||
|
||||
### Starting the dev server
|
||||
|
||||
In order to have the UI hot reload for development, we utilized `webpack-dev-server` this allows for easier debugging, etc. In order for the dev-server to connect to the API, you must first have set the `.env` file variables and have started the server with `yarn start`
|
||||
In order to have the UI hot reload for development, we utilized `webpack-dev-server` this allows for easier debugging, etc. In order for the dev-server to connect to the API, you must first have set the `.env*` file variables and have started the server with `yarn start`
|
||||
|
||||
```zsh
|
||||
# Install dependencies
|
||||
yarn install
|
||||
|
||||
# Start dev server
|
||||
yarn dev
|
||||
yarn run dev
|
||||
# Or if you are using docker (to bind to 0.0.0.0 instead of loopback)
|
||||
# yarn run dev:docker
|
||||
|
||||
# Start the node server in another terminal window.
|
||||
yarn start
|
||||
yarn run start
|
||||
```
|
||||
|
||||
## Running production
|
||||
|
||||
To start the server, simply run after setting the `.env` file
|
||||
To start the server, simply run after setting the `.environments/.env.production` and `.env` files.
|
||||
|
||||
**Note**: Make sure to set `NODE_ENV=production` in the `.env` file
|
||||
**Note**: Make sure to set `NODE_ENV=production` in `.env.production` and `.env` files.
|
||||
|
||||
The below script will compile the code and then start the node server.
|
||||
|
||||
@@ -70,12 +90,19 @@ The below script will compile the code and then start the node server.
|
||||
npm run build
|
||||
npm start
|
||||
```
|
||||
Or use:
|
||||
```zsh
|
||||
yarn run production
|
||||
```
|
||||
|
||||
## Tech List
|
||||
|
||||
- [Node.js](https://nodejs.org): ([v16.20.2](https://github.com/Marzal/web-ui/blob/master/.nvmrc))
|
||||
- [Express](https://expressjs.com/)
|
||||
- [React](https://reactjs.org/)
|
||||
- [React](https://react.dev/)
|
||||
- [Corepack](https://github.com/nodejs/corepack)
|
||||
- [Webpack](https://webpack.js.org/)
|
||||
- [webpack-dev-server](https://webpack.js.org/configuration/dev-server/)
|
||||
- [dotenv-webpack](https://webpack.js.org/plugins/environment-plugin/#dotenvplugin)
|
||||
|
||||
## TODO
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"user-agent-app": "www",
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"packageManager": "[email protected]",
|
||||
"dependencies": {
|
||||
"@hcaptcha/react-hcaptcha": "^0.3.9",
|
||||
"@types/dompurify": "^2.4.0",
|
||||
@@ -23,6 +24,7 @@
|
||||
"dompurify": "^2.4.3",
|
||||
"dotenv": "^8.2.0",
|
||||
"dotenv-webpack": "^8.0.1",
|
||||
"ejs": "^3.1.9",
|
||||
"express": "^4.17.1",
|
||||
"history": "^4.10.1",
|
||||
"moment": "^2.29.0",
|
||||
@@ -78,6 +80,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "webpack-dev-server --env.file=development --mode development --devtool inline-source-map",
|
||||
"dev:docker": "yarn run dev --host=0.0.0.0",
|
||||
"build": "webpack",
|
||||
"production": "NODE_ENV='production' && webpack --env.file=production --mode production && node server",
|
||||
"start": "node server",
|
||||
|
||||
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 1.7 MiB |
|
After Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 23 KiB |
@@ -0,0 +1,185 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="256mm"
|
||||
height="256mm"
|
||||
viewBox="0 0 256 256"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
xml:space="preserve"
|
||||
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
|
||||
sodipodi:docname="icon-basic.svg"
|
||||
inkscape:export-filename="icon-basic.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||
id="namedview7"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.4091414"
|
||||
inkscape:cx="1269.7322"
|
||||
inkscape:cy="582.92805"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="991"
|
||||
inkscape:window-x="-9"
|
||||
inkscape:window-y="-9"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1"
|
||||
showguides="true" /><defs
|
||||
id="defs2"><clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath508"><rect
|
||||
style="fill:#6b21a8;fill-opacity:1;stroke-width:0.0569547"
|
||||
id="rect510"
|
||||
width="270.93329"
|
||||
height="270.93329"
|
||||
x="-124.01519"
|
||||
y="51.081829"
|
||||
rx="26.458332"
|
||||
ry="26.458332" /></clipPath><clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath512"><rect
|
||||
style="fill:#6b21a8;fill-opacity:1;stroke-width:0.0569547"
|
||||
id="rect514"
|
||||
width="270.93329"
|
||||
height="270.93329"
|
||||
x="-124.01519"
|
||||
y="51.081829"
|
||||
rx="26.458332"
|
||||
ry="26.458332" /></clipPath><clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath516"><rect
|
||||
style="fill:#6b21a8;fill-opacity:1;stroke-width:0.0569547"
|
||||
id="rect518"
|
||||
width="270.93329"
|
||||
height="270.93329"
|
||||
x="-124.01519"
|
||||
y="51.081829"
|
||||
rx="26.458332"
|
||||
ry="26.458332" /></clipPath><clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath516-6"><rect
|
||||
style="fill:#6b21a8;fill-opacity:1;stroke-width:0.0569547"
|
||||
id="rect518-4"
|
||||
width="270.93329"
|
||||
height="270.93329"
|
||||
x="-124.01519"
|
||||
y="51.081829"
|
||||
rx="26.458332"
|
||||
ry="26.458332" /></clipPath><clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath575"><rect
|
||||
style="fill:#6b21a8;fill-opacity:1;stroke-width:0.0713646"
|
||||
id="rect577"
|
||||
width="339.48129"
|
||||
height="339.48129"
|
||||
x="-158.28917"
|
||||
y="16.807848"
|
||||
rx="33.152473"
|
||||
ry="33.152473"
|
||||
clip-path="url(#clipPath516-6)"
|
||||
transform="matrix(0.85456852,0,0,0.85456852,1.6653694,27.130071)" /></clipPath><clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath579"><rect
|
||||
style="fill:#6b21a8;fill-opacity:1;stroke-width:0.0713646"
|
||||
id="rect581"
|
||||
width="339.48129"
|
||||
height="339.48129"
|
||||
x="-158.28917"
|
||||
y="16.807848"
|
||||
rx="33.152473"
|
||||
ry="33.152473"
|
||||
clip-path="url(#clipPath516-6)"
|
||||
transform="matrix(0.85456852,0,0,0.85456852,1.6654277,27.130132)" /></clipPath><clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath583"><rect
|
||||
style="fill:#6b21a8;fill-opacity:1;stroke-width:0.0713646"
|
||||
id="rect585"
|
||||
width="339.48129"
|
||||
height="339.48129"
|
||||
x="-158.28917"
|
||||
y="16.807848"
|
||||
rx="33.152473"
|
||||
ry="33.152473"
|
||||
clip-path="url(#clipPath516-6)"
|
||||
transform="matrix(0.85456852,0,0,0.85456852,1.6654277,27.130132)" /></clipPath><clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath575-6"><rect
|
||||
style="fill:#6b21a8;fill-opacity:1;stroke-width:0.0713646"
|
||||
id="rect577-7"
|
||||
width="339.48129"
|
||||
height="339.48129"
|
||||
x="-158.28917"
|
||||
y="16.807848"
|
||||
rx="33.152473"
|
||||
ry="33.152473"
|
||||
clip-path="url(#clipPath516-6)"
|
||||
transform="matrix(0.85456852,0,0,0.85456852,1.6653694,27.130071)" /></clipPath><clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath579-4"><rect
|
||||
style="fill:#6b21a8;fill-opacity:1;stroke-width:0.0713646"
|
||||
id="rect581-5"
|
||||
width="339.48129"
|
||||
height="339.48129"
|
||||
x="-158.28917"
|
||||
y="16.807848"
|
||||
rx="33.152473"
|
||||
ry="33.152473"
|
||||
clip-path="url(#clipPath516-6)"
|
||||
transform="matrix(0.85456852,0,0,0.85456852,1.6654277,27.130132)" /></clipPath><clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath583-3"><rect
|
||||
style="fill:#6b21a8;fill-opacity:1;stroke-width:0.0713646"
|
||||
id="rect585-4"
|
||||
width="339.48129"
|
||||
height="339.48129"
|
||||
x="-158.28917"
|
||||
y="16.807848"
|
||||
rx="33.152473"
|
||||
ry="33.152473"
|
||||
clip-path="url(#clipPath516-6)"
|
||||
transform="matrix(0.85456852,0,0,0.85456852,1.6654277,27.130132)" /></clipPath><clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath579-2"><rect
|
||||
style="fill:#6b21a8;fill-opacity:1;stroke-width:0.0713646"
|
||||
id="rect581-57"
|
||||
width="339.48129"
|
||||
height="339.48129"
|
||||
x="-158.28917"
|
||||
y="16.807848"
|
||||
rx="33.152473"
|
||||
ry="33.152473"
|
||||
clip-path="url(#clipPath516-6)"
|
||||
transform="matrix(0.85456852,0,0,0.85456852,1.6654277,27.130132)" /></clipPath><clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath575-8"><rect
|
||||
style="fill:#6b21a8;fill-opacity:1;stroke-width:0.0713646"
|
||||
id="rect577-6"
|
||||
width="339.48129"
|
||||
height="339.48129"
|
||||
x="-158.28917"
|
||||
y="16.807848"
|
||||
rx="33.152473"
|
||||
ry="33.152473"
|
||||
clip-path="url(#clipPath516-6)"
|
||||
transform="matrix(0.85456852,0,0,0.85456852,1.6653694,27.130071)" /></clipPath></defs><g
|
||||
inkscape:label="Capa 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(124.01517,-51.081848)"><path
|
||||
id="rect362-4-0"
|
||||
clip-path="none"
|
||||
style="fill:#6b21a8;fill-opacity:1;stroke:#5a2ca0;stroke-width:1.24166"
|
||||
d="m 3.3361583,82.864539 c -1.3800172,0 -16.1437683,49.566761 -21.1846883,71.122701 -0.794361,3.39672 -1.649119,6.17527 -1.898792,6.17527 -0.24969,0 -1.675929,-4.39244 -3.169244,-9.76147 -5.589738,-20.0972 -18.185025,-56.765335 -18.349772,-53.419927 -0.02701,0.5328 -0.949464,6.902387 -2.050219,14.154897 -2.779049,18.30992 -4.257901,32.25606 -4.886143,46.10111 l -0.534929,11.82052 -14.817676,-29.75043 -14.814727,-29.74745 -0.243868,18.72737 c -0.13339,10.29977 0.13718,26.94388 0.600822,36.98669 0.463477,10.04284 0.72154,18.38138 0.57426,18.52873 -0.147289,0.14732 -3.644805,-4.64581 -7.772188,-10.64839 -15.807444,-22.98947 -22.347154,-32.35318 -23.268334,-33.31301 -0.49122,-0.51177 -0.58973,0.20193 -0.27534,1.9932 0.26925,1.53407 1.39339,11.57453 2.49763,22.31258 1.10427,10.73807 2.16983,19.9721 2.36983,20.51996 0.19939,0.54789 0.18989,0.99611 -0.0226,0.99611 -0.21415,0 -4.68667,-3.21842 -9.93746,-7.15171 -5.25082,-3.93326 -9.54706,-6.9659 -9.54706,-6.74069 0,0.22525 0.71326,1.80647 1.58511,3.51539 0.87185,1.70898 4.67913,10.93097 8.4605,20.49048 7.25235,18.33441 10.00413,24.26245 15.830502,34.11731 10.778794,18.23165 27.96734,33.34799 44.864062,39.45579 0,0 3.252076,1.4991 4.99626,1.80441 32.764442,5.73519 66.953138,5.31831 99.787825,0 1.726099,-0.27958 4.977574,-1.6559 4.977574,-1.6559 2.737622,-0.91104 10.050858,-4.17409 13.478032,-6.12713 20.562401,-11.718 34.481995,-29.6075 47.135555,-60.57459 2.50728,-6.13599 6.42338,-15.69135 8.70239,-21.23287 l 4.14569,-10.07512 -6.05529,4.44362 c -3.3294,2.44405 -7.6059,5.70077 -9.50381,7.23626 l -3.45047,2.79167 0.43953,-2.73854 c 0.86503,-5.40138 4.50358,-42.41468 4.19977,-42.71848 -0.11018,-0.11033 -7.12889,9.66463 -15.59942,21.72061 -8.470532,12.05598 -15.494043,21.81403 -15.607283,21.68422 -0.113217,-0.12975 0.09496,-4.00201 0.462163,-8.60408 0.813601,-10.19742 1.796152,-65.34568 1.164255,-65.34568 -0.452152,0 -19.24274,37.51121 -25.946917,51.79847 l -3.550784,7.5706 -0.986262,-13.85307 c -0.92529,-13.00575 -2.534563,-26.50904 -5.377794,-45.11677 -0.669687,-4.38288 -1.219627,-8.93502 -1.222272,-10.11445 -0.0094,-4.712939 -1.609503,-2.565557 -5.012969,6.72887 -4.553659,12.43543 -10.696021,30.65963 -14.972092,44.4255 l -3.341339,10.75756 -1.405174,-6.89999 C 22.787604,145.36065 16.226768,121.94212 9.7198402,101.41387 6.6326465,91.674304 4.1070396,83.515997 4.1070396,83.28437 c 0,-0.231474 -0.3471362,-0.419522 -0.7709392,-0.419876 z"
|
||||
sodipodi:nodetypes="ccscccccccccccssscsssssccaaccccccccccsscscccscccccsscc" /></g></svg>
|
||||
|
After Width: | Height: | Size: 8.8 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 194 KiB |
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 102 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 98 KiB |
@@ -0,0 +1,15 @@
|
||||
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M20 40C31.0457 40 40 31.0457 40 20C40 8.9543 31.0457 0 20 0C8.9543 0 0 8.9543 0 20C0 31.0457 8.9543 40 20 40Z" fill="url(#paint0_linear)"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M27.1549 10.602C27.1549 10.602 22.398 14.2749 20.0195 16.1113C19.999 16.1271 19.9581 16.1587 19.9581 16.1587L12.6939 10.6503C12.2935 10.3394 11.8275 10.1997 11.3718 10.1997C10.3131 10.1996 9.3097 10.9532 9.3097 12.0641V16.2415L9.30818 28.6597C9.30818 29.7705 10.3117 30.5241 11.3703 30.5241C11.826 30.5241 12.292 30.3844 12.6924 30.0734L19.9581 24.5168C23.5733 27.3238 27.1534 30.0734 27.1534 30.0734C27.5538 30.3843 28.0199 30.5241 28.4755 30.5241C29.5342 30.5241 30.608 29.7706 30.608 28.6597V16.2415V11.9797C30.608 10.8689 29.5356 10.1514 28.477 10.1514C28.0213 10.1514 27.5553 10.2911 27.1549 10.602Z" fill="white" fill-opacity="0.7"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.627 20.3459L19.9581 24.5167L25.255 20.3447L19.9581 16.1587L14.627 20.3459Z" fill="white" fill-opacity="0.6"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.31076 16.2267V24.4651L14.627 20.3459L9.31076 16.2267Z" fill="white" fill-opacity="0.6"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M25.255 20.3447L30.608 24.5168V16.1587L25.255 20.3447Z" fill="white" fill-opacity="0.6"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M27.058 10.6738L19.9581 16.1587L25.255 20.3447L30.608 16.1587V11.9797C30.608 10.3917 28.5794 9.36782 27.058 10.6738Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.7012 10.6176C11.3687 9.58513 9.31226 10.4425 9.31226 12.0305V16.2267L14.627 20.3459L19.9581 16.1587L12.7012 10.6176Z" fill="white"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear" x1="0.279416" y1="0" x2="0.279416" y2="39.4412" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FF6633"/>
|
||||
<stop offset="1" stop-color="#FF0E83"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 388 KiB |
|
After Width: | Height: | Size: 134 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 25 KiB |
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Calque_2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 463.5 464.9" style="enable-background:new 0 0 463.5 464.9;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#F4842D;}
|
||||
.st1{clip-path:url(#SVGID_2_);fill:url(#SVGID_3_);}
|
||||
.st2{fill:#FFFFFF;}
|
||||
</style>
|
||||
<path class="st0" d="M357.8,460.7H104.3C48,460.7,2,414.7,2,358.4V106.3C2,50,48,4,104.3,4h253.5C414,4,460.1,50,460.1,106.3v252.1
|
||||
C460.1,414.7,414,460.7,357.8,460.7z"/>
|
||||
<g>
|
||||
<defs>
|
||||
<path id="SVGID_1_" d="M357.8,460.7H104.3C48,460.7,2,414.7,2,358.4V106.3C2,50,48,4,104.3,4h253.5C414,4,460.1,50,460.1,106.3
|
||||
v252.1C460.1,414.7,414,460.7,357.8,460.7z"/>
|
||||
</defs>
|
||||
<clipPath id="SVGID_2_">
|
||||
<use xlink:href="#SVGID_1_" style="overflow:visible;"/>
|
||||
</clipPath>
|
||||
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="168.517" y1="171.8193" x2="544.7023" y2="549.1208">
|
||||
<stop offset="0.1302" style="stop-color:#E85D27"/>
|
||||
<stop offset="0.6867" style="stop-color:#F0772B"/>
|
||||
</linearGradient>
|
||||
<polygon class="st1" points="392.1,601.6 129.8,339.4 105.5,233.7 213.8,100.8 335.5,133.7 597.7,396 "/>
|
||||
</g>
|
||||
<path class="st2" d="M377.3,229.8c-1.8-79.8-67-144-147.3-144c-81.4,0-147.3,66-147.3,147.3c0,56.3,31.6,105.3,78.1,130.1v-44.7
|
||||
v-84.4c0-0.6,0-1.1,0-1.7c0-34.1,24.5-62.5,56.8-68.7v24.5c-19.1,5.6-33,23.3-33,44.2c0,0.1,0,0.3,0,0.4h0v0.2
|
||||
c0.3,25.2,20.9,45.5,46.1,45.5c20.9,0,38.5-13.9,44.2-32.9h24.5c-6.2,32.3-34.6,56.7-68.7,56.7c-17.7,0-33.8-6.6-46.1-17.4v88.4
|
||||
c14.3,4.6,29.6,7.2,45.5,7.2c30.6,0,59-9.3,82.6-25.3v25.3h64.7L377.3,229.8L377.3,229.8z M230.6,259.3c-14.9,0-26.9-12-26.9-26.9
|
||||
s12-26.9,26.9-26.9s26.9,12,26.9,26.9S245.5,259.3,230.6,259.3z M300.6,232.6h-23.8c0-0.1,0-0.1,0-0.2c0-25.5-20.6-46.1-46.1-46.1
|
||||
c0,0-0.1,0-0.1,0v-23.8c0,0,0.1,0,0.1,0c38.6,0,69.9,31.3,69.9,69.9C300.6,232.5,300.6,232.5,300.6,232.6z M341.6,232.6h-23.6
|
||||
c0-0.1,0-0.1,0-0.2c0-48.2-39.1-87.3-87.3-87.3c0,0-0.1,0-0.1,0v-23.6c0,0,0.1,0,0.1,0c61.3,0,110.9,49.7,110.9,110.9
|
||||
C341.6,232.5,341.6,232.5,341.6,232.6z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 721 KiB |
|
After Width: | Height: | Size: 287 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 902 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
@@ -0,0 +1 @@
|
||||
<svg enable-background="new 0 0 101.3 97" viewBox="9.4 5.8 82.5 82.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><path d="m9.4 5.8h82.5v82.5h-82.5z"/></clipPath><path clip-path="url(#a)" d="m50.7 88.3c22.8 0 41.2-18.5 41.2-41.2s-18.5-41.3-41.2-41.3-41.3 18.4-41.3 41.2 18.5 41.3 41.3 41.3" fill="#db4615"/><g fill="#fff"><path clip-path="url(#a)" d="m31 38.6h-2.6c-.9 0-1.4.5-1.4 1.3v13.1c0 .9.5 1.4 1.4 1.4h2.6c.9 0 1.3-.5 1.3-1.4v-13.1c.1-.9-.4-1.3-1.3-1.3"/><path clip-path="url(#a)" d="m41.6 28h-2.6c-.9 0-1.4.5-1.4 1.3v16.1c0 .9.5 1.3 1.4 1.3h2.6c.9 0 1.3-.4 1.3-1.3v-16.1c0-.9-.4-1.3-1.3-1.3"/><path clip-path="url(#a)" d="m49.5 18.4c-.9 0-1.3.5-1.3 1.3v38.5c0 .9.4 1.3 1.3 1.3h2.6c.9 0 1.4-.4 1.4-1.3v-38.5c0-.9-.5-1.3-1.4-1.3z"/><path clip-path="url(#a)" d="m62.6 47.1h-2.6c-.9 0-1.4.5-1.4 1.3v25.1c0 .9.5 1.4 1.4 1.4h2.6c.9 0 1.3-.4 1.3-1.4v-25.1c.1-.9-.4-1.3-1.3-1.3"/><path clip-path="url(#a)" d="m73.1 47.1h-2.6c-.9 0-1.4.5-1.4 1.3v13.1c0 .9.5 1.4 1.4 1.4h2.6c.9 0 1.3-.5 1.3-1.4v-13.1c.1-.9-.4-1.3-1.3-1.3"/><path clip-path="url(#a)" d="m83.7 47.1h-2.6c-.9 0-1.4.5-1.4 1.3v4.6c0 .9.5 1.3 1.4 1.3h2.6c.9 0 1.3-.4 1.3-1.3v-4.6c0-.9-.4-1.3-1.3-1.3"/><path clip-path="url(#a)" d="m20.5 47.1h-2.6c-.9 0-1.4.5-1.4 1.3v4.6c0 .9.5 1.3 1.4 1.3h2.6c.9 0 1.3-.4 1.3-1.3v-4.6c.1-.9-.4-1.3-1.3-1.3"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill="#335FFF" d="M28.876 3.12399C24.71 -1.04101 7.29 -1.04101 3.124 3.12399C1.041 5.20699 0 10.604 0 16C0 21.396 1.041 26.793 3.124 28.876C5.207 30.959 10.603 32 16 32C21.397 32 26.793 30.959 28.876 28.876C30.959 26.793 32 21.397 32 16C32 10.603 30.959 5.20699 28.876 3.12399Z"/>
|
||||
<path fill="white" d="M20.6206 19.501C20.98 19.4206 21.9001 20.0032 21.981 20.3623C22.0212 20.5419 21.8956 20.8616 21.7153 21.1465C21.6982 21.1735 21.6777 21.1984 21.6597 21.2246L21.6685 21.2305C20.651 22.7565 18.9297 23.6944 16.9995 23.9355V26H18.4995C18.8367 26 19.1739 26.0652 19.3042 26.1953C19.4343 26.3255 19.4995 26.6628 19.4995 27C19.4995 27.3371 19.4343 27.6744 19.3042 27.8047C19.2065 27.9022 18.9925 27.9629 18.7495 27.9873L18.4995 28H13.4995L13.2505 27.9873C13.0071 27.9629 12.7925 27.9024 12.6948 27.8047C12.5647 27.6745 12.4995 27.3371 12.4995 27C12.4995 26.6629 12.5648 26.3256 12.6948 26.1953C12.8251 26.0653 13.1625 26 13.4995 26H14.9995V23.9355C13.0694 23.6944 11.3479 22.7565 10.3306 21.2305L10.3394 21.2236C10.3214 21.1975 10.3007 21.1724 10.2837 21.1455C10.1034 20.8606 9.97869 20.5409 10.019 20.3613C10.1002 20.0021 11.0192 19.4204 11.3784 19.501C11.558 19.5415 11.7938 19.7913 11.9741 20.0762C11.9895 20.1005 12.0016 20.1267 12.0161 20.1514C12.7717 21.2587 14.223 21.9999 15.9995 22C17.7806 21.9999 19.2348 21.2546 19.9888 20.1426C20.0015 20.1211 20.0125 20.0983 20.0259 20.0771C20.2062 19.7924 20.441 19.5415 20.6206 19.501ZM16.0005 10C16.2008 10 16.4104 10.0115 16.6226 10.0381C16.7442 10.0536 16.8645 10.0733 16.981 10.0996C16.951 10.8495 16.8609 11.5303 16.6909 11.8604C16.541 11.9503 16.2703 11.9999 16.0005 12C15.2005 12 14.6627 12.2869 14.4917 12.543C14.3884 12.698 14.2527 13.0549 14.1499 13.6318C14.0522 14.1804 14.0005 14.8339 14.0005 15.5C14.0005 16.1661 14.0522 16.8196 14.1499 17.3682C14.2527 17.9451 14.3884 18.302 14.4917 18.457C14.6627 18.7131 15.2005 19 16.0005 19C16.8004 18.9999 17.3384 18.7131 17.5093 18.457C17.6126 18.3018 17.7484 17.9449 17.8511 17.3682C17.9413 16.8612 17.9894 16.2646 17.9966 15.6514C17.9977 15.651 17.9994 15.6508 18.0005 15.6504C19.19 15.2003 19.7641 14.459 19.939 14.2061C19.978 14.6293 20.0005 15.0667 20.0005 15.5C20.0005 16.2598 19.9419 17.0331 19.8198 17.7188C19.7028 18.3756 19.5089 19.0617 19.1733 19.5654C18.4661 20.6269 17.1018 20.9999 16.0005 21C14.8991 21 13.5351 20.6269 12.8276 19.5654C12.492 19.0617 12.2982 18.3757 12.1812 17.7188C12.0591 17.0331 12.0005 16.2599 12.0005 15.5C12.0005 14.7401 12.0591 13.9669 12.1812 13.2812C12.2982 12.6243 12.492 11.9383 12.8276 11.4346C13.5351 10.3731 14.8991 10 16.0005 10ZM16.0005 4C17.1018 4.00011 18.4661 4.37306 19.1733 5.43457C19.5089 5.93835 19.7028 6.62437 19.8198 7.28125C19.9419 7.96687 20.0005 8.74017 20.0005 9.5C20.0005 10.2598 19.9419 11.0331 19.8198 11.7188C19.7028 12.3756 19.5089 13.0617 19.1733 13.5654C18.4661 14.6269 17.1018 14.9999 16.0005 15C15.7998 15 15.59 14.9876 15.3774 14.9609C15.2562 14.9454 15.1362 14.9266 15.02 14.9004C15.05 14.1504 15.1401 13.4696 15.3101 13.1396C15.4601 13.0498 15.7307 13 16.0005 13C16.8004 12.9999 17.3384 12.7131 17.5093 12.457C17.6126 12.3018 17.7484 11.9449 17.8511 11.3682C17.9487 10.8196 18.0005 10.1661 18.0005 9.5C18.0005 8.83389 17.9487 8.18043 17.8511 7.63184C17.7484 7.05515 17.6126 6.69817 17.5093 6.54297C17.3384 6.28692 16.8004 6.00012 16.0005 6C15.2005 6 14.6627 6.28692 14.4917 6.54297C14.3884 6.69804 14.2527 7.05492 14.1499 7.63184C14.0597 8.13855 14.0107 8.73469 14.0034 9.34766C14.0025 9.34801 14.0014 9.34912 14.0005 9.34961C12.8113 9.79947 12.2362 10.5395 12.061 10.793C12.0221 10.37 12.0005 9.93295 12.0005 9.5C12.0005 8.74014 12.0591 7.96689 12.1812 7.28125C12.2982 6.6243 12.492 5.93835 12.8276 5.43457C13.5351 4.37307 14.8991 4 16.0005 4Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 112 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 783 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 172 KiB |
|
After Width: | Height: | Size: 154 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 90 KiB |
@@ -35,13 +35,15 @@
|
||||
"social links",
|
||||
"node hosting",
|
||||
"podcast player",
|
||||
"music player",
|
||||
"video",
|
||||
"sn-network",
|
||||
"blockchain",
|
||||
"podcaster wallet",
|
||||
"open source",
|
||||
"other",
|
||||
"chat bot"
|
||||
"chat bot",
|
||||
"rss proxy",
|
||||
"self-hosted"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -75,9 +77,12 @@
|
||||
"AmigaOS 4",
|
||||
"Sailfish OS",
|
||||
"Umbrel",
|
||||
"Start9",
|
||||
"Citadel",
|
||||
"Hive",
|
||||
"Discord"
|
||||
"Discord",
|
||||
"Fediverse",
|
||||
"Cloud Phone"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -89,6 +94,51 @@
|
||||
},
|
||||
"tagLine": {
|
||||
"type": "string"
|
||||
},
|
||||
"platformLinks": {
|
||||
"type": "object",
|
||||
"description": "Platform-specific download/store links",
|
||||
"properties": {
|
||||
"iOS": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"description": "Apple Store URL"
|
||||
},
|
||||
"Android": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"description": "Google Play Store URL"
|
||||
},
|
||||
"macOS": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"description": "Mac App Store URL"
|
||||
},
|
||||
"Windows": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"description": "Microsoft Store URL"
|
||||
},
|
||||
"Web": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"description": "Web application URL"
|
||||
},
|
||||
"F-Droid": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"description": "F-Droid repository URL"
|
||||
},
|
||||
"Linux": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"description": "Linux distribution URL"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -111,23 +161,29 @@
|
||||
"Location",
|
||||
"Person",
|
||||
"Value",
|
||||
"Sn-Network",
|
||||
"Boostagrams",
|
||||
"Sat Streaming",
|
||||
"Video",
|
||||
"Synchronize",
|
||||
"Podping",
|
||||
"Alternate Enclosure",
|
||||
"Trailer",
|
||||
"GUID",
|
||||
"Medium",
|
||||
"Live",
|
||||
"Live Item",
|
||||
"Live Boosts",
|
||||
"Block",
|
||||
"Social Interact",
|
||||
"OP3",
|
||||
"Images",
|
||||
"License",
|
||||
"Txt"
|
||||
"Txt",
|
||||
"Wallet Switching (VTS)",
|
||||
"Podroll",
|
||||
"Update Frequency",
|
||||
"Chat",
|
||||
"Publisher",
|
||||
"Content Link",
|
||||
"Remote Item",
|
||||
"Image"
|
||||
]
|
||||
},
|
||||
"elementURL": {
|
||||
|
||||
@@ -1,238 +1,437 @@
|
||||
const path = require('path')
|
||||
const fs = require('fs');
|
||||
const fs = require('fs')
|
||||
const express = require('express')
|
||||
const app = express() // create express app
|
||||
const { makeThreadcap, InMemoryCache, updateThreadcap, makeRateLimitedFetcher } = require('threadcap');
|
||||
const fetch = require('node-fetch');
|
||||
const packageJson = require('../package.json');
|
||||
const {
|
||||
makeThreadcap,
|
||||
InMemoryCache,
|
||||
updateThreadcap,
|
||||
makeRateLimitedFetcher,
|
||||
} = require('threadcap')
|
||||
const fetch = require('node-fetch')
|
||||
const packageJson = require('../package.json')
|
||||
const ejs = require('ejs')
|
||||
const { createPowMiddleware } = require('./middleware/index')
|
||||
|
||||
// Gets the .env variables
|
||||
require('dotenv').config()
|
||||
|
||||
const USER_AGENT = `Podcastindex.org-web/${packageJson.version}`;
|
||||
const USER_AGENT = `Podcastindex.org-web/${packageJson.version}`
|
||||
const POW_DIFFICULTY = parseInt(process.env.POW_DIFFICULTY, 10) || 0;
|
||||
|
||||
// Utilizing the node repo from comster/podcast-index-api :)
|
||||
// NOTE: This server will work as a reverse proxy.
|
||||
const api = require('podcast-index-api')(
|
||||
process.env.API_KEY,
|
||||
process.env.API_SECRET
|
||||
process.env.API_KEY,
|
||||
process.env.API_SECRET,
|
||||
process.env.API_USER_AGENT
|
||||
)
|
||||
|
||||
const apiAdd = require('podcast-index-api')(
|
||||
process.env.API_ADD_KEY,
|
||||
process.env.API_ADD_SECRET
|
||||
process.env.API_ADD_KEY,
|
||||
process.env.API_ADD_SECRET,
|
||||
process.env.API_USER_AGENT
|
||||
)
|
||||
|
||||
app.set('view engine', 'ejs')
|
||||
app.set('views', './server/views')
|
||||
|
||||
app.use((req, res, next) => {
|
||||
const { rawHeaders, httpVersion, method, socket, url } = req
|
||||
const { remoteAddress, remoteFamily } = socket
|
||||
|
||||
const { rawHeaders, httpVersion, method, socket, url } = req;
|
||||
const { remoteAddress, remoteFamily } = socket;
|
||||
// console.log(
|
||||
// JSON.stringify({
|
||||
// timestamp: Date.now(),
|
||||
// rawHeaders,
|
||||
// httpVersion,
|
||||
// method,
|
||||
// remoteAddress,
|
||||
// remoteFamily,
|
||||
// url
|
||||
// })
|
||||
// );
|
||||
|
||||
// console.log(
|
||||
// JSON.stringify({
|
||||
// timestamp: Date.now(),
|
||||
// rawHeaders,
|
||||
// httpVersion,
|
||||
// method,
|
||||
// remoteAddress,
|
||||
// remoteFamily,
|
||||
// url
|
||||
// })
|
||||
// );
|
||||
let userAgent = req.header('user-agent')
|
||||
let cfLocation = req.header('CF-IPCountry')
|
||||
let cfSourceIP = req.header('CF-Connecting-IP')
|
||||
let cfBotScore = req.header('Cf-Bot-Score')
|
||||
|
||||
let userAgent = req.header('user-agent')
|
||||
let cfLocation = req.header('CF-IPCountry')
|
||||
let cfSourceIP = req.header('CF-Connecting-IP')
|
||||
let cfBotScore = req.header('Cf-Bot-Score')
|
||||
var logString =
|
||||
'[' +
|
||||
Date.now() +
|
||||
'] ' +
|
||||
'[' +
|
||||
remoteAddress +
|
||||
'] ' +
|
||||
method +
|
||||
' (' +
|
||||
url +
|
||||
') - UA: [' +
|
||||
userAgent +
|
||||
'] - LOC: [' +
|
||||
cfLocation +
|
||||
'|' +
|
||||
cfSourceIP +
|
||||
'] - BOT: [' +
|
||||
cfBotScore +
|
||||
']'
|
||||
|
||||
var logString = "["+Date.now()+"] " + "["+remoteAddress+"] " + method +" ("+url+") - UA: ["+userAgent+"] - LOC: ["+cfLocation+"|"+cfSourceIP+"] - BOT: ["+cfBotScore+"]"
|
||||
console.log(logString)
|
||||
|
||||
console.log(logString)
|
||||
next()
|
||||
})
|
||||
|
||||
const powMiddleware = createPowMiddleware({
|
||||
difficulty: POW_DIFFICULTY
|
||||
})
|
||||
|
||||
next();
|
||||
});
|
||||
|
||||
// ------------------------------------------------
|
||||
// ---------- Static files for namespace ----------
|
||||
// ------------------------------------------------
|
||||
|
||||
app.use('/namespace/1.0', async (req, res) => {
|
||||
fs.readFile('./server/data/namespace1.0.html', 'utf8', (err, data) => {
|
||||
// You should always specify the content type header,
|
||||
// when you don't use 'res.json' for sending JSON.
|
||||
res.set('Content-Type', 'text/html');
|
||||
res.send(data)
|
||||
})
|
||||
res.redirect(
|
||||
'https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md'
|
||||
)
|
||||
})
|
||||
|
||||
// ------------------------------------------------
|
||||
// ---------- LNAddress for Podcastindex ----------
|
||||
// ------------------------------------------------
|
||||
|
||||
app.get('/.well-known/keysend/podcastindex', (req, res) => {
|
||||
res.redirect('https://getalby.com/.well-known/keysend/podcastindex')
|
||||
})
|
||||
|
||||
app.get('/.well-known/lnurlp/podcastindex', (req, res) => {
|
||||
res.redirect('https://getalby.com/.well-known/lnurlp/podcastindex')
|
||||
})
|
||||
|
||||
// ------------------------------------------------
|
||||
// ------------ Reverse proxy for API -------------
|
||||
// ------------------------------------------------
|
||||
|
||||
app.use('/api/search/byterm', async (req, res) => {
|
||||
let term = req.query.q
|
||||
const response = await api.searchByTerm(term)
|
||||
res.send(response)
|
||||
app.get('/api/auth/config', (req, res) => {
|
||||
res.json({
|
||||
powDifficulty: POW_DIFFICULTY
|
||||
})
|
||||
})
|
||||
|
||||
app.use('/api/search/bytitle', async (req, res) => {
|
||||
let term = req.query.q
|
||||
const response = await api.custom('search/bytitle', {q: term})
|
||||
res.send(response)
|
||||
app.use('/api/search/byterm', powMiddleware, async (req, res) => {
|
||||
const response = await api.custom('search/byterm', req.query)
|
||||
res.send(response)
|
||||
})
|
||||
|
||||
app.use('/api/recent/episodes', async (req, res) => {
|
||||
let max = req.query.max
|
||||
const response = await api.recentEpisodes(max)
|
||||
res.send(response)
|
||||
app.use('/api/search/bytitle', powMiddleware, async (req, res) => {
|
||||
let term = req.query.q
|
||||
const response = await api.custom('search/bytitle', { q: term })
|
||||
res.send(response)
|
||||
})
|
||||
|
||||
app.use('/api/podcasts/bytag', async (req, res) => {
|
||||
let max = req.query.max
|
||||
let start_at = req.query.start_at
|
||||
const response = await api.custom('podcasts/bytag', {
|
||||
'podcast-value': '',
|
||||
'max': max,
|
||||
'start_at': start_at,
|
||||
})
|
||||
res.send(response)
|
||||
app.use('/api/search/music/byterm', powMiddleware, async (req, res) => {
|
||||
let term = req.query.q
|
||||
const response = await api.custom('search/music/byterm', { q: term })
|
||||
res.send(response)
|
||||
})
|
||||
|
||||
app.use('/api/podcasts/byfeedid', async (req, res) => {
|
||||
let feedId = req.query.id
|
||||
const response = await api.podcastsByFeedId(feedId)
|
||||
res.send(response)
|
||||
app.use('/api/search/byperson', powMiddleware, async (req, res) => {
|
||||
let person = req.query.q
|
||||
const response = await api.searchEpisodesByPerson(person)
|
||||
res.send(response)
|
||||
})
|
||||
|
||||
app.use('/api/podcasts/byfeedurl', async (req, res) => {
|
||||
let feedUrl = req.query.url
|
||||
const response = await api.podcastsByFeedUrl(feedUrl)
|
||||
res.send(response)
|
||||
app.use('/api/recent/episodes', powMiddleware, async (req, res) => {
|
||||
let max = req.query.max
|
||||
const response = await api.recentEpisodes(max)
|
||||
res.send(response)
|
||||
})
|
||||
|
||||
|
||||
app.use('/api/episodes/byfeedid', async (req, res) => {
|
||||
let feedId = req.query.id
|
||||
let max = req.query.max
|
||||
const response = await api.episodesByFeedId(feedId, null, max)
|
||||
res.send(response)
|
||||
app.use('/api/podcasts/bytag', powMiddleware, async (req, res) => {
|
||||
let max = req.query.max
|
||||
let start_at = req.query.start_at
|
||||
const response = await api.custom('podcasts/bytag', {
|
||||
'podcast-value': '',
|
||||
max: max,
|
||||
start_at: start_at,
|
||||
})
|
||||
res.send(response)
|
||||
})
|
||||
|
||||
app.use('/api/add/byfeedurl', async (req, res) => {
|
||||
let feedUrl = req.query.url
|
||||
const response = await apiAdd.addByFeedUrl(feedUrl)
|
||||
res.send(response)
|
||||
app.use('/api/podcasts/byfeedid', powMiddleware, async (req, res) => {
|
||||
let feedId = req.query.id
|
||||
const response = await api.podcastsByFeedId(feedId)
|
||||
res.send(response)
|
||||
})
|
||||
|
||||
app.use('/api/podcasts/byguid', powMiddleware, async (req, res) => {
|
||||
let guid = req.query.guid
|
||||
const response = await api.custom('podcasts/byguid', { guid: guid })
|
||||
res.send(response)
|
||||
})
|
||||
|
||||
app.use('/api/podcasts/byfeedurl', powMiddleware, async (req, res) => {
|
||||
let feedUrl = req.query.url
|
||||
const response = await api.podcastsByFeedUrl(feedUrl)
|
||||
res.send(response)
|
||||
})
|
||||
|
||||
app.use('/api/episodes/byfeedid', powMiddleware, async (req, res) => {
|
||||
let feedId = req.query.id
|
||||
let max = req.query.max
|
||||
const response = await api.episodesByFeedId(feedId, null, max)
|
||||
res.send(response)
|
||||
})
|
||||
|
||||
app.use('/api/add/byfeedurl', powMiddleware, async (req, res) => {
|
||||
let feedUrl = req.query.url
|
||||
const response = await apiAdd.addByFeedUrl(feedUrl)
|
||||
res.send(response)
|
||||
})
|
||||
|
||||
// ------------------------------------------------
|
||||
// ------------ API to get comments for episode ---
|
||||
// ------------------------------------------------
|
||||
app.use('/api/comments/byepisodeid', async (req, res) => {
|
||||
let episodeId = req.query.id;
|
||||
const response = await api.episodesById(episodeId, false);
|
||||
app.use('/api/comments/byepisodeid', powMiddleware, async (req, res) => {
|
||||
let episodeId = req.query.id
|
||||
const response = await api.episodesById(episodeId, false)
|
||||
|
||||
const socialInteract = response.episode.socialInteract && response.episode.socialInteract.filter((si) => si.protocol === 'activitypub');
|
||||
const socialInteract =
|
||||
response.episode.socialInteract &&
|
||||
response.episode.socialInteract.filter(
|
||||
(si) => si.protocol === 'activitypub'
|
||||
)
|
||||
|
||||
if(!socialInteract && socialInteract.lenght >= 0) {
|
||||
// Bad requests sounds appropriate, as the client is only expected to call this API
|
||||
// when it validated upfront that the episode has a property socialInteract with activitypub protocol
|
||||
res.status(400).send('The episode does not contain a socialInteract property')
|
||||
}
|
||||
if (socialInteract === undefined || socialInteract.length === 0) {
|
||||
// Bad requests sounds appropriate, as the client is only expected to call this API
|
||||
// when it validated upfront that the episode has a property socialInteract with activitypub protocol
|
||||
res
|
||||
.status(400)
|
||||
.send('The episode does not contain a socialInteract property')
|
||||
return
|
||||
}
|
||||
|
||||
const userAgent = USER_AGENT;
|
||||
const cache = new InMemoryCache();
|
||||
const fetcher = makeRateLimitedFetcher(fetch);
|
||||
const userAgent = USER_AGENT
|
||||
const cache = new InMemoryCache()
|
||||
const fetcher = makeRateLimitedFetcher(fetch)
|
||||
|
||||
// Disable buffering in the nginx server so that the delivery of
|
||||
// chunks are not delayed
|
||||
res.setHeader('X-Accel-Buffering', 'no');
|
||||
// Disable buffering in the nginx server so that the delivery of
|
||||
// chunks are not delayed
|
||||
res.setHeader('X-Accel-Buffering', 'no')
|
||||
|
||||
const sentCommenters = {};
|
||||
const sentCommenters = {}
|
||||
|
||||
const threadcap = await makeThreadcap(socialInteract[0].uri, { userAgent, cache, fetcher });
|
||||
const threadcap = await makeThreadcap(socialInteract[0].uri, {
|
||||
userAgent,
|
||||
cache,
|
||||
fetcher,
|
||||
})
|
||||
|
||||
const callbacks = {
|
||||
onEvent: e => {
|
||||
if (e.kind === 'node-processed' && e.part === 'replies') {
|
||||
writeThreadcapChunk(e.nodeId, threadcap, sentCommenters, res);
|
||||
}
|
||||
}
|
||||
}
|
||||
const callbacks = {
|
||||
onEvent: (e) => {
|
||||
if (e.kind === 'node-processed' && e.part === 'replies') {
|
||||
writeThreadcapChunk(e.nodeId, threadcap, sentCommenters, res)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
await updateThreadcap(threadcap, { updateTime: new Date().toISOString(), userAgent, cache, fetcher, callbacks });
|
||||
await updateThreadcap(threadcap, {
|
||||
updateTime: new Date().toISOString(),
|
||||
userAgent,
|
||||
cache,
|
||||
fetcher,
|
||||
callbacks,
|
||||
})
|
||||
|
||||
res.end()
|
||||
res.end()
|
||||
})
|
||||
|
||||
function writeThreadcapChunk(processedNodeId, threadcap, sentCommenters, res) {
|
||||
const threadcapChunk = {};
|
||||
const threadcapChunk = {}
|
||||
|
||||
threadcapChunk.roots = threadcap.roots.filter((root) => root === processedNodeId);
|
||||
threadcapChunk.nodes = {};
|
||||
threadcapChunk.nodes[processedNodeId] = threadcap.nodes[processedNodeId];
|
||||
threadcapChunk.roots = threadcap.roots.filter(
|
||||
(root) => root === processedNodeId
|
||||
)
|
||||
threadcapChunk.nodes = {}
|
||||
threadcapChunk.nodes[processedNodeId] = threadcap.nodes[processedNodeId]
|
||||
|
||||
const comment = threadcapChunk.nodes[processedNodeId].comment;
|
||||
const comment = threadcapChunk.nodes[processedNodeId].comment
|
||||
|
||||
// nodes are always new, but commenters can be repeated, we only include
|
||||
// them in th chunk if they have not been sent before, as there is no purpose
|
||||
// on sending them again.
|
||||
// this could be determines by inspecting previous nodes, but this way
|
||||
// is easier.
|
||||
if(comment && !sentCommenters[comment.attributedTo]) {
|
||||
sentCommenters[comment.attributedTo] = true;
|
||||
threadcapChunk.commenters = {};
|
||||
threadcapChunk.commenters[comment.attributedTo] = threadcap.commenters[comment.attributedTo];
|
||||
}
|
||||
// nodes are always new, but commenters can be repeated, we only include
|
||||
// them in th chunk if they have not been sent before, as there is no purpose
|
||||
// on sending them again.
|
||||
// this could be determines by inspecting previous nodes, but this way
|
||||
// is easier.
|
||||
if (comment && !sentCommenters[comment.attributedTo]) {
|
||||
sentCommenters[comment.attributedTo] = true
|
||||
threadcapChunk.commenters = {}
|
||||
threadcapChunk.commenters[comment.attributedTo] =
|
||||
threadcap.commenters[comment.attributedTo]
|
||||
}
|
||||
|
||||
res.write(JSON.stringify(threadcapChunk) + '\n')
|
||||
res.write(JSON.stringify(threadcapChunk) + '\n')
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// --------- API to get remote interact url for comments ---
|
||||
// ---------------------------------------------------------
|
||||
app.use('/api/comments/remoteInteractUrlPattern', powMiddleware, async (req, res) => {
|
||||
const interactorAccount = req.query.interactorAccount
|
||||
|
||||
console.log('Debug interactorAccount', interactorAccount)
|
||||
|
||||
let splitIndex = 1
|
||||
if (interactorAccount.startsWith('@')) {
|
||||
splitIndex = 2
|
||||
}
|
||||
const interactorInstanceHost = interactorAccount.split('@')[splitIndex]
|
||||
|
||||
const response = await fetch(
|
||||
`https://${interactorInstanceHost}/.well-known/webfinger?` +
|
||||
new URLSearchParams({
|
||||
resource: `acct:${interactorAccount.substring(splitIndex - 1)}`,
|
||||
})
|
||||
)
|
||||
const parsedResponse = await response.json()
|
||||
|
||||
const linkOStatusSubscribe = parsedResponse.links.find(
|
||||
(link) => link.rel === 'http://ostatus.org/schema/1.0/subscribe'
|
||||
)
|
||||
|
||||
res.send({
|
||||
remoteInteractUrlPattern: linkOStatusSubscribe.template,
|
||||
})
|
||||
})
|
||||
|
||||
// ------------------------------------------------
|
||||
// ---------- Static files for API data -----------
|
||||
// ------------------------------------------------
|
||||
|
||||
app.use('/api/stats', async (req, res) => {
|
||||
fs.readFile('./server/data/stats.json', 'utf8', (err, data) => {
|
||||
// You should always specify the content type header,
|
||||
// when you don't use 'res.json' for sending JSON.
|
||||
res.set('Content-Type', 'application/json');
|
||||
res.send(data)
|
||||
})
|
||||
fs.readFile('./server/data/stats.json', 'utf8', (err, data) => {
|
||||
// You should always specify the content type header,
|
||||
// when you don't use 'res.json' for sending JSON.
|
||||
res.set('Content-Type', 'application/json')
|
||||
res.send(data)
|
||||
})
|
||||
})
|
||||
|
||||
app.use('/api/newfeedstats', async (req, res) => {
|
||||
fs.readFile('./server/data/newfeedstats.json', 'utf8', (err, data) => {
|
||||
// You should always specify the content type header,
|
||||
// when you don't use 'res.json' for sending JSON.
|
||||
res.set('Content-Type', 'application/json');
|
||||
res.send(data)
|
||||
})
|
||||
fs.readFile('./server/data/newfeedstats.json', 'utf8', (err, data) => {
|
||||
// You should always specify the content type header,
|
||||
// when you don't use 'res.json' for sending JSON.
|
||||
res.set('Content-Type', 'application/json')
|
||||
res.send(data)
|
||||
})
|
||||
})
|
||||
|
||||
app.use('/api/apps', async (req, res) => {
|
||||
fs.readFile('./server/data/apps.json', 'utf8', (err, data) => {
|
||||
// You should always specify the content type header,
|
||||
// when you don't use 'res.json' for sending JSON.
|
||||
res.set('Content-Type', 'application/json');
|
||||
res.send(data)
|
||||
})
|
||||
fs.readFile('./server/data/apps.json', 'utf8', (err, data) => {
|
||||
// You should always specify the content type header,
|
||||
// when you don't use 'res.json' for sending JSON.
|
||||
res.set('Content-Type', 'application/json')
|
||||
res.send(data)
|
||||
})
|
||||
})
|
||||
|
||||
app.use('/api/images', express.static('./server/assets'))
|
||||
|
||||
// ------------------------------------------------
|
||||
// ---------- Pages with Open Graph tags ----------
|
||||
// ------------------------------------------------
|
||||
|
||||
app.use('/apps', (req, res) => {
|
||||
res.render('index', {
|
||||
title: 'Apps',
|
||||
path: req.originalUrl,
|
||||
})
|
||||
})
|
||||
|
||||
app.use('/add', (req, res) => {
|
||||
res.render('index', {
|
||||
title: 'Add Feed',
|
||||
path: req.originalUrl,
|
||||
})
|
||||
})
|
||||
|
||||
app.use('/podcast/value4value', (req, res) => {
|
||||
res.render('index', {
|
||||
title: 'Value 4 Value Podcasts',
|
||||
description:
|
||||
'These podcasts are set up to receive Bitcoin payments in real-time over the Lightning network using compatible Podcasting 2.0 apps.',
|
||||
path: req.originalUrl,
|
||||
})
|
||||
})
|
||||
|
||||
app.use('/podcast/:podcastid(\\d+)', async (req, res) => {
|
||||
const params = {
|
||||
title: 'Podcast', // default title
|
||||
path: req.originalUrl,
|
||||
}
|
||||
|
||||
if (req.query.episode) {
|
||||
// /podcast/41504?episode=15576217793
|
||||
const response = await api.episodesById(req.query.episode)
|
||||
|
||||
if (response?.episode?.id) {
|
||||
const { feedTitle, title, description, image } = response.episode
|
||||
const textDescription = description
|
||||
.replace(new RegExp('</?[^>]+(>|$)', 'gi'), '')
|
||||
.replace(new RegExp('[\r\n]', 'g'), ' ')
|
||||
|
||||
params.title = feedTitle + ' | ' + title
|
||||
params.description = textDescription
|
||||
params.image = image
|
||||
}
|
||||
} else if (req.params.podcastid) {
|
||||
// /podcast/41504
|
||||
const response = await api.podcastsByFeedId(req.params.podcastid)
|
||||
|
||||
if (response?.feed?.id) {
|
||||
const { title, description, image } = response.feed
|
||||
const textDescription = description
|
||||
.replace(new RegExp('</?[^>]+(>|$)', 'gi'), '')
|
||||
.replace(new RegExp('[\r\n]', 'g'), ' ')
|
||||
|
||||
params.title = title
|
||||
params.description = textDescription
|
||||
params.image = image
|
||||
}
|
||||
}
|
||||
|
||||
res.render('index', params)
|
||||
})
|
||||
|
||||
app.use('/search', (req, res) => {
|
||||
res.render('index', {
|
||||
title: 'Search',
|
||||
path: req.originalUrl,
|
||||
})
|
||||
})
|
||||
|
||||
app.use('/stats', (req, res) => {
|
||||
res.render('index', {
|
||||
title: 'Stats',
|
||||
path: req.originalUrl,
|
||||
})
|
||||
})
|
||||
|
||||
// ------------------------------------------------
|
||||
// ---------- Static content for client -----------
|
||||
// ------------------------------------------------
|
||||
|
||||
app.use(express.static('./server/www'))
|
||||
app.get('*', (req, res) => res.sendFile(path.resolve('server', 'www', 'index.html')))
|
||||
|
||||
app.get('*', (req, res) => {
|
||||
res.render('index', {})
|
||||
})
|
||||
|
||||
// ------------------------------------------------
|
||||
|
||||
|
||||
const PORT = process.env.PORT || 333;
|
||||
const PORT = process.env.PORT || 333
|
||||
|
||||
// start express server on port 5001 (default)
|
||||
app.listen(PORT, () => {
|
||||
console.log(`server started on port ${PORT}`)
|
||||
console.log(`server started on port ${PORT}`)
|
||||
})
|
||||
@@ -0,0 +1,47 @@
|
||||
const crypto = require('crypto');
|
||||
|
||||
function createPowMiddleware(options = {}) {
|
||||
const { difficulty = 3 } = options;
|
||||
|
||||
return (req, res, next) => {
|
||||
if (difficulty === 0) {
|
||||
return next(); // POW is disabled
|
||||
}
|
||||
|
||||
const {
|
||||
'x-pow-nonce': nonce,
|
||||
'x-pow-hash': hash,
|
||||
'x-pow-timestamp': timestamp
|
||||
} = req.headers;
|
||||
|
||||
if (!nonce || !hash || !timestamp) {
|
||||
return res.status(401).json({ error: 'Missing POW headers' });
|
||||
}
|
||||
|
||||
// Verify timestamp is within 5 minutes
|
||||
const now = Math.floor(Date.now() / 1000);
|
||||
const timestampNum = parseInt(timestamp);
|
||||
if (isNaN(timestampNum) || Math.abs(now - timestampNum) > 300) {
|
||||
return res.status(401).json({ error: 'Timestamp expired or invalid' });
|
||||
}
|
||||
|
||||
// Verify hash starts with the correct number of zeros (difficulty level)
|
||||
if (!hash.startsWith('0'.repeat(difficulty))) {
|
||||
return res.status(401).json({ error: 'Hash does not match difficulty level' });
|
||||
}
|
||||
|
||||
// Build and verify challenge
|
||||
const challenge = `${req.method.toUpperCase()}|${req.originalUrl}|${timestamp}`;
|
||||
const challengeHash = crypto.createHash('sha256').update(challenge).digest('hex');
|
||||
const computed = crypto.createHash('sha256').update(challengeHash + nonce).digest('hex');
|
||||
|
||||
if (computed !== hash) {
|
||||
return res.status(401).json({ error: 'Invalid proof of work' });
|
||||
}
|
||||
|
||||
req.powVerified = true;
|
||||
next();
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { createPowMiddleware };
|
||||
@@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow: /podcast/
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M6.188 8.719c.439-.439.926-.801 1.444-1.087 2.887-1.591 6.589-.745 8.445 2.069l-2.246 2.245c-.644-1.469-2.243-2.305-3.834-1.949-.599.134-1.168.433-1.633.898l-4.304 4.306c-1.307 1.307-1.307 3.433 0 4.74 1.307 1.307 3.433 1.307 4.74 0l1.327-1.327c1.207.479 2.501.67 3.779.575l-2.929 2.929c-2.511 2.511-6.582 2.511-9.093 0s-2.511-6.582 0-9.093l4.304-4.306zm6.836-6.836l-2.929 2.929c1.277-.096 2.572.096 3.779.574l1.326-1.326c1.307-1.307 3.433-1.307 4.74 0 1.307 1.307 1.307 3.433 0 4.74l-4.305 4.305c-1.311 1.311-3.44 1.3-4.74 0-.303-.303-.564-.68-.727-1.051l-2.246 2.245c.236.358.481.667.796.982.812.812 1.846 1.417 3.036 1.704 1.542.371 3.194.166 4.613-.617.518-.286 1.005-.648 1.444-1.087l4.304-4.305c2.512-2.511 2.512-6.582.001-9.093-2.511-2.51-6.581-2.51-9.092 0z" fill="#868686"/></svg>
|
||||
|
After Width: | Height: | Size: 882 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="35" height="35" viewBox="0 0 35 35" fill="#868686" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M6.9375 6.93803C10.3549 3.52142 24.6451 3.52142 28.0625 6.93803C29.7711 8.64691 30.625 13.0735 30.625 17.5005C30.6249 21.9274 29.771 26.3532 28.0625 28.062C26.3538 29.7708 21.9272 30.6255 17.5 30.6255C13.0728 30.6255 8.64621 29.7708 6.9375 28.062C5.22902 26.3532 4.37506 21.9266 4.375 17.5005C4.375 13.0743 5.22895 8.64691 6.9375 6.93803ZM13.709 20.3706C13.4142 20.305 12.6608 20.7831 12.5938 21.0777C12.5609 21.225 12.6638 21.4878 12.8115 21.7212C12.8255 21.7432 12.8418 21.7643 12.8564 21.7857L12.8496 21.7906C13.6842 23.0422 15.0965 23.8106 16.6797 24.0083V25.7027H15.4492C15.1728 25.7027 14.8961 25.7563 14.7891 25.8628C14.6824 25.9695 14.629 26.2466 14.6289 26.523C14.6289 26.7993 14.6825 27.076 14.7891 27.1831C14.8692 27.2632 15.0448 27.3135 15.2441 27.3335L15.4492 27.3433H19.5508L19.7559 27.3335C19.9552 27.3135 20.1309 27.2632 20.2109 27.1831C20.3175 27.0761 20.3711 26.7994 20.3711 26.523C20.371 26.2466 20.3176 25.9696 20.2109 25.8628C20.1039 25.7564 19.827 25.7027 19.5508 25.7027H18.3203V24.0083C19.9035 23.8106 21.3158 23.0423 22.1504 21.7906L22.1426 21.7857C22.1574 21.7642 22.1744 21.7434 22.1885 21.7212C22.3363 21.4875 22.4393 21.2249 22.4062 21.0777C22.3386 20.783 21.5856 20.3059 21.291 20.3716C21.1437 20.4048 20.9506 20.6107 20.8027 20.8443C20.7918 20.8615 20.7828 20.8804 20.7725 20.898C20.154 21.8102 18.961 22.4214 17.5 22.4214C16.0416 22.4213 14.8498 21.8124 14.2305 20.9029C14.2191 20.8835 14.2093 20.8623 14.1973 20.8433C14.0493 20.6097 13.8562 20.4037 13.709 20.3706ZM17.5 12.5777C16.5966 12.5777 15.4768 12.8837 14.8965 13.7544C14.6213 14.1677 14.4632 14.7312 14.3672 15.2701C14.2671 15.8323 14.2188 16.4663 14.2188 17.0894C14.2188 17.7124 14.2671 18.3465 14.3672 18.9087C14.4631 19.4475 14.6213 20.0111 14.8965 20.4244C15.4767 21.2953 16.5965 21.6011 17.5 21.6011C18.4036 21.6011 19.5233 21.2954 20.1035 20.4244C20.3787 20.011 20.5369 19.4475 20.6328 18.9087C20.7329 18.3465 20.7812 17.7124 20.7812 17.0894C20.7812 16.734 20.7634 16.3749 20.7314 16.0279C20.5883 16.2351 20.1171 16.843 19.1406 17.2124H19.1377C19.1318 17.7157 19.0926 18.2055 19.0186 18.6216C18.9343 19.0947 18.822 19.3878 18.7373 19.5152C18.597 19.7252 18.1561 19.9605 17.5 19.9605C16.8439 19.9605 16.403 19.7252 16.2627 19.5152C16.178 19.3878 16.0657 19.0946 15.9814 18.6216C15.9014 18.1717 15.8594 17.6356 15.8594 17.0894C15.8594 16.5431 15.9013 16.0071 15.9814 15.5572C16.0657 15.084 16.178 14.7908 16.2627 14.6636C16.4033 14.4537 16.8442 14.2183 17.5 14.2183C17.7215 14.2183 17.9434 14.1769 18.0664 14.1031C18.2056 13.8321 18.2791 13.2743 18.3037 12.6597C18.2569 12.6491 18.209 12.6408 18.1611 12.6324C18.0585 12.6156 17.9563 12.6011 17.8555 12.5923C17.739 12.5825 17.6202 12.5777 17.5 12.5777ZM17.5 7.6558C16.5966 7.65582 15.4768 7.96179 14.8965 8.83256C14.6213 9.24578 14.4632 9.80937 14.3672 10.3482C14.2671 10.9104 14.2188 11.5445 14.2188 12.1675C14.2188 12.5229 14.2366 12.882 14.2686 13.229C14.4119 13.0216 14.8832 12.4137 15.8594 12.0445H15.8623C15.8682 11.5412 15.9074 11.0513 15.9814 10.6353C16.0657 10.1621 16.178 9.86893 16.2627 9.74174C16.4033 9.5318 16.8442 9.29644 17.5 9.29642C18.1558 9.29644 18.5967 9.53181 18.7373 9.74174C18.822 9.86895 18.9343 10.1621 19.0186 10.6353C19.0986 11.0852 19.1406 11.6213 19.1406 12.1675C19.1406 12.7138 19.0986 13.2498 19.0186 13.6997C18.9343 14.1728 18.822 14.4659 18.7373 14.5933C18.597 14.8033 18.1561 15.0386 17.5 15.0386C17.2787 15.0386 17.0567 15.0801 16.9336 15.1538C16.7943 15.4247 16.7209 15.9825 16.6963 16.5972C16.7431 16.6078 16.791 16.6162 16.8389 16.6245C16.9415 16.6413 17.0437 16.6558 17.1445 16.6646C17.261 16.6744 17.3798 16.6792 17.5 16.6792C18.4036 16.6792 19.5233 16.3735 20.1035 15.5025C20.3787 15.0892 20.5369 14.5257 20.6328 13.9869C20.7329 13.4246 20.7812 12.7905 20.7812 12.1675C20.7812 11.5445 20.7329 10.9104 20.6328 10.3482C20.5369 9.80939 20.3787 9.24578 20.1035 8.83256C19.5232 7.96182 18.4034 7.65581 17.5 7.6558Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.9 KiB |
@@ -1,20 +1,35 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!--
|
||||
//
|
||||
// This file is used by Webpack to generate the actual EJS template in `views/index.ejs`
|
||||
//
|
||||
-->
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<!-- Style dependencies -->
|
||||
<!-- <link href="https://unpkg.com/normalize.css@^7.0.0" rel="stylesheet" /> -->
|
||||
<title>Podcastindex.org</title>
|
||||
<meta name="title" content="Podcastindex.org">
|
||||
<meta name="description" content="The Podcast Index is here to preserve, protect and extend the open, independent podcasting ecosystem.">
|
||||
<title><%= (locals.title ? locals.title + ' | ' : '') + 'Podcastindex.org' %></title>
|
||||
|
||||
<meta name="title" content="<%= (locals.title ? locals.title + ' | ' : '') + 'Podcastindex.org' %>">
|
||||
<meta name="description" content="<%= (locals.description || 'The Podcast Index is here to preserve, protect and extend the open, independent podcasting ecosystem.') %>">
|
||||
|
||||
<meta name="twitter:title" content="<%= (locals.title ? locals.title + ' | ' : '') + 'Podcastindex.org' %>">
|
||||
<meta name="twitter:description" content="<%= (locals.description || 'The Podcast Index is here to preserve, protect and extend the open, independent podcasting ecosystem.') %>">
|
||||
<meta name="twitter:site" content="@PodcastindexOrg">
|
||||
<meta name="twitter:url" content="https://podcastindex.org<%= (locals.path || '/') %>">
|
||||
<meta name="twitter:image" content="<%= locals.image || 'https://podcastindex.org/android-chrome-256x256.png' %>">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
|
||||
<meta property="og:title" content="<%= (locals.title ? locals.title + ' | ' : '') + 'Podcastindex.org' %>">
|
||||
<meta property="og:description" content="<%= (locals.description || 'The Podcast Index is here to preserve, protect and extend the open, independent podcasting ecosystem.') %>">
|
||||
<meta property="og:site_name" content="Podcastindex.org">
|
||||
<meta property="og:url" content="https://podcastindex.org<%= (locals.path || '/') %>">
|
||||
<meta property="og:image" content="<%= locals.image || 'https://podcastindex.org/android-chrome-256x256.png' %>">
|
||||
<meta property="og:image:width" content="256">
|
||||
<meta property="og:image:height" content="256">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="https://podcastindex.org/">
|
||||
<meta property="og:title" content="Podcastindex.org">
|
||||
<meta property="og:description" content="The Podcast Index is here to preserve, protect and extend the open, independent podcasting ecosystem.">
|
||||
<meta property="twitter:url" content="https://podcastindex.org/">
|
||||
<meta property="twitter:title" content="Podcastindex.org">
|
||||
<meta property="twitter:description" content="The Podcast Index is here to preserve, protect and extend the open, independent podcasting ecosystem.">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -29,7 +44,7 @@
|
||||
<li><a href="https://api.podcastindex.org/">Developers</a></li>
|
||||
</ul>
|
||||
<main id="content">
|
||||
<p style="font-size: 30px;"><b>This website requires JavaScript to be enabled for full functionality.</b></p>
|
||||
<p style="font-size: 30px;"><b>This website requires JavaScript for full functionality.</b></p>
|
||||
|
||||
<h2>Let's preserve podcasting as a platform for free speech</h2>
|
||||
|
||||
@@ -39,7 +54,7 @@
|
||||
Listen to the
|
||||
<a href="https://mp3s.nashownotes.com/PC20-01-2020-08-28-Final.mp3?_from=podcastindex.org">first episode</a>
|
||||
of "Podcasting 2.0", where we discuss the project, and its goals.
|
||||
<a href="http://mp3s.nashownotes.com/pc20rss.xml">Podcasting 2.0 RSS Feed</a>
|
||||
<a href="https://feeds.podcastindex.org/pc20.xml">Podcasting 2.0 RSS Feed</a>
|
||||
</p>
|
||||
|
||||
<h3>Promise</h3>
|
||||
@@ -52,8 +67,8 @@
|
||||
</p>
|
||||
<h3>Financing</h3>
|
||||
<p>
|
||||
The core Podcast Index is financed by its founders and stakeholders: Podcasters, Developers and
|
||||
Listeners.
|
||||
The core Podcast Index is financed by its founders and stakeholders: Podcasters, developers and
|
||||
listeners.
|
||||
</p>
|
||||
<p>Corporate interests and advertising are antithetical to our business.</p>
|
||||
<p>
|
||||
@@ -77,29 +92,29 @@
|
||||
</p>
|
||||
<p>
|
||||
We build in the open. Get active in the
|
||||
<a href="https://github.com/Podcastindex-org">Github repos</a>.
|
||||
<a href="https://github.com/Podcastindex-org">GitHub repos</a>.
|
||||
</p>
|
||||
<p>
|
||||
We have a Mastodon server for collaboration. Join it
|
||||
here:
|
||||
<a href="https://podcastindex.social/invite/hfcQYbjq">Podcastindex.social</a>.
|
||||
<a href="https://podcastindex.social/about">Podcastindex.social</a>.
|
||||
</p>
|
||||
<p>
|
||||
Follow us on <a href="https://twitter.com/PodcastindexOrg">Twitter</a> or
|
||||
<a href="https://noagendasocial.com/@podcastindex">Mastodon</a>.
|
||||
Follow us on <a href="https://podcastindex.social/public/local/">or our Mastodon server</a> or
|
||||
<a href="https://twitter.com/PodcastindexOrg">Twitter</a>.
|
||||
</p>
|
||||
<p>
|
||||
Shoot us an email at:
|
||||
Shoot us an e-mail at:
|
||||
<a href="mailto:[email protected]">[email protected]</a>
|
||||
</p>
|
||||
|
||||
<h2>Help us out...</h2>
|
||||
<p>None of this is free. If you get any value from this project, or if you just believe in it and want
|
||||
to help us out with hosting fees and paying the bills, a donation of any amount would be great.</p>
|
||||
<h2>Help us out…</h2>
|
||||
<p>As a valuable gift, your every value recieved or belief in it can be recognized by helping
|
||||
us out with hosting fees and paying the bills, to the tune of a donation of any amount.</p>
|
||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
|
||||
<input type="hidden" name="cmd" value="_s-xclick"/>
|
||||
<input type="hidden" name="hosted_button_id" value="9GEMYSYB7G2DW"/>
|
||||
<Button big primary type="submit" alt="Donate with PayPal button">Donate with Paypal</Button>
|
||||
<Button big primary type="submit" alt="Donate with PayPal button">Donate with PayPal</Button>
|
||||
</form>
|
||||
</main>
|
||||
</noscript>
|
||||
@@ -29,7 +29,7 @@ export default class Boostagram extends React.PureComponent<IProps> {
|
||||
|
||||
this.setState({
|
||||
destinations: destinations,
|
||||
senderName: localStorage.getItem('senderName'),
|
||||
senderName: localStorage.getItem('senderName') || '',
|
||||
})
|
||||
}
|
||||
|
||||
@@ -73,6 +73,76 @@ export default class Boostagram extends React.PureComponent<IProps> {
|
||||
name: undefined,
|
||||
message: this.state.boostagram,
|
||||
sender_name: this.state.senderName,
|
||||
episode_guid: episode?.guid,
|
||||
}
|
||||
}
|
||||
|
||||
const resolveLnAddress = async (dest) => {
|
||||
const [username, hostname] = dest.address.split('@')
|
||||
|
||||
// check if it's a keysend address
|
||||
try {
|
||||
const resp = await fetch(`https://${hostname}/.well-known/keysend/${username}`)
|
||||
const info = await resp.json()
|
||||
|
||||
if (info) {
|
||||
return {
|
||||
address: info.pubkey,
|
||||
customKey: info.customData?.[0]?.customKey,
|
||||
customValue: info.customData?.[0]?.customValue,
|
||||
}
|
||||
}
|
||||
} catch (err) {}
|
||||
|
||||
// assume it's an lnurl address
|
||||
const resp = await fetch(`https://${hostname}/.well-known/lnurlp/${username}`)
|
||||
const info = await resp.json()
|
||||
|
||||
return {
|
||||
callback: info.callback,
|
||||
}
|
||||
}
|
||||
|
||||
const sendPayment = async (dest, amount, boostInfo) => {
|
||||
if (dest.type == 'lnaddress') {
|
||||
dest = await resolveLnAddress(dest)
|
||||
}
|
||||
|
||||
if (dest.callback) { // lnurl
|
||||
let comment = ""
|
||||
|
||||
if (boostInfo.message != "") {
|
||||
comment += `${boostInfo.message}\n`
|
||||
}
|
||||
|
||||
comment += `From ${boostInfo.sender_name} for ${boostInfo.podcast} - ${boostInfo.episode}`
|
||||
|
||||
// request an invoice from the callback
|
||||
let params = new URLSearchParams({
|
||||
amount: (amount * 1000).toString(),
|
||||
comment: comment,
|
||||
})
|
||||
|
||||
let invoiceresp = await fetch(dest.callback + `?${params.toString()}`)
|
||||
const invoice = await invoiceresp.json()
|
||||
|
||||
// pay invoice
|
||||
await webln.sendPayment(invoice.pr)
|
||||
}
|
||||
else { // keysend
|
||||
let customRecords = {}
|
||||
|
||||
if (dest.customKey) {
|
||||
customRecords[dest.customKey] = dest.customValue
|
||||
}
|
||||
|
||||
customRecords['7629169'] = JSON.stringify(boostInfo)
|
||||
|
||||
await webln.keysend({
|
||||
destination: dest.address,
|
||||
amount: amount,
|
||||
customRecords: customRecords,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,52 +161,44 @@ export default class Boostagram extends React.PureComponent<IProps> {
|
||||
|
||||
if (webln) {
|
||||
this.throwConfetti()
|
||||
|
||||
// fee destinations are calculated as percentages of the donation amount
|
||||
// i.e. (split / 100) * satAmount
|
||||
for (const dest of feesDestinations) {
|
||||
let feeRecord = getBaseRecord()
|
||||
|
||||
let amount = Math.round(
|
||||
(dest.split / 100) * this.state.satAmount
|
||||
)
|
||||
|
||||
if (amount) {
|
||||
runningTotal -= amount
|
||||
|
||||
feeRecord.name = dest.name
|
||||
feeRecord.value_msat = amount * 1000
|
||||
|
||||
let customRecords = { '7629169': JSON.stringify(feeRecord) }
|
||||
|
||||
if (dest.customKey) {
|
||||
customRecords[dest.customKey] = dest.customValue
|
||||
}
|
||||
|
||||
try {
|
||||
await webln.keysend({
|
||||
destination: dest.address,
|
||||
amount: amount,
|
||||
customRecords: customRecords,
|
||||
})
|
||||
await sendPayment(dest, amount, feeRecord)
|
||||
} catch (err) {
|
||||
alert(`error with ${dest.name}: ${err.message}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// non-fee destinations are calculated as shares of the remaining amount after fees are taken out
|
||||
// i.e. (split / sum(all splits)) * runningTotal
|
||||
let splitsTotal = splitsDestinations.reduce((sum, dest) => sum + dest.split, 0)
|
||||
|
||||
for (const dest of splitsDestinations) {
|
||||
let record = getBaseRecord()
|
||||
let amount = Math.round((dest.split / 100) * runningTotal)
|
||||
let amount = Math.round((dest.split / splitsTotal) * runningTotal)
|
||||
|
||||
record.name = dest.name
|
||||
record.value_msat = amount * 1000
|
||||
if (amount >= 1) {
|
||||
let customRecords = { '7629169': JSON.stringify(record) }
|
||||
if (dest.customKey) {
|
||||
customRecords[dest.customKey] = dest.customValue
|
||||
}
|
||||
|
||||
try {
|
||||
await webln.keysend({
|
||||
destination: dest.address,
|
||||
amount: amount,
|
||||
customRecords: customRecords,
|
||||
})
|
||||
if (amount >= 1) {
|
||||
try {
|
||||
await sendPayment(dest, amount, record)
|
||||
} catch (err) {
|
||||
alert(`error with ${dest.name}: ${err.message}`)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
:root {
|
||||
--button-background: #F0F0F0;
|
||||
--button-hover-color: #f2f2f2;
|
||||
--button-background: #f7f7f7;
|
||||
--button-hover-color: #ededed;
|
||||
|
||||
&[data-theme="dark"] {
|
||||
--button-background: #1a1a1a;
|
||||
@@ -57,15 +57,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
a,
|
||||
.button {
|
||||
.podcastIndexAppList a{
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
//TODO check if it should be input.button or .button input
|
||||
input,
|
||||
.button {
|
||||
outline: 0;
|
||||
border-spacing: 0;
|
||||
border-width: 0;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
import * as React from 'react'
|
||||
import { authenticatedFetch } from '../../utils/auth'
|
||||
|
||||
import './styles.scss'
|
||||
|
||||
interface ICommentMenuProps {
|
||||
/**
|
||||
* URL of the comment
|
||||
*/
|
||||
url: string,
|
||||
commenterUrl: string,
|
||||
commenterAccount: string,
|
||||
}
|
||||
|
||||
interface ICommentMenuState {
|
||||
interactorAccount?: string,
|
||||
}
|
||||
|
||||
class CommentMenu extends React.PureComponent<ICommentMenuProps, ICommentMenuState> {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
interactorAccount: localStorage.getItem('commentsInteractorAccount')
|
||||
}
|
||||
}
|
||||
|
||||
onClickCopyLink(e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) {
|
||||
e.preventDefault();
|
||||
navigator.clipboard.writeText(this.props.url);
|
||||
|
||||
// Some form of "toast message" would be better, but I don't
|
||||
// think something like that is already implemented, meanwhile,
|
||||
// we use an alert, it is ugly, but it show the user there was
|
||||
// a reaction.
|
||||
alert('Link to post copied');
|
||||
}
|
||||
|
||||
async onClickReply(e: React.MouseEvent<HTMLAnchorElement, MouseEvent>): Promise<void> {
|
||||
e.preventDefault();
|
||||
|
||||
const remoteInteractUrlPattern = await this.fetchRemoteInteractUrlPattern();
|
||||
|
||||
if(!remoteInteractUrlPattern) {
|
||||
// TODO: error handling
|
||||
}
|
||||
|
||||
// alert(remoteInteractUrlPattern);
|
||||
const remoteInteractUrl = remoteInteractUrlPattern.replace('{uri}', encodeURI(this.props.url));
|
||||
window.open(remoteInteractUrl, '_blank');
|
||||
}
|
||||
|
||||
async onClickFollow(e: React.MouseEvent<HTMLAnchorElement, MouseEvent>): Promise<void> {
|
||||
e.preventDefault();
|
||||
|
||||
const remoteInteractUrlPattern = await this.fetchRemoteInteractUrlPattern();
|
||||
|
||||
if(!remoteInteractUrlPattern) {
|
||||
// TODO: error handling
|
||||
}
|
||||
|
||||
// alert(remoteInteractUrlPattern);
|
||||
const remoteInteractUrl = remoteInteractUrlPattern.replace('{uri}', encodeURI(CommentMenu.stripLeadingAt(this.props.commenterAccount)));
|
||||
window.open(remoteInteractUrl, '_blank');
|
||||
}
|
||||
|
||||
async fetchRemoteInteractUrlPattern(): Promise<string> {
|
||||
let interactorAccount = localStorage.getItem('commentsInteractorAccount');
|
||||
|
||||
if(!interactorAccount) {
|
||||
interactorAccount = prompt('What is your Fediverse account?');
|
||||
|
||||
if(interactorAccount) {
|
||||
localStorage.setItem('commentsInteractorAccount', interactorAccount);
|
||||
}
|
||||
}
|
||||
|
||||
if(!interactorAccount) {
|
||||
return;
|
||||
}
|
||||
|
||||
let remoteInteractUrlPattern = localStorage.getItem('commentsRemoteInteractUrlPattern');
|
||||
|
||||
if(!remoteInteractUrlPattern) {
|
||||
const response = await authenticatedFetch('/api/comments/remoteInteractUrlPattern?' + new URLSearchParams({
|
||||
interactorAccount: interactorAccount
|
||||
}));
|
||||
|
||||
const parsedResponse = await response.json();
|
||||
|
||||
remoteInteractUrlPattern = parsedResponse.remoteInteractUrlPattern;
|
||||
|
||||
if(remoteInteractUrlPattern) {
|
||||
localStorage.setItem('commentsRemoteInteractUrlPattern', remoteInteractUrlPattern);
|
||||
}
|
||||
}
|
||||
|
||||
return remoteInteractUrlPattern;
|
||||
}
|
||||
|
||||
static stripLeadingAt(account: string) {
|
||||
return account.substring(1);
|
||||
}
|
||||
|
||||
onClickForgetHomeInstanceHost(e: React.MouseEvent<HTMLAnchorElement, MouseEvent>): void {
|
||||
e.preventDefault();
|
||||
|
||||
localStorage.removeItem('commentsInteractorAccount');
|
||||
localStorage.removeItem('commentsRemoteInteractUrlPattern');
|
||||
|
||||
this.setState({
|
||||
interactorAccount: undefined
|
||||
});
|
||||
}
|
||||
|
||||
render(): React.ReactNode {
|
||||
return (
|
||||
<menu>
|
||||
<a href={this.props.url} target='_blank' onClick={(e) => this.onClickReply(e)}>Reply to this post</a>
|
||||
<a href={this.props.url} onClick={(e) => this.onClickCopyLink(e)}>Copy link to this post</a>
|
||||
<a href={this.props.url} target='_blank'>Open in original site</a>
|
||||
<a href={this.props.commenterUrl} target='_blank' onClick={(e) => this.onClickFollow(e)}>Follow {this.props.commenterAccount}</a>
|
||||
{this.state.interactorAccount &&
|
||||
<a onClick={(e) => this.onClickForgetHomeInstanceHost(e)}>Forget {this.state.interactorAccount}</a>
|
||||
}
|
||||
</menu>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default CommentMenu;
|
||||
@@ -0,0 +1,84 @@
|
||||
.context-menu {
|
||||
all: unset;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.context-menu svg {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.context-menu menu {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
right: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: var(--button-background);
|
||||
margin: 0;
|
||||
padding: .75rem;
|
||||
z-index: 1;
|
||||
border-radius: .25rem;
|
||||
box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.context-menu menu a {
|
||||
white-space: nowrap;
|
||||
text-decoration: none;
|
||||
line-height: 2;
|
||||
}
|
||||
|
||||
.dialog-homeinstance {
|
||||
border: 1px solid rgba(0, 0, 0, 0.25);
|
||||
border-radius: 0.5rem;
|
||||
box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.25);
|
||||
width: calc((100% - 6px) - 2em);
|
||||
max-width: 28rem;
|
||||
}
|
||||
|
||||
.dialog-homeinstance form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.dialog-homeinstance input {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.dialog-homeinstance menu {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
gap: .5rem;
|
||||
margin: 1.5rem 0 0 0;
|
||||
}
|
||||
|
||||
.dialog-homeinstance button {
|
||||
border: none;
|
||||
padding: .5rem;
|
||||
border-radius: 4px;
|
||||
min-width: 4.5rem;
|
||||
background-color: #2962ff;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
letter-spacing: .25px;
|
||||
line-height: 1rem;
|
||||
outline: none;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.dialog-homeinstance button:hover {
|
||||
background-color: #2F7DE2;
|
||||
}
|
||||
|
||||
.dialog-homeinstance button[type="reset"] {
|
||||
background-color: transparent;
|
||||
box-shadow: inset 0 0 0 1px #DADCE0;
|
||||
color: #2962ff;
|
||||
}
|
||||
|
||||
.dialog-homeinstance button[type="reset"]:hover {
|
||||
background-color: #EAF2FD;
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
import * as React from 'react'
|
||||
import DOMPurify from 'dompurify'
|
||||
import Button from '../Button'
|
||||
|
||||
import './styles.scss'
|
||||
import CommentMenu from '../CommentMenu'
|
||||
import { authenticatedFetch } from '../../utils/auth'
|
||||
|
||||
interface IProps {
|
||||
id: number,
|
||||
@@ -36,9 +39,47 @@ interface ICommentProps {
|
||||
comment: StateComment
|
||||
}
|
||||
|
||||
class Comment extends React.PureComponent<ICommentProps> {
|
||||
interface ICommentState {
|
||||
showMenu: boolean
|
||||
}
|
||||
|
||||
class Comment extends React.PureComponent<ICommentProps, ICommentState> {
|
||||
menuWrapperRef: React.Ref<HTMLDivElement> = React.createRef();
|
||||
boundHandleMouseDown: (this: Document, ev: MouseEvent) => any;
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
showMenu: false
|
||||
}
|
||||
|
||||
this.boundHandleMouseDown = this.handleMouseDown.bind(this);
|
||||
}
|
||||
|
||||
onClickShowMenu() {
|
||||
this.setState({showMenu: !this.state.showMenu});
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
document.addEventListener("mousedown", this.boundHandleMouseDown);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
document.removeEventListener("mousedown", this.boundHandleMouseDown);
|
||||
}
|
||||
|
||||
handleMouseDown(event: MouseEvent) {
|
||||
this.closeMenuOnClickOutside(event);
|
||||
}
|
||||
|
||||
closeMenuOnClickOutside(event: MouseEvent) {
|
||||
// @ts-ignore
|
||||
if (this.menuWrapperRef?.current && !this.menuWrapperRef.current.contains(event.target)) {
|
||||
|
||||
this.setState({
|
||||
showMenu: false,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
render(): React.ReactNode {
|
||||
@@ -53,10 +94,23 @@ class Comment extends React.PureComponent<ICommentProps> {
|
||||
<span className='handle'>{this.props.comment.attributedTo.account}</span>
|
||||
</div>
|
||||
</a>
|
||||
<span aria-hidden="true">·</span>
|
||||
<a href={this.props.comment.url} className='permalink'>
|
||||
<time>{this.props.comment.publishedAt.toLocaleString()}</time>
|
||||
</a>
|
||||
<button className="context-menu" aria-label="More" onClick={() => this.onClickShowMenu()}>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" width="24" height="24" strokeWidth="1.5" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" d="M6.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM12.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM18.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0z" />
|
||||
</svg>
|
||||
{ this.state.showMenu &&
|
||||
<div ref={this.menuWrapperRef}>
|
||||
<CommentMenu
|
||||
url={this.props.comment.url}
|
||||
commenterUrl={this.props.comment.attributedTo.url}
|
||||
commenterAccount={this.props.comment.attributedTo.account}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
</button>
|
||||
</summary>
|
||||
}
|
||||
{ this.props.comment.summary ?
|
||||
@@ -123,7 +177,7 @@ export default class Comments extends React.PureComponent<IProps, IState> {
|
||||
loadingComments: true
|
||||
});
|
||||
|
||||
const response = await fetch('/api/comments/byepisodeid?' + new URLSearchParams({id: String(this.props.id) }));
|
||||
const response = await authenticatedFetch('/api/comments/byepisodeid?' + new URLSearchParams({id: String(this.props.id) }));
|
||||
|
||||
const reader = response.body.getReader();
|
||||
|
||||
@@ -290,8 +344,8 @@ export default class Comments extends React.PureComponent<IProps, IState> {
|
||||
render() {
|
||||
return (
|
||||
<div className='comments-container'>
|
||||
{!this.state.showComments && <button disabled={this.state.loadingComments} onClick={() => this.onClickShowComments()}>Show comments</button>}
|
||||
{this.state.showComments && <button onClick={() => this.onClickHideComments()}>Hide comments</button>}
|
||||
{!this.state.showComments && <Button disabled={this.state.loadingComments} onClick={() => this.onClickShowComments()}>Show comments</Button>}
|
||||
{this.state.showComments && <Button onClick={() => this.onClickHideComments()}>Hide comments</Button>}
|
||||
{this.state.loadingComments && <p>Loading comments...</p>}
|
||||
{this.state.showComments && this.state.comments.map((comment) => <Comment key={comment.url} comment={comment}/>)}
|
||||
</div>
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
font-size: .75rem;
|
||||
line-height: 1rem;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
details > summary::-webkit-details-marker {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import * as React from 'react'
|
||||
import { Link } from "react-router-dom";
|
||||
import { getISODate, getPrettyDate, truncateString } from '../../utils'
|
||||
|
||||
import Value from '../Value'
|
||||
@@ -9,11 +10,13 @@ import PauseLogo from '../../../images/pause-circle.svg'
|
||||
import EarthLogo from '../../../images/earth.svg'
|
||||
import DownloadLogo from '../../../images/download-outline.svg'
|
||||
import TranscriptLogo from '../../../images/transcript.svg'
|
||||
import LinkLogo from '../../../images/link.svg'
|
||||
|
||||
import './styles.scss'
|
||||
|
||||
interface IProps {
|
||||
id: number,
|
||||
feedId: number,
|
||||
index?: number
|
||||
title?: string
|
||||
image?: any
|
||||
@@ -27,6 +30,7 @@ interface IProps {
|
||||
startTime?: number
|
||||
onPlay?: any
|
||||
onPause?: any
|
||||
className?: string
|
||||
}
|
||||
|
||||
export default class EpisodeItem extends React.PureComponent<IProps> {
|
||||
@@ -83,6 +87,7 @@ export default class EpisodeItem extends React.PureComponent<IProps> {
|
||||
render() {
|
||||
const {
|
||||
id,
|
||||
feedId,
|
||||
title,
|
||||
image,
|
||||
link,
|
||||
@@ -93,13 +98,14 @@ export default class EpisodeItem extends React.PureComponent<IProps> {
|
||||
datePublished,
|
||||
hasComments,
|
||||
startTime,
|
||||
className,
|
||||
} = this.props
|
||||
const episodeLink = link
|
||||
const episodeEnclosure = enclosureUrl
|
||||
const episodeTranscript = transcriptUrl
|
||||
|
||||
return (
|
||||
<div className="episode">
|
||||
<div className={`episode ${className}`} id={`${id}`}>
|
||||
<div className="episode-row">
|
||||
<div className="episode-cover-art">
|
||||
<img
|
||||
@@ -168,7 +174,17 @@ export default class EpisodeItem extends React.PureComponent<IProps> {
|
||||
</a>
|
||||
: ""
|
||||
}
|
||||
|
||||
|
||||
<Link
|
||||
className="episode-id-link"
|
||||
to={`/podcast/${feedId}?episode=${id}`}
|
||||
title="Episode Link on Podcast Index"
|
||||
>
|
||||
<img
|
||||
alt={`Link to ${title} on Podcast Index`}
|
||||
src={LinkLogo}/>
|
||||
</Link>
|
||||
|
||||
<img
|
||||
alt="Play/pause episode"
|
||||
className="episode-play-pause-mobile"
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
height: auto;
|
||||
padding: 5px;
|
||||
box-sizing: border-box;
|
||||
|
||||
&.selected-item {
|
||||
box-shadow: inset 0 0 10px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.episode-row {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from 'react'
|
||||
import EpisodeItem from '../EpisodeItem'
|
||||
import InfiniteList from '../InfiniteList'
|
||||
import { fixURL, getImage } from '../../utils'
|
||||
import EpisodeItem from '../EpisodeItem'
|
||||
import InfiniteList, { MakeVisibleItem } from '../InfiniteList'
|
||||
|
||||
const he = require('he')
|
||||
|
||||
@@ -10,6 +10,8 @@ interface IProps {
|
||||
podcast: any
|
||||
episodes: Array<Object>
|
||||
playingEpisode: Object
|
||||
makeVisible?: MakeVisibleItem
|
||||
initialDisplay?: number
|
||||
onEpisodePlay: Function
|
||||
onEpisodePause: Function
|
||||
}
|
||||
@@ -28,10 +30,10 @@ export default class EpisodeList extends React.PureComponent<IProps> {
|
||||
}
|
||||
|
||||
async componentDidUpdate(prevProps) {
|
||||
const { episodes, playingEpisode } = this.props
|
||||
const {episodes, playingEpisode} = this.props
|
||||
|
||||
this.episodeItems.forEach((episodeItem, index) => {
|
||||
episodeItem.current.setPlaying(
|
||||
episodeItem.current?.setPlaying(
|
||||
playingEpisode == episodes[index]
|
||||
)
|
||||
})
|
||||
@@ -47,7 +49,7 @@ export default class EpisodeList extends React.PureComponent<IProps> {
|
||||
this.props.onEpisodePause()
|
||||
}
|
||||
|
||||
renderEpisode(item, index: number) {
|
||||
renderEpisode(item, index: number, selected: boolean) {
|
||||
let {
|
||||
id,
|
||||
title,
|
||||
@@ -58,13 +60,15 @@ export default class EpisodeList extends React.PureComponent<IProps> {
|
||||
datePublished,
|
||||
value,
|
||||
socialInteract,
|
||||
startTime
|
||||
startTime,
|
||||
feedId
|
||||
} = item
|
||||
let {podcast} = this.props
|
||||
// try to use episode image, fall back to feed images
|
||||
const image = getImage(item) || getImage(podcast)
|
||||
enclosureUrl = fixURL(enclosureUrl)
|
||||
description = he.decode(description)
|
||||
const podcastId = podcast.id || feedId
|
||||
|
||||
// create a reference to the generated EpisodeItem if one doesn't already exist
|
||||
if (index >= this.episodeItems.length) {
|
||||
@@ -75,7 +79,9 @@ export default class EpisodeList extends React.PureComponent<IProps> {
|
||||
<div key={index}>
|
||||
<EpisodeItem
|
||||
ref={this.episodeItems[index]}
|
||||
className={selected ? "selected-item" : ""}
|
||||
id={id}
|
||||
feedId={podcastId}
|
||||
index={index}
|
||||
title={title}
|
||||
image={image}
|
||||
@@ -95,13 +101,15 @@ export default class EpisodeList extends React.PureComponent<IProps> {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { title, episodes } = this.props
|
||||
const {title, episodes, makeVisible, initialDisplay} = this.props
|
||||
|
||||
return (
|
||||
<div className="episodes-list">
|
||||
<h2 className="episode-header">{title}</h2>
|
||||
<InfiniteList
|
||||
data={episodes}
|
||||
makeVisible={makeVisible}
|
||||
initialDisplay={initialDisplay}
|
||||
itemRenderer={this.renderEpisode}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,261 @@
|
||||
import * as React from 'react'
|
||||
import Player from '../../components/Player'
|
||||
import EpisodeList from "../EpisodeList";
|
||||
import './styles.scss'
|
||||
|
||||
interface IProps {
|
||||
episodes?: {
|
||||
items: Array<any>,
|
||||
live?: Array<any>,
|
||||
upcoming?: Array<any>,
|
||||
}
|
||||
selectedId?: number
|
||||
podcast?: {
|
||||
id: number
|
||||
url: string
|
||||
author: string
|
||||
title: string
|
||||
language: string
|
||||
medium: string
|
||||
}
|
||||
initialDisplay?: number
|
||||
onSelectedEpisodeChange?: (episodeId: number) => void
|
||||
liveTitle?: string
|
||||
upcomingTitle?: string
|
||||
episodesTitle?: string
|
||||
}
|
||||
|
||||
export default class EpisodesPlayer extends React.PureComponent<IProps> {
|
||||
static defaultProps = {
|
||||
liveTitle: "Live Now!",
|
||||
upcomingTitle: "Upcoming Episodes",
|
||||
episodesTitle: "Episodes",
|
||||
}
|
||||
state = {
|
||||
selectedEpisode: undefined,
|
||||
selectedEpisodeIsLive: false,
|
||||
playingEpisode: undefined,
|
||||
playing: false,
|
||||
}
|
||||
_isMounted = false
|
||||
player = React.createRef<Player>()
|
||||
|
||||
constructor(props) {
|
||||
super(props)
|
||||
// fix this in handlers
|
||||
this.onEpisodePlay = this.onEpisodePlay.bind(this)
|
||||
this.onEpisodePause = this.onEpisodePause.bind(this)
|
||||
this.onEpisodeCanPlay = this.onEpisodeCanPlay.bind(this)
|
||||
}
|
||||
|
||||
async componentDidMount(): Promise<void> {
|
||||
const {selectedId} = this.props
|
||||
this.updateSelectedEpisode(selectedId)
|
||||
this._isMounted = true
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
this._isMounted = false
|
||||
}
|
||||
|
||||
async componentDidUpdate(prevProps) {
|
||||
const {selectedId} = this.props
|
||||
const prevSelectedId = prevProps.selectedId
|
||||
|
||||
if (selectedId !== prevSelectedId) {
|
||||
this.updateSelectedEpisode(selectedId)
|
||||
}
|
||||
}
|
||||
|
||||
updateSelectedEpisode(episodeId: number) {
|
||||
const {episodes, onSelectedEpisodeChange} = this.props
|
||||
const {playing, selectedEpisode} = this.state
|
||||
|
||||
let episodeIndex = -1
|
||||
let episodeIndexLive = -1
|
||||
if (episodeId) {
|
||||
episodeIndex = episodes.items.findIndex((ep) => ep.id === episodeId)
|
||||
episodeIndexLive = episodes.live.findIndex((ep) => ep.id === episodeId)
|
||||
}
|
||||
|
||||
let newSelectedEpisode
|
||||
let liveEpisode = false
|
||||
if (episodeIndexLive >= 0 && episodes.live?.length > 0) {
|
||||
newSelectedEpisode = episodes.live[episodeIndexLive]
|
||||
liveEpisode = true
|
||||
} else {
|
||||
if (episodeIndex < 0) {
|
||||
episodeIndex = 0
|
||||
}
|
||||
newSelectedEpisode = episodes.items[episodeIndex]
|
||||
}
|
||||
|
||||
if (playing && selectedEpisode !== newSelectedEpisode) {
|
||||
this.onEpisodePause()
|
||||
}
|
||||
|
||||
this.setState(
|
||||
{
|
||||
selectedEpisode: newSelectedEpisode,
|
||||
selectedEpisodeIsLive: liveEpisode
|
||||
},
|
||||
() => {
|
||||
if (onSelectedEpisodeChange && newSelectedEpisode !== undefined) {
|
||||
onSelectedEpisodeChange(newSelectedEpisode.id)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
onEpisodePlay(episode: object) {
|
||||
const {selectedEpisode} = this.state
|
||||
|
||||
if (!episode) {
|
||||
episode = selectedEpisode
|
||||
}
|
||||
|
||||
this.setState({
|
||||
playing: true,
|
||||
playingEpisode: episode,
|
||||
})
|
||||
|
||||
if (selectedEpisode !== episode) {
|
||||
this.setState({
|
||||
selectedEpisode: episode,
|
||||
})
|
||||
}
|
||||
|
||||
// FIXME: this doesn't trigger if episode was changed. Workaround, for now, is to set the playing state here
|
||||
// and then check it when onCanPlay is triggered (handled by onEpisodeCanPlay) where the play call can be
|
||||
// made again.
|
||||
this.player.current.play()
|
||||
}
|
||||
|
||||
onEpisodePause() {
|
||||
this.setState({
|
||||
playing: false,
|
||||
playingEpisode: null,
|
||||
})
|
||||
|
||||
this.player.current.pause()
|
||||
}
|
||||
|
||||
onEpisodeCanPlay() {
|
||||
const {playing} = this.state
|
||||
if (playing) {
|
||||
this.player.current.play()
|
||||
}
|
||||
}
|
||||
|
||||
renderPlayer() {
|
||||
const {podcast} = this.props
|
||||
const {selectedEpisode, playing} = this.state
|
||||
const preload = playing ? 'auto' : 'none'
|
||||
return (
|
||||
<div className="podcast-header-player">
|
||||
{selectedEpisode ? (
|
||||
<Player
|
||||
ref={this.player}
|
||||
episode={selectedEpisode}
|
||||
podcast={podcast}
|
||||
onPlay={this.onEpisodePlay}
|
||||
onPause={this.onEpisodePause}
|
||||
onCanPlay={this.onEpisodeCanPlay}
|
||||
preload={preload}
|
||||
/>
|
||||
) : (
|
||||
<div/>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
renderEpisodes() {
|
||||
const {
|
||||
podcast,
|
||||
episodes,
|
||||
selectedId,
|
||||
initialDisplay,
|
||||
episodesTitle,
|
||||
liveTitle,
|
||||
upcomingTitle
|
||||
} = this.props
|
||||
const {playingEpisode, selectedEpisodeIsLive} = this.state
|
||||
const {medium} = podcast
|
||||
|
||||
let makeVisible = null
|
||||
if (selectedId) {
|
||||
makeVisible = {field: "id", value: selectedId}
|
||||
}
|
||||
|
||||
let sortedEpisodes = episodes.items
|
||||
if (medium.toLowerCase() === "music") {
|
||||
sortedEpisodes.sort((a, b) => {
|
||||
if (a.season === b.season) {
|
||||
return a.episode < b.episode ? -1 : 1
|
||||
} else {
|
||||
return a.season < b.season ? -1 : 1
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
let sortedLiveEpisodes = episodes.live
|
||||
// short live episodes with newest first
|
||||
sortedLiveEpisodes?.sort((a, b) => {
|
||||
return a.startTime < b.startTime ? 1 : -1
|
||||
})
|
||||
|
||||
let sortedUpcomingEpisodes = episodes.upcoming
|
||||
// sort upcoming episodes with earliest first
|
||||
sortedUpcomingEpisodes?.sort((a, b) => {
|
||||
return a.startTime < b.startTime ? -1 : 1
|
||||
})
|
||||
|
||||
return (
|
||||
<>
|
||||
{episodes.live?.length > 0 ? (
|
||||
<EpisodeList
|
||||
title={liveTitle}
|
||||
podcast={podcast}
|
||||
episodes={sortedLiveEpisodes}
|
||||
playingEpisode={playingEpisode}
|
||||
makeVisible={selectedEpisodeIsLive ? makeVisible : null}
|
||||
initialDisplay={initialDisplay}
|
||||
onEpisodePlay={this.onEpisodePlay}
|
||||
onEpisodePause={this.onEpisodePause}
|
||||
/>
|
||||
) : ''}
|
||||
{episodes.upcoming?.length > 0 ? (
|
||||
<EpisodeList
|
||||
title={upcomingTitle}
|
||||
podcast={podcast}
|
||||
episodes={sortedUpcomingEpisodes}
|
||||
playingEpisode={playingEpisode}
|
||||
makeVisible={null}
|
||||
initialDisplay={initialDisplay}
|
||||
onEpisodePlay={this.onEpisodePlay}
|
||||
onEpisodePause={this.onEpisodePause}
|
||||
/>
|
||||
) : ''}
|
||||
<EpisodeList
|
||||
title={episodesTitle}
|
||||
podcast={podcast}
|
||||
episodes={sortedEpisodes}
|
||||
playingEpisode={playingEpisode}
|
||||
makeVisible={!selectedEpisodeIsLive ? makeVisible : null}
|
||||
initialDisplay={initialDisplay}
|
||||
onEpisodePlay={this.onEpisodePlay}
|
||||
onEpisodePause={this.onEpisodePause}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="episodes-player">
|
||||
{this.renderPlayer()}
|
||||
{this.renderEpisodes()}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
.podcast-header-player {
|
||||
margin-top: 10px;
|
||||
}
|
||||
@@ -5,14 +5,20 @@ import Button from "../Button";
|
||||
|
||||
import './styles.scss'
|
||||
|
||||
export interface MakeVisibleItem {
|
||||
field: string
|
||||
value: number
|
||||
}
|
||||
|
||||
interface IProps {
|
||||
data: Array<any>,
|
||||
itemRenderer: (value: any, index: number) => {},
|
||||
itemRenderer: (value: any, index: number, selected: boolean) => {},
|
||||
className?: string,
|
||||
showButton?: boolean,
|
||||
initialDisplay?: number
|
||||
step?: number,
|
||||
itemsShown?: (value: number) => void
|
||||
makeVisible?: MakeVisibleItem
|
||||
}
|
||||
|
||||
export default class InfiniteList extends React.PureComponent<IProps> {
|
||||
@@ -24,9 +30,12 @@ export default class InfiniteList extends React.PureComponent<IProps> {
|
||||
initialDisplay: 10,
|
||||
step: 10,
|
||||
itemsShown: null,
|
||||
makeVisible: null,
|
||||
}
|
||||
state = {
|
||||
displayCount: 0,
|
||||
scrolled: false,
|
||||
validItem: false,
|
||||
}
|
||||
_isMounted = false
|
||||
|
||||
@@ -44,18 +53,60 @@ export default class InfiniteList extends React.PureComponent<IProps> {
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps: Readonly<IProps>, prevState: Readonly<{}>, snapshot?: any): void {
|
||||
if (this.props.data !== prevProps.data) {
|
||||
const {makeVisible} = this.props
|
||||
const prevMakeVisible = prevProps.makeVisible
|
||||
|
||||
if (
|
||||
this.props !== prevProps
|
||||
) {
|
||||
this.load()
|
||||
}
|
||||
|
||||
if (
|
||||
!this.state.scrolled ||
|
||||
makeVisible?.field !== prevMakeVisible?.field ||
|
||||
makeVisible?.value !== prevMakeVisible?.value
|
||||
) {
|
||||
this.makeItemVisible()
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount(): void {
|
||||
this._isMounted = false
|
||||
}
|
||||
|
||||
makeItemVisible() {
|
||||
const {makeVisible} = this.props
|
||||
if (makeVisible) {
|
||||
const item = document.getElementById(makeVisible.value.toString())
|
||||
if (item) {
|
||||
item.scrollIntoView()
|
||||
this.setState({
|
||||
scrolled: true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
load() {
|
||||
if (this._isMounted) {
|
||||
let {data, initialDisplay} = this.props
|
||||
let {data, initialDisplay, step, makeVisible} = this.props
|
||||
|
||||
// If item should be shown, make sure it is loaded initially
|
||||
if (makeVisible) {
|
||||
let visibleIndex = data.findIndex((item) => {
|
||||
return item[makeVisible.field] === makeVisible.value
|
||||
})
|
||||
if (visibleIndex >= 0) {
|
||||
initialDisplay = visibleIndex + 1 // add 1 since value is index and want total number of items
|
||||
initialDisplay += (step - initialDisplay % step) // make equal to step increment
|
||||
initialDisplay = initialDisplay > data.length ? data.length : initialDisplay
|
||||
this.setState({
|
||||
validItem: true
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const displayCount = (data.length >= initialDisplay) ? initialDisplay : data.length
|
||||
this.updateDisplayCount(displayCount)
|
||||
}
|
||||
@@ -110,16 +161,30 @@ export default class InfiniteList extends React.PureComponent<IProps> {
|
||||
}
|
||||
|
||||
renderHeader() {
|
||||
const {data, showButton} = this.props
|
||||
const {displayCount} = this.state
|
||||
const {data, showButton, makeVisible} = this.props
|
||||
const {displayCount, validItem} = this.state
|
||||
|
||||
const disabled = data.length == displayCount
|
||||
let itemUnknown = false
|
||||
if (makeVisible?.value >= 0) {
|
||||
itemUnknown = !validItem
|
||||
}
|
||||
|
||||
if (showButton) {
|
||||
return (
|
||||
<div className="infinite-list-header">
|
||||
<Button onClick={this.showAll} disabled={disabled} small={true}>Show All</Button>
|
||||
<p className="count">{displayCount} / {data.length}</p>
|
||||
<div className="infinite-list-count-info">
|
||||
<Button onClick={this.showAll} disabled={disabled} small={true}>Show All</Button>
|
||||
<p className="count">{displayCount} / {data.length}</p>
|
||||
</div>
|
||||
{
|
||||
itemUnknown ?
|
||||
<div className="infinite-list-item-unknown">
|
||||
<p>Unknown item {makeVisible.value}</p>
|
||||
</div>
|
||||
:
|
||||
<div/>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
} else {
|
||||
@@ -128,7 +193,7 @@ export default class InfiniteList extends React.PureComponent<IProps> {
|
||||
}
|
||||
|
||||
render() {
|
||||
const {data, className, itemRenderer} = this.props
|
||||
const {data, className, makeVisible, itemRenderer} = this.props
|
||||
let {displayCount} = this.state
|
||||
return (
|
||||
<div className={`${className} infinite-list`}>
|
||||
@@ -142,7 +207,15 @@ export default class InfiniteList extends React.PureComponent<IProps> {
|
||||
{
|
||||
data.slice(0, displayCount).map(
|
||||
(i: any, index) => {
|
||||
return itemRenderer(i, index)
|
||||
|
||||
let selected = false
|
||||
if (makeVisible) {
|
||||
if (i[makeVisible.field] == makeVisible.value) {
|
||||
selected = true
|
||||
}
|
||||
}
|
||||
|
||||
return itemRenderer(i, index, selected)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,20 +1,27 @@
|
||||
.infinite-list{
|
||||
|
||||
.infinite-list-header {
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
font-size: 12px;
|
||||
.infinite-list-count-info {
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
.button {
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
|
||||
.button {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.count {
|
||||
margin: 0 0 0 auto;
|
||||
justify-self: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
.count {
|
||||
margin: 0 0 0 auto;
|
||||
justify-self: flex-end;
|
||||
.infinite-list-item-unknown {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -162,7 +162,14 @@ export default class Player extends React.Component<IProps> {
|
||||
header={
|
||||
<div className="player-info">
|
||||
<div className="player-show-title">
|
||||
<p title={episode.title}>{episode.title}</p>
|
||||
<p title={episode.title}>
|
||||
<Link
|
||||
to={`/podcast/${episode.feedId}?episode=${episode.id}`}
|
||||
title={episode.title}
|
||||
>
|
||||
{episode.title}
|
||||
</Link>
|
||||
</p>
|
||||
</div>
|
||||
<div className="player-podcast-name">
|
||||
{episode.feedTitle !== undefined ? (
|
||||
|
||||
@@ -17,17 +17,23 @@
|
||||
|
||||
.player-media-controls {
|
||||
width: calc(100% - 20px);
|
||||
.player-show-title p {
|
||||
font-size: 20px;
|
||||
font-family: var(--font-family);
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
width: 450px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
margin-bottom: 5px;
|
||||
color: var(--fg-main);
|
||||
.player-show-title {
|
||||
a {
|
||||
color: var(--fg-main);
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 20px;
|
||||
font-family: var(--font-family);
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
width: 450px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
margin-bottom: 5px;
|
||||
color: var(--fg-main);
|
||||
}
|
||||
}
|
||||
.player-podcast-name {
|
||||
text-align: center;
|
||||
@@ -76,7 +82,7 @@
|
||||
fill: var(--color-primary);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
:root[data-theme="dark"] {
|
||||
.rhap_container {
|
||||
|
||||