mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-05-16 21:41:46 +00:00
Compare commits
1211 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4cc35e56d9 | ||
|
|
8d71c5bff3 | ||
|
|
43d5bc5224 | ||
|
|
77dc3c28f3 | ||
|
|
49a5e26155 | ||
|
|
e9faddc96f | ||
|
|
a79b993fbd | ||
|
|
fcb4139d68 | ||
|
|
f2b6f12fcb | ||
|
|
de3da8acf8 | ||
|
|
bccaac3c24 | ||
|
|
7da60e252a | ||
|
|
7bfdd4ab79 | ||
|
|
5f37eebf87 | ||
|
|
015676648b | ||
|
|
b1ac5422b8 | ||
|
|
9c1359b5d4 | ||
|
|
761cc038e4 | ||
|
|
0ecb194a45 | ||
|
|
700fabd970 | ||
|
|
12eb271873 | ||
|
|
65cff92b52 | ||
|
|
61b587f2b5 | ||
|
|
abdf02d9c5 | ||
|
|
77dc221578 | ||
|
|
2ca71a31c6 | ||
|
|
df64f26fa5 | ||
|
|
8218833448 | ||
|
|
4deacc6471 | ||
|
|
7b92b594c5 | ||
|
|
bf2e645daa | ||
|
|
3a15a1fcf3 | ||
|
|
14a21b1051 | ||
|
|
78e16e7210 | ||
|
|
b7e06e89cb | ||
|
|
4efd9449d6 | ||
|
|
a670e1c7cd | ||
|
|
3d51e9a084 | ||
|
|
e92efc3e20 | ||
|
|
da4d56f44d | ||
|
|
56fc8f9a6d | ||
|
|
6bd2d1105e | ||
|
|
3573a63dfd | ||
|
|
1cbc29f96a | ||
|
|
58d9854b79 | ||
|
|
34cdb22ae8 | ||
|
|
9151d37754 | ||
|
|
a0561ec0f7 | ||
|
|
2a594255a4 | ||
|
|
8e5ffd45db | ||
|
|
132b805ff3 | ||
|
|
cbe5392d5f | ||
|
|
ced4296fae | ||
|
|
e7b168ca09 | ||
|
|
bdbcacb3ee | ||
|
|
9e1cdb7017 | ||
|
|
7e8ac47cdf | ||
|
|
8dd43a635b | ||
|
|
0f0f06d6aa | ||
|
|
bd5aa6652d | ||
|
|
313be6bfd1 | ||
|
|
57cb165d55 | ||
|
|
589b3170b1 | ||
|
|
c5c6c35799 | ||
|
|
3e94d66b29 | ||
|
|
2a4dcb0f24 | ||
|
|
b32b5035b8 | ||
|
|
d7c80a844c | ||
|
|
4cc501feaf | ||
|
|
39db7af384 | ||
|
|
7869123930 | ||
|
|
d50f1304c5 | ||
|
|
ec26b46f76 | ||
|
|
e76e01df46 | ||
|
|
0963c69a2b | ||
|
|
4206bef69b | ||
|
|
fde2528df1 | ||
|
|
51ed969702 | ||
|
|
b73ee4a841 | ||
|
|
967ad751b4 | ||
|
|
7ca22198b3 | ||
|
|
28283725e0 | ||
|
|
8f17d9f3ca | ||
|
|
ff4598cc84 | ||
|
|
715374711c | ||
|
|
7f84100c22 | ||
|
|
7ff57561c2 | ||
|
|
4084293d46 | ||
|
|
76b1b2dfd6 | ||
|
|
13eab72944 | ||
|
|
490937a271 | ||
|
|
3d84a63145 | ||
|
|
118d40d3c6 | ||
|
|
49427ed00d | ||
|
|
199dd66c8b | ||
|
|
9f28b570d5 | ||
|
|
19b8c412fa | ||
|
|
89c337fe31 | ||
|
|
36df9897cc | ||
|
|
7875a57af0 | ||
|
|
4bf572e71f | ||
|
|
6b37f517c9 | ||
|
|
c5ca279227 | ||
|
|
71d91d2a8e | ||
|
|
ad4ed78b76 | ||
|
|
1df63a0716 | ||
|
|
1c76730528 | ||
|
|
be67c21bea | ||
|
|
e435e09b6d | ||
|
|
2cd4764cbd | ||
|
|
f6297e8be3 | ||
|
|
f28784583f | ||
|
|
0fb10cce85 | ||
|
|
4d67618390 | ||
|
|
4cc657d818 | ||
|
|
7e43d855f2 | ||
|
|
8c5e19a9b7 | ||
|
|
35bc9a48c0 | ||
|
|
56c3d7359c | ||
|
|
0ed81a4c07 | ||
|
|
39aed8afb8 | ||
|
|
3ad8d5039e | ||
|
|
ce9e01c2c2 | ||
|
|
fabff3a32c | ||
|
|
cc1d4df640 | ||
|
|
d8ebb596e5 | ||
|
|
1c39526afb | ||
|
|
9bd6b6b12b | ||
|
|
c8af048473 | ||
|
|
71947f0c5e | ||
|
|
57cf3956a2 | ||
|
|
bed0bee507 | ||
|
|
0a2bce9d78 | ||
|
|
3c132aeb3c | ||
|
|
32a777b997 | ||
|
|
c4b4cb0e6d | ||
|
|
204e9ad1ea | ||
|
|
ee98dcb58b | ||
|
|
d8ada044ce | ||
|
|
45a85644ca | ||
|
|
e68a51399a | ||
|
|
1b63898e8b | ||
|
|
a54a709c65 | ||
|
|
f078ae8f19 | ||
|
|
571efea41e | ||
|
|
83b3c8a1d9 | ||
|
|
303a138107 | ||
|
|
a0cbacd6c6 | ||
|
|
740857065c | ||
|
|
37acecddca | ||
|
|
86a305ce7c | ||
|
|
2c84ff0c62 | ||
|
|
b0cc1cb760 | ||
|
|
f6918f4bc1 | ||
|
|
5d433c7788 | ||
|
|
64298ff10d | ||
|
|
b258b67f1b | ||
|
|
5194b085a3 | ||
|
|
b52d9dccc4 | ||
|
|
3720645775 | ||
|
|
b200e933b6 | ||
|
|
6074dac1d5 | ||
|
|
d032ae36d1 | ||
|
|
df514c0fbe | ||
|
|
86679f6398 | ||
|
|
f907a97358 | ||
|
|
73608972c6 | ||
|
|
45018f9747 | ||
|
|
5e867d8558 | ||
|
|
cbab1b2c71 | ||
|
|
f9105e5433 | ||
|
|
d611e4662d | ||
|
|
16c57f1fb6 | ||
|
|
d89b007c9e | ||
|
|
4969644374 | ||
|
|
f481bf7c09 | ||
|
|
ace3860226 | ||
|
|
9a7ea1f888 | ||
|
|
ead30618f8 | ||
|
|
95ed1aeaf1 | ||
|
|
12155eaabb | ||
|
|
aabab32413 | ||
|
|
a9415e59c0 | ||
|
|
9dcdaf20c2 | ||
|
|
3cbb5e108e | ||
|
|
163e6d580f | ||
|
|
0cd0db7e53 | ||
|
|
0a2fbfec45 | ||
|
|
56a1cfbc98 | ||
|
|
361ca69f42 | ||
|
|
0db7c3bbd4 | ||
|
|
a5fa723db1 | ||
|
|
342327b14a | ||
|
|
a9db439a26 | ||
|
|
00dae69e9b | ||
|
|
d8c2a25a34 | ||
|
|
9b2df7646b | ||
|
|
1cb234a368 | ||
|
|
9f414cd7d3 | ||
|
|
48f87a25d5 | ||
|
|
8b88e23594 | ||
|
|
c78b18c5e8 | ||
|
|
5330207f12 | ||
|
|
4486212fa9 | ||
|
|
b985a265b0 | ||
|
|
1eef1f25fe | ||
|
|
d06c20ae52 | ||
|
|
8d500252c6 | ||
|
|
51a2a6d736 | ||
|
|
bb9f7a79d0 | ||
|
|
14720a07c6 | ||
|
|
1f82dc8fa9 | ||
|
|
11f8c58739 | ||
|
|
8523232899 | ||
|
|
5ddfc8338e | ||
|
|
c2ad19261b | ||
|
|
0b64e43432 | ||
|
|
9a230b302d | ||
|
|
df57e3bc60 | ||
|
|
ef48ac12e5 | ||
|
|
869f012734 | ||
|
|
fd01257bdf | ||
|
|
bc35557ebd | ||
|
|
d632ad5b49 | ||
|
|
a6eebe4ebd | ||
|
|
936ff5daae | ||
|
|
6dfc5f70e9 | ||
|
|
393276c9e2 | ||
|
|
e767d8b0cc | ||
|
|
0adb515873 | ||
|
|
a22d5d16ef | ||
|
|
0037dc2231 | ||
|
|
c4ee54beba | ||
|
|
c5ff2a0104 | ||
|
|
12a08f9bb7 | ||
|
|
b0662b4b1c | ||
|
|
612a13ad99 | ||
|
|
035e1dfdac | ||
|
|
fb9ec3da12 | ||
|
|
d10ba49228 | ||
|
|
696c32c5a8 | ||
|
|
bebd53468c | ||
|
|
ec8074ff16 | ||
|
|
e1e2fe14be | ||
|
|
11d069821f | ||
|
|
516f26d765 | ||
|
|
db2b0a738a | ||
|
|
7ba810057e | ||
|
|
d3ce9a629d | ||
|
|
7157869fe8 | ||
|
|
94e62ebe48 | ||
|
|
fa44f15776 | ||
|
|
2b49145d24 | ||
|
|
1542dccf54 | ||
|
|
42977a921b | ||
|
|
8ff16ace6d | ||
|
|
c9a0a98fee | ||
|
|
c7f3431798 | ||
|
|
7c738fa01e | ||
|
|
e16bc903d4 | ||
|
|
a6e669c0ec | ||
|
|
db5d8f4362 | ||
|
|
d4d51af0e2 | ||
|
|
2d6178c7e8 | ||
|
|
4c00e289ed | ||
|
|
8df081c2ec | ||
|
|
5ac86b8c98 | ||
|
|
b76ce678df | ||
|
|
d2335b1e15 | ||
|
|
e1dbf1bd66 | ||
|
|
3ff14a94c6 | ||
|
|
40fee5ffcc | ||
|
|
eee9c549ab | ||
|
|
4da12bfd5d | ||
|
|
2fca2c4d4f | ||
|
|
a095f91d37 | ||
|
|
47a9076474 | ||
|
|
124e97f0a7 | ||
|
|
78d6037272 | ||
|
|
10c385e60f | ||
|
|
13ab7ec214 | ||
|
|
acce767c88 | ||
|
|
1034966ab4 | ||
|
|
667062031e | ||
|
|
ce3665f2d8 | ||
|
|
180ca53ac5 | ||
|
|
6a5937bd8c | ||
|
|
db9020fde2 | ||
|
|
b880c99be3 | ||
|
|
7c9ffab987 | ||
|
|
e3c96176d0 | ||
|
|
6057f8d57e | ||
|
|
f483e75e08 | ||
|
|
5161ebf368 | ||
|
|
5f82f0649f | ||
|
|
41994fe7fb | ||
|
|
ef4303810f | ||
|
|
34f9a196ea | ||
|
|
b7c7c0866f | ||
|
|
433b474ead | ||
|
|
0f0cf183f9 | ||
|
|
6b32ae67e3 | ||
|
|
6c4be388a2 | ||
|
|
e10fef4b3d | ||
|
|
494b06b3d0 | ||
|
|
ac1e51a736 | ||
|
|
0e6270ac88 | ||
|
|
5dbe5821dc | ||
|
|
61688bc2ac | ||
|
|
5de442010b | ||
|
|
df0c1328c5 | ||
|
|
bbc58c4e0c | ||
|
|
75668d1f1b | ||
|
|
a53c13073e | ||
|
|
4f65b9135c | ||
|
|
8b372a3d3e | ||
|
|
b8683300b4 | ||
|
|
70a4995bf8 | ||
|
|
36b11b91bb | ||
|
|
080a7721d0 | ||
|
|
841a8ac149 | ||
|
|
e0723f10d9 | ||
|
|
fff664e35f | ||
|
|
0f49f36dcd | ||
|
|
cb0388fef9 | ||
|
|
cf49796b0b | ||
|
|
904e5912b0 | ||
|
|
7edfbc3a1e | ||
|
|
db0b9b6b69 | ||
|
|
b37b48922d | ||
|
|
fd951a2acc | ||
|
|
eb542299fe | ||
|
|
0c2614e6c4 | ||
|
|
b74a53c4c5 | ||
|
|
a6fa96f61e | ||
|
|
ad4a6f9cbe | ||
|
|
14476a19aa | ||
|
|
0128ce7efe | ||
|
|
9d98c00dd6 | ||
|
|
37266b88e8 | ||
|
|
e95aef43dc | ||
|
|
0fb7535cee | ||
|
|
86492ed76f | ||
|
|
86cfff1ec7 | ||
|
|
445afd1320 | ||
|
|
3846de3d9d | ||
|
|
6616b9347e | ||
|
|
d5b9c8dee7 | ||
|
|
5862e4d69b | ||
|
|
f61c702f7b | ||
|
|
0cabb00499 | ||
|
|
93513b6a74 | ||
|
|
a06df5c6c5 | ||
|
|
1daa949534 | ||
|
|
0fd3e29ec9 | ||
|
|
a8a73ee9cc | ||
|
|
e17dcb4a6f | ||
|
|
9b1ec67e69 | ||
|
|
c21139af1f | ||
|
|
4b44230d20 | ||
|
|
b3db378790 | ||
|
|
6a8d0cbea8 | ||
|
|
b079e7978d | ||
|
|
66218b8996 | ||
|
|
7039262404 | ||
|
|
9be05949fc | ||
|
|
7ba2b2591f | ||
|
|
3bcb910be8 | ||
|
|
6f953a3e03 | ||
|
|
d02396334e | ||
|
|
adeb19c2b2 | ||
|
|
1d21f493c3 | ||
|
|
c94b34c563 | ||
|
|
95e0274384 | ||
|
|
7323c9ee2d | ||
|
|
a3efe63b59 | ||
|
|
e09dcd1d9d | ||
|
|
ba3f6f87f5 | ||
|
|
30578016b0 | ||
|
|
9cfdd02b91 | ||
|
|
d28681d44c | ||
|
|
e5cda31e78 | ||
|
|
6a8cb28c6a | ||
|
|
2a12814fa1 | ||
|
|
d1a2f714de | ||
|
|
7957f2ff11 | ||
|
|
2ce33ff530 | ||
|
|
7bb83a8dd5 | ||
|
|
adcb93abfd | ||
|
|
e8376c69c3 | ||
|
|
cc00aca737 | ||
|
|
4712ae95b0 | ||
|
|
91861ccf02 | ||
|
|
8086d0571f | ||
|
|
7c8b50aab0 | ||
|
|
581997444e | ||
|
|
d768b613a3 | ||
|
|
67d19eb324 | ||
|
|
cbcc021209 | ||
|
|
7251f468e5 | ||
|
|
c28872572a | ||
|
|
5d52386670 | ||
|
|
6386b97262 | ||
|
|
a6638ef05c | ||
|
|
9acf663f33 | ||
|
|
9c24904021 | ||
|
|
94f8fafc6b | ||
|
|
c595dd7224 | ||
|
|
27ec83d858 | ||
|
|
68253334b5 | ||
|
|
ccb0e1ac83 | ||
|
|
3a4a2fd7e1 | ||
|
|
de6a09ca7d | ||
|
|
68ab42c22e | ||
|
|
5cf2357976 | ||
|
|
f88cca3e29 | ||
|
|
5fcd5937e6 | ||
|
|
08cdae43b7 | ||
|
|
62b21bd380 | ||
|
|
848726bd23 | ||
|
|
1d05a71b39 | ||
|
|
a50b78590f | ||
|
|
246e713c6e | ||
|
|
3eb349c31e | ||
|
|
32d1d03d11 | ||
|
|
1923be429a | ||
|
|
7921e87c49 | ||
|
|
9770eb9976 | ||
|
|
3d3dcf9e1d | ||
|
|
f0c1e952ac | ||
|
|
c0977e0cb3 | ||
|
|
4ab2d359ec | ||
|
|
fdec580314 | ||
|
|
eeed27ffcf | ||
|
|
0ef55b1f34 | ||
|
|
d9236f9ffa | ||
|
|
0a6f446e2d | ||
|
|
3ad7a987a2 | ||
|
|
25ba650161 | ||
|
|
d32c579896 | ||
|
|
e1f6caabdc | ||
|
|
11ccef2287 | ||
|
|
4f9fbb8806 | ||
|
|
5a6ea08db8 | ||
|
|
c07ca0f56f | ||
|
|
575aedf453 | ||
|
|
38c43ee93f | ||
|
|
22878b4e27 | ||
|
|
ee12892ae0 | ||
|
|
333f02120f | ||
|
|
cf6f3093ff | ||
|
|
7b71cd925d | ||
|
|
13bed67f4a | ||
|
|
a5c465c636 | ||
|
|
582ee42e4d | ||
|
|
e9d97ee9fa | ||
|
|
ba34c0d12a | ||
|
|
ccb05122ec | ||
|
|
84b0a557a7 | ||
|
|
1386b5f8e0 | ||
|
|
c32d4f9888 | ||
|
|
99842902cc | ||
|
|
3d807ebe55 | ||
|
|
087075a9fd | ||
|
|
96cac8180e | ||
|
|
53b9f5590b | ||
|
|
e9775843e6 | ||
|
|
806633fc33 | ||
|
|
76f3140f05 | ||
|
|
5abd6faa7a | ||
|
|
696e2c2193 | ||
|
|
248ff4f3c1 | ||
|
|
98a9c25ada | ||
|
|
5f67d3c109 | ||
|
|
d44ae0dce8 | ||
|
|
3ca45b5192 | ||
|
|
c344d54190 | ||
|
|
ec9d9ab28c | ||
|
|
eb21eff4cf | ||
|
|
2c67c9ee7d | ||
|
|
13c83bf297 | ||
|
|
67407a5693 | ||
|
|
3dcf5abb9b | ||
|
|
41d85a15a9 | ||
|
|
14f33029c3 | ||
|
|
8902833ee3 | ||
|
|
6eb67d0467 | ||
|
|
af8147a22b | ||
|
|
1451553617 | ||
|
|
372288cfa4 | ||
|
|
249444899f | ||
|
|
a8cd6201ce | ||
|
|
33f9124cc9 | ||
|
|
7b3020bf35 | ||
|
|
aeee8f74e5 | ||
|
|
082444f2a7 | ||
|
|
31c371f828 | ||
|
|
fc8bab640b | ||
|
|
2862b0235c | ||
|
|
bcbb01fcf2 | ||
|
|
16fa806db5 | ||
|
|
5c592b2b30 | ||
|
|
a1ca14caf8 | ||
|
|
7a2367f4a5 | ||
|
|
6017ab1dab | ||
|
|
2f9db0fe54 | ||
|
|
4dbf3817a6 | ||
|
|
34e3a39688 | ||
|
|
a23a855655 | ||
|
|
059f2e6df9 | ||
|
|
984d00b725 | ||
|
|
6d8027cb39 | ||
|
|
d68aa05a0b | ||
|
|
6abc544d01 | ||
|
|
ad53734aff | ||
|
|
453c79fa4e | ||
|
|
947ac1cac5 | ||
|
|
963db909d8 | ||
|
|
f54e5cb076 | ||
|
|
13c4526f2a | ||
|
|
0433d0242f | ||
|
|
5d41354145 | ||
|
|
95fcaeb454 | ||
|
|
db08cff1a1 | ||
|
|
6e426630f4 | ||
|
|
92e5207e3a | ||
|
|
c0d1f97c89 | ||
|
|
7f8dd7841e | ||
|
|
36fa2e3313 | ||
|
|
17498e8e69 | ||
|
|
58209181bf | ||
|
|
2c3af49f76 | ||
|
|
ebc65133ed | ||
|
|
51e2e53649 | ||
|
|
c03a795a59 | ||
|
|
c5d0dce864 | ||
|
|
3908e54ba1 | ||
|
|
393626f619 | ||
|
|
88d05a75a9 | ||
|
|
777794d488 | ||
|
|
e43b55549b | ||
|
|
67ce45c437 | ||
|
|
f61874e665 | ||
|
|
d760761bba | ||
|
|
01e3bb7810 | ||
|
|
4ea889951b | ||
|
|
e412bda820 | ||
|
|
b1e81af397 | ||
|
|
6fc485143f | ||
|
|
96609ba479 | ||
|
|
78895e05f5 | ||
|
|
6e3b2caed4 | ||
|
|
01e5af9b23 | ||
|
|
ef6a79114d | ||
|
|
527e288732 | ||
|
|
2967fb8afd | ||
|
|
7a1793c3db | ||
|
|
4f797de139 | ||
|
|
1f8a13bd22 | ||
|
|
b9f3042e1f | ||
|
|
35fa5f11f8 | ||
|
|
d0593e8907 | ||
|
|
6a5347dfd2 | ||
|
|
c995b5a8db | ||
|
|
45b03c068a | ||
|
|
4cabb017cb | ||
|
|
00e398948e | ||
|
|
712717e587 | ||
|
|
67c7bf3cc9 | ||
|
|
8bb711a911 | ||
|
|
de69850d03 | ||
|
|
17a1f12463 | ||
|
|
35da5a2ca6 | ||
|
|
42d4c1c4fa | ||
|
|
f5cd3d745e | ||
|
|
b140fbc03d | ||
|
|
58e5721642 | ||
|
|
01fb2aad90 | ||
|
|
472bc08353 | ||
|
|
1bb771992f | ||
|
|
941abeeeff | ||
|
|
fb1630511a | ||
|
|
0af1a464a5 | ||
|
|
5600485f4d | ||
|
|
a67a204cd1 | ||
|
|
3b3f278d1e | ||
|
|
a2903a26ba | ||
|
|
9ee56128e3 | ||
|
|
ec21cf5bef | ||
|
|
df7a82e9c3 | ||
|
|
71cd8e9157 | ||
|
|
686d1aceda | ||
|
|
3dad5ef491 | ||
|
|
e9335b1f6f | ||
|
|
874d99e78f | ||
|
|
cfc03593fa | ||
|
|
af3f311232 | ||
|
|
8b77da7400 | ||
|
|
33d13c4649 | ||
|
|
374eb9158e | ||
|
|
f0a7f8d402 | ||
|
|
8d158944b5 | ||
|
|
b598067245 | ||
|
|
42e345f095 | ||
|
|
541dc831e6 | ||
|
|
75e819f6ae | ||
|
|
e23e7f9c72 | ||
|
|
9cbdfd876b | ||
|
|
e3c64e1ead | ||
|
|
4bc6981ca7 | ||
|
|
127b57416f | ||
|
|
0c0f29f295 | ||
|
|
12e1636981 | ||
|
|
6ef13b00db | ||
|
|
88e7b56c86 | ||
|
|
0a282027a6 | ||
|
|
0f14a90a9b | ||
|
|
beab364ac9 | ||
|
|
499d8aadbe | ||
|
|
ee480d992b | ||
|
|
1a309d74f9 | ||
|
|
e09053bb27 | ||
|
|
053c4adb10 | ||
|
|
bc528c5cac | ||
|
|
df3fc91704 | ||
|
|
d3c68d00d8 | ||
|
|
d4b82958c4 | ||
|
|
215692ae8b | ||
|
|
7cf537827e | ||
|
|
b7eef76204 | ||
|
|
bffcc306f4 | ||
|
|
0bea618803 | ||
|
|
13e98f12fc | ||
|
|
f1f2fe39bb | ||
|
|
a0d57b782d | ||
|
|
9ad8c1d1c1 | ||
|
|
18ef3153db | ||
|
|
65bd321f4a | ||
|
|
5cdcfda4a1 | ||
|
|
e307e5bde5 | ||
|
|
32568cc32b | ||
|
|
e279ca2c88 | ||
|
|
9f164a5a54 | ||
|
|
c2b367f8d5 | ||
|
|
3081976587 | ||
|
|
3260b7ce8e | ||
|
|
e3d373c38f | ||
|
|
ee1afbe910 | ||
|
|
15beef8963 | ||
|
|
2ef05e3d4e | ||
|
|
3320b94d77 | ||
|
|
afd6b86f22 | ||
|
|
057dd6a94a | ||
|
|
ddb756ee96 | ||
|
|
7d257d43f3 | ||
|
|
ad33093ec0 | ||
|
|
dc456d2749 | ||
|
|
4826f0735a | ||
|
|
1f742452a4 | ||
|
|
d453aca9a2 | ||
|
|
e1a22a7dc1 | ||
|
|
2c9b019074 | ||
|
|
637b614410 | ||
|
|
28ae66a804 | ||
|
|
d8ad810681 | ||
|
|
9c1ea2c679 | ||
|
|
33c4d4563a | ||
|
|
9bdae8777f | ||
|
|
3e9e015945 | ||
|
|
31226fbf89 | ||
|
|
8a876a1053 | ||
|
|
a41d076929 | ||
|
|
535e83cdca | ||
|
|
8b3992ff06 | ||
|
|
009e26974d | ||
|
|
665861b92c | ||
|
|
d75c6e77f3 | ||
|
|
34770e590d | ||
|
|
4b4137a8e1 | ||
|
|
1400abb6a9 | ||
|
|
9320111dac | ||
|
|
97d977bd08 | ||
|
|
0f679c26f8 | ||
|
|
52b1aa6608 | ||
|
|
88ab29e6a1 | ||
|
|
80447bdee9 | ||
|
|
11356d1646 | ||
|
|
94155bdd59 | ||
|
|
1d450ba778 | ||
|
|
1c176e8a61 | ||
|
|
f99ce83da2 | ||
|
|
4b50352885 | ||
|
|
00972173ac | ||
|
|
9278e91dfc | ||
|
|
8b992cb779 | ||
|
|
80050fa6e1 | ||
|
|
3b5acf019b | ||
|
|
a315e6ed1e | ||
|
|
f16041225c | ||
|
|
11eae1593a | ||
|
|
e27d4c4ab5 | ||
|
|
6c93cdf22d | ||
|
|
9a73497fc6 | ||
|
|
832b3bb33d | ||
|
|
c04db6548e | ||
|
|
ff123086bf | ||
|
|
200f54f63c | ||
|
|
a806bd1f08 | ||
|
|
ab1d14eee6 | ||
|
|
7b7ffc49d7 | ||
|
|
65a1499956 | ||
|
|
1e5b887be9 | ||
|
|
d7f3f1177d | ||
|
|
40420bd58f | ||
|
|
a42021f1e0 | ||
|
|
0017562573 | ||
|
|
15b1ad3aaa | ||
|
|
4cadfa6b1f | ||
|
|
a155ceca2e | ||
|
|
13e25131da | ||
|
|
6b3d543630 | ||
|
|
77ec896fa2 | ||
|
|
12a47c17e1 | ||
|
|
995c8a621a | ||
|
|
a506a06688 | ||
|
|
fcb4af670c | ||
|
|
2328c2a832 | ||
|
|
11651cd3b4 | ||
|
|
170bdbcd36 | ||
|
|
916476aeb8 | ||
|
|
e3d15ca868 | ||
|
|
9a339342aa | ||
|
|
9e96c21605 | ||
|
|
86b45b8d95 | ||
|
|
b0a1dc025f | ||
|
|
3aaba8525f | ||
|
|
7520c3feaa | ||
|
|
ae3e7cfdd2 | ||
|
|
c8eca13e07 | ||
|
|
1b176b8ed5 | ||
|
|
e92341ef9a | ||
|
|
fb6bdcab8a | ||
|
|
183bdfe632 | ||
|
|
9827958a09 | ||
|
|
657cc55551 | ||
|
|
9caae03c3d | ||
|
|
2b063e9deb | ||
|
|
a864d92173 | ||
|
|
98a6034dcc | ||
|
|
d73fe4ccd3 | ||
|
|
09d386818a | ||
|
|
62544d7754 | ||
|
|
d40df8a1ff | ||
|
|
468d857225 | ||
|
|
2612bdfc1e | ||
|
|
ea2076c138 | ||
|
|
d39757c360 | ||
|
|
e5abb02a7d | ||
|
|
5f73799ce4 | ||
|
|
dd2d298537 | ||
|
|
ee67013b3d | ||
|
|
4a4644d710 | ||
|
|
5aad7f81e9 | ||
|
|
21886f2277 | ||
|
|
404a223ac8 | ||
|
|
d87e864c41 | ||
|
|
f93017fba3 | ||
|
|
b04793443d | ||
|
|
800eba7a48 | ||
|
|
fb81cb9367 | ||
|
|
1ad311cadf | ||
|
|
584b166a1e | ||
|
|
c70f55a94b | ||
|
|
3185644a6a | ||
|
|
0cc5117c2b | ||
|
|
4ca131d3ee | ||
|
|
e1d661f623 | ||
|
|
a3a945bd45 | ||
|
|
2964882536 | ||
|
|
fda8fb3d2a | ||
|
|
6e1cf2f8e7 | ||
|
|
f40e164085 | ||
|
|
281c5c7c7b | ||
|
|
b717e696a3 | ||
|
|
36e2672a13 | ||
|
|
665d4a3748 | ||
|
|
cd23d0b4f3 | ||
|
|
a6b026d9b0 | ||
|
|
985af2a0df | ||
|
|
0b92faf27e | ||
|
|
a4b3a17c93 | ||
|
|
bbe220bab1 | ||
|
|
4ca90751e6 | ||
|
|
2597e00f45 | ||
|
|
a29468615d | ||
|
|
9843ff54e1 | ||
|
|
aa6a4b64b6 | ||
|
|
1dd08046d8 | ||
|
|
4e68d5349f | ||
|
|
2f9b1e5792 | ||
|
|
517b9ce3e8 | ||
|
|
f651e38c1d | ||
|
|
adb15a71a8 | ||
|
|
6d344a90cb | ||
|
|
81296ac128 | ||
|
|
dc307ddb84 | ||
|
|
eebb8128d3 | ||
|
|
3266e152e2 | ||
|
|
68d2cfe6ed | ||
|
|
98cf51a8e6 | ||
|
|
fc0c7f5c11 | ||
|
|
0557ac3280 | ||
|
|
4163db7a0d | ||
|
|
0c55d543f1 | ||
|
|
432a4e9ccf | ||
|
|
f7c4c7ec6a | ||
|
|
2f9a22f41a | ||
|
|
2605718c0a | ||
|
|
6d699751ae | ||
|
|
51728d1ced | ||
|
|
6aab0a3da3 | ||
|
|
fc130ff843 | ||
|
|
d954314e9b | ||
|
|
517352b7ce | ||
|
|
583e15c5ca | ||
|
|
c39f9c28a7 | ||
|
|
f2c359f8f4 | ||
|
|
22e4cc99b3 | ||
|
|
342dae0237 | ||
|
|
851281b2f3 | ||
|
|
98beb4e8e4 | ||
|
|
f13848d9f8 | ||
|
|
f2de180f9a | ||
|
|
273d5edb3e | ||
|
|
4a2ae51a61 | ||
|
|
f0291806ef | ||
|
|
0e3bc4ad8f | ||
|
|
717a2844b3 | ||
|
|
cbd71108d2 | ||
|
|
3a159b3967 | ||
|
|
5e5aa7b6ab | ||
|
|
68c05a71f9 | ||
|
|
73556f8403 | ||
|
|
ecfabb3866 | ||
|
|
7967ad51f4 | ||
|
|
5cf2a5d876 | ||
|
|
158d6c159b | ||
|
|
630d6c6777 | ||
|
|
2156e3defd | ||
|
|
521d69f238 | ||
|
|
d4677bc293 | ||
|
|
12325b96f3 | ||
|
|
6d4cbc7fb9 | ||
|
|
8565c1a9ce | ||
|
|
e94db5997f | ||
|
|
764c5a1519 | ||
|
|
7fb6a83138 | ||
|
|
a13f4b3b9e | ||
|
|
e12a24570a | ||
|
|
d82bf27d41 | ||
|
|
b4be30ed70 | ||
|
|
eb49c6e9c9 | ||
|
|
41b0af3048 | ||
|
|
d94c54df09 | ||
|
|
8a7bc1e167 | ||
|
|
c92eb1bf23 | ||
|
|
37d0d8dece | ||
|
|
d82c0ee920 | ||
|
|
8ba9d9f4cc | ||
|
|
4da3254493 | ||
|
|
2d3013e226 | ||
|
|
5e7b071efd | ||
|
|
5eb45ecb28 | ||
|
|
6d076498e9 | ||
|
|
6beb5b14bd | ||
|
|
c2ca168aa3 | ||
|
|
e676036a4e | ||
|
|
0b570f9921 | ||
|
|
94b280377d | ||
|
|
5a687c0cd5 | ||
|
|
7b3045d973 | ||
|
|
4d4506894e | ||
|
|
c5ff0df2b0 | ||
|
|
6ae395cafb | ||
|
|
21e15c87a2 | ||
|
|
20f9111cdd | ||
|
|
126f767675 | ||
|
|
3f2bc3e6b4 | ||
|
|
87c639d204 | ||
|
|
66287f3883 | ||
|
|
bd3329cdc9 | ||
|
|
2262189624 | ||
|
|
cc524125fd | ||
|
|
e5e545467f | ||
|
|
4011a81a1d | ||
|
|
b7d7c3108a | ||
|
|
f19dbdb400 | ||
|
|
1aecac107b | ||
|
|
c0393c1786 | ||
|
|
547100a835 | ||
|
|
e5e69f39d0 | ||
|
|
4106a13b94 | ||
|
|
9b38f8cc09 | ||
|
|
435d8aa52c | ||
|
|
cf28d565c1 | ||
|
|
8bce6e0945 | ||
|
|
569f00e5a3 | ||
|
|
3d05c598bf | ||
|
|
06ec8c204c | ||
|
|
cc692b9ef7 | ||
|
|
21f085b0e4 | ||
|
|
7918050127 | ||
|
|
f4698875aa | ||
|
|
a697e88c18 | ||
|
|
49e94bc089 | ||
|
|
8c79a9f358 | ||
|
|
544b9d1083 | ||
|
|
c474ecd447 | ||
|
|
2b12bd690e | ||
|
|
d9c9d6849f | ||
|
|
efddc211fc | ||
|
|
bdd1371445 | ||
|
|
d119243ad2 | ||
|
|
005a6718f4 | ||
|
|
63d088710d | ||
|
|
00cb3deca0 | ||
|
|
29059d1caa | ||
|
|
1f8b2b5b0f | ||
|
|
a19920729f | ||
|
|
bd6e302705 | ||
|
|
7daf32f91a | ||
|
|
bd18755b48 | ||
|
|
73ba8ed623 | ||
|
|
5f4e711254 | ||
|
|
9e5b239ea3 | ||
|
|
b951910ea7 | ||
|
|
e8086c65ee | ||
|
|
920e672d17 | ||
|
|
002bf97331 | ||
|
|
fe565234bd | ||
|
|
5057d4473a | ||
|
|
a8af665f3a | ||
|
|
34de2bd295 | ||
|
|
389549d93d | ||
|
|
405c71460a | ||
|
|
ae17be05a6 | ||
|
|
41617bd556 | ||
|
|
6512abd33b | ||
|
|
27ea709d79 | ||
|
|
107ba13367 | ||
|
|
75c7b0d01c | ||
|
|
9c5adcc933 | ||
|
|
d01e5b639c | ||
|
|
2a4a7cc792 | ||
|
|
b55df5acbf | ||
|
|
f455a9cffb | ||
|
|
b92738f8ef | ||
|
|
ba7858e3b0 | ||
|
|
f6e92879ba | ||
|
|
d07ce0de32 | ||
|
|
1244ee7ba9 | ||
|
|
28707f6663 | ||
|
|
16eb4a2aad | ||
|
|
f233bb277c | ||
|
|
43d690807a | ||
|
|
5f022b3209 | ||
|
|
4658473546 | ||
|
|
f749c0bce4 | ||
|
|
003231aa39 | ||
|
|
4660b2494f | ||
|
|
8eb5f4581b | ||
|
|
fb08ee3b13 | ||
|
|
855dddf89c | ||
|
|
3500988610 | ||
|
|
b48f3255c6 | ||
|
|
fcaef62bff | ||
|
|
c4a717702c | ||
|
|
b111357b45 | ||
|
|
03bceb7ef2 | ||
|
|
41ae69a057 | ||
|
|
c8127c617f | ||
|
|
e200b9cc63 | ||
|
|
49aaad3e56 | ||
|
|
f4b0b9c164 | ||
|
|
92af79f01b | ||
|
|
304e8fc284 | ||
|
|
324b32ed6f | ||
|
|
c7d747efc1 | ||
|
|
6f1a19ab47 | ||
|
|
723ef9d8d8 | ||
|
|
e07680e348 | ||
|
|
41a95164e3 | ||
|
|
b1f2d87d74 | ||
|
|
e36445de70 | ||
|
|
85cebd62ae | ||
|
|
c039a3458c | ||
|
|
998cc14c15 | ||
|
|
42435a96b3 | ||
|
|
d123cdfbbb | ||
|
|
18dab17236 | ||
|
|
cd14f12fd1 | ||
|
|
7139550a24 | ||
|
|
4365c76453 | ||
|
|
b0cec93211 | ||
|
|
e9f23154ec | ||
|
|
4566365f3c | ||
|
|
748d5f4ab5 | ||
|
|
5996f4083d | ||
|
|
115cf5e56a | ||
|
|
f68f6a91a8 | ||
|
|
bc2b3d5f4a | ||
|
|
e34d97bb24 | ||
|
|
9b7975e75f | ||
|
|
7934d0df16 | ||
|
|
a9fc3a6fa4 | ||
|
|
b500a99b8e | ||
|
|
bf817e2da0 | ||
|
|
4d49cf545f | ||
|
|
c145127332 | ||
|
|
3542b09602 | ||
|
|
057385aed6 | ||
|
|
000f39ced0 | ||
|
|
872e5f8676 | ||
|
|
d314ea56f6 | ||
|
|
f99fbc06fc | ||
|
|
bc6ed3ac18 | ||
|
|
280f37cefe | ||
|
|
7055caf602 | ||
|
|
93d331ae54 | ||
|
|
7267316895 | ||
|
|
c0254d749b | ||
|
|
c8c7cabf18 | ||
|
|
02bf9a9d60 | ||
|
|
f1c9761630 | ||
|
|
aa37383449 | ||
|
|
23d5cb3b21 | ||
|
|
0ba4efb472 | ||
|
|
10640285f9 | ||
|
|
27f023a0da | ||
|
|
00c243548a | ||
|
|
fc9f724d6f | ||
|
|
27ac5cf0e8 | ||
|
|
ee530a5d9a | ||
|
|
b41cd95597 | ||
|
|
28fceab1f4 | ||
|
|
8c2d36d176 | ||
|
|
13c25a7001 | ||
|
|
390ef98b58 | ||
|
|
67b44cdff0 | ||
|
|
6db7491481 | ||
|
|
3627152124 | ||
|
|
6d8fdee0b3 | ||
|
|
ab7341e0c7 | ||
|
|
0e38e0d727 | ||
|
|
b02d0645f5 | ||
|
|
9a60b7aad2 | ||
|
|
a6c48c0c37 | ||
|
|
08661ed8c3 | ||
|
|
135a0caba1 | ||
|
|
5f044564d2 | ||
|
|
b7c80afbc9 | ||
|
|
19cf481541 | ||
|
|
cc20e35500 | ||
|
|
15e8ecf357 | ||
|
|
450c6d6311 | ||
|
|
d5836df3ae | ||
|
|
06de52dd65 | ||
|
|
05a68f2ecc | ||
|
|
a57491a1f5 | ||
|
|
1b8680b863 | ||
|
|
8b544a6a26 | ||
|
|
9401c34a94 | ||
|
|
00474cdc3e | ||
|
|
1fa0d1437c | ||
|
|
9f99b4e235 | ||
|
|
fe3aa1f7fd | ||
|
|
dc2bad83c6 | ||
|
|
c76a1b982c | ||
|
|
2c2145de91 | ||
|
|
2b4e6992cb | ||
|
|
8969d293e4 | ||
|
|
26a1741aae | ||
|
|
fc5b91e027 | ||
|
|
84a1c11e99 | ||
|
|
41e983b135 | ||
|
|
fd49d2b4d2 | ||
|
|
bbbe2fc050 | ||
|
|
789c4bd144 | ||
|
|
3ff4c5543c | ||
|
|
dddd06340d | ||
|
|
a36ee4dbc9 | ||
|
|
7355b915ef | ||
|
|
15c898b53d | ||
|
|
59863dea65 | ||
|
|
c723415b1a | ||
|
|
c6e7a84dbb | ||
|
|
26da1a4c3b | ||
|
|
7030b5516e | ||
|
|
b6901d9f24 | ||
|
|
7f9b1d385b | ||
|
|
a5e0b33c46 | ||
|
|
6fa4120fc3 | ||
|
|
9b6349f611 | ||
|
|
d3bf58241c | ||
|
|
07b14caad9 | ||
|
|
d9d84a9795 | ||
|
|
26af701f98 | ||
|
|
36d267be26 | ||
|
|
a11516e088 | ||
|
|
ec3dd4924f | ||
|
|
1db850f58d | ||
|
|
1002ca8c58 | ||
|
|
845df4cba7 | ||
|
|
0b0633c29e | ||
|
|
95ce41592f | ||
|
|
e16cc976b8 | ||
|
|
faa3b882af | ||
|
|
3f185bd254 | ||
|
|
0814a77164 | ||
|
|
56339fcffc | ||
|
|
369c698a76 | ||
|
|
aba4083278 | ||
|
|
96cf728459 | ||
|
|
818d104801 | ||
|
|
1f1f215532 | ||
|
|
eeff47d38f | ||
|
|
0ad24df38a | ||
|
|
725affb036 | ||
|
|
7fbad528a4 | ||
|
|
0670fdb150 | ||
|
|
cc22b2147d | ||
|
|
2465b31d58 | ||
|
|
8cfb28243d | ||
|
|
fc06a4decf | ||
|
|
b4408b59ef | ||
|
|
b42144a559 | ||
|
|
1be5e79af4 | ||
|
|
786df48338 | ||
|
|
0a7b52c3e7 | ||
|
|
1c5ea8260e | ||
|
|
b5d953f833 | ||
|
|
34292c1fcc | ||
|
|
2179c3b145 | ||
|
|
71a3317907 | ||
|
|
03df7971a9 | ||
|
|
d1d47d40e6 | ||
|
|
0b8350b42d | ||
|
|
0da954e7bb | ||
|
|
9322a577c8 | ||
|
|
d13dd7e723 | ||
|
|
79abedf128 | ||
|
|
d1982203ae | ||
|
|
21bc239345 | ||
|
|
6e5c15a808 | ||
|
|
a9b924ab52 | ||
|
|
0fe922146f | ||
|
|
e1161067a4 | ||
|
|
aa16c10dcf | ||
|
|
739c24745b | ||
|
|
ee8bd6d237 | ||
|
|
1a0adfc472 | ||
|
|
61da6ae049 | ||
|
|
5726a32710 | ||
|
|
1562375612 | ||
|
|
f2bc177608 | ||
|
|
2e91889559 | ||
|
|
712abc89bb | ||
|
|
3294655d54 | ||
|
|
881ca0f0e1 | ||
|
|
83637c7581 | ||
|
|
a0b1d4d60f | ||
|
|
264b267f57 | ||
|
|
ac26570117 | ||
|
|
a3d4698d34 | ||
|
|
8e40e85b33 | ||
|
|
4176d016b3 | ||
|
|
0d7ff4780f | ||
|
|
95e8c8e6cb | ||
|
|
02df93bb42 | ||
|
|
2d3a5cebb6 | ||
|
|
3827aa74b0 | ||
|
|
e166e79b01 | ||
|
|
dc813fcdf9 | ||
|
|
ea223d02d2 | ||
|
|
da5ec3dbd5 | ||
|
|
c0e2a639cd | ||
|
|
9263f32b07 | ||
|
|
7e3cc2eb2c | ||
|
|
0edba554e9 | ||
|
|
679bf856c6 | ||
|
|
239b8af705 | ||
|
|
45d2a7e8a3 | ||
|
|
501b351b98 | ||
|
|
c6d5c0b4c9 | ||
|
|
4d40b9c182 | ||
|
|
c4d01569a6 | ||
|
|
3420fafc3a | ||
|
|
f763242755 | ||
|
|
574cc09860 | ||
|
|
bb8d8c5ad5 | ||
|
|
dce49feee5 | ||
|
|
2af621ea99 | ||
|
|
25c4fa392d | ||
|
|
6445f5010e | ||
|
|
370a61f5ec | ||
|
|
7f859f3b9f | ||
|
|
2b80a2a348 | ||
|
|
91e5f4ea21 | ||
|
|
67a1332e09 | ||
|
|
3f5a8a2529 | ||
|
|
4650ea99da |
453 changed files with 29877 additions and 5777 deletions
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
|
|
@ -1,2 +1 @@
|
|||
github: ThaUnknown
|
||||
ko_fi: thaunknown_
|
||||
|
|
|
|||
31
.github/ISSUE_TEMPLATE/bug_report.md
vendored
31
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
|
@ -1,31 +0,0 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. Windows|Linux]
|
||||
- Version [e.g. v0.1.0]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
65
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
65
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
name: Bug report
|
||||
description: Report a bug.
|
||||
title: '[Bug]: '
|
||||
labels:
|
||||
- bug
|
||||
body:
|
||||
- type: checkboxes
|
||||
id: '1'
|
||||
attributes:
|
||||
label: Preflight checklist
|
||||
description: Make sure you completed this before creating an issue.
|
||||
options:
|
||||
- label: >-
|
||||
I have searched the [issue
|
||||
tracker](https://github.com/hayase-app/ui/issues) for a bug report
|
||||
that matches the one I want to file, without success.
|
||||
required: true
|
||||
- label: >-
|
||||
I have searched the [frequently asked
|
||||
questions](https://hayase.watch/faq) for a solution to my problem,
|
||||
for a solution that fixes this problem, without success.
|
||||
required: true
|
||||
- label: >-
|
||||
I have checked that I'm using the [latest
|
||||
stable](https://github.com/hayase-app/ui/releases/latest) version
|
||||
of the app.
|
||||
required: true
|
||||
- type: input
|
||||
id: '2'
|
||||
attributes:
|
||||
label: What app version are you using?
|
||||
description: >-
|
||||
The app version you are currently using, you can view this at the bottom
|
||||
of the settings menu.
|
||||
placeholder: v2.0.1
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: '3'
|
||||
attributes:
|
||||
label: What operating system version are you using?
|
||||
options:
|
||||
- Windows
|
||||
- Linux
|
||||
- MacOS
|
||||
- Android
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: '4'
|
||||
attributes:
|
||||
label: Expected Behavior
|
||||
description: A clear and concise description of what you expected to happen.
|
||||
- type: textarea
|
||||
id: '5'
|
||||
attributes:
|
||||
label: Actual Behavior
|
||||
description: A clear description of what actually happens.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: '6'
|
||||
attributes:
|
||||
label: Screenshots
|
||||
description: If applicable, add screenshots to help explain your problem.
|
||||
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
blank_issues_enabled: false
|
||||
17
.github/ISSUE_TEMPLATE/feature_request.md
vendored
17
.github/ISSUE_TEMPLATE/feature_request.md
vendored
|
|
@ -1,17 +0,0 @@
|
|||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
43
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
43
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
name: Feature Request
|
||||
description: Suggest an idea for the app.
|
||||
title: '[Feature Request]: '
|
||||
labels:
|
||||
- enhancement
|
||||
body:
|
||||
- type: checkboxes
|
||||
id: '1'
|
||||
attributes:
|
||||
label: Preflight checklist
|
||||
description: Make sure you completed this before creating an issue.
|
||||
options:
|
||||
- label: >-
|
||||
I have searched the [issue
|
||||
tracker](https://github.com/hayase-app/ui/issues) for a bug report
|
||||
that matches the one I want to file, without success.
|
||||
required: true
|
||||
- label: >-
|
||||
I have searched the [features
|
||||
list](https://hayase.watch/features) for this feature,
|
||||
and I couldn't find it.
|
||||
required: true
|
||||
- label: >-
|
||||
I have checked that I'm using the [latest
|
||||
stable](https://github.com/hayase-app/ui/releases/latest) version
|
||||
of the app.
|
||||
required: true
|
||||
- type: textarea
|
||||
id: '4'
|
||||
attributes:
|
||||
label: Problem Description
|
||||
description: >-
|
||||
Please add a clear and concise description of the problem you are
|
||||
seeking to solve with this feature request.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: '5'
|
||||
attributes:
|
||||
label: Proposed Solution
|
||||
description: Describe the solution you'd like in a clear and concise manner.
|
||||
validations:
|
||||
required: true
|
||||
39
.github/workflows/check.yml
vendored
Normal file
39
.github/workflows/check.yml
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
name: Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
name: Install pnpm
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22.19
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Sync
|
||||
run: pnpm run sync
|
||||
|
||||
- name: Lint
|
||||
run: pnpm run lint
|
||||
|
||||
- name: Check GQL
|
||||
run: pnpm run gql:check
|
||||
|
||||
- name: Check Svelte and TypeScript
|
||||
run: pnpm run check
|
||||
28
.gitignore
vendored
28
.gitignore
vendored
|
|
@ -1,10 +1,26 @@
|
|||
# OS Specific
|
||||
node_modules
|
||||
|
||||
# Output
|
||||
.output
|
||||
.vercel
|
||||
/.svelte-kit
|
||||
/build
|
||||
|
||||
# OS
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Build output
|
||||
dist/
|
||||
# Env
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
!.env.test
|
||||
ideas.todo
|
||||
|
||||
# Dependencies
|
||||
node_modules/
|
||||
# Vite
|
||||
vite.config.js.timestamp-*
|
||||
vite.config.ts.timestamp-*
|
||||
|
||||
package-lock.json
|
||||
*.mkv
|
||||
*.webm
|
||||
*src/routes/test/**
|
||||
|
|
|
|||
1
.npmrc
Normal file
1
.npmrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
engine-strict=true
|
||||
10
.prettierrc
10
.prettierrc
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"useTabs": false,
|
||||
"jsxSingleQuote": true,
|
||||
"printWidth": 180,
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"svelteBracketNewLine": false,
|
||||
"arrowParens": "avoid",
|
||||
"trailingComma": "none"
|
||||
}
|
||||
13
.vscode/extensions.json
vendored
Normal file
13
.vscode/extensions.json
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"usernamehw.errorlens",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"GraphQL.vscode-graphql-syntax",
|
||||
"bierner.comment-tagged-templates",
|
||||
"YoavBls.pretty-ts-errors",
|
||||
"svelte.svelte-vscode", // 109.5.2 or older NOT NEWER
|
||||
"ardenivanov.svelte-intellisense",
|
||||
"Gruntfuggly.todo-tree",
|
||||
"bradlc.vscode-tailwindcss"
|
||||
]
|
||||
}
|
||||
39
.vscode/launch.json
vendored
Normal file
39
.vscode/launch.json
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Launch Chromium",
|
||||
"port": 8412,
|
||||
"request": "launch",
|
||||
"type": "chrome",
|
||||
"url": "http://localhost:7344/",
|
||||
"webRoot": "${workspaceFolder}/src",
|
||||
"timeout": 60000,
|
||||
"presentation": {
|
||||
"hidden": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Debug Renderer Process",
|
||||
"port": 9222,
|
||||
"request": "attach",
|
||||
"type": "chrome",
|
||||
"webRoot": "${workspaceFolder}/src",
|
||||
"timeout": 60000,
|
||||
"presentation": {
|
||||
"hidden": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"compounds": [
|
||||
{
|
||||
"name": "Attach",
|
||||
"configurations": [
|
||||
"Launch Chromium"
|
||||
],
|
||||
"presentation": {
|
||||
"order": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
43
.vscode/settings.json
vendored
Normal file
43
.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "always"
|
||||
},
|
||||
"editor.formatOnSave": true,
|
||||
"editor.linkedEditing": true,
|
||||
"editor.tabSize": 2,
|
||||
"eslint.format.enable": true,
|
||||
"eslint.probe": [
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"svelte",
|
||||
"html"
|
||||
],
|
||||
"eslint.useESLintClass": true,
|
||||
"eslint.useFlatConfig": true,
|
||||
"eslint.validate": [
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"svelte",
|
||||
"html"
|
||||
],
|
||||
"javascript.preferences.importModuleSpecifierEnding": "minimal",
|
||||
"javascript.preferences.quoteStyle": "single",
|
||||
"javascript.suggest.autoImports": true,
|
||||
"javascript.updateImportsOnFileMove.enabled": "always",
|
||||
"javascript.validate.enable": true,
|
||||
"extensions.ignoreRecommendations": false,
|
||||
"svelte.plugin.svelte.format.config.singleQuote": true,
|
||||
"svelte.plugin.svelte.format.enable": false,
|
||||
"typescript.enablePromptUseWorkspaceTsdk": true,
|
||||
"typescript.experimental.expandableHover": true,
|
||||
"typescript.preferences.importModuleSpecifierEnding": "minimal",
|
||||
"typescript.preferences.quoteStyle": "single",
|
||||
"typescript.suggest.autoImports": true,
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"typescript.updateImportsOnFileMove.enabled": "always",
|
||||
"typescript.validate.enable": true
|
||||
}
|
||||
166
CONTRIBUTING.md
Normal file
166
CONTRIBUTING.md
Normal file
|
|
@ -0,0 +1,166 @@
|
|||
# Contributing Guidelines
|
||||
|
||||
*Pull requests, bug reports, and all other forms of contribution are welcomed and highly encouraged!* :octocat:
|
||||
|
||||
### Contents
|
||||
|
||||
* [Opening an Issue](#inbox_tray-opening-an-issue)
|
||||
* [Feature Requests](#love_letter-feature-requests)
|
||||
* [Triaging Issues](#mag-triaging-issues)
|
||||
* [Submitting Pull Requests](#repeat-submitting-pull-requests)
|
||||
* [Writing Commit Messages](#memo-writing-commit-messages)
|
||||
* [Code Review](#white_check_mark-code-review)
|
||||
* [Coding Style](#nail_care-coding-style)
|
||||
* [Certificate of Origin](#medal_sports-certificate-of-origin)
|
||||
* [Credits](#pray-credits)
|
||||
|
||||
> **This guide serves to set clear expectations for everyone involved with the project so that we can improve it together while also creating a welcoming space for everyone to participate. Following these guidelines will help ensure a positive experience for contributors and maintainers.**
|
||||
|
||||
## :inbox\_tray: Opening an Issue
|
||||
|
||||
Before [creating an issue](https://help.github.com/en/github/managing-your-work-on-github/creating-an-issue), check if you are using the latest version of the project. If you are not up-to-date, see if updating fixes your issue first.
|
||||
|
||||
### :lock: Reporting Security Issues
|
||||
|
||||
Review our [Security Policy](./SECURITY.md). **Do not** file a public issue for security vulnerabilities.
|
||||
|
||||
### :beetle: Bug Reports and Other Issues
|
||||
|
||||
A great way to contribute to the project is to send a detailed issue when you encounter a problem. We always appreciate a well-written, thorough bug report. :v:
|
||||
|
||||
In short, since you are most likely a developer, **provide a ticket that you would like to receive**.
|
||||
|
||||
* **Review the documentation and [Support Guide](./SUPPORT.md)** before opening a new issue.
|
||||
|
||||
* **Do not open a duplicate issue!** Search through existing issues to see if your issue has previously been reported. If your issue exists, comment with any additional information you have. You may simply note "I have this problem too", which helps prioritize the most common problems and requests.
|
||||
|
||||
* **Prefer using [reactions](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/)**, not comments, if you simply want to "+1" an existing issue.
|
||||
|
||||
* **Fully complete the provided issue template.** The bug report template requests all the information we need to quickly and efficiently address your issue. Be clear, concise, and descriptive. Provide as much information as you can, including steps to reproduce, stack traces, compiler errors, library versions, OS versions, and screenshots (if applicable).
|
||||
|
||||
* **Use [GitHub-flavored Markdown](https://help.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax).** Especially put code blocks and console outputs in backticks (\`\`\`). This improves readability.
|
||||
|
||||
## :love\_letter: Feature Requests
|
||||
|
||||
Feature requests are welcome! While we will consider all requests, we cannot guarantee your request will be accepted. We want to avoid [feature creep](https://en.wikipedia.org/wiki/Feature_creep). Your idea may be great, but also out-of-scope for the project. If accepted, we cannot make any commitments regarding the timeline for implementation and release. However, you are welcome to submit a pull request to help!
|
||||
|
||||
* **Do not open a duplicate feature request.** Search for existing feature requests first. If you find your feature (or one very similar) previously requested, comment on that issue.
|
||||
|
||||
* **Fully complete the provided issue template.** The feature request template asks for all necessary information for us to begin a productive conversation.
|
||||
|
||||
* Be precise about the proposed outcome of the feature and how it relates to existing features. Include implementation details if possible.
|
||||
|
||||
## :mag: Triaging Issues
|
||||
|
||||
You can triage issues which may include reproducing bug reports or asking for additional information, such as version numbers or reproduction instructions. Any help you can provide to quickly resolve an issue is very much appreciated!
|
||||
|
||||
## :repeat: Submitting Pull Requests
|
||||
|
||||
We **love** pull requests! Before [forking the repo](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) and [creating a pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests) for non-trivial changes, it is usually best to first open an issue to discuss the changes, or discuss your intended approach for solving the problem in the comments for an existing issue.
|
||||
|
||||
For most contributions, after your first pull request is accepted and merged, you will be [invited to the project](https://help.github.com/en/github/setting-up-and-managing-your-github-user-account/inviting-collaborators-to-a-personal-repository) and given **push access**. :tada:
|
||||
|
||||
*Note: All contributions will be licensed under the project's license.*
|
||||
|
||||
* **Smaller is better.** Submit **one** pull request per bug fix or feature. A pull request should contain isolated changes pertaining to a single bug fix or feature implementation. **Do not** refactor or reformat code that is unrelated to your change. It is better to **submit many small pull requests** rather than a single large one. Enormous pull requests will take enormous amounts of time to review, or may be rejected altogether.
|
||||
|
||||
* **Coordinate bigger changes.** For large and non-trivial changes, open an issue to discuss a strategy with the maintainers. Otherwise, you risk doing a lot of work for nothing!
|
||||
|
||||
* **Prioritize understanding over cleverness.** Write code clearly and concisely. Remember that source code usually gets written once and read often. Ensure the code is clear to the reader. The purpose and logic should be obvious to a reasonably skilled developer, otherwise you should add a comment that explains it.
|
||||
|
||||
* **Follow existing coding style and conventions.** Keep your code consistent with the style, formatting, and conventions in the rest of the code base. When possible, these will be enforced with a linter. Consistency makes it easier to review and modify in the future.
|
||||
|
||||
* **Include test coverage.** Add unit tests or UI tests when possible. Follow existing patterns for implementing tests.
|
||||
|
||||
* **Update the example project** if one exists to exercise any new functionality you have added.
|
||||
|
||||
* **Add documentation.** Document your changes with code doc comments or in existing guides.
|
||||
|
||||
* **Use the repo's default branch.** Branch from and [submit your pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) to the repo's default branch. Usually this is `main`, but it could be `dev`, `develop`, or `master`.
|
||||
|
||||
* **[Resolve any merge conflicts](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-on-github)** that occur.
|
||||
|
||||
* **Promptly address any CI failures**. If your pull request fails to build or pass tests, please push another commit to fix it.
|
||||
|
||||
* When writing comments, use properly constructed sentences, including punctuation.
|
||||
|
||||
* Use spaces, not tabs.
|
||||
|
||||
## :memo: Writing Commit Messages
|
||||
|
||||
Please [write a great commit message](https://chris.beams.io/posts/git-commit/).
|
||||
|
||||
1. Separate subject from body with a blank line
|
||||
2. Limit the subject line to 50 characters
|
||||
3. Capitalize the subject line
|
||||
4. Do not end the subject line with a period
|
||||
5. Use the imperative mood in the subject line (example: "Fix networking issue")
|
||||
6. Wrap the body at about 72 characters
|
||||
7. Use the body to explain **why**, *not what and how* (the code shows that!)
|
||||
8. If applicable, prefix the title with the relevant component name in a semantic way. (examples: "fix: typo", "feat: add avatar")
|
||||
|
||||
```
|
||||
docs: Short summary of changes in 50 chars or less
|
||||
|
||||
Add a more detailed explanation here, if necessary. Possibly give
|
||||
some background about the issue being fixed, etc. The body of the
|
||||
commit message can be several paragraphs. Further paragraphs come
|
||||
after blank lines and please do proper word-wrap.
|
||||
|
||||
Wrap it to about 72 characters or so. In some contexts,
|
||||
the first line is treated as the subject of the commit and the
|
||||
rest of the text as the body. The blank line separating the summary
|
||||
from the body is critical (unless you omit the body entirely);
|
||||
various tools like `log`, `shortlog` and `rebase` can get confused
|
||||
if you run the two together.
|
||||
|
||||
Explain the problem that this commit is solving. Focus on why you
|
||||
are making this change as opposed to how or what. The code explains
|
||||
how or what. Reviewers and your future self can read the patch,
|
||||
but might not understand why a particular solution was implemented.
|
||||
Are there side effects or other unintuitive consequences of this
|
||||
change? Here's the place to explain them.
|
||||
|
||||
- Bullet points are okay, too
|
||||
|
||||
- A hyphen or asterisk should be used for the bullet, preceded
|
||||
by a single space, with blank lines in between
|
||||
|
||||
Note the fixed or relevant GitHub issues at the end:
|
||||
|
||||
Resolves: #123
|
||||
See also: #456, #789
|
||||
```
|
||||
|
||||
## :white\_check\_mark: Code Review
|
||||
|
||||
* **Review the code, not the author.** Look for and suggest improvements without disparaging or insulting the author. Provide actionable feedback and explain your reasoning.
|
||||
|
||||
* **You are not your code.** When your code is critiqued, questioned, or constructively criticized, remember that you are not your code. Do not take code review personally.
|
||||
|
||||
* **Always do your best.** No one writes bugs on purpose. Do your best, and learn from your mistakes.
|
||||
|
||||
* Kindly note any violations to the guidelines specified in this document.
|
||||
|
||||
## :nail\_care: Coding Style
|
||||
|
||||
Consistency is the most important. Following the existing style, formatting, and naming conventions of the file you are modifying and of the overall project. Failure to do so will result in a prolonged review process that has to focus on updating the superficial aspects of your code, rather than improving its functionality and performance.
|
||||
|
||||
For example, if all private properties are prefixed with an underscore `_`, then new ones you add should be prefixed in the same way. Or, if methods are named using camelcase, like `thisIsMyNewMethod`, then do not diverge from that by writing `this_is_my_new_method`. You get the idea. If in doubt, please ask or search the codebase for something similar.
|
||||
|
||||
When possible, style and format will be enforced with a linter.
|
||||
|
||||
## :medal\_sports: Certificate of Origin
|
||||
|
||||
*Developer's Certificate of Origin 1.1*
|
||||
|
||||
By making a contribution to this project, I certify that:
|
||||
|
||||
> 1. The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or
|
||||
> 2. The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or
|
||||
> 3. The contribution was provided directly to me by some other person who certified (1), (2) or (3) and I have not modified it.
|
||||
> 4. I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the source license(s) involved.
|
||||
|
||||
## [No Brown M\&M's](https://en.wikipedia.org/wiki/Van_Halen#Contract_riders)
|
||||
|
||||
If you are reading this, bravo dear user and (hopefully) contributor for making it this far! You are awesome. :100:
|
||||
47
LICENSE
Normal file
47
LICENSE
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
Business Source License 1.1
|
||||
|
||||
Terms
|
||||
|
||||
The Licensor hereby grants you the right to copy, modify, create derivative
|
||||
works, redistribute, and make non-production use of the Licensed Work. The
|
||||
Licensor may make an Additional Use Grant, above, permitting limited
|
||||
production use.
|
||||
|
||||
Effective on the Change Date, or the fourth anniversary of the first publicly
|
||||
available distribution of a specific version of the Licensed Work under this
|
||||
License, whichever comes first, the Licensor hereby grants you rights under
|
||||
the terms of the Change License, and the rights granted in the paragraph
|
||||
above terminate.
|
||||
|
||||
If your use of the Licensed Work does not comply with the requirements
|
||||
currently in effect as described in this License, you must purchase a
|
||||
commercial license from the Licensor, its affiliated entities, or authorized
|
||||
resellers, or you must refrain from using the Licensed Work.
|
||||
|
||||
All copies of the original and modified Licensed Work, and derivative works
|
||||
of the Licensed Work, are subject to this License. This License applies
|
||||
separately for each version of the Licensed Work and the Change Date may vary
|
||||
for each version of the Licensed Work released by Licensor.
|
||||
|
||||
You must conspicuously display this License on each original or modified copy
|
||||
of the Licensed Work. If you receive the Licensed Work in original or
|
||||
modified form from a third party, the terms and conditions set forth in this
|
||||
License apply to your use of that work.
|
||||
|
||||
Any use of the Licensed Work in violation of this License will automatically
|
||||
terminate your rights under this License for the current and all other
|
||||
versions of the Licensed Work.
|
||||
|
||||
This License does not grant you any right in any trademark or logo of
|
||||
Licensor or its affiliates (provided that you may use a trademark or logo of
|
||||
Licensor as expressly required by this License).
|
||||
|
||||
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
||||
AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
||||
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
||||
TITLE.
|
||||
|
||||
Change Date: 2029-04-01
|
||||
|
||||
On the date above, in accordance with the Business Source License, use of this software will be governed by the open source license GPL-3.0.
|
||||
162
README.md
162
README.md
|
|
@ -1,18 +1,158 @@
|
|||
# Miru
|
||||
<p align="center">
|
||||
<a href="https://github.com/hayase-app/ui">
|
||||
<img src="./static/logo_white.svg" width="300">
|
||||
</a>
|
||||
</p>
|
||||
<h1 align="center"><b>Hayase</b></h1>
|
||||
|
||||
Discord link: https://discord.gg/Z87Nh7c4Ac
|
||||
<h4 align="center"><b>Stream anime torrents instantly, real-time with no waiting for downloads to finish! 🍿</b></h4>
|
||||
|
||||
Originally a joke project, turned out to be semi-viable.
|
||||
<p align="center">
|
||||
<a href="https://hayase.watch/#about">About</a> •
|
||||
<a href="https://hayase.watch/features/">Features</a> •
|
||||
<a href="https://hayase.watch/faq/">Frequently Asked Questions</a> •
|
||||
<a href="https://hayase.watch/download/">Download</a>
|
||||
</p>
|
||||
<p align="center">
|
||||
<a href="https://discord.gg/Z87Nh7c4Ac">
|
||||
<img src="https://img.shields.io/discord/953341991134064651?style=flat-square" alt="chat">
|
||||
</a>
|
||||
<a href="https://hayase.watch/download/">
|
||||
<img alt="Download" src="https://img.shields.io/github/downloads/hayase-app/ui/total?style=flat-square">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
A pure JS BitTorrent streaming environment, with a built-in list manager. Imagine qBit + Taiga + MPV, all in a single package, but streamed real-time.
|
||||
https://github.com/user-attachments/assets/bbbe2966-b773-4ebb-9d69-08248ae77ae4
|
||||
|
||||
Unlike qBit's sequential, seeking into undownloaded data will prioritise downloading that data, instead of flat out closing MPV.
|
||||
<p align="center">Formerly known as Miru.</p>
|
||||
|
||||
## Why Electron?
|
||||
Electron has node.js integration, which can use TCP/UDP, that is the only reason. Browsers can't access TCP/UDP which means they can't access the global BT swarm.
|
||||
> Can't you make this just use WebRTC?
|
||||
## ✨ About
|
||||
|
||||
Yes. A BitTorrent implementation which uses WebRTC exists, but it's not yet adopted by any clients, and libtorrent [the library which qBit and others use] is still working/just added support for WebRTC, which means there's no swarm. This will hopefully change in the future.
|
||||
**Hayase** is a modern app for streaming anime torrents in real-time, with no waiting for downloads to finish.
|
||||
|
||||
## Where codec support?
|
||||
This uses the browser's built in video player, which uses a cut down version of FFMPEG, which lacks a support for a LOT of containers and codecs because of licensing. Since Electron is just Chromium IN THEORY it is possible to re-compile FFMPEG with support for more containers and codecs, but people seem to be going out of their way to make sure you can't find how to do that. PR pls?
|
||||
It is meant to feel look, work and perform like a premium streaming service, but with all the benefits of both streaming and torrenting, like file downloads, higher download speeds, better video quality, instant access to new releases, and features you won’t find on typical streaming sites.
|
||||
|
||||
## 🌟 Highlights
|
||||
|
||||
* 📚 **Anime list integration:** Sync with AniList, Kitsu, ~~MAL~~, or use local storage.
|
||||
* ⚡ **Instant torrent streaming:** Watch as you download, with extension support for custom sources.
|
||||
* 📴 **Offline viewing:** Enjoy already-downloaded torrents anytime.
|
||||
* 🎬 **Advanced video player:** Full support for all subtitle formats, softcoded and external tracks, and more.
|
||||
* 👥 **Social features:** Connect with friends, join discussions, and watch together.
|
||||
|
||||
***
|
||||
|
||||
## 🏆 Features
|
||||
|
||||
### 🎞️ Anime Management
|
||||
|
||||
* Effortlessly manage your anime list with support for AniList, Kitsu, ~~MAL~~, and local storage.
|
||||
* Automatically track watched episodes.
|
||||
* See what you’re behind on, and discover sequels you’ve missed.
|
||||
* Keep up to date and browse upcoming episodes with airing calendars.
|
||||
* Edit entries (score, progress, status, favorite, etc.) even while offline.
|
||||
* Search by image, name, genre, year, season, and more.
|
||||
* View trailers, OP/ED themes, and detailed episode lists with thumbnails, descriptions and filler indicators.
|
||||
|
||||
<p align="center">
|
||||
<img src='https://raw.githubusercontent.com/hayase-app/website/main/static/viewanime.webp' width='400px'></img>
|
||||
</p>
|
||||
|
||||
### 🤝 Social & Community
|
||||
|
||||
* Instantly see which friends are following an anime or episode.
|
||||
* See friends profiles and watch progress in the episodes list.
|
||||
* Track your friends’ watch progress in real time.
|
||||
* Join episode discussions and forums, even offline.
|
||||
* Global app chat.
|
||||
* Discord rich pressence.
|
||||
* Host or join Watch Together lobbies with synced playback and chat.
|
||||
|
||||
### 🎥 Video Experience
|
||||
|
||||
* Full subtitle support.
|
||||
* Softcoded, external and manually added subtitles.
|
||||
* VTT, SSA, ASS, SUB, TXT formats.
|
||||
* Subtitle display in PiP.
|
||||
* Override default dialog styles.
|
||||
* Override default fonts for Asian languages \[fix for bad torrents].
|
||||
* Picture In Picture.
|
||||
* PiP on lost visiblity.
|
||||
* Pause on lost visibility.
|
||||
* Specify preferred language for video and subtitle tracks.
|
||||
* Remove video compression artifacts.
|
||||
* Miniplayer.
|
||||
* Media Session display.
|
||||
* Media Keys support.
|
||||
* Discord rich pressence.
|
||||
* Seek and preview thumbnails.
|
||||
* Autoplay next episode.
|
||||
* Skip intro/outro, manually or automatically.
|
||||
* Skip filler episodes automatically.
|
||||
* Change playback rate.
|
||||
* Browse playlist.
|
||||
* Multi-track support for video, audio and subtitles.
|
||||
* Editable keybinds for all player functions.
|
||||
* Exponential volume \[better control at lower volumes].
|
||||
* External player support.
|
||||
|
||||
<p align="center">
|
||||
<img src='https://raw.githubusercontent.com/hayase-app/website/main/static/videoplayer.webp' width='400px'></img>
|
||||
</p>
|
||||
|
||||
### 🧲 Torrents
|
||||
|
||||
* Stream torrents instantly, no waiting for full downloads.
|
||||
* Download only what you need for playback.
|
||||
* Choose your downloads folder and set speed/connection limits.
|
||||
* Support for custom extensions, sources, and trackers.
|
||||
* Specify download/upload speeds, ports and connections.
|
||||
* Support for most popular BEP's.
|
||||
* Persist torrents, cache progress, and rescan instantly.
|
||||
* View detailed torrent and peer info.
|
||||
* Batch downloads.
|
||||
|
||||
<p align="center">
|
||||
<img src='https://raw.githubusercontent.com/hayase-app/website/main/static/modal.webp' width='400px'></img>
|
||||
</p>
|
||||
|
||||
### ⚙️ Performance & Security
|
||||
|
||||
* Highly secure.
|
||||
* Operates on a Zero Trust model.
|
||||
* Protects data integrity and settings from external attacks.
|
||||
* Protects from attacks via malicious torrent extensions.
|
||||
* Uses up to date best security practices for native apps.
|
||||
* Insanely performant.
|
||||
* Fully hardware/GPU accelerated.
|
||||
* GPU based shaders, animations and paints.
|
||||
* Very low resource utilisation.
|
||||
* Only loads code as required by user navigation.
|
||||
* Unloads code not in use.
|
||||
* Doesn't render unnecessary UI updates.
|
||||
* Disables rendering when not visible.
|
||||
* Doesn't render any UI when immersed in fullscreen video.
|
||||
* Minimise to tray.
|
||||
* In-app changelog.
|
||||
* Custom themes.
|
||||
|
||||
<p align="center">
|
||||
<img src='https://raw.githubusercontent.com/hayase-app/website/main/static/simple.webp' width='400px'></img>
|
||||
</p>
|
||||
|
||||
## **Building and Development**
|
||||
|
||||
Requires `Node 20` or above and `pnpm`. VSCode is recommended.
|
||||
|
||||
```js
|
||||
pnpm i // to install
|
||||
pnpm run dev // to develop
|
||||
pnpm run build // to build
|
||||
pnpm run sync && pnpm run lint && pnpm run gql:check && pnpm run check // to test
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
<h2 align="center">
|
||||
<b>Enjoy streaming anime the way it should be! 🍿</b>
|
||||
</h2>
|
||||
|
|
|
|||
13
SECURITY.md
Normal file
13
SECURITY.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Security Policy
|
||||
|
||||
If you discover a security issue, please bring it to our attention right away!
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please **DO NOT** file a public issue to report a security vulberability, instead send your report privately to **casistaken@gmail.com**. This will help ensure that any vulnerabilities that are found can be [disclosed responsibly](https://en.wikipedia.org/wiki/Responsible_disclosure) to any affected parties.
|
||||
|
||||
## Supported Versions
|
||||
|
||||
Project versions that are currently being supported with security updates vary per project.
|
||||
Please see specific project repositories for details.
|
||||
If nothing is specified, only the latest major versions are supported.
|
||||
31
SUPPORT.md
Normal file
31
SUPPORT.md
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# Support and Help
|
||||
|
||||
Need help getting started or using a project? Here's how.
|
||||
|
||||
## How to get help
|
||||
|
||||
Generally, we do not use GitHub as a support forum. For any usage questions that are not specific to the project itself, please ask on [Stack Overflow](https://stackoverflow.com) instead. By doing so, you are more likely to quickly solve your problem, and you will allow anyone else with the same question to find the answer. This also allows maintainers to focus on improving the project for others.
|
||||
|
||||
Please seek support in the following ways:
|
||||
|
||||
1. :book: **Read the documentation and other guides** for the project to see if you can figure it out on your own. These should be located in a root `docs/` directory. If there is an example project, explore that to learn how it works to see if you can answer your question.
|
||||
|
||||
2. :bulb: **Search for answers and ask questions on [Stack Overflow](https://stackoverflow.com).** This is the most appropriate place for debugging issues specific to your use of the project, or figuring out how to use the project in a specific way.
|
||||
|
||||
3. :memo: As a **last resort**, you may open an issue on GitHub to ask for help. However, please clearly explain what you are trying to do, and list what you have already attempted to solve the problem. Provide code samples, but **do not** attach your entire project for someone else to debug. Review our [contributing guidelines](./CONTRIBUTING.md).
|
||||
|
||||
## What NOT to do
|
||||
|
||||
Please **do not** do any the following:
|
||||
|
||||
1. :x: Do not reach out to the author or contributor on Twitter (or other social media) by tweeting or sending a direct message.
|
||||
|
||||
2. :x: Do not email the author or contributor.
|
||||
|
||||
3. :x: Do not open duplicate issues or litter an existing issue with +1's.
|
||||
|
||||
These are not appropriate avenues for seeking help or support with an open-source project. Please follow the guidelines in the previous section. Public questions get public answers, which benefits everyone in the community. ✌️
|
||||
|
||||
## Customer Support
|
||||
|
||||
I do not provide any sort of "customer support" for open-source projects. However, I am available for hire.
|
||||
BIN
assets/Molot-webfont.woff
Normal file
BIN
assets/Molot-webfont.woff
Normal file
Binary file not shown.
5
assets/logo.svg
Normal file
5
assets/logo.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="430" height="430" viewBox="0 0 113.50625 113.50625" fill="currentColor">
|
||||
<path d="M89.693749 72.830671v-19.84375l-18.520833-10.31875-14.552084-8.202083-33.072916 18.520833v19.84375l33.072916-18.520833ZM23.547916 47.695254l23.547916-13.229167L23.547916 21.23692Z" />
|
||||
<path d="m23.547916 77.990044 33.072916 18.52084 33.072917-18.52084-18.520833-10.318746-14.552084 8.202083-14.552083-8.202083S23.547916 78.122337 23.547916 77.990044z" />
|
||||
<path d="m56.620832 59.601503 10.054167 5.55625v.000001l-10.054167 5.55625-10.054166-5.55625v-.000001z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 617 B |
5
assets/logo_cropped.svg
Normal file
5
assets/logo_cropped.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="250" height="284.50003" viewBox="0 0 66.145833 75.273966" fill="currentColor">
|
||||
<path d="M66.145833 51.593751v-19.84375c-11.042319-6.141466-22.077514-12.295645-33.072917-18.520833C22.048611 19.402779 11.024305 25.57639 0 31.750001v19.84375c11.024305-6.173611 22.048611-12.347222 33.072916-18.520833 11.024306 6.173611 22.048611 12.347222 33.072917 18.520833ZM0 26.458334c7.849305-4.409722 15.698611-8.819445 23.547916-13.229167C15.698611 8.819445 7.849305 4.409722 0 0v26.458334Z"/>
|
||||
<path d="M0 56.753124c11.024305 6.173613 22.048611 12.347227 33.072916 18.52084 11.024306-6.173613 22.048611-12.347227 33.072917-18.52084L47.625 46.434378c-4.850695 2.734028-9.701389 5.468055-14.552084 8.202083-4.850694-2.734028-9.701389-5.468055-14.552083-8.202083C12.352694 49.88272 6.229007 53.417285 0 56.753124Z"/>
|
||||
<path d="M33.072916 38.364583c3.351389 1.852084 6.70278 3.704166 10.054167 5.556251-3.35139 1.852082-6.702778 3.704167-10.054167 5.55625-3.351388-1.852084-6.702779-3.704166-10.054166-5.556251 3.35139-1.852082 6.702777-3.704167 10.054166-5.55625z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/twemoji.woff2
Normal file
BIN
assets/twemoji.woff2
Normal file
Binary file not shown.
|
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
const { notarize } = require('electron-notarize')
|
||||
const path = require('path')
|
||||
|
||||
exports.default = async function notarizing (context) {
|
||||
if (context.electronPlatformName !== 'darwin' || process.env.CSC_IDENTITY_AUTO_DISCOVERY === 'false') {
|
||||
console.log('Skipping notarization')
|
||||
return
|
||||
}
|
||||
console.log('Notarizing...')
|
||||
|
||||
const appBundleId = context.packager.appInfo.info._configuration.appId
|
||||
const appName = context.packager.appInfo.productFilename
|
||||
const appPath = path.normalize(path.join(context.appOutDir, `${appName}.app`))
|
||||
const appleId = process.env.APPLE_ID
|
||||
const appleIdPassword = process.env.APPLE_ID_PASSWORD
|
||||
if (!appleId) {
|
||||
console.warn('Not notarizing: Missing APPLE_ID environment variable')
|
||||
return
|
||||
}
|
||||
if (!appleIdPassword) {
|
||||
console.warn('Not notarizing: Missing APPLE_ID_PASSWORD environment variable')
|
||||
return
|
||||
}
|
||||
return notarize({
|
||||
appBundleId,
|
||||
appPath,
|
||||
appleId,
|
||||
appleIdPassword
|
||||
})
|
||||
}
|
||||
14
components.json
Normal file
14
components.json
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"$schema": "https://shadcn-svelte.com/schema.json",
|
||||
"style": "new-york",
|
||||
"tailwind": {
|
||||
"config": "tailwind.config.ts",
|
||||
"css": "src\\app.css",
|
||||
"baseColor": "zinc"
|
||||
},
|
||||
"aliases": {
|
||||
"components": "$lib/components",
|
||||
"utils": "$lib/utils"
|
||||
},
|
||||
"typescript": true
|
||||
}
|
||||
27
eslint.config.js
Normal file
27
eslint.config.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import config from 'eslint-config-standard-universal'
|
||||
import tseslint from 'typescript-eslint'
|
||||
|
||||
import svelteConfig from './svelte.config.js'
|
||||
|
||||
export default tseslint.config(
|
||||
...config(),
|
||||
{
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
svelteConfig
|
||||
}
|
||||
},
|
||||
ignores: ['build/', '.svelte-kit/', 'node_modules/'],
|
||||
rules: {
|
||||
'@typescript-eslint/prefer-nullish-coalescing': [
|
||||
'error',
|
||||
{
|
||||
ignoreConditionalTests: true,
|
||||
ignoreMixedLogicalExpressions: false,
|
||||
ignorePrimitives: true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
)
|
||||
16
generateALIntrospection.ts
Normal file
16
generateALIntrospection.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { writeFileSync } from 'node:fs'
|
||||
|
||||
import { getIntrospectedSchema, minifyIntrospectionQuery } from '@urql/introspection'
|
||||
import { getIntrospectionQuery, type IntrospectionQuery } from 'graphql'
|
||||
|
||||
const res = await fetch('https://graphql.anilist.co', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
variables: {},
|
||||
query: getIntrospectionQuery({ descriptions: false })
|
||||
})
|
||||
})
|
||||
const { data } = (await res.json()) as { data: IntrospectionQuery }
|
||||
const minified = minifyIntrospectionQuery(getIntrospectedSchema(data), { includeScalars: false, includeEnums: true, includeInputs: true, includeDirectives: true })
|
||||
writeFileSync('./src/lib/modules/anilist/schema.json', JSON.stringify(minified))
|
||||
167
package.json
167
package.json
|
|
@ -1,70 +1,101 @@
|
|||
{
|
||||
"name": "Miru",
|
||||
"version": "0.6.0",
|
||||
"author": "ThaUnknown_",
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
"start": "SET NODE_ENV=development & concurrently \"npm run web:watch\" \"npm run electron:start\"",
|
||||
"web:watch": "vite",
|
||||
"electron:start": "electron src",
|
||||
"build": "vite build && electron-builder",
|
||||
"publish": "vite build && electron-builder -p always"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.30",
|
||||
"builtin-modules": "^3.2.0",
|
||||
"concurrently": "^7.0.0",
|
||||
"electron": "^16.0.10",
|
||||
"electron-builder": "^22.14.13",
|
||||
"electron-notarize": "^1.1.1",
|
||||
"svelte": "^3.46.4",
|
||||
"vite": "^2.8.6",
|
||||
"vite-plugin-commonjs-externals": "^0.1.1"
|
||||
},
|
||||
"standard": {
|
||||
"ignore": [
|
||||
"bundle.js",
|
||||
"bundle.map.js"
|
||||
],
|
||||
"env": "browser"
|
||||
},
|
||||
"build": {
|
||||
"publish": [
|
||||
{
|
||||
"provider": "github",
|
||||
"owner": "ThaUnknown",
|
||||
"repo": "miru"
|
||||
}
|
||||
],
|
||||
"afterSign": "./build/notarize.js",
|
||||
"appId": "com.github.thaunknown.miru",
|
||||
"productName": "Miru",
|
||||
"files": [
|
||||
"src/**/*"
|
||||
],
|
||||
"mac": {
|
||||
"category": "public.app-category.video"
|
||||
},
|
||||
"win": {
|
||||
"target": "nsis",
|
||||
"icon": "src/renderer/public/logo.ico"
|
||||
},
|
||||
"linux": {
|
||||
"category": "Video",
|
||||
"target": "AppImage"
|
||||
},
|
||||
"nsis": {
|
||||
"oneClick": false,
|
||||
"installerIcon": "src/renderer/public/logo.ico",
|
||||
"installerHeaderIcon": "src/renderer/public/logo.ico"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@electron/remote": "^2.0.7",
|
||||
"anitomyscript": "^2.0.4",
|
||||
"electron-log": "^4.4.6",
|
||||
"electron-updater": "^4.6.5",
|
||||
"matroska-subtitles": "^3.3.2",
|
||||
"webtorrent": "^1.5.0"
|
||||
}
|
||||
"name": "ui",
|
||||
"version": "6.4.159",
|
||||
"license": "BUSL-1.1",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@9.15.5",
|
||||
"scripts": {
|
||||
"dev": "vite dev --open",
|
||||
"build": "vite build && scopy ./build/index.html ./build/offline.html",
|
||||
"preview": "vite preview",
|
||||
"sync": "svelte-kit sync",
|
||||
"check": "svelte-check --threshold error --tsconfig ./tsconfig.web.json",
|
||||
"check:watch": "svelte-check -threshold error --tsconfig ./tsconfig.web.json --watch",
|
||||
"test": "pnpm run sync && pnpm run lint && pnpm run gql:check && pnpm run check",
|
||||
"lint": "eslint --quiet -c eslint.config.js",
|
||||
"lint:fix": "eslint --quiet -c eslint.config.js --fix",
|
||||
"gql:turbo": "node ./node_modules/gql.tada/bin/cli.js turbo -c ./tsconfig.web.json",
|
||||
"gql:check": "node ./node_modules/gql.tada/bin/cli.js check -c ./tsconfig.web.json",
|
||||
"gql:generate": "node --experimental-strip-types ./generateALIntrospection.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gql.tada/svelte-support": "^1.0.1",
|
||||
"@sveltejs/adapter-static": "^3.0.9",
|
||||
"@sveltejs/kit": "^2.37.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^3.1.2",
|
||||
"@types/debug": "^4.1.12",
|
||||
"@types/semver": "^7.7.0",
|
||||
"@urql/introspection": "^1.2.1",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"bits-ui": "^0.22.0",
|
||||
"cmdk-sv": "^0.0.19",
|
||||
"eslint-config-standard-universal": "^1.0.9",
|
||||
"gql.tada": "^1.8.13",
|
||||
"hayase-extensions": "github:hayase-app/extensions",
|
||||
"jassub": "^1.8.6",
|
||||
"jiti": "^2.5.1",
|
||||
"ms": "^2.1.3",
|
||||
"native": "github:hayase-app/native",
|
||||
"rollup-plugin-license": "^3.6.0",
|
||||
"simple-copy": "^2.2.1",
|
||||
"svelte": "^4.2.19",
|
||||
"svelte-check": "^4.3.1",
|
||||
"svelte-radix": "^1.1.1",
|
||||
"svelte-sonner": "^0.3.28",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"typescript": "^5.9.2",
|
||||
"vaul-svelte": "^0.3.2",
|
||||
"vite": "^5.4.11",
|
||||
"vite-plugin-devtools-json": "^1.0.0",
|
||||
"vite-plugin-static-copy": "^3.1.2"
|
||||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@cloudflare/speedtest": "^1.6.0",
|
||||
"@dagrejs/dagre": "^1.1.5",
|
||||
"@fontsource-variable/nunito": "^5.2.6",
|
||||
"@fontsource/geist-mono": "^5.2.6",
|
||||
"@prgm/sveltekit-progress-bar": "2.0.0",
|
||||
"@thaunknown/web-irc": "^1.0.3",
|
||||
"@urql/core": "^6.0.1",
|
||||
"@urql/exchange-auth": "^3.0.0",
|
||||
"@urql/exchange-graphcache": "^8.1.0",
|
||||
"@urql/exchange-refocus": "^2.0.0",
|
||||
"@urql/exchange-request-policy": "^2.0.0",
|
||||
"@urql/exchange-retry": "^2.0.0",
|
||||
"@urql/svelte": "^5.0.0",
|
||||
"@xyflow/svelte": "^0.1.36",
|
||||
"abslink": "^1.1.2",
|
||||
"anitomyscript": "github:thaunknown/anitomyscript",
|
||||
"bittorrent-tracker": "10.0.12",
|
||||
"bottleneck": "^2.19.5",
|
||||
"clsx": "^2.1.1",
|
||||
"cobe": "0.6.3",
|
||||
"date-fns": "^4.1.0",
|
||||
"debug": "^4.4.1",
|
||||
"doc999tor-fast-geoip": "^1.1.360",
|
||||
"dompurify": "^3.2.6",
|
||||
"events": "^3.3.0",
|
||||
"idb-keyval": "^6.2.2",
|
||||
"js-levenshtein": "^1.1.6",
|
||||
"lucide-svelte": "^0.542.0",
|
||||
"marked": "^16.2.1",
|
||||
"overtype": "^1.2.3",
|
||||
"p2pt": "github:ThaUnknown/p2pt#modernise",
|
||||
"semver": "^7.7.2",
|
||||
"simple-store-svelte": "^1.0.6",
|
||||
"svelte-headless-table": "^0.18.3",
|
||||
"svelte-keybinds": "^1.0.9",
|
||||
"svelte-persisted-store": "^0.12.0",
|
||||
"tailwind-merge": "^3.3.1",
|
||||
"tailwind-variants": "^1.0.0",
|
||||
"uint8-util": "^2.2.5",
|
||||
"urql": "^5.0.1",
|
||||
"video-deband": "^1.0.9",
|
||||
"wonka": "^6.3.5",
|
||||
"workbox-core": "^7.3.0",
|
||||
"workbox-precaching": "^7.3.0",
|
||||
"workbox-routing": "^7.3.0",
|
||||
"workbox-strategies": "^7.3.0"
|
||||
}
|
||||
}
|
||||
5835
pnpm-lock.yaml
Normal file
5835
pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load diff
6
postcss.config.js
Normal file
6
postcss.config.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
export default {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {}
|
||||
}
|
||||
}
|
||||
496
src/app.css
Normal file
496
src/app.css
Normal file
|
|
@ -0,0 +1,496 @@
|
|||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
:root {
|
||||
color-scheme: only dark;
|
||||
}
|
||||
|
||||
@layer base {
|
||||
|
||||
/* miniplayer thing, required to work with :hover */
|
||||
.paused-show {
|
||||
--padding-right: unset !important;
|
||||
--padding-left: unset !important;
|
||||
}
|
||||
|
||||
.custom-draggable {
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
|
||||
.custom-not-draggable {
|
||||
-webkit-app-region: no-drag;
|
||||
}
|
||||
|
||||
.font-mono {
|
||||
font-family: "Geist Mono", ui-monospace, SFMono-Regular, Roboto Mono, Menlo, Monaco, Liberation Mono, DejaVu Sans Mono, Courier New, monospace !important;
|
||||
}
|
||||
|
||||
.exclude-transition {
|
||||
view-transition-class: disabled;
|
||||
}
|
||||
|
||||
::view-transition-group(.disabled) {
|
||||
animation-duration: 0s !important;
|
||||
}
|
||||
|
||||
@supports not (overflow: clip) {
|
||||
.overflow-clip {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.overflow-x-clip {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.overflow-y-clip {
|
||||
overflow-y: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.text-contrast {
|
||||
--accessible-color: calc(((((var(--red) * 299) + (var(--green) * 587) + (var(--blue) * 114)) / 1000) - 128) * -1000);
|
||||
|
||||
color: rgb(var(--accessible-color),
|
||||
var(--accessible-color),
|
||||
var(--accessible-color));
|
||||
fill: rgb(var(--accessible-color),
|
||||
var(--accessible-color),
|
||||
var(--accessible-color));
|
||||
}
|
||||
|
||||
:root {
|
||||
--background: 0 0% 100%;
|
||||
--foreground: 240 10% 3.9%;
|
||||
|
||||
--muted: 240 4.8% 95.9%;
|
||||
--muted-foreground: 240 3.8% 46.1%;
|
||||
|
||||
--popover: 0 0% 100%;
|
||||
--popover-foreground: 240 10% 3.9%;
|
||||
|
||||
--card: 0 0% 100%;
|
||||
--card-foreground: 240 10% 3.9%;
|
||||
|
||||
--border: 240 5.9% 90%;
|
||||
--input: 240 5.9% 90%;
|
||||
|
||||
--primary: 240 5.9% 10%;
|
||||
--primary-foreground: 0 0% 98%;
|
||||
|
||||
--secondary: 240 4.8% 95.9%;
|
||||
--secondary-foreground: 240 5.9% 10%;
|
||||
|
||||
--accent: 240 4.8% 95.9%;
|
||||
--accent-foreground: 240 5.9% 10%;
|
||||
|
||||
--destructive: 0 72.2% 50.6%;
|
||||
--destructive-foreground: 0 0% 98%;
|
||||
|
||||
--ring: 240 10% 3.9%;
|
||||
|
||||
--radius: 0.5rem;
|
||||
|
||||
--custom: #fff;
|
||||
}
|
||||
|
||||
html.dark {
|
||||
--background: 240 10% 3.9%;
|
||||
--foreground: 0 0% 98%;
|
||||
|
||||
--muted: 240 3.7% 15.9%;
|
||||
--muted-foreground: 240 5% 64.9%;
|
||||
|
||||
--popover: 240 10% 3.9%;
|
||||
--popover-foreground: 0 0% 98%;
|
||||
|
||||
--card: 240 10% 3.9%;
|
||||
--card-foreground: 0 0% 98%;
|
||||
|
||||
--border: 240 3.7% 15.9%;
|
||||
--input: 240 3.7% 15.9%;
|
||||
|
||||
--primary: 0 0% 98%;
|
||||
--primary-foreground: 240 5.9% 10%;
|
||||
|
||||
--secondary: 240 3.7% 15.9%;
|
||||
--secondary-foreground: 0 0% 98%;
|
||||
|
||||
--accent: 240 3.7% 15.9%;
|
||||
--accent-foreground: 0 0% 98%;
|
||||
|
||||
--destructive: 0 62.8% 30.6%;
|
||||
--destructive-foreground: 0 0% 98%;
|
||||
|
||||
--ring: 240 4.9% 83.9%;
|
||||
|
||||
--custom: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
@layer base {
|
||||
* {
|
||||
@apply border-border;
|
||||
}
|
||||
|
||||
body {
|
||||
@apply bg-background text-foreground;
|
||||
}
|
||||
}
|
||||
|
||||
/* @font-face {
|
||||
font-family: 'molotregular';
|
||||
src: url('/Molot-webfont-subset.woff') format('woff');
|
||||
} */
|
||||
|
||||
@font-face {
|
||||
font-family: "Twemoji";
|
||||
src: url("/twemoji-subset.woff2") format("woff2");
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
height: 100vh !important;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
scroll-behavior: smooth;
|
||||
overscroll-behavior: none;
|
||||
user-select: none;
|
||||
font-family: 'Nunito Variable'
|
||||
}
|
||||
|
||||
img,
|
||||
a {
|
||||
-webkit-user-drag: none;
|
||||
}
|
||||
|
||||
#episodeListTarget:fullscreen {
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@keyframes load-in {
|
||||
from {
|
||||
transform: translate3d(0, 1.2rem, 0) scale(0.95);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: none
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes hearbeat {
|
||||
from {
|
||||
transform: translate3d(var(--tw-translate-x), var(--tw-translate-y), 0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(1) scaleY(1);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translate3d(var(--tw-translate-x), var(--tw-translate-y), 0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(0.85) scaleY(0.85);
|
||||
}
|
||||
}
|
||||
|
||||
.custom-bg {
|
||||
/* this is very hacky, but removes jagged edges */
|
||||
background: repeating-linear-gradient(40deg, #1114 0, #5554 1px, #5554 5px, #1114 6px, #1114 10px);
|
||||
/* repeating-linear-gradient(40deg, #5554 0 5px, #1114 0 10px); */
|
||||
}
|
||||
|
||||
*:focus-visible {
|
||||
outline: none;
|
||||
border-image: fill 0 linear-gradient(#8885, #8885);
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.details span+span::before {
|
||||
content: '•';
|
||||
padding: 0 .3rem;
|
||||
font-size: .4rem;
|
||||
align-self: center;
|
||||
white-space: normal;
|
||||
color: #737373 !important;
|
||||
}
|
||||
|
||||
a[href],
|
||||
button,
|
||||
fieldset,
|
||||
input,
|
||||
optgroup,
|
||||
option,
|
||||
select,
|
||||
textarea,
|
||||
details,
|
||||
[tabindex],
|
||||
[contenteditable] {
|
||||
&:active:not([disabled], [type='range'], .no-scale, [tabindex="-1"]) {
|
||||
transition: all 0.1s ease-in-out;
|
||||
transform: scale(0.98);
|
||||
}
|
||||
}
|
||||
|
||||
.scale-parent:has(.no-scale:active) {
|
||||
transition: all 0.1s ease-in-out;
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.overflow-y-scroll,
|
||||
.overflow-y-auto,
|
||||
.overflow-x-scroll,
|
||||
.overflow-x-auto,
|
||||
.overflow-auto,
|
||||
.overflow-scroll {
|
||||
will-change: scroll-position;
|
||||
}
|
||||
|
||||
.bg-url {
|
||||
background-image: var(--bg);
|
||||
}
|
||||
|
||||
|
||||
.sr-only {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.flex-center {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.text-contrast-filter {
|
||||
filter: invert(1) grayscale(1) brightness(1.2) contrast(9000);
|
||||
mix-blend-mode: luminosity;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
background-color: inherit;
|
||||
background-clip: text;
|
||||
color: transparent
|
||||
}
|
||||
|
||||
.svelte-keybinds {
|
||||
background: black !important;
|
||||
}
|
||||
|
||||
.svelte-progress-bar {
|
||||
height: 2px !important;
|
||||
}
|
||||
|
||||
.svelte-progress-bar-leader {
|
||||
height: 4px !important;
|
||||
}
|
||||
|
||||
/* animated SVG icons */
|
||||
.animated-icon:not(:hover):not(:focus-visible):not(:active) .target-animated-icon {
|
||||
animation: none !important;
|
||||
transform: translateX(0) translateX(0) translateZ(0) translate(0, 0) !important;
|
||||
}
|
||||
|
||||
/* Backplate related things */
|
||||
|
||||
body {
|
||||
perspective: 3000px;
|
||||
}
|
||||
|
||||
#root:has(+ .backplate-spin) {
|
||||
animation: idle-spin 120s linear infinite;
|
||||
}
|
||||
|
||||
.backplate-spin {
|
||||
animation: idle-spin-y-flip 120s linear infinite;
|
||||
}
|
||||
|
||||
|
||||
#root:has(+ .backplate-fly) {
|
||||
animation: idle-fly 0.8s forwards cubic-bezier(0.22, 1, 0.36, 1);
|
||||
}
|
||||
|
||||
#root {
|
||||
transition: transform 0.5s;
|
||||
transform: perspective(100vw) translate3d(0, 0, 0vw) rotateY(0deg) rotateX(0deg);
|
||||
}
|
||||
|
||||
::view-transition-old(my-root),
|
||||
::view-transition-new(my-root) {
|
||||
animation-duration: 200ms;
|
||||
animation-timing-function: ease-in-out;
|
||||
}
|
||||
|
||||
::view-transition-old(my-root) {
|
||||
animation-name: fade-out;
|
||||
}
|
||||
|
||||
::view-transition-new(my-root) {
|
||||
animation-name: fade-in;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion) {
|
||||
|
||||
::view-transition-group(*),
|
||||
::view-transition-old(*),
|
||||
::view-transition-new(*) {
|
||||
animation: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* @media (max-width: 768px) {
|
||||
|
||||
::view-transition-old(*),
|
||||
::view-transition-new(*) {
|
||||
animation-duration: 600ms !important;
|
||||
animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1) !important;
|
||||
}
|
||||
|
||||
::view-transition-old(*) {
|
||||
animation-name: slide-out-left !important;
|
||||
}
|
||||
|
||||
::view-transition-new(*) {
|
||||
animation-name: slide-in-right !important;
|
||||
}
|
||||
} */
|
||||
|
||||
/* @keyframes slide-in-right {
|
||||
from {
|
||||
transform: translateX(40%);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes slide-out-left {
|
||||
from {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translateX(-10%);
|
||||
}
|
||||
} */
|
||||
|
||||
@keyframes fade-out {
|
||||
from {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fade-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@keyframes idle-fly {
|
||||
0% {
|
||||
transform: perspective(100vw) translate3d(0, 0, 0vw) rotateY(0deg) rotateX(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: perspective(100vw) translate3d(0, 0, -66vw) rotateY(0deg) rotateX(-15deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes idle-spin {
|
||||
0% {
|
||||
transform: perspective(100vw) translate3d(0, 0, -66vw) rotateY(0deg) rotateX(-15deg);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: perspective(100vw) translate3d(0, 0, -66vw) rotateY(180deg) rotateX(15deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: perspective(100vw) translate3d(0, 0, -66vw) rotateY(360deg) rotateX(-15deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes idle-spin-y-flip {
|
||||
0% {
|
||||
transform: perspective(100vw) translate3d(0, 0, -66vw) rotateY(-180deg) rotateX(15deg);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: perspective(100vw) translate3d(0, 0, -66vw) rotateY(0deg) rotateX(-15deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: perspective(100vw) translate3d(0, 0, -66vw) rotateY(180deg) rotateX(15deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes marquee {
|
||||
from {
|
||||
transform: translateX(-30%);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translateX(-130%);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes bg-grid-animate {
|
||||
from {
|
||||
background-position: 0 100%;
|
||||
}
|
||||
|
||||
to {
|
||||
background-position: 100% 0;
|
||||
}
|
||||
}
|
||||
|
||||
.animate-marquee {
|
||||
animation: marquee 80s infinite linear;
|
||||
}
|
||||
|
||||
.bg-striped {
|
||||
background: repeating-linear-gradient(45deg,
|
||||
#202020,
|
||||
#202020 6px,
|
||||
#2a2a2a 6px,
|
||||
#2a2a2a 12px);
|
||||
background-attachment: fixed;
|
||||
background-size: 119px;
|
||||
}
|
||||
|
||||
.bg-striped-muted {
|
||||
background: repeating-linear-gradient(45deg,
|
||||
#1e1e1e,
|
||||
#1e1e1e 6px,
|
||||
#161616 6px,
|
||||
#161616 12px);
|
||||
background-attachment: fixed;
|
||||
background-size: 119px;
|
||||
}
|
||||
|
||||
/* .font-molot {
|
||||
font-family: 'molotregular';
|
||||
} */
|
||||
|
||||
.font-twemoji {
|
||||
font-family: 'Twemoji';
|
||||
}
|
||||
|
||||
.backface-visible {
|
||||
backface-visibility: visible;
|
||||
}
|
||||
|
||||
.backface-hidden {
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
|
||||
.preserve-3d {
|
||||
transform-style: preserve-3d;
|
||||
}
|
||||
55
src/app.d.ts
vendored
Normal file
55
src/app.d.ts
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
// See https://kit.svelte.dev/docs/types#app
|
||||
import type { Search } from '$lib/modules/anilist/queries'
|
||||
import type { VariablesOf } from 'gql.tada'
|
||||
import type { CompositionEventHandler } from 'svelte/elements'
|
||||
|
||||
export interface Track {
|
||||
selected: boolean
|
||||
enabled: boolean
|
||||
id: string
|
||||
kind: string
|
||||
label: string
|
||||
language: string
|
||||
}
|
||||
|
||||
declare global {
|
||||
|
||||
namespace App {
|
||||
// interface Error {}
|
||||
// interface Locals {}
|
||||
// interface PageData {}
|
||||
|
||||
interface PageState {
|
||||
search?: VariablesOf<typeof Search>
|
||||
image?: File | string
|
||||
}
|
||||
// interface Platform {}
|
||||
}
|
||||
|
||||
interface HTMLMediaElement {
|
||||
videoTracks?: Track[]
|
||||
audioTracks?: Track[]
|
||||
}
|
||||
|
||||
interface ScreenOrientation {
|
||||
lock: (orientation: 'any' | 'natural' | 'landscape' | 'portrait' | 'portrait-primary' | 'portrait-secondary' | 'landscape-primary' | 'landscape-secondary') => Promise<void>
|
||||
}
|
||||
|
||||
interface Navigator {
|
||||
userAgentData?: {
|
||||
getHighEntropyValues?: (keys: string[]) => Promise<Record<string, string>>
|
||||
}
|
||||
}
|
||||
|
||||
declare namespace svelteHTML {
|
||||
interface HTMLAttributes<T> {
|
||||
'on:navigate'?: CompositionEventHandler<T>
|
||||
}
|
||||
}
|
||||
|
||||
// declare module '*.svelte' {
|
||||
// export default SvelteComponentTyped
|
||||
// }
|
||||
}
|
||||
|
||||
export {}
|
||||
17
src/app.html
Normal file
17
src/app.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<!doctype html>
|
||||
<html lang="en" class="dark bg-black" style="color-scheme: dark;">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Hayase</title>
|
||||
<link rel="preconnect" href="https://graphql.anilist.co/">
|
||||
<link rel="preconnect" href="https://www.youtube-nocookie.com">
|
||||
<link rel="icon" href="%sveltekit.assets%/logo_white_fit.svg" />
|
||||
%sveltekit.head%
|
||||
</head>
|
||||
|
||||
<body data-sveltekit-preload-data="off" class="!bg-black !relative" data-vaul-drawer-wrapper>
|
||||
%sveltekit.body%
|
||||
</body>
|
||||
|
||||
</html>
|
||||
128
src/index.js
128
src/index.js
|
|
@ -1,128 +0,0 @@
|
|||
const { app, BrowserWindow, protocol } = require('electron')
|
||||
const path = require('path')
|
||||
const remote = require('@electron/remote/main')
|
||||
const log = require('electron-log')
|
||||
const { autoUpdater } = require('electron-updater')
|
||||
|
||||
autoUpdater.logger = log
|
||||
autoUpdater.logger.transports.file.level = 'info'
|
||||
|
||||
remote.initialize()
|
||||
|
||||
// Keep a global reference of the window object, if you don't, the window will
|
||||
// be closed automatically when the JavaScript object is garbage collected.
|
||||
let mainWindow
|
||||
|
||||
function UpsertKeyValue (obj, keyToChange, value) {
|
||||
const keyToChangeLower = keyToChange.toLowerCase()
|
||||
for (const key of Object.keys(obj)) {
|
||||
if (key.toLowerCase() === keyToChangeLower) {
|
||||
// Reassign old key
|
||||
obj[key] = value
|
||||
// Done
|
||||
return
|
||||
}
|
||||
}
|
||||
// Insert at end instead
|
||||
obj[keyToChange] = value
|
||||
}
|
||||
|
||||
function createWindow () {
|
||||
autoUpdater.checkForUpdatesAndNotify()
|
||||
|
||||
// Create the browser window.
|
||||
mainWindow = new BrowserWindow({
|
||||
width: 1600,
|
||||
height: 900,
|
||||
frame: false,
|
||||
backgroundColor: '#191c20',
|
||||
autoHideMenuBar: true,
|
||||
experimentalFeatures: true,
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
contextIsolation: false,
|
||||
enableBlinkFeatures: 'AudioVideoTracks',
|
||||
enableRemoteModule: true,
|
||||
backgroundThrottling: false
|
||||
},
|
||||
icon: path.join(__dirname, '/renderer/public/logo.ico'),
|
||||
show: false
|
||||
})
|
||||
mainWindow.setMenuBarVisibility(false)
|
||||
remote.enable(mainWindow.webContents)
|
||||
|
||||
protocol.registerHttpProtocol('miru', (req, cb) => {
|
||||
const token = req.url.slice(7)
|
||||
if (process.env.NODE_ENV !== 'development ') {
|
||||
mainWindow.loadURL(path.join(__dirname, '/renderer/dist/index.html' + token))
|
||||
} else {
|
||||
mainWindow.loadURL('http://localhost:3000/' + token)
|
||||
}
|
||||
})
|
||||
|
||||
// mainWindow.removeMenu()
|
||||
mainWindow.webContents.session.webRequest.onBeforeSendHeaders(
|
||||
(details, callback) => {
|
||||
const { requestHeaders } = details
|
||||
UpsertKeyValue(requestHeaders, 'Access-Control-Allow-Origin', ['*'])
|
||||
callback({ requestHeaders })
|
||||
}
|
||||
)
|
||||
|
||||
mainWindow.webContents.session.webRequest.onHeadersReceived((details, callback) => {
|
||||
const { responseHeaders } = details
|
||||
UpsertKeyValue(responseHeaders, 'Access-Control-Allow-Origin', ['*'])
|
||||
UpsertKeyValue(responseHeaders, 'Access-Control-Allow-Headers', ['*'])
|
||||
callback({ responseHeaders })
|
||||
})
|
||||
|
||||
// This block of code is intended for development purpose only.
|
||||
// Delete this entire block of code when you are ready to package the application.
|
||||
if (process.env.NODE_ENV !== 'development ') {
|
||||
// Load production build
|
||||
mainWindow.loadFile(path.join(__dirname, '/renderer/dist/index.html'))
|
||||
} else {
|
||||
// Load vite dev server page
|
||||
console.log('Development mode')
|
||||
mainWindow.loadURL('http://localhost:3000/')
|
||||
mainWindow.webContents.openDevTools()
|
||||
}
|
||||
|
||||
// Uncomment the following line of code when app is ready to be packaged.
|
||||
// loadURL(mainWindow);
|
||||
|
||||
// Open the DevTools and also disable Electron Security Warning.
|
||||
process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = true
|
||||
|
||||
// Emitted when the window is closed.
|
||||
mainWindow.on('closed', function () {
|
||||
// Dereference the window object, usually you would store windows
|
||||
// in an array if your app supports multi windows, this is the time
|
||||
// when you should delete the corresponding element.
|
||||
mainWindow = null
|
||||
})
|
||||
|
||||
// Emitted when the window is ready to be shown
|
||||
// This helps in showing the window gracefully.
|
||||
mainWindow.once('ready-to-show', () => {
|
||||
mainWindow.show()
|
||||
})
|
||||
}
|
||||
|
||||
// This method will be called when Electron has finished
|
||||
// initialization and is ready to create browser windows.
|
||||
// Some APIs can only be used after this event occurs.
|
||||
app.on('ready', createWindow)
|
||||
|
||||
// Quit when all windows are closed.
|
||||
app.on('window-all-closed', function () {
|
||||
// On macOS it is common for applications and their menu bar
|
||||
// to stay active until the user quits explicitly with Cmd + Q
|
||||
if (process.platform !== 'darwin') app.quit()
|
||||
})
|
||||
|
||||
app.on('activate', function () {
|
||||
// On macOS it's common to re-create a window in the app when the
|
||||
// dock icon is clicked and there are no other windows open.
|
||||
if (mainWindow === null) createWindow()
|
||||
})
|
||||
92
src/lib/components/Backplate.svelte
Normal file
92
src/lib/components/Backplate.svelte
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
<script lang='ts'>
|
||||
import { activityState, idleState, isPlaying, lockedState } from '$lib/modules/idle'
|
||||
import { settings } from '$lib/modules/settings'
|
||||
import { sleep } from '$lib/utils'
|
||||
|
||||
let plate: HTMLDivElement
|
||||
export let root: HTMLDivElement
|
||||
|
||||
let visibilityState: DocumentVisibilityState
|
||||
|
||||
let isAnimating = false
|
||||
let isSpinning = false
|
||||
let isFlying = false
|
||||
let showBackplate = false
|
||||
let timeout: number
|
||||
|
||||
// WE LOVE RACE CONDITIONS WOOOO YEAAH MY SANITY
|
||||
|
||||
async function start () {
|
||||
if (isAnimating) return
|
||||
isAnimating = true
|
||||
isFlying = true
|
||||
await sleep(800)
|
||||
if (!isFlying) return
|
||||
showBackplate = true
|
||||
isSpinning = true
|
||||
isFlying = false
|
||||
}
|
||||
|
||||
async function reset () {
|
||||
if (!isAnimating) return
|
||||
root.style.transform = getComputedStyle(root).transform
|
||||
plate.style.transform = getComputedStyle(plate).transform
|
||||
isSpinning = isFlying = false
|
||||
await sleep(10)
|
||||
root.style.transform = plate.style.transform = ''
|
||||
await sleep(490)
|
||||
isAnimating = showBackplate = isSpinning = isFlying = false
|
||||
}
|
||||
|
||||
$: active = $lockedState === 'locked' || visibilityState === 'hidden' || ($idleState === 'active' && $activityState === 'active') || $isPlaying
|
||||
|
||||
function checkIdleState (active: boolean, idleAnimation: boolean) {
|
||||
clearTimeout(timeout)
|
||||
if (!idleAnimation || active) return reset()
|
||||
|
||||
timeout = setTimeout(start, 120_000)
|
||||
}
|
||||
|
||||
$: checkIdleState(active, $settings.idleAnimation)
|
||||
|
||||
// MOLOT font was commented out in app.css since this feature was shelved
|
||||
</script>
|
||||
|
||||
<svelte:document bind:visibilityState />
|
||||
|
||||
<div class='preserve-3d absolute w-full h-full overflow-clip flip backface-hidden backplate bg-black flex-col justify-center pointer-events-none hidden'
|
||||
bind:this={plate}
|
||||
class:!flex={showBackplate}
|
||||
class:backplate-fly={isFlying}
|
||||
class:backplate-spin={isSpinning}>
|
||||
{#each Array.from({ length: 6 }) as _, i (i)}
|
||||
<div class='flex flex-row w-full font-molot font-bold leading-[0.8] ml-[--ml-offset] -rotate-12 text-white mt-64' style:--ml-offset='calc((-1 * {(i) * 600}px) - 10vw)'>
|
||||
{#each Array.from({ length: 4 }) as _, i (i)}
|
||||
<div>
|
||||
<div class='bg-striped'>
|
||||
<div class='text-[24rem] tracking-wide animate-marquee bg-black mix-blend-multiply'>
|
||||
HAYASE.06
|
||||
</div>
|
||||
</div>
|
||||
<div class='bg-striped-muted'>
|
||||
<div class='flex pl-1 animate-marquee bg-black mix-blend-multiply'>
|
||||
<div class='rounded py-2 px-3 mt-1 mb-[2.5px] mr-2 ml-1 text-black bg-white flex items-center leading-[0.9]'>
|
||||
TORRENTING<br />MADE<br />SIMPLE
|
||||
</div>
|
||||
<div class='text-[5.44rem] bg-striped-muted tracking-wider'>
|
||||
MAGNET://SIMPLICITY TOPS EVERYTHING
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.backplate {
|
||||
transition: transform 0.5s;
|
||||
transform: perspective(100vw) translate3d(0, 0, 0vw) rotateY(180deg) rotateX(0deg);
|
||||
}
|
||||
</style>
|
||||
111
src/lib/components/EntryEditor.svelte
Normal file
111
src/lib/components/EntryEditor.svelte
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
<script lang='ts'>
|
||||
import { PencilLine } from './icons/animated'
|
||||
|
||||
import { Button } from '$lib/components/ui/button'
|
||||
import * as Dialog from '$lib/components/ui/dialog'
|
||||
import { Input } from '$lib/components/ui/input'
|
||||
import * as Select from '$lib/components/ui/select'
|
||||
import { banner, cover, title, type Media } from '$lib/modules/anilist'
|
||||
import { list, progress as _progress, score as _score, repeat as _repeat, authAggregator, lists } from '$lib/modules/auth'
|
||||
import { dragScroll } from '$lib/modules/navigate'
|
||||
import { breakpoints } from '$lib/utils'
|
||||
|
||||
export let media: Media
|
||||
|
||||
const STATUS_LABELS = {
|
||||
CURRENT: 'Watching',
|
||||
PLANNING: 'Plan to Watch',
|
||||
COMPLETED: 'Completed',
|
||||
PAUSED: 'Paused',
|
||||
DROPPED: 'Dropped',
|
||||
REPEATING: 'Re-Watching'
|
||||
}
|
||||
|
||||
let status = { value: list(media) ?? 'CURRENT', label: STATUS_LABELS[list(media) ?? 'CURRENT'] }
|
||||
let score = { value: Number(_score(media) ?? 0), label: '' + (_score(media) ?? 0) }
|
||||
|
||||
let progress = _progress(media) ?? 0
|
||||
let repeat = _repeat(media) ?? 0
|
||||
|
||||
function deleteEntry () {
|
||||
authAggregator.delete(media)
|
||||
}
|
||||
|
||||
function saveEntry () {
|
||||
authAggregator.entry({ id: media.id, score: Number(score.value) * 10, repeat: Number(repeat), progress: Number(progress), status: status.value, lists: lists(media)?.filter(({ enabled }) => enabled).map(({ name }) => name) })
|
||||
}
|
||||
</script>
|
||||
|
||||
<Dialog.Root portal='#root'>
|
||||
<Dialog.Trigger let:builder asChild>
|
||||
<Button size='icon' class='rounded-l-none bg-custom-400 select:!bg-custom-700 shrink-0 text-contrast animated-icon' builders={[builder]}>
|
||||
<PencilLine class='size-4' />
|
||||
</Button>
|
||||
</Dialog.Trigger>
|
||||
<Dialog.Content class='flex justify-center max-h-[80%] max-w-3xl p-0'>
|
||||
<div class='flex flex-col sm:flex-row w-full overflow-y-auto' use:dragScroll>
|
||||
<div class='relative w-full h-[150px] sm:w-[260px] sm:h-[400px] shrink-0'>
|
||||
<img alt='images' loading='lazy' decoding='async' class='object-cover w-full h-full sm:rounded-l-lg overflow-clip' style:background={media.coverImage?.color ?? '#000'} src={$breakpoints.sm ? cover(media) : banner(media)} />
|
||||
</div>
|
||||
<form class='flex flex-col w-full rounded-r-lg h-full'>
|
||||
<div class='pt-4 px-5 w-full'>
|
||||
<h3 class='text-xl leading-6 font-semibold z-30 text-white sm:line-clamp-1 line-clamp-2'>{title(media)}</h3>
|
||||
</div>
|
||||
<div class='px-5 py-3 grid grid-cols-1 sm:grid-cols-2 gap-5 w-full'>
|
||||
<div class='mt-1 flex flex-col'>
|
||||
<div class='font-bold text-muted-foreground text-sm mb-2'>Status</div>
|
||||
<Select.Root bind:selected={status}>
|
||||
<Select.Trigger>
|
||||
<Select.Value placeholder='Status' />
|
||||
</Select.Trigger>
|
||||
<Select.Content sameWidth={true}>
|
||||
<Select.Item value='CURRENT'>Watching</Select.Item>
|
||||
<Select.Item value='PLANNING'>Plan to Watch</Select.Item>
|
||||
<Select.Item value='COMPLETED'>Completed</Select.Item>
|
||||
<Select.Item value='PAUSED'>Paused</Select.Item>
|
||||
<Select.Item value='DROPPED'>Dropped</Select.Item>
|
||||
<Select.Item value='REPEATING'>Re-Watching</Select.Item>
|
||||
</Select.Content>
|
||||
</Select.Root>
|
||||
</div>
|
||||
<div class='mt-1 flex flex-col'>
|
||||
<div class='font-bold text-muted-foreground text-sm mb-2'>Score</div>
|
||||
<Select.Root bind:selected={score}>
|
||||
<Select.Trigger>
|
||||
<Select.Value placeholder='Score' />
|
||||
</Select.Trigger>
|
||||
<Select.Content sameWidth={true}>
|
||||
<Select.Item value='0' />
|
||||
<Select.Item value='1' />
|
||||
<Select.Item value='2' />
|
||||
<Select.Item value='3' />
|
||||
<Select.Item value='4' />
|
||||
<Select.Item value='5' />
|
||||
<Select.Item value='6' />
|
||||
<Select.Item value='7' />
|
||||
<Select.Item value='8' />
|
||||
<Select.Item value='9' />
|
||||
<Select.Item value='10' />
|
||||
</Select.Content>
|
||||
</Select.Root>
|
||||
</div>
|
||||
<div class='mt-1 flex flex-col'>
|
||||
<div class='font-bold text-muted-foreground text-sm mb-2'>Progress</div>
|
||||
<Input type='number' inputmode='numeric' pattern='[0-9]*.?[0-9]*' min='0' max='Infinity' bind:value={progress} />
|
||||
</div>
|
||||
<div class='mt-1 flex flex-col'>
|
||||
<div class='font-bold text-muted-foreground text-sm mb-2'>Rewatched Times</div>
|
||||
<Input type='number' inputmode='numeric' pattern='[0-9]*.?[0-9]*' min='0' max='Infinity' bind:value={repeat} />
|
||||
</div>
|
||||
</div>
|
||||
<div class='px-4 py-3 gap-3 mt-auto flex flex-col sm:flex-row-reverse sm:px-6'>
|
||||
<Dialog.Close let:builder asChild>
|
||||
<Button on:click={saveEntry} builders={[builder]}>Save Changes</Button>
|
||||
<Button variant='secondary' builders={[builder]}>Cancel</Button>
|
||||
<Button variant='destructive' on:click={deleteEntry} builders={[builder]}>Delete</Button>
|
||||
</Dialog.Close>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</Dialog.Content>
|
||||
</Dialog.Root>
|
||||
140
src/lib/components/EpisodesList.svelte
Normal file
140
src/lib/components/EpisodesList.svelte
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
<script lang='ts'>
|
||||
import Play from 'lucide-svelte/icons/play'
|
||||
|
||||
import Pagination from './Pagination.svelte'
|
||||
import { ChevronLeft, ChevronRight } from './icons/animated'
|
||||
import { Button } from './ui/button'
|
||||
import { Load } from './ui/img'
|
||||
import { playEp } from './ui/player/mediahandler.svelte'
|
||||
import { Profile } from './ui/profile'
|
||||
|
||||
import type { EpisodesResponse } from '$lib/modules/anizip/types'
|
||||
|
||||
import { episodes as _episodes, notes, type Media } from '$lib/modules/anilist'
|
||||
import { authAggregator, list, progress } from '$lib/modules/auth'
|
||||
import { makeEpisodeList } from '$lib/modules/extensions'
|
||||
import { click, dragScroll } from '$lib/modules/navigate'
|
||||
import { liveAnimeProgress } from '$lib/modules/watchProgress'
|
||||
import { breakpoints, cn, since } from '$lib/utils'
|
||||
|
||||
export let eps: EpisodesResponse | null
|
||||
export let media: Media
|
||||
|
||||
$: episodeCount = _episodes(media) ?? eps?.episodeCount ?? 0
|
||||
|
||||
$: episodeList = media && makeEpisodeList(media, eps)
|
||||
|
||||
const perPage = 16
|
||||
|
||||
function getPage (page: number, list = episodeList) {
|
||||
return list.slice((page - 1) * perPage, page * perPage)
|
||||
}
|
||||
|
||||
$: completed = list(media) === 'COMPLETED'
|
||||
$: _progress = completed ? 0 : progress(media) ?? 0
|
||||
|
||||
$: currentPage = Math.floor((!completed ? _progress : 0) / perPage) + 1
|
||||
|
||||
function play (episode: number) {
|
||||
$playEp(media, episode)
|
||||
}
|
||||
|
||||
export let following = authAggregator.following(media.id)
|
||||
|
||||
$: followerEntries = $following?.data?.Page?.mediaList?.filter(e => e?.user?.id !== authAggregator.id()) ?? []
|
||||
|
||||
$: watchProgress = liveAnimeProgress(media.id)
|
||||
</script>
|
||||
|
||||
<Pagination count={episodeCount} {perPage} bind:currentPage let:pages let:hasNext let:hasPrev let:range let:setPage siblingCount={1}>
|
||||
<div class='overflow-y-auto pt-3 -ml-14 pl-14 -mr-3 pr-3 pointer-events-none -mb-3 pb-3' use:dragScroll>
|
||||
<div class='grid grid-cols-1 sm:grid-cols-[repeat(auto-fit,minmax(500px,1fr))] place-items-center gap-x-4 gap-y-7 justify-center align-middle pointer-events-auto'>
|
||||
{#each getPage(currentPage, episodeList) as { episode, image, title, summary, airingAt, airdate, filler, length } (episode)}
|
||||
{@const watched = _progress >= episode && !completed}
|
||||
{@const target = _progress + 1 === episode}
|
||||
<div class={!target ? 'px-3 w-full' : 'contents'}>
|
||||
<div use:click={() => play(episode)}
|
||||
class={cn(
|
||||
'select:scale-[1.05] select:shadow-lg scale-100 transition-[transform,box-shadow] duration-200 shrink-0 ease-out focus-visible:ring-ring focus-visible:ring-1 rounded-md bg-neutral-950 text-secondary-foreground select:bg-neutral-900 flex w-full max-h-28 cursor-pointer relative overflow-hidden group',
|
||||
target && 'ring-custom ring-1',
|
||||
filler && '!ring-yellow-400 ring-1'
|
||||
)}>
|
||||
{#if image}
|
||||
<div class='w-52 shrink-0 relative'>
|
||||
<Load src={image} class={cn('object-cover h-full w-full', watched && 'opacity-20')} />
|
||||
{#if length ?? media.duration}
|
||||
<div class='absolute bottom-1 left-1 bg-neutral-900/80 text-secondary-foreground text-[9.6px] px-1 py-0.5 rounded'>
|
||||
{length ?? media.duration}m
|
||||
</div>
|
||||
{/if}
|
||||
<div class='absolute flex items-center justify-center w-full h-full bg-black group-select:bg-opacity-50 bg-opacity-0 duration-200 text-white transition-[background] ease-out top-0'>
|
||||
<Play class='size-6 scale-75 opacity-0 group-select:opacity-100 group-select:scale-100 duration-200 transition-[transform,opacity] ease-out' fill='currentColor' />
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class='flex-grow py-3 px-4 flex flex-col'>
|
||||
<div class='font-bold mb-2 line-clamp-1 shrink-0 text-[12.8px]'>
|
||||
{episode}. {title?.en ?? 'Episode ' + episode}
|
||||
</div>
|
||||
{#if watched || completed}
|
||||
<div class='mb-2 h-0.5 overflow-hidden w-full bg-custom shrink-0' />
|
||||
{:else if $watchProgress?.episode === episode}
|
||||
<div class='w-full bg-neutral-800 mb-2'>
|
||||
<div class='h-0.5 overflow-hidden bg-custom shrink-0' style:width={$watchProgress.progress + '%'} />
|
||||
</div>
|
||||
{/if}
|
||||
<div class='text-[9.6px] text-muted-foreground overflow-hidden'>
|
||||
{notes(summary ?? '')}
|
||||
</div>
|
||||
<div class='flex w-full justify-between mt-auto'>
|
||||
{#if airingAt ?? airdate}
|
||||
<div class='text-[9.6px] pt-2'>
|
||||
{since(new Date(airingAt ?? airdate ?? 0))}
|
||||
</div>
|
||||
{/if}
|
||||
<div class='-space-x-1 ml-auto inline-flex pt-1 pr-0.5'>
|
||||
{#each followerEntries.filter(e => e?.progress === episode) as followerEntry, i (followerEntry?.user?.id ?? i)}
|
||||
{#if followerEntry?.user}
|
||||
<Profile user={followerEntry.user} class='ring-2 ring-neutral-950 size-4 bg-neutral-950' />
|
||||
{/if}
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
{#if filler}
|
||||
<div class='rounded-tl bg-yellow-400 py-1 px-2 text-primary-foreground absolute bottom-0 right-0 text-[9.6px] font-bold'>Filler</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
<div class='flex flex-row items-center justify-between w-full py-3'>
|
||||
<p class='text-center text-[13px] text-muted-foreground hidden md:block'>
|
||||
Showing <span class='font-bold'>{range.start + 1}</span> to <span class='font-bold'>{range.end}</span> of <span class='font-bold'>{episodeCount}</span> episodes
|
||||
</p>
|
||||
<div class='w-full md:w-auto gap-2 flex items-center'>
|
||||
<Button size='icon' variant='ghost' class='animated-icon' on:click={() => setPage(currentPage - 1)} disabled={!hasPrev}>
|
||||
<ChevronLeft class='size-4' />
|
||||
</Button>
|
||||
{#if $breakpoints.md}
|
||||
{#each pages as { page, type } (page)}
|
||||
{#if type === 'ellipsis'}
|
||||
<span class='h-9 w-9 text-center'>...</span>
|
||||
{:else}
|
||||
<Button size='icon' variant={page === currentPage ? 'outline' : 'ghost'} on:click={() => setPage(page)}>
|
||||
{page}
|
||||
</Button>
|
||||
{/if}
|
||||
{/each}
|
||||
{:else}
|
||||
<p class='text-center text-[13px] text-muted-foreground w-full block md:hidden'>
|
||||
Showing <span class='font-bold'>{range.start + 1}</span> to <span class='font-bold'>{range.end}</span> of <span class='font-bold'>{episodeCount}</span> episodes
|
||||
</p>
|
||||
{/if}
|
||||
<Button size='icon' variant='ghost' class='animated-icon' on:click={() => setPage(currentPage + 1)} disabled={!hasNext}>
|
||||
<ChevronRight class='size-4' />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</Pagination>
|
||||
38
src/lib/components/KeepAlive.svelte
Normal file
38
src/lib/components/KeepAlive.svelte
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<script lang='ts' context='module'>
|
||||
import type { ComponentType, SvelteComponent } from 'svelte'
|
||||
|
||||
const keep = new Map<string, { component: SvelteComponent, node: HTMLElement}>()
|
||||
|
||||
export function register (id: string, Component: ComponentType) {
|
||||
if (keep.has(id)) throw new Error(`KeepAlive: duplicate id ${id}`)
|
||||
const wrapper = document.createDocumentFragment() as unknown as HTMLElement
|
||||
|
||||
const instance = new Component({ target: wrapper })
|
||||
|
||||
keep.set(id, { component: instance, node: wrapper.children[0] as HTMLElement })
|
||||
}
|
||||
|
||||
export function unregister (id: string) {
|
||||
const entry = keep.get(id)
|
||||
if (entry) {
|
||||
entry.component.$destroy()
|
||||
entry.node.remove()
|
||||
keep.delete(id)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script lang='ts'>
|
||||
import type { HTMLAttributes } from 'svelte/elements'
|
||||
|
||||
export let id: string
|
||||
|
||||
type $$Props = HTMLAttributes<HTMLDivElement> & { id: string }
|
||||
|
||||
function mount (node: HTMLDivElement) {
|
||||
const entry = keep.get(id)
|
||||
if (entry) node.appendChild(entry.node)
|
||||
}
|
||||
</script>
|
||||
|
||||
<div use:mount {...$$restProps} />
|
||||
53
src/lib/components/Online.svelte
Normal file
53
src/lib/components/Online.svelte
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<script lang='ts'>
|
||||
import CloudOff from 'lucide-svelte/icons/cloud-off'
|
||||
|
||||
import online from '$lib/modules/online'
|
||||
|
||||
let hideFirst = false
|
||||
$: if (!$online && !hideFirst) {
|
||||
hideFirst = true
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if $online && hideFirst}
|
||||
<div class='bg-green-600 text-white justify-center items-center flex flex-row online overflow-hidden relative z-40 px-4 shrink-0'>
|
||||
Back online
|
||||
</div>
|
||||
{:else if !$online}
|
||||
<div class='bg-neutral-950 text-white justify-center items-center flex flex-row top-0 offline overflow-hidden relative z-40 px-4 shrink-0'>
|
||||
<CloudOff size={16} class='me-2' />
|
||||
Offline
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
.online {
|
||||
animation: hide 300ms forwards 2s;
|
||||
}
|
||||
@keyframes hide {
|
||||
from {
|
||||
height: 24px;
|
||||
}
|
||||
to {
|
||||
height: 0;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
}
|
||||
.offline {
|
||||
height: 0;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
animation: show 300ms forwards 2s;
|
||||
}
|
||||
@keyframes show {
|
||||
from {
|
||||
height: 0;
|
||||
}
|
||||
to {
|
||||
height: 24px;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
53
src/lib/components/Pagination.svelte
Normal file
53
src/lib/components/Pagination.svelte
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<script lang='ts'>
|
||||
export let currentPage = 1
|
||||
export let count = 0
|
||||
export let perPage = 15
|
||||
export let siblingCount = 1
|
||||
|
||||
let pages: Array<{
|
||||
page: number
|
||||
type: string
|
||||
}> = []
|
||||
|
||||
$: {
|
||||
const edgeSize = 4 * siblingCount
|
||||
const totalPages = Math.ceil(count / perPage)
|
||||
const startPage = Math.max(1, totalPages - currentPage < edgeSize ? totalPages - edgeSize : currentPage - siblingCount)
|
||||
const endPage = Math.min(totalPages, currentPage < edgeSize ? 1 + edgeSize : currentPage + siblingCount)
|
||||
const paginationItems = []
|
||||
|
||||
if (startPage > 1) {
|
||||
paginationItems.push({ page: 1, type: 'page' })
|
||||
if (startPage > 2) {
|
||||
paginationItems.push({ page: startPage - 1, type: 'ellipsis' })
|
||||
}
|
||||
}
|
||||
|
||||
for (let i = startPage; i <= endPage; i++) {
|
||||
paginationItems.push({ page: i, type: 'page' })
|
||||
}
|
||||
|
||||
if (endPage < totalPages) {
|
||||
if (endPage < totalPages - 1) {
|
||||
paginationItems.push({ page: endPage + 1, type: 'ellipsis' })
|
||||
}
|
||||
paginationItems.push({ page: totalPages, type: 'page' })
|
||||
}
|
||||
|
||||
pages = paginationItems
|
||||
}
|
||||
|
||||
$: range = {
|
||||
start: (currentPage - 1) * perPage,
|
||||
end: Math.min(currentPage * perPage, count)
|
||||
}
|
||||
|
||||
$: hasNext = currentPage < Math.ceil(count / perPage)
|
||||
$: hasPrev = currentPage > 1
|
||||
|
||||
function setPage (page: number) {
|
||||
currentPage = Math.min(Math.max(1, page), Math.ceil(count / perPage))
|
||||
}
|
||||
</script>
|
||||
|
||||
<slot {pages} {range} {hasNext} {hasPrev} {setPage} />
|
||||
335
src/lib/components/SearchModal.svelte
Normal file
335
src/lib/components/SearchModal.svelte
Normal file
|
|
@ -0,0 +1,335 @@
|
|||
<script lang='ts' context='module'>
|
||||
import BadgeCheck from 'lucide-svelte/icons/badge-check'
|
||||
import Download from 'svelte-radix/Download.svelte'
|
||||
import File from 'svelte-radix/File.svelte'
|
||||
import MagnifyingGlass from 'svelte-radix/MagnifyingGlass.svelte'
|
||||
|
||||
import { SingleCombo } from './ui/combobox'
|
||||
import { Input } from './ui/input'
|
||||
|
||||
import type { AnitomyResult } from 'anitomyscript'
|
||||
import type { TorrentResult } from 'hayase-extensions'
|
||||
|
||||
import * as Dialog from '$lib/components/ui/dialog'
|
||||
import { title } from '$lib/modules/anilist'
|
||||
import { extensions } from '$lib/modules/extensions/extensions'
|
||||
import { click, dragScroll } from '$lib/modules/navigate'
|
||||
import { settings, videoResolutions } from '$lib/modules/settings'
|
||||
import { cn, colors, fastPrettyBytes, since } from '$lib/utils'
|
||||
|
||||
const termMapping: Record<string, {text: string, color: string}> = {}
|
||||
termMapping['5.1'] = termMapping['5.1CH'] = { text: '5.1', color: '#f67255' }
|
||||
termMapping['TRUEHD5.1'] = { text: 'TrueHD 5.1', color: '#f67255' }
|
||||
termMapping.AAC = termMapping.AACX2 = termMapping.AACX3 = termMapping.AACX4 = { text: 'AAC', color: '#f67255' }
|
||||
termMapping.AC3 = { text: 'AC3', color: '#f67255' }
|
||||
termMapping.EAC3 = termMapping['E-AC-3'] = { text: 'EAC3', color: '#f67255' }
|
||||
termMapping.FLAC = termMapping.FLACX2 = termMapping.FLACX3 = termMapping.FLACX4 = { text: 'FLAC', color: '#f67255' }
|
||||
termMapping.VORBIS = { text: 'Vorbis', color: '#f67255' }
|
||||
termMapping.DUALAUDIO = termMapping['DUAL AUDIO'] = { text: 'Dual Audio', color: '#ffcb3b' }
|
||||
termMapping['10BIT'] = termMapping['10BITS'] = termMapping['10-BIT'] = termMapping['10-BITS'] = termMapping.HI10 = termMapping.HI10P = { text: '10 Bit', color: '#0c8ce9' }
|
||||
termMapping.HI444 = termMapping.HI444P = termMapping.HI444PP = { text: 'HI444', color: '#0c8ce9' }
|
||||
termMapping.HEVC = termMapping.H265 = termMapping['H.265'] = termMapping.X265 = { text: 'HEVC', color: '#0c8ce9' }
|
||||
termMapping.AV1 = { text: 'AV1', color: '#0c8ce9' }
|
||||
termMapping.BD = termMapping.BDRIP = termMapping.BLURAY = termMapping['BLU-RAY'] = { text: 'BD', color: '#ab1b31' }
|
||||
termMapping.DVD5 = termMapping.DVD9 = termMapping['DVD-R2J'] = termMapping.DVDRIP = termMapping.DVD = termMapping['DVD-RIP'] = termMapping.R2DVD = termMapping.R2J = termMapping.R2JDVD = termMapping.R2JDVDRIP = { text: 'DVD', color: '#ab1b31' }
|
||||
termMapping.MULTISUB = termMapping['MULTI-SUB'] = termMapping['MULTI SUB'] = termMapping.MULTISUBS = termMapping['MULTI-SUBS'] = termMapping['MULTI SUBS'] = { text: 'Multi Sub', color: '#ffcb3b' }
|
||||
// termMapping.HDTV = termMapping.HDTVRIP = termMapping.TVRIP = termMapping['TV-RIP'] = { text: 'TV', color: '#ab1b31' }
|
||||
// termMapping.WEBCAST = termMapping.WEBRIP = { text: 'WEB', color: '#ab1b31' }
|
||||
|
||||
function sanitiseTerms ({ video_term: video, audio_term: audio, video_resolution: resolution, source, subtitles }: AnitomyResult) {
|
||||
const terms = [...new Set([...video ?? [], ...audio ?? [], ...source ?? [], ...subtitles ?? []].map(term => termMapping[term.toUpperCase() ?? '']).filter(t => t))] as Array<{text: string, color: string}>
|
||||
if (resolution.length) terms.unshift({ text: resolution[0]!, color: '#c6ec58' })
|
||||
|
||||
return terms
|
||||
}
|
||||
|
||||
function simplifyFilename ({ video_term: video, audio_term: audio, video_resolution: resolution, file_name: name, release_group: group, file_checksum: checksum }: AnitomyResult) {
|
||||
let simpleName = name[0]!
|
||||
if (group.length) simpleName = simpleName.replace(group[0]!, '')
|
||||
if (resolution.length) simpleName = simpleName.replace(resolution[0]!, '')
|
||||
if (checksum.length) simpleName = simpleName.replace(checksum[0]!, '')
|
||||
for (const term of video ?? []) simpleName = simpleName.replace(term, '')
|
||||
for (const term of audio ?? []) simpleName = simpleName.replace(term, '')
|
||||
return simpleName.replace(/[[{(]\s*[\]})]/g, '').replace(/\s+/g, ' ').trim()
|
||||
}
|
||||
|
||||
function getGroup ({ release_group: group, file_name: name }: AnitomyResult) {
|
||||
return group[0] && group[0].length < 20 ? group[0] : /^(?!\[[^\]]*\]).*-(\w+)(?=\s\(|\.\w+$|$)/.exec(name[0] ?? '')?.[1] ?? 'No Group'
|
||||
}
|
||||
</script>
|
||||
|
||||
<script lang='ts'>
|
||||
import Folder from 'lucide-svelte/icons/folder'
|
||||
import { getContext } from 'svelte'
|
||||
|
||||
import ProgressButton from './ui/button/progress-button.svelte'
|
||||
import { Banner } from './ui/img'
|
||||
|
||||
import { beforeNavigate, goto } from '$app/navigation'
|
||||
import { searchStore } from '$lib'
|
||||
import { saved } from '$lib/modules/extensions'
|
||||
import { server } from '$lib/modules/torrent'
|
||||
|
||||
$: open = !!$searchStore?.media
|
||||
|
||||
$: searchResult = !!$searchStore?.media && extensions.getResultsFromExtensions({ media: $searchStore.media, episode: $searchStore.episode, resolution: $settings.searchQuality })
|
||||
|
||||
function close (state = false) {
|
||||
if (!state) {
|
||||
searchStore.set(undefined)
|
||||
open = false
|
||||
inputText = ''
|
||||
}
|
||||
}
|
||||
|
||||
let inputText = ''
|
||||
|
||||
function play (result: Pick<TorrentResult, 'hash'>) {
|
||||
server.play(result.hash, $searchStore!.media, $searchStore!.episode)
|
||||
goto('/app/player/')
|
||||
close()
|
||||
}
|
||||
|
||||
async function playBest () {
|
||||
if (!searchResult) return
|
||||
const best = filterAndSortResults((await searchResult).results, inputText, await $downloaded)[0]
|
||||
|
||||
if (best) play(best)
|
||||
}
|
||||
|
||||
function filterAndSortResults (results: Array<TorrentResult & { parseObject: AnitomyResult, extension: Set<string> }>, searchText: string, downloaded: Set<string>) {
|
||||
const preference = $settings.lookupPreference
|
||||
return results
|
||||
.filter(({ title }) => title.toLowerCase().includes(searchText.toLowerCase()))
|
||||
.sort((a, b) => {
|
||||
// pre-emtively sort by deal breaker conditions
|
||||
// the higher the rank the worse the result... don't ask
|
||||
function getRank (res: typeof results[0]) {
|
||||
if (res.accuracy === 'low') return 3
|
||||
if (downloaded.has(res.hash)) return 0
|
||||
if (res.seeders <= 15) return 2
|
||||
if ((res.type === 'best' || res.type === 'alt') && preference === 'quality') return 0
|
||||
return 1
|
||||
}
|
||||
|
||||
const rankA = getRank(a)
|
||||
const rankB = getRank(b)
|
||||
if (rankA !== rankB) return rankA - rankB
|
||||
if (rankA === 1) {
|
||||
const scoreA = a.accuracy === 'high' ? 1 : 0
|
||||
const scoreB = b.accuracy === 'high' ? 1 : 0
|
||||
const diff = scoreB - scoreA
|
||||
if (diff !== 0) return diff
|
||||
|
||||
// sort by preference, quality is sorted in rank, so quality and seeders is both as seeders here.
|
||||
if (preference === 'size') return a.size - b.size
|
||||
return b.seeders - a.seeders
|
||||
}
|
||||
return 0
|
||||
})
|
||||
}
|
||||
|
||||
let animating = false
|
||||
|
||||
async function startAnimation (searchRes: typeof searchResult) {
|
||||
if (!$settings.searchAutoSelect) return
|
||||
animating = false
|
||||
const results = await searchRes
|
||||
if (searchRes === searchResult && results && results.results.length) animating = true
|
||||
}
|
||||
|
||||
function stopAnimation () {
|
||||
animating = false
|
||||
}
|
||||
|
||||
const torrentRx = /(^magnet:){1}|(^[A-F\d]{8,40}$){1}|(.*\.torrent$){1}/i
|
||||
|
||||
function findTorrentIdentifiers (hash: string) {
|
||||
if (torrentRx.test(hash)) {
|
||||
play({ hash })
|
||||
}
|
||||
}
|
||||
|
||||
$: findTorrentIdentifiers(inputText)
|
||||
|
||||
$: searchResult && startAnimation(searchResult)
|
||||
|
||||
const downloaded = server.downloaded
|
||||
|
||||
const stop = getContext<() => void>('stop-progress-bar')
|
||||
|
||||
beforeNavigate(({ cancel }) => {
|
||||
if (open) {
|
||||
cancel()
|
||||
close()
|
||||
stop()
|
||||
}
|
||||
})
|
||||
|
||||
$: ({ r, g, b } = colors($searchStore?.media.coverImage?.color ?? undefined))
|
||||
</script>
|
||||
|
||||
<Dialog.Root bind:open onOpenChange={close} portal='#episodeListTarget'>
|
||||
<Dialog.Content class='bg-black h-full max-w-5xl w-full max-h-[calc(100%-1rem)] border-b-0 !rounded-b-none mt-2 p-0 items-center flex-col flex lg:rounded-t-xl overflow-clip z-[100] gap-0'>
|
||||
<!-- this hacky thing is required for dialog root focus trap... pitiful -->
|
||||
<div class='size-0' tabindex='0' />
|
||||
{#if $searchStore}
|
||||
<div class='absolute top-0 left-0 w-full h-full max-h-36 overflow-hidden flex items-end'>
|
||||
<Banner media={$searchStore.media} class='object-cover w-full h-full absolute bottom-[0.5px] left-0 -z-10 opacity-40' />
|
||||
<div class='w-full h-[70%] bg-gradient-to-t from-black/80 to-transparent' />
|
||||
</div>
|
||||
<div class='gap-4 w-full relative h-full flex flex-col pt-8' style:--custom={$searchStore.media.coverImage?.color ?? '#fff'} style:--red={r} style:--green={g} style:--blue={b}>
|
||||
<div class='px-4 sm:px-6 space-y-4'>
|
||||
<div class='font-weight-bold text-2xl font-bold text-ellipsis text-nowrap overflow-hidden'>{title($searchStore.media)}</div>
|
||||
<div class='flex items-center relative scale-parent'>
|
||||
<Input
|
||||
class='pl-9 bg-background select:bg-accent select:text-accent-foreground shadow-sm no-scale placeholder:opacity-50'
|
||||
placeholder='Filter by text, or paste a magnet link or torrent file here to specify a torrent manually'
|
||||
bind:value={inputText} />
|
||||
<MagnifyingGlass class='h-4 w-4 shrink-0 opacity-50 absolute left-3 text-muted-foreground z-10 pointer-events-none' />
|
||||
</div>
|
||||
<div class='flex items-center gap-4 justify-around flex-wrap'>
|
||||
<div class='flex items-center space-x-2 grow'>
|
||||
<span>Episode</span>
|
||||
<Input type='number' inputmode='numeric' pattern='[0-9]*' min='0' max='65536' bind:value={$searchStore.episode} class='w-32 shrink-0 bg-background grow' />
|
||||
</div>
|
||||
<div class='flex items-center space-x-2 grow'>
|
||||
<span>Resolution</span>
|
||||
<SingleCombo bind:value={$settings.searchQuality} items={videoResolutions} portal='#episodeListTarget' class='w-32 shrink-0 grow border-border border' />
|
||||
</div>
|
||||
</div>
|
||||
<ProgressButton
|
||||
onclick={playBest}
|
||||
size='default'
|
||||
class='w-full font-bold bg-custom select:bg-custom-600 text-contrast'
|
||||
bind:animating>
|
||||
Auto Select Torrent
|
||||
</ProgressButton>
|
||||
</div>
|
||||
<div class='h-full overflow-y-auto px-4 sm:px-6 pt-2' role='menu' tabindex='-1' on:keydown={stopAnimation} on:focusin={stopAnimation} on:pointerenter={stopAnimation} on:pointermove={stopAnimation} use:dragScroll style:--custom={$searchStore.media.coverImage?.color ?? '#fff'} style:--red={r} style:--green={g} style:--blue={b}>
|
||||
{#await Promise.all([searchResult, $downloaded])}
|
||||
{#each Array.from({ length: 12 }) as _, i (i)}
|
||||
<div class='p-3 h-[106px] flex cursor-pointer mb-2 relative rounded-md overflow-hidden bg-neutral-950 flex-col justify-between [content-visibility:auto] [contain-intrinsic-height:auto_106px]'>
|
||||
<div class='h-4 w-40 bg-primary/5 animate-pulse rounded mt-2' />
|
||||
<div class='bg-primary/5 animate-pulse rounded h-2 w-28 mt-1' />
|
||||
<div class='flex justify-between mb-1'>
|
||||
<div class='flex gap-2'>
|
||||
<div class='mt-2 bg-primary/5 animate-pulse rounded h-2 w-20' />
|
||||
<div class='mt-2 bg-primary/5 animate-pulse rounded h-2 w-20' />
|
||||
</div>
|
||||
<div class='mt-2 bg-primary/5 animate-pulse rounded h-2 w-20' />
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
{:then [search, downloaded]}
|
||||
{@const media = $searchStore.media}
|
||||
{#if search && media}
|
||||
{@const { results, errors } = search}
|
||||
{#each filterAndSortResults(results, inputText, downloaded) as result (result.hash)}
|
||||
<div class='p-3 flex cursor-pointer mb-2 relative rounded-md overflow-hidden bg-neutral-950 group/card select:ring-1 select:ring-custom select:bg-neutral-900 select:scale-[1.02] select:shadow-lg scale-100 transition-all [content-visibility:auto] [contain-intrinsic-height:auto_106px]' class:opacity-40={result.accuracy === 'low'} use:click={() => play(result)} title={result.parseObject.file_name[0]}>
|
||||
<div class='size-20 relative shrink-0 flex items-center justify-center text-xs px-1 text-wrap break-all font-bold text-center overflow-clip'>
|
||||
{#if result.accuracy === 'high' || result.accuracy === 'medium'}
|
||||
<BadgeCheck class={cn('absolute top-0 left-0 mix-blend-difference', result.accuracy === 'high' ? 'text-[#53da33]' : 'text-muted-foreground/20')} fill='currentColor' color='#000' size='1.2rem' />
|
||||
{/if}
|
||||
{#if downloaded.has(result.hash)}
|
||||
<Download class='text-[#53da33] size-12 opacity-80' stroke-width='0.5' color='currentColor' stroke='currentColor' />
|
||||
{:else if result.type}
|
||||
<Folder class='text-yellow-300 size-12 opacity-80' fill='currentColor' />
|
||||
{:else}
|
||||
<File class='text-muted-foreground size-12 opacity-80' />
|
||||
{/if}
|
||||
</div>
|
||||
<div class='flex pl-2 flex-col justify-between w-full h-20 relative min-w-0 text-[.7rem]'>
|
||||
<div class='flex w-full items-center'>
|
||||
<div class='text-xl font-bold text-nowrap group-select/card:text-custom transition-colors'>{getGroup(result.parseObject)}</div>
|
||||
<div class='ml-auto flex gap-2 self-start'>
|
||||
{#each result.extension as id (id)}
|
||||
{#if $saved[id]}
|
||||
<img src={$saved[id].icon} alt={id} class='size-4' title='Provided by {id}' decoding='async' loading='lazy' />
|
||||
{/if}
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
<div class='text-muted-foreground text-ellipsis text-nowrap overflow-hidden'>{simplifyFilename(result.parseObject)}</div>
|
||||
<div class='flex flex-row leading-none'>
|
||||
<div class='details text-light flex'>
|
||||
{#if result.type === 'best'}
|
||||
<span class='rounded px-3 py-1 mr-0.5 border text-nowrap flex items-center' style='background: #1d2d1e; border-color: #53da33 !important; color: #53da33'>
|
||||
Best Release
|
||||
</span>
|
||||
{:else if result.type === 'alt'}
|
||||
<span class='rounded px-3 py-1 mr-0.5 border text-nowrap flex items-center' style='background: #391d20; border-color: #c52d2d !important; color: #c52d2d'>
|
||||
Alt Release
|
||||
</span>
|
||||
{:else if result.type === 'batch'}
|
||||
<span class='rounded px-3 py-1 mr-0.5 border text-nowrap flex items-center' style='background: #1d2031; border-color: #2d5ec5 !important; color: #2d5ec5'>
|
||||
Batch
|
||||
</span>
|
||||
{/if}
|
||||
<span class={cn('text-nowrap flex items-center', result.seeders > 20 ? 'text-green-600' : result.seeders < 5 ? 'text-red-600' : 'text-yellow-600')}>{result.seeders} Seeders</span>
|
||||
<span class='text-nowrap flex items-center text-white/80'>{fastPrettyBytes(result.size)}</span>
|
||||
<span class='text-nowrap flex items-center text-white/80'>{since(new Date(result.date))}</span>
|
||||
</div>
|
||||
<div class='flex ml-auto flex-row-reverse'>
|
||||
{#each sanitiseTerms(result.parseObject) as { text, color }, i (i)}
|
||||
<div class='rounded px-3 py-1 ml-2 text-nowrap font-bold flex items-center' style:background={color}>
|
||||
<div class='text-contrast-filter'>
|
||||
{text}
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{:else}
|
||||
<div class='p-5 flex items-center justify-center w-full h-80'>
|
||||
<div>
|
||||
<div class='mb-3 font-bold text-4xl text-center '>
|
||||
Ooops!
|
||||
</div>
|
||||
<div class='text-lg text-center text-muted-foreground'>
|
||||
No results found.<br />Try specifying a torrent manually by pasting a magnet link or torrent file into the filter bar.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
{#each errors as error, i (i)}
|
||||
<div class='p-5 flex items-center justify-center w-full h-80'>
|
||||
<div>
|
||||
<div class='mb-1 font-bold text-2xl text-center '>
|
||||
Extensions {error.extension} encountered an error
|
||||
</div>
|
||||
<div class='text-md text-center text-muted-foreground whitespace-pre-wrap'>
|
||||
{error.error.stack}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
{/if}
|
||||
{:catch error}
|
||||
<div class='p-5 flex items-center justify-center w-full h-80'>
|
||||
<div>
|
||||
<div class='mb-3 font-bold text-4xl text-center '>
|
||||
Ooops!
|
||||
</div>
|
||||
<div class='text-lg text-center text-muted-foreground whitespace-pre-wrap'>
|
||||
{error.message}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/await}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</Dialog.Content>
|
||||
</Dialog.Root>
|
||||
|
||||
<style>
|
||||
.banner {
|
||||
background: linear-gradient(90deg, #000 32%, rgba(0, 0, 0, 0.9) 100%);
|
||||
}
|
||||
.banner-2 {
|
||||
background: linear-gradient(#000d 0%, #000d 90%, #000 100%);
|
||||
}
|
||||
</style>
|
||||
20
src/lib/components/SettingCard.svelte
Normal file
20
src/lib/components/SettingCard.svelte
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<script lang='ts'>
|
||||
import { Label } from '$lib/components/ui/label'
|
||||
import { cn } from '$lib/utils'
|
||||
export let title = ''
|
||||
export let description = ''
|
||||
|
||||
const id = Math.trunc(Math.random() * Number.MAX_SAFE_INTEGER).toString() + title
|
||||
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<div class={cn('flex flex-col md:flex-row md:items-center justify-between bg-neutral-950 rounded-md px-6 py-4 gap-3', className)}>
|
||||
<Label for={id} class='space-1 block leading-[unset] grow'>
|
||||
<div class='font-bold'>{title}</div>
|
||||
<div class='text-muted-foreground text-xs whitespace-pre-wrap block'>{description}</div>
|
||||
</Label>
|
||||
<slot {id} />
|
||||
</div>
|
||||
34
src/lib/components/SettingsNav.svelte
Normal file
34
src/lib/components/SettingsNav.svelte
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<script lang='ts'>
|
||||
import { cubicInOut } from 'svelte/easing'
|
||||
import { crossfade } from 'svelte/transition'
|
||||
|
||||
import { Button } from './ui/button'
|
||||
|
||||
import { page } from '$app/stores'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
let className: string | undefined | null = ''
|
||||
export let items: Array<{ href: string, title: string }>
|
||||
export { className as class }
|
||||
|
||||
const [send, receive] = crossfade({
|
||||
duration: 150,
|
||||
easing: cubicInOut
|
||||
})
|
||||
|
||||
const key = 'active-settings-tab'
|
||||
</script>
|
||||
|
||||
<nav class={cn('md:flex grid grid-cols-2 md:flex-row lg:flex-col gap-y-1 gap-x-2 pb-2 sm:pb-0', className)}>
|
||||
{#each items as { href, title }, i (i)}
|
||||
{@const isActive = $page.url.pathname === href}
|
||||
<Button {href} variant='ghost' data-sveltekit-noscroll class='relative font-semibold justify-start last:odd:col-span-2'>
|
||||
{#if isActive}
|
||||
<div class='bg-white absolute inset-0 rounded-md' in:send={{ key }} out:receive={{ key }} />
|
||||
{/if}
|
||||
<div class='relative text-white transition-colors duration-300' class:!text-black={isActive}>
|
||||
{title}
|
||||
</div>
|
||||
</Button>
|
||||
{/each}
|
||||
</nav>
|
||||
69
src/lib/components/Shadow.svelte
Normal file
69
src/lib/components/Shadow.svelte
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
<script lang='ts'>
|
||||
import dompurify from 'dompurify'
|
||||
import { marked } from 'marked'
|
||||
|
||||
marked.setOptions({
|
||||
gfm: true,
|
||||
breaks: true,
|
||||
pedantic: false
|
||||
})
|
||||
|
||||
export let html = ''
|
||||
let root: ShadowRoot | undefined
|
||||
|
||||
const style = new CSSStyleSheet()
|
||||
|
||||
style.replaceSync(/* css */`
|
||||
p, details {
|
||||
margin-block-start: .5em;
|
||||
margin-block-end: .5em;
|
||||
}
|
||||
img, video {
|
||||
max-width: 100%;
|
||||
-webkit-user-drag: none;
|
||||
}
|
||||
summary {
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
list-style: none;
|
||||
background: #0003;
|
||||
display: inline-block;
|
||||
padding: 0.4em 0.8em;
|
||||
border-radius: 0.5em;
|
||||
margin-block-end: .5em;
|
||||
}
|
||||
`)
|
||||
|
||||
function sanitize (html: string) {
|
||||
return dompurify.sanitize(html, { ALLOWED_TAGS: ['a', 'b', 'blockquote', 'br', 'center', 'del', 'div', 'em', 'font', 'h1', 'h2', 'h3', 'h4', 'h5', 'hr', 'i', 'img', 'li', 'ol', 'p', 'pre', 'code', 'span', 'strike', 'strong', 'ul', 'details', 'summary'], ALLOWED_ATTR: ['align', 'height', 'href', 'src', 'target', 'width', 'rel'] })
|
||||
}
|
||||
|
||||
// i mean holy shit anilist, could you have made it any harder on yourself
|
||||
function shadow (node: HTMLDivElement, html: string) {
|
||||
root ??= node.attachShadow({ mode: 'closed' })
|
||||
root.adoptedStyleSheets = [style]
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
html = html.replace(/(http)(:([\/|.|\w|\s|-])*\.(?:jpg|.jpeg|gif|png|mp4|webm))/gi, '$1s$2')
|
||||
.replace(/img\s?(\d+%?)?\s?\((.[\S]+)\)/gi, "<img width='$1' src='$2'>")
|
||||
.replace(/(^|>| )@([A-Za-z0-9]+)/gm, "$1<a href='#'>@$2</a>")
|
||||
.replace(/youtube\s?\([^]*?([-_0-9A-Za-z]{10,15})[^]*?\)/gi, 'youtube ($1)')
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
.replace(/webm\s?\(h?([A-Za-z0-9-._~:\/?#\[\]@!$&()*+,;=%]+)\)/gi, 'webmv(`$1`)')
|
||||
.replace(/~{3}([^]*?)~{3}/gm, '+++$1+++')
|
||||
.replace(/~!([^]*?)!~/gm, '<details><summary>Spoiler, click to view</summary>$1</details>')
|
||||
html = sanitize(marked.parse(html, { async: false }))
|
||||
.replace(/\+{3}([^]*?)\+{3}/gm, '<center>$1</center>')
|
||||
.replace(/youtube\s?\(([-_0-9A-Za-z]{10,15})\)/gi, `<iframe style='width: 500px; height: 200px; max-width: 100%; border: none;'title='youtube-embed' allow='autoplay' allowfullscreen
|
||||
src='https://www.youtube-nocookie.com/embed/$1?enablejsapi=1&autoplay=0&controls=1&mute=0&disablekb=1&loop=1&playlist=$1&cc_lang_pref=ja' />`)
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
.replace(/webmv\s?\(<code>([A-Za-z0-9-._~:\/?#\[\]@!$&()*+,;=%]+)<\/code>\)/gi, "<video muted loop controls><source src='h$1' type='video/webm'>Your browser does not support the video tag.</video>")
|
||||
// t = t.replace(/(?:<a href="https?:\/\/anilist.co\/(anime|manga)\/)([0-9]+).*?>(?:https?:\/\/anilist.co\/(?:anime|manga)\/[0-9]+).*?<\/a>/gm, '<span class="media-embed" data-media-type="$1" data-media-id="$2"></span>')
|
||||
|
||||
root.innerHTML = html
|
||||
}
|
||||
|
||||
let className: string | undefined | null
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<div use:shadow={html} class={className} />
|
||||
33
src/lib/components/StatusDot.svelte
Normal file
33
src/lib/components/StatusDot.svelte
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<script lang='ts'>
|
||||
import { tv, type VariantProps } from 'tailwind-variants'
|
||||
|
||||
import type { HTMLAttributes } from 'svelte/elements'
|
||||
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
const dotvariants = tv({
|
||||
base: 'inline-flex w-[0.55rem] h-[0.55rem] me-1 bg-blue-600 rounded-full',
|
||||
variants: {
|
||||
variant: {
|
||||
CURRENT: 'bg-[rgb(61,180,242)]',
|
||||
PLANNING: 'bg-[rgb(247,154,99)]',
|
||||
COMPLETED: 'bg-[rgb(123,213,85)]',
|
||||
PAUSED: 'bg-[rgb(250,122,122)]',
|
||||
REPEATING: 'bg-[#3baeea]',
|
||||
DROPPED: 'bg-[rgb(232,93,117)]'
|
||||
}
|
||||
},
|
||||
defaultVariants: {
|
||||
variant: 'CURRENT'
|
||||
}
|
||||
})
|
||||
|
||||
export let variant: VariantProps<typeof dotvariants>['variant'] = 'CURRENT'
|
||||
|
||||
type $$Props = HTMLAttributes<HTMLSpanElement> & { variant: VariantProps<typeof dotvariants>['variant']}
|
||||
|
||||
let className: $$Props['class'] = ''
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<span class={cn(dotvariants({ variant }), className)} />
|
||||
11
src/lib/components/icons/Anilist.svelte
Normal file
11
src/lib/components/icons/Anilist.svelte
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<svg xmlns='http://www.w3.org/2000/svg' width='41' height='30' fill='none' viewBox='0 0 41 30' {...$$props}>
|
||||
<g clip-path='url(#clip0_312_151)'>
|
||||
<path fill='#00A8FF' d='M27.825 21.773V2.977c0-1.077-.613-1.672-1.725-1.672h-3.795c-1.111 0-1.725.595-1.725 1.672v8.927c0 .251 2.5 1.418 2.565 1.665 1.904 7.21.414 12.982-1.392 13.251 2.952.142 3.277 1.517 1.078.578.337-3.848 1.65-3.84 5.422-.142.032.032.774 1.539.82 1.539h8.91c1.113 0 1.726-.594 1.726-1.672v-3.677c0-1.078-.614-1.672-1.725-1.672H27.825z' />
|
||||
<path fill='#fff' d='M12.07 1.306l-9.966 27.49h7.743l1.687-4.756h8.433l1.649 4.755h7.705l-9.929-27.49H12.07zm1.227 16.642l2.415-7.615 2.645 7.615h-5.06z' />
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id='clip0_312_151'>
|
||||
<path fill='#fff' d='M0 0H40V29H0z' transform='translate(.957 .5)' />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 831 B |
13
src/lib/components/icons/Hub.svelte
Normal file
13
src/lib/components/icons/Hub.svelte
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<script lang='ts'>
|
||||
import Icon from 'lucide-svelte/dist/Icon.svelte'
|
||||
|
||||
import type { SvelteHTMLElements, SVGAttributes } from 'svelte/elements'
|
||||
|
||||
type Attrs = SVGAttributes<SVGSVGElement>
|
||||
|
||||
const iconNode: Array<[elementName: keyof SvelteHTMLElements, attrs: Attrs]> = [['path', { d: 'M240-44q-48.5 0-82.25-33.75T124-160q0-48.5 33.75-82.25T240-276q14 0 24.25 2.25t21.25 7.25L353-351q-25.5-29-34.25-63.25T314-482.5L216-515q-17 23.5-41 37.25T120-464q-48.5 0-82.25-33.75T4-580q0-48.5 33.75-82.25T120-696q48.5 0 82.25 33.75T236-580v5.5l97.5 34q16.5-31 47.25-54t68.25-30V-728q-39.5-12.5-62.25-43T364-840q0-48.5 33.75-82.25T480-956q48.5 0 82.25 33.75T596-840q0 38.5-23.25 69T511-728v103.5q37.5 7 68 30t47.5 54l97.5-34v-5.5q0-48.5 33.75-82.25T840-696q48.5 0 82.25 33.75T956-580q0 48.5-33.75 82.25T840-464q-31 0-55.5-13.75T744-515l-98 32.5q4 34.5-5 68.25T607-351l67.5 84q11-5 21.25-7t24.25-2q48.5 0 82.25 33.75T836-160q0 48.5-33.75 82.25T720-44q-48.5 0-82.25-33.75T604-160q0-19.5 5.75-36.25T626-228l-67-84.5q-36.5 20-79.25 20.25T400.5-312.5L334-228q10.5 15 16.25 31.75T356-160q0 48.5-33.75 82.25T240-44ZM120-539q17 0 29-12t12-29q0-17-12-29t-29-12q-17 0-29 12t-12 29q0 17 12 29t29 12Zm120 420q17 0 29-12t12-29q0-17-12-29t-29-12q-17 0-29 12t-12 29q0 17 12 29t29 12Zm240-680q17 0 29-12t12-29q0-17-12-29t-29-12q-17 0-29 12t-12 29q0 17 12 29t29 12Zm0 431.5q38.5 0 65.5-27t27-65.5q0-38.5-27-65.5t-65.5-27q-38.5 0-65.5 27t-27 65.5q0 38.5 27 65.5t65.5 27ZM720-119q17 0 29-12t12-29q0-17-12-29t-29-12q-17 0-29 12t-12 29q0 17 12 29t29 12Zm120-420q17 0 29-12t12-29q0-17-12-29t-29-12q-17 0-29 12t-12 29q0 17 12 29t29 12ZM480-840ZM120-580Zm360 120Zm360-120ZM240-160Zm480 0Z' }]]
|
||||
</script>
|
||||
|
||||
<Icon name='hub' {...$$props} {iconNode} viewBox='0 -960 960 960'>
|
||||
<slot />
|
||||
</Icon>
|
||||
8
src/lib/components/icons/Kitsu.svelte
Normal file
8
src/lib/components/icons/Kitsu.svelte
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<svg width='224' height='224' viewBox='0 0 224 224' {...$$props}>
|
||||
<g fill='none' fill-rule='evenodd'>
|
||||
<g fill='#E75E45'>
|
||||
<path d='M152.7 48.5c-6.8-2.5-14.1-4.1-21.8-4.4-12.7-.6-24.8 2.2-35.4 7.6-.6.3-1.3.6-2 1v36.4c0 .5 0 2.4-.3 4-.7 3.7-2.9 7-6 9.1-2.6 1.8-5.6 2.6-8.8 2.5-.6 0-1.3-.1-1.9-.2-1.6-.3-3.3-.9-3.8-1.1-1.4-.5-21.8-8.4-31.6-12.2-1.2-.5-2.2-.9-3-1.2-11.7 9.9-24 21.7-35.5 35.6-.1.1-.6.7-.7.8-1.5 2.1-1.6 5.1 0 7.4 1.2 1.7 3.1 2.7 5 2.8 1.3.1 2.7-.3 3.9-1.1.1-.1.2-.2.4-.3 12.2-8.8 25.6-15.9 39.8-21.6 1-.5 2.2-.8 3.3-.7 1.6.1 3.1.7 4.3 1.9 2.3 2.3 2.4 6 .5 8.5-.8 1.2-1.5 2.4-2.2 3.6-7.6 12.4-13.7 25.9-18.3 40-.1.4-.2.7-.3 1.1v.1c-.4 1.7-.1 3.5 1 5 1.2 1.7 3.1 2.7 5.1 2.8 1.4.1 2.7-.3 3.9-1.1.5-.4 1-.8 1.4-1.3.1-.2.3-.4.4-.6 5-7.1 10.5-13.8 16.4-20 26.3-28.2 61.2-48.1 100.3-55.9.3-.1.6-.1.9-.1 2.2.1 3.9 2 3.8 4.2-.1 1.9-1.4 3.3-3.2 3.7-36.3 7.7-101.7 50.8-78.8 113.4.4 1 .7 1.6 1.2 2.5 1.2 1.7 3.1 2.7 5 2.8 1.1 0 4.2-.3 6.1-3.7 3.7-7 10.7-14.8 30.9-23.2 56.3-23.3 65.6-56.6 66.6-77.7v-1.2c.9-31.4-18.6-58.8-46.6-69.2zm-56.5 165C91 198 91.5 183 97.6 168.7c11.7 18.9 32.1 20.5 32.1 20.5-20.9 8.7-29.1 17.3-33.5 24.3z' />
|
||||
<path d='M1.1 50.6c.1.2.3.4.4.5 5.3 7.2 11.3 13.5 17.8 19.1.1.1.2.1.2.2 4.2 3.6 12.2 8.8 18 10.9 0 0 36.1 13.9 38 14.7.7.3 1.7.6 2.2.7 1.6.3 3.3 0 4.8-1s2.4-2.5 2.7-4.1c.1-.6.2-1.6.2-2.3V48.5c.1-6.2-1.9-15.6-3.7-20.8 0-.1-.1-.2-.1-.3-2.8-8.1-6.6-16-11.4-23.5l-.3-.6-.1-.1c-2-2.8-6-3.5-8.9-1.5-.5.3-.8.7-1.2 1.1-.3.4-.5.7-.8 1.1-6.4 9.3-9 20.6-7.3 31.7-3.3 1.7-6.8 4-7.2 4.3-.4.3-3.9 2.7-6.6 5.2-9.7-5.5-21.3-7.2-32.2-4.6-.4.1-.9.2-1.3.3-.5.2-1 .4-1.4.7-2.9 2-3.7 5.9-1.8 8.9v.2zm63.5-40.1c3.4 5.7 6.3 11.6 8.6 17.8-4.6.8-9.1 2-13.5 3.6-.6-7.5 1.1-14.9 4.9-21.4zM31.5 51.3c-3.2 3.5-5.9 7.3-8.3 11.3-4.9-4.3-9.4-9.2-13.5-14.4 7.5-1.3 15-.2 21.8 3.1z' />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
1
src/lib/components/icons/Logo.svelte
Normal file
1
src/lib/components/icons/Logo.svelte
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg name='logo' {...$$props} on:click xml:space='preserve' viewBox='0 0 66.145833 66.145833'><path fill='currentColor' d='M.00000117 61.5156237V4.6302097l66.145831 37.041664v19.84375l-47.624995-26.72291v16.40416zm66.145831-30.42707-23.547916-13.229174 23.547916-13.22917Z' /></svg>
|
||||
|
After Width: | Height: | Size: 283 B |
18
src/lib/components/icons/MyAnimeList.svelte
Normal file
18
src/lib/components/icons/MyAnimeList.svelte
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<script lang='ts'>
|
||||
import Icon from 'lucide-svelte/dist/Icon.svelte'
|
||||
|
||||
import type { SvelteHTMLElements, SVGAttributes } from 'svelte/elements'
|
||||
|
||||
type Attrs = SVGAttributes<SVGSVGElement>
|
||||
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
const iconNode: Array<[elementName: keyof SvelteHTMLElements, attrs: Attrs]> = [['path', { fill: 'currentColor', d: 'M8.273 7.247v8.423l-2.103-.003v-5.216l-2.03 2.404l-1.989-2.458l-.02 5.285H.001L0 7.247h2.203l1.865 2.545l2.015-2.546zm8.628 2.069l.025 6.335h-2.365l-.008-2.871h-2.8c.07.499.21 1.266.417 1.779c.155.381.298.751.583 1.128l-1.705 1.125c-.349-.636-.622-1.337-.878-2.082a9.3 9.3 0 0 1-.507-2.179c-.085-.75-.097-1.471.107-2.212a3.9 3.9 0 0 1 1.161-1.866c.313-.293.749-.5 1.1-.687s.743-.264 1.107-.359a7.4 7.4 0 0 1 1.191-.183c.398-.034 1.107-.066 2.39-.028l.545 1.749H14.51c-.593.008-.878.001-1.341.209a2.24 2.24 0 0 0-1.278 1.92l2.663.033l.038-1.81zm3.992-2.099v6.627l3.107.032l-.43 1.775h-4.807V7.187z' }]]
|
||||
|
||||
let className = ''
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<Icon name='myanimelist' class={cn(className, 'bg-[#3557a5] rounded px-[2px] text-white')} color='none' {...$$restProps} {iconNode} strokeWidth='1' viewBox='0 0 24 24'>
|
||||
<slot />
|
||||
</Icon>
|
||||
12
src/lib/components/icons/PictureInPicture.svelte
Normal file
12
src/lib/components/icons/PictureInPicture.svelte
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<script lang='ts'>
|
||||
import Icon from 'lucide-svelte/dist/Icon.svelte'
|
||||
|
||||
import type { SvelteHTMLElements, SVGAttributes } from 'svelte/elements'
|
||||
|
||||
type Attrs = SVGAttributes<SVGSVGElement>
|
||||
const iconNode: Array<[elementName: keyof SvelteHTMLElements, attrs: Attrs]> = [['path', { d: 'M8 4.5v5H3m-1-6 6 6m13 0v-3c0-1.16-.84-2-2-2h-7m-9 9v2c0 1.05.95 2 2 2h3' }], ['rect', { width: '10', height: '7', x: '12', y: '13', rx: '2', fill: 'currentColor' }]]
|
||||
</script>
|
||||
|
||||
<Icon name='picture-in-picture' {...$$props} {iconNode}>
|
||||
<slot />
|
||||
</Icon>
|
||||
12
src/lib/components/icons/PictureInPictureExit.svelte
Normal file
12
src/lib/components/icons/PictureInPictureExit.svelte
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<script lang='ts'>
|
||||
import Icon from 'lucide-svelte/dist/Icon.svelte'
|
||||
|
||||
import type { SvelteHTMLElements, SVGAttributes } from 'svelte/elements'
|
||||
|
||||
type Attrs = SVGAttributes<SVGSVGElement>
|
||||
const iconNode: Array<[elementName: keyof SvelteHTMLElements, attrs: Attrs]> = [['path', { d: 'M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4' }], ['rect', { width: '10', height: '7', x: '12', y: '13', rx: '2', fill: 'currentColor' }]]
|
||||
</script>
|
||||
|
||||
<Icon name='picture-in-picture-exit' {...$$props} {iconNode}>
|
||||
<slot />
|
||||
</Icon>
|
||||
14
src/lib/components/icons/Play.svelte
Normal file
14
src/lib/components/icons/Play.svelte
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<script lang='ts'>
|
||||
import Icon from 'lucide-svelte/dist/Icon.svelte'
|
||||
|
||||
import type { SvelteHTMLElements, SVGAttributes } from 'svelte/elements'
|
||||
|
||||
type Attrs = SVGAttributes<SVGSVGElement>
|
||||
const iconNode: Array<[elementName: keyof SvelteHTMLElements, attrs: Attrs]> = [
|
||||
['path', { 'fill-rule': 'evenodd', 'clip-rule': 'evenodd', d: 'M22.99 11.7773C22.9219 10.8388 22.4205 9.92777 21.4859 9.39398L7.48782 1.39936C5.48785 0.25713 3 1.70127 3 4.00443V19.9937C3 22.2968 5.48785 23.741 7.48781 22.5988L21.4859 14.6041C22.4205 14.0703 22.9219 13.1593 22.99 12.2208C23.0226 12.0751 23.0226 11.9231 22.99 11.7773Z' }]
|
||||
]
|
||||
</script>
|
||||
|
||||
<Icon name='play' {...$$props} {iconNode} viewBox='0 0 24 24' strokeWidth='0'>
|
||||
<slot />
|
||||
</Icon>
|
||||
15
src/lib/components/icons/Subtitles.svelte
Normal file
15
src/lib/components/icons/Subtitles.svelte
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<script lang='ts'>
|
||||
import Icon from 'lucide-svelte/dist/Icon.svelte'
|
||||
|
||||
import type { SvelteHTMLElements, SVGAttributes } from 'svelte/elements'
|
||||
|
||||
type Attrs = SVGAttributes<SVGSVGElement>
|
||||
const iconNode: Array<[elementName: keyof SvelteHTMLElements, attrs: Attrs]> = [
|
||||
['path', { fill: 'none', d: 'M0 0h24v24H0z' }],
|
||||
['path', { d: 'M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM4 12h4v2H4v-2zm10 6H4v-2h10v2zm6 0h-4v-2h4v2zm0-4H10v-2h10v2z' }]
|
||||
]
|
||||
</script>
|
||||
|
||||
<Icon name='subtitles' {...$$props} {iconNode} viewBox='0 0 24 24' strokeWidth='0'>
|
||||
<slot />
|
||||
</Icon>
|
||||
43
src/lib/components/icons/animated/bolt.svelte
Normal file
43
src/lib/components/icons/animated/bolt.svelte
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible [transform-origin:center] target-animated-icon')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path
|
||||
d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'
|
||||
/><circle cx='12' cy='12' r='4' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
animation: screw-rotate 1s ease 3;
|
||||
}
|
||||
|
||||
@keyframes screw-rotate {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
47
src/lib/components/icons/animated/bookmark.svelte
Normal file
47
src/lib/components/icons/animated/bookmark.svelte
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size: number | string = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible target-animated-icon')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
animation: primaryAnimation 0.5s ease-in-out;
|
||||
}
|
||||
|
||||
@keyframes primaryAnimation {
|
||||
0% {
|
||||
transform: scale(1) rotate(0deg);
|
||||
}
|
||||
20% {
|
||||
transform: scale(1.05) rotate(-7deg);
|
||||
}
|
||||
40% {
|
||||
transform: scale(1.05) rotate(7deg);
|
||||
}
|
||||
100% {
|
||||
transform: scale(1) rotate(0deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
68
src/lib/components/icons/animated/calendar.svelte
Normal file
68
src/lib/components/icons/animated/calendar.svelte
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
|
||||
const DOTS = [
|
||||
{ cx: 8, cy: 14 },
|
||||
{ cx: 12, cy: 14 },
|
||||
{ cx: 16, cy: 14 },
|
||||
{ cx: 8, cy: 18 },
|
||||
{ cx: 12, cy: 18 },
|
||||
{ cx: 16, cy: 18 }
|
||||
]
|
||||
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='M8 2v4' />
|
||||
<path d='M16 2v4' />
|
||||
<rect width='18' height='18' x='3' y='4' rx='2' />
|
||||
<path d='M3 10h18' />
|
||||
{#each DOTS as dot, index (index)}
|
||||
<circle
|
||||
cx={dot.cx}
|
||||
cy={dot.cy}
|
||||
r='1'
|
||||
fill={color}
|
||||
stroke='none'
|
||||
class='target-animated-icon'
|
||||
style='animation-delay: {index * 0.17}s'
|
||||
/>
|
||||
{/each}
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
animation: pulse 0.8s;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.3;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
33
src/lib/components/icons/animated/chevronleft.svelte
Normal file
33
src/lib/components/icons/animated/chevronleft.svelte
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size: number | string = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='m15 18-6-6 6-6' class='target-animated-icon' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
transition: transform 0.2s ease-in;
|
||||
transform: translateX(-3px);
|
||||
}
|
||||
</style>
|
||||
33
src/lib/components/icons/animated/chevronright.svelte
Normal file
33
src/lib/components/icons/animated/chevronright.svelte
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size: number | string = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='m9 18 6-6-6-6' class='target-animated-icon' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
transition: transform 0.2s ease-in;
|
||||
transform: translateX(3px);
|
||||
}
|
||||
</style>
|
||||
76
src/lib/components/icons/animated/clapperboard.svelte
Normal file
76
src/lib/components/icons/animated/clapperboard.svelte
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<g class='target-animated-icon clapperboard-outer'>
|
||||
<g class='target-animated-icon clapperboard-inner'>
|
||||
<path d='M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z' />
|
||||
<path d='m6.2 5.3 3.1 3.9' />
|
||||
<path d='m12.4 3.4 3.1 4' />
|
||||
</g>
|
||||
<path d='M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z' />
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.clapperboard-outer {
|
||||
transform-origin: 4px 20px;
|
||||
}
|
||||
|
||||
.clapperboard-inner {
|
||||
transform-origin: 3px 11px;
|
||||
}
|
||||
|
||||
.target-animated-icon {
|
||||
animation: clapperboardOuter 0.8s ease-in-out;
|
||||
}
|
||||
|
||||
.target-animated-icon {
|
||||
animation: clapperboardInner 0.4s ease-in-out;
|
||||
}
|
||||
|
||||
@keyframes clapperboardOuter {
|
||||
0%,
|
||||
50% {
|
||||
transform: rotate(-10deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes clapperboardInner {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
30% {
|
||||
transform: rotate(-10deg);
|
||||
}
|
||||
60% {
|
||||
transform: rotate(16deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
37
src/lib/components/icons/animated/download.svelte
Normal file
37
src/lib/components/icons/animated/download.svelte
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4' />
|
||||
<g>
|
||||
<polyline points='7 10 12 15 17 10' class='target-animated-icon' />
|
||||
<line x1='12' x2='12' y1='15' y2='3' class='target-animated-icon' />
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
transform: translateY(2px);
|
||||
transition: transform 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
|
||||
}
|
||||
</style>
|
||||
50
src/lib/components/icons/animated/fileimage.svelte
Normal file
50
src/lib/components/icons/animated/fileimage.svelte
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible target-animated-icon')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z' />
|
||||
<path d='M14 2v4a2 2 0 0 0 2 2h4' />
|
||||
<circle cx='10' cy='12' r='2' />
|
||||
<path d='m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
animation: primaryAnimation 0.5s ease-in-out;
|
||||
}
|
||||
|
||||
@keyframes primaryAnimation {
|
||||
0% {
|
||||
transform: scale(1) rotate(0deg);
|
||||
}
|
||||
20% {
|
||||
transform: scale(1.05) rotate(-7deg);
|
||||
}
|
||||
40% {
|
||||
transform: scale(1.05) rotate(7deg);
|
||||
}
|
||||
100% {
|
||||
transform: scale(1) rotate(0deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
43
src/lib/components/icons/animated/foldersync.svelte
Normal file
43
src/lib/components/icons/animated/foldersync.svelte
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path
|
||||
d='M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v.5'
|
||||
/>
|
||||
<g class='target-animated-icon'>
|
||||
<path d='M12 10v4h4' />
|
||||
<path d='m12 14 1.535-1.605a5 5 0 0 1 8 1.5' />
|
||||
<path d='M22 22v-4h-4' />
|
||||
<path d='m22 18-1.535 1.605a5 5 0 0 1-8-1.5' />
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
transform-origin: center;
|
||||
transform-box: fill-box;
|
||||
transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
transform: rotate(-50deg);
|
||||
}
|
||||
</style>
|
||||
60
src/lib/components/icons/animated/heart.svelte
Normal file
60
src/lib/components/icons/animated/heart.svelte
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size: number | string = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path
|
||||
d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'
|
||||
class='target-animated-icon'
|
||||
/>
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
transform-origin: center;
|
||||
animation: heartBeat 1.2s ease-in-out;
|
||||
}
|
||||
|
||||
@keyframes heartBeat {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
}
|
||||
16.67% {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
33.33% {
|
||||
transform: scale(1);
|
||||
}
|
||||
50% {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
66.67% {
|
||||
transform: scale(1);
|
||||
}
|
||||
83.33% {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
52
src/lib/components/icons/animated/home.svelte
Normal file
52
src/lib/components/icons/animated/home.svelte
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path
|
||||
d='M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'
|
||||
/>
|
||||
<path d='M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8' class='target-animated-icon' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
stroke-dasharray: 22;
|
||||
stroke-dashoffset: 0;
|
||||
animation: doorAnimation 0.6s ease-out forwards;
|
||||
}
|
||||
|
||||
@keyframes doorAnimation {
|
||||
0% {
|
||||
stroke-dashoffset: 22;
|
||||
opacity: 0;
|
||||
}
|
||||
15% {
|
||||
stroke-dashoffset: 22;
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
stroke-dashoffset: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
19
src/lib/components/icons/animated/index.ts
Normal file
19
src/lib/components/icons/animated/index.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
export { default as Home } from './home.svelte'
|
||||
export { default as Search } from './search.svelte'
|
||||
export { default as Calendar } from './calendar.svelte'
|
||||
export { default as Users } from './users.svelte'
|
||||
export { default as Download } from './download.svelte'
|
||||
export { default as Bolt } from './bolt.svelte'
|
||||
export { default as LogIn } from './login.svelte'
|
||||
export { default as Messages } from './messages.svelte'
|
||||
export { default as PencilLine } from './pencilline.svelte'
|
||||
export { default as Heart } from './heart.svelte'
|
||||
export { default as Bookmark } from './bookmark.svelte'
|
||||
export { default as Clapperboard } from './clapperboard.svelte'
|
||||
export { default as ChevronRight } from './chevronright.svelte'
|
||||
export { default as ChevronLeft } from './chevronleft.svelte'
|
||||
export { default as Trash } from './trash.svelte'
|
||||
export { default as FileImage } from './fileimage.svelte'
|
||||
export { default as Minimize } from './minimize.svelte'
|
||||
export { default as Maximize } from './maximize.svelte'
|
||||
export { default as FolderSync } from './foldersync.svelte'
|
||||
37
src/lib/components/icons/animated/login.svelte
Normal file
37
src/lib/components/icons/animated/login.svelte
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible -rotate-90')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4' />
|
||||
<g>
|
||||
<polyline points='7 10 12 15 17 10' class='target-animated-icon' />
|
||||
<line x1='12' x2='12' y1='15' y2='3' class='target-animated-icon' />
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
transform: translateY(2px);
|
||||
transition: transform 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
|
||||
}
|
||||
</style>
|
||||
55
src/lib/components/icons/animated/maximize.svelte
Normal file
55
src/lib/components/icons/animated/maximize.svelte
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size: string | number = 24
|
||||
export let strokeWidth: string | number = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='M8 3H5a2 2 0 0 0-2 2v3' class='top-left target-animated-icon' />
|
||||
<path d='M21 8V5a2 2 0 0 0-2-2h-3' class='top-right target-animated-icon' />
|
||||
<path d='M3 16v3a2 2 0 0 0 2 2h3' class='bottom-left target-animated-icon' />
|
||||
<path d='M16 21h3a2 2 0 0 0 2-2v-3' class='bottom-right target-animated-icon' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
path {
|
||||
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
}
|
||||
|
||||
.bottom-right {
|
||||
transform: translate(2px, 2px);
|
||||
}
|
||||
|
||||
.bottom-left {
|
||||
transform: translate(-2px, 2px);
|
||||
}
|
||||
|
||||
.top-right {
|
||||
transform: translate(2px, -2px);
|
||||
}
|
||||
|
||||
.top-left {
|
||||
transform: translate(-2px, -2px);
|
||||
}
|
||||
|
||||
svg {
|
||||
overflow: visible;
|
||||
}
|
||||
</style>
|
||||
48
src/lib/components/icons/animated/messages.svelte
Normal file
48
src/lib/components/icons/animated/messages.svelte
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible target-animated-icon')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z' />
|
||||
<path d='M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
animation: primaryAnimation 0.5s ease-in-out;
|
||||
}
|
||||
|
||||
@keyframes primaryAnimation {
|
||||
0% {
|
||||
transform: scale(1) rotate(0deg);
|
||||
}
|
||||
20% {
|
||||
transform: scale(1.05) rotate(-7deg);
|
||||
}
|
||||
40% {
|
||||
transform: scale(1.05) rotate(7deg);
|
||||
}
|
||||
100% {
|
||||
transform: scale(1) rotate(0deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
51
src/lib/components/icons/animated/minimize.svelte
Normal file
51
src/lib/components/icons/animated/minimize.svelte
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size: string | number = 24
|
||||
export let strokeWidth: string | number = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='M8 3v3a2 2 0 0 1-2 2H3' class='top-left target-animated-icon' />
|
||||
<path d='M21 8h-3a2 2 0 0 1-2-2V3' class='top-right target-animated-icon' />
|
||||
<path d='M3 16h3a2 2 0 0 1 2 2v3' class='bottom-left target-animated-icon' />
|
||||
<path d='M16 21v-3a2 2 0 0 1 2-2h3' class='bottom-right target-animated-icon' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
path {
|
||||
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
}
|
||||
|
||||
.bottom-right {
|
||||
transform: translate(-1px, -1px);
|
||||
}
|
||||
|
||||
.top-left {
|
||||
transform: translate(1px, 1px);
|
||||
}
|
||||
|
||||
.bottom-left {
|
||||
transform: translate(1px, -1px);
|
||||
}
|
||||
|
||||
.top-right {
|
||||
transform: translate(-1px, 1px);
|
||||
}
|
||||
</style>
|
||||
51
src/lib/components/icons/animated/pencilline.svelte
Normal file
51
src/lib/components/icons/animated/pencilline.svelte
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='M12 20h9' />
|
||||
<path
|
||||
d='M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z'
|
||||
class='target-animated-icon'
|
||||
/>
|
||||
<path d='m15 5 3 3' class='target-animated-icon' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
transform-origin: 16.376px 3.622px;
|
||||
animation: penWiggle 0.5s ease-in-out 2;
|
||||
}
|
||||
|
||||
@keyframes penWiggle {
|
||||
0%,
|
||||
100% {
|
||||
transform: rotate(0deg) translate(0px, 0px);
|
||||
}
|
||||
25% {
|
||||
transform: rotate(-0.5deg) translate(-1px, 1.5px);
|
||||
}
|
||||
75% {
|
||||
transform: rotate(0.5deg) translate(1.5px, -1px);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
46
src/lib/components/icons/animated/search.svelte
Normal file
46
src/lib/components/icons/animated/search.svelte
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible target-animated-icon')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<circle cx='11' cy='11' r='8' />
|
||||
<path d='m21 21-4.3-4.3' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
animation: search-bounce 1s ease-in-out;
|
||||
}
|
||||
|
||||
@keyframes search-bounce {
|
||||
0%,
|
||||
100% {
|
||||
transform: translateX(0) translateY(0);
|
||||
}
|
||||
25% {
|
||||
transform: translateX(0) translateY(-4px);
|
||||
}
|
||||
50% {
|
||||
transform: translateX(-3px) translateY(0);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
41
src/lib/components/icons/animated/trash.svelte
Normal file
41
src/lib/components/icons/animated/trash.svelte
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible [transform-origin:center]')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<g class='target-animated-icon'>
|
||||
<path d='M3 6h18' />
|
||||
<path d='M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2' />
|
||||
</g>
|
||||
<path d='M19 8v12c0 1-1 2-2 2H7c-1 0-2-1-2-2V8' class='target-animated-icon' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
g.target-animated-icon {
|
||||
transform: translateY(-1px);
|
||||
transition: transform 0.2s ease-in;
|
||||
}
|
||||
path.target-animated-icon {
|
||||
transform: translateY(1px);
|
||||
transition: transform 0.2s ease-in;
|
||||
}
|
||||
</style>
|
||||
47
src/lib/components/icons/animated/users.svelte
Normal file
47
src/lib/components/icons/animated/users.svelte
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2' />
|
||||
<circle cx='9' cy='7' r='4' />
|
||||
<path d='M22 21v-2a4 4 0 0 0-3-3.87' class='target-animated-icon' />
|
||||
<path d='M16 3.13a4 4 0 0 1 0 7.75' class='target-animated-icon' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
animation: users-slide 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
|
||||
}
|
||||
|
||||
@keyframes users-slide {
|
||||
0% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
50% {
|
||||
transform: translateX(-6px);
|
||||
}
|
||||
100% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
17
src/lib/components/ui/avatar/avatar-fallback.svelte
Normal file
17
src/lib/components/ui/avatar/avatar-fallback.svelte
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<script lang='ts'>
|
||||
import { Avatar as AvatarPrimitive } from 'bits-ui'
|
||||
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = AvatarPrimitive.FallbackProps
|
||||
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<AvatarPrimitive.Fallback
|
||||
class={cn('bg-muted flex h-full w-full items-center justify-center rounded-full', className)}
|
||||
{...$$restProps}
|
||||
>
|
||||
<slot />
|
||||
</AvatarPrimitive.Fallback>
|
||||
19
src/lib/components/ui/avatar/avatar-image.svelte
Normal file
19
src/lib/components/ui/avatar/avatar-image.svelte
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<script lang='ts'>
|
||||
import { Avatar as AvatarPrimitive } from 'bits-ui'
|
||||
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = AvatarPrimitive.ImageProps & { alt: string | undefined | null, src: string | undefined | null }
|
||||
|
||||
let className: $$Props['class'] = undefined
|
||||
export let src: $$Props['src']
|
||||
export let alt: $$Props['alt']
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<AvatarPrimitive.Image
|
||||
{src}
|
||||
{alt}
|
||||
class={cn('aspect-square h-full w-full object-cover', className)}
|
||||
{...$$restProps}
|
||||
/>
|
||||
19
src/lib/components/ui/avatar/avatar.svelte
Normal file
19
src/lib/components/ui/avatar/avatar.svelte
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<script lang='ts'>
|
||||
import { Avatar as AvatarPrimitive } from 'bits-ui'
|
||||
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = AvatarPrimitive.Props
|
||||
|
||||
let className: $$Props['class'] = undefined
|
||||
export let delayMs: $$Props['delayMs'] = 0
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<AvatarPrimitive.Root
|
||||
{delayMs}
|
||||
class={cn('relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full', className)}
|
||||
{...$$restProps}
|
||||
>
|
||||
<slot />
|
||||
</AvatarPrimitive.Root>
|
||||
13
src/lib/components/ui/avatar/index.ts
Normal file
13
src/lib/components/ui/avatar/index.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import Fallback from './avatar-fallback.svelte'
|
||||
import Image from './avatar-image.svelte'
|
||||
import Root from './avatar.svelte'
|
||||
|
||||
export {
|
||||
Root,
|
||||
Image,
|
||||
Fallback,
|
||||
//
|
||||
Root as Avatar,
|
||||
Image as AvatarImage,
|
||||
Fallback as AvatarFallback
|
||||
}
|
||||
19
src/lib/components/ui/badge/badge.svelte
Normal file
19
src/lib/components/ui/badge/badge.svelte
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<script lang='ts'>
|
||||
import { type Variant, badgeVariants } from './index.js'
|
||||
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
let className: string | undefined | null = ''
|
||||
export let href: string | undefined = ''
|
||||
export let variant: Variant = 'default'
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svelte:element
|
||||
this={href ? 'a' : 'span'}
|
||||
{href}
|
||||
class={cn(badgeVariants({ variant, className }))}
|
||||
{...$$restProps}
|
||||
>
|
||||
<slot />
|
||||
</svelte:element>
|
||||
22
src/lib/components/ui/badge/index.ts
Normal file
22
src/lib/components/ui/badge/index.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { type VariantProps, tv } from 'tailwind-variants'
|
||||
|
||||
export { default as Badge } from './badge.svelte'
|
||||
export const badgeVariants = tv({
|
||||
base: 'focus:ring-ring inline-flex select-none items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2',
|
||||
variants: {
|
||||
variant: {
|
||||
default: 'bg-primary text-primary-foreground border-transparent shadow',
|
||||
secondary: 'bg-secondary text-secondary-foreground border-transparent',
|
||||
destructive: 'bg-destructive text-destructive-foreground border-transparent shadow',
|
||||
outline: 'text-foreground',
|
||||
success: 'bg-[#21b959] text-primary-foreground border-transparent shadow',
|
||||
warning: 'bg-[#eab308] text-primary-foreground border-transparent shadow',
|
||||
error: 'bg-[#bf2c2c] text-primary-foreground border-transparent shadow'
|
||||
}
|
||||
},
|
||||
defaultVariants: {
|
||||
variant: 'default'
|
||||
}
|
||||
})
|
||||
|
||||
export type Variant = VariantProps<typeof badgeVariants>['variant']
|
||||
49
src/lib/components/ui/banner/banner-image.svelte
Normal file
49
src/lib/components/ui/banner/banner-image.svelte
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<script lang='ts' context='module'>
|
||||
import { writable } from 'simple-store-svelte'
|
||||
|
||||
import type { Media } from '$lib/modules/anilist'
|
||||
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export const bannerSrc = writable<Media | null>(null)
|
||||
|
||||
export const hideBanner = writable(false)
|
||||
</script>
|
||||
|
||||
<script lang='ts'>
|
||||
import { Banner } from '../img'
|
||||
|
||||
import type { HTMLAttributes } from 'svelte/elements'
|
||||
|
||||
type $$Props = HTMLAttributes<HTMLImageElement>
|
||||
|
||||
let className: $$Props['class'] = ''
|
||||
export { className as class } // TODO: needs nice animations, should update to coverimage on mobile width
|
||||
</script>
|
||||
|
||||
{#if $bannerSrc}
|
||||
<div class={cn('object-cover w-screen absolute top-0 left-0 h-full overflow-hidden pointer-events-none bg-black banner', className)}>
|
||||
{#key $bannerSrc.id}
|
||||
<Banner media={$bannerSrc} class='min-w-[100vw] w-screen h-[23rem] object-cover {$hideBanner ? 'opacity-10' : 'opacity-100'} transition-opacity duration-500 banner-gr relative' />
|
||||
{/key}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
:global(div.banner-gr::after) {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0 ; bottom: 0;
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
background: linear-gradient(1turn, rgb(3, 3, 3) 8.98%, rgba(0, 0, 0, 0) 100%);
|
||||
}
|
||||
.banner::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0 ; top: 0;
|
||||
width: 100%; height: 23rem;
|
||||
z-index: 0;
|
||||
background: rgba(0, 0, 0, .4);
|
||||
}
|
||||
</style>
|
||||
50
src/lib/components/ui/banner/banner.svelte
Normal file
50
src/lib/components/ui/banner/banner.svelte
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<script lang='ts' context='module'>
|
||||
import { client, currentSeason, currentYear } from '$lib/modules/anilist'
|
||||
|
||||
const query = client.search({ sort: ['POPULARITY_DESC'], perPage: 15, season: currentSeason, seasonYear: currentYear, statusNot: ['NOT_YET_RELEASED'] }, true)
|
||||
query.subscribe(() => undefined) // this is hacky as shit, but prevents query from re-running
|
||||
</script>
|
||||
|
||||
<script lang='ts'>
|
||||
import { onDestroy } from 'svelte'
|
||||
import { get } from 'svelte/store'
|
||||
|
||||
import FullBanner from './full-banner.svelte'
|
||||
import SkeletonBanner from './skeleton-banner.svelte'
|
||||
|
||||
onDestroy(() => {
|
||||
query.pause()
|
||||
})
|
||||
|
||||
if (get(query.isPaused$)) query.resume()
|
||||
</script>
|
||||
|
||||
<div class='w-full h-[400px] relative'>
|
||||
<!-- really shit and hacky way of fixing scroll position jumping when banner changes height -->
|
||||
<div class='absolute top-0 transparent h-full opacity-0'>.</div>
|
||||
{#if $query.fetching}
|
||||
<SkeletonBanner />
|
||||
{/if}
|
||||
{#if $query.error}
|
||||
<div class='p-5 flex items-center justify-center w-full h-72'>
|
||||
<div>
|
||||
<div class='mb-1 font-bold text-4xl text-center '>
|
||||
Ooops!
|
||||
</div>
|
||||
<div class='text-lg text-center text-muted-foreground'>
|
||||
Looks like something went wrong!
|
||||
</div>
|
||||
<div class='text-lg text-center text-muted-foreground'>
|
||||
{$query.error.message}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{#if $query.data}
|
||||
{#if $query.data.Page?.media}
|
||||
<FullBanner mediaList={$query.data.Page.media} />
|
||||
{:else}
|
||||
<SkeletonBanner />
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
138
src/lib/components/ui/banner/full-banner.svelte
Normal file
138
src/lib/components/ui/banner/full-banner.svelte
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
<script lang='ts'>
|
||||
import { onDestroy } from 'svelte'
|
||||
|
||||
import { BookmarkButton, FavoriteButton, PlayButton } from '../button/extra'
|
||||
|
||||
import { bannerSrc } from './banner-image.svelte'
|
||||
|
||||
import { desc, duration, format, season, title, type Media } from '$lib/modules/anilist'
|
||||
import { of } from '$lib/modules/auth'
|
||||
import { click } from '$lib/modules/navigate'
|
||||
export let mediaList: Array<Media | null>
|
||||
|
||||
function shuffle <T extends unknown[]> (array: T): T {
|
||||
let currentIndex = array.length
|
||||
let randomIndex
|
||||
|
||||
while (currentIndex > 0) {
|
||||
randomIndex = Math.floor(Math.random() * currentIndex--);
|
||||
|
||||
[array[currentIndex], array[randomIndex]] = [array[randomIndex], array[currentIndex]]
|
||||
}
|
||||
|
||||
return array
|
||||
}
|
||||
|
||||
function shuffleAndFilter (media: Array<Media | null>) {
|
||||
return shuffle(media).filter(media => media?.bannerImage ?? media?.trailer?.id).slice(0, 5) as Media[]
|
||||
}
|
||||
|
||||
const shuffled = shuffleAndFilter(mediaList)
|
||||
|
||||
// TODO: this assertion is incorrect!
|
||||
let current = shuffled[0]!
|
||||
|
||||
const initial = bannerSrc.value
|
||||
|
||||
$: bannerSrc.value = current
|
||||
|
||||
onDestroy(() => {
|
||||
bannerSrc.value = initial
|
||||
})
|
||||
|
||||
function currentIndex () {
|
||||
return shuffled.indexOf(current)
|
||||
}
|
||||
|
||||
function schedule (index: number) {
|
||||
return setTimeout(() => {
|
||||
current = shuffled[index % shuffled.length]!
|
||||
timeout = schedule(index + 1)
|
||||
}, 15000)
|
||||
}
|
||||
|
||||
let timeout = schedule(currentIndex() + 1)
|
||||
|
||||
function setCurrent (media: Media) {
|
||||
if (current === media) return
|
||||
clearTimeout(timeout)
|
||||
current = media
|
||||
timeout = schedule(currentIndex() + 1)
|
||||
}
|
||||
function tabindex (node: HTMLElement) {
|
||||
node.tabIndex = -1
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class='pl-5 pb-5 justify-end flex flex-col h-full max-w-full'>
|
||||
{#key current}
|
||||
<a class='text-white font-black text-4xl line-clamp-1 w-[900px] max-w-full leading-tight fade-in hover:text-neutral-300 hover:underline cursor-pointer' href='/app/anime/{current.id}'>
|
||||
{title(current)}
|
||||
</a>
|
||||
<div class='details text-white capitalize pt-3 pb-2 flex w-[600px] max-w-full text-xs fade-in'>
|
||||
<span class='text-nowrap flex items-center'>
|
||||
{format(current)}
|
||||
</span>
|
||||
<span class='text-nowrap flex items-center'>
|
||||
{of(current) ?? duration(current) ?? 'N/A'}
|
||||
</span>
|
||||
<span class='text-nowrap flex items-center'>
|
||||
{season(current)}
|
||||
</span>
|
||||
</div>
|
||||
<div class='text-muted-foreground line-clamp-2 w-[600px] max-w-full text-sm fade-in'>
|
||||
{desc(current)}
|
||||
</div>
|
||||
<div class='details text-white text-capitalize py-3 flex w-[600px] max-w-full text-xs fade-in'>
|
||||
{#each current.genres ?? [] as genre (genre)}
|
||||
<span class='text-nowrap flex items-center'>
|
||||
{genre}
|
||||
</span>
|
||||
{/each}
|
||||
</div>
|
||||
<div class='flex flex-row pb-2 w-[230px] max-w-full'>
|
||||
<PlayButton media={current} class='grow' />
|
||||
<FavoriteButton media={current} class='ml-2' />
|
||||
<BookmarkButton media={current} class='ml-2' />
|
||||
</div>
|
||||
{/key}
|
||||
<div class='flex'>
|
||||
{#each shuffled as media (media.id)}
|
||||
{@const active = current === media}
|
||||
<div class='pt-2 pb-1' class:cursor-pointer={!active} use:click={() => setCurrent(media)} use:tabindex>
|
||||
<div class='bg-neutral-800 mr-2 progress-badge overflow-clip rounded' class:active style='height: 4px;' style:width={active ? '3rem' : '1.5rem'}>
|
||||
<div class='progress-content h-full transform-gpu w-full' class:bg-white={active} />
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.progress-badge {
|
||||
transition: width .7s ease;
|
||||
}
|
||||
.progress-badge.active .progress-content {
|
||||
animation: fill 15s linear;
|
||||
}
|
||||
|
||||
@keyframes fill {
|
||||
from {
|
||||
transform: translate3d(-100%, var(--tw-translate-y), 0);
|
||||
}
|
||||
to {
|
||||
transform: translate3d(0%, var(--tw-translate-y), 0);
|
||||
}
|
||||
}
|
||||
.details span + span::before {
|
||||
content: '•';
|
||||
padding: 0 .5rem;
|
||||
font-size: .6rem;
|
||||
align-self: center;
|
||||
white-space: normal;
|
||||
color: #737373 !important;
|
||||
}
|
||||
.fade-in {
|
||||
animation: fade-in ease .8s;
|
||||
}
|
||||
</style>
|
||||
3
src/lib/components/ui/banner/index.ts
Normal file
3
src/lib/components/ui/banner/index.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export { default as BannerImage } from './banner-image.svelte'
|
||||
export { default as Banner } from './banner.svelte'
|
||||
export * from './banner-image.svelte'
|
||||
11
src/lib/components/ui/banner/skeleton-banner.svelte
Normal file
11
src/lib/components/ui/banner/skeleton-banner.svelte
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<div class='pl-5 pb-5 justify-end flex flex-col h-full max-w-full'>
|
||||
<div class='bg-primary/5 animate-pulse rounded w-[500px] h-6 mb-1' />
|
||||
<div class='my-5 h-1.5 w-[250px] bg-primary/5 animate-pulse rounded' />
|
||||
<div class='h-2.5 w-[450px] bg-primary/5 animate-pulse rounded mb-2' />
|
||||
<div class='h-2.5 w-[350px] bg-primary/5 animate-pulse rounded mb-2' />
|
||||
<div class='h-2.5 w-[300px] bg-primary/5 animate-pulse rounded mb-2' />
|
||||
<div class='h-2.5 w-[250px] bg-primary/5 animate-pulse rounded mb-2' />
|
||||
<div class='my-3 h-1.5 w-[150px] bg-primary/5 animate-pulse rounded' />
|
||||
<div class='mb-4 h-6 w-[160px] bg-primary/5 animate-pulse rounded' />
|
||||
<div class='mb-3' />
|
||||
</div>
|
||||
32
src/lib/components/ui/button/bookmark.svelte
Normal file
32
src/lib/components/ui/button/bookmark.svelte
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<script lang='ts'>
|
||||
import type { Media } from '$lib/modules/anilist'
|
||||
|
||||
import { Bookmark } from '$lib/components/icons/animated'
|
||||
import { Button, iconSizes, type Props } from '$lib/components/ui/button'
|
||||
import { list, authAggregator, lists } from '$lib/modules/auth'
|
||||
import { clickwrap, keywrap } from '$lib/modules/navigate'
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
type $$Props = Props & { media: Media }
|
||||
|
||||
let className: $$Props['class'] = ''
|
||||
export { className as class }
|
||||
export let media: Media
|
||||
|
||||
export let size: NonNullable<$$Props['size']> = 'icon-sm'
|
||||
export let variant: NonNullable<$$Props['variant']> = 'ghost'
|
||||
|
||||
async function toggleBookmark () {
|
||||
if (!list(media)) {
|
||||
await authAggregator.entry({ id: media.id, status: 'PLANNING', lists: lists(media)?.filter(({ enabled }) => enabled).map(({ name }) => name) })
|
||||
} else {
|
||||
await authAggregator.delete(media)
|
||||
}
|
||||
++key
|
||||
}
|
||||
let key = 1
|
||||
</script>
|
||||
|
||||
<Button {size} {variant} class={cn(className, 'animated-icon')} on:click={clickwrap(toggleBookmark)} on:keydown={keywrap(toggleBookmark)}>
|
||||
<Bookmark fill={key && list(media) ? 'currentColor' : 'transparent'} size={iconSizes[size]} />
|
||||
</Button>
|
||||
26
src/lib/components/ui/button/button.svelte
Normal file
26
src/lib/components/ui/button/button.svelte
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<script lang='ts'>
|
||||
import { Button as ButtonPrimitive } from 'bits-ui'
|
||||
|
||||
import { type Props, buttonVariants } from './index.js'
|
||||
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = Props
|
||||
|
||||
let className: $$Props['class'] = ''
|
||||
export let variant: $$Props['variant'] = 'default'
|
||||
export let size: $$Props['size'] = 'default'
|
||||
export let builders: $$Props['builders'] = []
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<ButtonPrimitive.Root
|
||||
{builders}
|
||||
class={cn(buttonVariants({ variant, size, className }))}
|
||||
type='button'
|
||||
{...$$restProps}
|
||||
on:click
|
||||
on:pointerdown
|
||||
on:keydown>
|
||||
<slot />
|
||||
</ButtonPrimitive.Root>
|
||||
11
src/lib/components/ui/button/extra.ts
Normal file
11
src/lib/components/ui/button/extra.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import Bookmark from './bookmark.svelte'
|
||||
import Favorite from './favorite.svelte'
|
||||
import Play from './play.svelte'
|
||||
import Transition from './transition.svelte'
|
||||
|
||||
export {
|
||||
Play as PlayButton,
|
||||
Favorite as FavoriteButton,
|
||||
Bookmark as BookmarkButton,
|
||||
Transition as TransitionButton
|
||||
}
|
||||
28
src/lib/components/ui/button/favorite.svelte
Normal file
28
src/lib/components/ui/button/favorite.svelte
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<script lang='ts'>
|
||||
import type { Media } from '$lib/modules/anilist'
|
||||
|
||||
import { Heart } from '$lib/components/icons/animated'
|
||||
import { Button, iconSizes, type Props } from '$lib/components/ui/button'
|
||||
import { authAggregator, fav } from '$lib/modules/auth'
|
||||
import { clickwrap, keywrap } from '$lib/modules/navigate'
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
type $$Props = Props & { media: Media }
|
||||
|
||||
let className: $$Props['class'] = ''
|
||||
export { className as class }
|
||||
export let media: Media
|
||||
export let size: NonNullable<$$Props['size']> = 'icon-sm'
|
||||
export let variant: NonNullable<$$Props['variant']> = 'ghost'
|
||||
|
||||
let key = 1
|
||||
|
||||
async function toggleFav () {
|
||||
await authAggregator.toggleFav(media.id)
|
||||
++key
|
||||
}
|
||||
</script>
|
||||
|
||||
<Button {size} {variant} class={cn(className, 'animated-icon')} on:click={clickwrap(toggleFav)} on:keydown={keywrap(toggleFav)} on:click={() => ++key}>
|
||||
<Heart fill={key && fav(media) ? 'currentColor' : 'transparent'} size={iconSizes[size]} />
|
||||
</Button>
|
||||
61
src/lib/components/ui/button/index.ts
Normal file
61
src/lib/components/ui/button/index.ts
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
import { type VariantProps, tv } from 'tailwind-variants'
|
||||
|
||||
import Root from './button.svelte'
|
||||
|
||||
import type { Button as ButtonPrimitive } from 'bits-ui'
|
||||
|
||||
const buttonVariants = tv({
|
||||
base: 'bg-transparent focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 disabled:pointer-events-none disabled:opacity-50',
|
||||
variants: {
|
||||
variant: {
|
||||
default: 'bg-primary text-primary-foreground select:bg-neutral-500 shadow',
|
||||
destructive: 'bg-destructive text-destructive-foreground select:bg-destructive/90 shadow-sm',
|
||||
outline: 'border-input bg-background select:bg-accent select:text-accent-foreground border shadow-sm',
|
||||
secondary: 'bg-secondary text-secondary-foreground select:bg-secondary/70 shadow-sm',
|
||||
ghost: 'select:bg-secondary-foreground/30 select:text-accent-foreground',
|
||||
link: 'text-primary underline-offset-4 select:underline'
|
||||
},
|
||||
size: {
|
||||
default: 'h-9 px-4 py-2',
|
||||
sm: 'h-8 rounded-md px-3 text-xs',
|
||||
xs: 'h-[1.6rem] rounded-sm px-2 text-xs',
|
||||
lg: 'h-10 rounded-md px-8',
|
||||
icon: 'h-9 w-9',
|
||||
'icon-sm': 'h-[1.6rem] w-[1.6rem] rounded-sm text-xs'
|
||||
}
|
||||
},
|
||||
defaultVariants: {
|
||||
variant: 'default',
|
||||
size: 'default'
|
||||
}
|
||||
})
|
||||
|
||||
const iconSizes = {
|
||||
xs: '0.6rem',
|
||||
sm: '0.7rem',
|
||||
default: '0.8rem',
|
||||
lg: '1.2rem',
|
||||
icon: '1rem',
|
||||
'icon-sm': '0.7rem'
|
||||
}
|
||||
|
||||
type Variant = VariantProps<typeof buttonVariants>['variant']
|
||||
type Size = VariantProps<typeof buttonVariants>['size']
|
||||
|
||||
type Props = ButtonPrimitive.Props & {
|
||||
variant?: Variant
|
||||
size?: Size
|
||||
}
|
||||
|
||||
type Events = ButtonPrimitive.Events
|
||||
|
||||
export {
|
||||
Root,
|
||||
type Props,
|
||||
type Events,
|
||||
Root as Button,
|
||||
type Props as ButtonProps,
|
||||
type Events as ButtonEvents,
|
||||
buttonVariants,
|
||||
iconSizes
|
||||
}
|
||||
35
src/lib/components/ui/button/play.svelte
Normal file
35
src/lib/components/ui/button/play.svelte
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<script lang='ts'>
|
||||
import Play from 'lucide-svelte/icons/play'
|
||||
|
||||
import { playEp } from '../player/mediahandler.svelte'
|
||||
|
||||
import type { Media } from '$lib/modules/anilist'
|
||||
|
||||
import { Button, iconSizes, type Props } from '$lib/components/ui/button'
|
||||
import { list, progress } from '$lib/modules/auth'
|
||||
import { clickwrap, keywrap } from '$lib/modules/navigate'
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
type $$Props = Props & { media: Media }
|
||||
|
||||
let className: $$Props['class'] = ''
|
||||
export { className as class }
|
||||
export let media: Media
|
||||
export let size: NonNullable<$$Props['size']> = 'xs'
|
||||
function play () {
|
||||
const episode = (progress(media) ?? 0) + 1
|
||||
$playEp(media, episode)
|
||||
}
|
||||
</script>
|
||||
|
||||
<Button class={cn(className, 'font-bold flex items-center justify-center')} {size} on:click={clickwrap(play)} on:keydown={keywrap(play)}>
|
||||
<Play fill='currentColor' class='mr-2' size={iconSizes[size]} />
|
||||
{@const status = list(media)}
|
||||
{#if status === 'COMPLETED'}
|
||||
Rewatch
|
||||
{:else if status === 'CURRENT' || status === 'REPEATING' || status === 'PAUSED'}
|
||||
Continue
|
||||
{:else}
|
||||
Watch Now
|
||||
{/if}
|
||||
</Button>
|
||||
61
src/lib/components/ui/button/progress-button.svelte
Normal file
61
src/lib/components/ui/button/progress-button.svelte
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<script lang='ts'>
|
||||
import { Button as ButtonPrimitive } from 'bits-ui'
|
||||
|
||||
import { type Props, buttonVariants } from './index.js'
|
||||
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = Props & { duration?: number, autoStart?: boolean, onclick: () => void, animating?: boolean }
|
||||
|
||||
export let duration = 5000 // timeout duration in ms
|
||||
export let autoStart = false
|
||||
export let variant: Props['variant'] = 'default'
|
||||
export let size: NonNullable<$$Props['size']> = 'xs'
|
||||
export let onclick: () => void
|
||||
|
||||
let className: $$Props['class'] = ''
|
||||
export { className as class }
|
||||
|
||||
export let animating = false
|
||||
|
||||
function startAnimation () {
|
||||
animating = true
|
||||
}
|
||||
|
||||
function stopAnimation () {
|
||||
animating = false
|
||||
}
|
||||
|
||||
if (autoStart) startAnimation()
|
||||
|
||||
function handleAnimationEnd () {
|
||||
animating = false
|
||||
onclick()
|
||||
}
|
||||
</script>
|
||||
|
||||
<ButtonPrimitive.Root
|
||||
class={cn(
|
||||
'relative overflow-hidden',
|
||||
buttonVariants({ variant, size, className })
|
||||
)}
|
||||
type='button'
|
||||
on:click={stopAnimation}
|
||||
on:click={onclick}>
|
||||
<slot />
|
||||
<div
|
||||
class='absolute inset-0 bg-black/20 pointer-events-none translate-x-full'
|
||||
class:animate-progress={animating}
|
||||
style='animation-duration: {duration}ms;'
|
||||
on:animationend={handleAnimationEnd} />
|
||||
</ButtonPrimitive.Root>
|
||||
|
||||
<style>
|
||||
@keyframes progressBar {
|
||||
from { transform: translateX(0%); }
|
||||
to { transform: translateX(100%); }
|
||||
}
|
||||
.animate-progress {
|
||||
animation: progressBar linear forwards;
|
||||
}
|
||||
</style>
|
||||
39
src/lib/components/ui/button/transition.svelte
Normal file
39
src/lib/components/ui/button/transition.svelte
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<script lang='ts'>
|
||||
import { Button, type Props } from '$lib/components/ui/button'
|
||||
import { clickwrap, keywrap } from '$lib/modules/navigate'
|
||||
import { cn, scaleBlurFade } from '$lib/utils'
|
||||
|
||||
type $$Props = Props & { duration?: number }
|
||||
export let duration: $$Props['duration'] = 300
|
||||
|
||||
let className: $$Props['class'] = ''
|
||||
export { className as class }
|
||||
|
||||
let toggled = false
|
||||
let timeout: ReturnType<typeof setTimeout>
|
||||
|
||||
export let size: NonNullable<$$Props['size']> = 'icon-sm'
|
||||
export let variant: NonNullable<$$Props['variant']> = 'ghost'
|
||||
|
||||
function handleClick () {
|
||||
if (toggled) return
|
||||
|
||||
toggled = true
|
||||
clearTimeout(timeout)
|
||||
timeout = setTimeout(() => {
|
||||
toggled = false
|
||||
}, duration! + 500)
|
||||
}
|
||||
</script>
|
||||
|
||||
<Button {size} {variant} class={cn(className, 'relative')} on:click={clickwrap(handleClick)} on:click on:keydown={keywrap(handleClick)}>
|
||||
{#if toggled}
|
||||
<div class='absolute inset-0 flex items-center justify-center' transition:scaleBlurFade={{ duration }}>
|
||||
<slot name='transition' />
|
||||
</div>
|
||||
{:else}
|
||||
<div class='absolute inset-0 flex items-center justify-center' transition:scaleBlurFade={{ duration }}>
|
||||
<slot name='base' />
|
||||
</div>
|
||||
{/if}
|
||||
</Button>
|
||||
110
src/lib/components/ui/cards/YoutubeIframe.svelte
Normal file
110
src/lib/components/ui/cards/YoutubeIframe.svelte
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
<script lang='ts'>
|
||||
import Volume2 from 'lucide-svelte/icons/volume-2'
|
||||
import VolumeX from 'lucide-svelte/icons/volume-x'
|
||||
import { createEventDispatcher, onDestroy } from 'svelte'
|
||||
|
||||
import { click } from '$lib/modules/navigate'
|
||||
|
||||
export let id: string
|
||||
|
||||
const dispatch = createEventDispatcher<{hide: boolean}>()
|
||||
|
||||
function ytMessage (e: MessageEvent) {
|
||||
if (e.origin !== 'https://www.youtube-nocookie.com') return
|
||||
clearInterval(timeout)
|
||||
const json = JSON.parse(e.data as string) as { event: string, info: {videoData: {isPlayable: boolean}, playerState?: number} }
|
||||
if (json.event === 'onReady') ytCall('setVolume', '[30]')
|
||||
|
||||
if (json.event === 'initialDelivery' && !json.info.videoData.isPlayable) {
|
||||
dispatch('hide', true)
|
||||
}
|
||||
|
||||
if (json.event === 'infoDelivery' && json.info.playerState === 1) {
|
||||
hide = false
|
||||
dispatch('hide', false)
|
||||
}
|
||||
}
|
||||
|
||||
let muted = true
|
||||
function toggleMute () {
|
||||
if (muted) {
|
||||
ytCall('unMute')
|
||||
} else {
|
||||
ytCall('mute')
|
||||
}
|
||||
muted = !muted
|
||||
}
|
||||
|
||||
let hide = true
|
||||
|
||||
let frame: HTMLIFrameElement
|
||||
function ytCall (action: string, arg: string | null = null) {
|
||||
frame.contentWindow?.postMessage('{"event":"command", "func":"' + action + '", "args":' + arg + '}', '*')
|
||||
}
|
||||
|
||||
let timeout: ReturnType<typeof setInterval>
|
||||
|
||||
function initFrame () {
|
||||
timeout = setInterval(() => {
|
||||
frame.contentWindow?.postMessage('{"event":"listening","id":1,"channel":"widget"}', '*')
|
||||
}, 100)
|
||||
frame.contentWindow?.postMessage('{"event":"listening","id":1,"channel":"widget"}', '*')
|
||||
}
|
||||
|
||||
onDestroy(() => {
|
||||
clearInterval(timeout)
|
||||
})
|
||||
</script>
|
||||
|
||||
<svelte:window on:message={ytMessage} />
|
||||
|
||||
<!-- indivious is nice because its faster, but not reliable -->
|
||||
<!-- <video src={`https://inv.tux.pizza/latest_version?id=${media.trailer.id}&itag=18`}
|
||||
class='w-full h-full position-absolute left-0'
|
||||
class:d-none={hide}
|
||||
playsinline
|
||||
preload='none'
|
||||
loop
|
||||
use:volume
|
||||
bind:muted
|
||||
on:loadeddata={() => { hide = false }}
|
||||
autoplay /> -->
|
||||
|
||||
<div class='h-full w-full overflow-clip absolute top-0 rounded-t'>
|
||||
<div class='absolute z-10 top-0 right-0 p-3' class:hide use:click={toggleMute}>
|
||||
{#if muted}
|
||||
<VolumeX size='1rem' fill='currentColor' class='pointer-events-none' />
|
||||
{:else}
|
||||
<Volume2 size='1rem' fill='currentColor' class='pointer-events-none' />
|
||||
{/if}
|
||||
</div>
|
||||
<iframe
|
||||
class='w-full border-0 absolute left-0 h-[calc(100%+200px)] top-1/2 transform-gpu -translate-y-1/2 pointer-events-none'
|
||||
class:hide
|
||||
title='trailer'
|
||||
allow='autoplay'
|
||||
allowfullscreen
|
||||
bind:this={frame}
|
||||
on:load={initFrame}
|
||||
src='https://www.youtube-nocookie.com/embed/{id}?enablejsapi=1&autoplay=1&controls=0&mute=1&disablekb=1&loop=1&playlist={id}&cc_lang_pref=ja'
|
||||
/>
|
||||
</div>
|
||||
<div class='h-full w-full overflow-clip absolute top-0 rounded-t blur-2xl saturate-200 -z-10 pointer-events-none'>
|
||||
<iframe
|
||||
class='w-full border-0 absolute left-0 h-[calc(100%+200px)] top-1/2 transform-gpu -translate-y-1/2'
|
||||
class:hide
|
||||
title='trailer'
|
||||
allow='autoplay'
|
||||
allowfullscreen
|
||||
src='https://www.youtube-nocookie.com/embed/{id}?autoplay=1&controls=0&mute=1&disablekb=1&loop=1&playlist={id}&cc_lang_pref=ja'
|
||||
/>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.absolute {
|
||||
transition: opacity 0.3s;
|
||||
}
|
||||
.absolute.hide {
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
||||
77
src/lib/components/ui/cards/episode.svelte
Normal file
77
src/lib/components/ui/cards/episode.svelte
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
<script lang='ts'>
|
||||
import CalendarDays from 'lucide-svelte/icons/calendar-days'
|
||||
import Tv from 'lucide-svelte/icons/tv'
|
||||
|
||||
import StatusDot from '../../StatusDot.svelte'
|
||||
import { Load } from '../img'
|
||||
|
||||
import PreviewCard from './preview.svelte'
|
||||
|
||||
import type { Media } from '$lib/modules/anilist/types'
|
||||
import type { TraceAnime } from '$lib/utils'
|
||||
|
||||
import { goto } from '$app/navigation'
|
||||
import { coverMedium, format, title } from '$lib/modules/anilist/util'
|
||||
import { list } from '$lib/modules/auth'
|
||||
import { hover } from '$lib/modules/navigate'
|
||||
|
||||
export let media: Media
|
||||
|
||||
export let trace: TraceAnime | undefined
|
||||
|
||||
let hidden = true
|
||||
|
||||
function onclick () {
|
||||
goto(`/app/anime/${media.id}`)
|
||||
}
|
||||
function onhover (state: boolean) {
|
||||
hidden = !state
|
||||
}
|
||||
|
||||
$: status = list(media)
|
||||
</script>
|
||||
|
||||
<div class='text-white p-4 cursor-pointer shrink-0 relative pointer-events-auto' class:z-40={!hidden} use:hover={[onclick, onhover]}>
|
||||
{#if !hidden}
|
||||
<PreviewCard {media} {trace} />
|
||||
{/if}
|
||||
<div class='item w-[16rem] flex flex-col'>
|
||||
<div class='h-[9rem]'>
|
||||
<Load src={trace?.image ?? coverMedium(media)} alt='cover' class='object-cover w-full h-full rounded' color={media.coverImage?.color} />
|
||||
</div>
|
||||
<div class='flex justify-between pt-3 gap-2'>
|
||||
<div class='font-black text-[.8rem] line-clamp-2'>
|
||||
{#if status}
|
||||
<StatusDot variant={status} />
|
||||
{/if}
|
||||
{title(media)}
|
||||
</div>
|
||||
{#if trace}
|
||||
<div class='text-xs font-medium flex-shrink-0 text-right'>
|
||||
<div class='pt-[1px]'>
|
||||
Episode {trace.episode}
|
||||
</div>
|
||||
<div class='text-neutral-500 mt-0.5'>
|
||||
{Math.round(trace.similarity * 100)}%
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class='flex text-neutral-500 mt-auto pt-2 justify-between'>
|
||||
<div class='flex text-xs font-medium'>
|
||||
<CalendarDays class='w-[1rem] h-[1rem] mr-1 -ml-0.5' />
|
||||
{media.seasonYear ?? 'TBA'}
|
||||
</div>
|
||||
<div class='flex text-xs font-medium'>
|
||||
{format(media)}
|
||||
<Tv class='w-[1rem] h-[1rem] ml-1 -mr-0.5' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.item {
|
||||
animation: 0.3s ease 0s 1 load-in;
|
||||
}
|
||||
</style>
|
||||
6
src/lib/components/ui/cards/index.ts
Normal file
6
src/lib/components/ui/cards/index.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
export { default as SmallCard } from './small.svelte'
|
||||
export { default as SkeletonCard } from './skeleton.svelte'
|
||||
export { default as SkeletonTraceCard } from './skeletontrace.svelte'
|
||||
export { default as QueryCard } from './query.svelte'
|
||||
export { default as EpisodeCard } from './episode.svelte'
|
||||
export { default as TraceCards } from './trace.svelte'
|
||||
94
src/lib/components/ui/cards/preview.svelte
Normal file
94
src/lib/components/ui/cards/preview.svelte
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
<script lang='ts'>
|
||||
import { BookmarkButton, FavoriteButton, PlayButton } from '../button/extra'
|
||||
import { Banner } from '../img'
|
||||
import Load from '../img/load.svelte'
|
||||
|
||||
import YoutubeIframe from './YoutubeIframe.svelte'
|
||||
import Videoframe from './videoframe.svelte'
|
||||
|
||||
import { desc, duration, format, season, title, type Media } from '$lib/modules/anilist'
|
||||
import { of } from '$lib/modules/auth'
|
||||
import { SUPPORTS } from '$lib/modules/settings'
|
||||
import { cn, type TraceAnime } from '$lib/utils'
|
||||
|
||||
export let media: Media
|
||||
|
||||
export let trace: TraceAnime | undefined = undefined
|
||||
|
||||
let hideFrame: boolean | null = null
|
||||
function hide (e: CustomEvent<boolean>) {
|
||||
hideFrame = e.detail
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class='!absolute w-[17.5rem] h-80 left-1/2 right-1/2 top-0 bottom-0 m-auto bg-neutral-950 z-30 rounded cursor-pointer absolute-container'>
|
||||
<div class='h-[45%] banner relative bg-black rounded-t'>
|
||||
{#if trace}
|
||||
{#if !SUPPORTS.isUnderPowered}
|
||||
<Load src={trace.image} alt={media.title?.english} class={cn('object-cover w-full h-full blur-2xl saturate-200 absolute -z-10', hideFrame === false && 'hidden')} />
|
||||
{/if}
|
||||
<Load src={trace.image} alt={media.title?.english} class='object-cover w-full h-full rounded-t' />
|
||||
<Videoframe src={trace.video} on:hide={hide} />
|
||||
{:else}
|
||||
{#if !SUPPORTS.isUnderPowered}
|
||||
<Banner {media} class={cn('object-cover w-full h-full blur-2xl saturate-200 absolute -z-10', hideFrame === false && 'hidden')} />
|
||||
{/if}
|
||||
<Banner {media} class='object-cover w-full h-full rounded-t' />
|
||||
{#if media.trailer?.id && !hideFrame && !SUPPORTS.isUnderPowered}
|
||||
<YoutubeIframe id={media.trailer.id} on:hide={hide} />
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
<div class='w-full px-4 bg-neutral-950'>
|
||||
<div class='text-lg font-bold truncate inline-block w-full text-white pt-2' title={title(media)}>
|
||||
{title(media)}
|
||||
</div>
|
||||
<div class='flex flex-row'>
|
||||
<PlayButton {media} class='grow' />
|
||||
<FavoriteButton {media} class='ml-2' />
|
||||
<BookmarkButton {media} class='ml-2' />
|
||||
</div>
|
||||
<div class='details text-white capitalize pt-3 pb-2 flex text-[11px] overflow-clip text-ellipsis text-nowrap'>
|
||||
<span class='text-nowrap flex items-center'>
|
||||
{format(media)}
|
||||
</span>
|
||||
<span class='text-nowrap flex items-center'>
|
||||
{of(media) ?? duration(media) ?? 'N/A' }
|
||||
</span>
|
||||
<span class='text-nowrap flex items-center'>
|
||||
{season(media)}
|
||||
</span>
|
||||
{#if media.averageScore}
|
||||
<span class='text-nowrap flex items-center text-ellipsis'>
|
||||
{media.averageScore}%
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
<div class='w-full h-full overflow-clip text-[.7rem] text-muted-foreground line-clamp-4'>
|
||||
{desc(media)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.banner::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0 ; bottom: 0;
|
||||
/* when clicking, translate fucks up the position, and video might leak down 1 or 2 pixels, stickig under the gradient, look bad */
|
||||
margin-bottom: -2px;
|
||||
width: 100%; height: 100% ;
|
||||
background: linear-gradient(180deg, #0000 0%, #0a0a0a00 80%, #0a0a0ae3 95%, #0a0a0a 100%);
|
||||
}
|
||||
.absolute-container {
|
||||
animation: 0.3s ease 0s 1 load-in;
|
||||
transform: translate3d(-50%, 0, 0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(1) scaleY(1);
|
||||
opacity: 1;
|
||||
}
|
||||
@keyframes load-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translate3d(-50%, 1.2rem, 0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(0.95) scaleY(0.95);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
71
src/lib/components/ui/cards/query.svelte
Normal file
71
src/lib/components/ui/cards/query.svelte
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
<script lang='ts'>
|
||||
import type { client } from '$lib/modules/anilist'
|
||||
|
||||
import { SkeletonCard, SmallCard } from '$lib/components/ui/cards'
|
||||
|
||||
export let query: ReturnType<typeof client.search>
|
||||
|
||||
$: paused = query.isPaused$
|
||||
|
||||
function deferredLoad (element: HTMLDivElement) {
|
||||
const observer = new IntersectionObserver(([entry]) => {
|
||||
if (entry?.isIntersecting) {
|
||||
query.resume()
|
||||
observer.unobserve(element)
|
||||
}
|
||||
}, { threshold: 0 })
|
||||
observer.observe(element)
|
||||
|
||||
return { destroy () { observer.unobserve(element) } }
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if $paused}
|
||||
<div class='w-0 h-0' use:deferredLoad />
|
||||
{/if}
|
||||
{#if $query.fetching}
|
||||
{#each Array.from({ length: 50 }) as _, i (i)}
|
||||
<SkeletonCard />
|
||||
{/each}
|
||||
{:else if $query.error}
|
||||
<div class='p-5 flex items-center justify-center w-full h-80'>
|
||||
<div>
|
||||
<div class='mb-1 font-bold text-4xl text-center '>
|
||||
Ooops!
|
||||
</div>
|
||||
<div class='text-lg text-center text-muted-foreground'>
|
||||
Looks like something went wrong!
|
||||
</div>
|
||||
<div class='text-lg text-center text-muted-foreground'>
|
||||
{$query.error.message}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{:else if $query.data}
|
||||
{#if $query.data.Page?.media}
|
||||
{#each $query.data.Page.media as media, i (media?.id ?? '#' + i)}
|
||||
{#if media}
|
||||
<SmallCard {media} />
|
||||
{/if}
|
||||
{:else}
|
||||
<div class='p-5 flex items-center justify-center w-full h-80'>
|
||||
<div>
|
||||
<div class='mb-1 font-bold text-4xl text-center '>
|
||||
Ooops!
|
||||
</div>
|
||||
<div class='text-lg text-center text-muted-foreground'>
|
||||
Looks like there's nothing here.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
{:else}
|
||||
{#each Array.from({ length: 50 }) as _, i (i)}
|
||||
<SkeletonCard />
|
||||
{/each}
|
||||
{/if}
|
||||
{:else}
|
||||
{#each Array.from({ length: 50 }) as _, i (i)}
|
||||
<SkeletonCard animate={false} />
|
||||
{/each}
|
||||
{/if}
|
||||
18
src/lib/components/ui/cards/skeleton.svelte
Normal file
18
src/lib/components/ui/cards/skeleton.svelte
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<script lang='ts'>
|
||||
export let animate = true
|
||||
</script>
|
||||
|
||||
<div class='p-4 shrink-0'>
|
||||
<div class='item w-[9.5rem] flex flex-col'>
|
||||
<div class='h-[13.5rem] w-full bg-primary/5 rounded' class:animate-pulse={animate} />
|
||||
<div class='mt-4 bg-primary/5 rounded h-2 w-28' class:animate-pulse={animate} />
|
||||
<div class='mt-2 bg-primary/5 rounded h-2 w-20' class:animate-pulse={animate} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.item {
|
||||
animation: 0.3s ease 0s 1 load-in;
|
||||
aspect-ratio: 152/290;
|
||||
}
|
||||
</style>
|
||||
17
src/lib/components/ui/cards/skeletontrace.svelte
Normal file
17
src/lib/components/ui/cards/skeletontrace.svelte
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<script lang='ts'>
|
||||
export let animate = true
|
||||
</script>
|
||||
|
||||
<div class='p-4 shrink-0'>
|
||||
<div class='item w-[16rem] flex flex-col'>
|
||||
<div class='h-[9rem] w-full bg-primary/5 rounded' class:animate-pulse={animate} />
|
||||
<div class='mt-4 bg-primary/5 rounded h-2 w-28' class:animate-pulse={animate} />
|
||||
<div class='mt-2 bg-primary/5 rounded h-2 w-20' class:animate-pulse={animate} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.item {
|
||||
animation: 0.3s ease 0s 1 load-in;
|
||||
}
|
||||
</style>
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue