mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-08-28 08:10:17 +02:00
Compare commits
1280 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
c612fbcfb7 | ||
|
11c86c7031 | ||
|
e2ffb09ed1 | ||
|
77f1a073a7 | ||
|
168ead7ed5 | ||
|
0e5b463acf | ||
|
2e8ae301c5 | ||
|
ab622d5cd2 | ||
|
a6e6cf96d6 | ||
|
58b4d20185 | ||
|
39ea94daa8 | ||
|
0c6143704a | ||
|
5d0770ca36 | ||
|
1ae45f6cbb | ||
|
eb69d73190 | ||
|
2b2656b7e1 | ||
|
6c7e3e8c5d | ||
|
063049ec8e | ||
|
787eae7a80 | ||
|
5b1b8e0b2d | ||
|
18a62ca831 | ||
|
de0b2eedc9 | ||
|
d7b389e407 | ||
|
14825ebe29 | ||
|
34aeac9787 | ||
|
fc3f84da6e | ||
|
6ed6819cef | ||
|
370bb3b068 | ||
|
570431e39c | ||
|
efc4623a0b | ||
|
65d8aab429 | ||
|
6c9d480736 | ||
|
9fde25fc8e | ||
|
e6a59ae6d0 | ||
|
5b68fe731a | ||
|
c8eff2d313 | ||
|
74745a8603 | ||
|
0aadd1add9 | ||
|
b3f61f81e2 | ||
|
90befd2b8e | ||
|
bf5483950c | ||
|
bd7e005c91 | ||
|
e08cbb4c96 | ||
|
c93df78f1d | ||
|
bfb1be8aa5 | ||
|
86466f072b | ||
|
b33599f4f2 | ||
|
d0f29ec3cf | ||
|
be7626b698 | ||
|
01b1a8e029 | ||
|
09fa3acc4d | ||
|
04d9296733 | ||
|
0b57b1cbd2 | ||
|
0a843a0b1f | ||
|
8d3611e30c | ||
|
76c226c57b | ||
|
673afead73 | ||
|
8e5b874490 | ||
|
d9ea66ef85 | ||
|
fbd9db897e | ||
|
1995acab95 | ||
|
fe9c7587d8 | ||
|
9eb29b5707 | ||
|
99462d0ae0 | ||
|
89d56b3ae4 | ||
|
a61dea8c40 | ||
|
cc4bb962a6 | ||
|
0a3d085c5a | ||
|
17b5d4dfaa | ||
|
95f087cfd6 | ||
|
9090c28f04 | ||
|
fe5723f75d | ||
|
9637c89b1b | ||
|
4db158e8d9 | ||
|
05547c2685 | ||
|
4f9a298273 | ||
|
2a7b1b1f0d | ||
|
21014ff788 | ||
|
9611aed707 | ||
|
ae677a2194 | ||
|
f19d9b9419 | ||
|
fe6830cd83 | ||
|
4932dda11c | ||
|
37fbca2ead | ||
|
093296dbac | ||
|
4f83c95d20 | ||
|
0f72db1961 | ||
|
7063b26a5f | ||
|
4889290d3e | ||
|
b1f88f28f4 | ||
|
ee241e7e3f | ||
|
057a5f05a5 | ||
|
06b9232552 | ||
|
6258c40a24 | ||
|
9f53ddd3f3 | ||
|
e199be6363 | ||
|
788f4f047c | ||
|
34f86997cb | ||
|
291f4e28d8 | ||
|
8f921c8a1f | ||
|
8c810a1818 | ||
|
d07850b6ef | ||
|
cb9b8c6244 | ||
|
1e11b804ab | ||
|
0719eeeb90 | ||
|
f363e78601 | ||
|
b340fe3569 | ||
|
429a2b7749 | ||
|
c18b09c658 | ||
|
7bcb52214b | ||
|
34e6c2c381 | ||
|
b6b84a541b | ||
|
76186e513f | ||
|
5930681095 | ||
|
1d7457a4a2 | ||
|
7503d79c06 | ||
|
24319e1c49 | ||
|
48b788eaef | ||
|
6b071fc1e7 | ||
|
942f4696e2 | ||
|
022f715b98 | ||
|
7311cc8e4b | ||
|
7f6755b5de | ||
|
a482529fdc | ||
|
5798529fe2 | ||
|
a362356a72 | ||
|
4896d9a101 | ||
|
d244ab9fca | ||
|
570599c19d | ||
|
a9f6f157fa | ||
|
c35abad20a | ||
|
7f687e0a84 | ||
|
ea24ae3b5f | ||
|
55597ae1ba | ||
|
6ee0ed3444 | ||
|
d5a1a829e3 | ||
|
5c72378b39 | ||
|
e3603cfec1 | ||
|
90d337a51f | ||
|
1975715dbd | ||
|
85be66886a | ||
|
d4e349f260 | ||
|
059e166402 | ||
|
1d7c2f3b80 | ||
|
11c3750690 | ||
|
808b1bf657 | ||
|
7c4f9d574c | ||
|
e31028f5a9 | ||
|
0f1ca4e85b | ||
|
003b3f3edb | ||
|
69cc1bd281 | ||
|
31fe4d1591 | ||
|
675efd6cd3 | ||
|
0f0d97dab5 | ||
|
4b19239f6f | ||
|
a74e849faf | ||
|
d0f7f586e8 | ||
|
3b9e87e11b | ||
|
46b335eb9f | ||
|
9bdf86fc24 | ||
|
167e30dee1 | ||
|
16186811a4 | ||
|
d2031d57d2 | ||
|
6e54ba2f73 | ||
|
77d6da3a24 | ||
|
65caa0fe9d | ||
|
d6040b028e | ||
|
509074c263 | ||
|
6ad53ec2aa | ||
|
e275ecac07 | ||
|
2d0cc10e44 | ||
|
af6c715a5b | ||
|
3360e4d167 | ||
|
2331f21f90 | ||
|
58bf1a3091 | ||
|
3cf135b670 | ||
|
5ce0541937 | ||
|
19aa32feb4 | ||
|
aedf75b9f8 | ||
|
8b7e0b57c5 | ||
|
3dfd912266 | ||
|
5bd767d744 | ||
|
b39ba9cd00 | ||
|
07ffb9d995 | ||
|
2479aa597b | ||
|
8c34337136 | ||
|
0faf399abd | ||
|
7704a00d7b | ||
|
96b6ff7fff | ||
|
3dedb6b0f6 | ||
|
13457f8a6a | ||
|
bc966c46c6 | ||
|
a5d04198dc | ||
|
c3803b2e84 | ||
|
aa8b9789f7 | ||
|
70c8364349 | ||
|
ea306c7d0c | ||
|
33bc45d179 | ||
|
f7d0f7d5eb | ||
|
f181c52d13 | ||
|
f7e3f4da79 | ||
|
2365c23af7 | ||
|
73496c6b7c | ||
|
6500b624f5 | ||
|
2525ad8393 | ||
|
344c61bd23 | ||
|
248e7efdb0 | ||
|
530e9c3859 | ||
|
594653a753 | ||
|
cb5c197994 | ||
|
c8bffa006b | ||
|
df76ca0807 | ||
|
1e00e2b733 | ||
|
2b834f0233 | ||
|
af34531ee0 | ||
|
b5049ea855 | ||
|
785f4632c7 | ||
|
fcaddbbd3b | ||
|
ddf23d1ea5 | ||
|
dabc9e3c93 | ||
|
f89010bd98 | ||
|
cf84bd74f1 | ||
|
b95aa583a9 | ||
|
21c976bb3d | ||
|
63fe57731e | ||
|
668f316465 | ||
|
55fa4a1bcd | ||
|
bdeac2533f | ||
|
2ed333ab82 | ||
|
8d11090f7d | ||
|
336e9ac0bd | ||
|
0a4fd4ee2c | ||
|
b90b164552 | ||
|
b7a77797f6 | ||
|
ebcf431363 | ||
|
ba315be9e5 | ||
|
d5a0dce27a | ||
|
1a47a2aa3b | ||
|
d5221c0d17 | ||
|
0be36ea9e8 | ||
|
c03fd20bae | ||
|
c632cc6dea | ||
|
908c49c584 | ||
|
d591dbc0cd | ||
|
945703952b | ||
|
9102b6d1c3 | ||
|
4daab5d77b | ||
|
5e8baf027e | ||
|
34525afe56 | ||
|
c73bc83f7d | ||
|
ce11fcffbc | ||
|
239157df30 | ||
|
e7d97d4b66 | ||
|
b2c4802310 | ||
|
60b366a7f4 | ||
|
c732fbb363 | ||
|
41b199c578 | ||
|
88854ad451 | ||
|
3882f1483b | ||
|
882bf8ae11 | ||
|
c396800dfa | ||
|
5a8ecd593d | ||
|
84693e6404 | ||
|
476df8219f | ||
|
448c889e56 | ||
|
52ca5275b1 | ||
|
0fd6e2c878 | ||
|
85599f8a33 | ||
|
5f2a7985d8 | ||
|
b1b5e37ab6 | ||
|
2f26146228 | ||
|
6bfbebc51e | ||
|
762fd54788 | ||
|
57ab18355d | ||
|
8d9a2f505f | ||
|
c20da80bda | ||
|
e99bd06370 | ||
|
6f5446f218 | ||
|
c1c25f0e28 | ||
|
cdca37e59d | ||
|
6137120b2e | ||
|
f0912f9e9d | ||
|
1623d0f60a | ||
|
96db9677c6 | ||
|
bcfdec87c9 | ||
|
488e321613 | ||
|
90fcae1932 | ||
|
271c5fd9d2 | ||
|
bd2b564876 | ||
|
99a45ab56e | ||
|
18d12b6746 | ||
|
90013da52c | ||
|
ce6680ae19 | ||
|
bdbaf26e9b | ||
|
c487eaa846 | ||
|
69318824f6 | ||
|
fc918f1e3c | ||
|
04c574c6f9 | ||
|
2f9f76b361 | ||
|
fc12ebd477 | ||
|
daa9e20e48 | ||
|
ce2581d092 | ||
|
e9ac5b46d8 | ||
|
f723bcd7bb | ||
|
5b2d98052c | ||
|
3dde33336f | ||
|
2139d8af19 | ||
|
686405142b | ||
|
0022264a8e | ||
|
2d54c23a2c | ||
|
6abeb383a8 | ||
|
6549a49031 | ||
|
4a69e639b5 | ||
|
e9aa3b8743 | ||
|
4097119d25 | ||
|
fe3ea4ea23 | ||
|
42ccda167c | ||
|
52238864c4 | ||
|
e3ed699260 | ||
|
936ffaf768 | ||
|
d575de2459 | ||
|
0f1b8c8856 | ||
|
35ce185ce9 | ||
|
69e75afd88 | ||
|
731b00790c | ||
|
469e8185e2 | ||
|
f857ae3841 | ||
|
6be58e6506 | ||
|
96551400c6 | ||
|
ffc1da6ad1 | ||
|
a7d114c7dd | ||
|
d6a8e16aad | ||
|
842e1f5e11 | ||
|
f18970f67f | ||
|
2ada89e665 | ||
|
3cce65299b | ||
|
e171a0dd1a | ||
|
7256fa4e43 | ||
|
d4a72b1b11 | ||
|
65ca06e7ea | ||
|
962a6e9b08 | ||
|
e737b39305 | ||
|
8637748cb7 | ||
|
2533c80db9 | ||
|
cc21fff7f9 | ||
|
dea5092ae0 | ||
|
788989c7e5 | ||
|
b699c3c9bd | ||
|
d0ab52a256 | ||
|
af6146a392 | ||
|
f5de166a4e | ||
|
015d1f58e6 | ||
|
cfa46e4512 | ||
|
14ecb4a8e4 | ||
|
912c10b5e9 | ||
|
f7cfe7876b | ||
|
c3f9b7565f | ||
|
b5f85b6700 | ||
|
2c082bb198 | ||
|
ac691a8a0a | ||
|
b8610fc555 | ||
|
48954756e8 | ||
|
401c3fbe36 | ||
|
79d24d5f36 | ||
|
7ef1e285fd | ||
|
4b1ca1970a | ||
|
46ef96a725 | ||
|
632d0b5fb0 | ||
|
08cd031367 | ||
|
2132cfd45b | ||
|
3b1f4ffd75 | ||
|
c7adecdbfe | ||
|
97a839c1ac | ||
|
d6a8de6d42 | ||
|
87ce762a4d | ||
|
a671006e56 | ||
|
8327617df6 | ||
|
551c031c42 | ||
|
3aead503c1 | ||
|
c7c080d029 | ||
|
707ae0547a | ||
|
416848c79f | ||
|
c276ea69bc | ||
|
e5499f08e3 | ||
|
a8070a10d2 | ||
|
f5993a6ce7 | ||
|
23fd639512 | ||
|
1c3d8a1fba | ||
|
da309e8ee9 | ||
|
bc7323b717 | ||
|
48d197ad06 | ||
|
7b837066ec | ||
|
1670528bec | ||
|
b0c779b514 | ||
|
e7ce56c252 | ||
|
b8bcadca36 | ||
|
aa4b1a8acd | ||
|
70e348ac50 | ||
|
7068d354e8 | ||
|
8b78c22be4 | ||
|
8576de6a39 | ||
|
c4f7a85baf | ||
|
2870906c09 | ||
|
17b3f097b4 | ||
|
2a556e60d6 | ||
|
7f1c17043e | ||
|
a5687fe03b | ||
|
60b81a46ea | ||
|
b390b9fc42 | ||
|
041c16490b | ||
|
4765d31a0b | ||
|
4df73eb45c | ||
|
4dec0ad0ae | ||
|
0ef346e6c9 | ||
|
bf663d575b | ||
|
e2fe515a97 | ||
|
d026eac8f0 | ||
|
a2b72e1098 | ||
|
2239744cec | ||
|
884c9cf008 | ||
|
7f641d6d0b | ||
|
4575e0679c | ||
|
c42dd74329 | ||
|
93dccda48c | ||
|
affbdb12c0 | ||
|
69643f4c67 | ||
|
ad27b21f65 | ||
|
f39017b5ee | ||
|
1a689fa8d5 | ||
|
443635e13a | ||
|
ce1fdc2bc0 | ||
|
007070b8ba | ||
|
19747761c5 | ||
|
8c66b646cd | ||
|
b3c068ef8a | ||
|
b4a8b1344a | ||
|
b39d94cd97 | ||
|
0cfc9a0eaa | ||
|
18a6f20390 | ||
|
edfcf61325 | ||
|
f1c87b4230 | ||
|
b94530b93d | ||
|
f78e6dfc64 | ||
|
d3d8e47dfc | ||
|
1016c46148 | ||
|
56b00f7638 | ||
|
40b8f4385b | ||
|
bba2eb401d | ||
|
c9ca2eeb23 | ||
|
fc7d5ecfe3 | ||
|
088a0b0839 | ||
|
d9ff0c3cf4 | ||
|
d9d5e9473d | ||
|
7e25cfc774 | ||
|
f850065cf9 | ||
|
d3b2294a16 | ||
|
473097fa02 | ||
|
9a2930970c | ||
|
8d3723c0f1 | ||
|
943de9045d | ||
|
30688cbe5a | ||
|
101357a694 | ||
|
9bbee262f9 | ||
|
6cd3cf0cb5 | ||
|
5d584ed2b6 | ||
|
a27489c28f | ||
|
dcdcbf703e | ||
|
6fbe0e5056 | ||
|
709e139b82 | ||
|
3517fbd861 | ||
|
0da6ea7f53 | ||
|
23eb8b4dc1 | ||
|
faaf71cee9 | ||
|
165316e9c4 | ||
|
fcecdb26e9 | ||
|
1d24b7131f | ||
|
06cfd0021d | ||
|
b73bda4f0d | ||
|
fa6e0595a9 | ||
|
9e07ad286d | ||
|
e42b12f9b2 | ||
|
8951732f3c | ||
|
ba10f70b12 | ||
|
ddbbd69b4c | ||
|
cbb86faadc | ||
|
7496738215 | ||
|
248bb29ccf | ||
|
5a9e0f1e06 | ||
|
399e0c6b80 | ||
|
cb6a91d7d2 | ||
|
92b76c3fa9 | ||
|
715a8356eb | ||
|
797aae9849 | ||
|
44227f2d67 | ||
|
2655a49025 | ||
|
b0c8ea767c | ||
|
f3e448f420 | ||
|
7efd16a6e3 | ||
|
cc9e342f04 | ||
|
3e55f1c648 | ||
|
d83856be32 | ||
|
83558e9354 | ||
|
190275c31a | ||
|
464dfeaa15 | ||
|
1d7e8c5a6b | ||
|
a79034ebc8 | ||
|
a17d31eee9 | ||
|
91bce0abb4 | ||
|
dbdb4e01ff | ||
|
ec0b3b1789 | ||
|
ec1077153b | ||
|
a7794230cf | ||
|
9b5f6f3cad | ||
|
49403ed07c | ||
|
8f93d78dd8 | ||
|
b8dec0e9aa | ||
|
4b50274bb2 | ||
|
a1f00bf5f5 | ||
|
0b15f55689 | ||
|
ee312bdfa2 | ||
|
425e2bd54f | ||
|
4014e4b852 | ||
|
0aa438f859 | ||
|
19a8337e9e | ||
|
48b4b25317 | ||
|
dfd0e65651 | ||
|
1cdefa8492 | ||
|
98b2a2af09 | ||
|
237ae10be1 | ||
|
a58b78d11a | ||
|
72d8152df5 | ||
|
2668c28737 | ||
|
103824aa89 | ||
|
18c8709fd3 | ||
|
aa7dd8a75f | ||
|
dad7cb26d5 | ||
|
ca505bf637 | ||
|
b7c180355f | ||
|
80d0952d1f | ||
|
c777a9f949 | ||
|
7ecefa554a | ||
|
114c63cfd7 | ||
|
ac5c914077 | ||
|
247ac2de07 | ||
|
58a676d789 | ||
|
2b1258bea0 | ||
|
3211722492 | ||
|
f1574f3efb | ||
|
2eb8caebc0 | ||
|
5cea5d76d2 | ||
|
f29a1df3f9 | ||
|
cae5e67557 | ||
|
072c2e3718 | ||
|
45e2ebe6f4 | ||
|
551da05c6c | ||
|
49603c6f80 | ||
|
1275afcf33 | ||
|
f9e7e5f9c2 | ||
|
d33b0156fc | ||
|
258fcf29c9 | ||
|
30993e40f6 | ||
|
82d3b5040e | ||
|
9cc6ca0df7 | ||
|
b5e6f9b860 | ||
|
ccd98fb113 | ||
|
06d9a8af85 | ||
|
36150bdbef | ||
|
7b2070b2bd | ||
|
e0aafa5f47 | ||
|
75ced2d18c | ||
|
d6695da97d | ||
|
b4a1bb1218 | ||
|
903b29c4c0 | ||
|
8fd393d34a | ||
|
122546eae1 | ||
|
49d0c968b9 | ||
|
b40ae3480f | ||
|
96480a5c50 | ||
|
db4932b9ce | ||
|
d4c6b33ed5 | ||
|
daa1d255e2 | ||
|
bb7ed02c12 | ||
|
236293ce86 | ||
|
9ee54a008a | ||
|
113c7bb6f0 | ||
|
61301b3f98 | ||
|
f56a67af9e | ||
|
0c804cdf24 | ||
|
99d59ee9ad | ||
|
be827bac72 | ||
|
4073feb5b3 | ||
|
237ce422c1 | ||
|
a754c18391 | ||
|
26857fea74 | ||
|
d784b7407f | ||
|
ec95639600 | ||
|
5fab8e1465 | ||
|
71d2ff10dc | ||
|
730263ca55 | ||
|
2caaccabc0 | ||
|
922f83357f | ||
|
7d8284e3ee | ||
|
4fb4431802 | ||
|
30acf50ebe | ||
|
1ffa6f793a | ||
|
759faf9647 | ||
|
0960ef83b6 | ||
|
43168e496a | ||
|
c1fc823a19 | ||
|
d81ef1ec10 | ||
|
c240ee117d | ||
|
06b10974ab | ||
|
3e617ae005 | ||
|
506c93340a | ||
|
d6cef5c787 | ||
|
ca816a5745 | ||
|
aa5c110448 | ||
|
34105d0f28 | ||
|
78ccc49197 | ||
|
98f6611a7a | ||
|
8c6afea314 | ||
|
a1ebf1f4fb | ||
|
af29d651b5 | ||
|
b7081b32de | ||
|
1e15c9fb9c | ||
|
c9d938934b | ||
|
67bdb1515d | ||
|
9c414c92e2 | ||
|
e497612b6c | ||
|
b6cf568e31 | ||
|
f0721afb88 | ||
|
a7301838b9 | ||
|
9a76c81e7d | ||
|
9ba30f6dad | ||
|
7f82e3c80a | ||
|
626c8563f2 | ||
|
e61bba9554 | ||
|
9b4d3b7018 | ||
|
1660227a54 | ||
|
26eb27eae3 | ||
|
12b2d3ef77 | ||
|
2d08633147 | ||
|
20cb199cbd | ||
|
a8c6a78a9a | ||
|
42a3beb0b2 | ||
|
9269bd6898 | ||
|
c224de1994 | ||
|
330523e2b0 | ||
|
848e40da9c | ||
|
7e0420073b | ||
|
c6b35c82e8 | ||
|
5926612e45 | ||
|
81465fd2f9 | ||
|
9a453f768c | ||
|
8c7d4c3f3c | ||
|
e6449384ac | ||
|
69ad16e3ce | ||
|
dfa72936f2 | ||
|
25d84fe3df | ||
|
0d6410de8e | ||
|
d032babf1a | ||
|
9da65f9fc7 | ||
|
05504d8e5d | ||
|
2b26796719 | ||
|
3d54b886dd | ||
|
cb33b695dd | ||
|
49fe8fbdb8 | ||
|
6eae9a7114 | ||
|
844b37d165 | ||
|
0ce49c3535 | ||
|
0c9160f8fb | ||
|
62e60cffd3 | ||
|
8fa939ae30 | ||
|
9845ae5050 | ||
|
71654698d3 | ||
|
b2a15ceb9d | ||
|
e13c268e9d | ||
|
d59379a0f1 | ||
|
8eea5f56cd | ||
|
a89db0c259 | ||
|
0b28a9eea1 | ||
|
351c395f82 | ||
|
4c7912815c | ||
|
344c0a8005 | ||
|
fc9f846cb5 | ||
|
c40fac67d0 | ||
|
fc8a0589dd | ||
|
1899d3361b | ||
|
b67c22f33b | ||
|
5043a5188b | ||
|
08e18b40b5 | ||
|
365b6d8019 | ||
|
53c4cb645f | ||
|
64a31372b8 | ||
|
4919bc8a6e | ||
|
554f79fb94 | ||
|
364f71dd08 | ||
|
a75f1b61bc | ||
|
b6735a01ea | ||
|
f72f7efe46 | ||
|
bf4870f087 | ||
|
cdc0ac535f | ||
|
cbbefe19d2 | ||
|
1cc8f16ec5 | ||
|
9b7af2eb46 | ||
|
d7749a924b | ||
|
e9b69db318 | ||
|
13c787709f | ||
|
e6f09d5ed0 | ||
|
26b91794ce | ||
|
6c39a959bf | ||
|
92b700c985 | ||
|
0e50d247e2 | ||
|
064527a17e | ||
|
fa73f54ed7 | ||
|
2d5463681c | ||
|
63100a40e3 | ||
|
1e739d4cd5 | ||
|
65aa7982e7 | ||
|
b37279d1a0 | ||
|
20c16d2a76 | ||
|
580653a1ad | ||
|
b8503b6f03 | ||
|
fd16ed9eda | ||
|
a690d4c1e9 | ||
|
96315dc365 | ||
|
571089cda4 | ||
|
b5367d999a | ||
|
32d9d59a4e | ||
|
94595597d5 | ||
|
f2d28d6970 | ||
|
c3ea2480da | ||
|
66e9dafaa5 | ||
|
ad845dbe66 | ||
|
f0d7ec72cf | ||
|
19d53b4c14 | ||
|
131d945638 | ||
|
cadc1f4998 | ||
|
5c5d050218 | ||
|
fef8e2a254 | ||
|
c8d0f5500e | ||
|
8b2852ec9d | ||
|
00cc9fb713 | ||
|
8639e40631 | ||
|
f72a09fde0 | ||
|
3d3d5ba883 | ||
|
da297f03f7 | ||
|
a62d9311e1 | ||
|
9c6fe57279 | ||
|
593c828b67 | ||
|
aeab3670d0 | ||
|
e3d19a9175 | ||
|
24b4f4ce8a | ||
|
aa725f11f8 | ||
|
c2f5c46451 | ||
|
4d4e41a637 | ||
|
7b3daeb17b | ||
|
21528dc50b | ||
|
c186be6cb5 | ||
|
774742b98c | ||
|
e62591bf1c | ||
|
39cb681bf9 | ||
|
aa41483af5 | ||
|
1f2ad2ebff | ||
|
a6e79b537b | ||
|
3bbfc85877 | ||
|
ef969b582d | ||
|
4a35f27224 | ||
|
e2f3e420f1 | ||
|
1f9365ae97 | ||
|
4cf5b13d06 | ||
|
a568308250 | ||
|
ad7c8d9bd8 | ||
|
4357c0f1f0 | ||
|
727f161b8a | ||
|
30b5266a3f | ||
|
7ee7d5eddb | ||
|
872be4ba19 | ||
|
7969e89bfb | ||
|
abd45c1eeb | ||
|
bbdafb9def | ||
|
1d24ab33e9 | ||
|
aef4facdb3 | ||
|
f5bef0072a | ||
|
ff1088e53f | ||
|
2251b52f86 | ||
|
797d5bbc47 | ||
|
72c7b32a94 | ||
|
11f6b3792d | ||
|
cdbf2e2104 | ||
|
25c131f875 | ||
|
8dbd7dd2a7 | ||
|
0acd3efaad | ||
|
21f04e36bc | ||
|
bc7607340c | ||
|
b42cd95e41 | ||
|
448ad6a27e | ||
|
9331d38545 | ||
|
2c8940d062 | ||
|
cec6ca2e6e | ||
|
a296311b88 | ||
|
3733d0c6d0 | ||
|
696409e19c | ||
|
8a431fe95e | ||
|
a3a236d2e1 | ||
|
d76e1194d1 | ||
|
efb447ae78 | ||
|
ede9f4d3f8 | ||
|
47d73c656b | ||
|
dc6b0d4ad5 | ||
|
a76bf373a8 | ||
|
31e1524a71 | ||
|
26296813c7 | ||
|
2b8e223d1d | ||
|
116a70bc8c | ||
|
81a3729f0c | ||
|
b031168868 | ||
|
31e2f9cc33 | ||
|
28ca49dc72 | ||
|
17dc62411f | ||
|
026c890027 | ||
|
9aebb37273 | ||
|
88ea49ed05 | ||
|
e1fb82c896 | ||
|
62b53851c7 | ||
|
8f6aaa892c | ||
|
289ce2993c | ||
|
8a2451474a | ||
|
91b6b60ad0 | ||
|
5e302256a5 | ||
|
ab484ce9a6 | ||
|
28d7b128e9 | ||
|
8d06364046 | ||
|
cc42a48f74 | ||
|
c5f23c5289 | ||
|
74f1c0a986 | ||
|
02dd104223 | ||
|
8a07a5f9e3 | ||
|
330491a7e8 | ||
|
8209793b96 | ||
|
ec5220a5f9 | ||
|
694ababf15 | ||
|
ab45b3072c | ||
|
adce6f19c4 | ||
|
4fac5baedd | ||
|
a703a004a4 | ||
|
040919808c | ||
|
84208f7b34 | ||
|
53e32b5986 | ||
|
e815f4d070 | ||
|
89acf0cafc | ||
|
24ae3bed4d | ||
|
97b0f6e0bd | ||
|
1099b297b7 | ||
|
2ec5da753c | ||
|
898d1a9b03 | ||
|
7d2b1c1c30 | ||
|
b09d4f638c | ||
|
a87500309a | ||
|
b3ffd4f621 | ||
|
0c9f1655c6 | ||
|
a072962a53 | ||
|
d8d8d752cf | ||
|
896c92e6a0 | ||
|
d588bb3563 | ||
|
e36dde384d | ||
|
1be30a8e74 | ||
|
4c8bb24267 | ||
|
a189042a47 | ||
|
0f49591f9c | ||
|
2a412fb44c | ||
|
b648c45929 | ||
|
19eea2b316 | ||
|
bfba6c084c | ||
|
927f41d1a1 | ||
|
5cc060ee27 | ||
|
78879d3649 | ||
|
576ca69b44 | ||
|
4d56f9aebf | ||
|
b49726d74e | ||
|
d7b51e2de8 | ||
|
bf059c0393 | ||
|
a076dfc7d3 | ||
|
a4e599034e | ||
|
7f871403dc | ||
|
9340c5232c | ||
|
5f27518852 | ||
|
63115432ce | ||
|
0f7e01a82f | ||
|
bfd65340d3 | ||
|
8b304d22b8 | ||
|
84486af599 | ||
|
cb1edc3650 | ||
|
695b357668 | ||
|
fa6e7cfa1a | ||
|
6d3438cb1c | ||
|
48522d8e68 | ||
|
39e4955918 | ||
|
08044e102f | ||
|
fd70cf9d7a | ||
|
06de6c3274 | ||
|
8159b3c4fd | ||
|
75b5ab5a19 | ||
|
172ddc1033 | ||
|
f5435802e7 | ||
|
49276c157c | ||
|
dc85bc4d5c | ||
|
d3e7016cd5 | ||
|
5e28056257 | ||
|
84be82d175 | ||
|
3a92606e0c | ||
|
a447502703 | ||
|
6c00a8e669 | ||
|
32d7aa74e5 | ||
|
1dea89befb | ||
|
9163996ac2 | ||
|
17c6f18910 | ||
|
2819fd8496 | ||
|
34eed09537 | ||
|
aded72363a | ||
|
0631444c50 | ||
|
b92298d007 | ||
|
74b0ec827b | ||
|
e6e5f3309b | ||
|
cc30a12bee | ||
|
7d0a691bc3 | ||
|
1dd6e5c7b0 | ||
|
f97a4e490b | ||
|
796e508635 | ||
|
3814558ca1 | ||
|
e956a49680 | ||
|
499013f4fb | ||
|
ecc05d3a8b | ||
|
c7a9d444af | ||
|
910312f7ce | ||
|
885ce9e9e9 | ||
|
cecc5c57a2 | ||
|
396bc6662f | ||
|
70f4500232 | ||
|
e43d43933a | ||
|
e6bbb7c2cd | ||
|
4d3b4b85df | ||
|
b097ac2b2d | ||
|
f047f94ad9 | ||
|
072f1c8158 | ||
|
ca19318671 | ||
|
c80c2b146a | ||
|
a23df9ffb8 | ||
|
ba911bd09c | ||
|
138fc4d43c | ||
|
57d6ef9520 | ||
|
ba793c27cb | ||
|
160fd8ecbf | ||
|
270956c10d | ||
|
17ad8d0632 | ||
|
787d37853b | ||
|
906d83a3b0 | ||
|
bfd8f1b5e0 | ||
|
2029f020a3 | ||
|
84ad7e4ef9 | ||
|
e8c124a0cf | ||
|
af300036b4 | ||
|
a64630b387 | ||
|
3f91022cde | ||
|
840363badb | ||
|
7be15da13a | ||
|
b87dc5a45b | ||
|
8658bac71a | ||
|
2cabbad0d6 | ||
|
a8e0c049f2 | ||
|
69ffcc2d32 | ||
|
a087e96d69 | ||
|
15dd200b28 | ||
|
aaa24df8a3 | ||
|
d7f1c68366 | ||
|
a60d5556af | ||
|
811994423d | ||
|
d6c5696f96 | ||
|
cb9341451b | ||
|
abb9b7bd0e | ||
|
318fefbbfd | ||
|
b8b6d32a33 | ||
|
bd65025a4c | ||
|
42cfe55ef3 | ||
|
c6a9374488 | ||
|
029872a212 | ||
|
838a346c29 | ||
|
e53f261c69 | ||
|
f6832982bb | ||
|
07d4eee151 | ||
|
59609aaee9 | ||
|
3c5a859f28 | ||
|
c71f891af2 | ||
|
7494491637 | ||
|
e0fb8b3285 | ||
|
ba2455a87f | ||
|
6f80d345a8 | ||
|
8d7f7d68aa | ||
|
1b66788d96 | ||
|
28b002dbee | ||
|
326b7f54e1 | ||
|
0a280e177b | ||
|
f24747e92f | ||
|
ede2316f53 | ||
|
26d0de5985 | ||
|
df208faf25 | ||
|
bcc9f21fc1 | ||
|
4169de4d6b | ||
|
bc4e1b349a | ||
|
8520658c34 | ||
|
9545ec2894 | ||
|
188d2825b1 | ||
|
c4084343dc | ||
|
3a0e620065 | ||
|
421d5c2e24 | ||
|
4e6c446ce4 | ||
|
b649cd1519 | ||
|
0e05e6d0a1 | ||
|
5ae35ee763 | ||
|
6b5556f338 | ||
|
aa92ab9e83 | ||
|
01d152ede5 | ||
|
1cbf46d2a5 | ||
|
53733ccdf5 | ||
|
6245c4654c | ||
|
1f3d501a04 | ||
|
842bca74f9 | ||
|
27c598d96e | ||
|
3cd11139a2 | ||
|
1aec23008e | ||
|
9d8552a272 | ||
|
9648bd6a42 | ||
|
cb6eb4b1b3 | ||
|
07fcb40aab | ||
|
010b984a93 | ||
|
6d188f1271 | ||
|
2fecdef3e0 | ||
|
8783f00460 | ||
|
b727b29275 | ||
|
d0544462d5 | ||
|
47a1c0989c | ||
|
07d67787d8 | ||
|
586c21a2c1 | ||
|
b80eeeebbf | ||
|
151f70773d | ||
|
491e0e4068 | ||
|
f4ea5dab4a | ||
|
1f15b636e2 | ||
|
4b7aba378c | ||
|
4c96efe1c7 | ||
|
799f1ecd13 | ||
|
f1a2a44079 | ||
|
fd89ea1d90 | ||
|
5a017a0d5a | ||
|
e53d72e977 | ||
|
10c651c0a5 | ||
|
bf2cf3c048 | ||
|
1458623998 | ||
|
09abaa9a3c | ||
|
1217d2d699 | ||
|
ee30ba509a | ||
|
3617a7fb80 | ||
|
7d324ce51f | ||
|
a6a95780da | ||
|
a99c28f234 | ||
|
bdcab107eb | ||
|
7b216484de | ||
|
08f2f6e165 | ||
|
67e5779402 | ||
|
9a447a83bd | ||
|
35d85b4e99 | ||
|
1be5e121b3 | ||
|
fbfbcd0439 | ||
|
801ee05872 | ||
|
3e3b2813cd | ||
|
f7fbd2e256 | ||
|
71d22fb9e0 | ||
|
ff40e2129f | ||
|
4c3267c1f8 | ||
|
2a1f864e6f | ||
|
c160c89027 | ||
|
9d26d5ae7e | ||
|
cc7d9ee912 | ||
|
0b6b2b0f33 | ||
|
91a9621648 | ||
|
45922c1e7b | ||
|
14960af036 | ||
|
f915bdea3b | ||
|
befdf54952 | ||
|
94deb369b1 | ||
|
87b3c6bfee | ||
|
9ac5973907 | ||
|
2f288703bf | ||
|
d76fad3a51 | ||
|
da438f2f0b | ||
|
4245f2019e | ||
|
49eb730757 | ||
|
b506405a2c | ||
|
bdb8c3f099 | ||
|
bc945895cf | ||
|
aa9ed865f6 | ||
|
a8a6871ebd | ||
|
61ae46386e | ||
|
219234dfdd | ||
|
c29b681c1b | ||
|
8c2c02fe82 | ||
|
9c1142bd02 | ||
|
298d2e2efd | ||
|
d4a213beac | ||
|
0f948a56d8 | ||
|
a8e0474cca | ||
|
725cb1a6b8 | ||
|
a0a8882db7 | ||
|
f366779f7b | ||
|
90b0b97e22 | ||
|
974392d2eb | ||
|
2bcf6593a9 | ||
|
a6fdf653a1 | ||
|
0ff3d900fe | ||
|
ce75e45b03 | ||
|
a3c68c61f8 | ||
|
38011bd9a7 | ||
|
f5e7b10d94 | ||
|
7ad5958487 | ||
|
695d5148bb | ||
|
87103f1c3f | ||
|
77f301057b | ||
|
9e6c612513 | ||
|
eaf6ad3fcb | ||
|
e25e5b72f4 | ||
|
65b1823c5d | ||
|
8682e202a9 | ||
|
3349108f7e | ||
|
050d91daa8 | ||
|
a4c81135d5 | ||
|
30d48fb1ef | ||
|
f65f5021ae | ||
|
8273f0ded0 | ||
|
07e8c67338 | ||
|
162f32f5b8 | ||
|
68497e749b | ||
|
8fea7bfb74 | ||
|
7e6549faee | ||
|
4724214b9e | ||
|
1828855f63 | ||
|
17c31fc9d9 | ||
|
b6d6bf8ba7 | ||
|
2282a0ba71 | ||
|
864687aedf | ||
|
93d13d6177 | ||
|
74450a252a | ||
|
87f9ada878 | ||
|
f6d24d050f | ||
|
64640ada83 | ||
|
018a574d5e | ||
|
52ffd8720a | ||
|
a7ffda422b | ||
|
e870292878 | ||
|
875b4fbe0e | ||
|
d47b996c9f | ||
|
84a2ed582f | ||
|
cad50f76e2 | ||
|
9266be9708 | ||
|
76e89820eb | ||
|
bd76573401 | ||
|
6c3f271a3e | ||
|
85f0af61d0 | ||
|
3d06b0b81a | ||
|
09c8cf04af | ||
|
387ded1033 | ||
|
4cb9967b39 | ||
|
faf1ce0bcf | ||
|
ce3ef3a195 | ||
|
ade6cf8e0b | ||
|
de92767e5a | ||
|
e67c854cb5 | ||
|
cc06b07d52 | ||
|
71ed41fa69 | ||
|
859a680e19 | ||
|
240adb79eb | ||
|
4a530f5ec0 | ||
|
eb7f3878b1 | ||
|
972be7677c | ||
|
0d22407a2d | ||
|
c173d74d06 | ||
|
eda1a3b6ac | ||
|
e4b6bace43 | ||
|
908848bfc7 | ||
|
764bc0034c | ||
|
c2e76dee24 | ||
|
81cce9e07c | ||
|
cdb9157cd1 | ||
|
f34de37913 | ||
|
3f0327ff1d | ||
|
998d3f30c6 | ||
|
0eda3f3701 | ||
|
db4bfec2dd | ||
|
a796bd606f | ||
|
1152c00018 | ||
|
194a202a0b | ||
|
fbff8686bf | ||
|
b1f6bd0d67 | ||
|
89a85c0dd2 | ||
|
18181edad9 | ||
|
db946f2812 | ||
|
833a8ed13f | ||
|
51c5eb53e7 | ||
|
3e318e43e8 | ||
|
d4c80612dc | ||
|
13693a4f3b | ||
|
1f1a6938ba | ||
|
a45725052b | ||
|
d90f7f33f7 | ||
|
f917f3b570 | ||
|
4be6e0f4c3 | ||
|
ad82ecad6f | ||
|
14db2a2db7 | ||
|
e1c7e3da59 | ||
|
6bbf0604b8 | ||
|
16d4aa3aa9 | ||
|
796fc75533 | ||
|
cc13005a1d | ||
|
cdb0f9035d | ||
|
041c172a55 | ||
|
08cc2834df | ||
|
997f1cd80f | ||
|
7c1feaebc0 | ||
|
f1175f5149 | ||
|
556d206ab8 | ||
|
bfebcb3bcd | ||
|
32023fc86e | ||
|
78dc01d5b3 | ||
|
4e90a41614 | ||
|
1b0c9d81ac | ||
|
84f543aca5 | ||
|
749a87eaf7 | ||
|
6901044518 | ||
|
b39fbb8dc0 | ||
|
d7b3bd79f8 | ||
|
c8d079b826 | ||
|
8ee901517b | ||
|
6bfbdb4d05 | ||
|
bc6e9fb150 | ||
|
f51a0b80a7 | ||
|
d56d0716cb | ||
|
42d3dfe80e | ||
|
1a8ef62188 | ||
|
ecf91b506e | ||
|
ca4d3ae315 | ||
|
ba12154566 | ||
|
ba3e61c1d0 | ||
|
9f10e92175 | ||
|
d72ea22fb0 | ||
|
76f107cbfe | ||
|
cbdd185602 | ||
|
20858a1f43 | ||
|
231ba3013b | ||
|
47b6260186 | ||
|
8308c70f90 | ||
|
3baab50953 | ||
|
4e4e654467 | ||
|
ff32e198a6 | ||
|
ebec62adac | ||
|
74d967a27a | ||
|
6a5c35ad9a | ||
|
4901034721 | ||
|
8b1d6b9ef7 | ||
|
0fcd4e9709 | ||
|
4a65ce61df | ||
|
3c23c7e956 | ||
|
caced60eaa | ||
|
4c1ed3d1e8 | ||
|
8670b248a9 | ||
|
7f46dceba0 | ||
|
a95aef17be | ||
|
e8dcb83d92 | ||
|
03de1d9472 | ||
|
5e486e0aa2 | ||
|
a8f62f187c | ||
|
8e21a3c038 |
24
.editorconfig
Normal file
24
.editorconfig
Normal file
@@ -0,0 +1,24 @@
|
||||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
|
||||
[{package.json,.travis.yml,.eslintrc,.babelrc}]
|
||||
indent_size = 2
|
||||
|
||||
|
||||
[{*.md,*.jade}]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
|
||||
[*.svg]
|
||||
insert_final_newline = false
|
3
.eslintignore
Normal file
3
.eslintignore
Normal file
@@ -0,0 +1,3 @@
|
||||
**/build/**
|
||||
**/node_modules/**
|
||||
**/vendor/**
|
207
.eslintrc
Normal file
207
.eslintrc
Normal file
@@ -0,0 +1,207 @@
|
||||
---
|
||||
root: true
|
||||
|
||||
parser: babel-eslint
|
||||
|
||||
env:
|
||||
es6: true
|
||||
node: true
|
||||
|
||||
ecmaFeatures:
|
||||
arrowFunctions: true
|
||||
binaryLiterals: true
|
||||
blockBindings: true
|
||||
classes: false
|
||||
defaultParams: true
|
||||
destructuring: true
|
||||
forOf: true
|
||||
generators: true
|
||||
globalReturn: true
|
||||
jsx: false
|
||||
modules: true
|
||||
objectLiteralComputedProperties: true
|
||||
objectLiteralDuplicateProperties: true
|
||||
objectLiteralShorthandMethods: true
|
||||
objectLiteralShorthandProperties: true
|
||||
octalLiterals: true
|
||||
regexUFlag: true
|
||||
regexYFlag: true
|
||||
spread: true
|
||||
superInFunctions: false
|
||||
templateStrings: true
|
||||
unicodeCodePointEscapes: true
|
||||
|
||||
rules:
|
||||
array-bracket-spacing: [2, never]
|
||||
arrow-parens: [2, as-needed]
|
||||
arrow-spacing: 2
|
||||
block-scoped-var: 2
|
||||
brace-style: [2, 1tbs, {allowSingleLine: true}]
|
||||
camelcase: 0
|
||||
comma-dangle: [2, never]
|
||||
comma-spacing: [2, {before: false, after: true}]
|
||||
comma-style: [2, last]
|
||||
complexity: [1, 25] ###
|
||||
computed-property-spacing: [2, never]
|
||||
consistent-return: 2
|
||||
consistent-this: [2, self]
|
||||
constructor-super: 2
|
||||
curly: [2, multi-line]
|
||||
default-case: 2
|
||||
dot-location: [2, property]
|
||||
dot-notation: [2, {allowKeywords: true}]
|
||||
eol-last: 2
|
||||
eqeqeq: 2
|
||||
func-names: 2
|
||||
func-style: [2, declaration, {allowArrowFunctions: true}]
|
||||
generator-star-spacing: [2, after]
|
||||
guard-for-in: 2
|
||||
handle-callback-err: 2
|
||||
indent: [2, 4]
|
||||
key-spacing: [2, {beforeColon: false, afterColon: true}]
|
||||
linebreak-style: [2, unix]
|
||||
max-depth: [1, 4]
|
||||
max-len: [0, 80, 4]
|
||||
max-nested-callbacks: [1, 3]
|
||||
max-params: [1, 5] ###
|
||||
max-statements: [1, 80] ###
|
||||
new-cap: 0
|
||||
new-parens: 2
|
||||
newline-after-var: 0
|
||||
no-alert: 2
|
||||
no-array-constructor: 2
|
||||
no-bitwise: 2
|
||||
no-caller: 2
|
||||
no-catch-shadow: 2
|
||||
no-class-assign: 2
|
||||
no-cond-assign: 2
|
||||
no-console: 0 ###
|
||||
no-const-assign: 2
|
||||
no-constant-condition: 1
|
||||
no-continue: 0
|
||||
no-control-regex: 2
|
||||
no-debugger: 2
|
||||
no-delete-var: 2
|
||||
no-div-regex: 2
|
||||
no-dupe-args: 2
|
||||
no-dupe-class-members: 2
|
||||
no-dupe-keys: 2
|
||||
no-duplicate-case: 2
|
||||
no-else-return: 1
|
||||
no-empty: 2
|
||||
no-empty-character-class: 2
|
||||
no-empty-label: 2
|
||||
no-empty-pattern: 2
|
||||
no-eq-null: 2
|
||||
no-eval: 2
|
||||
no-ex-assign: 2
|
||||
no-extend-native: 1
|
||||
no-extra-bind: 2
|
||||
no-extra-boolean-cast: 2
|
||||
no-extra-parens: 1
|
||||
no-extra-semi: 2
|
||||
no-fallthrough: 2
|
||||
no-floating-decimal: 2
|
||||
no-func-assign: 2
|
||||
no-implicit-coercion: [2, {boolean: false, number: true, string: true}]
|
||||
no-implied-eval: 2
|
||||
no-inline-comments: 0
|
||||
no-inner-declarations: [2, functions]
|
||||
no-invalid-regexp: 2
|
||||
no-invalid-this: 2
|
||||
no-irregular-whitespace: 2
|
||||
no-iterator: 2
|
||||
no-label-var: 2
|
||||
no-labels: 2
|
||||
no-lone-blocks: 2
|
||||
no-lonely-if: 2
|
||||
no-loop-func: 1
|
||||
no-magic-numbers: 0
|
||||
no-mixed-requires: [2, false]
|
||||
no-mixed-spaces-and-tabs: [2, false]
|
||||
no-multi-spaces: 2
|
||||
no-multi-str: 2
|
||||
no-multiple-empty-lines: [2, {max: 4}]
|
||||
no-native-reassign: 1
|
||||
no-negated-in-lhs: 2
|
||||
no-nested-ternary: 0
|
||||
no-new: 2
|
||||
no-new-func: 2
|
||||
no-new-object: 2
|
||||
no-new-require: 2
|
||||
no-new-wrappers: 2
|
||||
no-obj-calls: 2
|
||||
no-octal: 2
|
||||
no-octal-escape: 2
|
||||
no-param-reassign: 0
|
||||
no-path-concat: 2
|
||||
no-plusplus: 2
|
||||
no-process-env: 2
|
||||
no-process-exit: 2
|
||||
no-proto: 2
|
||||
no-redeclare: 2
|
||||
no-regex-spaces: 2
|
||||
no-restricted-modules: 2
|
||||
no-return-assign: 2
|
||||
no-script-url: 2
|
||||
no-self-compare: 2
|
||||
no-sequences: 2
|
||||
no-shadow: 2
|
||||
no-shadow-restricted-names: 2
|
||||
no-spaced-func: 2
|
||||
no-sparse-arrays: 2
|
||||
no-sync: 0
|
||||
no-ternary: 0
|
||||
no-this-before-super: 2
|
||||
no-throw-literal: 1
|
||||
no-trailing-spaces: 2
|
||||
no-undef: 2
|
||||
no-undef-init: 2
|
||||
no-undefined: 0
|
||||
no-underscore-dangle: 0
|
||||
no-unexpected-multiline: 2
|
||||
no-unneeded-ternary: 2
|
||||
no-unreachable: 2
|
||||
no-useless-call: 2
|
||||
no-useless-concat: 2
|
||||
no-unused-expressions: 2
|
||||
no-unused-vars: [1, {vars: all, args: after-used}]
|
||||
no-use-before-define: 2
|
||||
no-var: 2
|
||||
no-void: 2
|
||||
no-warning-comments: [1, {terms: [todo, fixme, xxx], location: start}]
|
||||
no-with: 2
|
||||
object-curly-spacing: [2, never]
|
||||
object-shorthand: [2, always]
|
||||
one-var: [2, never]
|
||||
operator-assignment: [2, always]
|
||||
operator-linebreak: [2, after]
|
||||
padded-blocks: [2, never]
|
||||
prefer-arrow-callback: 2
|
||||
prefer-const: 1
|
||||
prefer-reflect: 1
|
||||
prefer-spread: 2
|
||||
prefer-template: 0 ###
|
||||
quote-props: [2, as-needed]
|
||||
quotes: [2, single, avoid-escape]
|
||||
radix: 2
|
||||
require-yield: 2
|
||||
semi: 2
|
||||
semi-spacing: [2, {before: false, after: true}]
|
||||
sort-vars: 0
|
||||
space-after-keywords: [2, always]
|
||||
space-before-blocks: [2, always]
|
||||
space-before-function-paren: [2, {anonymous: always, named: never}]
|
||||
space-in-parens: [2, never]
|
||||
space-infix-ops: 2
|
||||
space-return-throw-case: 2
|
||||
space-unary-ops: [2, {words: true, nonwords: false}]
|
||||
spaced-comment: [2, always]
|
||||
strict: [2, never]
|
||||
use-isnan: 2
|
||||
valid-jsdoc: 2
|
||||
valid-typeof: 2
|
||||
vars-on-top: 0
|
||||
wrap-iife: [2, outside]
|
||||
wrap-regex: 2
|
||||
yoda: [2, never, {exceptRange: true}]
|
52
.gitignore
vendored
52
.gitignore
vendored
@@ -1,50 +1,4 @@
|
||||
|
||||
# Build folders to ignore
|
||||
bin
|
||||
build
|
||||
target
|
||||
|
||||
build.local.*
|
||||
|
||||
|
||||
# Eclipse
|
||||
.classpath
|
||||
.ant-targets-*
|
||||
|
||||
# Numerous always-ignore extensions
|
||||
*.diff
|
||||
*.err
|
||||
*.orig
|
||||
*.log
|
||||
*.rej
|
||||
*.swo
|
||||
*.swp
|
||||
*.vi
|
||||
*~
|
||||
*.sass-cache
|
||||
|
||||
# OS or Editor folders
|
||||
.DS_Store
|
||||
.cache
|
||||
.project
|
||||
.settings
|
||||
.tmproj
|
||||
nbproject
|
||||
Thumbs.db
|
||||
|
||||
# Dreamweaver added files
|
||||
_notes
|
||||
dwsync.xml
|
||||
|
||||
# Komodo
|
||||
*.komodoproject
|
||||
.komodotools
|
||||
|
||||
# Folders to ignore
|
||||
.hg
|
||||
.svn
|
||||
.CVS
|
||||
intermediate
|
||||
publish
|
||||
.idea
|
||||
|
||||
local
|
||||
node_modules
|
||||
npm-debug.log
|
||||
|
541
CHANGELOG.md
Normal file
541
CHANGELOG.md
Normal file
@@ -0,0 +1,541 @@
|
||||
# Changelog
|
||||
|
||||
|
||||
## v0.28.0 - *2015-12-19*
|
||||
|
||||
* now requires PHP 5.5.0+
|
||||
* changes index path to `/_h5ai/public/index.php`
|
||||
* now only `/_h5ai/public/` needs to be accessable from web
|
||||
* adds support for custom script and style additions
|
||||
* adds options to set font families
|
||||
* adds search
|
||||
* adds ignorecase sorting option to tree
|
||||
* adds wide links in tree view
|
||||
* adds IE edge mode
|
||||
* adds frontend tests
|
||||
* fixes some styles in IE10
|
||||
* fixes preview bottom bar for small screen widths
|
||||
* lots of code cleanup and refactorings
|
||||
* changes API
|
||||
* updates build process, now uses [ghu](https://larsjung.de/ghu/)
|
||||
* switches from jshint and jscs to [eslint](http://eslint.org/)
|
||||
* updates `jQuery` to 2.1.4
|
||||
* updates `lodash` to 3.9.3 (adds debounce and trim)
|
||||
* updates `marked` to 0.3.5
|
||||
* updates `modulejs` to 1.13.0
|
||||
* updates `prism` to 2015-12-19
|
||||
* updates h5bp styles to 5.2.0
|
||||
* updates `normalize.css` to 3.0.3
|
||||
* removes `Moment.js`
|
||||
|
||||
|
||||
## v0.27.0 - *2015-04-06*
|
||||
|
||||
* new layout
|
||||
* adds editorconfig
|
||||
* drops support for IE9 (gets fallback)
|
||||
* updates sidebar settings
|
||||
* adds info sidebar
|
||||
* adds opt-out for click'n'drag selection
|
||||
* adds package name option for single selections
|
||||
* adds initial support for Peer5
|
||||
* adds option to down-sample images for preview
|
||||
* adds option for natural sorting in tree sidebar
|
||||
* fixes problems with files/folders named `0`
|
||||
* changes font from `Ubuntu` to `Roboto` (smaller footprint, clearer for small sizes)
|
||||
* switches back to Google Fonts
|
||||
* improves PDF thumbnail quality
|
||||
* improves drag-select
|
||||
* improves image preview
|
||||
* prevents listing `_h5ai` folder and subfolders
|
||||
* updates build process, now uses [mkr](https://larsjung.de/mkr/) and [fQuery](https://larsjung.de/fquery/)
|
||||
* updates `jQuery` to 2.1.3
|
||||
* updates `jQuery.qrcode` to 0.11.0
|
||||
* updates `Lo-Dash` to 3.6.0
|
||||
* updates `Modernizr` to 2.8.3
|
||||
* updates `modulejs` to 1.4.0
|
||||
* updates `Moment.js` to 2.9.0
|
||||
* updates `Prism` to 2015-04-05
|
||||
* removes deprecated Google Analytics code
|
||||
* removes `jQuery.fracs`
|
||||
* removes `jQuery.scrollpanel`
|
||||
* removes `jQuery.mousewheel`
|
||||
* language updates and additions (`af`, `es`, `ja`, `ko`, `ru`, `zh-cn`)
|
||||
|
||||
|
||||
## v0.26.1 - *2014-08-17*
|
||||
|
||||
* fixes links
|
||||
|
||||
|
||||
## v0.26.0 - *2014-08-16*
|
||||
|
||||
* removes True Type fonts
|
||||
* outsources themes to [h5ai-themes](https://github.com/lrsjng/h5ai-themes)
|
||||
* adds filesize fallback for large files and 32bit PHP
|
||||
* fixes server detection
|
||||
* adds config file tests to info page
|
||||
* removes JSON shim
|
||||
* adds caching of command checks
|
||||
* updates `jQuery.mousewheel` to 3.1.12
|
||||
* updates `jQuery.qrcode` to 0.8.0
|
||||
* replaces `markdown` with [`marked`](https://github.com/chjj/marked) 0.3.2
|
||||
* updates `modulejs` to 0.4.5
|
||||
* updates `Moment.js` to 2.8.1
|
||||
* replaces `underscore` with [`Lo-Dash`](https://github.com/lodash/lodash) 2.4.1
|
||||
* replaces `SyntaxHighlighter` with [`Prism`](http://prismjs.com) 2014-08-04
|
||||
|
||||
|
||||
## v0.25.2 - *2014-07-01*
|
||||
|
||||
* adds optional info page protection
|
||||
* fixes `short_open_tag` issues for PHP < 5.4.0
|
||||
* fixes default folder download (`alwaysVisible` option)
|
||||
* minor fixes
|
||||
|
||||
|
||||
## v0.25.1 - *2014-06-25*
|
||||
|
||||
* fixes broken paths for filenames containing '+' characters
|
||||
* fixes Google Universal Analytics
|
||||
* fixes file type check
|
||||
|
||||
|
||||
## v0.25.0 - *2014-06-22*
|
||||
|
||||
* adds sidebar
|
||||
* adds initial theme support
|
||||
* adds icons from [Evolvere Icon Theme](http://franksouza183.deviantart.com/art/Evolvere-Icon-theme-440718295)
|
||||
* adds PHP variant to calc folder sizes
|
||||
* adds scroll position reset on location change (issue [#279](https://github.com/lrsjng/h5ai/issues/279))
|
||||
* adds option to hide unreadable files
|
||||
* adds option where to place folders (top, inplace, bottom)
|
||||
* adds markdown support for custom header and footer files
|
||||
* adds video and audio preview via HTML5 elements (no fallback, works best in Chrome)
|
||||
* adds filter reset on location change
|
||||
* adds option to make download button always visible
|
||||
* adds Google UA support
|
||||
* extends selectable icon sizes (adds 128px, 192px, 256px, 384px)
|
||||
* improves preview GUI
|
||||
* disable thumbs in `cache` folder
|
||||
* fixes QR code URI origin (issue [#287](https://github.com/lrsjng/h5ai/issues/287))
|
||||
* replaces PHP backtick operator with `exec`
|
||||
* removes server side file manipulation extensions `dropbox`, `delete` and `rename`
|
||||
* updates `H5BP` to 4.3.0
|
||||
* updates `jQuery` to 2.1.1
|
||||
* updates `json2.js` to 2014-02-04
|
||||
* updates `markdown-js` to 0.5.0
|
||||
* updates `Modernizr` to 2.8.2
|
||||
* updates `Moment.js` to 2.6.0
|
||||
* updates `Underscore.js` to 1.6.0
|
||||
* language updates (`bg`, `ko`, `pt`, `sl`, `sv`, `zh-cn`)
|
||||
|
||||
|
||||
## v0.24.1 - *2014-04-09*
|
||||
|
||||
* security fixes! (issues [#268](https://github.com/lrsjng/h5ai/issues/268), [#269](https://github.com/lrsjng/h5ai/issues/269))
|
||||
* language updates (`fi`, `fr`, `hi`, `it`, `zh-tw`)
|
||||
* fixes WinOS command detection
|
||||
|
||||
|
||||
## v0.24.0 - *2013-09-04*
|
||||
|
||||
* updates image and text preview
|
||||
* adds variable icon sizes
|
||||
* adds optional natural sort of items
|
||||
* adds optional checkboxes to select items
|
||||
* adds text preview modes: none, fixed, markdown
|
||||
* optionally hide folders in main view
|
||||
* makes use of EXIF thumbnails optional
|
||||
* fixes file deletion of multiple files
|
||||
* fixes `setParentFolderLabels = false`
|
||||
* fixes shell-arg and RegExp escape issues
|
||||
* cleans code
|
||||
* updates info page `/_h5ai`
|
||||
* adds `aiff` to `audio` types
|
||||
* adds `da` translation by Ronnie Milbo
|
||||
* updates to `pl` translation by Mark
|
||||
|
||||
|
||||
## v0.23.0 - *2013-07-21*
|
||||
|
||||
* removes `aai` mode!
|
||||
* drops support for IE7+8 (simple fallback, same as no javascript)
|
||||
* uses History API if available (way faster browsing)
|
||||
* faster thumbnail generation if EXIF thumbnails available
|
||||
* adds optional custom headers/footers that are propageted to all subfolders
|
||||
* optional hide parent folder links
|
||||
* some fixes on previews
|
||||
* speeds up packaged downloads
|
||||
* add line wrap and line highlighting (on hover) to text preview
|
||||
* new design (colors, images)
|
||||
* now uses scalable images for the interface
|
||||
* fixes filter (ignore parent folder, display of `no match`)
|
||||
* lots of small fixes
|
||||
* updates `H5BP` to 4.2.0
|
||||
* updates `jQuery` to 2.0.3
|
||||
* updates `jQuery.mousewheel` to 3.1.3
|
||||
* updates `Moment.js` to 2.1.0
|
||||
* updates `markdown-js` to 0.4.0-9c21acdf08
|
||||
* updates `json2.js` to 2013-05-26
|
||||
* adds `uk` translation by Viktor Matveenko
|
||||
* updates to `pl` translation by Mark
|
||||
|
||||
|
||||
## v0.22.1 - *2012-10-16*
|
||||
|
||||
* bug fix concerning API requests in PHP mode
|
||||
* minor changes in responsive styles
|
||||
|
||||
|
||||
## v0.22 - *2012-10-14*
|
||||
|
||||
* general changes h5ai directory layout and configuration
|
||||
* splits configuration file (`config.json`) into files `options.json`, `types.json` and `langs.json`
|
||||
* localization now in separate files
|
||||
* adds auto-refresh
|
||||
* adds drag'n'drop upload (PHP, experimental)
|
||||
* adds file deletion (PHP, experimental)
|
||||
* cleans and improves PHP code
|
||||
* PHP no longer respects htaccess restrictions (so be careful)
|
||||
* PHP ignore patterns might include paths now
|
||||
* improves separation between aai and php mode
|
||||
* improves performance in aai mode
|
||||
* adds optional binary prefixes for file sizes
|
||||
* improves filter: autofocus on keypress, clear on `ESC`
|
||||
* download packages now packaged relative to current folder
|
||||
* download package name changable
|
||||
* splits type `js` into `js` and `json`
|
||||
* prevents some errors with files > 2GB on 32bit OS
|
||||
* adds max subfolder size in tree view
|
||||
* adds ctrl-click file selection
|
||||
* adds Piwik analytics extension
|
||||
* temp download packages are now stored in the `cache`-folder and deleted as soon as possible
|
||||
* updates translations
|
||||
* adds `he` translation by [Tomer Cohen](https://github.com/tomer)
|
||||
* updates 3rd party libs
|
||||
|
||||
|
||||
## v0.21 - *2012-08-06*
|
||||
|
||||
* fixes misaligned image previews
|
||||
* adds no JavaScript fallback to PHP version
|
||||
* fixes duplicate tree entries and empty main views
|
||||
* adds Google Analytics support (async)
|
||||
* improves filter (now ignorecase, now only checks if chars in right order)
|
||||
* adds keyboard support to image preview (space, enter, backspace, left, right, up, down, f, esc)
|
||||
* adds text file preview and highlighting with [SyntaxHighlighter](http://alexgorbatchev.com/SyntaxHighlighter/) (same keys as img preview)
|
||||
* adds Markdown preview with [markdown-js](https://github.com/evilstreak/markdown-js)
|
||||
* adds new type `markdown`
|
||||
* changes language code `gr` to `el`
|
||||
* adds localization for filter placeholder
|
||||
* adds `hu` translation by [Rodolffo](https://github.com/Rodolffo)
|
||||
* updates to [jQuery.qrcode](https://larsjung.de/qrcode/) 0.2
|
||||
* updates to [jQuery.scrollpanel](https://larsjung.de/scrollpanel/) 0.1
|
||||
* updates to [modulejs](https://larsjung.de/modulejs/) 0.2
|
||||
* updates to [Moment.js](http://momentjs.com) 1.7.0
|
||||
* updates to [Underscore.js](http://underscorejs.org) 1.3.3
|
||||
|
||||
|
||||
## v0.20 - *2012-05-11*
|
||||
|
||||
* adds image preview
|
||||
* adds thumbnails for video and pdf
|
||||
* adds support for lighttpd, nginx and cherokee and maybe other webservers with PHP
|
||||
* adds folder size in PHP version via shell `du`
|
||||
* fixes some localization problems
|
||||
* updates info page at `/_h5ai/`
|
||||
* switches to JSHint
|
||||
|
||||
|
||||
## v0.19 - *2012-04-19*
|
||||
|
||||
* adds lots of config options
|
||||
* changes in `config.js` and `h5ai.htaccess`
|
||||
* fixes js problems in IE 7+8
|
||||
* hides broken tree view in IE < 9, adds a message to the footer
|
||||
* removes hash changes since they break logical browser history
|
||||
* fixes thumbnail size for portrait images in icon view
|
||||
* fixes problems with file type recognition
|
||||
* adds an info page at `/_h5ai/`
|
||||
* sort order is preserved while browsing
|
||||
* removes PHP error messages on thumbnail generation
|
||||
* fixes PHP some problems with packed download
|
||||
* adds support for tarred downloads
|
||||
* changes crumb image for folders with an index file
|
||||
* adds `index.php` to use h5ai in non-Apache environments
|
||||
* switches from [Datejs](http://www.datejs.com) to [Moment.js](http://momentjs.com)
|
||||
* adds [underscore.js](http://underscorejs.org)
|
||||
* fixes mousewheel problems, updates [jQuery.mousewheel](https://github.com/brandonaaron/jquery-mousewheel) to 3.0.6
|
||||
* updates `lv` translation
|
||||
* adds `ro` translation by [Jakob Cosoroabă](https://github.com/midday)
|
||||
* adds `ja` translation by [metasta](https://github.com/metasta)
|
||||
* adds `nb` translation by [Sindre Sorhus](https://github.com/sindresorhus)
|
||||
* adds `sr` translation by [vBm](https://github.com/vBm)
|
||||
* adds `gr` translation by [xhmikosr](https://github.com/xhmikosr)
|
||||
|
||||
|
||||
## v0.18 - *2012-02-24*
|
||||
|
||||
* adds optional QRCode display
|
||||
* adds optional filtering for displayed files and folders
|
||||
* updates design
|
||||
* improves zipped download
|
||||
* adds support for zipped download of htaccess restricted files
|
||||
* changes h5ai.htaccess
|
||||
* custom headers/footers are now optional and disabled by default
|
||||
* fixes problems with folder recognition in the JS version
|
||||
* fixes include problems in PHP version
|
||||
* fixes path problems on servers running on Windows in PHP version
|
||||
* fixes broken links in custom headers/footers while zipped download enabled
|
||||
* fixes problems with thumbnails for files with single or double quotes in filename
|
||||
* improves url hashes
|
||||
* updates year in `LICENSE.TXT`
|
||||
* updates es translation
|
||||
* adds `zh-tw` translation by [Yao Wei](https://github.com/medicalwei)
|
||||
* updates `zh-cn` translation
|
||||
|
||||
|
||||
## v0.17 - *2011-11-28*
|
||||
|
||||
* h5ai is now located in `_h5ai` to reduce collisions
|
||||
* switches from HTML5 Boilerplate reset to normalization
|
||||
* adds some style changes for small devices
|
||||
* configuration (options, types, translations) now via `config.js`
|
||||
* icons for JS version are now configured via `config.js`
|
||||
* sort order configuration changed
|
||||
* sorting is now done without page reload
|
||||
* adds `customHeader` and `customFooter` to `config.js`
|
||||
* supports restricted folders to some extent
|
||||
* some style changes on tree and language menu
|
||||
* fixes total file/folder count in status bar
|
||||
* adds support for use with userdir (requires some manual changes)
|
||||
|
||||
|
||||
## v0.16 - *2011-11-02*
|
||||
|
||||
* sorts translations in `options.js`
|
||||
* improves HTML head sections
|
||||
* refactors JavaScript and PHP a lot
|
||||
* improves/fixes file selection for zipped download
|
||||
* fixes scrollbar and header/footer link issues (didn't work when zipped download enabled)
|
||||
* adds support for ctrl-select
|
||||
* `dateFormat` in `options.js` changed, now affecting JS and PHP version
|
||||
* `dateFormat` is localizable by adding it to a translation in `options.js`
|
||||
* PHP version is now configurable via `php/config.php` (set custom doc root and other PHP related things)
|
||||
* image thumbs and zipped download is disabled by default now, but works fine if PHP is configured
|
||||
|
||||
|
||||
## v0.15.2 - *2011-09-18*
|
||||
|
||||
* adds `it` translation by [Salvo Gentile](https://github.com/SalvoGentile) and [Marco Patriarca](https://github.com/Fexys)
|
||||
* switches build process from scripp to wepp
|
||||
|
||||
|
||||
## v0.15.1 - *2011-09-06*
|
||||
|
||||
* fixes security issues with the zipped download feature
|
||||
* makes zipped download optional (but enabled by default)
|
||||
|
||||
|
||||
## v0.15 - *2011-09-04*
|
||||
|
||||
* adds zipped download for selected files
|
||||
* cleans and refactores
|
||||
|
||||
|
||||
## v0.14.1 - *2011-09-01*
|
||||
|
||||
* display meta information in bottom bar (icon view)
|
||||
* adds `zh-cn` translation by [Dongsheng Cai](https://github.com/dongsheng)
|
||||
* adds `pl` translation by Radosław Zając
|
||||
* adds `ru` translation by Богдан Илюхин
|
||||
|
||||
|
||||
## v0.14 - *2011-08-16*
|
||||
|
||||
* adds image thumbnails for PHP version
|
||||
* new option `slideTree` to turn off auto slide in
|
||||
|
||||
|
||||
## v0.13.2 - *2011-08-12*
|
||||
|
||||
* changes in `/h5ai/.htaccess` ... PHP configuration ...
|
||||
|
||||
|
||||
## v0.13.1 - *2011-08-12*
|
||||
|
||||
* fixes initial tree display
|
||||
* adds sort order option
|
||||
* adds/fixes some translations
|
||||
* adds `lv` translation by Sandis Veinbergs
|
||||
|
||||
|
||||
## v0.13 - *2011-08-06*
|
||||
|
||||
* adds PHP implementation! (should work with PHP 5.2+)
|
||||
* adds new options
|
||||
* changes layout of the bottom bar to display status information
|
||||
* adds language selector to the bottom bar
|
||||
* quotes keys in `options.js` to make it valid json
|
||||
* changes value of option `lang` from `undefined` to `null`
|
||||
* adds some new keys to `h5aiLangs`
|
||||
* adds browser caching rules for css and js
|
||||
* adds `pt` translation by [Jonnathan](https://github.com/jonnsl)
|
||||
* adds `bg` translation by George Andonov
|
||||
|
||||
|
||||
## v0.12.3 - *2011-07-30*
|
||||
|
||||
* adds `tr` translation by [Batuhan Icoz](https://github.com/batuhanicoz)
|
||||
|
||||
|
||||
## v0.12.2 - *2011-07-30*
|
||||
|
||||
* adds `es` translation by Jose David Calderon Serrano
|
||||
|
||||
|
||||
## v0.12.1 - *2011-07-29*
|
||||
|
||||
* fixes unchecked use of console.log
|
||||
|
||||
|
||||
## v0.12 - *2011-07-28*
|
||||
|
||||
* improves performance
|
||||
|
||||
|
||||
## v0.11 - *2011-07-27*
|
||||
|
||||
* changes license to MIT license, see `LICENSE.txt`
|
||||
|
||||
|
||||
## v0.10.2 - *2011-07-26*
|
||||
|
||||
* improves tree scrollbar
|
||||
|
||||
|
||||
## v0.10.1 - *2011-07-24*
|
||||
|
||||
* fixes problems with ' in links
|
||||
|
||||
|
||||
## v0.10 - *2011-07-24*
|
||||
|
||||
* fixes problems with XAMPP on Windows (see `dot.htaccess` comments for instructions)
|
||||
* fixes tree fade-in-fade-out effect for small displays ([issue #6](https://github.com/lrsjng/h5ai/issues/6))
|
||||
* adds custom scrollbar to tree ([issue #6](https://github.com/lrsjng/h5ai/issues/6))
|
||||
* fixes broken links caused by URI encoding/decoding ([issue #9](https://github.com/lrsjng/h5ai/issues/9))
|
||||
* adds "empty" to localization (hope Google Translate did a good job here)
|
||||
|
||||
|
||||
## v0.9 - *2011-07-18*
|
||||
|
||||
* links hover states between crumb, extended view and tree
|
||||
* fixes size of tree view (now there's a ugly scrollbar, hopefully will be fixed)
|
||||
* refactores js to improve performance and cleaned code
|
||||
* adds caching for folder status codes and content
|
||||
* adds `fr` translation by [Nicolas](https://github.com/Nicosmos)
|
||||
* adds `nl` translation by [Stefan de Konink](https://github.com/skinkie)
|
||||
* adds `sv` translation by Oscar Carlsson
|
||||
|
||||
|
||||
## v0.8 - *2011-07-08*
|
||||
|
||||
* removes slashes from folder labels
|
||||
* optionally rename parent folder entries to real folder names, see `options.js`
|
||||
* long breadcrumbs (multiple rows) no longer hide content
|
||||
* error folder icons are opaque now
|
||||
* refactores js a lot (again...)
|
||||
|
||||
|
||||
## v0.7 - *2011-07-07*
|
||||
|
||||
* removes shadows
|
||||
* smarter tree side bar
|
||||
|
||||
|
||||
## v0.6 - *2011-07-05*
|
||||
|
||||
* refactores js
|
||||
* adds localization, see `options.js`
|
||||
|
||||
|
||||
## v0.5.3 - *2011-07-04*
|
||||
|
||||
* refactores js
|
||||
* adds basic options support via `options.js`
|
||||
* adds comments to `options.js`
|
||||
* adds optional tree sidebar
|
||||
|
||||
|
||||
## v0.5.2 - *2011-07-02*
|
||||
|
||||
* details view adjusts to window width
|
||||
* links icon for *.gz and *.bz2
|
||||
|
||||
|
||||
## v0.5.1 - *2011-07-01*
|
||||
|
||||
* disables tree sidebar for now, since it had unwanted side effects
|
||||
|
||||
|
||||
## v0.5 - *2011-07-01*
|
||||
|
||||
* adds tree sidebar
|
||||
* some refactorings
|
||||
|
||||
|
||||
## v0.4 - *2011-06-27*
|
||||
|
||||
* adds better fallback, in case JavaScript is disabled
|
||||
* rewrites js, fixed middle-button click etc. problems
|
||||
* refactors css
|
||||
* sorts, adds and moves icons and images
|
||||
* updates dot.access
|
||||
|
||||
|
||||
## v0.3.2 - *2011-06-24*
|
||||
|
||||
* removes lib versions from file names
|
||||
* adds 'empty' indicator for icons view
|
||||
|
||||
|
||||
## v0.3.1 - *2011-06-24*
|
||||
|
||||
* refactores js
|
||||
* adds `folderClick` and `fileClick` callback hooks
|
||||
* fixes .emtpy style
|
||||
|
||||
|
||||
## v0.3 - *2011-06-23*
|
||||
|
||||
* includes build stuff, files previously found in the base directory are now located in folder `target`
|
||||
* styles and scripts are now minified
|
||||
* adds Modernizr 2.0.4 for future use
|
||||
* updates jQuery to version 1.6.1
|
||||
|
||||
|
||||
## v0.2.3 - *2011-06-17*
|
||||
|
||||
* more refactoring in main.js
|
||||
|
||||
|
||||
## v0.2.2 - *2011-06-16*
|
||||
|
||||
* refactores a lot, adds some comments
|
||||
* includes fixes from [NumEricR](https://github.com/NumEricR)
|
||||
* adds top/bottom message support, only basicly styled
|
||||
|
||||
|
||||
## v0.2.1 - *2011-06-16*
|
||||
|
||||
* fixes croped filenames
|
||||
* fixes missing .png extension in header
|
||||
* adds some color to the links
|
||||
* adds changelog
|
||||
|
||||
|
||||
## v0.2 - *2011-06-15*
|
||||
|
||||
* adds icon view
|
19
LICENSE.txt
19
LICENSE.txt
@@ -1,19 +0,0 @@
|
||||
Copyright (c) 2011 Lars Jung, http://larsjung.de
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
245
README.md
245
README.md
@@ -1,216 +1,81 @@
|
||||
# h5ai
|
||||
|
||||
* Website with download, docs and demo: <http://larsjung.de/h5ai>
|
||||
* Sources: <http://github.com/lrsjng/h5ai>
|
||||
[![license][license-img]][github] [![web][web-img]][web] [![github][github-img]][github]
|
||||
|
||||
h5ai is provided under the terms of the [MIT License](http://github.com/lrsjng/h5ai/blob/master/LICENSE.txt).
|
||||
It uses the [Faenza icon set](http://tiheum.deviantart.com/art/Faenza-Icons-173323228) (GPL license).
|
||||
A modern HTTP web server index for Apache httpd, lighttpd, nginx and Cherokee.
|
||||
For bug reports and feature requests please use [issues][github-issues].
|
||||
|
||||
There was a [security flaw][cve] in versions 0.22.0 - 0.24.1 that was fixed in
|
||||
0.25.0. If you are still using one of these versions you are advised to
|
||||
upgrade.
|
||||
|
||||
## Changelog
|
||||
## Install
|
||||
|
||||
Do **not** install any files from the `src` folder, they need to be
|
||||
preprocessed to work correctly! Find a preprocessed package and detailed
|
||||
install instructions on the [project page][web].
|
||||
|
||||
### v0.15 · *2011-09-04*
|
||||
In short you have to take the following two steps:
|
||||
|
||||
* added zipped download for selected files
|
||||
* cleaned and refactored
|
||||
* place folder `_h5ai` in the document root folder of the web server
|
||||
* append `/_h5ai/public/index.php` to the end of the default index-file list
|
||||
|
||||
|
||||
### v0.14.1 · *2011-09-01*
|
||||
## Build
|
||||
|
||||
* display meta information in bottom bar (icon view)
|
||||
* added zh-cn translation by [Dongsheng Cai](http://github.com/dongsheng)
|
||||
* added pl translation by Radosław Zając
|
||||
* added ru translation by Богдан Илюхин
|
||||
There are installation ready packages for the latest [releases][release] and
|
||||
[dev builds][develop]. But to build **h5ai** yourself either `git clone` or
|
||||
download the repository. From within the root folder run the following
|
||||
commands to find a fresh zipball in folder `build` (tested on linux only,
|
||||
requires [`node 4.0+`][node] to be installed).
|
||||
|
||||
~~~sh
|
||||
> npm install
|
||||
> npm run build
|
||||
~~~
|
||||
|
||||
### v0.14 · *2011-08-16*
|
||||
|
||||
* added image thumbnails for PHP version
|
||||
* new option `slideTree` to turn off auto slide in
|
||||
## License
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
### v0.13.2 · *2011-08-12*
|
||||
Copyright (c) 2015 Lars Jung (https://larsjung.de)
|
||||
|
||||
* changes in `/h5ai/.htaccess` ... PHP configuration ...
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
### v0.13.1 · *2011-08-12*
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
* ~~hopefully fixed that PHP doesn't get interpreted~~ :/
|
||||
* fixed initial tree display
|
||||
* added sort order option
|
||||
* added/fixed some translations
|
||||
* added lv translation by Sandis Veinbergs
|
||||
|
||||
## References
|
||||
|
||||
### v0.13 · *2011-08-06*
|
||||
**h5ai** profits from other projects, all of them licensed under the MIT license
|
||||
too. Exceptions are some [Material Design icons][material-design-icons] (CC BY 4.0).
|
||||
|
||||
* added PHP implementation! (should work with PHP 5.2+)
|
||||
* added new options
|
||||
* changed layout of the bottom bar to display status information
|
||||
* added language selector to the bottom bar
|
||||
* quoted keys in `options.js` to make it valid json
|
||||
* changed value of option `lang` from `undefined` to `null`
|
||||
* added some new keys to `h5aiLangs`
|
||||
* added browser caching rules for css and js
|
||||
* added pt translation by [Jonnathan](http://github.com/jonnsl)
|
||||
* added bg translation by George Andonov
|
||||
|
||||
[web]: https://larsjung.de/h5ai/
|
||||
[github]: https://github.com/lrsjng/h5ai
|
||||
[github-issues]: https://github.com/lrsjng/h5ai/issues
|
||||
[release]: https://release.larsjung.de/h5ai/
|
||||
[develop]: https://release.larsjung.de/h5ai/develop/
|
||||
[node]: https://nodejs.org
|
||||
[material-design-icons]: https://github.com/google/material-design-icons
|
||||
|
||||
### v0.12.3 · *2011-07-30*
|
||||
|
||||
* added tr translation by [Batuhan Icoz](http://github.com/batuhanicoz)
|
||||
|
||||
|
||||
### v0.12.2 · *2011-07-30*
|
||||
|
||||
* added es translation by Jose David Calderon Serrano
|
||||
|
||||
|
||||
### v0.12.1 · *2011-07-29*
|
||||
|
||||
* fixed unchecked use of console.log
|
||||
|
||||
|
||||
### v0.12 · *2011-07-28*
|
||||
|
||||
* improved performance
|
||||
|
||||
|
||||
### v0.11 · *2011-07-27*
|
||||
|
||||
* changed license to MIT license, see `LICENSE.txt`
|
||||
|
||||
|
||||
### v0.10.2 · *2011-07-26*
|
||||
|
||||
* improved tree scrollbar
|
||||
|
||||
|
||||
### v0.10.1 · *2011-07-24*
|
||||
|
||||
* fixed problems with ' in links
|
||||
|
||||
|
||||
### v0.10 · *2011-07-24*
|
||||
|
||||
* fixed problems with XAMPP on Windows (see `dot.htaccess` comments for instructions)
|
||||
* fixed tree fade-in-fade-out effect for small displays ([issue #6](http://github.com/lrsjng/h5ai/issues/6))
|
||||
* added custom scrollbar to tree ([issue #6](http://github.com/lrsjng/h5ai/issues/6))
|
||||
* fixed broken links caused by URI encoding/decoding ([issue #9](http://github.com/lrsjng/h5ai/issues/9))
|
||||
* added "empty" to localization (hope Google Translate did a good job here)
|
||||
|
||||
|
||||
### v0.9 · *2011-07-18*
|
||||
|
||||
* linked hover states between crumb, extended view and tree
|
||||
* fixed size of tree view (now there's a ugly scrollbar, hopefully will be fixed)
|
||||
* refactored js to improve performance and cleaned code
|
||||
* added caching for folder status codes and content
|
||||
* added fr translation by [Nicolas](http://github.com/Nicosmos)
|
||||
* added nl translation by [Stefan de Konink](http://github.com/skinkie)
|
||||
* added sv translation by Oscar Carlsson
|
||||
|
||||
|
||||
### v0.8 · *2011-07-08*
|
||||
|
||||
* removed slashes from folder labels
|
||||
* optionally rename parent folder entries to real folder names, see `options.js`
|
||||
* long breadcrumbs (multiple rows) no longer hide content
|
||||
* error folder icons are opaque now
|
||||
* refactored js a lot (again...)
|
||||
|
||||
|
||||
### v0.7 · *2011-07-07*
|
||||
|
||||
* removed shadows
|
||||
* smarter tree side bar
|
||||
|
||||
|
||||
### v0.6 · *2011-07-05*
|
||||
|
||||
* refactored js
|
||||
* added localization, see `options.js`
|
||||
|
||||
|
||||
### v0.5.3 · *2011-07-04*
|
||||
|
||||
* refactored js
|
||||
* added basic options support via `options.js`
|
||||
* commented `options.js`
|
||||
* optional tree sidebar
|
||||
|
||||
|
||||
### v0.5.2 · *2011-07-02*
|
||||
|
||||
* details view adjusts to window width
|
||||
* linked icon for *.gz and *.bz2
|
||||
|
||||
|
||||
### v0.5.1 · *2011-07-01*
|
||||
|
||||
* disabled tree sidebar for now, since it had unwanted side effects
|
||||
|
||||
|
||||
### v0.5 · *2011-07-01*
|
||||
|
||||
* added tree sidebar
|
||||
* some refactorings
|
||||
|
||||
|
||||
### v0.4 · *2011-06-27*
|
||||
|
||||
* added better fallback, in case JavaScript is disabled
|
||||
* rewrote js, fixed middle-button click etc. problems
|
||||
* refactored css
|
||||
* sorted, added and moved icons and images
|
||||
* updated dot.access
|
||||
|
||||
|
||||
### v0.3.2 · *2011-06-24*
|
||||
|
||||
* removed lib versions from file names
|
||||
* added 'empty' indicator for icons view
|
||||
|
||||
|
||||
### v0.3.1 · *2011-06-24*
|
||||
|
||||
* refactored js
|
||||
* added `folderClick` and `fileClick` callback hooks
|
||||
* fixed .emtpy style
|
||||
|
||||
|
||||
### v0.3 · *2011-06-23*
|
||||
|
||||
* included build stuff, files previously found in the base directory are now located in folder `target`
|
||||
* styles and scripts are now minified
|
||||
* added Modernizr 2.0.4 for future use
|
||||
* updated jQuery to version 1.6.1
|
||||
|
||||
|
||||
### v0.2.3 · *2011-06-17*
|
||||
|
||||
* more refactoring in main.js
|
||||
* ~~added custom js support, and global includes~~ *removed, only custom top and bottom sections supported*
|
||||
|
||||
|
||||
### v0.2.2 · *2011-06-16*
|
||||
|
||||
* refactored a lot, added some comments
|
||||
* included fixes from [NumEricR](http://github.com/NumEricR)
|
||||
* added top/bottom message support, only basicly styled
|
||||
|
||||
|
||||
### v0.2.1 · *2011-06-16*
|
||||
|
||||
* fixed croped filenames
|
||||
* fixed missing .png extension in header
|
||||
* added some color to the links
|
||||
* added changelog
|
||||
|
||||
|
||||
### v0.2 · *2011-06-15*
|
||||
|
||||
* added icon view
|
||||
[license-img]: https://img.shields.io/badge/license-MIT-a0a060.svg?style=flat-square
|
||||
[web-img]: https://img.shields.io/badge/web-larsjung.de/h5ai-a0a060.svg?style=flat-square
|
||||
[github-img]: https://img.shields.io/badge/github-lrsjng/h5ai-a0a060.svg?style=flat-square
|
||||
|
||||
[cve]: https://larsjung.de/h5ai/cve-2015-3203.txt
|
||||
|
@@ -1,20 +0,0 @@
|
||||
custom = true
|
||||
|
||||
|
||||
# project
|
||||
project.name = h5ai
|
||||
project.version = 0.15
|
||||
|
||||
|
||||
# src
|
||||
src.dir = src
|
||||
|
||||
|
||||
# build
|
||||
build.dir = build
|
||||
release.dir = release
|
||||
|
||||
|
||||
# libs
|
||||
lib.scripp.jar = tools/scripp.jar
|
||||
|
81
build.xml
81
build.xml
@@ -1,81 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project
|
||||
name="h5ai"
|
||||
basedir="."
|
||||
default="release"
|
||||
xmlns:scripp="antlib:de.larsjung.scripp.ant"
|
||||
>
|
||||
<target name="init">
|
||||
<property file="build.properties" />
|
||||
<tstamp>
|
||||
<format property="build.stamp" pattern="yyyy-MM-dd-HHmmss" />
|
||||
</tstamp>
|
||||
<property name="build.label" value="${project.name} ${project.version} b${build.stamp}" />
|
||||
<echo>Build: ${build.label}</echo>
|
||||
<taskdef
|
||||
resource="de/larsjung/scripp/ant/antlib.xml"
|
||||
uri="antlib:de.larsjung.scripp.ant"
|
||||
classpath="${lib.scripp.jar}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="clean" depends="init">
|
||||
<delete dir="${build.dir}" />
|
||||
<delete dir="${release.dir}" />
|
||||
</target>
|
||||
|
||||
|
||||
<target name="build-prepare" depends="clean">
|
||||
<mkdir dir="${build.dir}" />
|
||||
<copy todir="${build.dir}">
|
||||
<fileset dir="${src.dir}" />
|
||||
<fileset file="LICENSE.txt" />
|
||||
<fileset file="README.md" />
|
||||
</copy>
|
||||
<replace dir="${build.dir}">
|
||||
<replacefilter token="%BUILD%" value="${build.label}" />
|
||||
<replacefilter token="%BUILD_NAME%" value="${project.name}" />
|
||||
<replacefilter token="%BUILD_VERSION%" value="${project.version}" />
|
||||
<replacefilter token="%BUILD_STAMP%" value="${build.stamp}" />
|
||||
</replace>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="build" depends="build-prepare">
|
||||
<scripp.dir dir="${build.dir}/h5ai/css" />
|
||||
<scripp.dir dir="${build.dir}/h5ai/js" />
|
||||
</target>
|
||||
|
||||
|
||||
<target name="build-uncompressed" depends="build-prepare">
|
||||
<scripp.dir dir="${build.dir}/h5ai/css" compress="false" />
|
||||
<scripp.dir dir="${build.dir}/h5ai/js" compress="false" />
|
||||
</target>
|
||||
|
||||
|
||||
<target name="release" depends="build">
|
||||
<mkdir dir="${release.dir}" />
|
||||
<zip destfile="${release.dir}/${project.name}-${project.version}.zip" basedir="${build.dir}" />
|
||||
<tar destfile="${release.dir}/${project.name}-${project.version}.tar" basedir="${build.dir}"/>
|
||||
<gzip destfile="${release.dir}/${project.name}-${project.version}.tar.gz" src="${release.dir}/${project.name}-${project.version}.tar"/>
|
||||
<delete file="${release.dir}/${project.name}-${project.version}.tar" />
|
||||
</target>
|
||||
|
||||
|
||||
<macrodef name="scripp.dir">
|
||||
<attribute name="dir" />
|
||||
<attribute name="compress" default="true" />
|
||||
<sequential>
|
||||
<scripp:process compress="@{compress}">
|
||||
<fileset dir="@{dir}" includes="**/*.less,**/*.css,**/*.js" excludes="inc/**/*,**/*.min.css,**/*.min.js" />
|
||||
<globmapper from="*.less" to="*.css" />
|
||||
<globmapper from="*.css" to="*.css" />
|
||||
<globmapper from="*.js" to="*.js" />
|
||||
</scripp:process>
|
||||
<delete dir="@{dir}/inc">
|
||||
<fileset dir="@{dir}" includes="**/*.less" />
|
||||
</delete>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</project>
|
2
ghu
Executable file
2
ghu
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env sh
|
||||
node -r babel-core/register ghu.js "$@"
|
161
ghu.js
Normal file
161
ghu.js
Normal file
@@ -0,0 +1,161 @@
|
||||
const {resolve, join} = require('path');
|
||||
const {
|
||||
ghu,
|
||||
autoprefixer, cssmin, each, ife, includeit, jade, jszip,
|
||||
less, mapfn, newerThan, read, remove, run, uglify, watch, wrap, write
|
||||
} = require('ghu');
|
||||
|
||||
const ROOT = resolve(__dirname);
|
||||
const SRC = join(ROOT, 'src');
|
||||
const TEST = join(ROOT, 'test');
|
||||
const BUILD = join(ROOT, 'build');
|
||||
|
||||
const mapper = mapfn.p(SRC, BUILD).s('.less', '.css').s('.jade', '');
|
||||
|
||||
ghu.defaults('release');
|
||||
|
||||
ghu.before(runtime => {
|
||||
runtime.pkg = Object.assign({}, require('./package.json'));
|
||||
|
||||
const res = run.sync(`git rev-list v${runtime.pkg.version}..HEAD`, {silent: true});
|
||||
if (res.code === 0) {
|
||||
const hashes = res.stdout.split(/\r?\n/).filter(x => x);
|
||||
if (hashes.length) {
|
||||
const counter = ('000' + hashes.length).substr(-3);
|
||||
const hash = hashes[0].substr(0, 7);
|
||||
runtime.pkg.version += `+${counter}~${hash}`;
|
||||
}
|
||||
}
|
||||
|
||||
runtime.comment = `${runtime.pkg.name} v${runtime.pkg.version} - ${runtime.pkg.homepage}`;
|
||||
runtime.commentJs = `/* ${runtime.comment} */\n`;
|
||||
runtime.commentHtml = `<!-- ${runtime.comment} -->`;
|
||||
|
||||
console.log(runtime.comment);
|
||||
});
|
||||
|
||||
ghu.task('force-production', 'ensure :production flag is set', runtime => {
|
||||
if (!runtime.args.production) {
|
||||
runtime.args.production = true;
|
||||
console.log('forcing production mode');
|
||||
}
|
||||
});
|
||||
|
||||
ghu.task('clean', 'delete build folder', () => {
|
||||
return remove(BUILD);
|
||||
});
|
||||
|
||||
ghu.task('lint', 'lint all JavaScript files with eslint', () => {
|
||||
return run('eslint .', {stdio: 'inherit'});
|
||||
});
|
||||
|
||||
ghu.task('build:scripts', runtime => {
|
||||
return read(`${SRC}/_h5ai/public/js/*.js`)
|
||||
.then(newerThan(mapper, `${SRC}/_h5ai/public/js/**`))
|
||||
.then(includeit())
|
||||
.then(ife(() => runtime.args.production, uglify()))
|
||||
.then(wrap(runtime.commentJs))
|
||||
.then(write(mapper, {overwrite: true}));
|
||||
});
|
||||
|
||||
ghu.task('build:styles', runtime => {
|
||||
return read(`${SRC}/_h5ai/public/css/*.less`)
|
||||
.then(newerThan(mapper, `${SRC}/_h5ai/public/css/**`))
|
||||
.then(includeit())
|
||||
.then(less())
|
||||
.then(autoprefixer())
|
||||
.then(ife(() => runtime.args.production, cssmin()))
|
||||
.then(wrap(runtime.commentJs))
|
||||
.then(write(mapper, {overwrite: true}));
|
||||
});
|
||||
|
||||
ghu.task('build:pages', runtime => {
|
||||
return read(`${SRC}: **/*.jade, ! **/*.tpl.jade`)
|
||||
.then(newerThan(mapper, `${SRC}/**/*.tpl.jade`))
|
||||
.then(jade({pkg: runtime.pkg}))
|
||||
.then(wrap('', runtime.commentHtml))
|
||||
.then(write(mapper, {overwrite: true}));
|
||||
});
|
||||
|
||||
ghu.task('build:copy', runtime => {
|
||||
const mapperRoot = mapfn.p(ROOT, join(BUILD, '_h5ai'));
|
||||
|
||||
return Promise.all([
|
||||
read(`${SRC}/**/conf/*.json`)
|
||||
.then(newerThan(mapper))
|
||||
.then(wrap(runtime.commentJs))
|
||||
.then(write(mapper, {overwrite: true, cluster: true})),
|
||||
|
||||
read(`${SRC}: **, ! **/*.js, ! **/*.less, ! **/*.jade, ! **/conf/*.json`)
|
||||
.then(newerThan(mapper))
|
||||
.then(each(obj => {
|
||||
if (/index\.php$/.test(obj.source)) {
|
||||
obj.content = obj.content.replace('{{VERSION}}', runtime.pkg.version);
|
||||
}
|
||||
}))
|
||||
.then(write(mapper, {overwrite: true, cluster: true})),
|
||||
|
||||
read(`${ROOT}/*.md`)
|
||||
.then(newerThan(mapperRoot))
|
||||
.then(write(mapperRoot, {overwrite: true, cluster: true}))
|
||||
]);
|
||||
});
|
||||
|
||||
ghu.task('build:tests', ['build:scripts', 'build:styles'], 'build the test suite', runtime => {
|
||||
return Promise.all([
|
||||
read(`${TEST}/scripts.js`)
|
||||
.then(newerThan(`${BUILD}/test/scripts.js`))
|
||||
.then(includeit())
|
||||
.then(write(`${BUILD}/test/scripts.js`, {overwrite: true})),
|
||||
|
||||
read(`${TEST}/styles.less`)
|
||||
.then(newerThan(`${BUILD}/test/styles.css`))
|
||||
.then(includeit())
|
||||
.then(less())
|
||||
.then(autoprefixer())
|
||||
.then(write(`${BUILD}/test/styles.css`, {overwrite: true})),
|
||||
|
||||
read(`${TEST}/index.html.jade`)
|
||||
.then(newerThan(`${BUILD}/test/index.html`))
|
||||
.then(jade({pkg: runtime.pkg}))
|
||||
.then(write(`${BUILD}/test/index.html`, {overwrite: true})),
|
||||
|
||||
read(`${BUILD}/_h5ai/public/js/scripts.js`)
|
||||
.then(newerThan(`${BUILD}/test/h5ai-scripts.js`))
|
||||
.then(write(`${BUILD}/test/h5ai-scripts.js`, {overwrite: true})),
|
||||
|
||||
read(`${BUILD}/_h5ai/public/css/styles.css`)
|
||||
.then(newerThan(`${BUILD}/test/h5ai-styles.css`))
|
||||
.then(write(`${BUILD}/test/h5ai-styles.css`, {overwrite: true}))
|
||||
]).then(() => {
|
||||
console.log(`browse to file://${BUILD}/test/index.html to run the test suite`);
|
||||
});
|
||||
});
|
||||
|
||||
ghu.task('build', ['build:scripts', 'build:styles', 'build:pages', 'build:copy', 'build:tests'],
|
||||
'build all updated files, optionally use :production');
|
||||
|
||||
ghu.task('deploy', ['build'], 'deploy to a specified path with :dest=/some/path', runtime => {
|
||||
if (typeof runtime.args.dest !== 'string') {
|
||||
throw new Error('no destination path (e.g. :dest=/some/path)');
|
||||
}
|
||||
console.log(`deploy to ${runtime.args.dest}`);
|
||||
|
||||
const mapperDeploy = mapfn.p(BUILD, resolve(runtime.args.dest));
|
||||
|
||||
return read(`${BUILD}/_h5ai/**`)
|
||||
.then(newerThan(mapperDeploy))
|
||||
.then(write(mapperDeploy, {overwrite: true, cluster: true}));
|
||||
});
|
||||
|
||||
ghu.task('watch', runtime => {
|
||||
return watch([SRC, TEST], () => ghu.run(runtime.sequence.filter(x => x !== 'watch'), runtime.args, true));
|
||||
});
|
||||
|
||||
ghu.task('release', ['force-production', 'clean', 'build'], 'create a zipball', runtime => {
|
||||
const target = join(BUILD, `${runtime.pkg.name}-${runtime.pkg.version}.zip`);
|
||||
|
||||
return read(`${BUILD}/_h5ai/**`)
|
||||
.then(jszip({dir: BUILD, level: 9}))
|
||||
.then(write(target, {overwrite: true}));
|
||||
});
|
28
package.json
Normal file
28
package.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "h5ai",
|
||||
"version": "0.28.0",
|
||||
"description": "Modern HTTP web server index.",
|
||||
"homepage": "https://larsjung.de/h5ai/",
|
||||
"bugs": "https://github.com/lrsjng/h5ai/issues",
|
||||
"author": "Lars Jung <lrsjng@gmail.com> (https://larsjung.de)",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/lrsjng/h5ai.git"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"ghu": "node -r babel-core/register ghu.js",
|
||||
"build": "npm run -s ghu release"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "6.3.21",
|
||||
"babel-eslint": "5.0.0-beta6",
|
||||
"babel-preset-es2015": "6.3.13",
|
||||
"eslint": "1.10.3",
|
||||
"ghu": "0.4.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.0.0"
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
43
src/.eslintrc
Normal file
43
src/.eslintrc
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
env:
|
||||
es6: false
|
||||
node: false
|
||||
browser: true
|
||||
mocha: false
|
||||
|
||||
globals:
|
||||
modulejs: false
|
||||
|
||||
ecmaFeatures:
|
||||
arrowFunctions: false
|
||||
binaryLiterals: false
|
||||
blockBindings: false
|
||||
classes: false
|
||||
defaultParams: false
|
||||
destructuring: false
|
||||
forOf: false
|
||||
generators: false
|
||||
globalReturn: false
|
||||
jsx: false
|
||||
modules: false
|
||||
objectLiteralComputedProperties: false
|
||||
objectLiteralDuplicateProperties: false
|
||||
objectLiteralShorthandMethods: false
|
||||
objectLiteralShorthandProperties: false
|
||||
octalLiterals: false
|
||||
regexUFlag: false
|
||||
regexYFlag: false
|
||||
spread: false
|
||||
superInFunctions: false
|
||||
templateStrings: false
|
||||
unicodeCodePointEscapes: false
|
||||
|
||||
rules:
|
||||
consistent-this: 0
|
||||
func-names: 0
|
||||
max-params: [1, 10]
|
||||
no-invalid-this: 0
|
||||
no-var: 0
|
||||
object-shorthand: 0
|
||||
prefer-arrow-callback: 0
|
||||
prefer-reflect: 0
|
3
src/_h5ai/.htaccess
Normal file
3
src/_h5ai/.htaccess
Normal file
@@ -0,0 +1,3 @@
|
||||
Satisfy all
|
||||
Order deny,allow
|
||||
Deny from all
|
3
src/_h5ai/private/.htaccess
Normal file
3
src/_h5ai/private/.htaccess
Normal file
@@ -0,0 +1,3 @@
|
||||
Satisfy all
|
||||
Order deny,allow
|
||||
Deny from all
|
9
src/_h5ai/private/cache/README.md
vendored
Normal file
9
src/_h5ai/private/cache/README.md
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# Cache
|
||||
|
||||
Private cache.
|
||||
|
||||
This directory is used for server side caching. To use caching make this
|
||||
directory writable for your webserver.
|
||||
|
||||
There is no critical data in here. You can savely remove any content. This
|
||||
will clear the cache.
|
18
src/_h5ai/private/conf/l10n/af.json
Normal file
18
src/_h5ai/private/conf/l10n/af.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"lang": "afrikaans",
|
||||
|
||||
"dateFormat": "YYYY-MM-DD HH:mm",
|
||||
"details": "besonderhede",
|
||||
"download": "aflaai",
|
||||
"empty": "leeg",
|
||||
"files": "lêers",
|
||||
"filter": "filter",
|
||||
"folders": "gidse",
|
||||
"grid": "rooster",
|
||||
"icons": "ikone",
|
||||
"lastModified": "Laas verander",
|
||||
"name": "Naam",
|
||||
"noMatch": "geen resultaat",
|
||||
"parentDirectory": "Hoër Vlak",
|
||||
"size": "Grootte"
|
||||
}
|
18
src/_h5ai/private/conf/l10n/bg.json
Normal file
18
src/_h5ai/private/conf/l10n/bg.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"lang": "български",
|
||||
|
||||
"dateFormat": "DD-MM-YYYY HH:mm",
|
||||
"details": "детайли",
|
||||
"download": "изтегляне",
|
||||
"empty": "празна",
|
||||
"files": "файлове",
|
||||
"filter": "филтър",
|
||||
"folders": "директории",
|
||||
"grid": "мрежа",
|
||||
"icons": "икони",
|
||||
"lastModified": "Последна промяна",
|
||||
"name": "Име",
|
||||
"noMatch": "няма съвпадение",
|
||||
"parentDirectory": "Предходна директория",
|
||||
"size": "Размер"
|
||||
}
|
18
src/_h5ai/private/conf/l10n/cs.json
Normal file
18
src/_h5ai/private/conf/l10n/cs.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"lang": "čeština",
|
||||
|
||||
"dateFormat": "DD.MM.YYYY HH:mm",
|
||||
"details": "Podrobnosti",
|
||||
"download": "Stáhnout",
|
||||
"empty": "Prázdná složka",
|
||||
"files": "souborů",
|
||||
"filter": "Filtr",
|
||||
"folders": "složek",
|
||||
"grid": "Seznam",
|
||||
"icons": "Velké ikony",
|
||||
"lastModified": "Datum změny",
|
||||
"name": "Název",
|
||||
"noMatch": "Žádná shoda",
|
||||
"parentDirectory": "Nadřazený adresář",
|
||||
"size": "Velikost"
|
||||
}
|
18
src/_h5ai/private/conf/l10n/da.json
Normal file
18
src/_h5ai/private/conf/l10n/da.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"lang": "dansk",
|
||||
|
||||
"dateFormat": "DD-MM-YYYY HH:mm",
|
||||
"details": "detaljer",
|
||||
"download": "download",
|
||||
"empty": "tom",
|
||||
"files": "filer",
|
||||
"filter": "filter",
|
||||
"folders": "mapper",
|
||||
"grid": "grid",
|
||||
"icons": "ikoner",
|
||||
"lastModified": "Sidst ændret",
|
||||
"name": "Navn",
|
||||
"noMatch": "ingen match",
|
||||
"parentDirectory": "Overordnet mappe",
|
||||
"size": "Størrelse"
|
||||
}
|
22
src/_h5ai/private/conf/l10n/de.json
Normal file
22
src/_h5ai/private/conf/l10n/de.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"lang": "deutsch",
|
||||
|
||||
"dateFormat": "DD.MM.YYYY HH:mm",
|
||||
"details": "Details",
|
||||
"download": "Download",
|
||||
"empty": "leer",
|
||||
"files": "Dateien",
|
||||
"filter": "filtern",
|
||||
"folders": "Ordner",
|
||||
"grid": "Gitter",
|
||||
"icons": "Icons",
|
||||
"language": "Sprache",
|
||||
"lastModified": "Geändert",
|
||||
"name": "Name",
|
||||
"noMatch": "keine Treffer",
|
||||
"parentDirectory": "Übergeordnetes Verzeichnis",
|
||||
"search": "suchen",
|
||||
"size": "Größe",
|
||||
"tree": "Baum",
|
||||
"view": "Ansicht"
|
||||
}
|
18
src/_h5ai/private/conf/l10n/el.json
Normal file
18
src/_h5ai/private/conf/l10n/el.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"lang": "ελληνικά",
|
||||
|
||||
"dateFormat": "DD/MM/YYYY HH:mm",
|
||||
"details": "λεπτομέρειες",
|
||||
"download": "μεταμόρφωση",
|
||||
"empty": "κενό",
|
||||
"files": "αρχεία",
|
||||
"filter": "φίλτρο",
|
||||
"folders": "φάκελοι",
|
||||
"grid": "πλέγμα",
|
||||
"icons": "εικονίδια",
|
||||
"lastModified": "Τελευταία τροποποίηση",
|
||||
"name": "Όνομα",
|
||||
"noMatch": "κανένα αποτέλεσμα",
|
||||
"parentDirectory": "Προηγούμενος Κατάλογος",
|
||||
"size": "Μέγεθος"
|
||||
}
|
23
src/_h5ai/private/conf/l10n/en.json
Normal file
23
src/_h5ai/private/conf/l10n/en.json
Normal file
@@ -0,0 +1,23 @@
|
||||
/* only here as a reference, these values are the hardcoded defaults */
|
||||
{
|
||||
"lang": "english",
|
||||
|
||||
"dateFormat": "YYYY-MM-DD HH:mm",
|
||||
"details": "details",
|
||||
"download": "download",
|
||||
"empty": "empty",
|
||||
"files": "files",
|
||||
"filter": "filter",
|
||||
"folders": "folders",
|
||||
"grid": "grid",
|
||||
"icons": "icons",
|
||||
"language": "Language",
|
||||
"lastModified": "Last modified",
|
||||
"name": "Name",
|
||||
"noMatch": "no match",
|
||||
"parentDirectory": "Parent Directory",
|
||||
"search": "search",
|
||||
"size": "Size",
|
||||
"tree": "Tree",
|
||||
"view": "View"
|
||||
}
|
18
src/_h5ai/private/conf/l10n/es.json
Normal file
18
src/_h5ai/private/conf/l10n/es.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"lang": "español",
|
||||
|
||||
"dateFormat": "DD/MM/YYYY HH:mm",
|
||||
"details": "Detalles",
|
||||
"download": "Descargar",
|
||||
"empty": "vacío",
|
||||
"files": "Archivos",
|
||||
"filter": "Filtar",
|
||||
"folders": "Directorios",
|
||||
"grid": "Cuadrícula",
|
||||
"icons": "Íconos",
|
||||
"lastModified": "Última modificación",
|
||||
"name": "Nombre",
|
||||
"noMatch": "Sin coincidencias",
|
||||
"parentDirectory": "Directorio superior",
|
||||
"size": "Tamaño"
|
||||
}
|
18
src/_h5ai/private/conf/l10n/fi.json
Normal file
18
src/_h5ai/private/conf/l10n/fi.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"lang": "finnish",
|
||||
|
||||
"dateFormat": "DD.MM.YYYY HH:mm",
|
||||
"details": "tiedot",
|
||||
"download": "lataa",
|
||||
"empty": "tyhjä",
|
||||
"files": "tiedostoa",
|
||||
"filter": "suodata",
|
||||
"folders": "hakemistoa",
|
||||
"grid": "ruudukko",
|
||||
"icons": "ikonit",
|
||||
"lastModified": "Viimeksi muokattu",
|
||||
"name": "Nimi",
|
||||
"noMatch": "ei osumia",
|
||||
"parentDirectory": "Ylähakemisto",
|
||||
"size": "Koko"
|
||||
}
|
18
src/_h5ai/private/conf/l10n/fr.json
Normal file
18
src/_h5ai/private/conf/l10n/fr.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"lang": "français",
|
||||
|
||||
"dateFormat": "DD/MM/YYYY HH:mm",
|
||||
"details": "détails",
|
||||
"download": "télécharger",
|
||||
"empty": "vide",
|
||||
"files": "Fichiers",
|
||||
"filter": "filtre",
|
||||
"folders": "Répertoires",
|
||||
"grid": "grille",
|
||||
"icons": "icônes",
|
||||
"lastModified": "Dernière modification",
|
||||
"name": "Nom",
|
||||
"noMatch": "rien trouvé",
|
||||
"parentDirectory": "Dossier parent",
|
||||
"size": "Taille"
|
||||
}
|
17
src/_h5ai/private/conf/l10n/he.json
Normal file
17
src/_h5ai/private/conf/l10n/he.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lang": "עברית",
|
||||
|
||||
"dateFormat": "DD.MM.YYYY HH:mm",
|
||||
"details": "פרטים",
|
||||
"download": "הורדה",
|
||||
"empty": "ריק",
|
||||
"files": "קבצים",
|
||||
"filter": "סינון",
|
||||
"folders": "תיקיות",
|
||||
"icons": "צלמיות",
|
||||
"lastModified": "שינוי אחרון",
|
||||
"name": "שם",
|
||||
"noMatch": "אין תוצאות",
|
||||
"parentDirectory": "תיקיית הורה",
|
||||
"size": "גודל"
|
||||
}
|
18
src/_h5ai/private/conf/l10n/hi.json
Normal file
18
src/_h5ai/private/conf/l10n/hi.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"lang": "हिंदी",
|
||||
|
||||
"dateFormat": "DD.MM.YYYY HH:mm",
|
||||
"details": "विस्तार",
|
||||
"download": "डाउनलोड",
|
||||
"empty": "खाली",
|
||||
"files": "फ़ाइलें",
|
||||
"filter": "फ़िल्टर",
|
||||
"folders": "फोल्डर",
|
||||
"grid": "ग्रिड",
|
||||
"icons": "आइकॉन",
|
||||
"lastModified": "पिछला परिवर्तन",
|
||||
"name": "नाम",
|
||||
"noMatch": "कोई समानता नहीं",
|
||||
"parentDirectory": "मूल डायरेक्टरी",
|
||||
"size": "माप"
|
||||
}
|
18
src/_h5ai/private/conf/l10n/hr.json
Normal file
18
src/_h5ai/private/conf/l10n/hr.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"lang": "hrvatski",
|
||||
|
||||
"dateFormat": "YYYY-MM-DD HH:mm",
|
||||
"details": "detalji",
|
||||
"download": "preuzmi",
|
||||
"empty": "prazno",
|
||||
"files": "datoteka",
|
||||
"filter": "filter",
|
||||
"folders": "direktorij(a)",
|
||||
"grid": "mreža",
|
||||
"icons": "ikone",
|
||||
"lastModified": "Posljednja izmjena",
|
||||
"name": "Naziv",
|
||||
"noMatch": "nema rezultata",
|
||||
"parentDirectory": "Natrag",
|
||||
"size": "Veličina"
|
||||
}
|
16
src/_h5ai/private/conf/l10n/hu.json
Normal file
16
src/_h5ai/private/conf/l10n/hu.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"lang": "magyar",
|
||||
|
||||
"dateFormat": "YYYY-MM-DD HH:mm",
|
||||
"details": "részletek",
|
||||
"download": "letöltés",
|
||||
"empty": "üres",
|
||||
"files": "fájlok",
|
||||
"folders": "mappák",
|
||||
"icons": "ikonok",
|
||||
"lastModified": "Utoljára módosítva",
|
||||
"name": "Név",
|
||||
"noMatch": "nincs találat",
|
||||
"parentDirectory": "Szülő könyvtár",
|
||||
"size": "Méret"
|
||||
}
|
18
src/_h5ai/private/conf/l10n/it.json
Normal file
18
src/_h5ai/private/conf/l10n/it.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"lang": "italiano",
|
||||
|
||||
"dateFormat": "DD-MM-YYYY HH:mm",
|
||||
"details": "dettagli",
|
||||
"download": "download",
|
||||
"empty": "vuota",
|
||||
"files": "file",
|
||||
"filter": "filtra",
|
||||
"folders": "cartelle",
|
||||
"grid": "griglia",
|
||||
"icons": "icone",
|
||||
"lastModified": "Ultima modifica",
|
||||
"name": "Nome",
|
||||
"noMatch": "nessun risultato",
|
||||
"parentDirectory": "Cartella Superiore",
|
||||
"size": "Dimensione"
|
||||
}
|
20
src/_h5ai/private/conf/l10n/ja.json
Normal file
20
src/_h5ai/private/conf/l10n/ja.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"lang": "日本語",
|
||||
|
||||
"dateFormat": "YYYY-MM-DD HH:mm",
|
||||
"details": "詳細",
|
||||
"download": "ダウンロード",
|
||||
"empty": "(空)",
|
||||
"files": "ファイル",
|
||||
"filter": "フィルター",
|
||||
"folders": "フォルダー",
|
||||
"grid": "グリッド",
|
||||
"icons": "アイコン",
|
||||
"language": "言語",
|
||||
"lastModified": "最終変更日時",
|
||||
"name": "名前",
|
||||
"noMatch": "一致する項目が見つかりません",
|
||||
"parentDirectory": "親ディレクトリへ",
|
||||
"size": "サイズ",
|
||||
"view": "ビュー"
|
||||
}
|
22
src/_h5ai/private/conf/l10n/ko.json
Normal file
22
src/_h5ai/private/conf/l10n/ko.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"lang": "한국어",
|
||||
|
||||
"dateFormat": "YYYY-MM-DD HH:mm",
|
||||
"details": "자세히",
|
||||
"download": "다운로드",
|
||||
"empty": "빈 폴더",
|
||||
"files": "파일",
|
||||
"filter": "필터",
|
||||
"folders": "폴더",
|
||||
"grid": "그리드",
|
||||
"icons": "아이콘",
|
||||
"language": "언어",
|
||||
"lastModified": "최근 수정일",
|
||||
"name": "파일명",
|
||||
"noMatch": "해당파일이 없습니다.",
|
||||
"parentDirectory": "상위폴더",
|
||||
"search": "검색",
|
||||
"size": "크기",
|
||||
"tree": "트리",
|
||||
"view": "보기"
|
||||
}
|
22
src/_h5ai/private/conf/l10n/lv.json
Normal file
22
src/_h5ai/private/conf/l10n/lv.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"lang": "latviešu",
|
||||
|
||||
"dateFormat": "YYYY-MM-DD HH:mm",
|
||||
"details": "detaļas",
|
||||
"download": "lejupielādēt",
|
||||
"empty": "tukšs",
|
||||
"files": "faili",
|
||||
"filter": "filtrēt",
|
||||
"folders": "mapes",
|
||||
"grid": "režģis",
|
||||
"icons": "ikonas",
|
||||
"language": "Valoda",
|
||||
"lastModified": "Pēdējoreiz modificēts",
|
||||
"name": "Nosaukums",
|
||||
"noMatch": "nav sakritības",
|
||||
"parentDirectory": "Vecākdirektorijs",
|
||||
"search": "meklēt",
|
||||
"size": "Izmērs",
|
||||
"tree": "Koks",
|
||||
"view": "Skats"
|
||||
}
|
15
src/_h5ai/private/conf/l10n/nb.json
Normal file
15
src/_h5ai/private/conf/l10n/nb.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"lang": "norwegian",
|
||||
|
||||
"details": "detaljer",
|
||||
"download": "last ned",
|
||||
"empty": "tom",
|
||||
"files": "filer",
|
||||
"folders": "mapper",
|
||||
"icons": "ikoner",
|
||||
"lastModified": "Sist endret",
|
||||
"name": "Navn",
|
||||
"noMatch": "ingen treff",
|
||||
"parentDirectory": "Overordnet mappe",
|
||||
"size": "Størrelse"
|
||||
}
|
11
src/_h5ai/private/conf/l10n/nl.json
Normal file
11
src/_h5ai/private/conf/l10n/nl.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"lang": "nederlands",
|
||||
|
||||
"details": "details",
|
||||
"empty": "lege",
|
||||
"icons": "iconen",
|
||||
"lastModified": "Laatste wijziging",
|
||||
"name": "Naam",
|
||||
"parentDirectory": "Bovenliggende map",
|
||||
"size": "Grootte"
|
||||
}
|
18
src/_h5ai/private/conf/l10n/pl.json
Normal file
18
src/_h5ai/private/conf/l10n/pl.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"lang": "polski",
|
||||
|
||||
"dateFormat": "YYYY-MM-DD HH:mm",
|
||||
"details": "szczegóły",
|
||||
"download": "pobierz",
|
||||
"empty": "pusty",
|
||||
"files": "plików",
|
||||
"filter": "filtr",
|
||||
"folders": "folderów",
|
||||
"grid": "kafelki",
|
||||
"icons": "ikony",
|
||||
"lastModified": "Ostatnia modyfikacja",
|
||||
"name": "Nazwa",
|
||||
"noMatch": "nie znaleziono",
|
||||
"parentDirectory": "Katalog nadrzędny",
|
||||
"size": "Rozmiar"
|
||||
}
|
18
src/_h5ai/private/conf/l10n/pt.json
Normal file
18
src/_h5ai/private/conf/l10n/pt.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"lang": "português",
|
||||
|
||||
"dateFormat": "DD-MM-YYYY HH:mm",
|
||||
"details": "detalhes",
|
||||
"download": "descarregar",
|
||||
"empty": "vazio",
|
||||
"files": "arquivos",
|
||||
"filter": "filtro",
|
||||
"folders": "pastas",
|
||||
"grid": "grelha",
|
||||
"icons": "ícones",
|
||||
"lastModified": "última modificação",
|
||||
"name": "Nome",
|
||||
"noMatch": "sem resultados",
|
||||
"parentDirectory": "diretório acima",
|
||||
"size": "Tamanho"
|
||||
}
|
15
src/_h5ai/private/conf/l10n/ro.json
Normal file
15
src/_h5ai/private/conf/l10n/ro.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"lang": "română",
|
||||
|
||||
"details": "detalii",
|
||||
"download": "descarcă",
|
||||
"empty": "gol",
|
||||
"files": "fişiere",
|
||||
"folders": "dosar",
|
||||
"icons": "pictograme",
|
||||
"lastModified": "ultima modificare",
|
||||
"name": "nume",
|
||||
"noMatch": "0 rezultate",
|
||||
"parentDirectory": "dosar părinte",
|
||||
"size": "mărime"
|
||||
}
|
20
src/_h5ai/private/conf/l10n/ru.json
Normal file
20
src/_h5ai/private/conf/l10n/ru.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"lang": "русский",
|
||||
|
||||
"dateFormat": "YYYY-MM-DD HH:mm",
|
||||
"details": "Детали",
|
||||
"download": "Скачать",
|
||||
"empty": "Пусто",
|
||||
"files": "Файлы",
|
||||
"filter": "Фильтр",
|
||||
"folders": "Папки",
|
||||
"grid": "Сетка",
|
||||
"icons": "Иконки",
|
||||
"language": "Язык",
|
||||
"lastModified": "Последние изменения",
|
||||
"name": "Имя",
|
||||
"noMatch": "Нет совпадений",
|
||||
"parentDirectory": "Главная директория",
|
||||
"size": "Размер",
|
||||
"view": "Вид"
|
||||
}
|
13
src/_h5ai/private/conf/l10n/sk.json
Normal file
13
src/_h5ai/private/conf/l10n/sk.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"lang": "slovenčina",
|
||||
|
||||
"details": "podrobnosti",
|
||||
"empty": "prázdny",
|
||||
"files": "súborov",
|
||||
"folders": "priečinkov",
|
||||
"icons": "ikony",
|
||||
"lastModified": "Upravené",
|
||||
"name": "Názov",
|
||||
"parentDirectory": "Nadriadený priečinok",
|
||||
"size": "Velkosť"
|
||||
}
|
18
src/_h5ai/private/conf/l10n/sl.json
Normal file
18
src/_h5ai/private/conf/l10n/sl.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"lang": "slovenščina",
|
||||
|
||||
"dateFormat": "DD. MM. YYYY HH:mm",
|
||||
"details": "podrobnosti",
|
||||
"download": "prenesi",
|
||||
"empty": "prazno",
|
||||
"files": "datoteke",
|
||||
"filter": "filter",
|
||||
"folders": "mape",
|
||||
"grid": "mreža",
|
||||
"icons": "ikone",
|
||||
"lastModified": "Zadnja sprememba",
|
||||
"name": "Ime",
|
||||
"noMatch": "ni zadetkov",
|
||||
"parentDirectory": "Nadrejena mapa",
|
||||
"size": "Velikost"
|
||||
}
|
15
src/_h5ai/private/conf/l10n/sr.json
Normal file
15
src/_h5ai/private/conf/l10n/sr.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"lang": "srpski",
|
||||
|
||||
"details": "detalji",
|
||||
"download": "download",
|
||||
"empty": "prazno",
|
||||
"files": "fajlovi",
|
||||
"folders": "direktorijum",
|
||||
"icons": "ikone",
|
||||
"lastModified": "Poslednja modifikacija",
|
||||
"name": "Ime",
|
||||
"noMatch": "bez poklapanja",
|
||||
"parentDirectory": "Roditeljski direktorijum",
|
||||
"size": "Veličina"
|
||||
}
|
16
src/_h5ai/private/conf/l10n/sv.json
Normal file
16
src/_h5ai/private/conf/l10n/sv.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"lang": "svenska",
|
||||
|
||||
"details": "detaljerad",
|
||||
"download": "ladda ner",
|
||||
"empty": "tom",
|
||||
"files": "filer",
|
||||
"folders": "kataloger",
|
||||
"grid": "rutnät",
|
||||
"icons": "ikoner",
|
||||
"lastModified": "Senast ändrad",
|
||||
"name": "Filnamn",
|
||||
"noMatch": "ingen matchning",
|
||||
"parentDirectory": "Till överordnad mapp",
|
||||
"size": "Filstorlek"
|
||||
}
|
14
src/_h5ai/private/conf/l10n/tr.json
Normal file
14
src/_h5ai/private/conf/l10n/tr.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"lang": "türkçe",
|
||||
|
||||
"details": "detaylar",
|
||||
"download": "indir",
|
||||
"empty": "boş",
|
||||
"files": "dosyalar",
|
||||
"folders": "klasörler",
|
||||
"icons": "ikonlar",
|
||||
"lastModified": "Son Düzenleme",
|
||||
"name": "İsim",
|
||||
"parentDirectory": "Üst Dizin",
|
||||
"size": "Boyut"
|
||||
}
|
18
src/_h5ai/private/conf/l10n/uk.json
Normal file
18
src/_h5ai/private/conf/l10n/uk.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"lang": "українська",
|
||||
|
||||
"dateFormat": "YYYY-MM-DD HH:mm",
|
||||
"details": "Деталі",
|
||||
"download": "Завантажити",
|
||||
"empty": "Порожньо",
|
||||
"files": "Файли(ів)",
|
||||
"filter": "Фільтр",
|
||||
"folders": "Тек(и)",
|
||||
"grid": "Гратка",
|
||||
"icons": "Піктограми",
|
||||
"lastModified": "Останні зміни",
|
||||
"name": "Ім'я",
|
||||
"noMatch": "Немає співпадінь",
|
||||
"parentDirectory": "Головна тека",
|
||||
"size": "Розмір"
|
||||
}
|
20
src/_h5ai/private/conf/l10n/zh-cn.json
Normal file
20
src/_h5ai/private/conf/l10n/zh-cn.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"lang": "简体中文",
|
||||
|
||||
"dateFormat": "YYYY-MM-DD HH:mm",
|
||||
"details": "详情",
|
||||
"download": "下载",
|
||||
"empty": "空文件夹",
|
||||
"files": "文件",
|
||||
"filter": "查找",
|
||||
"folders": "文件夹",
|
||||
"grid": "网格",
|
||||
"icons": "图标",
|
||||
"language": "语言",
|
||||
"lastModified": "修改时间",
|
||||
"name": "文件名",
|
||||
"noMatch": "无匹配项",
|
||||
"parentDirectory": "父文件夹",
|
||||
"size": "大小",
|
||||
"view": "视图"
|
||||
}
|
18
src/_h5ai/private/conf/l10n/zh-tw.json
Normal file
18
src/_h5ai/private/conf/l10n/zh-tw.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"lang": "正體中文",
|
||||
|
||||
"dateFormat": "YYYY-MM-DD HH:mm",
|
||||
"details": "詳細資料",
|
||||
"download": "下載",
|
||||
"empty": "空資料夾",
|
||||
"files": "檔案",
|
||||
"filter": "過濾",
|
||||
"folders": "資料夾",
|
||||
"grid": "網格",
|
||||
"icons": "圖示",
|
||||
"lastModified": "上次修改",
|
||||
"name": "檔名",
|
||||
"noMatch": "沒有符合的檔案",
|
||||
"parentDirectory": "上層目錄",
|
||||
"size": "大小"
|
||||
}
|
395
src/_h5ai/private/conf/options.json
Normal file
395
src/_h5ai/private/conf/options.json
Normal file
@@ -0,0 +1,395 @@
|
||||
{
|
||||
/*
|
||||
Password hash.
|
||||
|
||||
SHA512 hash of the info page password, the preset password is the empty string.
|
||||
Online hash generator: http://md5hashing.net/hashing/sha512
|
||||
*/
|
||||
"passhash": "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e",
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Resources.
|
||||
|
||||
Additional script and style tags added to all pages. Paths not beginning
|
||||
with "http://", "https://" or "/" will be looked up relative to
|
||||
"_h5ai/public/ext/" (no check for existence).
|
||||
|
||||
- scripts: array of strings
|
||||
- styles: array of strings
|
||||
*/
|
||||
"resources": {
|
||||
"scripts": [],
|
||||
"styles": [
|
||||
"//fonts.googleapis.com/css?family=Ubuntu:300,400,700%7CUbuntu+Mono:400,700"
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
|
||||
/*
|
||||
General view options.
|
||||
|
||||
- binaryPrefix: boolean, set to true uses 1024B=1KiB when formatting file sizes (see http://en.wikipedia.org/wiki/Binary_prefix)
|
||||
- fastBrowsing: boolean, use History API if available (no need to reload the whole page)
|
||||
- fonts: array of strings, fonts to use in regular context
|
||||
- fontsMono: array of strings, fonts to use in monopspaced context
|
||||
- hidden: array of strings, don't list items matching these regular expressions
|
||||
- hideFolders: boolean, hide all folders in the main view
|
||||
- hideIf403: boolean, hide files and folders that are not readable by the server
|
||||
- hideParentFolder: boolean, hide parent folder links in the main view
|
||||
- maxIconSize: number, max size for icons in the main view
|
||||
- modes: array of strings, subset of ["details", "grid", "icons"]
|
||||
the first value indicates the default view mode. If only one value
|
||||
is given the view mode is fixed and the selector buttons are hidden.
|
||||
The user selected view mode is also stored local in modern browsers
|
||||
so that it will be persistent.
|
||||
- modeToggle: boolean, show a view mode toggle in the toolbar, or "next"
|
||||
- setParentFolderLabels: boolean, set parent folder labels to real folder names
|
||||
- sizes: array of numbers
|
||||
the first value indicates the default view size. If only one value
|
||||
is given the view size is fixed and the selector buttons are hidden.
|
||||
The user selected view size is also stored local in modern browsers
|
||||
so that it will be persistent.
|
||||
- theme: string, name of one of the folders in "_h5ai/images/themes", defaults to "default"
|
||||
- unmanaged: array of strings, don't manage folders containing one of those files
|
||||
- unmanagedInNewWindow: boolean, open unmanaged links in new window/tab
|
||||
*/
|
||||
"view": {
|
||||
"binaryPrefix": false,
|
||||
"fastBrowsing": true,
|
||||
"fonts": ["Ubuntu", "Roboto", "Helvetica", "Arial", "sans-serif"],
|
||||
"fontsMono": ["Ubuntu Mono", "Monaco", "Lucida Sans Typewriter", "monospace"],
|
||||
"hidden": ["^\\.", "^_h5ai"],
|
||||
"hideFolders": false,
|
||||
"hideIf403": true,
|
||||
"hideParentFolder": false,
|
||||
"maxIconSize": 40,
|
||||
"modes": ["details", "grid", "icons"],
|
||||
"modeToggle": false,
|
||||
"setParentFolderLabels": true,
|
||||
"sizes": [20, 40, 60, 80, 100, 140, 180, 220, 260, 300],
|
||||
"theme": "comity",
|
||||
"unmanaged": ["index.html", "index.htm", "index.php"],
|
||||
"unmanagedInNewWindow": false
|
||||
},
|
||||
|
||||
|
||||
|
||||
/*** Extensions (in alphabetical order) ***/
|
||||
|
||||
/*
|
||||
Watch and update current folder content.
|
||||
|
||||
- interval: number, update interval in milliseconds, at least 1000
|
||||
*/
|
||||
"autorefresh": {
|
||||
"enabled": false,
|
||||
"interval": 5000
|
||||
},
|
||||
|
||||
/*
|
||||
Enable a context menu (right-click) on some elements.
|
||||
*/
|
||||
"contextmenu": {
|
||||
"enabled": false
|
||||
},
|
||||
|
||||
/*
|
||||
Show a clickable breadcrumb.
|
||||
*/
|
||||
"crumb": {
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
/*
|
||||
Allow customized header and footer files.
|
||||
First checks for files "_h5ai.header.html" and "_h5ai.footer.html" in the current directory.
|
||||
If not successful it checks all parent directories (starting in the current directory) for
|
||||
files "_h5ai.headers.html" and "_h5ai.footers.html".
|
||||
Note the different filenames: "header" (only current) - "headers" (current and sub directories)!
|
||||
The file's content will be placed inside a <div/> tag above/below the main content.
|
||||
If a file's extension is ".md" instead of ".html" its content will be interpreted as markdown.
|
||||
*/
|
||||
"custom": {
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
/*
|
||||
Enable packaged download of selected entries.
|
||||
To select files the "select"-extension needs to be enabled.
|
||||
|
||||
- type: string, "php-tar", "shell-tar" or "shell-zip"
|
||||
- packageName: string, basename of the download package, null for current filename or foldername
|
||||
- alwaysVisible: boolean, always show download button (defaults to download the current folder)
|
||||
*/
|
||||
"download": {
|
||||
"enabled": true,
|
||||
"type": "php-tar",
|
||||
"packageName": null,
|
||||
"alwaysVisible": false
|
||||
},
|
||||
|
||||
/*
|
||||
Allow filtering the displayed files and folders in current folder.
|
||||
Checks for substrings.
|
||||
|
||||
If advanced is enabled it checks entries for right order of characters,
|
||||
i.e. "ab" matches "ab", "axb", "xaxbx" but not "ba". Space separated
|
||||
sequences get OR-ed. Searches will be treated as JavaScript regular
|
||||
expressions if you prefix them with "re:".
|
||||
|
||||
- advanced: boolean, use advanced pattern parsing
|
||||
- debounceTime: number, debounce wait time in milliseconds
|
||||
*/
|
||||
"filter": {
|
||||
"enabled": false,
|
||||
"advanced": true,
|
||||
"debounceTime": 100
|
||||
},
|
||||
|
||||
/*
|
||||
Calc the size of folders.
|
||||
This operation is real slow. The calculated sizes differ slightly for both
|
||||
calculation types since "php" only adds the file size, while "shell-du"
|
||||
also adds the sizes for the actual folder files.
|
||||
|
||||
- type: string, "php" (sloooow) or "shell-du" (sloow)
|
||||
*/
|
||||
"foldersize": {
|
||||
"enabled": false,
|
||||
"type": "php"
|
||||
},
|
||||
|
||||
/*
|
||||
Adds Google Universial Analytics asynchronous tracking code.
|
||||
see: https://developers.google.com/analytics/devguides/collection/analyticsjs/
|
||||
|
||||
- id: string, account ID
|
||||
*/
|
||||
"google-analytics-ua": {
|
||||
"enabled": false,
|
||||
"id": "UA-000000-0"
|
||||
},
|
||||
|
||||
/*
|
||||
Enable a generic info side bar.
|
||||
|
||||
- show: boolean, initial visible to first time users
|
||||
- qrcode: boolean, show a QR-Code
|
||||
- qrColor: string, QR-Code fill color
|
||||
*/
|
||||
"info": {
|
||||
"enabled": true,
|
||||
"show": false,
|
||||
"qrcode": true,
|
||||
"qrColor": "#999"
|
||||
},
|
||||
|
||||
/*
|
||||
Localization, for example "en", "de" etc. - see "_h5ai/conf/l10n" folder for
|
||||
possible values. Adjust it to your needs. If lang is not found
|
||||
it defaults to "en".
|
||||
|
||||
- lang: string, default language
|
||||
- useBroserLang: boolean, try to use browser language
|
||||
*/
|
||||
"l10n": {
|
||||
"enabled": true,
|
||||
"lang": "en",
|
||||
"useBrowserLang": true
|
||||
},
|
||||
|
||||
/*
|
||||
Adds peer5 p2p downloader which is based on webrtc (see peer5.com).
|
||||
|
||||
- id: string, the API key
|
||||
*/
|
||||
"peer5": {
|
||||
"enabled": false,
|
||||
"id": "z142i5n5qypq4cxr"
|
||||
},
|
||||
|
||||
/*
|
||||
Adds Piwik tracker javascript code.
|
||||
|
||||
- baseURL: string, do not include the protocol, e.g. "mydomain.tld/piwik"
|
||||
- idSite: number
|
||||
*/
|
||||
"piwik-analytics": {
|
||||
"enabled": false,
|
||||
"baseURL": "some/url",
|
||||
"idSite": 1
|
||||
},
|
||||
|
||||
/*
|
||||
Play a audio preview on click.
|
||||
|
||||
- types: array of strings
|
||||
*/
|
||||
"preview-aud": {
|
||||
"enabled": true,
|
||||
"types": ["aud"]
|
||||
},
|
||||
|
||||
/*
|
||||
Show an image preview on click.
|
||||
|
||||
- types: array of strings
|
||||
- size: number, sample size, or false for original size
|
||||
*/
|
||||
"preview-img": {
|
||||
"enabled": true,
|
||||
"size": false,
|
||||
"types": ["img", "img-bmp", "img-gif", "img-ico", "img-jpg", "img-png", "img-raw"]
|
||||
},
|
||||
|
||||
/*
|
||||
Show text file preview on click.
|
||||
"types" maps file types to http://prismjs.com languages.
|
||||
|
||||
Additional type are:
|
||||
- "markdown" to render Markdown text
|
||||
- "none" for floating text
|
||||
- "fixed" for fixed width text
|
||||
|
||||
- types: dict string to string, maps types to languages
|
||||
*/
|
||||
"preview-txt": {
|
||||
"enabled": true,
|
||||
"types": {
|
||||
"txt": "fixed",
|
||||
"txt-authors": "fixed",
|
||||
"txt-c": "c",
|
||||
"txt-cpp": "cpp",
|
||||
"txt-css": "css",
|
||||
"txt-diff": "fixed",
|
||||
"txt-go": "go",
|
||||
"txt-h": "c",
|
||||
"txt-hpp": "cpp",
|
||||
"txt-install": "fixed",
|
||||
"txt-java": "java",
|
||||
"txt-js": "javascript",
|
||||
"txt-json": "javascript",
|
||||
"txt-less": "css",
|
||||
"txt-license": "fixed",
|
||||
"txt-log": "fixed",
|
||||
"txt-makefile": "fixed",
|
||||
"txt-md": "markdown",
|
||||
// "txt-php": "php",
|
||||
"txt-py": "python",
|
||||
"txt-rb": "ruby",
|
||||
"txt-readme": "fixed",
|
||||
"txt-rtf": "fixed",
|
||||
"txt-scala": "scala",
|
||||
"txt-script": "bash",
|
||||
"txt-xml": "fixed"
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
Play a video preview on click.
|
||||
|
||||
- types: array of strings
|
||||
*/
|
||||
"preview-vid": {
|
||||
"enabled": true,
|
||||
"types": ["vid-avi", "vid-flv", "vid-mkv", "vid-mov", "vid-mp4", "vid-mpg", "vid-webm"]
|
||||
},
|
||||
|
||||
/*
|
||||
Allow searching files and folders in and below current folder.
|
||||
Checks for substrings.
|
||||
|
||||
If advanced is enabled it checks entries for right order of characters,
|
||||
i.e. "ab" matches "ab", "axb", "xaxbx" but not "ba". Space separated
|
||||
sequences get OR-ed. Searches will be treated as JavaScript regular
|
||||
expressions if you prefix them with "re:".
|
||||
|
||||
- advanced: boolean, use advanced pattern parsing
|
||||
- debounceTime: number, debounce wait time in milliseconds
|
||||
*/
|
||||
"search": {
|
||||
"enabled": true,
|
||||
"advanced": true,
|
||||
"debounceTime": 300
|
||||
},
|
||||
|
||||
/*
|
||||
Make entries selectable.
|
||||
At the moment only needed for packaged download.
|
||||
|
||||
- clickndrag: boolean, allow first mouse button + drag selection
|
||||
- checkboxes: boolean, show a checkbox on mouse over item
|
||||
*/
|
||||
"select": {
|
||||
"enabled": true,
|
||||
"clickndrag": true,
|
||||
"checkboxes": true
|
||||
},
|
||||
|
||||
/*
|
||||
Default sort order.
|
||||
"column" and "reverse" are locally stored.
|
||||
|
||||
- column: number, 0 for "Name", 1 for "Date", 2 for "Size"
|
||||
- reverse: boolean, false for ascending, true for descending
|
||||
- ignorecase: boolean, compare ignorecase
|
||||
- natural: boolean, use natural sort order
|
||||
- folders: number, where to place folders, 0 for "top", 1 for "in place", 2 for "bottom"
|
||||
*/
|
||||
"sort": {
|
||||
"enabled": true,
|
||||
"column": 0,
|
||||
"reverse": false,
|
||||
"ignorecase": true,
|
||||
"natural": false,
|
||||
"folders": 0
|
||||
},
|
||||
|
||||
/*
|
||||
Show thumbnails for image files. Needs the "/_h5ai/cache" folder to be
|
||||
writable for the web Server.
|
||||
|
||||
- img: array of strings
|
||||
- mov: array of strings
|
||||
- doc: array of strings
|
||||
- delay: number, delay in milliseconds after "dom-ready" before thumb-requesting starts
|
||||
- size: number, size in pixel of the generated thumbnails
|
||||
- exif: boolean, use included EXIF thumbs if possible
|
||||
*/
|
||||
"thumbnails": {
|
||||
"enabled": true,
|
||||
"img": ["img-bmp", "img-gif", "img-ico", "img-jpg", "img-png"],
|
||||
"mov": ["vid-avi", "vid-flv", "vid-mkv", "vid-mov", "vid-mp4", "vid-mpg", "vid-webm"],
|
||||
"doc": ["x-pdf", "x-ps"],
|
||||
"delay": 1,
|
||||
"size": 240,
|
||||
"exif": false
|
||||
},
|
||||
|
||||
/*
|
||||
Replace window title with current breadcrumb.
|
||||
*/
|
||||
"title": {
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
/*
|
||||
Show a folder tree.
|
||||
Note that this might affect performance significantly.
|
||||
|
||||
- show: boolean, initial visible to first time users
|
||||
- maxSubfolders: number, max number of subfolders to show in tree
|
||||
- naturalSort: boolean, use natural sort order for folders
|
||||
- ignorecase: boolean, sort ignorecase
|
||||
*/
|
||||
"tree": {
|
||||
"enabled": true,
|
||||
"show": true,
|
||||
"maxSubfolders": 50,
|
||||
"naturalSort": false,
|
||||
"ignorecase": true
|
||||
}
|
||||
}
|
74
src/_h5ai/private/conf/types.json
Normal file
74
src/_h5ai/private/conf/types.json
Normal file
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"ar": ["*.tar.bz2", "*.crx"],
|
||||
"ar-apk": ["*.apk"],
|
||||
"ar-deb": ["*.deb"],
|
||||
"ar-gz": ["*.gz", "*.tar.gz", "*.tgz"],
|
||||
"ar-rar": ["*.rar"],
|
||||
"ar-rpm": ["*.rpm"],
|
||||
"ar-tar": ["*.tar"],
|
||||
"ar-zip": ["*.7z", "*.bz2", "*.jar", "*.lzma", "*.war", "*.z", "*.Z", "*.zip"],
|
||||
"aud": ["*.aif", "*.aiff", "*.flac", "*.m4a", "*.mid", "*.mp3", "*.mpa", "*.ra", "*.ogg", "*.wav", "*.wma"],
|
||||
"aud-pls": ["*.m3u", "*.m3u8", "*.pls"],
|
||||
"bin": ["*.class", "*.o", "*.so"],
|
||||
"bin-exe": ["*.bat", "*.cmd", "*.exe"],
|
||||
"img": ["*.xpm"],
|
||||
"img-bmp": ["*.bmp"],
|
||||
"img-gif": ["*.gif"],
|
||||
"img-ico": ["*.ico"],
|
||||
"img-jpg": ["*.jpg", "*.jpeg"],
|
||||
"img-png": ["*.png"],
|
||||
"img-raw": ["*.cr2", "*.nef"],
|
||||
"img-tiff": ["*.tiff"],
|
||||
"txt": ["*.text", "*.txt"],
|
||||
"txt-build": ["*.pom", "build.xml", "pom.xml"],
|
||||
"txt-c": ["*.c"],
|
||||
"txt-cpp": ["*.cpp"],
|
||||
"txt-css": ["*.css"],
|
||||
"txt-diff": ["*.diff", "*.patch"],
|
||||
"txt-go": ["*.go"],
|
||||
"txt-h": ["*.h"],
|
||||
"txt-html": ["*.htm", "*.html", "*.shtml", "*.xhtml"],
|
||||
"txt-hpp": ["*.hpp"],
|
||||
"txt-java": ["*.java"],
|
||||
"txt-scala": ["*.scala"],
|
||||
"txt-js": ["*.js"],
|
||||
"txt-json": ["*.json"],
|
||||
"txt-less": ["*.less"],
|
||||
"txt-log": ["*.log", "changelog*"],
|
||||
"txt-md": ["*.markdown", "*.md"],
|
||||
"txt-php": ["*.php"],
|
||||
"txt-py": ["*.py"],
|
||||
"txt-rb": ["*.rb"],
|
||||
"txt-rss": ["*.rss"],
|
||||
"txt-rtf": ["*.rtf"],
|
||||
"txt-script": ["*.conf", "*.bsh", "*.csh", "*.ini", "*.ksh", "*.sh", "*.shar", "*.tcl", "*.zsh"],
|
||||
"txt-source": [],
|
||||
"txt-svg": ["*.svg"],
|
||||
"txt-tex": ["*.tex"],
|
||||
"txt-vcal": ["*.vcal"],
|
||||
"txt-xml": ["*.xml"],
|
||||
"vid": [],
|
||||
"vid-avi": ["*.avi"],
|
||||
"vid-flv": ["*.flv"],
|
||||
"vid-mkv": ["*.mkv"],
|
||||
"vid-mov": ["*.mov"],
|
||||
"vid-mp4": ["*.mp4", "*.m4v"],
|
||||
"vid-mpg": ["*.mpg"],
|
||||
"vid-rm": ["*.rm"],
|
||||
"vid-swf": ["*.swf"],
|
||||
"vid-ts": ["*.ts"],
|
||||
"vid-vob": ["*.vob"],
|
||||
"vid-webm": ["*.webm"],
|
||||
"vid-wmv": ["*.wmv"],
|
||||
"x": [],
|
||||
"x-bak": ["*.bak", "*~"],
|
||||
"x-calc": ["*.ods", "*.ots", "*.xlr", "*.xls", "*.xlsx"],
|
||||
"x-disc": ["*.cue", "*.iso"],
|
||||
"x-doc": ["*.doc", "*.docx", "*.odm", "*.odt", "*.ott"],
|
||||
"x-draw": ["*.drw"],
|
||||
"x-eps": ["*.eps"],
|
||||
"x-pdf": ["*.pdf"],
|
||||
"x-pres": ["*.odp", "*.otp", "*.pps", "*.ppt", "*.pptx"],
|
||||
"x-ps": ["*.ps"],
|
||||
"x-psd": ["*.psd"]
|
||||
}
|
46
src/_h5ai/private/php/class-bootstrap.php
Normal file
46
src/_h5ai/private/php/class-bootstrap.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
class Bootstrap {
|
||||
|
||||
private static $autopaths = ['core', 'ext'];
|
||||
|
||||
public static function run() {
|
||||
|
||||
spl_autoload_register(['Bootstrap', 'autoload']);
|
||||
putenv('LANG=en_US.UTF-8');
|
||||
setlocale(LC_CTYPE, 'en_US.UTF-8');
|
||||
date_default_timezone_set(@date_default_timezone_get());
|
||||
session_start();
|
||||
|
||||
$session = new Session($_SESSION);
|
||||
$request = new Request($_REQUEST);
|
||||
$setup = new Setup($request->query_boolean('refresh', false));
|
||||
$context = new Context($session, $request, $setup);
|
||||
|
||||
if ($context->is_api_request()) {
|
||||
(new Api($context))->apply();
|
||||
} else if ($context->is_info_request()) {
|
||||
$public_href = $setup->get('PUBLIC_HREF');
|
||||
$x_head_tags = $context->get_x_head_html();
|
||||
require __DIR__ . '/pages/info.php';
|
||||
} else {
|
||||
$public_href = $setup->get('PUBLIC_HREF');
|
||||
$x_head_tags = $context->get_x_head_html();
|
||||
$fallback_html = (new Fallback($context))->get_html();
|
||||
require __DIR__ . '/pages/index.php';
|
||||
}
|
||||
}
|
||||
|
||||
public static function autoload($class_name) {
|
||||
|
||||
$filename = 'class-' . strtolower($class_name) . '.php';
|
||||
|
||||
foreach (Bootstrap::$autopaths as $path) {
|
||||
$file = __DIR__ . '/' . $path . '/' . $filename;
|
||||
if (file_exists($file)) {
|
||||
require_once $file;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
128
src/_h5ai/private/php/core/class-api.php
Normal file
128
src/_h5ai/private/php/core/class-api.php
Normal file
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
|
||||
class Api {
|
||||
|
||||
private $context;
|
||||
private $request;
|
||||
private $setup;
|
||||
|
||||
public function __construct($context) {
|
||||
|
||||
$this->context = $context;
|
||||
$this->request = $context->get_request();
|
||||
$this->setup = $context->get_setup();
|
||||
}
|
||||
|
||||
public function apply() {
|
||||
|
||||
$action = $this->request->query('action');
|
||||
$supported = ['download', 'get', 'login', 'logout'];
|
||||
Util::json_fail(Util::ERR_UNSUPPORTED, 'unsupported action', !in_array($action, $supported));
|
||||
|
||||
$methodname = 'on_' . $action;
|
||||
$this->$methodname();
|
||||
}
|
||||
|
||||
private function on_download() {
|
||||
|
||||
Util::json_fail(Util::ERR_DISABLED, 'download disabled', !$this->context->query_option('download.enabled', false));
|
||||
|
||||
$as = $this->request->query('as');
|
||||
$type = $this->request->query('type');
|
||||
$base_href = $this->request->query('baseHref');
|
||||
$hrefs = $this->request->query('hrefs');
|
||||
|
||||
$archive = new Archive($this->context);
|
||||
|
||||
set_time_limit(0);
|
||||
header('Content-Type: application/octet-stream');
|
||||
header('Content-Disposition: attachment; filename="' . $as . '"');
|
||||
header('Connection: close');
|
||||
$ok = $archive->output($type, $base_href, $hrefs);
|
||||
|
||||
Util::json_fail(Util::ERR_FAILED, 'packaging failed', !$ok);
|
||||
exit;
|
||||
}
|
||||
|
||||
private function on_get() {
|
||||
|
||||
$response = [];
|
||||
|
||||
foreach (['langs', 'options', 'types'] as $name) {
|
||||
if ($this->request->query_boolean($name, false)) {
|
||||
|
||||
$methodname = 'get_' . $name;
|
||||
$response[$name] = $this->context->$methodname();
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->request->query_boolean('setup', false)) {
|
||||
|
||||
$response['setup'] = $this->setup->to_jsono($this->context->is_admin());
|
||||
}
|
||||
|
||||
if ($this->request->query_boolean('theme', false)) {
|
||||
|
||||
$theme = new Theme($this->context);
|
||||
$response['theme'] = $theme->get_icons();
|
||||
}
|
||||
|
||||
if ($this->request->query('items', false)) {
|
||||
|
||||
$href = $this->request->query('items.href');
|
||||
$what = $this->request->query_numeric('items.what');
|
||||
|
||||
$response['items'] = $this->context->get_items($href, $what);
|
||||
}
|
||||
|
||||
if ($this->request->query('custom', false)) {
|
||||
|
||||
Util::json_fail(Util::ERR_DISABLED, 'custom disabled', !$this->context->query_option('custom.enabled', false));
|
||||
$href = $this->request->query('custom');
|
||||
|
||||
$custom = new Custom($this->context);
|
||||
$response['custom'] = $custom->get_customizations($href);
|
||||
}
|
||||
|
||||
if ($this->request->query('l10n', false)) {
|
||||
|
||||
Util::json_fail(Util::ERR_DISABLED, 'l10n disabled', !$this->context->query_option('l10n.enabled', false));
|
||||
$iso_codes = $this->request->query_array('l10n');
|
||||
|
||||
$iso_codes = array_filter($iso_codes);
|
||||
$response['l10n'] = $this->context->get_l10n($iso_codes);
|
||||
}
|
||||
|
||||
if ($this->request->query('search', false)) {
|
||||
|
||||
Util::json_fail(Util::ERR_DISABLED, 'search disabled', !$this->context->query_option('search.enabled', false));
|
||||
$href = $this->request->query('search.href');
|
||||
$pattern = $this->request->query('search.pattern');
|
||||
|
||||
$search = new Search($this->context);
|
||||
$response['search'] = $search->get_items($href, $pattern);
|
||||
}
|
||||
|
||||
if ($this->request->query('thumbs', false)) {
|
||||
|
||||
Util::json_fail(Util::ERR_DISABLED, 'thumbnails disabled', !$this->context->query_option('thumbnails.enabled', false));
|
||||
Util::json_fail(Util::ERR_UNSUPPORTED, 'thumbnails not supported', !$this->setup->get('HAS_PHP_JPEG'));
|
||||
$thumbs = $this->request->query_array('thumbs');
|
||||
|
||||
$response['thumbs'] = $this->context->get_thumbs($thumbs);
|
||||
}
|
||||
|
||||
Util::json_exit($response);
|
||||
}
|
||||
|
||||
private function on_login() {
|
||||
|
||||
$pass = $this->request->query('pass');
|
||||
Util::json_exit(['asAdmin' => $this->context->login_admin($pass)]);
|
||||
}
|
||||
|
||||
private function on_logout() {
|
||||
|
||||
Util::json_exit(['asAdmin' => $this->context->logout_admin()]);
|
||||
}
|
||||
}
|
313
src/_h5ai/private/php/core/class-context.php
Normal file
313
src/_h5ai/private/php/core/class-context.php
Normal file
@@ -0,0 +1,313 @@
|
||||
<?php
|
||||
|
||||
class Context {
|
||||
|
||||
private static $DEFAULT_PASSHASH = 'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e';
|
||||
private static $AS_ADMIN_SESSION_KEY = 'AS_ADMIN';
|
||||
|
||||
private $session;
|
||||
private $request;
|
||||
private $setup;
|
||||
private $options;
|
||||
private $passhash;
|
||||
|
||||
public function __construct($session, $request, $setup) {
|
||||
|
||||
$this->session = $session;
|
||||
$this->request = $request;
|
||||
$this->setup = $setup;
|
||||
|
||||
$this->options = Json::load($this->setup->get('CONF_PATH') . '/options.json');
|
||||
|
||||
$this->passhash = $this->query_option('passhash', '');
|
||||
$this->options['hasCustomPasshash'] = strcasecmp($this->passhash, Context::$DEFAULT_PASSHASH) !== 0;
|
||||
unset($this->options['passhash']);
|
||||
}
|
||||
|
||||
public function get_session() {
|
||||
|
||||
return $this->session;
|
||||
}
|
||||
|
||||
public function get_request() {
|
||||
|
||||
return $this->request;
|
||||
}
|
||||
|
||||
public function get_setup() {
|
||||
|
||||
return $this->setup;
|
||||
}
|
||||
|
||||
public function get_options() {
|
||||
|
||||
return $this->options;
|
||||
}
|
||||
|
||||
public function query_option($keypath = '', $default = null) {
|
||||
|
||||
return Util::array_query($this->options, $keypath, $default);
|
||||
}
|
||||
|
||||
public function get_types() {
|
||||
|
||||
return Json::load($this->setup->get('CONF_PATH') . '/types.json');
|
||||
}
|
||||
|
||||
public function login_admin($pass) {
|
||||
|
||||
$this->session->set(Context::$AS_ADMIN_SESSION_KEY, strcasecmp(hash('sha512', $pass), $this->passhash) === 0);
|
||||
return $this->session->get(Context::$AS_ADMIN_SESSION_KEY);
|
||||
}
|
||||
|
||||
public function logout_admin() {
|
||||
|
||||
$this->session->set(Context::$AS_ADMIN_SESSION_KEY, false);
|
||||
return $this->session->get(Context::$AS_ADMIN_SESSION_KEY);
|
||||
}
|
||||
|
||||
public function is_admin() {
|
||||
|
||||
return $this->session->get(Context::$AS_ADMIN_SESSION_KEY);
|
||||
}
|
||||
|
||||
public function is_api_request() {
|
||||
|
||||
return strtolower($this->setup->get('REQUEST_METHOD')) === 'post';
|
||||
}
|
||||
|
||||
public function is_info_request() {
|
||||
|
||||
return Util::starts_with($this->setup->get('REQUEST_HREF') . '/', $this->setup->get('PUBLIC_HREF'));
|
||||
}
|
||||
|
||||
public function to_href($path, $trailing_slash = true) {
|
||||
|
||||
$rel_path = substr($path, strlen($this->setup->get('ROOT_PATH')));
|
||||
$parts = explode('/', $rel_path);
|
||||
$encoded_parts = [];
|
||||
foreach ($parts as $part) {
|
||||
if ($part != '') {
|
||||
$encoded_parts[] = rawurlencode($part);
|
||||
}
|
||||
}
|
||||
|
||||
return Util::normalize_path($this->setup->get('ROOT_HREF') . implode('/', $encoded_parts), $trailing_slash);
|
||||
}
|
||||
|
||||
public function to_path($href) {
|
||||
|
||||
$rel_href = substr($href, strlen($this->setup->get('ROOT_HREF')));
|
||||
return Util::normalize_path($this->setup->get('ROOT_PATH') . '/' . rawurldecode($rel_href));
|
||||
}
|
||||
|
||||
public function is_hidden($name) {
|
||||
|
||||
// always hide
|
||||
if ($name === '.' || $name === '..') {
|
||||
return true;
|
||||
}
|
||||
|
||||
foreach ($this->query_option('view.hidden', []) as $re) {
|
||||
$re = Util::wrap_pattern($re);
|
||||
if (preg_match($re, $name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function read_dir($path) {
|
||||
|
||||
$names = [];
|
||||
if (is_dir($path)) {
|
||||
foreach (scandir($path) as $name) {
|
||||
if (
|
||||
$this->is_hidden($name)
|
||||
|| $this->is_hidden($this->to_href($path) . $name)
|
||||
|| (!is_readable($path . '/' . $name) && $this->query_option('view.hideIf403', false))
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
$names[] = $name;
|
||||
}
|
||||
}
|
||||
return $names;
|
||||
}
|
||||
|
||||
public function is_managed_href($href) {
|
||||
|
||||
return $this->is_managed_path($this->to_path($href));
|
||||
}
|
||||
|
||||
public function is_managed_path($path) {
|
||||
|
||||
if (!is_dir($path) || strpos($path, '../') !== false || strpos($path, '/..') !== false || $path === '..') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (strpos($path, $this->setup->get('PUBLIC_PATH')) === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (strpos($path, $this->setup->get('PRIVATE_PATH')) === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($this->query_option('view.unmanaged', []) as $name) {
|
||||
if (file_exists($path . '/' . $name)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
while ($path !== $this->setup->get('ROOT_PATH')) {
|
||||
if (@is_dir($path . '/_h5ai/private/conf')) {
|
||||
return false;
|
||||
}
|
||||
$parent_path = Util::normalize_path(dirname($path));
|
||||
if ($parent_path === $path) {
|
||||
return false;
|
||||
}
|
||||
$path = $parent_path;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function get_current_path() {
|
||||
|
||||
$current_href = Util::normalize_path($this->setup->get('REQUEST_HREF'), true);
|
||||
$current_path = $this->to_path($current_href);
|
||||
|
||||
if (!is_dir($current_path)) {
|
||||
$current_path = Util::normalize_path(dirname($current_path), false);
|
||||
}
|
||||
|
||||
return $current_path;
|
||||
}
|
||||
|
||||
public function get_items($href, $what) {
|
||||
|
||||
if (!$this->is_managed_href($href)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$cache = [];
|
||||
$folder = Item::get($this, $this->to_path($href), $cache);
|
||||
|
||||
// add content of subfolders
|
||||
if ($what >= 2 && $folder !== null) {
|
||||
foreach ($folder->get_content($cache) as $item) {
|
||||
$item->get_content($cache);
|
||||
}
|
||||
$folder = $folder->get_parent($cache);
|
||||
}
|
||||
|
||||
// add content of this folder and all parent folders
|
||||
while ($what >= 1 && $folder !== null) {
|
||||
$folder->get_content($cache);
|
||||
$folder = $folder->get_parent($cache);
|
||||
}
|
||||
|
||||
uasort($cache, ['Item', 'cmp']);
|
||||
$result = [];
|
||||
foreach ($cache as $p => $item) {
|
||||
$result[] = $item->to_json_object();
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function get_langs() {
|
||||
|
||||
$langs = [];
|
||||
$l10n_path = $this->setup->get('CONF_PATH') . '/l10n';
|
||||
if (is_dir($l10n_path)) {
|
||||
if ($dir = opendir($l10n_path)) {
|
||||
while (($file = readdir($dir)) !== false) {
|
||||
if (Util::ends_with($file, '.json')) {
|
||||
$translations = Json::load($l10n_path . '/' . $file);
|
||||
$langs[basename($file, '.json')] = $translations['lang'];
|
||||
}
|
||||
}
|
||||
closedir($dir);
|
||||
}
|
||||
}
|
||||
ksort($langs);
|
||||
return $langs;
|
||||
}
|
||||
|
||||
public function get_l10n($iso_codes) {
|
||||
|
||||
$results = [];
|
||||
|
||||
foreach ($iso_codes as $iso_code) {
|
||||
$file = $this->setup->get('CONF_PATH') . '/l10n/' . $iso_code . '.json';
|
||||
$results[$iso_code] = Json::load($file);
|
||||
$results[$iso_code]['isoCode'] = $iso_code;
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
public function get_thumbs($requests) {
|
||||
|
||||
$hrefs = [];
|
||||
|
||||
foreach ($requests as $req) {
|
||||
$thumb = new Thumb($this);
|
||||
$hrefs[] = $thumb->thumb($req['type'], $req['href'], $req['width'], $req['height']);
|
||||
}
|
||||
|
||||
return $hrefs;
|
||||
}
|
||||
|
||||
private function prefix_x_head_href($href) {
|
||||
|
||||
if (preg_match('@^(https?://|/)@i', $href)) {
|
||||
return $href;
|
||||
}
|
||||
|
||||
return $this->setup->get('PUBLIC_HREF') . 'ext/' . $href;
|
||||
}
|
||||
|
||||
private function get_fonts_html() {
|
||||
|
||||
$fonts = $this->query_option('view.fonts', []);
|
||||
$fonts_mono = $this->query_option('view.fontsMono', []);
|
||||
|
||||
$html = '<style class="x-head">';
|
||||
|
||||
if (sizeof($fonts) > 0) {
|
||||
$html .= '#root,input,select{font-family:"' . implode('","', $fonts) . '"!important}';
|
||||
}
|
||||
|
||||
if (sizeof($fonts_mono) > 0) {
|
||||
$html .= 'pre,code{font-family:"' . implode('","', $fonts_mono) . '"!important}';
|
||||
}
|
||||
|
||||
$html .= '</style>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function get_x_head_html() {
|
||||
|
||||
$scripts = $this->query_option('resources.scripts', []);
|
||||
$styles = $this->query_option('resources.styles', []);
|
||||
|
||||
$html = '';
|
||||
|
||||
foreach ($styles as $href) {
|
||||
$html .= '<link rel="stylesheet" href="' . $this->prefix_x_head_href($href) . '" class="x-head">';
|
||||
}
|
||||
|
||||
foreach ($scripts as $href) {
|
||||
$html .= '<script src="' . $this->prefix_x_head_href($href) . '" class="x-head"></script>';
|
||||
}
|
||||
|
||||
$html .= $this->get_fonts_html();
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
57
src/_h5ai/private/php/core/class-fallback.php
Normal file
57
src/_h5ai/private/php/core/class-fallback.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
class Fallback {
|
||||
|
||||
private $context;
|
||||
|
||||
public function __construct($context) {
|
||||
|
||||
$this->context = $context;
|
||||
}
|
||||
|
||||
public function get_html($path = null) {
|
||||
|
||||
if (!$path) {
|
||||
$path = $this->context->get_current_path();
|
||||
}
|
||||
$fallback_images_href = $this->context->get_setup()->get('PUBLIC_HREF') . 'images/fallback/';
|
||||
|
||||
$cache = [];
|
||||
$folder = Item::get($this->context, $path, $cache);
|
||||
$items = $folder->get_content($cache);
|
||||
uasort($items, ['Item', 'cmp']);
|
||||
|
||||
$html = '<table>';
|
||||
|
||||
$html .= '<tr>';
|
||||
$html .= '<th class="fb-i"></th>';
|
||||
$html .= '<th class="fb-n"><span>Name</span></th>';
|
||||
$html .= '<th class="fb-d"><span>Last modified</span></th>';
|
||||
$html .= '<th class="fb-s"><span>Size</span></th>';
|
||||
$html .= '</tr>';
|
||||
|
||||
if ($folder->get_parent($cache)) {
|
||||
$html .= '<tr>';
|
||||
$html .= '<td class="fb-i"><img src="' . $fallback_images_href . 'folder-parent.png" alt="folder-parent"/></td>';
|
||||
$html .= '<td class="fb-n"><a href="..">Parent Directory</a></td>';
|
||||
$html .= '<td class="fb-d"></td>';
|
||||
$html .= '<td class="fb-s"></td>';
|
||||
$html .= '</tr>';
|
||||
}
|
||||
|
||||
foreach ($items as $item) {
|
||||
$type = $item->is_folder ? 'folder' : 'file';
|
||||
|
||||
$html .= '<tr>';
|
||||
$html .= '<td class="fb-i"><img src="' . $fallback_images_href . $type . '.png" alt="' . $type . '"/></td>';
|
||||
$html .= '<td class="fb-n"><a href="' . $item->href . '">' . basename($item->path) . '</a></td>';
|
||||
$html .= '<td class="fb-d">' . date('Y-m-d H:i', $item->date) . '</td>';
|
||||
$html .= '<td class="fb-s">' . ($item->size !== null ? intval($item->size / 1000) . ' KB' : '' ) . '</td>';
|
||||
$html .= '</tr>';
|
||||
}
|
||||
|
||||
$html .= '</table>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
99
src/_h5ai/private/php/core/class-filesize.php
Normal file
99
src/_h5ai/private/php/core/class-filesize.php
Normal file
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
class Filesize {
|
||||
|
||||
private $cache = [];
|
||||
|
||||
public function __construct() {
|
||||
|
||||
}
|
||||
|
||||
public function fseek($path) {
|
||||
|
||||
$size = 0;
|
||||
$step = 1073741824;
|
||||
|
||||
$handle = fopen($path, 'r');
|
||||
fseek($handle, 0, SEEK_SET);
|
||||
|
||||
while ($step > 1) {
|
||||
fseek($handle, $step, SEEK_CUR);
|
||||
if (fgetc($handle) !== false) {
|
||||
$size += $step + 1;
|
||||
} else {
|
||||
fseek($handle, -$step, SEEK_CUR);
|
||||
$step = intval($step / 2, 10);
|
||||
}
|
||||
}
|
||||
|
||||
while (fgetc($handle) !== false) {
|
||||
$size += 1;
|
||||
}
|
||||
|
||||
fclose($handle);
|
||||
|
||||
return $size;
|
||||
}
|
||||
|
||||
public function filesize($path) {
|
||||
|
||||
return @filesize($path);
|
||||
}
|
||||
|
||||
private function read_dir($path) {
|
||||
|
||||
$paths = [];
|
||||
if (is_dir($path)) {
|
||||
foreach (scandir($path) as $name) {
|
||||
if ($name !== '.' && $name !== '..') {
|
||||
$paths[] = $path . '/' . $name;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $paths;
|
||||
}
|
||||
|
||||
private function exec($cmdv) {
|
||||
|
||||
$cmd = implode(' ', array_map('escapeshellarg', $cmdv));
|
||||
$lines = [];
|
||||
$rc = null;
|
||||
exec($cmd, $lines, $rc);
|
||||
return $lines;
|
||||
}
|
||||
|
||||
public function du_paths($paths) {
|
||||
|
||||
$cmdv = array_merge(['du', '-sk'], $paths);
|
||||
$lines = $this->exec($cmdv);
|
||||
|
||||
$sizes = [];
|
||||
foreach ($lines as $line) {
|
||||
$parts = preg_split('/[\s]+/', $line, 2);
|
||||
$size = intval($parts[0], 10) * 1024;
|
||||
$path = $parts[1];
|
||||
$sizes[$path] = $size;
|
||||
}
|
||||
return $sizes;
|
||||
}
|
||||
|
||||
public function du_dir($path) {
|
||||
|
||||
return $this->du_paths($this->read_dir($path));
|
||||
}
|
||||
|
||||
public function du_path($path) {
|
||||
|
||||
$sizes = $this->du_paths([$path]);
|
||||
return $sizes[$path];
|
||||
}
|
||||
|
||||
public function add($path) {
|
||||
|
||||
$size = 0;
|
||||
foreach ($this->read_dir($path) as $p) {
|
||||
$size += $this->filesize($p);
|
||||
}
|
||||
return $size;
|
||||
}
|
||||
}
|
98
src/_h5ai/private/php/core/class-item.php
Normal file
98
src/_h5ai/private/php/core/class-item.php
Normal file
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
|
||||
class Item {
|
||||
|
||||
public static function cmp($item1, $item2) {
|
||||
|
||||
if ($item1->is_folder && !$item2->is_folder) {
|
||||
return -1;
|
||||
}
|
||||
if (!$item1->is_folder && $item2->is_folder) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return strcasecmp($item1->path, $item2->path);
|
||||
}
|
||||
|
||||
public static function get($context, $path, &$cache) {
|
||||
|
||||
if (!Util::starts_with($path, $context->get_setup()->get('ROOT_PATH'))) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (is_array($cache) && array_key_exists($path, $cache)) {
|
||||
return $cache[$path];
|
||||
}
|
||||
|
||||
$item = new Item($context, $path);
|
||||
|
||||
if (is_array($cache)) {
|
||||
$cache[$path] = $item;
|
||||
}
|
||||
return $item;
|
||||
}
|
||||
|
||||
public $context;
|
||||
public $path;
|
||||
public $href;
|
||||
public $date;
|
||||
public $size;
|
||||
public $is_folder;
|
||||
public $is_content_fetched;
|
||||
|
||||
private function __construct($context, $path) {
|
||||
|
||||
$this->context = $context;
|
||||
|
||||
$this->path = Util::normalize_path($path, false);
|
||||
$this->is_folder = is_dir($this->path);
|
||||
$this->href = $context->to_href($this->path, $this->is_folder);
|
||||
$this->date = @filemtime($this->path);
|
||||
$this->size = Util::filesize($context, $this->path);
|
||||
$this->is_content_fetched = false;
|
||||
}
|
||||
|
||||
public function to_json_object() {
|
||||
|
||||
$obj = [
|
||||
'href' => $this->href,
|
||||
'time' => $this->date * 1000, // seconds (PHP) to milliseconds (JavaScript)
|
||||
'size' => $this->size
|
||||
];
|
||||
|
||||
if ($this->is_folder) {
|
||||
$obj['managed'] = $this->context->is_managed_href($this->href);
|
||||
$obj['fetched'] = $this->is_content_fetched;
|
||||
}
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
public function get_parent(&$cache) {
|
||||
|
||||
$parent_path = Util::normalize_path(dirname($this->path), false);
|
||||
if ($parent_path !== $this->path && Util::starts_with($parent_path, $this->context->get_setup()->get('ROOT_PATH'))) {
|
||||
return Item::get($this->context, $parent_path, $cache);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function get_content(&$cache) {
|
||||
|
||||
$items = [];
|
||||
|
||||
if (!$this->context->is_managed_href($this->href)) {
|
||||
return $items;
|
||||
}
|
||||
|
||||
$files = $this->context->read_dir($this->path);
|
||||
foreach ($files as $file) {
|
||||
$item = Item::get($this->context, $this->path . '/' . $file, $cache);
|
||||
$items[$item->path] = $item;
|
||||
}
|
||||
|
||||
$this->is_content_fetched = true;
|
||||
|
||||
return $items;
|
||||
}
|
||||
}
|
71
src/_h5ai/private/php/core/class-json.php
Normal file
71
src/_h5ai/private/php/core/class-json.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
class Json {
|
||||
|
||||
const SINGLE = 1;
|
||||
const MULTI = 2;
|
||||
|
||||
public static function load($path) {
|
||||
|
||||
if (!is_readable($path)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$json = file_get_contents($path);
|
||||
return Json::decode($json);
|
||||
}
|
||||
|
||||
public static function save($path, $obj) {
|
||||
|
||||
$json = json_encode($obj);
|
||||
return file_put_contents($path, $json) !== false;
|
||||
}
|
||||
|
||||
public static function decode($json) {
|
||||
|
||||
$json = Json::strip($json);
|
||||
return json_decode($json, true);
|
||||
}
|
||||
|
||||
public static function strip($commented_json) {
|
||||
|
||||
$insideString = false;
|
||||
$insideComment = false;
|
||||
$json = '';
|
||||
|
||||
for ($i = 0; $i < strlen($commented_json); $i += 1) {
|
||||
|
||||
$char = $commented_json[$i];
|
||||
$charchar = $char . @$commented_json[$i + 1];
|
||||
$prevChar = @$commented_json[$i - 1];
|
||||
|
||||
if (!$insideComment && $char === '"' && $prevChar !== "\\") {
|
||||
$insideString = !$insideString;
|
||||
}
|
||||
|
||||
if ($insideString) {
|
||||
$json .= $char;
|
||||
} else if (!$insideComment && $charchar === '//') {
|
||||
$insideComment = Json::SINGLE;
|
||||
$i += 1;
|
||||
} else if (!$insideComment && $charchar === '/*') {
|
||||
$insideComment = Json::MULTI;
|
||||
$i += 1;
|
||||
} else if (!$insideComment) {
|
||||
$json .= $char;
|
||||
} else if ($insideComment === Json::SINGLE && $charchar === "\r\n") {
|
||||
$insideComment = false;
|
||||
$json .= $charchar;
|
||||
$i += 1;
|
||||
} else if ($insideComment === Json::SINGLE && $char === "\n") {
|
||||
$insideComment = false;
|
||||
$json .= $char;
|
||||
} else if ($insideComment === Json::MULTI && $charchar === '*/') {
|
||||
$insideComment = false;
|
||||
$i += 1;
|
||||
}
|
||||
}
|
||||
|
||||
return $json;
|
||||
}
|
||||
}
|
31
src/_h5ai/private/php/core/class-logger.php
Normal file
31
src/_h5ai/private/php/core/class-logger.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
class Logger {
|
||||
|
||||
private static $start;
|
||||
private static $prev;
|
||||
|
||||
public static function init() {
|
||||
|
||||
self::$start = self::time();
|
||||
self::$prev = self::$start;
|
||||
register_shutdown_function(function () { Logger::log('shutdown'); });
|
||||
Logger::log('--------------------------------');
|
||||
}
|
||||
|
||||
private static function time() {
|
||||
|
||||
return microtime(true) * 1000; // sec * 1000 = ms
|
||||
}
|
||||
|
||||
public static function log($message=null, $obj=null) {
|
||||
|
||||
$now = self::time();
|
||||
$message = number_format($now - self::$start, 3) . ' ' . number_format($now - self::$prev, 3) . ' ' . $message;
|
||||
|
||||
@error_log($message . ' ' . var_export($obj, true));
|
||||
|
||||
self::$prev = $now;
|
||||
}
|
||||
}
|
||||
Logger::init();
|
43
src/_h5ai/private/php/core/class-request.php
Normal file
43
src/_h5ai/private/php/core/class-request.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
class Request {
|
||||
|
||||
private $params;
|
||||
|
||||
public function __construct($params) {
|
||||
|
||||
$this->params = $params;
|
||||
}
|
||||
|
||||
public function query($keypath = '', $default = Util::NO_DEFAULT) {
|
||||
|
||||
$value = Util::array_query($this->params, $keypath, Util::NO_DEFAULT);
|
||||
|
||||
if ($value === Util::NO_DEFAULT) {
|
||||
Util::json_fail(Util::ERR_MISSING_PARAM, 'parameter \'' . $keypath . '\' is missing', $default === Util::NO_DEFAULT);
|
||||
return $default;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function query_boolean($keypath = '', $default = Util::NO_DEFAULT) {
|
||||
|
||||
$value = $this->query($keypath, $default);
|
||||
return filter_var($value, FILTER_VALIDATE_BOOLEAN);
|
||||
}
|
||||
|
||||
public function query_numeric($keypath = '', $default = Util::NO_DEFAULT) {
|
||||
|
||||
$value = $this->query($keypath, $default);
|
||||
Util::json_fail(Util::ERR_ILLIGAL_PARAM, 'parameter \'' . $keypath . '\' is not numeric', !is_numeric($value));
|
||||
return intval($value, 10);
|
||||
}
|
||||
|
||||
public function query_array($keypath = '', $default = Util::NO_DEFAULT) {
|
||||
|
||||
$value = $this->query($keypath, $default);
|
||||
Util::json_fail(Util::ERR_ILLIGAL_PARAM, 'parameter \'' . $keypath . '\' is no array', !is_array($value));
|
||||
return $value;
|
||||
}
|
||||
}
|
25
src/_h5ai/private/php/core/class-session.php
Normal file
25
src/_h5ai/private/php/core/class-session.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
class Session {
|
||||
|
||||
private static $KEY_PREFIX = '__H5AI__';
|
||||
|
||||
private $store;
|
||||
|
||||
public function __construct(&$store) {
|
||||
|
||||
$this->store = &$store;
|
||||
}
|
||||
|
||||
public function set($key, $value) {
|
||||
|
||||
$key = Session::$KEY_PREFIX . $key;
|
||||
$this->store[$key] = $value;
|
||||
}
|
||||
|
||||
public function get($key, $default = null) {
|
||||
|
||||
$key = Session::$KEY_PREFIX . $key;
|
||||
return array_key_exists($key, $this->store) ? $this->store[$key] : $default;
|
||||
}
|
||||
}
|
193
src/_h5ai/private/php/core/class-setup.php
Normal file
193
src/_h5ai/private/php/core/class-setup.php
Normal file
@@ -0,0 +1,193 @@
|
||||
<?php
|
||||
|
||||
class Setup {
|
||||
|
||||
private $store;
|
||||
private $refresh;
|
||||
|
||||
public function __construct($refresh = false) {
|
||||
|
||||
$this->store = [];
|
||||
$this->refresh = $refresh;
|
||||
|
||||
$this->add_globals_and_envs();
|
||||
$this->add_php_checks();
|
||||
$this->add_app_metadata();
|
||||
$this->add_server_metadata_and_check();
|
||||
$this->add_paths();
|
||||
$this->add_sys_cmd_checks();
|
||||
}
|
||||
|
||||
private function set($key, $value) {
|
||||
|
||||
if (array_key_exists($key, $this->store)) {
|
||||
Logger::log('setup key already taken', [
|
||||
'key' => $key,
|
||||
'value' => $value,
|
||||
'found' => $this->store[$key]
|
||||
]);
|
||||
exit;
|
||||
}
|
||||
if (!is_string($value) && !is_bool($value)) {
|
||||
Logger::log('setup value neither string nor boolean', [
|
||||
'key' => $key,
|
||||
'value' => $value
|
||||
]);
|
||||
exit;
|
||||
}
|
||||
|
||||
$this->store[$key] = $value;
|
||||
}
|
||||
|
||||
public function get($key) {
|
||||
|
||||
if (!array_key_exists($key, $this->store)) {
|
||||
Logger::log('setup key not found', ['key' => $key]);
|
||||
exit;
|
||||
}
|
||||
|
||||
return $this->store[$key];
|
||||
}
|
||||
|
||||
private function add_globals_and_envs() {
|
||||
|
||||
$this->set('PHP_VERSION', PHP_VERSION);
|
||||
$this->set('MIN_PHP_VERSION', MIN_PHP_VERSION);
|
||||
|
||||
$this->set('REQUEST_METHOD', getenv('REQUEST_METHOD'));
|
||||
$this->set('REQUEST_HREF', parse_url(getenv('REQUEST_URI'), PHP_URL_PATH));
|
||||
$this->set('SCRIPT_NAME', getenv('SCRIPT_NAME'));
|
||||
$this->set('SERVER_SOFTWARE', getenv('SERVER_SOFTWARE'));
|
||||
}
|
||||
|
||||
private function add_php_checks() {
|
||||
|
||||
$this->set('HAS_PHP_EXIF', function_exists('exif_thumbnail'));
|
||||
|
||||
$has_php_jpeg = false;
|
||||
if (function_exists('gd_info')) {
|
||||
$infos = gd_info();
|
||||
$has_php_jpeg = array_key_exists('JPEG Support', $infos) && $infos['JPEG Support'];
|
||||
}
|
||||
$this->set('HAS_PHP_JPEG', $has_php_jpeg);
|
||||
}
|
||||
|
||||
private function add_app_metadata() {
|
||||
|
||||
$this->set('NAME', 'h5ai');
|
||||
$this->set('VERSION', H5AI_VERSION);
|
||||
$this->set('FILE_PREFIX', '_h5ai');
|
||||
}
|
||||
|
||||
private function add_server_metadata_and_check() {
|
||||
|
||||
$server_software = $this->get('SERVER_SOFTWARE');
|
||||
$server_name = null;
|
||||
$server_version = null;
|
||||
|
||||
if ($server_software && preg_match('#^(.*?)(?:/(.*?))?(?: |$)#', strtolower($server_software), $matches)) {
|
||||
$server_name = $matches[1];
|
||||
$server_version = count($matches) > 2 ? $matches[2] : '';
|
||||
}
|
||||
|
||||
$this->set('SERVER_NAME', $server_name);
|
||||
$this->set('SERVER_VERSION', $server_version);
|
||||
$this->set('HAS_SERVER', in_array($server_name, ['apache', 'lighttpd', 'nginx', 'cherokee']));
|
||||
}
|
||||
|
||||
private function add_paths() {
|
||||
|
||||
$script_name = $this->get('SCRIPT_NAME');
|
||||
if ($this->get('SERVER_NAME') === 'lighttpd') {
|
||||
$script_name = preg_replace('#^.*?//#', '/', $script_name);
|
||||
}
|
||||
|
||||
$this->set('H5AI_HREF', Util::normalize_path(dirname(dirname($script_name)), true));
|
||||
$this->set('H5AI_PATH', Util::normalize_path(dirname(dirname(dirname(dirname(__FILE__)))), false));
|
||||
|
||||
$this->set('ROOT_HREF', Util::normalize_path(dirname($this->get('H5AI_HREF')), true));
|
||||
$this->set('ROOT_PATH', Util::normalize_path(dirname($this->get('H5AI_PATH')), false));
|
||||
|
||||
$this->set('PUBLIC_HREF', Util::normalize_path($this->get('H5AI_HREF') . '/public/', true));
|
||||
$this->set('PUBLIC_PATH', Util::normalize_path($this->get('H5AI_PATH') . '/public/', false));
|
||||
|
||||
$this->set('INDEX_HREF', Util::normalize_path($this->get('PUBLIC_HREF') . '/index.php', false));
|
||||
$this->set('CACHE_PUB_HREF', Util::normalize_path($this->get('PUBLIC_HREF') . '/cache', true));
|
||||
$this->set('CACHE_PUB_PATH', Util::normalize_path($this->get('PUBLIC_PATH') . '/cache', false));
|
||||
$this->set('HAS_WRITABLE_CACHE_PUB', @is_writable($this->get('CACHE_PUB_PATH')));
|
||||
|
||||
$this->set('PRIVATE_PATH', Util::normalize_path($this->get('H5AI_PATH') . '/private', false));
|
||||
$this->set('CONF_PATH', Util::normalize_path($this->get('PRIVATE_PATH') . '/conf', false));
|
||||
$this->set('CACHE_PRV_PATH', Util::normalize_path($this->get('PRIVATE_PATH') . '/cache', false));
|
||||
$this->set('HAS_WRITABLE_CACHE_PRV', @is_writable($this->get('CACHE_PRV_PATH')));
|
||||
}
|
||||
|
||||
private function add_sys_cmd_checks() {
|
||||
|
||||
$cmds_cache_path = Util::normalize_path($this->get('CACHE_PRV_PATH') . '/cmds.json', false);
|
||||
|
||||
$cmds = Json::load($cmds_cache_path);
|
||||
if (sizeof($cmds) === 0 || $this->refresh) {
|
||||
$cmds['command'] = Util::exec_0('command -v command');
|
||||
$cmds['which'] = Util::exec_0('which which');
|
||||
|
||||
$cmd = false;
|
||||
if ($cmds['command']) {
|
||||
$cmd = 'command -v';
|
||||
} else if ($cmds['which']) {
|
||||
$cmd = 'which';
|
||||
}
|
||||
|
||||
foreach (['avconv', 'convert', 'du', 'ffmpeg', 'gm', 'tar', 'zip'] as $c) {
|
||||
$cmds[$c] = ($cmd !== false) && Util::exec_0($cmd . ' ' . $c);
|
||||
}
|
||||
|
||||
Json::save($cmds_cache_path, $cmds);
|
||||
}
|
||||
foreach ($cmds as $c => $has) {
|
||||
$this->set('HAS_CMD_' . strtoupper($c), $has);
|
||||
}
|
||||
}
|
||||
|
||||
public function to_jsono($as_admin = false) {
|
||||
|
||||
$keys = [
|
||||
'PUBLIC_HREF',
|
||||
'ROOT_HREF'
|
||||
];
|
||||
|
||||
if ($as_admin) {
|
||||
$keys = array_merge($keys, [
|
||||
'VERSION',
|
||||
|
||||
'PHP_VERSION',
|
||||
'MIN_PHP_VERSION',
|
||||
'HAS_PHP_EXIF',
|
||||
'HAS_PHP_JPEG',
|
||||
|
||||
'SERVER_NAME',
|
||||
'SERVER_VERSION',
|
||||
'HAS_SERVER',
|
||||
|
||||
'INDEX_HREF',
|
||||
|
||||
'HAS_WRITABLE_CACHE_PUB',
|
||||
'HAS_WRITABLE_CACHE_PRV',
|
||||
|
||||
'HAS_CMD_AVCONV',
|
||||
'HAS_CMD_CONVERT',
|
||||
'HAS_CMD_DU',
|
||||
'HAS_CMD_FFMPEG',
|
||||
'HAS_CMD_GM',
|
||||
'HAS_CMD_TAR',
|
||||
'HAS_CMD_ZIP'
|
||||
]);
|
||||
}
|
||||
|
||||
$jsono = ['AS_ADMIN' => $as_admin];
|
||||
foreach ($keys as $key) {
|
||||
$jsono[$key] = $this->get($key);
|
||||
}
|
||||
return $jsono;
|
||||
}
|
||||
}
|
36
src/_h5ai/private/php/core/class-theme.php
Normal file
36
src/_h5ai/private/php/core/class-theme.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
class Theme {
|
||||
|
||||
private static $EXTENSIONS = ['svg', 'png', 'jpg'];
|
||||
|
||||
private $context;
|
||||
|
||||
public function __construct($context) {
|
||||
|
||||
$this->context = $context;
|
||||
}
|
||||
|
||||
public function get_icons() {
|
||||
|
||||
$public_path = $this->context->get_setup()->get('PUBLIC_PATH');
|
||||
$theme = $this->context->query_option('view.theme', '-NONE-');
|
||||
$theme_path = $public_path . '/images/themes/' . $theme;
|
||||
|
||||
$icons = [];
|
||||
|
||||
if (is_dir($theme_path)) {
|
||||
if ($dir = opendir($theme_path)) {
|
||||
while (($name = readdir($dir)) !== false) {
|
||||
$path_parts = pathinfo($name);
|
||||
if (in_array(@$path_parts['extension'], Theme::$EXTENSIONS)) {
|
||||
$icons[$path_parts['filename']] = $theme . '/' . $name;
|
||||
}
|
||||
}
|
||||
closedir($dir);
|
||||
}
|
||||
}
|
||||
|
||||
return $icons;
|
||||
}
|
||||
}
|
123
src/_h5ai/private/php/core/class-util.php
Normal file
123
src/_h5ai/private/php/core/class-util.php
Normal file
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
class Util {
|
||||
|
||||
const ERR_MISSING_PARAM = 'ERR_MISSING_PARAM';
|
||||
const ERR_ILLIGAL_PARAM = 'ERR_ILLIGAL_PARAM';
|
||||
const ERR_FAILED = 'ERR_FAILED';
|
||||
const ERR_DISABLED = 'ERR_DISABLED';
|
||||
const ERR_UNSUPPORTED = 'ERR_UNSUPPORTED';
|
||||
const NO_DEFAULT = 'NO_*@+#?!_DEFAULT';
|
||||
const RE_DELIMITER = '@';
|
||||
|
||||
public static function normalize_path($path, $trailing_slash = false) {
|
||||
|
||||
$path = preg_replace('#[\\\\/]+#', '/', $path);
|
||||
return preg_match('#^(\w:)?/$#', $path) ? $path : (rtrim($path, '/') . ($trailing_slash ? '/' : ''));
|
||||
}
|
||||
|
||||
public static function json_exit($obj = []) {
|
||||
|
||||
header('Content-type: application/json;charset=utf-8');
|
||||
echo json_encode($obj);
|
||||
exit;
|
||||
}
|
||||
|
||||
public static function json_fail($err, $msg = '', $cond = true) {
|
||||
|
||||
if ($cond) {
|
||||
Util::json_exit(['err' => $err, 'msg' => $msg]);
|
||||
}
|
||||
}
|
||||
|
||||
public static function array_query($array, $keypath = '', $default = Util::NO_DEFAULT) {
|
||||
|
||||
$value = $array;
|
||||
|
||||
$keys = array_filter(explode('.', $keypath));
|
||||
foreach ($keys as $key) {
|
||||
if (!is_array($value) || !array_key_exists($key, $value)) {
|
||||
return $default;
|
||||
}
|
||||
$value = $value[$key];
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
public static function starts_with($sequence, $head) {
|
||||
|
||||
return substr($sequence, 0, strlen($head)) === $head;
|
||||
}
|
||||
|
||||
public static function ends_with($sequence, $tail) {
|
||||
|
||||
$len = strlen($tail);
|
||||
return $len === 0 ? true : substr($sequence, -$len) === $tail;
|
||||
}
|
||||
|
||||
public static function wrap_pattern($pattern) {
|
||||
|
||||
return Util::RE_DELIMITER . str_replace(Util::RE_DELIMITER, '\\' . Util::RE_DELIMITER, $pattern) . Util::RE_DELIMITER;
|
||||
}
|
||||
|
||||
public static function passthru_cmd($cmd) {
|
||||
|
||||
$rc = null;
|
||||
passthru($cmd, $rc);
|
||||
return $rc;
|
||||
}
|
||||
|
||||
public static function exec_cmdv($cmdv) {
|
||||
|
||||
if (!is_array($cmdv)) {
|
||||
$cmdv = func_get_args();
|
||||
}
|
||||
$cmd = implode(' ', array_map('escapeshellarg', $cmdv));
|
||||
|
||||
$lines = [];
|
||||
$rc = null;
|
||||
exec($cmd, $lines, $rc);
|
||||
return implode("\n", $lines);
|
||||
}
|
||||
|
||||
public static function exec_0($cmd) {
|
||||
|
||||
$lines = [];
|
||||
$rc = null;
|
||||
try {
|
||||
@exec($cmd, $lines, $rc);
|
||||
return $rc === 0;
|
||||
} catch (Exception $e) {}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static $size_cache = [];
|
||||
|
||||
public static function filesize($context, $path) {
|
||||
|
||||
if (array_key_exists($path, Util::$size_cache)) {
|
||||
return Util::$size_cache[$path];
|
||||
}
|
||||
$fs = new Filesize();
|
||||
|
||||
$size = null;
|
||||
|
||||
if (is_file($path)) {
|
||||
if (PHP_INT_SIZE < 8) {
|
||||
$size = $fs->fseek($path);
|
||||
} else {
|
||||
$size = $fs->filesize($path);
|
||||
}
|
||||
} else if (is_dir($path) && $context->query_option('foldersize.enabled', false)) {
|
||||
if ($context->get_setup()->get('HAS_CMD_DU') && $context->query_option('foldersize.type', null) === 'shell-du') {
|
||||
$size = $fs->du_path($path);
|
||||
} else {
|
||||
$size = $fs->add($path);
|
||||
}
|
||||
}
|
||||
|
||||
Util::$size_cache[$path] = $size;
|
||||
return $size;
|
||||
}
|
||||
}
|
202
src/_h5ai/private/php/ext/class-archive.php
Normal file
202
src/_h5ai/private/php/ext/class-archive.php
Normal file
@@ -0,0 +1,202 @@
|
||||
<?php
|
||||
|
||||
class Archive {
|
||||
|
||||
const NULL_BYTE = "\0";
|
||||
|
||||
private static $SEGMENT_SIZE = 16777216; // 1024 * 1024 * 16 = 16MiB
|
||||
private static $TAR_PASSTHRU_CMD = 'cd [ROOTDIR] && tar --no-recursion -c -- [DIRS] [FILES]';
|
||||
private static $ZIP_PASSTHRU_CMD = 'cd [ROOTDIR] && zip - -- [FILES]';
|
||||
|
||||
private $context;
|
||||
private $base_path;
|
||||
private $dirs;
|
||||
private $files;
|
||||
|
||||
public function __construct($context) {
|
||||
|
||||
$this->context = $context;
|
||||
}
|
||||
|
||||
public function output($type, $base_href, $hrefs) {
|
||||
|
||||
$this->base_path = $this->context->to_path($base_href);
|
||||
if (!$this->context->is_managed_path($this->base_path)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->dirs = [];
|
||||
$this->files = [];
|
||||
|
||||
$this->add_hrefs($hrefs);
|
||||
|
||||
if (count($this->dirs) === 0 && count($this->files) === 0) {
|
||||
if ($type === 'php-tar') {
|
||||
$this->add_dir($this->base_path, '/');
|
||||
} else {
|
||||
$this->add_dir($this->base_path, '.');
|
||||
}
|
||||
}
|
||||
|
||||
if ($type === 'php-tar') {
|
||||
|
||||
return $this->php_tar($this->dirs, $this->files);
|
||||
|
||||
} else if ($type === 'shell-tar') {
|
||||
|
||||
return $this->shell_cmd(Archive::$TAR_PASSTHRU_CMD);
|
||||
|
||||
} else if ($type === 'shell-zip') {
|
||||
|
||||
return $this->shell_cmd(Archive::$ZIP_PASSTHRU_CMD);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private function shell_cmd($cmd) {
|
||||
|
||||
$cmd = str_replace('[ROOTDIR]', escapeshellarg($this->base_path), $cmd);
|
||||
$cmd = str_replace('[DIRS]', count($this->dirs) ? implode(' ', array_map('escapeshellarg', $this->dirs)) : '', $cmd);
|
||||
$cmd = str_replace('[FILES]', count($this->files) ? implode(' ', array_map('escapeshellarg', $this->files)) : '', $cmd);
|
||||
try {
|
||||
Util::passthru_cmd($cmd);
|
||||
} catch (Exeption $err) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private function php_tar($dirs, $files) {
|
||||
|
||||
$filesizes = [];
|
||||
$total_size = 512 * count($dirs);
|
||||
foreach (array_keys($files) as $real_file) {
|
||||
|
||||
$size = filesize($real_file);
|
||||
|
||||
$filesizes[$real_file] = $size;
|
||||
$total_size += 512 + $size;
|
||||
if ($size % 512 != 0) {
|
||||
$total_size += 512 - ($size % 512);
|
||||
}
|
||||
}
|
||||
|
||||
header('Content-Length: ' . $total_size);
|
||||
|
||||
foreach ($dirs as $real_dir => $archived_dir) {
|
||||
|
||||
echo $this->php_tar_header($archived_dir, 0, @filemtime($real_dir . DIRECTORY_SEPARATOR . "."), 5);
|
||||
}
|
||||
foreach ($files as $real_file => $archived_file) {
|
||||
|
||||
$size = $filesizes[$real_file];
|
||||
|
||||
echo $this->php_tar_header($archived_file, $size, @filemtime($real_file), 0);
|
||||
$this->print_file($real_file);
|
||||
|
||||
if ($size % 512 != 0) {
|
||||
echo str_repeat(Archive::NULL_BYTE, 512 - ($size % 512));
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private function php_tar_header($filename, $size, $mtime, $type) {
|
||||
|
||||
$name = substr(basename($filename), -99);
|
||||
$prefix = substr(Util::normalize_path(dirname($filename)), -154);
|
||||
if ($prefix === '.') {
|
||||
$prefix = '';
|
||||
}
|
||||
|
||||
$header =
|
||||
str_pad($name, 100, Archive::NULL_BYTE) // filename [100]
|
||||
. '0000755' . Archive::NULL_BYTE // file mode [8]
|
||||
. '0000000' . Archive::NULL_BYTE // uid [8]
|
||||
. '0000000' . Archive::NULL_BYTE // gid [8]
|
||||
. str_pad(decoct($size), 11, '0', STR_PAD_LEFT) . Archive::NULL_BYTE // file size [12]
|
||||
. str_pad(decoct($mtime), 11, '0', STR_PAD_LEFT) . Archive::NULL_BYTE // file modification time [12]
|
||||
. ' ' // checksum [8]
|
||||
. str_pad($type, 1) // file type [1]
|
||||
. str_repeat(Archive::NULL_BYTE, 100) // linkname [100]
|
||||
. 'ustar' . Archive::NULL_BYTE // magic [6]
|
||||
. '00' // version [2]
|
||||
. str_repeat(Archive::NULL_BYTE, 80) // uname, gname, defmajor, devminor [32 + 32 + 8 + 8]
|
||||
. str_pad($prefix, 155, Archive::NULL_BYTE) // filename [155]
|
||||
. str_repeat(Archive::NULL_BYTE, 12); // fill [12]
|
||||
assert(strlen($header) === 512);
|
||||
|
||||
// checksum
|
||||
$checksum = array_sum(array_map('ord', str_split($header)));
|
||||
$checksum = str_pad(decoct($checksum), 6, '0', STR_PAD_LEFT) . Archive::NULL_BYTE . ' ';
|
||||
$header = substr_replace($header, $checksum, 148, 8);
|
||||
|
||||
return $header;
|
||||
}
|
||||
|
||||
private function print_file($file) {
|
||||
|
||||
// Send file content in segments to not hit PHP's memory limit (default: 128M)
|
||||
if ($fd = fopen($file, 'rb')) {
|
||||
while (!feof($fd)) {
|
||||
print fread($fd, Archive::$SEGMENT_SIZE);
|
||||
@ob_flush();
|
||||
@flush();
|
||||
}
|
||||
fclose($fd);
|
||||
}
|
||||
}
|
||||
|
||||
private function add_hrefs($hrefs) {
|
||||
|
||||
foreach ($hrefs as $href) {
|
||||
|
||||
if (trim($href) === '') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$d = Util::normalize_path(dirname($href), true);
|
||||
$n = basename($href);
|
||||
|
||||
if ($this->context->is_managed_href($d) && !$this->context->is_hidden($n)) {
|
||||
|
||||
$real_file = $this->context->to_path($href);
|
||||
$archived_file = preg_replace('!^' . preg_quote(Util::normalize_path($this->base_path, true)) . '!', '', $real_file);
|
||||
|
||||
if (is_dir($real_file)) {
|
||||
$this->add_dir($real_file, $archived_file);
|
||||
} else {
|
||||
$this->add_file($real_file, $archived_file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function add_file($real_file, $archived_file) {
|
||||
|
||||
if (is_readable($real_file)) {
|
||||
$this->files[$real_file] = $archived_file;
|
||||
}
|
||||
}
|
||||
|
||||
private function add_dir($real_dir, $archived_dir) {
|
||||
|
||||
if ($this->context->is_managed_path($real_dir)) {
|
||||
$this->dirs[$real_dir] = $archived_dir;
|
||||
|
||||
$files = $this->context->read_dir($real_dir);
|
||||
foreach ($files as $file) {
|
||||
|
||||
$real_file = $real_dir . '/' . $file;
|
||||
$archived_file = $archived_dir . '/' . $file;
|
||||
|
||||
if (is_dir($real_file)) {
|
||||
$this->add_dir($real_file, $archived_file);
|
||||
} else {
|
||||
$this->add_file($real_file, $archived_file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
72
src/_h5ai/private/php/ext/class-custom.php
Normal file
72
src/_h5ai/private/php/ext/class-custom.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
class Custom {
|
||||
|
||||
private static $EXTENSIONS = ['html', 'md'];
|
||||
|
||||
private $context;
|
||||
|
||||
public function __construct($context) {
|
||||
|
||||
$this->context = $context;
|
||||
}
|
||||
|
||||
private function read_custom_file($path, $name, &$content, &$type) {
|
||||
|
||||
$file_prefix = $this->context->get_setup()->get('FILE_PREFIX');
|
||||
|
||||
foreach (Custom::$EXTENSIONS as $ext) {
|
||||
$file = $path . '/' . $file_prefix . '.' . $name . '.' . $ext;
|
||||
if (is_readable($file)) {
|
||||
$content = file_get_contents($file);
|
||||
$type = $ext;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function get_customizations($href) {
|
||||
|
||||
if (!$this->context->query_option('custom.enabled', false)) {
|
||||
return [
|
||||
'header' => ['content' => null, 'type' => null],
|
||||
'footer' => ['content' => null, 'type' => null]
|
||||
];
|
||||
}
|
||||
|
||||
$root_path = $this->context->get_setup()->get('FILE_PREFIX');
|
||||
$path = $this->context->to_path($href);
|
||||
|
||||
$header = null;
|
||||
$header_type = null;
|
||||
$footer = null;
|
||||
$footer_type = null;
|
||||
|
||||
$this->read_custom_file($path, 'header', $header, $header_type);
|
||||
$this->read_custom_file($path, 'footer', $footer, $footer_type);
|
||||
|
||||
while ($header === null || $footer === null) {
|
||||
|
||||
if ($header === null) {
|
||||
$this->read_custom_file($path, 'headers', $header, $header_type);
|
||||
}
|
||||
if ($footer === null) {
|
||||
$this->read_custom_file($path, 'footers', $footer, $footer_type);
|
||||
}
|
||||
|
||||
if ($path === $root_path) {
|
||||
break;
|
||||
}
|
||||
$parent_path = Util::normalize_path(dirname($path));
|
||||
if ($parent_path === $path) {
|
||||
break;
|
||||
}
|
||||
$path = $parent_path;
|
||||
}
|
||||
|
||||
return [
|
||||
'header' => ['content' => $header, 'type' => $header_type],
|
||||
'footer' => ['content' => $footer, 'type' => $footer_type]
|
||||
];
|
||||
}
|
||||
}
|
42
src/_h5ai/private/php/ext/class-search.php
Normal file
42
src/_h5ai/private/php/ext/class-search.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
class Search {
|
||||
|
||||
private $context;
|
||||
|
||||
public function __construct($context) {
|
||||
|
||||
$this->context = $context;
|
||||
}
|
||||
|
||||
public function get_paths($root, $pattern = null) {
|
||||
|
||||
$paths = [];
|
||||
if ($pattern && $this->context->is_managed_path($root)) {
|
||||
$re = Util::wrap_pattern($pattern);
|
||||
$names = $this->context->read_dir($root);
|
||||
foreach ($names as $name) {
|
||||
$path = $root . '/' . $name;
|
||||
if (preg_match($re, @basename($path))) {
|
||||
$paths[] = $path;
|
||||
}
|
||||
if (@is_dir($path)) {
|
||||
$paths = array_merge($paths, $this->get_paths($path, $pattern));
|
||||
}
|
||||
}
|
||||
}
|
||||
return $paths;
|
||||
}
|
||||
|
||||
public function get_items($href, $pattern = null) {
|
||||
|
||||
$cache = [];
|
||||
$root = $this->context->to_path($href);
|
||||
$paths = $this->get_paths($root, $pattern);
|
||||
$items = array_map(function ($path) {
|
||||
|
||||
return Item::get($this->context, $path, $cache)->to_json_object();
|
||||
}, $paths);
|
||||
return $items;
|
||||
}
|
||||
}
|
270
src/_h5ai/private/php/ext/class-thumb.php
Normal file
270
src/_h5ai/private/php/ext/class-thumb.php
Normal file
@@ -0,0 +1,270 @@
|
||||
<?php
|
||||
|
||||
class Thumb {
|
||||
|
||||
private static $FFMPEG_CMDV = ['ffmpeg', '-ss', '0:00:10', '-i', '[SRC]', '-an', '-vframes', '1', '[DEST]'];
|
||||
private static $AVCONV_CMDV = ['avconv', '-ss', '0:00:10', '-i', '[SRC]', '-an', '-vframes', '1', '[DEST]'];
|
||||
private static $CONVERT_CMDV = ['convert', '-density', '200', '-quality', '100', '-sharpen', '0x1.0', '-strip', '[SRC][0]', '[DEST]'];
|
||||
private static $GM_CONVERT_CMDV = ['gm', 'convert', '-density', '200', '-quality', '100', '-sharpen', '0x1.0', '[SRC][0]', '[DEST]'];
|
||||
private static $THUMB_CACHE = 'thumbs';
|
||||
|
||||
private $context;
|
||||
private $setup;
|
||||
private $thumbs_path;
|
||||
private $thumbs_href;
|
||||
|
||||
public function __construct($context) {
|
||||
|
||||
$this->context = $context;
|
||||
$this->setup = $context->get_setup();
|
||||
$this->thumbs_path = $this->setup->get('CACHE_PUB_PATH') . '/' . Thumb::$THUMB_CACHE;
|
||||
$this->thumbs_href = $this->setup->get('CACHE_PUB_HREF') . Thumb::$THUMB_CACHE;
|
||||
|
||||
if (!is_dir($this->thumbs_path)) {
|
||||
@mkdir($this->thumbs_path, 0755, true);
|
||||
}
|
||||
}
|
||||
|
||||
public function thumb($type, $source_href, $width, $height) {
|
||||
|
||||
$source_path = $this->context->to_path($source_href);
|
||||
if (!file_exists($source_path) || Util::starts_with($source_path, $this->setup->get('CACHE_PUB_PATH'))) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$capture_path = $source_path;
|
||||
if ($type === 'img') {
|
||||
$capture_path = $source_path;
|
||||
} else if ($type === 'mov') {
|
||||
if ($this->setup->get('HAS_CMD_AVCONV')) {
|
||||
$capture_path = $this->capture(Thumb::$AVCONV_CMDV, $source_path);
|
||||
} else if ($this->setup->get('HAS_CMD_FFMPEG')) {
|
||||
$capture_path = $this->capture(Thumb::$FFMPEG_CMDV, $source_path);
|
||||
}
|
||||
} else if ($type === 'doc') {
|
||||
if ($this->setup->get('HAS_CMD_CONVERT')) {
|
||||
$capture_path = $this->capture(Thumb::$CONVERT_CMDV, $source_path);
|
||||
} else if ($this->setup->get('HAS_CMD_GM')) {
|
||||
$capture_path = $this->capture(Thumb::$GM_CONVERT_CMDV, $source_path);
|
||||
}
|
||||
}
|
||||
|
||||
return $this->thumb_href($capture_path, $width, $height);
|
||||
}
|
||||
|
||||
private function thumb_href($source_path, $width, $height) {
|
||||
|
||||
if (!file_exists($source_path)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$name = 'thumb-' . sha1($source_path) . '-' . $width . 'x' . $height . '.jpg';
|
||||
$thumb_path = $this->thumbs_path . '/' . $name;
|
||||
$thumb_href = $this->thumbs_href . '/' . $name;
|
||||
|
||||
if (!file_exists($thumb_path) || filemtime($source_path) >= filemtime($thumb_path)) {
|
||||
|
||||
$image = new Image();
|
||||
|
||||
$et = false;
|
||||
if ($this->setup->get('HAS_PHP_EXIF') && $this->context->query_option('thumbnails.exif', false) === true && $height != 0) {
|
||||
$et = @exif_thumbnail($source_path);
|
||||
}
|
||||
if($et !== false) {
|
||||
file_put_contents($thumb_path, $et);
|
||||
$image->set_source($thumb_path);
|
||||
$image->normalize_exif_orientation($source_path);
|
||||
} else {
|
||||
$image->set_source($source_path);
|
||||
}
|
||||
|
||||
$image->thumb($width, $height);
|
||||
$image->save_dest_jpeg($thumb_path, 80);
|
||||
}
|
||||
|
||||
return file_exists($thumb_path) ? $thumb_href : null;
|
||||
}
|
||||
|
||||
private function capture($cmdv, $source_path) {
|
||||
|
||||
if (!file_exists($source_path)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$capture_path = $this->thumbs_path . '/capture-' . sha1($source_path) . '.jpg';
|
||||
|
||||
if (!file_exists($capture_path) || filemtime($source_path) >= filemtime($capture_path)) {
|
||||
|
||||
foreach ($cmdv as &$arg) {
|
||||
$arg = str_replace('[SRC]', $source_path, $arg);
|
||||
$arg = str_replace('[DEST]', $capture_path, $arg);
|
||||
}
|
||||
|
||||
Util::exec_cmdv($cmdv);
|
||||
}
|
||||
|
||||
return file_exists($capture_path) ? $capture_path : null;
|
||||
}
|
||||
}
|
||||
|
||||
class Image {
|
||||
|
||||
private $source_file;
|
||||
private $source;
|
||||
private $width;
|
||||
private $height;
|
||||
private $type;
|
||||
private $dest;
|
||||
|
||||
public function __construct($filename = null) {
|
||||
|
||||
$this->source_file = null;
|
||||
$this->source = null;
|
||||
$this->width = null;
|
||||
$this->height = null;
|
||||
$this->type = null;
|
||||
|
||||
$this->dest = null;
|
||||
|
||||
$this->set_source($filename);
|
||||
}
|
||||
|
||||
public function __destruct() {
|
||||
|
||||
$this->release_source();
|
||||
$this->release_dest();
|
||||
}
|
||||
|
||||
public function set_source($filename) {
|
||||
|
||||
$this->release_source();
|
||||
$this->release_dest();
|
||||
|
||||
if (is_null($filename)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->source_file = $filename;
|
||||
|
||||
list($this->width, $this->height, $this->type) = @getimagesize($this->source_file);
|
||||
|
||||
if (!$this->width || !$this->height) {
|
||||
$this->source_file = null;
|
||||
$this->width = null;
|
||||
$this->height = null;
|
||||
$this->type = null;
|
||||
return;
|
||||
}
|
||||
|
||||
$this->source = imagecreatefromstring(file_get_contents($this->source_file));
|
||||
}
|
||||
|
||||
public function save_dest_jpeg($filename, $quality = 80) {
|
||||
|
||||
if (!is_null($this->dest)) {
|
||||
@imagejpeg($this->dest, $filename, $quality);
|
||||
@chmod($filename, 0775);
|
||||
}
|
||||
}
|
||||
|
||||
public function release_dest() {
|
||||
|
||||
if (!is_null($this->dest)) {
|
||||
@imagedestroy($this->dest);
|
||||
$this->dest = null;
|
||||
}
|
||||
}
|
||||
|
||||
public function release_source() {
|
||||
|
||||
if (!is_null($this->source)) {
|
||||
@imagedestroy($this->source);
|
||||
$this->source_file = null;
|
||||
$this->source = null;
|
||||
$this->width = null;
|
||||
$this->height = null;
|
||||
$this->type = null;
|
||||
}
|
||||
}
|
||||
|
||||
public function thumb($width, $height) {
|
||||
|
||||
if (is_null($this->source)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$src_r = 1.0 * $this->width / $this->height;
|
||||
|
||||
if ($height == 0) {
|
||||
if ($src_r >= 1) {
|
||||
$height = 1.0 * $width / $src_r;
|
||||
} else {
|
||||
$height = $width;
|
||||
$width = 1.0 * $height * $src_r;
|
||||
}
|
||||
if ($width > $this->width) {
|
||||
$width = $this->width;
|
||||
$height = $this->height;
|
||||
}
|
||||
}
|
||||
|
||||
$ratio = 1.0 * $width / $height;
|
||||
|
||||
if ($src_r <= $ratio) {
|
||||
$src_w = $this->width;
|
||||
$src_h = $src_w / $ratio;
|
||||
$src_x = 0;
|
||||
} else {
|
||||
$src_h = $this->height;
|
||||
$src_w = $src_h * $ratio;
|
||||
$src_x = 0.5 * ($this->width - $src_w);
|
||||
}
|
||||
|
||||
$width = intval($width);
|
||||
$height = intval($height);
|
||||
$src_x = intval($src_x);
|
||||
$src_w = intval($src_w);
|
||||
$src_h = intval($src_h);
|
||||
|
||||
$this->dest = imagecreatetruecolor($width, $height);
|
||||
$icol = imagecolorallocate($this->dest, 255, 255, 255);
|
||||
imagefill($this->dest, 0, 0, $icol);
|
||||
imagecopyresampled($this->dest, $this->source, 0, 0, $src_x, 0, $width, $height, $src_w, $src_h);
|
||||
}
|
||||
|
||||
public function rotate($angle) {
|
||||
|
||||
if (is_null($this->source) || ($angle !== 90 && $angle !== 180 && $angle !== 270)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->source = imagerotate($this->source, $angle, 0);
|
||||
if ( $angle === 90 || $angle === 270 ) {
|
||||
list($this->width, $this->height) = [$this->height, $this->width];
|
||||
}
|
||||
}
|
||||
|
||||
public function normalize_exif_orientation($exif_source_file = null) {
|
||||
|
||||
if (is_null($this->source) || !function_exists('exif_read_data')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($exif_source_file === null) {
|
||||
$exif_source_file = $this->source_file;
|
||||
}
|
||||
|
||||
$exif = exif_read_data($exif_source_file);
|
||||
switch(@$exif['Orientation']) {
|
||||
case 3:
|
||||
$this->rotate(180);
|
||||
break;
|
||||
case 6:
|
||||
$this->rotate(270);
|
||||
break;
|
||||
case 8:
|
||||
$this->rotate(90);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
8
src/_h5ai/private/php/pages/index.php.jade
Normal file
8
src/_h5ai/private/php/pages/index.php.jade
Normal file
@@ -0,0 +1,8 @@
|
||||
extends ./page.tpl.jade
|
||||
|
||||
block init
|
||||
- var title = 'index - powered by h5ai v' + pkg.version + ' (' + pkg.homepage + ')'
|
||||
- var module = 'index'
|
||||
|
||||
block body
|
||||
div#fallback <?= $fallback_html; ?>
|
10
src/_h5ai/private/php/pages/info.php.jade
Normal file
10
src/_h5ai/private/php/pages/info.php.jade
Normal file
@@ -0,0 +1,10 @@
|
||||
extends ./page.tpl.jade
|
||||
|
||||
block init
|
||||
- var title = 'h5ai info page - v' + pkg.version
|
||||
- var module = 'info'
|
||||
|
||||
block body
|
||||
div#content
|
||||
h1#header
|
||||
a(href='#{pkg.homepage}') h5ai
|
27
src/_h5ai/private/php/pages/page.tpl.jade
Normal file
27
src/_h5ai/private/php/pages/page.tpl.jade
Normal file
@@ -0,0 +1,27 @@
|
||||
block init
|
||||
|
||||
<?php header('Content-type: text/html;charset=utf-8'); ?>
|
||||
doctype html
|
||||
html(class='no-js', lang='en')
|
||||
|
||||
head
|
||||
<!--[if lt IE 10]><meta id='no-browser'><![endif]-->
|
||||
meta(charset='utf-8')
|
||||
meta(http-equiv='x-ua-compatible', content='ie=edge')
|
||||
title #{title}
|
||||
meta(name='description', content='#{title}')
|
||||
meta(name='viewport', content='width=device-width, initial-scale=1')
|
||||
link(rel='shortcut icon', href!='<?= $public_href; ?>images/favicon/favicon-16-32.ico')
|
||||
link(rel='apple-touch-icon-precomposed', type='image/png', href!='<?= $public_href; ?>images/favicon/favicon-152.png')
|
||||
link(rel='stylesheet', href!='<?= $public_href; ?>css/styles.css')
|
||||
script(src!='<?= $public_href; ?>js/scripts.js', data-module='#{module}')
|
||||
<?= $x_head_tags; ?>
|
||||
|
||||
body#root(class='#{module}')
|
||||
|
||||
div#fallback-hints
|
||||
span.noJsMsg Works best with JavaScript enabled!
|
||||
span.noBrowserMsg Works best in #[a(href='http://browsehappy.com') modern browsers]!
|
||||
span.backlink #[a(href='#{pkg.homepage}', title='h5ai v#{pkg.version} - #{pkg.description}') powered by h5ai]
|
||||
|
||||
block body
|
27
src/_h5ai/public/.htaccess
Normal file
27
src/_h5ai/public/.htaccess
Normal file
@@ -0,0 +1,27 @@
|
||||
Satisfy all
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
|
||||
DirectoryIndex disabled
|
||||
|
||||
<IfModule mod_autoindex.c>
|
||||
Options -Indexes
|
||||
</IfModule>
|
||||
|
||||
AddDefaultCharset utf-8
|
||||
|
||||
<IfModule mod_mime.c>
|
||||
AddCharset utf-8 .css .html .js .json .php .svg
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_expires.c>
|
||||
ExpiresActive on
|
||||
ExpiresDefault "access plus 1 month"
|
||||
|
||||
ExpiresByType text/html "access plus 0 seconds"
|
||||
ExpiresByType application/json "access plus 0 seconds"
|
||||
|
||||
ExpiresByType text/css "access plus 1 week"
|
||||
ExpiresByType application/javascript "access plus 1 week"
|
||||
ExpiresByType image/x-icon "access plus 1 week"
|
||||
</IfModule>
|
@@ -1,7 +1,9 @@
|
||||
# Cache
|
||||
|
||||
Public cache.
|
||||
|
||||
This directory is used for server side caching. To use caching make this
|
||||
directory writable for Apache.
|
||||
directory writable for your webserver.
|
||||
|
||||
There is no critical data in here. You can savely remove any content. This
|
||||
will clear the cache.
|
46
src/_h5ai/public/css/lib/colors.less
Normal file
46
src/_h5ai/public/css/lib/colors.less
Normal file
@@ -0,0 +1,46 @@
|
||||
@col-red-500: #f44336;
|
||||
@col-green-500: #4caf50;
|
||||
@col-blue-400: #42a5f5;
|
||||
@col-pink-a200: #ff4081;
|
||||
|
||||
@col-white: #ffffff;
|
||||
@col-grey-50: #fafafa;
|
||||
@col-grey-100: #f5f5f5;
|
||||
@col-grey-300: #e0e0e0;
|
||||
@col-grey-700: #616161;
|
||||
@col-grey-900: #212121;
|
||||
|
||||
@col-text-primary-black: rgba(0,0,0,0.87);
|
||||
@col-text-secondary-black: rgba(0,0,0,0.54);
|
||||
@col-text-disabled-black: rgba(0,0,0,0.26);
|
||||
@col-divider-black: rgba(0,0,0,0.12);
|
||||
|
||||
@col-text-primary-white: rgba(255,255,255,1.0);
|
||||
@col-text-secondary-white: rgba(255,255,255,0.7);
|
||||
@col-text-disabled-white: rgba(255,255,255,0.3);
|
||||
@col-divider-white: rgba(255,255,255,0.12);
|
||||
|
||||
@col-text-selected: @col-text-primary-white;
|
||||
@col-back-selected: @col-blue-400;
|
||||
|
||||
@col-text-native-selection: @col-text-primary-white;
|
||||
@col-back-native-selection: @col-pink-a200;
|
||||
|
||||
@col-text: @col-text-primary-black;
|
||||
@col-back: @col-grey-100;
|
||||
@col-back-paper: @col-white;
|
||||
@col-back-panel: @col-grey-50;
|
||||
@col-text-hover: @col-blue-400;
|
||||
@col-back-hover: rgba(0,0,0,0.03);
|
||||
@col-border: rgba(0,0,0,0.05);
|
||||
@col-border-strong: rgba(0,0,0,0.15);
|
||||
@col-border-stronger: rgba(0,0,0,0.3);
|
||||
|
||||
@col-okay: @col-green-500;
|
||||
@col-error: @col-red-500;
|
||||
|
||||
@col-link: @col-blue-400;
|
||||
@col-link-hover: @col-grey-900;
|
||||
|
||||
@col-range-back: @col-grey-300;
|
||||
@col-range-thumb: @col-grey-700;
|
73
src/_h5ai/public/css/lib/ext/contextmenu.less
Normal file
73
src/_h5ai/public/css/lib/ext/contextmenu.less
Normal file
@@ -0,0 +1,73 @@
|
||||
#cm-overlay {
|
||||
display: none;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
overflow: hidden;
|
||||
z-index: 200;
|
||||
|
||||
.cm-panel {
|
||||
.popup;
|
||||
.rounded;
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 100px;
|
||||
top: 100px;
|
||||
color: @col-text;
|
||||
background: @col-back-paper;
|
||||
z-index: 10;
|
||||
overflow: auto;
|
||||
min-width: 200px;
|
||||
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.cm-label {
|
||||
padding: 8px 16px;
|
||||
white-space: nowrap;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.cm-entry {
|
||||
padding: 8px 16px;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: @col-text-hover;
|
||||
background: @col-back-hover;
|
||||
}
|
||||
}
|
||||
|
||||
.cm-icon {
|
||||
position: relative;
|
||||
top: -2px;
|
||||
|
||||
img {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
&.no-icon {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.cm-text {
|
||||
margin: 0 0 0 12px;
|
||||
}
|
||||
|
||||
.cm-sep {
|
||||
height: 1px;
|
||||
margin: 8px 0;
|
||||
padding: 0;
|
||||
border-top: 1px solid rgba(0,0,0,0.08);
|
||||
}
|
||||
}
|
54
src/_h5ai/public/css/lib/ext/crumb.less
Normal file
54
src/_h5ai/public/css/lib/ext/crumb.less
Normal file
@@ -0,0 +1,54 @@
|
||||
#crumbbar {
|
||||
overflow: hidden;
|
||||
height: 48px;
|
||||
font-size: 16px;
|
||||
padding: 0 8px;
|
||||
// border-left: 1px solid rgba(0,0,0,0.05);
|
||||
|
||||
a, a:active, a:visited {
|
||||
color: @col-text;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
|
||||
&.active {
|
||||
font-weight: bold;
|
||||
}
|
||||
&:hover {
|
||||
color: @col-text-hover;
|
||||
}
|
||||
&:focus {
|
||||
outline: 0;
|
||||
}
|
||||
}
|
||||
.crumb {
|
||||
.eased-transition;
|
||||
display: inline-block;
|
||||
}
|
||||
.sep {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
padding: 12px 0;
|
||||
line-height: 48px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
.crumb:first-of-type .sep {
|
||||
width: 0;
|
||||
}
|
||||
.label {
|
||||
line-height: 48px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
padding: 0 8px;
|
||||
}
|
||||
.hint {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
padding: 16px 0 0 0;
|
||||
line-height: 48px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
top: -2px;
|
||||
}
|
||||
}
|
19
src/_h5ai/public/css/lib/ext/custom.less
Normal file
19
src/_h5ai/public/css/lib/ext/custom.less
Normal file
@@ -0,0 +1,19 @@
|
||||
#content-header, #content-footer {
|
||||
margin: 16px;
|
||||
padding: 8px;
|
||||
color: @col-text;
|
||||
|
||||
a, a:active, a:visited {
|
||||
color: @col-link;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: @col-link-hover;
|
||||
}
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6, p {
|
||||
margin: 0.1em 0;
|
||||
}
|
||||
}
|
28
src/_h5ai/public/css/lib/ext/filter.less
Normal file
28
src/_h5ai/public/css/lib/ext/filter.less
Normal file
@@ -0,0 +1,28 @@
|
||||
#filter {
|
||||
|
||||
input {
|
||||
display: none;
|
||||
border: none;
|
||||
font-weight: lighter;
|
||||
font-size: 16px;
|
||||
color: @col-text;
|
||||
background: transparent;
|
||||
outline: 0;
|
||||
width: 160px;
|
||||
padding: 0 12px 0 4px;
|
||||
line-height: 48px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
&.active {
|
||||
input {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
&.pending {
|
||||
input {
|
||||
color: @col-text-disabled-black;
|
||||
}
|
||||
}
|
||||
}
|
57
src/_h5ai/public/css/lib/ext/info.less
Normal file
57
src/_h5ai/public/css/lib/ext/info.less
Normal file
@@ -0,0 +1,57 @@
|
||||
#info {
|
||||
display: none;
|
||||
|
||||
overflow: auto;
|
||||
flex: 0 0 auto;
|
||||
order: 99;
|
||||
|
||||
padding: 16px;
|
||||
border-left: 1px solid @col-border;
|
||||
white-space: nowrap;
|
||||
overflow-x: hidden;
|
||||
width: 240px;
|
||||
|
||||
.icon {
|
||||
width: 240px;
|
||||
height: 180px;
|
||||
|
||||
img {
|
||||
.rounded;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
margin: 0 auto;
|
||||
width: 180px;
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
.thumb {
|
||||
width: 240px;
|
||||
}
|
||||
}
|
||||
|
||||
.block {
|
||||
border-top: 1px solid @col-border;
|
||||
border-bottom: 1px solid @col-border;
|
||||
margin: 0 0 24px 0;
|
||||
padding: 24px 0;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 16px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.time, .size, .content {
|
||||
line-height: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.qrcode {
|
||||
margin: 0 auto;
|
||||
width: 200px;
|
||||
|
||||
canvas {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
8
src/_h5ai/public/css/lib/ext/preview-aud.less
Normal file
8
src/_h5ai/public/css/lib/ext/preview-aud.less
Normal file
@@ -0,0 +1,8 @@
|
||||
#pv-aud-audio {
|
||||
.raised;
|
||||
|
||||
position: absolute;
|
||||
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
27
src/_h5ai/public/css/lib/ext/preview-img.less
Normal file
27
src/_h5ai/public/css/lib/ext/preview-img.less
Normal file
@@ -0,0 +1,27 @@
|
||||
#pv-img-image {
|
||||
.raised;
|
||||
|
||||
@check-white: #f8f8f8;
|
||||
@check-black: #e8e8e8;
|
||||
|
||||
position: absolute;
|
||||
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
|
||||
background-color: @check-white;
|
||||
background-image:
|
||||
-webkit-linear-gradient(45deg, @check-black 25%, transparent 25%, transparent 75%, @check-black 75%, @check-black),
|
||||
-webkit-linear-gradient(45deg, @check-black 25%, transparent 25%, transparent 75%, @check-black 75%, @check-black);
|
||||
background-size: 60px 60px;
|
||||
background-position: 0 0, 30px 30px;
|
||||
|
||||
&.loading {
|
||||
opacity: 0.5;
|
||||
margin-top: 32px;
|
||||
width: 240px;
|
||||
height: 240px;
|
||||
border-radius: 1000px;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
110
src/_h5ai/public/css/lib/ext/preview-txt.less
Normal file
110
src/_h5ai/public/css/lib/ext/preview-txt.less
Normal file
@@ -0,0 +1,110 @@
|
||||
#pv-txt-text {
|
||||
.raised;
|
||||
|
||||
max-width: 960px;
|
||||
text-align: left;
|
||||
background: @col-back-paper;
|
||||
margin: 0 auto;
|
||||
padding: 8px;
|
||||
overflow: auto;
|
||||
|
||||
&.highlighted {
|
||||
|
||||
code {
|
||||
line-height: 1.2em;
|
||||
}
|
||||
|
||||
a, a:active, a:visited {
|
||||
color: #2080FF;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: #68A9FF;
|
||||
}
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.symbol {
|
||||
color: #905;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.builtin {
|
||||
color: #690;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string,
|
||||
.token.variable {
|
||||
color: #a67f59;
|
||||
background: hsla(0,0%,100%,.5);
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword {
|
||||
color: #07a;
|
||||
}
|
||||
|
||||
.token.function {
|
||||
color: #DD4A68;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important {
|
||||
color: #e90;
|
||||
}
|
||||
|
||||
.token.important {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
}
|
||||
|
||||
&.markdown {
|
||||
font-size: 1.1em;
|
||||
padding: 8px 24px;
|
||||
|
||||
a, a:active, a:visited {
|
||||
color: #2080FF;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: #68A9FF;
|
||||
}
|
||||
}
|
||||
|
||||
code {
|
||||
color: #008200;
|
||||
}
|
||||
}
|
||||
}
|
13
src/_h5ai/public/css/lib/ext/preview-vid.less
Normal file
13
src/_h5ai/public/css/lib/ext/preview-vid.less
Normal file
@@ -0,0 +1,13 @@
|
||||
#pv-vid-video {
|
||||
.raised;
|
||||
|
||||
position: absolute;
|
||||
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
#pv-vid-video:-webkit-full-screen {
|
||||
top: auto !important;
|
||||
left: auto !important;
|
||||
}
|
149
src/_h5ai/public/css/lib/ext/preview.less
Normal file
149
src/_h5ai/public/css/lib/ext/preview.less
Normal file
@@ -0,0 +1,149 @@
|
||||
#pv-overlay {
|
||||
display: none;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 100;
|
||||
|
||||
background: rgba(0,0,0,0.5);
|
||||
transition: background-color 0.3s ease-in-out;
|
||||
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#pv-overlay.fullscreen {
|
||||
background: @col-grey-900;
|
||||
}
|
||||
|
||||
#pv-content {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
#pv-spinner {
|
||||
position: absolute;
|
||||
|
||||
.back {
|
||||
width: 240px;
|
||||
height: 240px;
|
||||
margin: -120px -120px;
|
||||
border-radius: 120px;
|
||||
opacity: 0.5;
|
||||
overflow: hidden;
|
||||
}
|
||||
.spinner {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin: -50px -50px;
|
||||
}
|
||||
}
|
||||
|
||||
#pv-prev-area, #pv-next-area {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
cursor: pointer;
|
||||
|
||||
img {
|
||||
.eased-transition;
|
||||
display: block;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
margin: -36px 0;
|
||||
padding: 12px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
img {
|
||||
.raised;
|
||||
opacity: 1;
|
||||
background: rgba(27,27,27,0.8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pv-prev-area {
|
||||
left: 0;
|
||||
img {
|
||||
border-radius: 0 8px 8px 0;
|
||||
padding-left: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
#pv-next-area {
|
||||
right: 0;
|
||||
img {
|
||||
border-radius: 8px 0 0 8px;
|
||||
padding-right: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
#pv-buttons {
|
||||
list-style: none;
|
||||
list-style-image: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
img {
|
||||
position: relative;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
padding: 12px
|
||||
}
|
||||
|
||||
.bar-label {
|
||||
.eased-transition;
|
||||
display: block;
|
||||
color: @col-text-primary-white;
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
padding: 0 12px;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.bar-button {
|
||||
.eased-transition;
|
||||
display: block;
|
||||
line-height: 48px;
|
||||
opacity: 0.7;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
opacity: 1.0;
|
||||
background: rgba(255,255,255,0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.bar-left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.bar-right {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
#pv-bottombar {
|
||||
.raised;
|
||||
position: fixed;
|
||||
z-index: 5;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgb(27,27,27);
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
#pv-overlay.fullscreen {
|
||||
|
||||
#pv-bottombar {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 700px) {
|
||||
#pv-prev-area, #pv-next-area {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
28
src/_h5ai/public/css/lib/ext/search.less
Normal file
28
src/_h5ai/public/css/lib/ext/search.less
Normal file
@@ -0,0 +1,28 @@
|
||||
#search {
|
||||
|
||||
input {
|
||||
display: none;
|
||||
border: none;
|
||||
font-weight: lighter;
|
||||
font-size: 16px;
|
||||
color: @col-text;
|
||||
background: transparent;
|
||||
outline: 0;
|
||||
width: 160px;
|
||||
padding: 0 12px 0 4px;
|
||||
line-height: 48px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
&.active {
|
||||
input {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
&.pending {
|
||||
input {
|
||||
color: @col-text-disabled-black;
|
||||
}
|
||||
}
|
||||
}
|
76
src/_h5ai/public/css/lib/ext/select.less
Normal file
76
src/_h5ai/public/css/lib/ext/select.less
Normal file
@@ -0,0 +1,76 @@
|
||||
#selection-rect {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 2;
|
||||
border: 1px dashed @col-border-strong;
|
||||
background: rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
html.drag-select, html.drag-select * {
|
||||
cursor: move !important;
|
||||
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
|
||||
#view .item:hover {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
#view {
|
||||
|
||||
.selector {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
background: @col-back-selected;
|
||||
cursor: pointer;
|
||||
border-radius: 0 0 2px 0;
|
||||
opacity: 0.6;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.item:hover .selector {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.item.selected:not(.selecting),
|
||||
.item.selecting:not(.selected) {
|
||||
color: @col-text-selected;
|
||||
background: @col-back-selected;
|
||||
|
||||
.selector {
|
||||
display: block;
|
||||
opacity: 1;
|
||||
}
|
||||
&:hover {
|
||||
color: @col-text-selected;
|
||||
background: @col-back-selected;
|
||||
}
|
||||
}
|
||||
|
||||
.no-match {
|
||||
display: none;
|
||||
margin-top: 36px;
|
||||
text-align: center;
|
||||
color: @col-border;
|
||||
font-size: 5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
78
src/_h5ai/public/css/lib/ext/tree.less
Normal file
78
src/_h5ai/public/css/lib/ext/tree.less
Normal file
@@ -0,0 +1,78 @@
|
||||
#tree {
|
||||
display: none;
|
||||
|
||||
overflow: auto;
|
||||
flex: 0 0 auto;
|
||||
order: 1;
|
||||
|
||||
padding: 16px 16px 16px 8px;
|
||||
border-right: 1px solid @col-border;
|
||||
white-space: nowrap;
|
||||
max-width: 250px;
|
||||
overflow-x: hidden;
|
||||
font-weight: lighter;
|
||||
|
||||
a, a:active, a.visited {
|
||||
display: block;
|
||||
margin-left: 20px;
|
||||
padding: 3px 0;
|
||||
text-decoration: none;
|
||||
color: @col-text;
|
||||
|
||||
&:hover {
|
||||
color: @col-text-hover;
|
||||
}
|
||||
}
|
||||
|
||||
.active > a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.indicator {
|
||||
display: block;
|
||||
float: left;
|
||||
padding: 3px 0;
|
||||
position: relative;
|
||||
top: -2px;
|
||||
cursor: pointer;
|
||||
|
||||
img {
|
||||
.eased-transition;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
&.open {
|
||||
img {
|
||||
transform: rotate(90deg);
|
||||
zoom: 1;
|
||||
}
|
||||
}
|
||||
&.unknown {
|
||||
opacity: 0.3;
|
||||
}
|
||||
&.none {
|
||||
opacity: 0;
|
||||
cursor: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
.icon {
|
||||
position: relative;
|
||||
top: -2px;
|
||||
|
||||
img {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.label {
|
||||
margin: 0 0 0 4px;
|
||||
}
|
||||
|
||||
.content {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 0 0 20px;
|
||||
}
|
||||
}
|
5
src/_h5ai/public/css/lib/fonts.less
Normal file
5
src/_h5ai/public/css/lib/fonts.less
Normal file
@@ -0,0 +1,5 @@
|
||||
@font-family: "Ubuntu", "Roboto", "Helvetica", "Arial", "sans-serif";
|
||||
@font-weight: normal;
|
||||
@font-size: 13px;
|
||||
@font-family-mono: "Ubuntu Mono", "Monaco", "Lucida Sans Typewriter", "monospace";
|
||||
@font-size-mono: 15px;
|
110
src/_h5ai/public/css/lib/main/info.less
Normal file
110
src/_h5ai/public/css/lib/main/info.less
Normal file
@@ -0,0 +1,110 @@
|
||||
#root.info {
|
||||
|
||||
#content {
|
||||
flex: 1 1 auto;
|
||||
order: 50;
|
||||
color: @col-text;
|
||||
text-align: center;
|
||||
font-weight: lighter;
|
||||
}
|
||||
|
||||
code {
|
||||
margin: 0 0.2em;
|
||||
padding: 2px 4px;
|
||||
border-radius: 4px;
|
||||
letter-spacing: 0.05em;
|
||||
background: @col-back-panel;
|
||||
border: 1px solid @col-border;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
#header a {
|
||||
.eased-transition;
|
||||
font-size: 4em;
|
||||
font-weight: 300;
|
||||
margin: 0.8em 0 0 0;
|
||||
color: @col-text;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
color: @col-text-hover;
|
||||
}
|
||||
}
|
||||
|
||||
#support {
|
||||
margin: 24px auto;
|
||||
padding: 18px 0 6px 0;
|
||||
width: 292px;
|
||||
background: @col-back-panel;
|
||||
border: 1px solid @col-border;
|
||||
border-radius: 4px;
|
||||
|
||||
input[type="image"] {
|
||||
border: 0;
|
||||
width: 100px;
|
||||
padding: 12px 48px;
|
||||
}
|
||||
}
|
||||
|
||||
#pass {
|
||||
.el-input;
|
||||
display: inline-block;
|
||||
margin: 8px;
|
||||
padding: 0 12px;
|
||||
line-height: 28px;
|
||||
width: 200px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#login, #logout {
|
||||
.el-button;
|
||||
display: inline-block;
|
||||
margin: 8px;
|
||||
padding: 0 12px;
|
||||
line-height: 28px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#hint {
|
||||
margin: 12px auto;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
#tests {
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
list-style-type: none;
|
||||
margin: 48px 0;
|
||||
padding: 0;
|
||||
|
||||
.test {
|
||||
.card;
|
||||
.rounded;
|
||||
background: @col-back-paper;
|
||||
margin: 12px 0 0 0;
|
||||
padding: 8px 12px 12px 12px;
|
||||
}
|
||||
.label {
|
||||
display: inline-block;
|
||||
width: 250px;
|
||||
font-size: 1.4em;
|
||||
}
|
||||
.result {
|
||||
display: inline-block;
|
||||
width: 250px;
|
||||
text-align: right;
|
||||
font-size: 1.4em;
|
||||
font-weight: bold;
|
||||
|
||||
&.passed {
|
||||
color: @col-okay;
|
||||
}
|
||||
&.failed {
|
||||
color: @col-error;
|
||||
}
|
||||
}
|
||||
.info {
|
||||
margin: 4px 0 0 0;
|
||||
}
|
||||
}
|
||||
}
|
14
src/_h5ai/public/css/lib/misc.less
Normal file
14
src/_h5ai/public/css/lib/misc.less
Normal file
@@ -0,0 +1,14 @@
|
||||
::-moz-selection {
|
||||
color: @col-text-native-selection;
|
||||
background: @col-back-native-selection;
|
||||
text-shadow: none;
|
||||
}
|
||||
::selection {
|
||||
color: @col-text-native-selection;
|
||||
background: @col-back-native-selection;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
*:focus {
|
||||
outline: none;
|
||||
}
|
66
src/_h5ai/public/css/lib/mixins.less
Normal file
66
src/_h5ai/public/css/lib/mixins.less
Normal file
@@ -0,0 +1,66 @@
|
||||
.card {
|
||||
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
.raised {
|
||||
box-shadow: 0 1px 10px 0 rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
.popup {
|
||||
box-shadow: 0 1px 20px 0 rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
.rounded {
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.clear-appearance {
|
||||
-moz-appearance: none;
|
||||
-ms-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
.eased-transition {
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
.flex-base {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: flex-start;
|
||||
align-content: flex-start;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.flex-column {
|
||||
.flex-base;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.flex-row {
|
||||
.flex-base;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.el-button {
|
||||
.card;
|
||||
.rounded;
|
||||
.eased-transition;
|
||||
color: @col-text-primary-white;
|
||||
background: @col-blue-400;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
.raised;
|
||||
}
|
||||
}
|
||||
|
||||
.el-input {
|
||||
.card;
|
||||
.rounded;
|
||||
.clear-appearance;
|
||||
background: @col-back-paper;
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
30
src/_h5ai/public/css/lib/responsive.less
Normal file
30
src/_h5ai/public/css/lib/responsive.less
Normal file
@@ -0,0 +1,30 @@
|
||||
@media only screen and (max-width: 700px) {
|
||||
#crumbbar {
|
||||
.crumb:not(.active) {
|
||||
display: none;
|
||||
}
|
||||
.crumb.active .sep {
|
||||
width: 0;
|
||||
}
|
||||
}
|
||||
#view.view-details {
|
||||
.header .label, .item .label {
|
||||
margin-right: 80px !important;
|
||||
}
|
||||
.header .date, .item .date {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
#tree, #info {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media print {
|
||||
a[href]:after {
|
||||
content: "" !important;
|
||||
}
|
||||
#toolbar, #sidebar, #tree, #info {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
5
src/_h5ai/public/css/lib/view/content.less
Normal file
5
src/_h5ai/public/css/lib/view/content.less
Normal file
@@ -0,0 +1,5 @@
|
||||
#content {
|
||||
overflow: auto;
|
||||
flex: 1 1 auto;
|
||||
order: 50;
|
||||
}
|
117
src/_h5ai/public/css/lib/view/fallback.less
Normal file
117
src/_h5ai/public/css/lib/view/fallback.less
Normal file
@@ -0,0 +1,117 @@
|
||||
#fallback {
|
||||
display: none;
|
||||
max-width: 960px;
|
||||
margin: 16px auto;
|
||||
padding: 32px 16px;
|
||||
|
||||
table {
|
||||
.card;
|
||||
display: block;
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
background: @col-back-paper;
|
||||
}
|
||||
th, td {
|
||||
padding: 6px;
|
||||
text-align: left;
|
||||
border: none;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
th {
|
||||
color: #aaa;
|
||||
font-weight: lighter;
|
||||
line-height: 36px;
|
||||
background: @col-back-panel;
|
||||
}
|
||||
td {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
a, a:active, a:visited {
|
||||
display: block;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: @col-text-hover;
|
||||
}
|
||||
}
|
||||
.fb-i {
|
||||
width: 20px;
|
||||
padding-left: 12px;
|
||||
|
||||
img {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
position: relative;
|
||||
top: -1px;
|
||||
}
|
||||
}
|
||||
.fb-n {
|
||||
width: 682px;
|
||||
max-width: 682px;
|
||||
}
|
||||
.fb-d {
|
||||
text-align: right;
|
||||
width: 160px;
|
||||
min-width: 160px;
|
||||
}
|
||||
.fb-s {
|
||||
text-align: right;
|
||||
width: 70px;
|
||||
min-width: 70px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
#fallback-hints {
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
text-align: right;
|
||||
background: @col-back-panel;
|
||||
box-shadow: 0 0 8px 0 rgba(0,0,0,0.2);
|
||||
|
||||
a, a:active, a:visited {
|
||||
.eased-transition;
|
||||
display: inline-block;
|
||||
line-height: 48px;
|
||||
color: @col-text-secondary-black;
|
||||
text-decoration: none;
|
||||
outline: 0;
|
||||
|
||||
&:hover {
|
||||
color: @col-text-hover;
|
||||
}
|
||||
}
|
||||
|
||||
.backlink {
|
||||
margin: 0 16px;
|
||||
}
|
||||
|
||||
.noJsMsg, .noBrowserMsg {
|
||||
display: none;
|
||||
margin: 0 16px;
|
||||
color: @col-error;
|
||||
}
|
||||
}
|
||||
|
||||
html.no-js, html.no-browser {
|
||||
|
||||
#root {
|
||||
position: static;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#fallback, #fallback-hints {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
html.no-js .noJsMsg {
|
||||
display: inline !important;
|
||||
}
|
||||
|
||||
html.no-browser .noBrowserMsg {
|
||||
display: inline !important;
|
||||
}
|
7
src/_h5ai/public/css/lib/view/mainrow.less
Normal file
7
src/_h5ai/public/css/lib/view/mainrow.less
Normal file
@@ -0,0 +1,7 @@
|
||||
#mainrow {
|
||||
.flex-row;
|
||||
flex: 1 1 auto;
|
||||
order: 50;
|
||||
|
||||
height: 0; // non-webkit fix;
|
||||
}
|
13
src/_h5ai/public/css/lib/view/notification.less
Normal file
13
src/_h5ai/public/css/lib/view/notification.less
Normal file
@@ -0,0 +1,13 @@
|
||||
#notification {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
width: 200px;
|
||||
margin-left: -100px;
|
||||
z-index: 100;
|
||||
padding: 3px 6px 6px 6px;
|
||||
color: @col-text-primary-white;
|
||||
background: rgba(0,0,0,0.2);
|
||||
border-radius: 0 0 4px 4px;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
}
|
24
src/_h5ai/public/css/lib/view/root.less
Normal file
24
src/_h5ai/public/css/lib/view/root.less
Normal file
@@ -0,0 +1,24 @@
|
||||
#root {
|
||||
.flex-column;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
overflow: hidden;
|
||||
background: @col-back;
|
||||
}
|
||||
|
||||
#root, input, select {
|
||||
font-family: @font-family;
|
||||
font-size: @font-size;
|
||||
font-weight: @font-weight;
|
||||
color: @col-text;
|
||||
}
|
||||
|
||||
pre, code {
|
||||
font-family: @font-family-mono;
|
||||
font-size: @font-size-mono;
|
||||
font-weight: @font-weight;
|
||||
color: @col-text;
|
||||
}
|
116
src/_h5ai/public/css/lib/view/sidebar.less
Normal file
116
src/_h5ai/public/css/lib/view/sidebar.less
Normal file
@@ -0,0 +1,116 @@
|
||||
#sidebar {
|
||||
display: none;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
flex: 0 0 auto;
|
||||
order: 0;
|
||||
background: @col-back-panel;
|
||||
border-right: 1px solid rgba(0,0,0,0.08);
|
||||
padding: 16px;
|
||||
|
||||
.block {
|
||||
display: block;
|
||||
margin: 0 0 24px 0;
|
||||
width: 168px;
|
||||
|
||||
h1 {
|
||||
font-size: 1em;
|
||||
margin: 2px 0 6px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.button {
|
||||
.rounded;
|
||||
.eased-transition;
|
||||
display: inline-block;
|
||||
margin: 4px;
|
||||
color: @col-text;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background: @col-back-hover;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: rgba(0,0,0,0.03);
|
||||
box-shadow: inset 0 0 4px 0 rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
img {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
padding: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.select {
|
||||
.rounded;
|
||||
background: transparent;
|
||||
overflow: hidden;
|
||||
outline: 0;
|
||||
width: 160px;
|
||||
margin: 4px;
|
||||
line-height: 48px;
|
||||
}
|
||||
|
||||
input, select {
|
||||
.clear-appearance;
|
||||
background: transparent;
|
||||
width: 100%;
|
||||
border: 0 solid #000;
|
||||
cursor: pointer;
|
||||
outline: 0;
|
||||
|
||||
&:hover {
|
||||
background: @col-back-hover;
|
||||
}
|
||||
}
|
||||
|
||||
select {
|
||||
width: 187px;
|
||||
padding: 0 8px;
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
}
|
||||
|
||||
input[type='range'] {
|
||||
.rounded;
|
||||
width: 144px;
|
||||
margin: 4px;
|
||||
padding: 8px;
|
||||
vertical-align: middle;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
.range-track {
|
||||
.clear-appearance;
|
||||
border-width: 0;
|
||||
border-radius: 20px;
|
||||
background: @col-range-back;
|
||||
height: 6px;
|
||||
}
|
||||
|
||||
.range-thumb {
|
||||
.clear-appearance;
|
||||
border-width: 0;
|
||||
border-radius: 20px;
|
||||
background: @col-range-thumb;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
input[type='range']::-webkit-slider-runnable-track { .range-track; }
|
||||
input[type='range']::-moz-range-track { .range-track; }
|
||||
input[type='range']::-ms-track { .range-track; }
|
||||
input[type='range']::-ms-fill-lower { .range-track; }
|
||||
input[type='range']::-ms-fill-upper { .range-track; }
|
||||
|
||||
input[type='range']::-webkit-slider-thumb { .range-thumb; margin-top: -5px; }
|
||||
input[type='range']::-moz-range-thumb { .range-thumb; }
|
||||
input[type='range']::-ms-thumb { .range-thumb; }
|
||||
|
||||
#view-size {
|
||||
display: block;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user