Compare commits
1170 Commits
v2.29.0
...
37d408f762
| Author | SHA1 | Date | |
|---|---|---|---|
| 37d408f762 | |||
| 6d7c91ceeb | |||
| 9041101505 | |||
|
|
d3fda0be37 | ||
|
|
41de21201e | ||
|
|
005f85c34f | ||
|
|
6bb6125e81 | ||
|
|
4da2b844e8 | ||
|
|
eba1923b7c | ||
|
|
f28823dbe9 | ||
|
|
5d122bca7d | ||
|
|
ef4321586c | ||
|
|
336511dcd5 | ||
|
|
d73b6f9026 | ||
|
|
e959c0172d | ||
|
|
a15767c14f | ||
|
|
20b1743223 | ||
|
|
a89930fae6 | ||
|
|
60e81a921e | ||
|
|
36f75beea9 | ||
|
|
01a9eab73d | ||
|
|
a4eff5ae38 | ||
|
|
46b5495167 | ||
|
|
7c9ef2a702 | ||
|
|
ee9aed6bbc | ||
|
|
eb4cf6e2db | ||
|
|
c6ad6b495c | ||
|
|
5499a86854 | ||
|
|
627ccd8214 | ||
|
|
e760d59d9f | ||
|
|
e76858121f | ||
|
|
34f1d02803 | ||
|
|
64610050ca | ||
|
|
f5bd52a94d | ||
|
|
ce603cac1e | ||
|
|
3108235521 | ||
|
|
280aaecf76 | ||
|
|
ba0bb1eabc | ||
|
|
73d0755249 | ||
|
|
4d93dcb9b4 | ||
|
|
1fc9b8e279 | ||
|
|
c6d05111cc | ||
|
|
8fa3d8ba4a | ||
|
|
c5317beb3f | ||
|
|
7d82e36790 | ||
|
|
f39867b0e2 | ||
|
|
54cef503ad | ||
|
|
ce51371e62 | ||
|
|
7aabbbd497 | ||
|
|
02b89ea137 | ||
|
|
119a48f3a3 | ||
|
|
3146a0354c | ||
|
|
8e895a9890 | ||
|
|
ac436cbf79 | ||
|
|
4363aa7734 | ||
|
|
a65cb073b5 | ||
|
|
a3b9e4f7b2 | ||
|
|
ebde8a0171 | ||
|
|
684299ac3b | ||
|
|
c449aef7ae | ||
|
|
879a27ed0a | ||
|
|
107e7a4e31 | ||
|
|
fa0325106a | ||
|
|
bbfce9363f | ||
|
|
10a6280b78 | ||
|
|
08e8724b4c | ||
|
|
555c7e4e2d | ||
|
|
3673026a33 | ||
|
|
cd565ec160 | ||
|
|
bdcbae03ef | ||
|
|
296234a093 | ||
|
|
10c0955c6c | ||
|
|
8ba2bfda63 | ||
|
|
cb06cc53c2 | ||
|
|
826828ba30 | ||
|
|
22de38c72b | ||
|
|
0037c01beb | ||
|
|
fb17c666a9 | ||
|
|
2c32fac1f2 | ||
|
|
3f0b00decd | ||
|
|
160c7863f0 | ||
|
|
c4d185f2d6 | ||
|
|
6b13b1231a | ||
|
|
661137d500 | ||
|
|
962dcc1ce9 | ||
|
|
655df62d6c | ||
|
|
d827a10c84 | ||
|
|
25c640fabb | ||
|
|
0cb8d21290 | ||
|
|
7a47591967 | ||
|
|
6931ca27c3 | ||
|
|
d00d2de1cc | ||
|
|
b1be568991 | ||
|
|
28be3891d2 | ||
|
|
27d2297e2b | ||
|
|
7212ddd5c5 | ||
|
|
f4e9ac5bf1 | ||
|
|
8fec484d66 | ||
|
|
bcf781c37b | ||
|
|
d8a8e689d0 | ||
|
|
a844b95de3 | ||
|
|
ece885f973 | ||
|
|
66dd30604b | ||
|
|
d0f0f4905c | ||
|
|
c9cb6702b6 | ||
|
|
1ddb980242 | ||
|
|
94b626a4d2 | ||
|
|
d2a011462d | ||
|
|
4c34926af0 | ||
|
|
ce35cd1009 | ||
|
|
56d072bd06 | ||
|
|
5d336ef669 | ||
|
|
b47c59eac1 | ||
|
|
87285db361 | ||
|
|
84312e498c | ||
|
|
bd763d9462 | ||
|
|
a00e66f786 | ||
|
|
78c7b52088 | ||
|
|
c3a5bee993 | ||
|
|
c2b5b7c3e2 | ||
|
|
3992f00353 | ||
|
|
97d853e0d3 | ||
|
|
f786cec75f | ||
|
|
07cd08b55e | ||
|
|
ca42faf14a | ||
|
|
87f5b68279 | ||
|
|
6b31edb687 | ||
|
|
6a64048bb6 | ||
|
|
6cf069ee6a | ||
|
|
3b74bba6ab | ||
|
|
8689788523 | ||
|
|
1193776d06 | ||
|
|
022514a0a7 | ||
|
|
dc7f8a59ed | ||
|
|
4e5a76a6c1 | ||
|
|
64c4a25ee8 | ||
|
|
47bbdbaa26 | ||
|
|
f8e0c0e19a | ||
|
|
94cdd19224 | ||
|
|
d86d046eb0 | ||
|
|
25ec6b5a3f | ||
|
|
967453a683 | ||
|
|
4c17305c05 | ||
|
|
6092131303 | ||
|
|
35749834d0 | ||
|
|
fe56c7b887 | ||
|
|
2b58a744d2 | ||
|
|
dfb94d05e4 | ||
|
|
987c1790d8 | ||
|
|
0d416b17ce | ||
|
|
473e165c89 | ||
|
|
3d52d15004 | ||
|
|
27278e128c | ||
|
|
13cee3c9b3 | ||
|
|
fd95e42e9b | ||
|
|
65cd2f5d01 | ||
|
|
70759d1888 | ||
|
|
705d6e2f00 | ||
|
|
088591a335 | ||
|
|
3f037e0d17 | ||
|
|
e6884b6c93 | ||
|
|
9943268ca0 | ||
|
|
620e4d20c2 | ||
|
|
fd03033ac6 | ||
|
|
939099b8c8 | ||
|
|
75001b494d | ||
|
|
8749e21744 | ||
|
|
982ac98e27 | ||
|
|
f31bf17a41 | ||
|
|
3425d9118d | ||
|
|
6be49ecdf3 | ||
|
|
ffd6f9578b | ||
|
|
41293130ad | ||
|
|
6cccd28b92 | ||
|
|
384f10a722 | ||
|
|
a603e299f1 | ||
|
|
05822f82da | ||
|
|
0508e718cb | ||
|
|
574913e9e4 | ||
|
|
068adb62a7 | ||
|
|
73fa1f9cfe | ||
|
|
f518882926 | ||
|
|
ed566f9eea | ||
|
|
8ca32e439a | ||
|
|
35b3b11a3c | ||
|
|
57d4a53081 | ||
|
|
6da05961f2 | ||
|
|
7db3b8c5b8 | ||
|
|
50bafb6fa6 | ||
|
|
2b3a9072d1 | ||
|
|
1c08e57086 | ||
|
|
4290ed2f04 | ||
|
|
342512f3e1 | ||
|
|
942c04cb68 | ||
|
|
64bf4ab3f7 | ||
|
|
052e69737e | ||
|
|
02adc4517c | ||
|
|
e36fdd6823 | ||
|
|
d10a7ed57f | ||
|
|
79adf44dfe | ||
|
|
4bc3113f34 | ||
|
|
0826704282 | ||
|
|
52aa5e6954 | ||
|
|
fde85607d9 | ||
|
|
cc087af012 | ||
|
|
2c7da1e32e | ||
|
|
49fe8952ae | ||
|
|
b298cd0509 | ||
|
|
a81fc11e73 | ||
|
|
199fb6229d | ||
|
|
ec6ecee455 | ||
|
|
fa72172b77 | ||
|
|
6789700def | ||
|
|
752744b3a4 | ||
|
|
c24fa85bf4 | ||
|
|
4e0b59f6a9 | ||
|
|
bd20214552 | ||
|
|
4af0ea9e47 | ||
|
|
8651679634 | ||
|
|
99dcac6d12 | ||
|
|
853bf01c9e | ||
|
|
39c5ad7267 | ||
|
|
8daa2948fa | ||
|
|
f2ba25429e | ||
|
|
1fffb4dc67 | ||
|
|
45ce2439fd | ||
|
|
cb2e77e8f6 | ||
|
|
800c0b0336 | ||
|
|
14c23496d5 | ||
|
|
7756a6d593 | ||
|
|
ae7791a204 | ||
|
|
44232c44fc | ||
|
|
142fc99761 | ||
|
|
5e6dc55c76 | ||
|
|
bb2447e821 | ||
|
|
a88d9cd78e | ||
|
|
dab82db693 | ||
|
|
a1183df72c | ||
|
|
5cfa4f173a | ||
|
|
451ef49d98 | ||
|
|
36a8ebdc1b | ||
|
|
27577edb16 | ||
|
|
bd69ab314b | ||
|
|
6abe4ac04a | ||
|
|
1eeb190653 | ||
|
|
23f22d9d9a | ||
|
|
b913f33b3f | ||
|
|
52da1feb91 | ||
|
|
0af9f1bfbf | ||
|
|
3b0e1c3ce7 | ||
|
|
37ea270c56 | ||
|
|
304550dd94 | ||
|
|
69cee24ffe | ||
|
|
8334c06a9b | ||
|
|
3e739f2877 | ||
|
|
5e33ff4a34 | ||
|
|
2b234e5d64 | ||
|
|
c8b328a1c9 | ||
|
|
5e0ac05f90 | ||
|
|
e440097272 | ||
|
|
263c858a66 | ||
|
|
82371fb2a8 | ||
|
|
b6336a4096 | ||
|
|
7acfbbaae7 | ||
|
|
5a76b4eb2d | ||
|
|
8aac88b696 | ||
|
|
d6e71068be | ||
|
|
6b44951ef0 | ||
|
|
5289ebb923 | ||
|
|
263fcda053 | ||
|
|
2e0d26575e | ||
|
|
b9d6670bee | ||
|
|
f20d39a3e7 | ||
|
|
09d948b3a0 | ||
|
|
96941c83f3 | ||
|
|
b8ca0e381a | ||
|
|
4a2c5d77aa | ||
|
|
cf2d29d82e | ||
|
|
fb2ab63550 | ||
|
|
90efc152a8 | ||
|
|
de6ba49409 | ||
|
|
9d4196f15a | ||
|
|
eed7fb970d | ||
|
|
fe67f1ab61 | ||
|
|
78640561f5 | ||
|
|
f72631a262 | ||
|
|
670e5d0202 | ||
|
|
ea59d1158a | ||
|
|
ba23cf9789 | ||
|
|
de585b90ea | ||
|
|
cf40f4e525 | ||
|
|
b273e34ac8 | ||
|
|
1a00d708e1 | ||
|
|
583584d8c5 | ||
|
|
09c087dee7 | ||
|
|
f5cff50674 | ||
|
|
81c48d5182 | ||
|
|
c44414cadb | ||
|
|
85db4be514 | ||
|
|
6526eefaf5 | ||
|
|
bd1fc5d705 | ||
|
|
ca547023b0 | ||
|
|
caf57d355b | ||
|
|
7e6da62480 | ||
|
|
e14e560415 | ||
|
|
0a8ac87cee | ||
|
|
42441aafd6 | ||
|
|
9c3ff958e3 | ||
|
|
efac7af750 | ||
|
|
314935f68e | ||
|
|
1efa857d95 | ||
|
|
a7409b498e | ||
|
|
a9cb0a8c26 | ||
|
|
9333affaf1 | ||
|
|
38a32be503 | ||
|
|
fe5f7daf78 | ||
|
|
3c07c3e1cf | ||
|
|
cb87c75ac0 | ||
|
|
62ead16817 | ||
|
|
6352e4deb1 | ||
|
|
0c4b569be6 | ||
|
|
fe4d7cfb75 | ||
|
|
d3e791b017 | ||
|
|
0849183d26 | ||
|
|
3410af8899 | ||
|
|
81a1e3a4c3 | ||
|
|
c8e18dc445 | ||
|
|
ad21bd6f53 | ||
|
|
781457fce3 | ||
|
|
6662b713f1 | ||
|
|
34c0d16411 | ||
|
|
f7003ecbbe | ||
|
|
134090df5d | ||
|
|
efb4feab2e | ||
|
|
900e959b0b | ||
|
|
946ffeb3ca | ||
|
|
56d32b0674 | ||
|
|
03fc5c084a | ||
|
|
2a32355dd8 | ||
|
|
d80d0e9d9b | ||
|
|
be0388ee6e | ||
|
|
414c41162a | ||
|
|
39106de96c | ||
|
|
8adb76abfb | ||
|
|
4889b04283 | ||
|
|
e9973a242b | ||
|
|
d324ad0ac5 | ||
|
|
ab6cc2698a | ||
|
|
da076f71a1 | ||
|
|
63c1fe8e75 | ||
|
|
31f0833629 | ||
|
|
d4dc094049 | ||
|
|
21a84e8032 | ||
|
|
819a1baae0 | ||
|
|
b0ee67faff | ||
|
|
0684bd105a | ||
|
|
5c948862a0 | ||
|
|
23291b38de | ||
|
|
9357bd55a6 | ||
|
|
e51d668418 | ||
|
|
a48df70631 | ||
|
|
9853e8311b | ||
|
|
cd8041b048 | ||
|
|
00bf5b7ad6 | ||
|
|
40bcc983c7 | ||
|
|
dfb26f31db | ||
|
|
a57a0bebef | ||
|
|
4853621b1b | ||
|
|
e3209c6fb3 | ||
|
|
13d25cce1f | ||
|
|
cb16b0ca64 | ||
|
|
b3ce3159e7 | ||
|
|
76ffc70892 | ||
|
|
2734587981 | ||
|
|
223e93d654 | ||
|
|
26351726a8 | ||
|
|
efc84db580 | ||
|
|
3bf58bb6f0 | ||
|
|
a7962d9404 | ||
|
|
5ce9bb306d | ||
|
|
5b5bb38f4f | ||
|
|
419ad311a0 | ||
|
|
0c3af09566 | ||
|
|
c9063625ec | ||
|
|
205858a41d | ||
|
|
87edad17c3 | ||
|
|
1c54e80951 | ||
|
|
6c19cdc729 | ||
|
|
84a703bb50 | ||
|
|
27ed95b044 | ||
|
|
0358dfe790 | ||
|
|
68cee65f22 | ||
|
|
24b2125b97 | ||
|
|
eceed12992 | ||
|
|
f9028433a0 | ||
|
|
1936e7b212 | ||
|
|
c04a972be3 | ||
|
|
9c26b011e4 | ||
|
|
821f125789 | ||
|
|
e0f376880a | ||
|
|
6da77bb3c7 | ||
|
|
2fd660a93f | ||
|
|
f3eefc748a | ||
|
|
4852698d74 | ||
|
|
36b24dc826 | ||
|
|
d60bc1d4b6 | ||
|
|
06a02c0877 | ||
|
|
1a53a9f30b | ||
|
|
7ee81d4693 | ||
|
|
0a32d03fda | ||
|
|
6c43dfea18 | ||
|
|
7d1e226743 | ||
|
|
8ea903b81a | ||
|
|
24b08599b3 | ||
|
|
a0f1c1f227 | ||
|
|
efbb014588 | ||
|
|
f881a0e1d5 | ||
|
|
acdb81e8a3 | ||
|
|
6559a87323 | ||
|
|
8301bab768 | ||
|
|
eb0b2010f9 | ||
|
|
8158ea164d | ||
|
|
beb3134af9 | ||
|
|
5fdc6a21a5 | ||
|
|
e7516c57bc | ||
|
|
2169d81b73 | ||
|
|
1d6bb9f9f6 | ||
|
|
812bd07d03 | ||
|
|
19bb02f905 | ||
|
|
58d750f726 | ||
|
|
7f3bb58ec1 | ||
|
|
08ceaf204f | ||
|
|
eced1221a8 | ||
|
|
3a5bbde0cc | ||
|
|
eb1a790485 | ||
|
|
21e9c85bf7 | ||
|
|
632f783d57 | ||
|
|
3ba3908108 | ||
|
|
903a4e91b0 | ||
|
|
6496b129ce | ||
|
|
9fff7a2ea8 | ||
|
|
6d94617e59 | ||
|
|
b95d07babb | ||
|
|
9748d075fa | ||
|
|
aaeeb84ed3 | ||
|
|
c3702ee6d5 | ||
|
|
f239987043 | ||
|
|
6aa67c3fae | ||
|
|
1fc5d75cc0 | ||
|
|
2e0cd1964c | ||
|
|
bcfd3bb636 | ||
|
|
9b893b56f4 | ||
|
|
733254e2c0 | ||
|
|
1e351e60a5 | ||
|
|
90c53e4b46 | ||
|
|
69f54a00c5 | ||
|
|
372c4d33f0 | ||
|
|
5ba77aae3d | ||
|
|
28f4de1b7f | ||
|
|
ed162e2546 | ||
|
|
e16cecd149 | ||
|
|
3a26a5b4d8 | ||
|
|
3848af08fe | ||
|
|
ae79e52486 | ||
|
|
1968f5064d | ||
|
|
9d21bcecbe | ||
|
|
7a84933b2f | ||
|
|
9a10240fcc | ||
|
|
99516421ac | ||
|
|
5eecffb75e | ||
|
|
9d2627849a | ||
|
|
22b8222c3d | ||
|
|
b3d1b14abd | ||
|
|
f1cd0d3dd4 | ||
|
|
3d7815d65f | ||
|
|
a3e7d1f981 | ||
|
|
2e79190977 | ||
|
|
ee7debeef7 | ||
|
|
61f547733c | ||
|
|
5129e6d6ac | ||
|
|
0a9c14f8b1 | ||
|
|
a1960489e1 | ||
|
|
66fe1a83c6 | ||
|
|
a88d384ac7 | ||
|
|
2dc6b68974 | ||
|
|
0988ecc515 | ||
|
|
5ff100da27 | ||
|
|
f218846f4a | ||
|
|
fc0aba60b9 | ||
|
|
82e6a62c54 | ||
|
|
fce8950cc5 | ||
|
|
54247e85e0 | ||
|
|
cc3f9cd8a4 | ||
|
|
6dd79dc5d2 | ||
|
|
6eb53770c3 | ||
|
|
10faeca121 | ||
|
|
38252d9ffc | ||
|
|
86f62aeb99 | ||
|
|
e3a6bb8781 | ||
|
|
8ed94ed12f | ||
|
|
95bcfc2ee0 | ||
|
|
313e4811a1 | ||
|
|
5bb9dfeaf8 | ||
|
|
aabb316c7d | ||
|
|
ae40e6f41b | ||
|
|
e644d5d20d | ||
|
|
ae9abd08ff | ||
|
|
965128c802 | ||
|
|
26324a63df | ||
|
|
b9d9754818 | ||
|
|
0fb516a86c | ||
|
|
4b4c7d8927 | ||
|
|
e3cae93bd3 | ||
|
|
324f87dc19 | ||
|
|
347b5c9411 | ||
|
|
7371f8a29d | ||
|
|
fb381a30cf | ||
|
|
474e3dae65 | ||
|
|
738ac3f1c9 | ||
|
|
2fbe69afc5 | ||
|
|
693448cb42 | ||
|
|
17a416d905 | ||
|
|
09a6ede925 | ||
|
|
5fc04ae318 | ||
|
|
900ea0fb5c | ||
|
|
85a6a1d884 | ||
|
|
0572009456 | ||
|
|
9bcd98cb69 | ||
|
|
aefce2a842 | ||
|
|
ee4fe99b08 | ||
|
|
2cb85d47b8 | ||
|
|
0713b6b419 | ||
|
|
8f116fddab | ||
|
|
58838cd806 | ||
|
|
7d5918b320 | ||
|
|
7eb4ca0fb4 | ||
|
|
d575bfa0fb | ||
|
|
b60ea3f153 | ||
|
|
6e7bc6cfb4 | ||
|
|
9b85a0044c | ||
|
|
b8708382b1 | ||
|
|
e0601c7b38 | ||
|
|
0725714144 | ||
|
|
ab501e1c6a | ||
|
|
7cd401327b | ||
|
|
e886088dff | ||
|
|
ebe7cc32af | ||
|
|
5e607c3b8e | ||
|
|
5ec809e3dd | ||
|
|
9d3b6e0556 | ||
|
|
acd003814a | ||
|
|
c4991d09f3 | ||
|
|
ca9b2dada3 | ||
|
|
6a3004d75d | ||
|
|
9bd624f31a | ||
|
|
acb264da20 | ||
|
|
c23b0fbfe7 | ||
|
|
0e78b5e289 | ||
|
|
91ab895a1d | ||
|
|
5c37238114 | ||
|
|
3cf40ba504 | ||
|
|
9229961f72 | ||
|
|
0b35b11909 | ||
|
|
77a27d8716 | ||
|
|
be32939029 | ||
|
|
4f046425aa | ||
|
|
89bf6b1fd9 | ||
|
|
d81414cca6 | ||
|
|
d8eb96a37a | ||
|
|
d1b3b0ba34 | ||
|
|
dca207347f | ||
|
|
5a7ebf8027 | ||
|
|
f6d877715c | ||
|
|
754eb32db4 | ||
|
|
67c04c7f59 | ||
|
|
daebb26ffa | ||
|
|
3e2993d048 | ||
|
|
2745cf4015 | ||
|
|
4e99e2960c | ||
|
|
649028307d | ||
|
|
24787c32dd | ||
|
|
625ddac65a | ||
|
|
78ff2e6d07 | ||
|
|
837426d3c5 | ||
|
|
65477a5b2b | ||
|
|
a9fa8be5a2 | ||
|
|
0bb26150d6 | ||
|
|
fd8f7ade51 | ||
|
|
3310bc2fed | ||
|
|
0cbb640054 | ||
|
|
b4aa88ac33 | ||
|
|
f2906e57f0 | ||
|
|
8d381b167e | ||
|
|
d78e316349 | ||
|
|
82d00c6a4a | ||
|
|
ba4fd7f1ef | ||
|
|
591d265167 | ||
|
|
af9d973a91 | ||
|
|
15096a3118 | ||
|
|
7c78a9697c | ||
|
|
3f5051f697 | ||
|
|
044a66f2e8 | ||
|
|
6fb8775bb7 | ||
|
|
f16d0300ba | ||
|
|
84e12f1eea | ||
|
|
ba40b7ff15 | ||
|
|
e733326056 | ||
|
|
b3d987e933 | ||
|
|
e919874e9e | ||
|
|
a2f51f151a | ||
|
|
ea288abb27 | ||
|
|
b274900ae0 | ||
|
|
10d29d3a3f | ||
|
|
a92e04343a | ||
|
|
be31c18bfe | ||
|
|
9d0a5fd8f3 | ||
|
|
5ca577bc0a | ||
|
|
4d25d185c3 | ||
|
|
ea289e02da | ||
|
|
a3f16eb7e8 | ||
|
|
ddd29abe99 | ||
|
|
decd56f2d2 | ||
|
|
387401cb44 | ||
|
|
57c1a6b540 | ||
|
|
8dba0e8242 | ||
|
|
ee715f6387 | ||
|
|
b770b30334 | ||
|
|
d61abac126 | ||
|
|
ccf28b8012 | ||
|
|
3762cb06bb | ||
|
|
15400f2a3e | ||
|
|
20d1b1fe83 | ||
|
|
73844f8813 | ||
|
|
2187553625 | ||
|
|
984b2a5dea | ||
|
|
9098d9454f | ||
|
|
027dd93fb5 | ||
|
|
a005adc89a | ||
|
|
866ef04fbf | ||
|
|
00b6f97e3a | ||
|
|
a1d21b1a2a | ||
|
|
7358ea43d8 | ||
|
|
88c69311eb | ||
|
|
c1e45e5d0d | ||
|
|
fe78de2417 | ||
|
|
4c1fc201e6 | ||
|
|
3f5d270915 | ||
|
|
a452fbeb07 | ||
|
|
a6f02c245f | ||
|
|
cb4f9129d6 | ||
|
|
9c5d64c211 | ||
|
|
41dc0ecc60 | ||
|
|
6b9409b889 | ||
|
|
ea66eeed6c | ||
|
|
a419d28ef1 | ||
|
|
481dfc24fd | ||
|
|
ed686a7d52 | ||
|
|
b4c5a07800 | ||
|
|
6ae16f7fef | ||
|
|
4aae2ed3b8 | ||
|
|
81d4137b20 | ||
|
|
77ecb02a17 | ||
|
|
4a375f92ed | ||
|
|
7caf91460a | ||
|
|
0e015c8b97 | ||
|
|
7b69ddb14d | ||
|
|
2271eb270e | ||
|
|
7e5b2e4e79 | ||
|
|
124b9d9ea5 | ||
|
|
36076068ec | ||
|
|
c868354b5b | ||
|
|
db91f0b2a0 | ||
|
|
d7e83bb78e | ||
|
|
feb2a39e05 | ||
|
|
a6cf910d05 | ||
|
|
b891b44ac6 | ||
|
|
026a3ebb81 | ||
|
|
71ba246011 | ||
|
|
a391204fa6 | ||
|
|
9c773399a8 | ||
|
|
528b85352a | ||
|
|
249c369c14 | ||
|
|
9803fc1031 | ||
|
|
299fde1c98 | ||
|
|
7f55734fbb | ||
|
|
efe230865a | ||
|
|
6e52e684c8 | ||
|
|
99d880297a | ||
|
|
dec706ae72 | ||
|
|
2e60f0a0c2 | ||
|
|
ef612f86e5 | ||
|
|
9c16e03ea7 | ||
|
|
7780c0310e | ||
|
|
b0a23c0d1a | ||
|
|
05c85cea08 | ||
|
|
1ffae0a1de | ||
|
|
15cbccd15f | ||
|
|
266b2f2ac8 | ||
|
|
26f9fb4199 | ||
|
|
67887fb6ef | ||
|
|
3d102e39ff | ||
|
|
ddd9089130 | ||
|
|
d8ce88ab57 | ||
|
|
01794a47c6 | ||
|
|
17626dbbdb | ||
|
|
e5bd86658d | ||
|
|
e911dc1353 | ||
|
|
27e3e5aa6a | ||
|
|
5b65525bf1 | ||
|
|
277804f8b1 | ||
|
|
4c77802e3c | ||
|
|
aacfea6ea5 | ||
|
|
6d55040e43 | ||
|
|
290f785a47 | ||
|
|
39ef187f6b | ||
|
|
a7a475e763 | ||
|
|
6eb380ea38 | ||
|
|
4d150cb323 | ||
|
|
09d6d99b14 | ||
|
|
5e7fd8baff | ||
|
|
52c159e2e8 | ||
|
|
67e8feb879 | ||
|
|
a5b61d5244 | ||
|
|
decc3a16ed | ||
|
|
7f39e9f0cc | ||
|
|
95afa1a6ad | ||
|
|
0d0bb5f9e2 | ||
|
|
3dd5ce5035 | ||
|
|
549e56d551 | ||
|
|
50b6215d1e | ||
|
|
ff69bfdce7 | ||
|
|
c04cc8ec0f | ||
|
|
f324de2254 | ||
|
|
40af4e6f34 | ||
|
|
5d9b66b5cb | ||
|
|
d2a8277c13 | ||
|
|
ada85fc0f3 | ||
|
|
505345eff7 | ||
|
|
2911ade880 | ||
|
|
8980dc8f9c | ||
|
|
d94a1c47c0 | ||
|
|
99c3e5182d | ||
|
|
70e39fee40 | ||
|
|
26d6bec8a0 | ||
|
|
c9ac1a1402 | ||
|
|
6949c1092c | ||
|
|
aae8a54481 | ||
|
|
e1d93bf670 | ||
|
|
fea0533cb1 | ||
|
|
5cd991f02a | ||
|
|
50a8a605d5 | ||
|
|
9ce7d8f5d6 | ||
|
|
eae2587e4c | ||
|
|
323097f201 | ||
|
|
014499888a | ||
|
|
5662de21ae | ||
|
|
17c2eba455 | ||
|
|
1f2c986e8f | ||
|
|
12040b5f6d | ||
|
|
20a985848f | ||
|
|
c06c6169e5 | ||
|
|
917aeb79ef | ||
|
|
c4f36a39fe | ||
|
|
befedc30ad | ||
|
|
d3bc67daa2 | ||
|
|
5d7e211367 | ||
|
|
fa9daa01ec | ||
|
|
0ed9dc63b8 | ||
|
|
5dd6b33eb2 | ||
|
|
1210b823c7 | ||
|
|
04240b4b3d | ||
|
|
787f592a1a | ||
|
|
e7363fbd40 | ||
|
|
e2762825e5 | ||
|
|
bbbca70c71 | ||
|
|
8dde423866 | ||
|
|
fc4c1c2b7e | ||
|
|
bf02e2de3f | ||
|
|
a26ba4dc6e | ||
|
|
f187cc9314 | ||
|
|
c15c6374f9 | ||
|
|
acec382dfe | ||
|
|
fbc078c6b6 | ||
|
|
170b20185a | ||
|
|
3e8489c13b | ||
|
|
18dfc4c23e | ||
|
|
e6bae3dc77 | ||
|
|
6f9f27c030 | ||
|
|
874bef74c7 | ||
|
|
ad483e0916 | ||
|
|
5b4bbaec20 | ||
|
|
b8ae0db0bd | ||
|
|
f2c18fad52 | ||
|
|
9716655b94 | ||
|
|
efb317191c | ||
|
|
a47b5db40c | ||
|
|
ec94796b9c | ||
|
|
e3e0cd61a2 | ||
|
|
a438473279 | ||
|
|
12b5b8b509 | ||
|
|
22442b47a8 | ||
|
|
30c8b7d64f | ||
|
|
b643575c4f | ||
|
|
7dd7124fac | ||
|
|
4b1eebf5bb | ||
|
|
3257943926 | ||
|
|
24246c83e0 | ||
|
|
a26787f478 | ||
|
|
ec3b88f890 | ||
|
|
7f5f1dad92 | ||
|
|
b6db128214 | ||
|
|
8831635db2 | ||
|
|
e19198b720 | ||
|
|
f618d9dc1a | ||
|
|
66a667a0a3 | ||
|
|
8a4c67f712 | ||
|
|
fa6ef2e989 | ||
|
|
7450b99197 | ||
|
|
023fd272b1 | ||
|
|
84067cb027 | ||
|
|
3087ef70e7 | ||
|
|
387385bb1c | ||
|
|
6766d0d08c | ||
|
|
371d890793 | ||
|
|
57046c1b38 | ||
|
|
2a64144e94 | ||
|
|
9b0320ccf1 | ||
|
|
23f209131e | ||
|
|
d71f1c7f9a | ||
|
|
d21ea2c854 | ||
|
|
cd7f3ba820 | ||
|
|
e057d3ed9a | ||
|
|
5f04607a44 | ||
|
|
9440d13a08 | ||
|
|
85c4f1654e | ||
|
|
eed339cc64 | ||
|
|
3d1a23576a | ||
|
|
ed0e2e4bb5 | ||
|
|
954d0a0637 | ||
|
|
f2c8788602 | ||
|
|
49c63da27c | ||
|
|
24496d1856 | ||
|
|
991ebe09a2 | ||
|
|
85da4f6d85 | ||
|
|
5f065db991 | ||
|
|
ffb40586d7 | ||
|
|
fcfd87fd50 | ||
|
|
eb5b12aa7b | ||
|
|
f6e2438744 | ||
|
|
e3c7dc695d | ||
|
|
82d2025e6c | ||
|
|
91b82d78b8 | ||
|
|
b97e792893 | ||
|
|
13ac5ec7dc | ||
|
|
199f880936 | ||
|
|
ed86c207ba | ||
|
|
b4cf290f4d | ||
|
|
e526a6fd64 | ||
|
|
94cbbf169a | ||
|
|
2837ed16a7 | ||
|
|
68961deb6b | ||
|
|
ec54bfee98 | ||
|
|
385e97b76a | ||
|
|
cbd916877f | ||
|
|
38586034cd | ||
|
|
62b3ba2bff | ||
|
|
dd470b61b5 | ||
|
|
4fa92d2327 | ||
|
|
6f6c2db66d | ||
|
|
e6348cfa20 | ||
|
|
a006d1000a | ||
|
|
4a575e642f | ||
|
|
93525bc577 | ||
|
|
2cf0e9a723 | ||
|
|
c32164bfea | ||
|
|
714b0924e7 | ||
|
|
43079790a8 | ||
|
|
d03e61b625 | ||
|
|
2d760112a3 | ||
|
|
f46507ec72 | ||
|
|
e9e10bdc93 | ||
|
|
0386967a32 | ||
|
|
4900fc8b88 | ||
|
|
99294b5643 | ||
|
|
eb12bcb83c | ||
|
|
22a2e57642 | ||
|
|
5eaae06ceb | ||
|
|
ce7fc35349 | ||
|
|
8d4b5c83ae | ||
|
|
cbd3c56ca0 | ||
|
|
be6dad1424 | ||
|
|
298452fa7b | ||
|
|
4abbd7c35c | ||
|
|
c2f51c51ab | ||
|
|
255cff6664 | ||
|
|
8a9578bb0a | ||
|
|
8831f6cecc | ||
|
|
f3daa7e48b | ||
|
|
6163597958 | ||
|
|
f9e1222065 | ||
|
|
7d85de7c6c | ||
|
|
cf452c2300 | ||
|
|
72bd1d548d | ||
|
|
4556f4dee6 | ||
|
|
3dfbd3165a | ||
|
|
02b8e02131 | ||
|
|
087ded9f9e | ||
|
|
21f122ee82 | ||
|
|
d60a7e8c94 | ||
|
|
b8981c249f | ||
|
|
e71275a0dc | ||
|
|
4fb0db7a1e | ||
|
|
1e9beedc77 | ||
|
|
4a4a0653ef | ||
|
|
c80a900277 | ||
|
|
6fb0394d96 | ||
|
|
a6a7712039 | ||
|
|
dd0687ba29 | ||
|
|
9cb87a5333 | ||
|
|
8ec93d84a0 | ||
|
|
1d38715db9 | ||
|
|
6225c4eb35 | ||
|
|
e58ce2fbe6 | ||
|
|
8881d62e78 | ||
|
|
effb2a1265 | ||
|
|
ab387473b5 | ||
|
|
3cf6079b70 | ||
|
|
53c655bb53 | ||
|
|
87952463c2 | ||
|
|
3a8a63a49a | ||
|
|
debe115044 | ||
|
|
554d2808fd | ||
|
|
12b2c89a25 | ||
|
|
a66fc3a07e | ||
|
|
7b3705cab0 | ||
|
|
8e99e5f5e8 | ||
|
|
c5ba5370bb | ||
|
|
464dec9810 | ||
|
|
c2e2ec8803 | ||
|
|
37378e2360 | ||
|
|
678385d90c | ||
|
|
4c461f087f | ||
|
|
88a2b69980 | ||
|
|
1f57792da7 | ||
|
|
9bb4c45a23 | ||
|
|
75fd19f491 | ||
|
|
0ac16bdeb7 | ||
|
|
223ee41e10 | ||
|
|
c126ded82e | ||
|
|
0edf78b7fd | ||
|
|
5af3580987 | ||
|
|
343cb6f97a | ||
|
|
023c8ac13e | ||
|
|
c385eed795 | ||
|
|
ee5fdd789f | ||
|
|
df1e400f4e | ||
|
|
6c9c298478 | ||
|
|
7106ee150d | ||
|
|
03e2287f80 | ||
|
|
2edcd41e24 | ||
|
|
0fe043bd99 | ||
|
|
6686f5240d | ||
|
|
2936facf0f | ||
|
|
cc208f2c43 | ||
|
|
9a0fc231e5 | ||
|
|
bfc0ae62ec | ||
|
|
5e7d8d97f2 | ||
|
|
70ceb16ed6 | ||
|
|
f162fa639f | ||
|
|
f000c72546 | ||
|
|
32c01f931c | ||
|
|
d0121e2b9d | ||
|
|
1caab8ce1d | ||
|
|
878be435a1 | ||
|
|
6a68ae989e | ||
|
|
00993da781 | ||
|
|
e9ef67e402 | ||
|
|
83ebfececf | ||
|
|
ec8bf6251f | ||
|
|
1b2874b3a5 | ||
|
|
0ac1053a71 | ||
|
|
224d270952 | ||
|
|
c6137545cd | ||
|
|
335417f9f4 | ||
|
|
cb797223ed | ||
|
|
3a2a0313ac | ||
|
|
e221a5a73a | ||
|
|
2b7aaf095f | ||
|
|
6f01e7b8d8 | ||
|
|
d594419200 | ||
|
|
bf50e3f898 | ||
|
|
d434f1781f | ||
|
|
3f311a45ef | ||
|
|
9293b7796e | ||
|
|
b1e7883526 | ||
|
|
7fcf6a253d | ||
|
|
be8d985d15 | ||
|
|
974c90dddc | ||
|
|
4811d395d2 | ||
|
|
132423d577 | ||
|
|
10829e2f00 | ||
|
|
47b908c964 | ||
|
|
0f8e471d5d | ||
|
|
2537119250 | ||
|
|
977066d114 | ||
|
|
46e956dc74 | ||
|
|
7afdd8d44f | ||
|
|
6daf204b4f | ||
|
|
2f4a550a4a | ||
|
|
fe214f6b41 | ||
|
|
ca7de81888 | ||
|
|
17ce20355a | ||
|
|
34981b4765 | ||
|
|
21151a2e09 | ||
|
|
1abb7f5b8c | ||
|
|
05998549a4 | ||
|
|
96283a3629 | ||
|
|
2bfc7abe9c | ||
|
|
4f389eca8d | ||
|
|
1789479955 | ||
|
|
212800155b | ||
|
|
c241bf2104 | ||
|
|
bda61f32f3 | ||
|
|
59316dbaf9 | ||
|
|
b726073a5b | ||
|
|
adf897c812 | ||
|
|
1fc4c2442c | ||
|
|
414643ee90 | ||
|
|
1a1cbd6ea1 | ||
|
|
9ae809a62f | ||
|
|
eb9b1c905d | ||
|
|
fe9a8f49c1 | ||
|
|
f912c8fce3 | ||
|
|
1d1ca43c35 | ||
|
|
bce45f44e4 | ||
|
|
07583fb563 | ||
|
|
775aa23992 | ||
|
|
05ed6b7e73 | ||
|
|
d602694ea7 | ||
|
|
18d71bc0d4 | ||
|
|
3fa68643ba | ||
|
|
8904525c36 | ||
|
|
3ce09a98f3 | ||
|
|
b833768e71 | ||
|
|
b9a6afd993 | ||
|
|
b5a81ea927 | ||
|
|
750e92cdde | ||
|
|
da45f4c011 | ||
|
|
544bb5c11c | ||
|
|
1fc6f62f70 | ||
|
|
8751ad27ec | ||
|
|
159d3d5b87 | ||
|
|
34d6d99d8c | ||
|
|
6c46931b1a | ||
|
|
2c3e2d9d08 | ||
|
|
7be1562fa4 | ||
|
|
294389e7c7 | ||
|
|
2c8ce133f7 | ||
|
|
4f1d4d90d0 | ||
|
|
7b7484332b | ||
|
|
50e94b85aa | ||
|
|
9b820594ef | ||
|
|
ddcd45d56d | ||
|
|
c4a4c16516 | ||
|
|
5ae9ad0762 | ||
|
|
405f7d498e | ||
|
|
bcd6a5b1e7 | ||
|
|
e5e5ac994c | ||
|
|
e1f8d6ec49 | ||
|
|
6f50242f5a | ||
|
|
036f7ece05 | ||
|
|
622a2ff072 | ||
|
|
60334ca04a | ||
|
|
ade47b4e83 | ||
|
|
d7e550dfea | ||
|
|
c3cc0b9bf7 | ||
|
|
5ad89189c1 | ||
|
|
f1bbd4eb13 | ||
|
|
fba89dfacb | ||
|
|
b93ed41215 | ||
|
|
13ff6a7304 | ||
|
|
ad97405e55 | ||
|
|
376e231d7b | ||
|
|
e16d76f6dd | ||
|
|
ffd0fd92fc | ||
|
|
933613d730 | ||
|
|
9b0673bf92 | ||
|
|
7cba22aa28 | ||
|
|
af05b614a9 | ||
|
|
c0fa219a8b | ||
|
|
4e3a47b0f4 | ||
|
|
161276b58a | ||
|
|
47713019a5 | ||
|
|
010632a21d | ||
|
|
e77fe550af | ||
|
|
0a4233da14 | ||
|
|
56fb70ab1e | ||
|
|
4a1f2bc01d | ||
|
|
20292fbf16 | ||
|
|
1290cf8991 | ||
|
|
b8b8af7cf1 | ||
|
|
75f4f452d3 | ||
|
|
9de492384f | ||
|
|
14c4e161f2 | ||
|
|
c55efbc0ba | ||
|
|
f0610222d9 | ||
|
|
302ee4a50f | ||
|
|
2170819159 | ||
|
|
0d1fac321a | ||
|
|
dbbc1756dd | ||
|
|
d5b882d3f8 | ||
|
|
5dba4d1384 | ||
|
|
de240e40a5 | ||
|
|
3bbdc828d9 | ||
|
|
b2b92aea31 | ||
|
|
e0680d9612 | ||
|
|
d286df649e | ||
|
|
e0cbc247b2 | ||
|
|
a2c8a82559 | ||
|
|
8b91323705 | ||
|
|
89fdbf5660 | ||
|
|
7ed5dfdb8f | ||
|
|
824c65eb38 | ||
|
|
e43eeeba4a | ||
|
|
9e2c7cc145 | ||
|
|
989598b9cd | ||
|
|
6a41942de6 | ||
|
|
d263072aca | ||
|
|
78c8467bf6 | ||
|
|
084908bd04 | ||
|
|
39cc83c1b8 | ||
|
|
039a775ce4 | ||
|
|
dd9e80f067 | ||
|
|
5dd1bb949c | ||
|
|
b76486e4dc | ||
|
|
a3a2af948e | ||
|
|
2ce2df6390 | ||
|
|
19e5136d64 | ||
|
|
281e155480 | ||
|
|
70b2a11cb7 | ||
|
|
0bedf3ea59 | ||
|
|
1775ac4803 | ||
|
|
ae1a615863 | ||
|
|
a6ef1b8902 | ||
|
|
94d17b81d4 | ||
|
|
44a63d9cec | ||
|
|
e2b4b5a57e | ||
|
|
ec30aa323e | ||
|
|
95e9087c6e | ||
|
|
db38099557 | ||
|
|
164d5cdec9 | ||
|
|
c6b1076092 | ||
|
|
6aebe856da | ||
|
|
4737551918 | ||
|
|
c2cb79f700 | ||
|
|
d7c05984be | ||
|
|
55429e2f03 | ||
|
|
25ffe8b0e4 | ||
|
|
303a9d1110 | ||
|
|
de8c907c51 | ||
|
|
0fd1cabd60 | ||
|
|
8dd480735c | ||
|
|
676f1a1f0e | ||
|
|
ce75422126 | ||
|
|
3a097d6b15 | ||
|
|
9de1bf1020 | ||
|
|
93e5cf1c25 | ||
|
|
6e2376570b | ||
|
|
b20c4bf197 | ||
|
|
6ae1d92033 |
124
.eslintrc
Normal file
@@ -0,0 +1,124 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true,
|
||||
"es2022": true
|
||||
},
|
||||
"parserOptions": {
|
||||
"sourceType": "module"
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"rules": {
|
||||
"indent": "off",
|
||||
"brace-style": "off",
|
||||
"no-mixed-spaces-and-tabs": "off",
|
||||
"no-useless-escape": "off",
|
||||
"space-unary-ops": ["error", { "words": true }],
|
||||
"linebreak-style": "off",
|
||||
"quotes": ["off"],
|
||||
"semi": "off",
|
||||
"camelcase": "off",
|
||||
"no-unused-vars": "off",
|
||||
"no-console": ["warn"],
|
||||
"no-extra-boolean-cast": ["off"],
|
||||
"no-control-regex": ["off"],
|
||||
},
|
||||
"root": true,
|
||||
"globals": {
|
||||
"frappe": true,
|
||||
"Vue": true,
|
||||
"SetVueGlobals": true,
|
||||
"__": true,
|
||||
"repl": true,
|
||||
"Class": true,
|
||||
"locals": true,
|
||||
"cint": true,
|
||||
"cstr": true,
|
||||
"cur_frm": true,
|
||||
"cur_dialog": true,
|
||||
"cur_page": true,
|
||||
"cur_list": true,
|
||||
"cur_tree": true,
|
||||
"msg_dialog": true,
|
||||
"is_null": true,
|
||||
"in_list": true,
|
||||
"has_common": true,
|
||||
"posthog": true,
|
||||
"has_words": true,
|
||||
"validate_email": true,
|
||||
"open_web_template_values_editor": true,
|
||||
"validate_name": true,
|
||||
"validate_phone": true,
|
||||
"validate_url": true,
|
||||
"get_number_format": true,
|
||||
"format_number": true,
|
||||
"format_currency": true,
|
||||
"comment_when": true,
|
||||
"open_url_post": true,
|
||||
"toTitle": true,
|
||||
"lstrip": true,
|
||||
"rstrip": true,
|
||||
"strip": true,
|
||||
"strip_html": true,
|
||||
"replace_all": true,
|
||||
"flt": true,
|
||||
"precision": true,
|
||||
"CREATE": true,
|
||||
"AMEND": true,
|
||||
"CANCEL": true,
|
||||
"copy_dict": true,
|
||||
"get_number_format_info": true,
|
||||
"strip_number_groups": true,
|
||||
"print_table": true,
|
||||
"Layout": true,
|
||||
"web_form_settings": true,
|
||||
"$c": true,
|
||||
"$a": true,
|
||||
"$i": true,
|
||||
"$bg": true,
|
||||
"$y": true,
|
||||
"$c_obj": true,
|
||||
"refresh_many": true,
|
||||
"refresh_field": true,
|
||||
"toggle_field": true,
|
||||
"get_field_obj": true,
|
||||
"get_query_params": true,
|
||||
"unhide_field": true,
|
||||
"hide_field": true,
|
||||
"set_field_options": true,
|
||||
"getCookie": true,
|
||||
"getCookies": true,
|
||||
"get_url_arg": true,
|
||||
"md5": true,
|
||||
"$": true,
|
||||
"jQuery": true,
|
||||
"moment": true,
|
||||
"hljs": true,
|
||||
"Awesomplete": true,
|
||||
"Sortable": true,
|
||||
"Showdown": true,
|
||||
"Taggle": true,
|
||||
"Gantt": true,
|
||||
"Slick": true,
|
||||
"Webcam": true,
|
||||
"PhotoSwipe": true,
|
||||
"PhotoSwipeUI_Default": true,
|
||||
"io": true,
|
||||
"JsBarcode": true,
|
||||
"L": true,
|
||||
"Chart": true,
|
||||
"DataTable": true,
|
||||
"Cypress": true,
|
||||
"cy": true,
|
||||
"it": true,
|
||||
"describe": true,
|
||||
"expect": true,
|
||||
"context": true,
|
||||
"before": true,
|
||||
"beforeEach": true,
|
||||
"after": true,
|
||||
"qz": true,
|
||||
"localforage": true,
|
||||
"extend_cscript": true
|
||||
}
|
||||
}
|
||||
2
.github/helper/install_dependencies.sh
vendored
@@ -5,7 +5,7 @@ echo "Setting Up System Dependencies..."
|
||||
|
||||
sudo apt update
|
||||
sudo apt remove mysql-server mysql-client
|
||||
sudo apt-get install libcups2-dev redis-server mariadb-client
|
||||
sudo apt-get install libcups2-dev redis-server mariadb-client libmariadb-dev
|
||||
|
||||
install_wkhtmltopdf() {
|
||||
wget -q https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb
|
||||
|
||||
2
.github/workflows/make_release_pr.yml
vendored
@@ -1,7 +1,7 @@
|
||||
name: Create weekly release
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 4 15 * *'
|
||||
- cron: '30 3 * * 3'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
exclude: 'node_modules|.git'
|
||||
default_stages: [commit]
|
||||
default_stages: [pre-commit]
|
||||
fail_fast: false
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.3.0
|
||||
rev: v5.0.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
files: "lms.*"
|
||||
@@ -16,17 +16,16 @@ repos:
|
||||
- id: check-toml
|
||||
- id: debug-statements
|
||||
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v2.34.0
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.8.1
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args: ['--py310-plus']
|
||||
|
||||
- repo: https://github.com/adityahase/black
|
||||
rev: 9cb0a69f4d0030cdf687eddf314468b39ed54119
|
||||
hooks:
|
||||
- id: black
|
||||
additional_dependencies: ['click==8.0.4']
|
||||
- id: ruff
|
||||
name: "Run ruff import sorter"
|
||||
args: ["--select=I", "--fix"]
|
||||
- id: ruff
|
||||
name: "Run ruff linter"
|
||||
- id: ruff-format
|
||||
name: "Run ruff formatter"
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||
rev: v2.7.1
|
||||
@@ -44,12 +43,22 @@ repos:
|
||||
lms/public/js/lib/.*
|
||||
)$
|
||||
|
||||
- repo: https://github.com/PyCQA/flake8
|
||||
rev: 5.0.4
|
||||
- repo: https://github.com/pre-commit/mirrors-eslint
|
||||
rev: v8.44.0
|
||||
hooks:
|
||||
- id: flake8
|
||||
additional_dependencies: ['flake8-bugbear',]
|
||||
args: ['--config', '.github/helper/flake8.conf']
|
||||
- id: eslint
|
||||
types_or: [javascript]
|
||||
args: ['--quiet']
|
||||
exclude: |
|
||||
(?x)^(
|
||||
lms/public/dist/.*|
|
||||
cypress/.*|
|
||||
.*node_modules.*|
|
||||
.*boilerplate.*|
|
||||
lms/www/website_script.js|
|
||||
lms/templates/includes/.*|
|
||||
lms/public/js/lib/.*
|
||||
)$
|
||||
|
||||
ci:
|
||||
autoupdate_schedule: weekly
|
||||
|
||||
174
README.md
@@ -1,174 +0,0 @@
|
||||
<div align="center" markdown="1">
|
||||
|
||||
<img src=".github/lms-logo.png" alt="Frappe Learning logo" width="80" height="80"/>
|
||||
<h1>Frappe Learning</h1>
|
||||
|
||||
**Easy to use, open source, Learning Management System**
|
||||
|
||||

|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div align="center">
|
||||
<img src=".github/hero.png?v=5" alt="Hero Image" width="72%" />
|
||||
</div>
|
||||
<br />
|
||||
<div align="center">
|
||||
<a href="https://frappe.io/learning">Website</a>
|
||||
-
|
||||
<a href="https://docs.frappe.io/learning">Documentation</a>
|
||||
</div>
|
||||
|
||||
## Frappe Learning
|
||||
Frappe Learning is an easy-to-use learning system that helps you bring structure to your content.
|
||||
|
||||
### Motivation
|
||||
In 2021, we were looking for a Learning Management System to launch [Mon.School](https://mon.school) for FOSS United. We checked out Moodle, but it didn’t feel right. The forms were unnecessarily lengthy and the UI was confusing. It shouldn't be this hard to create a course right? So I started making a learning system for Mon.School which soon became a product in itself. The aim is to have a simple platform that anyone can use to launch a course of their own and make knowledge sharing easier.
|
||||
|
||||
### Key Features
|
||||
|
||||
- **Structured Learning**: Design a course with a 3-level hierarchy, where your courses have chapters and you can group your lessons within these chapters. This ensures that the context of the lesson is set by the chapter.
|
||||
|
||||
- **Live Classes**: Group learners into batches based on courses and duration. You can then create Zoom live class for these batches right from the app. Learners get to see the list of live classes they have to take as a part of this batch.
|
||||
|
||||
- **Quizzes and Assignments**: Create quizzes where questions can have single-choice, multiple-choice options, or can be open ended. Instructors can also add assignments which learners can submit as PDF's or Documents.
|
||||
|
||||
- **Getting Certified**: Once a learner has completed the course or batch, you can grant them a certificate. The app provides an inbuilt certificate template. You can use this or else create a template of your own and use that instead.
|
||||
|
||||
<details>
|
||||
<summary>View Screenshots</summary>
|
||||
|
||||
|
||||

|
||||
<div align="center">
|
||||
<sub>
|
||||
Create batches to group your learners
|
||||
</sub>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||

|
||||
<div align="center">
|
||||
<sub>
|
||||
Evaluate their knowledge by quizzes
|
||||
</sub>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||

|
||||
<div align="center">
|
||||
<sub>
|
||||
Autenticate their work with certification
|
||||
</sub>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
|
||||
### Under the Hood
|
||||
|
||||
- [**Frappe Framework**](https://github.com/frappe/frappe): A full-stack web application framework.
|
||||
|
||||
- [**Frappe UI**](https://github.com/frappe/frappe-ui): A Vue-based UI library, to provide a modern user interface.
|
||||
|
||||
## Production Setup
|
||||
|
||||
### Managed Hosting
|
||||
|
||||
You can try [Frappe Cloud](https://frappecloud.com), a simple, user-friendly and sophisticated [open-source](https://github.com/frappe/press) platform to host Frappe applications with peace of mind.
|
||||
|
||||
It takes care of installation, setup, upgrades, monitoring, maintenance and support of your Frappe deployments. It is a fully featured developer platform with an ability to manage and control multiple Frappe deployments.
|
||||
|
||||
<div>
|
||||
<a href="https://frappecloud.com/lms/signup" target="_blank">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://frappe.io/files/try-on-fc-white.png">
|
||||
<img src="https://frappe.io/files/try-on-fc-black.png" alt="Try on Frappe Cloud" height="28" />
|
||||
</picture>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
### Self Hosting
|
||||
|
||||
Follow these steps to set up Frappe Learning in production:
|
||||
|
||||
**Step 1**: Download the easy install script
|
||||
|
||||
```bash
|
||||
wget https://frappe.io/easy-install.py
|
||||
```
|
||||
|
||||
**Step 2**: Run the deployment command
|
||||
|
||||
```bash
|
||||
python3 ./easy-install.py deploy \
|
||||
--project=learning_prod_setup \
|
||||
--email=your_email.example.com \
|
||||
--image=ghcr.io/frappe/lms \
|
||||
--version=stable \
|
||||
--app=lms \
|
||||
--sitename subdomain.domain.tld
|
||||
```
|
||||
|
||||
Replace the following parameters with your values:
|
||||
- `your_email.example.com`: Your email address
|
||||
- `subdomain.domain.tld`: Your domain name where Learning will be hosted
|
||||
|
||||
The script will set up a production-ready instance of Frappe Learning with all the necessary configurations in about 5 minutes.
|
||||
|
||||
## Development Setup
|
||||
|
||||
### Docker
|
||||
|
||||
You need Docker, docker-compose and git setup on your machine. Refer [Docker documentation](https://docs.docker.com/). After that, follow below steps:
|
||||
|
||||
**Step 1**: Setup folder and download the required files
|
||||
|
||||
mkdir frappe-learning
|
||||
cd frappe-learning
|
||||
|
||||
# Download the docker-compose file
|
||||
wget -O docker-compose.yml https://raw.githubusercontent.com/frappe/lms/develop/docker/docker-compose.yml
|
||||
|
||||
# Download the setup script
|
||||
wget -O init.sh https://raw.githubusercontent.com/frappe/lms/develop/docker/init.sh
|
||||
|
||||
**Step 2**: Run the container and daemonize it
|
||||
|
||||
docker compose up -d
|
||||
|
||||
**Step 3**: The site [http://lms.localhost:8000/lms](http://lms.localhost:8000/lms) should now be available. The default credentials are:
|
||||
- Username: Administrator
|
||||
- Password: admin
|
||||
|
||||
### Local
|
||||
|
||||
To setup the repository locally follow the steps mentioned below:
|
||||
|
||||
1. Install bench and setup a `frappe-bench` directory by following the [Installation Steps](https://frappeframework.com/docs/user/en/installation)
|
||||
1. Start the server by running `bench start`
|
||||
1. In a separate terminal window, create a new site by running `bench new-site learning.test`
|
||||
1. Map your site to localhost with the command `bench --site learning.test add-to-hosts`
|
||||
1. Get the Learning app. Run `bench get-app https://github.com/frappe/lms`
|
||||
1. Run `bench --site learning.test install-app lms`.
|
||||
1. Now open the URL `http://learning.test:8000/lms` in your browser, you should see the app running
|
||||
|
||||
## Learn and connect
|
||||
|
||||
- [Telegram Public Group](https://t.me/frappelms)
|
||||
- [Discuss Forum](https://discuss.frappe.io/c/lms/70)
|
||||
- [Documentation](https://docs.frappe.io/learning)
|
||||
- [YouTube](https://www.youtube.com/channel/UCn3bV5kx77HsVwtnlCeEi_A)
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<div align="center" style="padding-top: 0.75rem;">
|
||||
<a href="https://frappe.io" target="_blank">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://frappe.io/files/Frappe-white.png">
|
||||
<img src="https://frappe.io/files/Frappe-black.png" alt="Frappe Technologies" height="28"/>
|
||||
</picture>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
168
cypress/e2e/batch_creation.cy.js
Normal file
@@ -0,0 +1,168 @@
|
||||
describe("Batch Creation", () => {
|
||||
it("creates a new batch", () => {
|
||||
cy.login();
|
||||
cy.wait(500);
|
||||
cy.visit("/lms/batches");
|
||||
cy.closeOnboardingModal();
|
||||
|
||||
// Open Settings
|
||||
cy.get("span").contains("Learning").click();
|
||||
cy.get("span").contains("Settings").click();
|
||||
|
||||
// Add a new member
|
||||
cy.get("[data-dismissable-layer]")
|
||||
.find("span")
|
||||
.contains(/^Members$/)
|
||||
.click();
|
||||
cy.get("[data-dismissable-layer]")
|
||||
.find("button")
|
||||
.contains("New")
|
||||
.click();
|
||||
|
||||
const dateNow = Date.now();
|
||||
const randomEmail = `testuser_${dateNow}@example.com`;
|
||||
const randomName = `Test User ${dateNow}`;
|
||||
|
||||
cy.get("input[placeholder='jane@doe.com']").type(randomEmail);
|
||||
cy.get("input[placeholder='Jane']").type(randomName);
|
||||
cy.get("button").contains("Add").click();
|
||||
|
||||
// Add evaluator
|
||||
cy.get("[data-dismissable-layer]")
|
||||
.find("span")
|
||||
.contains(/^Evaluators$/)
|
||||
.click();
|
||||
|
||||
cy.get("[data-dismissable-layer]")
|
||||
.find("button")
|
||||
.contains("New")
|
||||
.click();
|
||||
const randomEvaluator = `evaluator${dateNow}@example.com`;
|
||||
|
||||
cy.get("input[placeholder='jane@doe.com']").type(randomEvaluator);
|
||||
cy.get("button").contains("Add").click();
|
||||
cy.get("div").contains(randomEvaluator).should("be.visible").click();
|
||||
|
||||
cy.visit("/lms/batches");
|
||||
cy.closeOnboardingModal();
|
||||
|
||||
// Create a batch
|
||||
cy.get("button").contains("Create").click();
|
||||
cy.wait(500);
|
||||
cy.url().should("include", "/batches/new/edit");
|
||||
cy.get("label").contains("Title").type("Test Batch");
|
||||
|
||||
cy.get("label").contains("Start Date").type("2030-10-01");
|
||||
cy.get("label").contains("End Date").type("2030-10-31");
|
||||
cy.get("label").contains("Start Time").type("10:00");
|
||||
cy.get("label").contains("End Time").type("11:00");
|
||||
cy.get("label").contains("Timezone").type("IST");
|
||||
cy.get("label").contains("Seat Count").type("10");
|
||||
cy.get("label").contains("Published").click();
|
||||
|
||||
cy.get("label")
|
||||
.contains("Short Description")
|
||||
.type("Test Batch Short Description to test the UI");
|
||||
cy.get("div[contenteditable=true").invoke(
|
||||
"text",
|
||||
"Test Batch Description. I need a very big description to test the UI. This is a very big description. It contains more than once sentence. Its meant to be this long as this is a UI test. Its unbearably long and I'm not sure why I'm typing this much. I'm just going to keep typing until I feel like its long enough. I think its long enough now. I'm going to stop typing now."
|
||||
);
|
||||
|
||||
/* Instructor */
|
||||
cy.get("label")
|
||||
.contains("Instructors")
|
||||
.parent()
|
||||
.within(() => {
|
||||
cy.get("input").click().type("evaluator");
|
||||
cy.get("input")
|
||||
.invoke("attr", "aria-controls")
|
||||
.as("instructor_list_id");
|
||||
});
|
||||
cy.get("@instructor_list_id").then((instructor_list_id) => {
|
||||
cy.get(`[id^=${instructor_list_id}`)
|
||||
.should("be.visible")
|
||||
.within(() => {
|
||||
cy.get("[id^=headlessui-combobox-option-").first().click();
|
||||
});
|
||||
});
|
||||
|
||||
cy.button("Save").click();
|
||||
cy.wait(1000);
|
||||
let batchName;
|
||||
cy.url().then((url) => {
|
||||
console.log(url);
|
||||
batchName = url.split("/").pop();
|
||||
cy.wrap(batchName).as("batchName");
|
||||
});
|
||||
cy.wait(500);
|
||||
|
||||
// View Batch
|
||||
cy.wait(1000);
|
||||
cy.visit("/lms/batches");
|
||||
cy.closeOnboardingModal();
|
||||
|
||||
cy.url().should("include", "/lms/batches");
|
||||
|
||||
cy.get('[id^="headlessui-radiogroup-v-"]')
|
||||
.find("span")
|
||||
.contains("Upcoming")
|
||||
.should("be.visible")
|
||||
.click();
|
||||
|
||||
cy.get("@batchName").then((batchName) => {
|
||||
cy.get(`a[href='/lms/batches/details/${batchName}'`).within(() => {
|
||||
cy.get("div").contains("Test Batch").should("be.visible");
|
||||
cy.get("div")
|
||||
.contains("Test Batch Short Description to test the UI")
|
||||
.should("be.visible");
|
||||
cy.get("span")
|
||||
.contains("01 Oct 2030 - 31 Oct 2030")
|
||||
.should("be.visible");
|
||||
cy.get("span")
|
||||
.contains("10:00 AM - 11:00 AM")
|
||||
.should("be.visible");
|
||||
cy.get("span").contains("IST").should("be.visible");
|
||||
cy.get("a").contains("Evaluator").should("be.visible");
|
||||
cy.get("div")
|
||||
.contains("10")
|
||||
.should("be.visible")
|
||||
.get("span")
|
||||
.contains("Seats Left")
|
||||
.should("be.visible");
|
||||
});
|
||||
cy.get(`a[href='/lms/batches/details/${batchName}'`).click();
|
||||
});
|
||||
|
||||
cy.get("div").contains("Test Batch").should("be.visible");
|
||||
cy.get("div")
|
||||
.contains("Test Batch Short Description to test the UI")
|
||||
.should("be.visible");
|
||||
cy.get("a").contains("Evaluator").should("be.visible");
|
||||
cy.get("span:visible")
|
||||
.contains("01 Oct 2030 - 31 Oct 2030")
|
||||
.should("be.visible");
|
||||
cy.get("span:visible")
|
||||
.contains("10:00 AM - 11:00 AM")
|
||||
.should("be.visible");
|
||||
cy.get("span:visible").contains("IST").should("be.visible");
|
||||
cy.contains("div:visible", "10 Seats Left").should("be.visible");
|
||||
|
||||
cy.get("p")
|
||||
.contains(
|
||||
"Test Batch Description. I need a very big description to test the UI. This is a very big description. It contains more than once sentence. Its meant to be this long as this is a UI test. Its unbearably long and I'm not sure why I'm typing this much. I'm just going to keep typing until I feel like its long enough. I think its long enough now. I'm going to stop typing now."
|
||||
)
|
||||
.should("be.visible");
|
||||
cy.get("button:visible").contains("Manage Batch").click();
|
||||
|
||||
/* Add student to batch */
|
||||
cy.get("button").contains("Add").click();
|
||||
cy.get('div[role="dialog"]').first().find("button").eq(1).click();
|
||||
cy.get("input[id^='headlessui-combobox-input-v-']").type(randomEmail);
|
||||
cy.get("div").contains(randomEmail).click();
|
||||
cy.get("button").contains("Submit").click();
|
||||
|
||||
// Verify Seat Count
|
||||
cy.get("span").contains("Details").click();
|
||||
cy.contains("div:visible", "9 Seats Left").should("be.visible");
|
||||
});
|
||||
});
|
||||
@@ -8,7 +8,7 @@ describe("Course Creation", () => {
|
||||
cy.closeOnboardingModal();
|
||||
|
||||
// Create a course
|
||||
cy.get("button").contains("New").click();
|
||||
cy.get("button").contains("Create").click();
|
||||
cy.wait(500);
|
||||
cy.url().should("include", "/courses/new/edit");
|
||||
|
||||
@@ -76,7 +76,7 @@ describe("Course Creation", () => {
|
||||
cy.button("Add Chapter").click();
|
||||
|
||||
cy.wait(1000);
|
||||
cy.get("[id^=headlessui-dialog-panel-")
|
||||
cy.get("[data-dismissable-layer]")
|
||||
.should("be.visible")
|
||||
.within(() => {
|
||||
cy.get("label").contains("Title").type("Test Chapter");
|
||||
@@ -98,7 +98,7 @@ describe("Course Creation", () => {
|
||||
|
||||
// View Course
|
||||
cy.wait(1000);
|
||||
cy.visit("/lms");
|
||||
cy.visit("/lms/courses");
|
||||
cy.closeOnboardingModal();
|
||||
|
||||
cy.url().should("include", "/lms/courses");
|
||||
@@ -107,7 +107,7 @@ describe("Course Creation", () => {
|
||||
cy.get("div").contains(
|
||||
"Test Course Short Introduction to test the UI"
|
||||
);
|
||||
cy.get(".course-image")
|
||||
cy.get(".bg-cover")
|
||||
.invoke("css", "background-image")
|
||||
.should("include", "/files/profile");
|
||||
});
|
||||
@@ -140,9 +140,10 @@ describe("Course Creation", () => {
|
||||
);
|
||||
|
||||
// Add Discussion
|
||||
cy.get("span").contains("Community").click();
|
||||
cy.button("New Question").click();
|
||||
cy.wait(500);
|
||||
cy.get("[id^=headlessui-dialog-panel-").within(() => {
|
||||
cy.get("[data-dismissable-layer]").within(() => {
|
||||
cy.get("label").contains("Title").type("Test Discussion");
|
||||
cy.get("div[contenteditable=true]").invoke(
|
||||
"text",
|
||||
|
||||
@@ -72,8 +72,15 @@ Cypress.Commands.add("paste", { prevSubject: true }, (subject, text) => {
|
||||
|
||||
Cypress.Commands.add("closeOnboardingModal", () => {
|
||||
cy.wait(500);
|
||||
cy.get('[class*="z-50"]')
|
||||
.find('button:has(svg[class*="feather-x"])')
|
||||
.realClick();
|
||||
cy.wait(1000);
|
||||
cy.get("body").then(($body) => {
|
||||
// Check if any element with class including 'z-50' exists
|
||||
if ($body.find('[class*="z-50"]').length > 0) {
|
||||
cy.get('[class*="z-50"]')
|
||||
.find('button:has(svg[class*="feather-x"])')
|
||||
.realClick();
|
||||
cy.wait(1000);
|
||||
} else {
|
||||
cy.log("Onboarding modal not found, skipping close.");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
1
frappe-ui
Submodule
1
frontend/.gitignore
vendored
@@ -2,4 +2,5 @@ node_modules
|
||||
.DS_Store
|
||||
dist
|
||||
dist-ssr
|
||||
dev-dist
|
||||
*.local
|
||||
10
frontend/auto-imports.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
// Generated by unplugin-auto-import
|
||||
// biome-ignore lint: disable
|
||||
export {}
|
||||
declare global {
|
||||
|
||||
}
|
||||
40
frontend/components.d.ts
vendored
@@ -19,6 +19,10 @@ declare module 'vue' {
|
||||
AssignmentForm: typeof import('./src/components/Modals/AssignmentForm.vue')['default']
|
||||
AudioBlock: typeof import('./src/components/AudioBlock.vue')['default']
|
||||
Autocomplete: typeof import('./src/components/Controls/Autocomplete.vue')['default']
|
||||
BadgeAssignmentForm: typeof import('./src/components/Settings/BadgeAssignmentForm.vue')['default']
|
||||
BadgeAssignments: typeof import('./src/components/Settings/BadgeAssignments.vue')['default']
|
||||
BadgeForm: typeof import('./src/components/Settings/BadgeForm.vue')['default']
|
||||
Badges: typeof import('./src/components/Settings/Badges.vue')['default']
|
||||
BatchCard: typeof import('./src/components/BatchCard.vue')['default']
|
||||
BatchCourseModal: typeof import('./src/components/Modals/BatchCourseModal.vue')['default']
|
||||
BatchCourses: typeof import('./src/components/BatchCourses.vue')['default']
|
||||
@@ -27,17 +31,22 @@ declare module 'vue' {
|
||||
BatchOverlay: typeof import('./src/components/BatchOverlay.vue')['default']
|
||||
BatchStudentProgress: typeof import('./src/components/Modals/BatchStudentProgress.vue')['default']
|
||||
BatchStudents: typeof import('./src/components/BatchStudents.vue')['default']
|
||||
BrandSettings: typeof import('./src/components/BrandSettings.vue')['default']
|
||||
BrandSettings: typeof import('./src/components/Settings/BrandSettings.vue')['default']
|
||||
BulkCertificates: typeof import('./src/components/Modals/BulkCertificates.vue')['default']
|
||||
Categories: typeof import('./src/components/Categories.vue')['default']
|
||||
Categories: typeof import('./src/components/Settings/Categories.vue')['default']
|
||||
CertificationLinks: typeof import('./src/components/CertificationLinks.vue')['default']
|
||||
ChapterModal: typeof import('./src/components/Modals/ChapterModal.vue')['default']
|
||||
ChildTable: typeof import('./src/components/Controls/ChildTable.vue')['default']
|
||||
Code: typeof import('./src/components/Controls/Code.vue')['default']
|
||||
CodeEditor: typeof import('./src/components/Controls/CodeEditor.vue')['default']
|
||||
CollapseSidebar: typeof import('./src/components/Icons/CollapseSidebar.vue')['default']
|
||||
ColorSwatches: typeof import('./src/components/Controls/ColorSwatches.vue')['default']
|
||||
ContactUsEmail: typeof import('./src/components/ContactUsEmail.vue')['default']
|
||||
CourseCard: typeof import('./src/components/CourseCard.vue')['default']
|
||||
CourseCardOverlay: typeof import('./src/components/CourseCardOverlay.vue')['default']
|
||||
CourseInstructors: typeof import('./src/components/CourseInstructors.vue')['default']
|
||||
CourseOutline: typeof import('./src/components/CourseOutline.vue')['default']
|
||||
CourseProgressSummary: typeof import('./src/components/Modals/CourseProgressSummary.vue')['default']
|
||||
CourseReviews: typeof import('./src/components/CourseReviews.vue')['default']
|
||||
CreateOutline: typeof import('./src/components/CreateOutline.vue')['default']
|
||||
DateRange: typeof import('./src/components/Common/DateRange.vue')['default']
|
||||
@@ -48,16 +57,18 @@ declare module 'vue' {
|
||||
EditCoverImage: typeof import('./src/components/Modals/EditCoverImage.vue')['default']
|
||||
EditProfile: typeof import('./src/components/Modals/EditProfile.vue')['default']
|
||||
EmailTemplateModal: typeof import('./src/components/Modals/EmailTemplateModal.vue')['default']
|
||||
EmailTemplates: typeof import('./src/components/EmailTemplates.vue')['default']
|
||||
EmailTemplates: typeof import('./src/components/Settings/EmailTemplates.vue')['default']
|
||||
EmptyState: typeof import('./src/components/EmptyState.vue')['default']
|
||||
EvaluationModal: typeof import('./src/components/Modals/EvaluationModal.vue')['default']
|
||||
Evaluators: typeof import('./src/components/Evaluators.vue')['default']
|
||||
Evaluators: typeof import('./src/components/Settings/Evaluators.vue')['default']
|
||||
Event: typeof import('./src/components/Modals/Event.vue')['default']
|
||||
ExplanationVideos: typeof import('./src/components/Modals/ExplanationVideos.vue')['default']
|
||||
FeedbackModal: typeof import('./src/components/Modals/FeedbackModal.vue')['default']
|
||||
FrappeCloudIcon: typeof import('./src/components/Icons/FrappeCloudIcon.vue')['default']
|
||||
IconPicker: typeof import('./src/components/Controls/IconPicker.vue')['default']
|
||||
IndicatorIcon: typeof import('./src/components/Icons/IndicatorIcon.vue')['default']
|
||||
InlineLessonMenu: typeof import('./src/components/Notes/InlineLessonMenu.vue')['default']
|
||||
InstallPrompt: typeof import('./src/components/InstallPrompt.vue')['default']
|
||||
InviteIcon: typeof import('./src/components/Icons/InviteIcon.vue')['default']
|
||||
JobApplicationModal: typeof import('./src/components/Modals/JobApplicationModal.vue')['default']
|
||||
JobCard: typeof import('./src/components/JobCard.vue')['default']
|
||||
@@ -65,37 +76,48 @@ declare module 'vue' {
|
||||
LessonHelp: typeof import('./src/components/LessonHelp.vue')['default']
|
||||
Link: typeof import('./src/components/Controls/Link.vue')['default']
|
||||
LiveClass: typeof import('./src/components/LiveClass.vue')['default']
|
||||
LiveClassAttendance: typeof import('./src/components/Modals/LiveClassAttendance.vue')['default']
|
||||
LiveClassModal: typeof import('./src/components/Modals/LiveClassModal.vue')['default']
|
||||
LMSLogo: typeof import('./src/components/Icons/LMSLogo.vue')['default']
|
||||
Members: typeof import('./src/components/Members.vue')['default']
|
||||
Members: typeof import('./src/components/Settings/Members.vue')['default']
|
||||
MobileLayout: typeof import('./src/components/MobileLayout.vue')['default']
|
||||
MultiSelect: typeof import('./src/components/Controls/MultiSelect.vue')['default']
|
||||
NoPermission: typeof import('./src/components/NoPermission.vue')['default']
|
||||
NoSidebarLayout: typeof import('./src/components/NoSidebarLayout.vue')['default']
|
||||
Notes: typeof import('./src/components/Notes/Notes.vue')['default']
|
||||
NotPermitted: typeof import('./src/components/NotPermitted.vue')['default']
|
||||
PageModal: typeof import('./src/components/Modals/PageModal.vue')['default']
|
||||
PaymentSettings: typeof import('./src/components/PaymentSettings.vue')['default']
|
||||
PaymentGatewayDetails: typeof import('./src/components/Settings/PaymentGatewayDetails.vue')['default']
|
||||
PaymentGateways: typeof import('./src/components/Settings/PaymentGateways.vue')['default']
|
||||
Play: typeof import('./src/components/Icons/Play.vue')['default']
|
||||
ProgressBar: typeof import('./src/components/ProgressBar.vue')['default']
|
||||
Question: typeof import('./src/components/Modals/Question.vue')['default']
|
||||
Quiz: typeof import('./src/components/Quiz.vue')['default']
|
||||
QuizBlock: typeof import('./src/components/QuizBlock.vue')['default']
|
||||
QuizInVideo: typeof import('./src/components/Modals/QuizInVideo.vue')['default']
|
||||
Rating: typeof import('./src/components/Controls/Rating.vue')['default']
|
||||
RelatedCourses: typeof import('./src/components/RelatedCourses.vue')['default']
|
||||
ReviewModal: typeof import('./src/components/Modals/ReviewModal.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
SettingDetails: typeof import('./src/components/SettingDetails.vue')['default']
|
||||
SettingFields: typeof import('./src/components/SettingFields.vue')['default']
|
||||
Settings: typeof import('./src/components/Modals/Settings.vue')['default']
|
||||
SettingDetails: typeof import('./src/components/Settings/SettingDetails.vue')['default']
|
||||
SettingFields: typeof import('./src/components/Settings/SettingFields.vue')['default']
|
||||
Settings: typeof import('./src/components/Settings/Settings.vue')['default']
|
||||
SidebarLink: typeof import('./src/components/SidebarLink.vue')['default']
|
||||
StudentHeatmap: typeof import('./src/components/StudentHeatmap.vue')['default']
|
||||
StudentModal: typeof import('./src/components/Modals/StudentModal.vue')['default']
|
||||
Tags: typeof import('./src/components/Tags.vue')['default']
|
||||
TransactionDetails: typeof import('./src/components/Settings/TransactionDetails.vue')['default']
|
||||
Transactions: typeof import('./src/components/Settings/Transactions.vue')['default']
|
||||
UnsplashImageBrowser: typeof import('./src/components/UnsplashImageBrowser.vue')['default']
|
||||
UpcomingEvaluations: typeof import('./src/components/UpcomingEvaluations.vue')['default']
|
||||
Uploader: typeof import('./src/components/Controls/Uploader.vue')['default']
|
||||
UploadPlugin: typeof import('./src/components/UploadPlugin.vue')['default']
|
||||
UserAvatar: typeof import('./src/components/UserAvatar.vue')['default']
|
||||
UserDropdown: typeof import('./src/components/UserDropdown.vue')['default']
|
||||
VideoBlock: typeof import('./src/components/VideoBlock.vue')['default']
|
||||
VideoStatistics: typeof import('./src/components/Modals/VideoStatistics.vue')['default']
|
||||
ZoomAccountModal: typeof import('./src/components/Modals/ZoomAccountModal.vue')['default']
|
||||
ZoomSettings: typeof import('./src/components/Settings/ZoomSettings.vue')['default']
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,203 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" href="{{ favicon }}" />
|
||||
<link rel="manifest" href="/api/method/lms.lms.api.get_pwa_manifest" />
|
||||
<link rel="apple-touch-icon" href="public/manifest/apple-icon-180.png" />
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<meta name="theme-color" content="#FFFFFF" media="(prefers-color-scheme: light)" />
|
||||
<meta name="theme-color" content="#0F0F0F" media="(prefers-color-scheme: dark)" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
||||
<meta name="msapplication-navbutton-color" content="#ffffff" />
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-2048-2732.jpg"
|
||||
media="(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-2732-2048.jpg"
|
||||
media="(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-1668-2388.jpg"
|
||||
media="(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-2388-1668.jpg"
|
||||
media="(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-1536-2048.jpg"
|
||||
media="(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-2048-1536.jpg"
|
||||
media="(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-1640-2360.jpg"
|
||||
media="(device-width: 820px) and (device-height: 1180px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-2360-1640.jpg"
|
||||
media="(device-width: 820px) and (device-height: 1180px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-1668-2224.jpg"
|
||||
media="(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-2224-1668.jpg"
|
||||
media="(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-1620-2160.jpg"
|
||||
media="(device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-2160-1620.jpg"
|
||||
media="(device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-1488-2266.jpg"
|
||||
media="(device-width: 744px) and (device-height: 1133px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-2266-1488.jpg"
|
||||
media="(device-width: 744px) and (device-height: 1133px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-1320-2868.jpg"
|
||||
media="(device-width: 440px) and (device-height: 956px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-2868-1320.jpg"
|
||||
media="(device-width: 440px) and (device-height: 956px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-1206-2622.jpg"
|
||||
media="(device-width: 402px) and (device-height: 874px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-2622-1206.jpg"
|
||||
media="(device-width: 402px) and (device-height: 874px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-1290-2796.jpg"
|
||||
media="(device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-2796-1290.jpg"
|
||||
media="(device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-1179-2556.jpg"
|
||||
media="(device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-2556-1179.jpg"
|
||||
media="(device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-1170-2532.jpg"
|
||||
media="(device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-2532-1170.jpg"
|
||||
media="(device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-1284-2778.jpg"
|
||||
media="(device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-2778-1284.jpg"
|
||||
media="(device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-1125-2436.jpg"
|
||||
media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-2436-1125.jpg"
|
||||
media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-1242-2688.jpg"
|
||||
media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-2688-1242.jpg"
|
||||
media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-828-1792.jpg"
|
||||
media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-1792-828.jpg"
|
||||
media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-1242-2208.jpg"
|
||||
media="(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-2208-1242.jpg"
|
||||
media="(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-750-1334.jpg"
|
||||
media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-1334-750.jpg"
|
||||
media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-640-1136.jpg"
|
||||
media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="public/manifest/apple-splash-1136-640.jpg"
|
||||
media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
|
||||
/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>{{ title }}</title>
|
||||
<meta name="title" content="{{ meta.title }}" />
|
||||
@@ -16,7 +213,7 @@
|
||||
<meta name="twitter:image" content="{{ meta.image }}" />
|
||||
<meta name="twitter:description" content="{{ meta.description }}" />
|
||||
</head>
|
||||
<body>
|
||||
<body class="sm:overscroll-y-none no-scrollbar">
|
||||
<div id="app">
|
||||
<div id="seo-content">
|
||||
<h1>{{ meta.title }}</h1>
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
"copy-html-entry": "cp ../lms/public/frontend/index.html ../lms/www/lms.html"
|
||||
},
|
||||
"dependencies": {
|
||||
"@codemirror/lang-html": "^6.4.9",
|
||||
"@codemirror/lang-javascript": "^6.2.4",
|
||||
"@codemirror/lang-json": "^6.0.1",
|
||||
"@codemirror/lang-python": "^6.2.1",
|
||||
"@editorjs/checklist": "^1.6.0",
|
||||
"@editorjs/code": "^2.9.0",
|
||||
"@editorjs/editorjs": "^2.29.0",
|
||||
@@ -24,10 +28,11 @@
|
||||
"ace-builds": "^1.36.2",
|
||||
"apexcharts": "^4.3.0",
|
||||
"chart.js": "^4.4.1",
|
||||
"codemirror-editor-vue3": "^2.8.0",
|
||||
"codemirror": "^6.0.1",
|
||||
"dayjs": "^1.11.6",
|
||||
"dompurify": "^3.2.6",
|
||||
"feather-icons": "^4.28.0",
|
||||
"frappe-ui": "^0.1.147",
|
||||
"frappe-ui": "^0.1.201",
|
||||
"highlight.js": "^11.11.1",
|
||||
"lucide-vue-next": "^0.383.0",
|
||||
"markdown-it": "^14.0.0",
|
||||
@@ -35,9 +40,11 @@
|
||||
"plyr": "^3.7.8",
|
||||
"socket.io-client": "^4.7.2",
|
||||
"tailwindcss": "3.4.15",
|
||||
"thememirror": "^2.0.1",
|
||||
"typescript": "^5.7.2",
|
||||
"vue": "^3.4.23",
|
||||
"vue-chartjs": "^5.3.0",
|
||||
"vue-codemirror": "^6.1.1",
|
||||
"vue-draggable-next": "^2.2.1",
|
||||
"vue-router": "^4.0.12",
|
||||
"vue3-apexcharts": "^1.8.0",
|
||||
@@ -47,6 +54,7 @@
|
||||
"@vitejs/plugin-vue": "^5.0.3",
|
||||
"autoprefixer": "^10.4.2",
|
||||
"postcss": "^8.4.5",
|
||||
"vite": "^5.0.11"
|
||||
"vite": "^5.0.11",
|
||||
"vite-plugin-pwa": "^1.0.2"
|
||||
}
|
||||
}
|
||||
|
||||
BIN
frontend/public/Remove.mp4
Normal file
BIN
frontend/public/leaderboard/bronze-cup.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
42
frontend/public/leaderboard/dart-board.svg
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
viewBox="0 0 512.001 512.001" xml:space="preserve">
|
||||
<g>
|
||||
<path style="fill:#A67C52;" d="M84.096,436.178l-49.312,37.686c-7.54,5.762-8.981,16.547-3.219,24.087
|
||||
c3.383,4.425,8.494,6.751,13.666,6.751c3.638,0,7.306-1.151,10.421-3.532l49.312-37.686c7.54-5.762,8.981-16.547,3.219-24.087
|
||||
C102.421,431.858,91.637,430.416,84.096,436.178z"/>
|
||||
<path style="fill:#A67C52;" d="M441.194,473.864l-49.312-37.686c-7.541-5.762-18.325-4.32-24.087,3.219
|
||||
c-5.762,7.541-4.321,18.325,3.219,24.087l49.312,37.686c3.115,2.38,6.782,3.532,10.421,3.532c5.171,0,10.284-2.326,13.665-6.751
|
||||
C450.175,490.411,448.734,479.627,441.194,473.864z"/>
|
||||
</g>
|
||||
<path style="fill:#DBAD75;" d="M237.989,36.024c-131.227,0-237.989,106.761-237.989,237.989s106.761,237.989,237.989,237.989
|
||||
S475.978,405.24,475.978,274.012S369.216,36.024,237.989,36.024z"/>
|
||||
<path style="fill:#EABD81;" d="M237.989,36.024c-131.227,0-237.989,106.761-237.989,237.989s106.761,237.989,237.989,237.989V36.024
|
||||
z"/>
|
||||
<path style="fill:#BC2A46;" d="M237.989,80.411c-106.752,0-193.601,86.849-193.601,193.601s86.849,193.601,193.601,193.601
|
||||
s193.601-86.849,193.601-193.601S344.742,80.411,237.989,80.411z"/>
|
||||
<path style="fill:#D62D46;" d="M237.989,80.411c-106.752,0-193.601,86.849-193.601,193.601s86.849,193.601,193.601,193.601V80.411z"
|
||||
/>
|
||||
<path style="fill:#DBAD75;" d="M237.989,142.771c-72.367,0-131.241,58.874-131.241,131.241s58.874,131.241,131.241,131.241
|
||||
S369.23,346.379,369.23,274.012S310.355,142.771,237.989,142.771z"/>
|
||||
<path style="fill:#EABD81;" d="M237.989,142.771c-72.367,0-131.241,58.874-131.241,131.241s58.874,131.241,131.241,131.241V142.771z
|
||||
"/>
|
||||
<path style="fill:#BC2A46;" d="M237.989,209.763c-35.427,0-64.248,28.821-64.248,64.248s28.821,64.248,64.248,64.248
|
||||
s64.248-28.821,64.248-64.248S273.416,209.763,237.989,209.763z"/>
|
||||
<path style="fill:#D62D46;" d="M237.989,209.763c-35.427,0-64.248,28.821-64.248,64.248s28.821,64.248,64.248,64.248V209.763z"/>
|
||||
<path style="fill:#CFCDD6;" d="M237.989,291.196c-4.398,0-8.796-1.677-12.15-5.034c-6.711-6.711-6.711-17.59,0-24.301
|
||||
L448.687,39.014c6.71-6.711,17.59-6.711,24.301,0s6.711,17.59,0,24.301L250.14,286.162
|
||||
C246.784,289.519,242.386,291.196,237.989,291.196z"/>
|
||||
<path style="fill:#DEE1E7;" d="M237.989,291.196c-4.398,0-8.796-1.677-12.15-5.034c-6.711-6.711-6.711-17.59,0-24.301
|
||||
l106.576-106.576l24.301,24.301L250.14,286.162C246.784,289.519,242.386,291.196,237.989,291.196z"/>
|
||||
<path style="fill:#39B7B6;" d="M457.533,105.266h-33.615c-9.49,0-17.184-7.694-17.184-17.184V54.467
|
||||
c0-9.49,7.694-17.184,17.184-17.184s17.184,7.694,17.184,17.184v16.432h16.431c9.49,0,17.184,7.694,17.184,17.184
|
||||
S467.023,105.266,457.533,105.266z"/>
|
||||
<path style="fill:#FBB03B;" d="M476.175,86.623h-33.614c-9.49,0-17.184-7.694-17.184-17.184V35.825
|
||||
c0-9.49,7.694-17.184,17.184-17.184s17.184,7.694,17.184,17.184v16.431h16.431c9.49,0,17.184,7.694,17.184,17.184
|
||||
S485.665,86.623,476.175,86.623z"/>
|
||||
<path style="fill:#39B7B6;" d="M494.817,67.982h-33.614c-9.49,0-17.184-7.694-17.184-17.184V17.184
|
||||
c0-9.49,7.694-17.184,17.184-17.184s17.184,7.694,17.184,17.184v16.431h16.431c9.49,0,17.184,7.694,17.184,17.184
|
||||
S504.308,67.982,494.817,67.982z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.3 KiB |
BIN
frontend/public/leaderboard/gold-cup.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
frontend/public/leaderboard/silver-cup.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
2
frontend/public/leaderboard/star.svg
Normal file
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--noto" preserveAspectRatio="xMidYMid meet"><path d="M68.05 7.23l13.46 30.7a7.047 7.047 0 0 0 5.82 4.19l32.79 2.94c3.71.54 5.19 5.09 2.5 7.71l-24.7 20.75c-2 1.68-2.91 4.32-2.36 6.87l7.18 33.61c.63 3.69-3.24 6.51-6.56 4.76L67.56 102a7.033 7.033 0 0 0-7.12 0l-28.62 16.75c-3.31 1.74-7.19-1.07-6.56-4.76l7.18-33.61c.54-2.55-.36-5.19-2.36-6.87L5.37 52.78c-2.68-2.61-1.2-7.17 2.5-7.71l32.79-2.94a7.047 7.047 0 0 0 5.82-4.19l13.46-30.7c1.67-3.36 6.45-3.36 8.11-.01z" fill="#fdd835"></path><path d="M67.07 39.77l-2.28-22.62c-.09-1.26-.35-3.42 1.67-3.42c1.6 0 2.47 3.33 2.47 3.33l6.84 18.16c2.58 6.91 1.52 9.28-.97 10.68c-2.86 1.6-7.08.35-7.73-6.13z" fill="#ffff8d"></path><path d="M95.28 71.51L114.9 56.2c.97-.81 2.72-2.1 1.32-3.57c-1.11-1.16-4.11.51-4.11.51l-17.17 6.71c-5.12 1.77-8.52 4.39-8.82 7.69c-.39 4.4 3.56 7.79 9.16 3.97z" fill="#f4b400"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
BIN
frontend/public/manifest/apple-icon-180.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
frontend/public/manifest/apple-splash-1125-2436.jpg
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
frontend/public/manifest/apple-splash-1136-640.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
frontend/public/manifest/apple-splash-1170-2532.jpg
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
frontend/public/manifest/apple-splash-1179-2556.jpg
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
frontend/public/manifest/apple-splash-1206-2622.jpg
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
frontend/public/manifest/apple-splash-1242-2208.jpg
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
frontend/public/manifest/apple-splash-1242-2688.jpg
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
frontend/public/manifest/apple-splash-1284-2778.jpg
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
frontend/public/manifest/apple-splash-1290-2796.jpg
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
frontend/public/manifest/apple-splash-1320-2868.jpg
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
frontend/public/manifest/apple-splash-1334-750.jpg
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
frontend/public/manifest/apple-splash-1488-2266.jpg
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
frontend/public/manifest/apple-splash-1536-2048.jpg
Normal file
|
After Width: | Height: | Size: 43 KiB |
BIN
frontend/public/manifest/apple-splash-1620-2160.jpg
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
frontend/public/manifest/apple-splash-1640-2360.jpg
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
frontend/public/manifest/apple-splash-1668-2224.jpg
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
frontend/public/manifest/apple-splash-1668-2388.jpg
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
frontend/public/manifest/apple-splash-1792-828.jpg
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
frontend/public/manifest/apple-splash-2048-1536.jpg
Normal file
|
After Width: | Height: | Size: 45 KiB |
BIN
frontend/public/manifest/apple-splash-2048-2732.jpg
Normal file
|
After Width: | Height: | Size: 65 KiB |
BIN
frontend/public/manifest/apple-splash-2160-1620.jpg
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
frontend/public/manifest/apple-splash-2208-1242.jpg
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
frontend/public/manifest/apple-splash-2224-1668.jpg
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
frontend/public/manifest/apple-splash-2266-1488.jpg
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
frontend/public/manifest/apple-splash-2360-1640.jpg
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
frontend/public/manifest/apple-splash-2388-1668.jpg
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
frontend/public/manifest/apple-splash-2436-1125.jpg
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
frontend/public/manifest/apple-splash-2532-1170.jpg
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
frontend/public/manifest/apple-splash-2556-1179.jpg
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
frontend/public/manifest/apple-splash-2622-1206.jpg
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
frontend/public/manifest/apple-splash-2688-1242.jpg
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
frontend/public/manifest/apple-splash-2732-2048.jpg
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
frontend/public/manifest/apple-splash-2778-1284.jpg
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
frontend/public/manifest/apple-splash-2796-1290.jpg
Normal file
|
After Width: | Height: | Size: 43 KiB |
BIN
frontend/public/manifest/apple-splash-2868-1320.jpg
Normal file
|
After Width: | Height: | Size: 45 KiB |
BIN
frontend/public/manifest/apple-splash-640-1136.jpg
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
frontend/public/manifest/apple-splash-750-1334.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
frontend/public/manifest/apple-splash-828-1792.jpg
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
frontend/public/manifest/manifest-icon-192.maskable.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
frontend/public/manifest/manifest-icon-512.maskable.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
@@ -1,24 +1,29 @@
|
||||
<template>
|
||||
<FrappeUIProvider>
|
||||
<Layout>
|
||||
<Layout class="isolate text-base">
|
||||
<router-view />
|
||||
</Layout>
|
||||
<!--<InstallPrompt v-if="isMobile" />-->
|
||||
<Dialogs />
|
||||
</FrappeUIProvider>
|
||||
</template>
|
||||
<script setup>
|
||||
import { FrappeUIProvider } from 'frappe-ui'
|
||||
import { Dialogs } from '@/utils/dialogs'
|
||||
import { computed, onUnmounted, ref } from 'vue'
|
||||
import { computed, onUnmounted, ref, watch } from 'vue'
|
||||
import { useScreenSize } from './utils/composables'
|
||||
import { usersStore } from '@/stores/user'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { posthogSettings } from '@/telemetry'
|
||||
import DesktopLayout from './components/DesktopLayout.vue'
|
||||
import MobileLayout from './components/MobileLayout.vue'
|
||||
import NoSidebarLayout from './components/NoSidebarLayout.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import InstallPrompt from './components/InstallPrompt.vue'
|
||||
|
||||
const screenSize = useScreenSize()
|
||||
const { isMobile } = useScreenSize()
|
||||
const router = useRouter()
|
||||
const noSidebar = ref(false)
|
||||
const { userResource } = usersStore()
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
if (to.query.fromLesson || to.path === '/persona') {
|
||||
@@ -33,15 +38,19 @@ const Layout = computed(() => {
|
||||
if (noSidebar.value) {
|
||||
return NoSidebarLayout
|
||||
}
|
||||
if (screenSize.width < 640) {
|
||||
if (isMobile.value) {
|
||||
return MobileLayout
|
||||
}
|
||||
|
||||
return DesktopLayout
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
noSidebar.value = false
|
||||
stopSession()
|
||||
})
|
||||
|
||||
watch(userResource, () => {
|
||||
if (userResource.data) {
|
||||
posthogSettings.reload()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
>
|
||||
<UserDropdown :isCollapsed="sidebarStore.isSidebarCollapsed" />
|
||||
<div class="flex flex-col" v-if="sidebarSettings.data">
|
||||
<SidebarLink
|
||||
v-for="link in sidebarLinks"
|
||||
:link="link"
|
||||
:isCollapsed="sidebarStore.isSidebarCollapsed"
|
||||
class="mx-2 my-0.5"
|
||||
/>
|
||||
<div v-for="link in sidebarLinks" class="mx-2 my-0.5">
|
||||
<SidebarLink
|
||||
:link="link"
|
||||
:isCollapsed="sidebarStore.isSidebarCollapsed"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="sidebarSettings.data?.web_pages?.length || isModerator"
|
||||
@@ -54,15 +54,18 @@
|
||||
class="flex flex-col transition-all duration-300 ease-in-out"
|
||||
:class="!sidebarStore.isWebpagesCollapsed ? 'block' : 'hidden'"
|
||||
>
|
||||
<SidebarLink
|
||||
<div
|
||||
v-for="link in sidebarSettings.data.web_pages"
|
||||
:link="link"
|
||||
:isCollapsed="sidebarStore.isSidebarCollapsed"
|
||||
class="mx-2 my-0.5"
|
||||
:showControls="isModerator ? true : false"
|
||||
@openModal="openPageModal"
|
||||
@deletePage="deletePage"
|
||||
/>
|
||||
>
|
||||
<SidebarLink
|
||||
:link="link"
|
||||
:isCollapsed="sidebarStore.isSidebarCollapsed"
|
||||
:showControls="isModerator ? true : false"
|
||||
@openModal="openPageModal"
|
||||
@deletePage="deletePage"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -181,13 +184,22 @@
|
||||
import UserDropdown from '@/components/UserDropdown.vue'
|
||||
import CollapseSidebar from '@/components/Icons/CollapseSidebar.vue'
|
||||
import SidebarLink from '@/components/SidebarLink.vue'
|
||||
import { ref, onMounted, inject, watch, reactive, markRaw, h } from 'vue'
|
||||
import { getSidebarLinks } from '../utils'
|
||||
import {
|
||||
ref,
|
||||
onMounted,
|
||||
inject,
|
||||
watch,
|
||||
reactive,
|
||||
markRaw,
|
||||
h,
|
||||
onUnmounted,
|
||||
} from 'vue'
|
||||
import { getSidebarLinks } from '@/utils'
|
||||
import { usersStore } from '@/stores/user'
|
||||
import { sessionStore } from '@/stores/session'
|
||||
import { useSidebar } from '@/stores/sidebar'
|
||||
import { useSettings } from '@/stores/settings'
|
||||
import { Button, createResource, Tooltip } from 'frappe-ui'
|
||||
import { Button, call, createResource, Tooltip } from 'frappe-ui'
|
||||
import PageModal from '@/components/Modals/PageModal.vue'
|
||||
import { capture } from '@/telemetry'
|
||||
import LMSLogo from '@/components/Icons/LMSLogo.vue'
|
||||
@@ -205,6 +217,7 @@ import {
|
||||
Users,
|
||||
BookText,
|
||||
Zap,
|
||||
Check,
|
||||
} from 'lucide-vue-next'
|
||||
import {
|
||||
TrialBanner,
|
||||
@@ -216,7 +229,7 @@ import {
|
||||
IntermediateStepModal,
|
||||
} from 'frappe-ui/frappe'
|
||||
|
||||
const { user, sidebarSettings } = sessionStore()
|
||||
const { user } = sessionStore()
|
||||
const { userResource } = usersStore()
|
||||
let sidebarStore = useSidebar()
|
||||
const socket = inject('$socket')
|
||||
@@ -227,6 +240,7 @@ const isModerator = ref(false)
|
||||
const isInstructor = ref(false)
|
||||
const pageToEdit = ref(null)
|
||||
const settingsStore = useSettings()
|
||||
const { sidebarSettings } = settingsStore
|
||||
const showOnboarding = ref(false)
|
||||
const showIntermediateModal = ref(false)
|
||||
const currentStep = ref({})
|
||||
@@ -304,7 +318,7 @@ const addNotifications = () => {
|
||||
|
||||
const addQuizzes = () => {
|
||||
if (isInstructor.value || isModerator.value) {
|
||||
sidebarLinks.value.push({
|
||||
sidebarLinks.value.splice(4, 0, {
|
||||
label: 'Quizzes',
|
||||
icon: 'CircleHelp',
|
||||
to: 'Quizzes',
|
||||
@@ -320,7 +334,7 @@ const addQuizzes = () => {
|
||||
|
||||
const addAssignments = () => {
|
||||
if (isInstructor.value || isModerator.value) {
|
||||
sidebarLinks.value.push({
|
||||
sidebarLinks.value.splice(5, 0, {
|
||||
label: 'Assignments',
|
||||
icon: 'Pencil',
|
||||
to: 'Assignments',
|
||||
@@ -334,37 +348,65 @@ const addAssignments = () => {
|
||||
}
|
||||
}
|
||||
|
||||
const addPrograms = () => {
|
||||
let activeFor = ['Programs', 'ProgramForm']
|
||||
let index = 1
|
||||
let canAddProgram = false
|
||||
|
||||
if (
|
||||
!isInstructor.value &&
|
||||
!isModerator.value &&
|
||||
settingsStore.learningPaths.data
|
||||
) {
|
||||
sidebarLinks.value = sidebarLinks.value.filter(
|
||||
(link) => link.label !== 'Courses'
|
||||
)
|
||||
activeFor.push('CourseDetail')
|
||||
activeFor.push('Lesson')
|
||||
index = 0
|
||||
canAddProgram = true
|
||||
} else if (isInstructor.value || isModerator.value) {
|
||||
canAddProgram = true
|
||||
}
|
||||
|
||||
if (canAddProgram) {
|
||||
sidebarLinks.value.splice(index, 0, {
|
||||
label: 'Programs',
|
||||
icon: 'Route',
|
||||
to: 'Programs',
|
||||
activeFor: activeFor,
|
||||
const addProgrammingExercises = () => {
|
||||
if (isInstructor.value || isModerator.value) {
|
||||
sidebarLinks.value.splice(3, 0, {
|
||||
label: 'Programming Exercises',
|
||||
icon: 'Code',
|
||||
to: 'ProgrammingExercises',
|
||||
activeFor: [
|
||||
'ProgrammingExercises',
|
||||
'ProgrammingExerciseForm',
|
||||
'ProgrammingExerciseSubmissions',
|
||||
'ProgrammingExerciseSubmission',
|
||||
],
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const addPrograms = async () => {
|
||||
let canAddProgram = await checkIfCanAddProgram()
|
||||
if (!canAddProgram) return
|
||||
let activeFor = ['Programs', 'ProgramDetail']
|
||||
let index = 2
|
||||
|
||||
sidebarLinks.value.splice(index, 0, {
|
||||
label: 'Programs',
|
||||
icon: 'Route',
|
||||
to: 'Programs',
|
||||
activeFor: activeFor,
|
||||
})
|
||||
}
|
||||
|
||||
const addContactUsDetails = () => {
|
||||
if (settingsStore.contactUsEmail?.data || settingsStore.contactUsURL?.data) {
|
||||
sidebarLinks.value.push({
|
||||
label: 'Contact Us',
|
||||
icon: settingsStore.contactUsURL?.data ? 'Headset' : 'Mail',
|
||||
to: settingsStore.contactUsURL?.data
|
||||
? settingsStore.contactUsURL.data
|
||||
: settingsStore.contactUsEmail?.data,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const checkIfCanAddProgram = async () => {
|
||||
if (isModerator.value || isInstructor.value) {
|
||||
return true
|
||||
}
|
||||
const programs = await call('lms.lms.utils.get_programs')
|
||||
return programs.enrolled.length > 0 || programs.published.length > 0
|
||||
}
|
||||
|
||||
const addHome = () => {
|
||||
sidebarLinks.value.unshift({
|
||||
label: 'Home',
|
||||
icon: 'Home',
|
||||
to: 'Home',
|
||||
activeFor: ['Home'],
|
||||
})
|
||||
}
|
||||
|
||||
const openPageModal = (link) => {
|
||||
showPageModal.value = true
|
||||
pageToEdit.value = link
|
||||
@@ -567,6 +609,11 @@ const articles = ref([
|
||||
{ name: 'create-a-live-class', title: __('Create a live class') },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: __('Learning Paths'),
|
||||
opened: false,
|
||||
subArticles: [{ name: 'add-a-program', title: __('Add a program') }],
|
||||
},
|
||||
{
|
||||
title: __('Assessments'),
|
||||
opened: false,
|
||||
@@ -612,18 +659,129 @@ const setUpOnboarding = () => {
|
||||
}
|
||||
}
|
||||
|
||||
const addMyPoints = () => {
|
||||
const roles = userResource.data?.roles || []
|
||||
if (roles.includes('LMS Student') || roles.includes('LMS Schoolchild')) {
|
||||
sidebarLinks.value.push({
|
||||
label: __('My points'),
|
||||
icon: 'Award',
|
||||
to: 'MyPoints',
|
||||
activeFor: [],
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const addLeaderBoard = () => {
|
||||
if (user) {
|
||||
sidebarLinks.value.push({
|
||||
label: __('Leader Board'),
|
||||
icon: 'Trophy',
|
||||
to: 'LeaderBoard',
|
||||
activeFor: [],
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const addChatGPT = () => {
|
||||
const roles = userResource.data?.roles || []
|
||||
let URL = ''
|
||||
let nameLabel = ''
|
||||
if (roles.includes('LMS Schoolchild') || roles.includes('LMS Student') || roles.includes('Course Creator')) {
|
||||
if (roles.includes('LMS Schoolchild')) {
|
||||
URL = 'chatgpt-schoolchild'
|
||||
nameLabel = __('ChatGPT for Schoolers')
|
||||
} else if (roles.includes('LMS Student')) {
|
||||
URL = 'chatgpt-schoolchild'
|
||||
nameLabel = __('ChatGPT for Students')
|
||||
} else if (roles.includes('Course Creator')) {
|
||||
URL = 'ai-teachers'
|
||||
nameLabel = __('ChatGPT for Teachers')
|
||||
}
|
||||
|
||||
sidebarLinks.value.push({
|
||||
label: nameLabel,
|
||||
icon: 'Cpu',
|
||||
to: URL,
|
||||
external: true,
|
||||
activeFor: [],
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const addMyChild = () => {
|
||||
const roles = userResource.data?.roles || []
|
||||
if (roles.includes('Parent')) {
|
||||
sidebarLinks.value.push({
|
||||
label: __('My Child'),
|
||||
icon: 'User',
|
||||
to: 'my-child',
|
||||
activeFor: [],
|
||||
external: true,
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//test of new page
|
||||
const addProfile = () => {
|
||||
const roles = userResource.data?.roles || []
|
||||
if (roles.includes('LMS Student')) {
|
||||
sidebarLinks.value.push({
|
||||
label: __('Student Profile'),
|
||||
icon: 'Home',
|
||||
to: 'StudentProfile',
|
||||
activeFor: [],
|
||||
})
|
||||
} else if (roles.includes('LMS Schoolchild')) {
|
||||
sidebarLinks.value.push({
|
||||
label: __('Schoolchildren Profile'),
|
||||
icon: 'Home',
|
||||
to: 'SchoolchildrenProfile',
|
||||
activeFor: [],
|
||||
})
|
||||
} else if (roles.includes('Course Creator')) {
|
||||
sidebarLinks.value.push({
|
||||
label: __('Course Creator Profile'),
|
||||
icon: 'Home',
|
||||
to: 'CourseCreatorProfile',
|
||||
activeFor: [],
|
||||
})
|
||||
} else {
|
||||
sidebarLinks.value.push({
|
||||
label: __('Parent Profile'),
|
||||
icon: 'Home',
|
||||
to: 'ParentProfile',
|
||||
activeFor: [],
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
watch(userResource, () => {
|
||||
addContactUsDetails()
|
||||
if (userResource.data) {
|
||||
isModerator.value = userResource.data.is_moderator
|
||||
isInstructor.value = userResource.data.is_instructor
|
||||
addHome()
|
||||
addPrograms()
|
||||
addProgrammingExercises()
|
||||
addQuizzes()
|
||||
addAssignments()
|
||||
setUpOnboarding()
|
||||
|
||||
addMyPoints()
|
||||
addLeaderBoard()
|
||||
addChatGPT()
|
||||
addMyChild()
|
||||
addProfile()
|
||||
}
|
||||
})
|
||||
|
||||
const redirectToWebsite = () => {
|
||||
window.open('https://frappe.io/learning', '_blank')
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
socket.off('publish_lms_notifications')
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -2,17 +2,24 @@
|
||||
<Dialog
|
||||
v-model="show"
|
||||
:options="{
|
||||
title:
|
||||
type == 'quiz'
|
||||
? __('Add a quiz to your lesson')
|
||||
: __('Add an assignment to your lesson'),
|
||||
size: 'xl',
|
||||
actions: [
|
||||
{
|
||||
label: __('Save'),
|
||||
variant: 'solid',
|
||||
onClick: () => {
|
||||
addAssessment()
|
||||
},
|
||||
},
|
||||
],
|
||||
}"
|
||||
>
|
||||
<template #body>
|
||||
<div class="p-5 space-y-4">
|
||||
<div v-if="type == 'quiz'" class="text-lg font-semibold">
|
||||
{{ __('Add a quiz to your lesson') }}
|
||||
</div>
|
||||
<div v-else class="text-lg font-semibold">
|
||||
{{ __('Add an assignment to your lesson') }}
|
||||
</div>
|
||||
<template #body-content>
|
||||
<div class="">
|
||||
<div>
|
||||
<Link
|
||||
v-if="type == 'quiz'"
|
||||
@@ -29,17 +36,12 @@
|
||||
:onCreate="(value, close) => redirectToForm()"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex justify-end space-x-2">
|
||||
<Button variant="solid" @click="addAssessment()">
|
||||
{{ __('Save') }}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup>
|
||||
import { Dialog, Button } from 'frappe-ui'
|
||||
import { Dialog } from 'frappe-ui'
|
||||
import { onMounted, ref, nextTick } from 'vue'
|
||||
import Link from '@/components/Controls/Link.vue'
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<template #default="{ column, item }">
|
||||
<ListRowItem :item="row[column.key]" :align="column.align">
|
||||
<div v-if="column.key == 'assessment_type'">
|
||||
{{ row[column.key] == 'LMS Quiz' ? 'Quiz' : 'Assignment' }}
|
||||
{{ getAssessmentTypeLabel(row[column.key]) }}
|
||||
</div>
|
||||
<div v-else-if="column.key == 'title'">
|
||||
{{ row[column.key] }}
|
||||
@@ -172,6 +172,24 @@ const getRowRoute = (row) => {
|
||||
},
|
||||
}
|
||||
}
|
||||
} else if (row.assessment_type == 'LMS Programming Exercise') {
|
||||
if (row.submission) {
|
||||
return {
|
||||
name: 'ProgrammingExerciseSubmission',
|
||||
params: {
|
||||
exerciseID: row.assessment_name,
|
||||
submissionID: row.submission.name,
|
||||
},
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
name: 'ProgrammingExerciseSubmission',
|
||||
params: {
|
||||
exerciseID: row.assessment_name,
|
||||
submissionID: 'new',
|
||||
},
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
name: 'QuizPage',
|
||||
@@ -213,7 +231,7 @@ const getAssessmentColumns = () => {
|
||||
}
|
||||
|
||||
const getStatusTheme = (status) => {
|
||||
if (status === 'Pass') {
|
||||
if (status === 'Pass' || status === 'Passed') {
|
||||
return 'green'
|
||||
} else if (status === 'Not Graded') {
|
||||
return 'orange'
|
||||
@@ -221,4 +239,14 @@ const getStatusTheme = (status) => {
|
||||
return 'red'
|
||||
}
|
||||
}
|
||||
|
||||
const getAssessmentTypeLabel = (type) => {
|
||||
if (type == 'LMS Assignment') {
|
||||
return __('Assignment')
|
||||
} else if (type == 'LMS Quiz') {
|
||||
return __('Quiz')
|
||||
} else if (type == 'LMS Programming Exercise') {
|
||||
return __('Programming Exercise')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -70,6 +70,9 @@
|
||||
<FileUploader
|
||||
v-if="!submissionFile"
|
||||
:fileTypes="getType()"
|
||||
:uploadArgs="{
|
||||
private: true,
|
||||
}"
|
||||
:validateFile="validateFile"
|
||||
@success="(file) => saveSubmission(file)"
|
||||
>
|
||||
@@ -127,6 +130,9 @@
|
||||
@change="(val) => (answer = val)"
|
||||
:editable="true"
|
||||
:fixedMenu="true"
|
||||
:uploadArgs="{
|
||||
private: true,
|
||||
}"
|
||||
editorClass="prose-sm max-w-none border-b border-x bg-surface-gray-2 rounded-b-md py-1 px-2 min-h-[7rem]"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div
|
||||
class="flex flex-col border hover:border-outline-gray-4 rounded-md p-4 h-full"
|
||||
class="flex flex-col border hover:border-outline-gray-3 rounded-md p-4 h-full"
|
||||
style="min-height: 150px"
|
||||
>
|
||||
<div class="text-lg leading-5 font-semibold mb-2 text-ink-gray-9">
|
||||
@@ -70,9 +70,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { Badge } from 'frappe-ui'
|
||||
import { formatTime } from '../utils'
|
||||
import { Clock, BookOpen, Globe } from 'lucide-vue-next'
|
||||
import { formatTime } from '@/utils'
|
||||
import { Clock, Globe } from 'lucide-vue-next'
|
||||
import DateRange from '@/components/Common/DateRange.vue'
|
||||
import CourseInstructors from '@/components/CourseInstructors.vue'
|
||||
import UserAvatar from '@/components/UserAvatar.vue'
|
||||
|
||||
@@ -106,7 +106,6 @@ const courses = createResource({
|
||||
params: {
|
||||
batch: props.batch,
|
||||
},
|
||||
cache: ['batchCourses', props.batchName],
|
||||
auto: true,
|
||||
})
|
||||
|
||||
|
||||
@@ -6,13 +6,12 @@
|
||||
:courses="batch.data.courses"
|
||||
/>
|
||||
<Assessments :batch="batch.data.name" />
|
||||
<StudentHeatmap />
|
||||
<!-- <StudentHeatmap /> -->
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import UpcomingEvaluations from '@/components/UpcomingEvaluations.vue'
|
||||
import Assessments from '@/components/Assessments.vue'
|
||||
import StudentHeatmap from '@/components/StudentHeatmap.vue'
|
||||
|
||||
const props = defineProps({
|
||||
batch: {
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</div>
|
||||
<div v-if="!readOnlyMode">
|
||||
<router-link
|
||||
v-if="isModerator || isStudent"
|
||||
v-if="canAccessBatch"
|
||||
:to="{
|
||||
name: 'Batch',
|
||||
params: {
|
||||
@@ -65,8 +65,12 @@
|
||||
}"
|
||||
>
|
||||
<Button variant="solid" class="w-full mt-4">
|
||||
<template #prefix>
|
||||
<LogIn v-if="isStudent" class="size-4 stroke-1.5" />
|
||||
<Settings v-else class="size-4 stroke-1.5" />
|
||||
</template>
|
||||
<span>
|
||||
{{ isModerator ? __('Manage Batch') : __('Visit Batch') }}
|
||||
{{ isStudent ? __('Visit Batch') : __('Manage Batch') }}
|
||||
</span>
|
||||
</Button>
|
||||
</router-link>
|
||||
@@ -85,6 +89,9 @@
|
||||
"
|
||||
>
|
||||
<Button v-if="!isStudent" class="w-full mt-4" variant="solid">
|
||||
<template #prefix>
|
||||
<CreditCard class="size-4 stroke-1.5" />
|
||||
</template>
|
||||
<span>
|
||||
{{ __('Register Now') }}
|
||||
</span>
|
||||
@@ -100,6 +107,9 @@
|
||||
"
|
||||
@click="enrollInBatch()"
|
||||
>
|
||||
<template #prefix>
|
||||
<GraduationCap class="size-4 stroke-1.5" />
|
||||
</template>
|
||||
{{ __('Enroll Now') }}
|
||||
</Button>
|
||||
<router-link
|
||||
@@ -112,6 +122,9 @@
|
||||
}"
|
||||
>
|
||||
<Button class="w-full mt-2">
|
||||
<template #prefix>
|
||||
<Pencil class="size-4 stroke-1.5" />
|
||||
</template>
|
||||
<span>
|
||||
{{ __('Edit') }}
|
||||
</span>
|
||||
@@ -122,8 +135,17 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import { inject, computed } from 'vue'
|
||||
import { Badge, Button, createResource, toast } from 'frappe-ui'
|
||||
import { BookOpen, Clock, Globe } from 'lucide-vue-next'
|
||||
import { Button, createResource, toast } from 'frappe-ui'
|
||||
import {
|
||||
BookOpen,
|
||||
Clock,
|
||||
CreditCard,
|
||||
Globe,
|
||||
GraduationCap,
|
||||
LogIn,
|
||||
Pencil,
|
||||
Settings,
|
||||
} from 'lucide-vue-next'
|
||||
import { formatNumberIntoCurrency, formatTime } from '@/utils'
|
||||
import DateRange from '@/components/Common/DateRange.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
@@ -182,4 +204,12 @@ const isStudent = computed(() => {
|
||||
const isModerator = computed(() => {
|
||||
return user.data?.is_moderator
|
||||
})
|
||||
|
||||
const isEvaluator = computed(() => {
|
||||
return user.data?.is_evaluator
|
||||
})
|
||||
|
||||
const canAccessBatch = computed(() => {
|
||||
return isModerator.value || isStudent.value || isEvaluator.value
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{{ __('Statistics') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid grid-cols-4 gap-5 mb-8">
|
||||
<div class="grid grid-cols-2 md:grid-cols-4 gap-5 mb-8">
|
||||
<NumberChart
|
||||
class="border rounded-md"
|
||||
:config="{ title: __('Students'), value: students.data?.length || 0 }"
|
||||
|
||||
67
frontend/src/components/ContactUsEmail.vue
Normal file
@@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<Dialog
|
||||
v-model="show"
|
||||
:options="{
|
||||
title: __('Contact Us'),
|
||||
size: 'md',
|
||||
}"
|
||||
>
|
||||
<template #body-content>
|
||||
<div class="flex flex-col gap-4">
|
||||
<FormControl
|
||||
v-model="subject"
|
||||
:label="__('Subject')"
|
||||
type="text"
|
||||
:required="true"
|
||||
/>
|
||||
<div>
|
||||
<div class="mb-1.5 text-sm text-ink-gray-5">
|
||||
{{ __('Message') }}
|
||||
<span class="text-ink-red-3">*</span>
|
||||
</div>
|
||||
<TextEditor
|
||||
:fixedMenu="true"
|
||||
@change="(val) => (message = val)"
|
||||
editorClass="prose-sm py-2 px-2 min-h-[200px] border-outline-gray-2 hover:border-outline-gray-3 rounded-b-md bg-surface-gray-3"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #actions="{ close }">
|
||||
<div class="pb-5 float-right">
|
||||
<Button variant="solid" @click="sendMail(close)">
|
||||
{{ __('Send') }}
|
||||
</Button>
|
||||
</div>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { Button, call, Dialog, FormControl, TextEditor, toast } from 'frappe-ui'
|
||||
import { ref } from 'vue'
|
||||
import { useSettings } from '@/stores/settings'
|
||||
|
||||
const show = defineModel<boolean>({ required: true, default: false })
|
||||
const subject = ref('')
|
||||
const message = ref('')
|
||||
const settingsStore = useSettings()
|
||||
|
||||
const sendMail = (close: Function) => {
|
||||
call('frappe.core.doctype.communication.email.make', {
|
||||
recipients: settingsStore.contactUsEmail?.data,
|
||||
subject: subject.value,
|
||||
content: message.value,
|
||||
send_email: true,
|
||||
})
|
||||
.then(() => {
|
||||
toast.success(__('Email sent successfully'))
|
||||
close()
|
||||
subject.value = ''
|
||||
message.value = ''
|
||||
})
|
||||
.catch(() => {
|
||||
toast.error(__('Failed to send email'))
|
||||
close()
|
||||
})
|
||||
}
|
||||
</script>
|
||||
@@ -1,127 +1,140 @@
|
||||
<template>
|
||||
<Combobox v-model="selectedValue" nullable v-slot="{ open: isComboboxOpen }">
|
||||
<Popover class="w-full" v-model:show="showOptions">
|
||||
<template #target="{ open: openPopover, togglePopover }">
|
||||
<slot name="target" v-bind="{ open: openPopover, togglePopover }">
|
||||
<div class="w-full">
|
||||
<button
|
||||
class="flex w-full items-center justify-between focus:outline-none"
|
||||
:class="inputClasses"
|
||||
@click="() => togglePopover()"
|
||||
>
|
||||
<div class="flex items-center">
|
||||
<slot name="prefix" />
|
||||
<span
|
||||
class="overflow-hidden text-ellipsis whitespace-nowrap text-base leading-5"
|
||||
v-if="selectedValue"
|
||||
>
|
||||
{{ displayValue(selectedValue) }}
|
||||
</span>
|
||||
<span class="text-base leading-5 text-ink-gray-4" v-else>
|
||||
{{ placeholder || '' }}
|
||||
</span>
|
||||
</div>
|
||||
<ChevronDown class="h-4 w-4 stroke-1.5" />
|
||||
</button>
|
||||
</div>
|
||||
</slot>
|
||||
</template>
|
||||
<template #body="{ isOpen }">
|
||||
<div v-show="isOpen">
|
||||
<div class="mt-1 rounded-lg bg-surface-white py-1 text-base border-2">
|
||||
<div class="relative px-1.5 pt-0.5">
|
||||
<ComboboxInput
|
||||
ref="search"
|
||||
class="form-input w-full"
|
||||
type="text"
|
||||
@change="
|
||||
(e) => {
|
||||
query = e.target.value
|
||||
}
|
||||
"
|
||||
:value="query"
|
||||
autocomplete="off"
|
||||
placeholder="Search"
|
||||
/>
|
||||
<div>
|
||||
<div v-if="label" class="text-xs text-ink-gray-5 mb-1">
|
||||
{{ __(label) }}
|
||||
<span class="text-ink-red-3" v-if="attrs.required">*</span>
|
||||
</div>
|
||||
<Combobox
|
||||
v-model="selectedValue"
|
||||
nullable
|
||||
v-slot="{ open: isComboboxOpen }"
|
||||
>
|
||||
<Popover class="w-full" v-model:show="showOptions">
|
||||
<template #target="{ open: openPopover, togglePopover }">
|
||||
<slot name="target" v-bind="{ open: openPopover, togglePopover }">
|
||||
<div class="w-full">
|
||||
<button
|
||||
class="absolute right-1.5 inline-flex h-7 w-7 items-center justify-center"
|
||||
@click="selectedValue = null"
|
||||
class="flex w-full items-center justify-between focus:outline-none"
|
||||
:class="inputClasses"
|
||||
@click="() => togglePopover()"
|
||||
:disabled="attrs.readonly"
|
||||
>
|
||||
<X class="h-4 w-4 stroke-1.5 text-ink-gray-7" />
|
||||
<div class="flex items-center">
|
||||
<slot name="prefix" />
|
||||
<span
|
||||
class="overflow-hidden text-ellipsis whitespace-nowrap text-base leading-5"
|
||||
v-if="selectedValue"
|
||||
>
|
||||
{{ displayValue(selectedValue) }}
|
||||
</span>
|
||||
<span class="text-base leading-5 text-ink-gray-4" v-else>
|
||||
{{ placeholder || '' }}
|
||||
</span>
|
||||
</div>
|
||||
<ChevronDown class="h-4 w-4 stroke-1.5" />
|
||||
</button>
|
||||
</div>
|
||||
<ComboboxOptions
|
||||
class="my-1 max-h-[12rem] overflow-y-auto px-1.5"
|
||||
static
|
||||
</slot>
|
||||
</template>
|
||||
<template #body="{ isOpen }">
|
||||
<div v-show="isOpen" class="">
|
||||
<div
|
||||
class="mt-1 rounded-lg bg-surface-white py-1 text-base border-2"
|
||||
>
|
||||
<div
|
||||
class="mt-1.5"
|
||||
v-for="group in groups"
|
||||
:key="group.key"
|
||||
v-show="group.items.length > 0"
|
||||
<div class="relative px-1.5 pt-0.5">
|
||||
<ComboboxInput
|
||||
ref="search"
|
||||
class="form-input w-full"
|
||||
type="text"
|
||||
@change="
|
||||
(e) => {
|
||||
query = e.target.value
|
||||
}
|
||||
"
|
||||
:value="query"
|
||||
autocomplete="off"
|
||||
placeholder="Search"
|
||||
/>
|
||||
<button
|
||||
class="absolute right-1.5 inline-flex h-7 w-7 items-center justify-center"
|
||||
@click="selectedValue = null"
|
||||
>
|
||||
<X class="h-4 w-4 stroke-1.5 text-ink-gray-7" />
|
||||
</button>
|
||||
</div>
|
||||
<ComboboxOptions
|
||||
class="my-1 max-h-[12rem] overflow-y-auto px-1.5"
|
||||
static
|
||||
>
|
||||
<div
|
||||
v-if="group.group && !group.hideLabel"
|
||||
class="px-2.5 py-1.5 text-sm font-medium text-ink-gray-4"
|
||||
class="mt-1.5"
|
||||
v-for="group in groups"
|
||||
:key="group.key"
|
||||
v-show="group.items.length > 0"
|
||||
>
|
||||
{{ group.group }}
|
||||
</div>
|
||||
<ComboboxOption
|
||||
as="template"
|
||||
v-for="option in group.items"
|
||||
:key="option.value"
|
||||
:value="option"
|
||||
v-slot="{ active, selected }"
|
||||
>
|
||||
<li
|
||||
:class="[
|
||||
'flex items-center rounded px-2.5 py-2 text-base',
|
||||
{ 'bg-surface-gray-2': active },
|
||||
]"
|
||||
<div
|
||||
v-if="group.group && !group.hideLabel"
|
||||
class="px-2.5 py-1.5 text-sm font-medium text-ink-gray-4"
|
||||
>
|
||||
<slot
|
||||
name="item-prefix"
|
||||
v-bind="{ active, selected, option }"
|
||||
/>
|
||||
<slot
|
||||
name="item-label"
|
||||
v-bind="{ active, selected, option }"
|
||||
{{ group.group }}
|
||||
</div>
|
||||
<ComboboxOption
|
||||
as="template"
|
||||
v-for="option in group.items"
|
||||
:key="option.value"
|
||||
:value="option"
|
||||
v-slot="{ active, selected }"
|
||||
>
|
||||
<li
|
||||
:class="[
|
||||
'flex items-center rounded px-2.5 py-2 text-base',
|
||||
{ 'bg-surface-gray-2': active },
|
||||
]"
|
||||
>
|
||||
<div class="flex flex-col space-y-1 text-ink-gray-8">
|
||||
<div>
|
||||
{{ option.label }}
|
||||
<slot
|
||||
name="item-prefix"
|
||||
v-bind="{ active, selected, option }"
|
||||
/>
|
||||
<slot
|
||||
name="item-label"
|
||||
v-bind="{ active, selected, option }"
|
||||
>
|
||||
<div class="flex flex-col space-y-1 text-ink-gray-8">
|
||||
<div>
|
||||
{{ option.label }}
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
option.description &&
|
||||
option.description != option.label
|
||||
"
|
||||
class="text-xs text-ink-gray-7"
|
||||
v-html="option.description"
|
||||
></div>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
option.description &&
|
||||
option.description != option.label
|
||||
"
|
||||
class="text-xs text-ink-gray-7"
|
||||
v-html="option.description"
|
||||
></div>
|
||||
</div>
|
||||
</slot>
|
||||
</li>
|
||||
</ComboboxOption>
|
||||
</slot>
|
||||
</li>
|
||||
</ComboboxOption>
|
||||
</div>
|
||||
<li
|
||||
v-if="groups.length == 0"
|
||||
class="mt-1.5 rounded-md px-2.5 py-1.5 text-base text-ink-gray-5"
|
||||
>
|
||||
No results found
|
||||
</li>
|
||||
</ComboboxOptions>
|
||||
<div v-if="slots.footer" class="border-t p-1.5 pb-0.5">
|
||||
<slot
|
||||
name="footer"
|
||||
v-bind="{ value: search?.el._value, close }"
|
||||
></slot>
|
||||
</div>
|
||||
<li
|
||||
v-if="groups.length == 0"
|
||||
class="mt-1.5 rounded-md px-2.5 py-1.5 text-base text-ink-gray-5"
|
||||
>
|
||||
No results found
|
||||
</li>
|
||||
</ComboboxOptions>
|
||||
<div v-if="slots.footer" class="border-t p-1.5 pb-0.5">
|
||||
<slot
|
||||
name="footer"
|
||||
v-bind="{ value: search?.el._value, close }"
|
||||
></slot>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</Popover>
|
||||
</Combobox>
|
||||
</template>
|
||||
</Popover>
|
||||
</Combobox>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -148,6 +161,10 @@ const props = defineProps({
|
||||
type: String,
|
||||
default: 'md',
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
variant: {
|
||||
type: String,
|
||||
default: 'subtle',
|
||||
|
||||
149
frontend/src/components/Controls/ChildTable.vue
Normal file
@@ -0,0 +1,149 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="text-xs text-ink-gray-5 mb-2">
|
||||
{{ label }}
|
||||
</div>
|
||||
<div class="overflow-x-auto border rounded-md">
|
||||
<div
|
||||
class="grid items-center space-x-4 p-2 border-b"
|
||||
:style="{ gridTemplateColumns: getGridTemplateColumns() }"
|
||||
>
|
||||
<div
|
||||
v-for="(column, index) in columns"
|
||||
:key="index"
|
||||
class="text-sm text-ink-gray-5"
|
||||
>
|
||||
{{ column }}
|
||||
</div>
|
||||
<div></div>
|
||||
</div>
|
||||
<div
|
||||
v-for="(row, rowIndex) in rows"
|
||||
:key="rowIndex"
|
||||
class="grid items-center space-x-4 p-2"
|
||||
:style="{ gridTemplateColumns: getGridTemplateColumns() }"
|
||||
>
|
||||
<template v-for="key in Object.keys(row)" :key="key">
|
||||
<input
|
||||
v-if="showKey(key)"
|
||||
v-model="row[key]"
|
||||
class="py-1.5 px-2 border-none focus:ring-0 focus:border focus:border-gray-300 focus:bg-surface-gray-2 rounded-sm text-sm focus:outline-none"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<div class="relative" ref="menuRef">
|
||||
<Button
|
||||
variant="ghost"
|
||||
@click="(event: MouseEvent) => toggleMenu(rowIndex, event)"
|
||||
>
|
||||
<template #icon>
|
||||
<Ellipsis
|
||||
class="size-4 text-ink-gray-7 stroke-1.5 cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
</Button>
|
||||
|
||||
<div
|
||||
v-if="menuOpenIndex === rowIndex"
|
||||
class="absolute right-[30px] top-5 mt-1 w-32 bg-surface-white border border-outline-gray-1 rounded-md shadow-sm"
|
||||
>
|
||||
<button
|
||||
@click="deleteRow(rowIndex)"
|
||||
class="flex items-center space-x-2 w-full text-left px-3 py-2 text-sm text-ink-red-3"
|
||||
>
|
||||
<Trash2 class="size-4 stroke-1.5" />
|
||||
<span>
|
||||
{{ __('Delete') }}
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-2">
|
||||
<Button @click="addRow">
|
||||
<template #prefix>
|
||||
<Plus class="size-4 text-ink-gray-7" />
|
||||
</template>
|
||||
{{ __('Add Row') }}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue'
|
||||
import { Button } from 'frappe-ui'
|
||||
import { Ellipsis, Plus, Trash2 } from 'lucide-vue-next'
|
||||
import { onClickOutside } from '@vueuse/core'
|
||||
|
||||
const rows = defineModel<Cell[][]>()
|
||||
const menuRef = ref(null)
|
||||
const menuOpenIndex = ref<number | null>(null)
|
||||
const menuTopPosition = ref<string>('')
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:modelValue', value: Cell[][]): void
|
||||
}>()
|
||||
|
||||
type Cell = {
|
||||
value: string
|
||||
editable?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
modelValue?: Cell[][]
|
||||
columns?: string[]
|
||||
label?: string
|
||||
}>(),
|
||||
{
|
||||
columns: [],
|
||||
}
|
||||
)
|
||||
|
||||
const columns = ref(props.columns)
|
||||
|
||||
watch(rows, () => {
|
||||
if (rows.value?.length < 1) {
|
||||
addRow()
|
||||
}
|
||||
})
|
||||
|
||||
const addRow = () => {
|
||||
if (!rows.value) {
|
||||
rows.value = []
|
||||
}
|
||||
let newRow: { [key: string]: string } = {}
|
||||
columns.value.forEach((column: any) => {
|
||||
newRow[column.toLowerCase().split(' ').join('_')] = ''
|
||||
})
|
||||
rows.value.push(newRow)
|
||||
emit('update:modelValue', rows.value)
|
||||
}
|
||||
|
||||
const deleteRow = (index: number) => {
|
||||
rows.value.splice(index, 1)
|
||||
emit('update:modelValue', rows.value)
|
||||
}
|
||||
|
||||
const getGridTemplateColumns = () => {
|
||||
return [...Array(columns.value.length).fill('1fr'), '0.25fr'].join(' ')
|
||||
}
|
||||
|
||||
const toggleMenu = (index: number, event: MouseEvent) => {
|
||||
menuOpenIndex.value = menuOpenIndex.value === index ? null : index
|
||||
menuTopPosition.value = `${event.clientY + 10}px`
|
||||
}
|
||||
|
||||
onClickOutside(menuRef, () => {
|
||||
menuOpenIndex.value = null
|
||||
})
|
||||
|
||||
const showKey = (key: string) => {
|
||||
let columnsLower = columns.value.map((col) =>
|
||||
col.toLowerCase().split(' ').join('_')
|
||||
)
|
||||
return columnsLower.includes(key)
|
||||
}
|
||||
</script>
|
||||
162
frontend/src/components/Controls/Code.vue
Normal file
@@ -0,0 +1,162 @@
|
||||
<template>
|
||||
<div class="flex w-full flex-col gap-1.5">
|
||||
<div v-if="label" class="text-xs text-ink-gray-5">
|
||||
{{ __(label) }}
|
||||
</div>
|
||||
<codemirror
|
||||
v-model="code"
|
||||
:extensions="extensions"
|
||||
:tab-size="2"
|
||||
:autofocus="autofocus"
|
||||
:indent-with-tab="true"
|
||||
:style="{ height: height, maxHeight: maxHeight }"
|
||||
:disabled="readonly"
|
||||
@blur="emitEditorValue"
|
||||
:class="{
|
||||
'border border-outline-gray-1': showBorder,
|
||||
}"
|
||||
/>
|
||||
<Button
|
||||
v-if="showSaveButton"
|
||||
@click="emit('save', code)"
|
||||
class="mt-3 w-full text-base"
|
||||
>
|
||||
{{ __('Save') }}
|
||||
</Button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, computed, watch } from 'vue'
|
||||
import { Button } from 'frappe-ui'
|
||||
import { Codemirror } from 'vue-codemirror'
|
||||
import { autocompletion, closeBrackets } from '@codemirror/autocomplete'
|
||||
import { LanguageSupport } from '@codemirror/language'
|
||||
import { EditorView } from '@codemirror/view'
|
||||
import { tomorrow } from 'thememirror'
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
language: 'json' | 'javascript' | 'html' | 'css' | 'python'
|
||||
modelValue: string | object | Array<string | object> | null
|
||||
height?: string
|
||||
maxHeight?: string
|
||||
autofocus?: boolean
|
||||
showSaveButton?: boolean
|
||||
showLineNumbers?: boolean
|
||||
completions?: Function | null
|
||||
label?: string
|
||||
showBorder?: boolean
|
||||
required?: boolean
|
||||
readonly?: boolean
|
||||
}>(),
|
||||
{
|
||||
language: 'javascript',
|
||||
modelValue: null,
|
||||
height: 'auto',
|
||||
maxHeight: '250px',
|
||||
showLineNumbers: true,
|
||||
completions: null,
|
||||
}
|
||||
)
|
||||
const emit = defineEmits(['update:modelValue', 'save'])
|
||||
|
||||
const code = ref<string>('')
|
||||
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(newVal) => {
|
||||
code.value =
|
||||
typeof newVal === 'string' ? newVal : JSON.stringify(newVal, null, 2)
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
watch(code, (val) => {
|
||||
emit('update:modelValue', val)
|
||||
})
|
||||
|
||||
const errorMessage = ref('')
|
||||
const emitEditorValue = () => {
|
||||
try {
|
||||
errorMessage.value = ''
|
||||
let value = code.value || ''
|
||||
|
||||
if (!props.showSaveButton && !props.readonly) {
|
||||
emit('update:modelValue', value)
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('Error while parsing JSON for editor', e)
|
||||
errorMessage.value = `Invalid object/JSON: ${e.message}`
|
||||
}
|
||||
}
|
||||
|
||||
const languageExtension = ref<LanguageSupport>()
|
||||
const autocompleteExtension = ref()
|
||||
|
||||
async function setLanguageExtension() {
|
||||
const importMap = {
|
||||
json: () => import('@codemirror/lang-json'),
|
||||
javascript: () => import('@codemirror/lang-javascript'),
|
||||
html: () => import('@codemirror/lang-html'),
|
||||
css: () => import('@codemirror/lang-css'),
|
||||
python: () => import('@codemirror/lang-python'),
|
||||
}
|
||||
|
||||
const languageImport = importMap[props.language]
|
||||
if (!languageImport) return
|
||||
|
||||
const module = await languageImport()
|
||||
languageExtension.value = (module as any)[props.language]()
|
||||
|
||||
if (props.completions) {
|
||||
const languageData = (module as any)[`${props.language}Language`]
|
||||
autocompleteExtension.value = languageData.data.of({
|
||||
autocomplete: props.completions,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await setLanguageExtension()
|
||||
})
|
||||
|
||||
watch(
|
||||
() => props.language,
|
||||
async () => {
|
||||
await setLanguageExtension()
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
const extensions = computed(() => {
|
||||
const baseExtensions = [
|
||||
closeBrackets(),
|
||||
tomorrow,
|
||||
EditorView.theme({
|
||||
'&': {
|
||||
fontFamily: 'monospace',
|
||||
fontSize: '12px',
|
||||
},
|
||||
'.cm-gutters': {
|
||||
display: props.showLineNumbers ? 'flex' : 'none',
|
||||
},
|
||||
}),
|
||||
]
|
||||
if (languageExtension.value) {
|
||||
baseExtensions.push(languageExtension.value)
|
||||
}
|
||||
if (autocompleteExtension.value) {
|
||||
baseExtensions.push(autocompleteExtension.value)
|
||||
}
|
||||
const autocompletionOptions = {
|
||||
activateOnTyping: true,
|
||||
maxRenderedOptions: 10,
|
||||
closeOnBlur: false,
|
||||
icons: false,
|
||||
optionClass: () => 'flex h-7 !px-2 items-center rounded !text-gray-600',
|
||||
}
|
||||
baseExtensions.push(autocompletion(autocompletionOptions))
|
||||
return baseExtensions
|
||||
})
|
||||
</script>
|
||||
@@ -5,7 +5,7 @@
|
||||
height: height,
|
||||
}"
|
||||
>
|
||||
<span class="text-xs text-ink-gray-7" v-if="label">
|
||||
<span class="text-xs text-ink-gray-7 mb-1" v-if="label">
|
||||
{{ label }}
|
||||
</span>
|
||||
<div
|
||||
|
||||
108
frontend/src/components/Controls/ColorSwatches.vue
Normal file
@@ -0,0 +1,108 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="text-xs text-ink-gray-5 mb-1">
|
||||
{{ __(label) }}
|
||||
</div>
|
||||
<Popover placement="bottom" class="!block">
|
||||
<template #target="{ togglePopover, isOpen }">
|
||||
<div class="space-y-2">
|
||||
<FormControl
|
||||
type="text"
|
||||
autocomplete="off"
|
||||
class="w-full"
|
||||
:placeholder="__('Set Color')"
|
||||
@focus="togglePopover"
|
||||
:modelValue="modelValue"
|
||||
@update:modelValue="(val: string) => emit('update:modelValue', val)"
|
||||
>
|
||||
<template #prefix>
|
||||
<div
|
||||
class="size-4 rounded-full"
|
||||
:style="
|
||||
modelValue
|
||||
? {
|
||||
backgroundColor:
|
||||
theme.backgroundColor[modelValue.toLowerCase()][400],
|
||||
}
|
||||
: {}
|
||||
"
|
||||
>
|
||||
<Palette
|
||||
v-if="!modelValue"
|
||||
class="size-4 stroke-1.5 text-ink-gray-5"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<template #suffix>
|
||||
<Button variant="ghost">
|
||||
<X
|
||||
class="size-3 text-ink-gray-5"
|
||||
@click="emit('update:modelValue', null)"
|
||||
/>
|
||||
</Button>
|
||||
</template>
|
||||
</FormControl>
|
||||
</div>
|
||||
</template>
|
||||
<template #body="{ close }">
|
||||
<div class="rounded-lg bg-surface-white p-3 border w-fit mt-2">
|
||||
<div class="text-xs text-ink-gray-5 mb-1.5">
|
||||
{{ __('Swatches') }}
|
||||
</div>
|
||||
<div class="grid grid-cols-7 gap-2">
|
||||
<div
|
||||
v-for="color in colors"
|
||||
:key="color"
|
||||
class="size-5 rounded-full cursor-pointer"
|
||||
:style="{
|
||||
backgroundColor:
|
||||
theme.backgroundColor[color.toLowerCase()][400],
|
||||
}"
|
||||
@click="
|
||||
(e) => {
|
||||
emit('update:modelValue', color)
|
||||
close()
|
||||
emit('change', color)
|
||||
}
|
||||
"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</Popover>
|
||||
<div class="text-sm text-ink-gray-5 mt-2">
|
||||
{{ description }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { Button, FormControl, Popover } from 'frappe-ui'
|
||||
import { computed } from 'vue'
|
||||
import { Palette, X } from 'lucide-vue-next'
|
||||
import { theme } from '@/utils/theme'
|
||||
|
||||
const emit = defineEmits(['update:modelValue', 'change'])
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: string
|
||||
label: string
|
||||
description?: string
|
||||
}>()
|
||||
|
||||
const colors = computed(() => {
|
||||
return [
|
||||
'Red',
|
||||
'Blue',
|
||||
'Green',
|
||||
'Amber',
|
||||
'Purple',
|
||||
'Cyan',
|
||||
'Orange',
|
||||
'Violet',
|
||||
'Pink',
|
||||
'Teal',
|
||||
'Gray',
|
||||
'Yellow',
|
||||
]
|
||||
})
|
||||
</script>
|
||||
@@ -12,6 +12,7 @@
|
||||
:variant="attrs.variant"
|
||||
:placeholder="attrs.placeholder"
|
||||
:filterable="false"
|
||||
:readonly="attrs.readonly"
|
||||
>
|
||||
<template #target="{ open, togglePopover }">
|
||||
<slot name="target" v-bind="{ open, togglePopover }" />
|
||||
|
||||
@@ -55,9 +55,10 @@
|
||||
</div>
|
||||
</li>
|
||||
</ComboboxOption>
|
||||
<div class="h-10"></div>
|
||||
<div
|
||||
v-if="attrs.onCreate"
|
||||
class="absolute bottom-2 left-1 w-[98%] pt-2 bg-white border-t"
|
||||
class="absolute bottom-2 left-1 w-[99%] pt-2 bg-white border-t"
|
||||
>
|
||||
<Button
|
||||
variant="ghost"
|
||||
|
||||
76
frontend/src/components/Controls/Uploader.vue
Normal file
@@ -0,0 +1,76 @@
|
||||
<template>
|
||||
<div class="mb-4">
|
||||
<div v-if="label" class="text-xs text-ink-gray-5 mb-2">
|
||||
{{ __(label) }}
|
||||
<span class="text-ink-red-3">*</span>
|
||||
</div>
|
||||
<FileUploader
|
||||
v-if="!modelValue"
|
||||
:fileTypes="['image/*']"
|
||||
:validateFile="validateFile"
|
||||
@success="(file: File) => saveImage(file)"
|
||||
>
|
||||
<template v-slot="{ file, progress, uploading, openFileSelector }">
|
||||
<div class="flex items-center">
|
||||
<div class="border rounded-md w-fit py-7 px-20">
|
||||
<Image class="size-5 stroke-1 text-ink-gray-7" />
|
||||
</div>
|
||||
<div class="ml-4">
|
||||
<Button @click="openFileSelector">
|
||||
{{ __('Upload') }}
|
||||
</Button>
|
||||
<div class="mt-1 text-ink-gray-5 text-sm leading-5">
|
||||
{{ __(description) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</FileUploader>
|
||||
<div v-else class="mb-4">
|
||||
<div class="flex items-center">
|
||||
<img :src="modelValue" class="border rounded-md w-44 h-auto" />
|
||||
<div class="ml-4">
|
||||
<Button @click="removeImage()">
|
||||
{{ __('Remove') }}
|
||||
</Button>
|
||||
<div
|
||||
v-if="description"
|
||||
class="mt-2 text-ink-gray-5 text-sm leading-5"
|
||||
>
|
||||
{{ __(description) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { validateFile } from '@/utils'
|
||||
import { Button, FileUploader } from 'frappe-ui'
|
||||
import { Image } from 'lucide-vue-next'
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:modelValue', value: string): void
|
||||
}>()
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
modelValue: string
|
||||
label?: string
|
||||
description?: string
|
||||
}>(),
|
||||
{
|
||||
modelValue: '',
|
||||
label: '',
|
||||
description: '',
|
||||
}
|
||||
)
|
||||
|
||||
const saveImage = (file: any) => {
|
||||
emit('update:modelValue', file.file_url)
|
||||
}
|
||||
|
||||
const removeImage = () => {
|
||||
emit('update:modelValue', '')
|
||||
}
|
||||
</script>
|
||||
@@ -1,41 +1,57 @@
|
||||
<template>
|
||||
<div
|
||||
v-if="course.title"
|
||||
class="flex flex-col h-full rounded-md border-2 overflow-auto"
|
||||
class="flex flex-col h-full rounded-md overflow-auto text-ink-gray-9"
|
||||
style="min-height: 350px"
|
||||
>
|
||||
<div
|
||||
class="course-image"
|
||||
:class="{ 'default-image': !course.image }"
|
||||
:style="{ backgroundImage: 'url(\'' + encodeURI(course.image) + '\')' }"
|
||||
class="w-[100%] h-[168px] bg-cover bg-center bg-no-repeat border-t border-x rounded-t-md"
|
||||
:style="
|
||||
course.image
|
||||
? { backgroundImage: `url('${encodeURI(course.image)}')` }
|
||||
: {
|
||||
backgroundImage: getGradientColor(),
|
||||
backgroundBlendMode: 'screen',
|
||||
}
|
||||
"
|
||||
>
|
||||
<div class="flex items-center flex-wrap relative top-4 px-2 w-fit">
|
||||
<Badge
|
||||
<!-- <div class="flex items-center flex-wrap relative top-4 px-2 w-fit">
|
||||
<div
|
||||
v-if="course.featured"
|
||||
variant="subtle"
|
||||
theme="green"
|
||||
size="md"
|
||||
class="mb-1 mr-1"
|
||||
class="flex items-center space-x-1 text-xs text-ink-amber-3 bg-surface-white border border-outline-amber-1 px-2 py-0.5 rounded-md mr-1 mb-1"
|
||||
>
|
||||
{{ __('Featured') }}
|
||||
</Badge>
|
||||
<Star class="size-3 stroke-2" />
|
||||
<span>
|
||||
{{ __('Featured') }}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="course.tags"
|
||||
v-for="tag in course.tags?.split(', ')"
|
||||
class="text-xs bg-white text-gray-800 px-2 py-0.5 rounded-md mb-1 mr-1"
|
||||
class="text-xs border bg-surface-white text-ink-gray-9 px-2 py-0.5 rounded-md mb-1 mr-1"
|
||||
>
|
||||
{{ tag }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!course.image" class="image-placeholder">
|
||||
{{ course.title[0] }}
|
||||
</div> -->
|
||||
<div
|
||||
v-if="!course.image"
|
||||
class="flex items-center justify-center text-white flex-1 font-extrabold my-auto px-5 text-center leading-6 h-full"
|
||||
:class="
|
||||
course.title.length > 32
|
||||
? 'text-lg'
|
||||
: course.title.length > 20
|
||||
? 'text-xl'
|
||||
: 'text-2xl'
|
||||
"
|
||||
>
|
||||
{{ course.title }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col flex-auto p-4">
|
||||
<div class="flex flex-col flex-auto p-4 border-x-2 border-b-2 rounded-b-md">
|
||||
<div class="flex items-center justify-between mb-2">
|
||||
<div v-if="course.lessons">
|
||||
<Tooltip :text="__('Lessons')">
|
||||
<span class="flex items-center text-ink-gray-7">
|
||||
<span class="flex items-center">
|
||||
<BookOpen class="h-4 w-4 stroke-1.5 mr-1" />
|
||||
{{ course.lessons }}
|
||||
</span>
|
||||
@@ -44,38 +60,36 @@
|
||||
|
||||
<div v-if="course.enrollments">
|
||||
<Tooltip :text="__('Enrolled Students')">
|
||||
<span class="flex items-center text-ink-gray-7">
|
||||
<Users class="h-4 w-4 stroke-1. mr-1" />
|
||||
{{ course.enrollments }}
|
||||
<span class="flex items-center">
|
||||
<Users class="h-4 w-4 stroke-1.5 mr-1" />
|
||||
{{ formatAmount(course.enrollments) }}
|
||||
</span>
|
||||
</Tooltip>
|
||||
</div>
|
||||
|
||||
<div v-if="course.rating">
|
||||
<Tooltip :text="__('Average Rating')">
|
||||
<span class="flex items-center text-ink-gray-7">
|
||||
<span class="flex items-center">
|
||||
<Star class="h-4 w-4 stroke-1.5 mr-1" />
|
||||
{{ course.rating }}
|
||||
</span>
|
||||
</Tooltip>
|
||||
</div>
|
||||
|
||||
<div v-if="course.status != 'Approved'">
|
||||
<Badge
|
||||
variant="subtle"
|
||||
:theme="course.status === 'Under Review' ? 'orange' : 'blue'"
|
||||
size="sm"
|
||||
>
|
||||
{{ course.status }}
|
||||
</Badge>
|
||||
</div>
|
||||
<Tooltip v-if="course.featured" :text="__('Featured')">
|
||||
<Award class="size-4 stroke-2 text-ink-amber-3" />
|
||||
</Tooltip>
|
||||
</div>
|
||||
|
||||
<div class="text-xl font-semibold leading-6 text-ink-gray-9">
|
||||
<div
|
||||
v-if="course.image"
|
||||
class="font-semibold leading-6"
|
||||
:class="course.title.length > 32 ? 'text-lg' : 'text-xl'"
|
||||
>
|
||||
{{ course.title }}
|
||||
</div>
|
||||
|
||||
<div class="short-introduction text-ink-gray-7 text-sm">
|
||||
<div class="short-introduction text-sm">
|
||||
{{ course.short_introduction }}
|
||||
</div>
|
||||
|
||||
@@ -84,11 +98,8 @@
|
||||
:progress="course.membership.progress"
|
||||
/>
|
||||
|
||||
<div
|
||||
v-if="user && course.membership"
|
||||
class="text-sm text-ink-gray-7 mt-2 mb-4"
|
||||
>
|
||||
{{ Math.ceil(course.membership.progress) }}% completed
|
||||
<div v-if="user && course.membership" class="text-sm mt-2 mb-4">
|
||||
{{ Math.ceil(course.membership.progress) }}% {{ __('completed') }}
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-between mt-auto">
|
||||
@@ -105,25 +116,30 @@
|
||||
<CourseInstructors :instructors="course.instructors" />
|
||||
</div>
|
||||
|
||||
<div v-if="course.paid_course" class="font-semibold">
|
||||
{{ course.price }}
|
||||
</div>
|
||||
<div
|
||||
v-if="course.paid_certificate || course.enable_certification"
|
||||
class="text-xs text-ink-blue-3 bg-surface-blue-1 py-0.5 px-1 rounded-md"
|
||||
>
|
||||
{{ __('Certification') }}
|
||||
<div class="flex items-center space-x-2">
|
||||
<div v-if="course.paid_course" class="font-semibold">
|
||||
{{ course.price }}
|
||||
</div>
|
||||
|
||||
<Tooltip
|
||||
v-if="course.paid_certificate || course.enable_certification"
|
||||
:text="__('Get Certified')"
|
||||
>
|
||||
<GraduationCap class="size-5 stroke-1.5 text-ink-gray-7" />
|
||||
</Tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { BookOpen, Users, Star } from 'lucide-vue-next'
|
||||
import UserAvatar from '@/components/UserAvatar.vue'
|
||||
import { Award, BookOpen, GraduationCap, Star, Users } from 'lucide-vue-next'
|
||||
import { sessionStore } from '@/stores/session'
|
||||
import { Badge, Tooltip } from 'frappe-ui'
|
||||
import { Tooltip } from 'frappe-ui'
|
||||
import { theme } from '@/utils/theme'
|
||||
import { formatAmount } from '@/utils'
|
||||
import CourseInstructors from '@/components/CourseInstructors.vue'
|
||||
import UserAvatar from '@/components/UserAvatar.vue'
|
||||
import ProgressBar from '@/components/ProgressBar.vue'
|
||||
|
||||
const { user } = sessionStore()
|
||||
@@ -134,16 +150,24 @@ const props = defineProps({
|
||||
default: null,
|
||||
},
|
||||
})
|
||||
|
||||
const getGradientColor = () => {
|
||||
let color = props.course.card_gradient?.toLowerCase() || 'blue'
|
||||
let colorMap = theme.backgroundColor[color]
|
||||
return `linear-gradient(to top right, black, ${colorMap[400]})`
|
||||
/* return `bg-gradient-to-br from-${color}-100 via-${color}-200 to-${color}-400` */
|
||||
/* return `linear-gradient(to bottom right, ${colorMap[100]}, ${colorMap[400]})` */
|
||||
/* return `radial-gradient(ellipse at 80% 20%, black 20%, ${colorMap[500]} 100%)` */
|
||||
/* return `radial-gradient(ellipse at 30% 70%, black 50%, ${colorMap[500]} 100%)` */
|
||||
/* return `radial-gradient(ellipse at 80% 20%, ${colorMap[100]} 0%, ${colorMap[300]} 50%, ${colorMap[500]} 100%)` */
|
||||
/* return `conic-gradient(from 180deg at 50% 50%, ${colorMap[100]} 0%, ${colorMap[200]} 50%, ${colorMap[400]} 100%)` */
|
||||
/* return `linear-gradient(135deg, ${colorMap[100]}, ${colorMap[300]}), linear-gradient(120deg, rgba(255,255,255,0.4) 0%, transparent 60%) ` */
|
||||
/* return `radial-gradient(circle at 20% 30%, ${colorMap[100]} 0%, transparent 40%),
|
||||
radial-gradient(circle at 80% 40%, ${colorMap[200]} 0%, transparent 50%),
|
||||
linear-gradient(135deg, ${colorMap[300]} 0%, ${colorMap[400]} 100%);` */
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.course-image {
|
||||
height: 168px;
|
||||
width: 100%;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.course-card-pills {
|
||||
background: #ffffff;
|
||||
margin-left: 0;
|
||||
@@ -157,14 +181,6 @@ const props = defineProps({
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.default-image {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
background-color: theme('colors.green.100');
|
||||
color: theme('colors.green.600');
|
||||
}
|
||||
|
||||
.avatar-group {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
@@ -173,14 +189,7 @@ const props = defineProps({
|
||||
.avatar-group .avatar {
|
||||
transition: margin 0.1s ease-in-out;
|
||||
}
|
||||
.image-placeholder {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
font-size: 5rem;
|
||||
color: theme('colors.gray.700');
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.avatar-group.overlap .avatar + .avatar {
|
||||
margin-left: calc(-8px);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="border-2 rounded-md min-w-80">
|
||||
<div class="border-2 rounded-md min-w-80 max-w-sm">
|
||||
<iframe
|
||||
v-if="course.data.video_link"
|
||||
:src="video_link"
|
||||
@@ -26,6 +26,9 @@
|
||||
}"
|
||||
>
|
||||
<Button variant="solid" size="md" class="w-full">
|
||||
<template #prefix>
|
||||
<BookText class="size-4 stroke-1.5" />
|
||||
</template>
|
||||
<span>
|
||||
{{ __('Continue Learning') }}
|
||||
</span>
|
||||
@@ -44,6 +47,9 @@
|
||||
}"
|
||||
>
|
||||
<Button variant="solid" size="md" class="w-full">
|
||||
<template #prefix>
|
||||
<CreditCard class="size-4 stroke-1.5" />
|
||||
</template>
|
||||
<span>
|
||||
{{ __('Buy this course') }}
|
||||
</span>
|
||||
@@ -57,12 +63,15 @@
|
||||
{{ __('Contact the Administrator to enroll for this course.') }}
|
||||
</Badge>
|
||||
<Button
|
||||
v-else
|
||||
v-else-if="!user.data?.is_moderator && !is_instructor()"
|
||||
@click="enrollStudent()"
|
||||
variant="solid"
|
||||
class="w-full"
|
||||
size="md"
|
||||
>
|
||||
<template #prefix>
|
||||
<BookText class="size-4 stroke-1.5" />
|
||||
</template>
|
||||
<span>
|
||||
{{ __('Start Learning') }}
|
||||
</span>
|
||||
@@ -74,8 +83,22 @@
|
||||
class="w-full mt-2"
|
||||
size="md"
|
||||
>
|
||||
<template #prefix>
|
||||
<GraduationCap class="size-4 stroke-1.5" />
|
||||
</template>
|
||||
{{ __('Get Certificate') }}
|
||||
</Button>
|
||||
<Button
|
||||
v-if="user.data?.is_moderator || is_instructor()"
|
||||
class="w-full mt-2"
|
||||
size="md"
|
||||
@click="showProgressSummary"
|
||||
>
|
||||
<template #prefix>
|
||||
<TrendingUp class="size-4 stroke-1.5" />
|
||||
{{ __('Progress Summary') }}
|
||||
</template>
|
||||
</Button>
|
||||
<router-link
|
||||
v-if="user?.data?.is_moderator || is_instructor()"
|
||||
:to="{
|
||||
@@ -86,6 +109,9 @@
|
||||
}"
|
||||
>
|
||||
<Button variant="subtle" class="w-full mt-2" size="md">
|
||||
<template #prefix>
|
||||
<Pencil class="size-4 stroke-1.5" />
|
||||
</template>
|
||||
<span>
|
||||
{{ __('Edit') }}
|
||||
</span>
|
||||
@@ -142,18 +168,35 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<CourseProgressSummary
|
||||
v-if="user.data?.is_moderator || is_instructor()"
|
||||
v-model="showProgressModal"
|
||||
:courseName="course.data.name"
|
||||
:enrollments="course.data.enrollments"
|
||||
/>
|
||||
</template>
|
||||
<script setup>
|
||||
import { BookOpen, Users, Star, GraduationCap } from 'lucide-vue-next'
|
||||
import { computed, inject } from 'vue'
|
||||
import { Badge, Button, createResource, toast } from 'frappe-ui'
|
||||
import {
|
||||
BookOpen,
|
||||
BookText,
|
||||
CreditCard,
|
||||
GraduationCap,
|
||||
Pencil,
|
||||
Star,
|
||||
TrendingUp,
|
||||
Users,
|
||||
} from 'lucide-vue-next'
|
||||
import { computed, inject, ref } from 'vue'
|
||||
import { Badge, Button, call, createResource, toast } from 'frappe-ui'
|
||||
import { formatAmount } from '@/utils/'
|
||||
import { capture } from '@/telemetry'
|
||||
import { useRouter } from 'vue-router'
|
||||
import CertificationLinks from '@/components/CertificationLinks.vue'
|
||||
import CourseProgressSummary from '@/components/Modals/CourseProgressSummary.vue'
|
||||
|
||||
const router = useRouter()
|
||||
const user = inject('$user')
|
||||
const showProgressModal = ref(false)
|
||||
const readOnlyMode = window.read_only_mode
|
||||
|
||||
const props = defineProps({
|
||||
@@ -175,15 +218,11 @@ function enrollStudent() {
|
||||
toast.success(__('You need to login first to enroll for this course'))
|
||||
setTimeout(() => {
|
||||
window.location.href = `/login?redirect-to=${window.location.pathname}`
|
||||
}, 1000)
|
||||
}, 500)
|
||||
} else {
|
||||
const enrollStudentResource = createResource({
|
||||
url: 'lms.lms.doctype.lms_enrollment.lms_enrollment.create_membership',
|
||||
call('lms.lms.doctype.lms_enrollment.lms_enrollment.create_membership', {
|
||||
course: props.course.data.name,
|
||||
})
|
||||
enrollStudentResource
|
||||
.submit({
|
||||
course: props.course.data.name,
|
||||
})
|
||||
.then(() => {
|
||||
capture('enrolled_in_course', {
|
||||
course: props.course.data.name,
|
||||
@@ -198,7 +237,11 @@ function enrollStudent() {
|
||||
lessonNumber: 1,
|
||||
},
|
||||
})
|
||||
}, 2000)
|
||||
}, 1000)
|
||||
})
|
||||
.catch((err) => {
|
||||
toast.warning(__(err.messages?.[0] || err))
|
||||
console.error(err)
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -246,4 +289,8 @@ const fetchCertificate = () => {
|
||||
member: user.data?.name,
|
||||
})
|
||||
}
|
||||
|
||||
const showProgressSummary = () => {
|
||||
showProgressModal.value = true
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
name: 'Profile',
|
||||
params: { username: instructors[0].username },
|
||||
}"
|
||||
class="text-ink-gray-7 hover:text-ink-gray-9"
|
||||
>
|
||||
{{ instructors[0].full_name }}
|
||||
</router-link>
|
||||
@@ -16,15 +17,17 @@
|
||||
name: 'Profile',
|
||||
params: { username: instructors[0].username },
|
||||
}"
|
||||
class="text-ink-gray-7 hover:text-ink-gray-9"
|
||||
>
|
||||
{{ instructors[0].first_name }}
|
||||
</router-link>
|
||||
and
|
||||
{{ __('and') }}
|
||||
<router-link
|
||||
:to="{
|
||||
name: 'Profile',
|
||||
params: { username: instructors[1].username },
|
||||
}"
|
||||
class="text-ink-gray-7 hover:text-ink-gray-9"
|
||||
>
|
||||
{{ instructors[1].first_name }}
|
||||
</router-link>
|
||||
@@ -35,10 +38,11 @@
|
||||
name: 'Profile',
|
||||
params: { username: instructors[0].username },
|
||||
}"
|
||||
class="text-ink-gray-7 hover:text-ink-gray-9"
|
||||
>
|
||||
{{ instructors[0].first_name }}
|
||||
</router-link>
|
||||
and {{ instructors?.length - 1 }} others
|
||||
{{ __('and') }} {{ instructors?.length - 1 }} {{ __('others') }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -23,119 +23,135 @@
|
||||
'border-2 rounded-md py-2 px-2': showOutline && outline.data?.length,
|
||||
}"
|
||||
>
|
||||
<Disclosure
|
||||
v-slot="{ open }"
|
||||
v-for="(chapter, index) in outline.data"
|
||||
:key="chapter.name"
|
||||
:defaultOpen="openChapterDetail(chapter.idx)"
|
||||
<Draggable
|
||||
:list="outline.data"
|
||||
:disabled="!allowEdit"
|
||||
item-key="name"
|
||||
group="chapters"
|
||||
@end="updateChapterOrder"
|
||||
>
|
||||
<DisclosureButton ref="" class="flex items-center w-full p-2 group">
|
||||
<ChevronRight
|
||||
:class="{
|
||||
'rotate-90 transform duration-200': open,
|
||||
'duration-200': !open,
|
||||
hidden: chapter.is_scorm_package,
|
||||
open: index == 1,
|
||||
}"
|
||||
class="h-4 w-4 text-ink-gray-9 stroke-1"
|
||||
/>
|
||||
<div
|
||||
class="text-base text-left text-ink-gray-9 font-medium leading-5 ml-2"
|
||||
@click="redirectToChapter(chapter)"
|
||||
>
|
||||
{{ chapter.title }}
|
||||
</div>
|
||||
<div class="flex ml-auto space-x-4">
|
||||
<Tooltip :text="__('Edit Chapter')" placement="bottom">
|
||||
<FilePenLine
|
||||
v-if="allowEdit"
|
||||
@click.prevent="openChapterModal(chapter)"
|
||||
class="h-4 w-4 text-ink-gray-9 invisible group-hover:visible"
|
||||
/>
|
||||
</Tooltip>
|
||||
<Tooltip :text="__('Delete Chapter')" placement="bottom">
|
||||
<Trash2
|
||||
v-if="allowEdit"
|
||||
@click.prevent="trashChapter(chapter.name)"
|
||||
class="h-4 w-4 text-ink-red-3 invisible group-hover:visible"
|
||||
/>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</DisclosureButton>
|
||||
<DisclosurePanel v-if="!chapter.is_scorm_package">
|
||||
<Draggable
|
||||
v-if="!chapter.is_scorm_package"
|
||||
:list="chapter.lessons"
|
||||
:disabled="!allowEdit"
|
||||
item-key="name"
|
||||
group="items"
|
||||
@end="updateOutline"
|
||||
:data-chapter="chapter.name"
|
||||
>
|
||||
<template #item="{ element: lesson }">
|
||||
<div
|
||||
class="outline-lesson pl-8 py-2 pr-4 text-ink-gray-9"
|
||||
:class="
|
||||
isActiveLesson(lesson.number) ? 'bg-surface-gray-3' : ''
|
||||
"
|
||||
<template #item="{ element: chapter, index }">
|
||||
<div class="chapter-item">
|
||||
<Disclosure
|
||||
v-slot="{ open }"
|
||||
:key="chapter.name"
|
||||
:defaultOpen="openChapterDetail(chapter.idx)"
|
||||
>
|
||||
<DisclosureButton
|
||||
ref=""
|
||||
class="flex items-center w-full p-2 group"
|
||||
>
|
||||
<router-link
|
||||
:to="{
|
||||
name: allowEdit ? 'LessonForm' : 'Lesson',
|
||||
params: {
|
||||
courseName: courseName,
|
||||
chapterNumber: lesson.number.split('.')[0],
|
||||
lessonNumber: lesson.number.split('.')[1],
|
||||
},
|
||||
<ChevronRight
|
||||
:class="{
|
||||
'rotate-90 transform duration-200': open,
|
||||
'duration-200': !open,
|
||||
hidden: chapter.is_scorm_package,
|
||||
open: index == 1,
|
||||
}"
|
||||
class="h-4 w-4 text-ink-gray-9 stroke-1"
|
||||
/>
|
||||
<div
|
||||
class="text-base text-left text-ink-gray-9 font-medium leading-5 ml-2"
|
||||
@click="redirectToChapter(chapter)"
|
||||
>
|
||||
<div class="flex items-center text-sm leading-5 group">
|
||||
<MonitorPlay
|
||||
v-if="lesson.icon === 'icon-youtube'"
|
||||
class="h-4 w-4 stroke-1 mr-2"
|
||||
{{ chapter.title }}
|
||||
</div>
|
||||
<div class="flex ml-auto space-x-4">
|
||||
<Tooltip :text="__('Edit Chapter')" placement="bottom">
|
||||
<FilePenLine
|
||||
v-if="allowEdit"
|
||||
@click.prevent="openChapterModal(chapter)"
|
||||
class="h-4 w-4 text-ink-gray-9 invisible group-hover:visible"
|
||||
/>
|
||||
<HelpCircle
|
||||
v-else-if="lesson.icon === 'icon-quiz'"
|
||||
class="h-4 w-4 stroke-1 mr-2"
|
||||
/>
|
||||
<FileText
|
||||
v-else-if="lesson.icon === 'icon-list'"
|
||||
class="h-4 w-4 text-ink-gray-9 stroke-1 mr-2"
|
||||
/>
|
||||
{{ lesson.title }}
|
||||
</Tooltip>
|
||||
<Tooltip :text="__('Delete Chapter')" placement="bottom">
|
||||
<Trash2
|
||||
v-if="allowEdit"
|
||||
@click.prevent="trashLesson(lesson.name, chapter.name)"
|
||||
class="h-4 w-4 text-ink-red-3 ml-auto invisible group-hover:visible"
|
||||
@click.prevent="trashChapter(chapter.name)"
|
||||
class="h-4 w-4 text-ink-red-3 invisible group-hover:visible"
|
||||
/>
|
||||
<Check
|
||||
v-if="lesson.is_complete"
|
||||
class="h-4 w-4 text-green-700 ml-2"
|
||||
/>
|
||||
</div>
|
||||
</router-link>
|
||||
</div>
|
||||
</template>
|
||||
</Draggable>
|
||||
<div v-if="allowEdit" class="flex mt-2 mb-4 pl-8">
|
||||
<router-link
|
||||
v-if="!chapter.is_scorm_package"
|
||||
:to="{
|
||||
name: 'LessonForm',
|
||||
params: {
|
||||
courseName: courseName,
|
||||
chapterNumber: chapter.idx,
|
||||
lessonNumber: chapter.lessons.length + 1,
|
||||
},
|
||||
}"
|
||||
>
|
||||
<Button>
|
||||
{{ __('Add Lesson') }}
|
||||
</Button>
|
||||
</router-link>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</DisclosureButton>
|
||||
<DisclosurePanel v-if="!chapter.is_scorm_package">
|
||||
<Draggable
|
||||
v-if="!chapter.is_scorm_package"
|
||||
:list="chapter.lessons"
|
||||
:disabled="!allowEdit"
|
||||
item-key="name"
|
||||
group="items"
|
||||
@end="updateOutline"
|
||||
:data-chapter="chapter.name"
|
||||
>
|
||||
<template #item="{ element: lesson }">
|
||||
<div
|
||||
class="outline-lesson pl-8 py-2 pr-4 text-ink-gray-9"
|
||||
:class="
|
||||
isActiveLesson(lesson.number) ? 'bg-surface-gray-3' : ''
|
||||
"
|
||||
>
|
||||
<router-link
|
||||
:to="{
|
||||
name: allowEdit ? 'LessonForm' : 'Lesson',
|
||||
params: {
|
||||
courseName: courseName,
|
||||
chapterNumber: lesson.number.split('.')[0],
|
||||
lessonNumber: lesson.number.split('.')[1],
|
||||
},
|
||||
}"
|
||||
>
|
||||
<div class="flex items-center text-sm leading-5 group">
|
||||
<MonitorPlay
|
||||
v-if="lesson.icon === 'icon-youtube'"
|
||||
class="h-4 w-4 stroke-1 mr-2"
|
||||
/>
|
||||
<HelpCircle
|
||||
v-else-if="lesson.icon === 'icon-quiz'"
|
||||
class="h-4 w-4 stroke-1 mr-2"
|
||||
/>
|
||||
<FileText
|
||||
v-else-if="lesson.icon === 'icon-list'"
|
||||
class="h-4 w-4 text-ink-gray-9 stroke-1 mr-2"
|
||||
/>
|
||||
{{ lesson.title }}
|
||||
<Trash2
|
||||
v-if="allowEdit"
|
||||
@click.prevent="
|
||||
trashLesson(lesson.name, chapter.name)
|
||||
"
|
||||
class="h-4 w-4 text-ink-red-3 ml-auto invisible group-hover:visible"
|
||||
/>
|
||||
<Check
|
||||
v-if="lesson.is_complete"
|
||||
class="h-4 w-4 text-green-700 ml-2"
|
||||
/>
|
||||
</div>
|
||||
</router-link>
|
||||
</div>
|
||||
</template>
|
||||
</Draggable>
|
||||
<div v-if="allowEdit" class="flex mt-2 mb-4 pl-8">
|
||||
<router-link
|
||||
v-if="!chapter.is_scorm_package"
|
||||
:to="{
|
||||
name: 'LessonForm',
|
||||
params: {
|
||||
courseName: courseName,
|
||||
chapterNumber: chapter.idx,
|
||||
lessonNumber: chapter.lessons.length + 1,
|
||||
},
|
||||
}"
|
||||
>
|
||||
<Button>
|
||||
{{ __('Add Lesson') }}
|
||||
</Button>
|
||||
</router-link>
|
||||
</div>
|
||||
</DisclosurePanel>
|
||||
</Disclosure>
|
||||
</div>
|
||||
</DisclosurePanel>
|
||||
</Disclosure>
|
||||
</template>
|
||||
</Draggable>
|
||||
</div>
|
||||
</div>
|
||||
<ChapterModal
|
||||
@@ -148,7 +164,7 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import { Button, createResource, Tooltip, toast } from 'frappe-ui'
|
||||
import { getCurrentInstance, inject, ref } from 'vue'
|
||||
import { getCurrentInstance, inject, ref, watch } from 'vue'
|
||||
import Draggable from 'vuedraggable'
|
||||
import { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/vue'
|
||||
import {
|
||||
@@ -192,18 +208,38 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
lessonProgress: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
})
|
||||
|
||||
const outline = createResource({
|
||||
url: 'lms.lms.utils.get_course_outline',
|
||||
cache: ['course_outline', props.courseName],
|
||||
params: {
|
||||
course: props.courseName,
|
||||
progress: props.getProgress,
|
||||
makeParams() {
|
||||
return {
|
||||
course: props.courseName,
|
||||
progress: props.getProgress,
|
||||
}
|
||||
},
|
||||
auto: true,
|
||||
})
|
||||
|
||||
watch(
|
||||
() => props.courseName,
|
||||
() => {
|
||||
outline.reload()
|
||||
}
|
||||
)
|
||||
|
||||
watch(
|
||||
() => props.lessonProgress,
|
||||
() => {
|
||||
outline.reload()
|
||||
}
|
||||
)
|
||||
|
||||
const deleteLesson = createResource({
|
||||
url: 'lms.lms.api.delete_lesson',
|
||||
makeParams(values) {
|
||||
@@ -233,6 +269,20 @@ const updateLessonIndex = createResource({
|
||||
},
|
||||
})
|
||||
|
||||
const updateChapterIndex = createResource({
|
||||
url: 'lms.lms.api.update_chapter_index',
|
||||
makeParams(values) {
|
||||
return {
|
||||
chapter: values.chapter,
|
||||
course: values.course,
|
||||
idx: values.idx,
|
||||
}
|
||||
},
|
||||
onSuccess() {
|
||||
toast.success(__('Chapter moved successfully'))
|
||||
},
|
||||
})
|
||||
|
||||
const trashLesson = (lessonName, chapterName) => {
|
||||
$dialog({
|
||||
title: __('Delete this lesson?'),
|
||||
@@ -278,6 +328,14 @@ const updateOutline = (e) => {
|
||||
})
|
||||
}
|
||||
|
||||
const updateChapterOrder = (e) => {
|
||||
updateChapterIndex.submit({
|
||||
chapter: e.item.__draggable_context.element.name,
|
||||
course: props.courseName,
|
||||
idx: e.newIndex,
|
||||
})
|
||||
}
|
||||
|
||||
const deleteChapter = createResource({
|
||||
url: 'lms.lms.api.delete_chapter',
|
||||
makeParams(values) {
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<script setup>
|
||||
import { Star } from 'lucide-vue-next'
|
||||
import { createResource, Button } from 'frappe-ui'
|
||||
import { computed, ref, inject } from 'vue'
|
||||
import { watch, ref, inject } from 'vue'
|
||||
import UserAvatar from '@/components/UserAvatar.vue'
|
||||
import ReviewModal from '@/components/Modals/ReviewModal.vue'
|
||||
|
||||
@@ -101,12 +101,21 @@ const hasReviewed = createResource({
|
||||
const reviews = createResource({
|
||||
url: 'lms.lms.utils.get_reviews',
|
||||
cache: ['course_reviews', props.courseName],
|
||||
params: {
|
||||
course: props.courseName,
|
||||
makeParams() {
|
||||
return {
|
||||
course: props.courseName,
|
||||
}
|
||||
},
|
||||
auto: true,
|
||||
})
|
||||
|
||||
watch(
|
||||
() => props.courseName,
|
||||
() => {
|
||||
reviews.reload()
|
||||
}
|
||||
)
|
||||
|
||||
const showReviewModal = ref(false)
|
||||
|
||||
function openReviewModal() {
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
<template>
|
||||
<div class="relative flex h-full flex-col">
|
||||
<div class="h-full flex-1">
|
||||
<div class="flex h-screen text-base bg-surface-white">
|
||||
<div
|
||||
class="relative block min-h-0 flex-shrink-0 overflow-hidden hover:overflow-auto"
|
||||
>
|
||||
<AppSidebar />
|
||||
</div>
|
||||
<div class="w-full overflow-auto" id="scrollContainer">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex h-screen w-screen">
|
||||
<div class="h-full border-r bg-surface-menu-bar">
|
||||
<AppSidebar />
|
||||
</div>
|
||||
<div class="flex-1 flex flex-col h-full overflow-auto bg-surface-white">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
"
|
||||
:options="[
|
||||
{
|
||||
label: 'Edit',
|
||||
label: __('Edit'),
|
||||
onClick() {
|
||||
reply.editable = true
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Delete',
|
||||
label: __('Delete'),
|
||||
onClick() {
|
||||
deleteReply(reply)
|
||||
},
|
||||
@@ -94,10 +94,10 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import { createResource, TextEditor, Button, Dropdown, toast } from 'frappe-ui'
|
||||
import { timeAgo } from '../utils'
|
||||
import { timeAgo } from '@/utils'
|
||||
import UserAvatar from '@/components/UserAvatar.vue'
|
||||
import { ChevronLeft, MoreHorizontal } from 'lucide-vue-next'
|
||||
import { ref, inject, onMounted } from 'vue'
|
||||
import { ref, inject, onMounted, onUnmounted } from 'vue'
|
||||
|
||||
const showTopics = defineModel('showTopics')
|
||||
const newReply = ref('')
|
||||
@@ -251,4 +251,10 @@ const deleteReply = (reply) => {
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
socket.off('publish_message')
|
||||
socket.off('update_message')
|
||||
socket.off('delete_message')
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
class="float-right"
|
||||
@click="openTopicModal()"
|
||||
>
|
||||
<template #prefix>
|
||||
<Plus class="size-4" />
|
||||
</template>
|
||||
{{ __('New {0}').format(singularize(title)) }}
|
||||
</Button>
|
||||
<div class="text-xl font-semibold text-ink-gray-9">
|
||||
@@ -49,7 +52,7 @@
|
||||
class="flex flex-col items-center justify-center border-2 border-dashed mt-5 py-8 rounded-md"
|
||||
>
|
||||
<MessageSquareText class="w-7 h-7 text-ink-gray-4 stroke-1.5 mr-2" />
|
||||
<div class="">
|
||||
<div class="mt-2">
|
||||
<div v-if="emptyStateTitle" class="font-medium mb-2">
|
||||
{{ __(emptyStateTitle) }}
|
||||
</div>
|
||||
@@ -69,11 +72,11 @@
|
||||
<script setup>
|
||||
import { createResource, Button } from 'frappe-ui'
|
||||
import UserAvatar from '@/components/UserAvatar.vue'
|
||||
import { singularize, timeAgo } from '../utils'
|
||||
import { ref, onMounted, inject } from 'vue'
|
||||
import { singularize, timeAgo } from '@/utils'
|
||||
import { ref, onMounted, inject, onUnmounted } from 'vue'
|
||||
import DiscussionReplies from '@/components/DiscussionReplies.vue'
|
||||
import DiscussionModal from '@/components/Modals/DiscussionModal.vue'
|
||||
import { MessageSquareText } from 'lucide-vue-next'
|
||||
import { MessageSquareText, Plus } from 'lucide-vue-next'
|
||||
import { getScrollContainer } from '@/utils/scrollContainer'
|
||||
|
||||
const showTopics = ref(true)
|
||||
@@ -102,7 +105,7 @@ const props = defineProps({
|
||||
},
|
||||
emptyStateText: {
|
||||
type: String,
|
||||
default: 'Start a discussion',
|
||||
default: 'Start a Discussion',
|
||||
},
|
||||
singleThread: {
|
||||
type: Boolean,
|
||||
@@ -153,4 +156,8 @@ const showReplies = (topic) => {
|
||||
const openTopicModal = () => {
|
||||
showTopicModal.value = true
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
socket.off('new_discussion_topic')
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{{ __('No {0}').format(type?.toLowerCase()) }}
|
||||
</div>
|
||||
<div
|
||||
class="leading-5 text-base w-2/5 text-base text-center text-ink-gray-7"
|
||||
class="leading-5 text-base w-full md:w-2/5 text-base text-center text-ink-gray-7"
|
||||
>
|
||||
{{
|
||||
__(
|
||||
|
||||
@@ -1,132 +0,0 @@
|
||||
<template>
|
||||
<div class="flex min-h-0 flex-col text-base">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<div>
|
||||
<div class="text-xl font-semibold mb-1 text-ink-gray-9">
|
||||
{{ __(label) }}
|
||||
</div>
|
||||
<!-- <div class="text-xs text-ink-gray-5">
|
||||
{{ __(description) }}
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="flex item-center space-x-2">
|
||||
<FormControl
|
||||
v-model="search"
|
||||
:placeholder="__('Search')"
|
||||
type="text"
|
||||
:debounce="300"
|
||||
/>
|
||||
<Button @click="() => (showForm = !showForm)">
|
||||
<template #prefix>
|
||||
<Plus v-if="!showForm" class="size-4 stroke-1.5" />
|
||||
<X v-else class="size-4 stroke-1.5" />
|
||||
</template>
|
||||
{{ showForm ? __('Close') : __('New') }}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Form to add new member -->
|
||||
<div v-if="showForm" class="flex items-center space-x-2 my-4">
|
||||
<FormControl
|
||||
v-model="email"
|
||||
:placeholder="__('Email')"
|
||||
type="email"
|
||||
class="w-full"
|
||||
/>
|
||||
<Button @click="addEvaluator()" variant="subtle">
|
||||
{{ __('Add') }}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div class="overflow-y-scroll">
|
||||
<div class="divide-y">
|
||||
<div
|
||||
v-for="evaluator in evaluators.data"
|
||||
@click="openProfile(evaluator.username)"
|
||||
class="cursor-pointer"
|
||||
>
|
||||
<div class="flex items-center justify-between py-3">
|
||||
<div class="flex items-center space-x-3">
|
||||
<Avatar
|
||||
:image="evaluator.user_image"
|
||||
:label="evaluator.full_name"
|
||||
size="lg"
|
||||
/>
|
||||
<div>
|
||||
<div class="text-base font-semibold text-ink-gray-9">
|
||||
{{ evaluator.full_name }}
|
||||
</div>
|
||||
<div class="text-xs text-ink-gray-5">
|
||||
{{ evaluator.evaluator }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { createResource, Button, FormControl, call, Avatar } from 'frappe-ui'
|
||||
import { ref, watch } from 'vue'
|
||||
import { Plus, X } from 'lucide-vue-next'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const show = defineModel('show')
|
||||
const search = ref('')
|
||||
const showForm = ref(false)
|
||||
const email = ref('')
|
||||
const router = useRouter()
|
||||
|
||||
const props = defineProps({
|
||||
label: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
description: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
show: {
|
||||
type: Boolean,
|
||||
},
|
||||
})
|
||||
|
||||
const evaluators = createResource({
|
||||
url: 'frappe.client.get_list',
|
||||
makeParams: () => {
|
||||
return {
|
||||
doctype: 'Course Evaluator',
|
||||
fields: ['evaluator', 'full_name', 'user_image', 'username'],
|
||||
filters: search.value ? { evaluator: ['like', `%${search.value}%`] } : {},
|
||||
}
|
||||
},
|
||||
auto: true,
|
||||
})
|
||||
|
||||
const addEvaluator = () => {
|
||||
call('lms.lms.api.add_an_evaluator', {
|
||||
email: email.value,
|
||||
}).then((data) => {
|
||||
showForm.value = false
|
||||
email.value = ''
|
||||
evaluators.reload()
|
||||
})
|
||||
}
|
||||
|
||||
watch(search, () => {
|
||||
evaluators.reload()
|
||||
})
|
||||
|
||||
const openProfile = (username) => {
|
||||
show.value = false
|
||||
router.push({
|
||||
name: 'Profile',
|
||||
params: {
|
||||
username: username,
|
||||
},
|
||||
})
|
||||
}
|
||||
</script>
|
||||
97
frontend/src/components/InstallPrompt.vue
Normal file
@@ -0,0 +1,97 @@
|
||||
<template>
|
||||
<Dialog v-model="showDialog">
|
||||
<template #body-title>
|
||||
<h2 class="text-lg font-bold">{{ __('Install Frappe Learning') }}</h2>
|
||||
</template>
|
||||
<template #body-content>
|
||||
<p>
|
||||
{{
|
||||
__(
|
||||
'Get the app on your device for easy access & a better experience!'
|
||||
)
|
||||
}}
|
||||
</p>
|
||||
</template>
|
||||
<template #actions>
|
||||
<Button variant="solid" class="w-full py-5" @click="install">
|
||||
<template #prefix><FeatherIcon name="download" class="w-4" /></template>
|
||||
{{ __('Install') }}
|
||||
</Button>
|
||||
</template>
|
||||
</Dialog>
|
||||
|
||||
<Popover :show="iosInstallMessage" placement="top-start">
|
||||
<template #body>
|
||||
<div
|
||||
class="fixed top-[20rem] translate-x-1/3 z-20 flex flex-col gap-3 rounded bg-surface-white py-5 drop-shadow-xl"
|
||||
>
|
||||
<div
|
||||
class="mb-1 flex flex-row items-center justify-between px-3 text-center"
|
||||
>
|
||||
<span class="text-base font-bold text-gray-900">
|
||||
{{ __('Install Frappe Learning') }}
|
||||
</span>
|
||||
<span class="inline-flex items-baseline">
|
||||
<FeatherIcon
|
||||
name="x"
|
||||
class="ml-auto h-4 w-4 text-gray-700"
|
||||
@click="iosInstallMessage = false"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
<div class="px-3 text-xs text-gray-800">
|
||||
<span class="flex flex-col gap-2">
|
||||
<span class="leading-5">
|
||||
{{
|
||||
__(
|
||||
'Get the app on your iPhone for easy access & a better experience'
|
||||
)
|
||||
}}
|
||||
</span>
|
||||
<span class="inline-flex items-start whitespace-nowrap">
|
||||
<span>{{ __('Tap') }} </span>
|
||||
<FeatherIcon name="share" class="h-4 w-4 text-blue-600" />
|
||||
<span> {{ __("and then 'Add to Home Screen'") }}</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</Popover>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { Button, Dialog, FeatherIcon, Popover } from 'frappe-ui'
|
||||
|
||||
const deferredPrompt = ref(null)
|
||||
const showDialog = ref(false)
|
||||
const iosInstallMessage = ref(false)
|
||||
|
||||
const isIos = () => {
|
||||
const userAgent = window.navigator.userAgent.toLowerCase()
|
||||
return /iphone|ipad|ipod/.test(userAgent)
|
||||
}
|
||||
|
||||
const isInStandaloneMode = () =>
|
||||
'standalone' in window.navigator && window.navigator.standalone
|
||||
|
||||
if (isIos() && !isInStandaloneMode()) iosInstallMessage.value = true
|
||||
|
||||
window.addEventListener('beforeinstallprompt', (e) => {
|
||||
e.preventDefault()
|
||||
deferredPrompt.value = e
|
||||
if (isIos() && !isInStandaloneMode()) iosInstallMessage.value = true
|
||||
else showDialog.value = true
|
||||
})
|
||||
|
||||
window.addEventListener('appinstalled', () => {
|
||||
showDialog.value = false
|
||||
deferredPrompt.value = null
|
||||
})
|
||||
|
||||
const install = () => {
|
||||
deferredPrompt.value.prompt()
|
||||
showDialog.value = false
|
||||
}
|
||||
</script>
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div
|
||||
class="flex flex-col border rounded-md p-3 h-full hover:border-outline-gray-4"
|
||||
class="flex flex-col border rounded-md p-3 h-full hover:border-outline-gray-3"
|
||||
>
|
||||
<div class="flex space-x-4 mb-4">
|
||||
<div class="flex flex-col space-y-2 flex-1">
|
||||
<div class="flex flex-col space-y-2 flex-1 break-all">
|
||||
<div class="text-lg font-semibold text-ink-gray-9">
|
||||
{{ job.company_name }}
|
||||
</div>
|
||||
@@ -33,6 +33,9 @@
|
||||
<Badge>
|
||||
{{ job.type }}
|
||||
</Badge>
|
||||
<Badge v-if="job.work_mode">
|
||||
{{ job.work_mode }}
|
||||
</Badge>
|
||||
<Badge>
|
||||
{{ dayjs(job.creation).fromNow() }}
|
||||
</Badge>
|
||||
|
||||
@@ -9,6 +9,16 @@
|
||||
allowfullscreen
|
||||
></iframe>
|
||||
</div>
|
||||
<div v-if="rutube">
|
||||
<iframe
|
||||
class="rutube-video"
|
||||
:src="getRutubeVideoSource(rutube.split('/').pop())"
|
||||
width="100%"
|
||||
:height="screenSize.width < 640 ? 200 : 400"
|
||||
frameborder="0"
|
||||
allowfullscreen
|
||||
></iframe>
|
||||
</div>
|
||||
<div v-for="block in content?.split('\n\n')">
|
||||
<div v-if="block.includes('{{ YouTubeVideo')">
|
||||
<iframe
|
||||
@@ -20,6 +30,16 @@
|
||||
allowfullscreen
|
||||
></iframe>
|
||||
</div>
|
||||
<div v-else-if="block.includes('{{ RutubeVideo')">
|
||||
<iframe
|
||||
class="rutube-video"
|
||||
:src="getRutubeVideoSource(block)"
|
||||
width="100%"
|
||||
:height="screenSize.width < 640 ? 200 : 400"
|
||||
frameborder="0"
|
||||
allowfullscreen
|
||||
></iframe>
|
||||
</div>
|
||||
<div v-else-if="block.includes('{{ Quiz')">
|
||||
<Quiz :quiz="getId(block)" />
|
||||
</div>
|
||||
@@ -97,6 +117,13 @@ const getYouTubeVideoSource = (block) => {
|
||||
return `https://www.youtube.com/embed/${block}`
|
||||
}
|
||||
|
||||
const getRutubeVideoSource = (block) => {
|
||||
if (block.includes('{{')) {
|
||||
block = getId(block)
|
||||
}
|
||||
return `https://rutube.ru/play/embed/${block}`
|
||||
}
|
||||
|
||||
const getPDFSource = (block) => {
|
||||
return `${getId(block)}#toolbar=0`
|
||||
}
|
||||
@@ -105,3 +132,11 @@ const getId = (block) => {
|
||||
return block.match(/\(["']([^"']+?)["']\)/)[1]
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.youtube-video,
|
||||
.rutube-video {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -15,60 +15,18 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="space-y-2">
|
||||
<div class="space-y-2" v-for="(item, key) in contentMap" :key="key">
|
||||
<div
|
||||
class="flex items-center text-sm font-medium space-x-2 cursor-pointer"
|
||||
@click="openHelpDialog('quiz')"
|
||||
@click="openHelpDialog(key)"
|
||||
>
|
||||
<span>
|
||||
{{ __('How to add a Quiz?') }}
|
||||
{{ __(item.title) }}
|
||||
</span>
|
||||
<Info class="w-3 h-3 text-ink-gray-7" />
|
||||
</div>
|
||||
<div class="text-xs text-ink-gray-5 mb-1 leading-5">
|
||||
{{
|
||||
__(
|
||||
'Click on the add icon in the editor and select Quiz from the menu. It opens up a dialog, where you can either select a quiz from the list or create a new quiz. When you select the Create New option it redirects you to the quiz creation page.'
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="space-y-2">
|
||||
<div
|
||||
class="flex text-sm font-medium space-x-2 cursor-pointer"
|
||||
@click="openHelpDialog('upload')"
|
||||
>
|
||||
<span class="leading-5">
|
||||
{{ __(contentMap['upload']) }}
|
||||
</span>
|
||||
<Info class="w-3 h-3 text-ink-gray-7" />
|
||||
</div>
|
||||
<div class="text-xs text-ink-gray-5 mb-1 leading-5">
|
||||
{{
|
||||
__(
|
||||
'To upload Image, Video, Audio or PDF from your system, click on the add icon and select upload from the menu. Then choose the file you want to add to the lesson and it gets added to your lesson.'
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="space-y-2">
|
||||
<div
|
||||
class="flex items-center text-sm font-medium space-x-2 cursor-pointer"
|
||||
@click="openHelpDialog('youtube')"
|
||||
>
|
||||
<span>
|
||||
{{ __(contentMap['youtube']) }}
|
||||
</span>
|
||||
<Info class="w-3 h-3 text-ink-gray-7" />
|
||||
</div>
|
||||
<div class="text-xs text-ink-gray-5 mb-1 leading-5">
|
||||
{{
|
||||
__(
|
||||
'Copy the URL of the video from YouTube and paste it in the editor.'
|
||||
)
|
||||
}}
|
||||
{{ __(item.description) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -83,14 +41,31 @@ const showExplanation = ref(false)
|
||||
const type = ref(null)
|
||||
const title = ref(null)
|
||||
const contentMap = {
|
||||
quiz: 'How to add a Quiz?',
|
||||
upload: 'How to upload content from your system?',
|
||||
youtube: 'How to add a YouTube Video?',
|
||||
quiz: {
|
||||
title: 'How to add a Quiz?',
|
||||
description:
|
||||
'Click on the add icon in the editor and select Quiz from the menu. It opens up a dialog, where you can either select a quiz from the list or create a new quiz. When you select the Create New option it redirects you to the quiz creation page.',
|
||||
},
|
||||
upload: {
|
||||
title: 'How to upload content from your system?',
|
||||
description:
|
||||
'To upload Image, Video, Audio or PDF from your system, click on the add icon and select upload from the menu. Then choose the file you want to add to the lesson and it gets added to your lesson.',
|
||||
},
|
||||
youtube: {
|
||||
title: 'How to add a YouTube Video/RuTube?',
|
||||
description:
|
||||
'Copy the URL of the video from YouTube/RuTube and paste it in the editor.',
|
||||
},
|
||||
remove: {
|
||||
title: 'How to remove an embed?',
|
||||
description:
|
||||
'To remove an embed like YouTube or Vimeo, put your cursor on the line below the embed, then drag your mouse cursor upwards to select the embed. Once the embed is selected press BackSpace.',
|
||||
},
|
||||
}
|
||||
|
||||
const openHelpDialog = (contentType) => {
|
||||
type.value = contentType
|
||||
title.value = contentMap[contentType]
|
||||
title.value = contentMap[contentType].title
|
||||
showExplanation.value = true
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
<template>
|
||||
<div class="flex items-center justify-between mb-5">
|
||||
<div
|
||||
v-if="hasPermission() && !props.zoomAccount"
|
||||
class="flex items-center space-x-2 mb-5 bg-surface-amber-1 py-1 px-2 rounded-md text-ink-amber-3"
|
||||
>
|
||||
<AlertCircle class="size-4 stroke-1.5" />
|
||||
<span>
|
||||
{{ __('Please add a zoom account to the batch to create live classes.') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="text-lg font-semibold text-ink-gray-9">
|
||||
{{ __('Live Class') }}
|
||||
</div>
|
||||
@@ -12,10 +22,21 @@
|
||||
</span>
|
||||
</Button>
|
||||
</div>
|
||||
<div v-if="liveClasses.data?.length" class="grid grid-cols-2 gap-5">
|
||||
<div
|
||||
v-if="liveClasses.data?.length"
|
||||
class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5 mt-5"
|
||||
>
|
||||
<div
|
||||
v-for="cls in liveClasses.data"
|
||||
class="flex flex-col border rounded-md h-full text-ink-gray-7 p-3"
|
||||
class="flex flex-col border rounded-md h-full text-ink-gray-7 hover:border-outline-gray-3 p-3"
|
||||
:class="{
|
||||
'cursor-pointer': hasPermission() && cls.attendees > 0,
|
||||
}"
|
||||
@click="
|
||||
() => {
|
||||
openAttendanceModal(cls)
|
||||
}
|
||||
"
|
||||
>
|
||||
<div class="font-semibold text-ink-gray-9 text-lg mb-1">
|
||||
{{ cls.title }}
|
||||
@@ -23,7 +44,7 @@
|
||||
<div class="short-introduction">
|
||||
{{ cls.description }}
|
||||
</div>
|
||||
<div class="space-y-3">
|
||||
<div class="mt-auto space-y-3">
|
||||
<div class="flex items-center space-x-2">
|
||||
<Calendar class="w-4 h-4 stroke-1.5" />
|
||||
<span>
|
||||
@@ -33,18 +54,20 @@
|
||||
<div class="flex items-center space-x-2">
|
||||
<Clock class="w-4 h-4 stroke-1.5" />
|
||||
<span>
|
||||
{{ formatTime(cls.time) }}
|
||||
{{ dayjs(getClassStart(cls)).format('hh:mm A') }} -
|
||||
{{ dayjs(getClassEnd(cls)).format('hh:mm A') }}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="cls.date >= dayjs().format('YYYY-MM-DD')"
|
||||
v-if="canAccessClass(cls)"
|
||||
class="flex items-center space-x-2 text-ink-gray-9 mt-auto"
|
||||
>
|
||||
<a
|
||||
v-if="user.data?.is_moderator || user.data?.is_evaluator"
|
||||
:href="cls.start_url"
|
||||
target="_blank"
|
||||
class="w-1/2 cursor-pointer inline-flex items-center justify-center gap-2 transition-colors focus:outline-none text-ink-gray-8 bg-surface-gray-2 hover:bg-surface-gray-3 active:bg-surface-gray-4 focus-visible:ring focus-visible:ring-outline-gray-3 h-7 text-base px-2 rounded"
|
||||
class="cursor-pointer inline-flex items-center justify-center gap-2 transition-colors focus:outline-none text-ink-gray-8 bg-surface-gray-2 hover:bg-surface-gray-3 active:bg-surface-gray-4 focus-visible:ring focus-visible:ring-outline-gray-3 h-7 text-base px-2 rounded"
|
||||
:class="cls.join_url ? 'w-full' : 'w-1/2'"
|
||||
>
|
||||
<Monitor class="h-4 w-4 stroke-1.5" />
|
||||
{{ __('Start') }}
|
||||
@@ -58,42 +81,63 @@
|
||||
{{ __('Join') }}
|
||||
</a>
|
||||
</div>
|
||||
<div v-else class="flex items-center space-x-2 text-yellow-700">
|
||||
<Info class="w-4 h-4 stroke-1.5" />
|
||||
<span>
|
||||
{{ __('This class has ended') }}
|
||||
</span>
|
||||
</div>
|
||||
<Tooltip
|
||||
v-else-if="hasClassEnded(cls)"
|
||||
:text="__('This class has ended')"
|
||||
placement="right"
|
||||
>
|
||||
<div class="flex items-center space-x-2 text-ink-amber-3 w-fit">
|
||||
<Info class="w-4 h-4 stroke-1.5" />
|
||||
<span>
|
||||
{{ __('Ended') }}
|
||||
</span>
|
||||
</div>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="text-sm italic text-ink-gray-5">
|
||||
<div v-else class="text-sm italic text-ink-gray-5 mt-2">
|
||||
{{ __('No live classes scheduled') }}
|
||||
</div>
|
||||
|
||||
<LiveClassModal
|
||||
:batch="props.batch"
|
||||
:zoomAccount="props.zoomAccount"
|
||||
v-model="showLiveClassModal"
|
||||
v-model:reloadLiveClasses="liveClasses"
|
||||
/>
|
||||
|
||||
<LiveClassAttendance v-model="showAttendance" :live_class="attendanceFor" />
|
||||
</template>
|
||||
<script setup>
|
||||
import { createListResource, Button } from 'frappe-ui'
|
||||
import { Plus, Clock, Calendar, Video, Monitor, Info } from 'lucide-vue-next'
|
||||
import { inject } from 'vue'
|
||||
import LiveClassModal from '@/components/Modals/LiveClassModal.vue'
|
||||
import { ref } from 'vue'
|
||||
import { createListResource, Button, Tooltip } from 'frappe-ui'
|
||||
import {
|
||||
Plus,
|
||||
Clock,
|
||||
Calendar,
|
||||
Video,
|
||||
Monitor,
|
||||
Info,
|
||||
AlertCircle,
|
||||
} from 'lucide-vue-next'
|
||||
import { inject, ref } from 'vue'
|
||||
import { formatTime } from '@/utils/'
|
||||
import LiveClassModal from '@/components/Modals/LiveClassModal.vue'
|
||||
import LiveClassAttendance from '@/components/Modals/LiveClassAttendance.vue'
|
||||
|
||||
const user = inject('$user')
|
||||
const showLiveClassModal = ref(false)
|
||||
const dayjs = inject('$dayjs')
|
||||
const readOnlyMode = window.read_only_mode
|
||||
const showAttendance = ref(false)
|
||||
const attendanceFor = ref(null)
|
||||
|
||||
const props = defineProps({
|
||||
batch: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
zoomAccount: String,
|
||||
})
|
||||
|
||||
const liveClasses = createListResource({
|
||||
@@ -106,6 +150,8 @@ const liveClasses = createListResource({
|
||||
'description',
|
||||
'time',
|
||||
'date',
|
||||
'duration',
|
||||
'attendees',
|
||||
'start_url',
|
||||
'join_url',
|
||||
'owner',
|
||||
@@ -120,8 +166,42 @@ const openLiveClassModal = () => {
|
||||
|
||||
const canCreateClass = () => {
|
||||
if (readOnlyMode) return false
|
||||
if (!props.zoomAccount) return false
|
||||
return hasPermission()
|
||||
}
|
||||
|
||||
const hasPermission = () => {
|
||||
return user.data?.is_moderator || user.data?.is_evaluator
|
||||
}
|
||||
|
||||
const canAccessClass = (cls) => {
|
||||
if (cls.date < dayjs().format('YYYY-MM-DD')) return false
|
||||
if (cls.date > dayjs().format('YYYY-MM-DD')) return false
|
||||
if (hasClassEnded(cls)) return false
|
||||
return true
|
||||
}
|
||||
|
||||
const getClassStart = (cls) => {
|
||||
return new Date(`${cls.date}T${cls.time}`)
|
||||
}
|
||||
|
||||
const getClassEnd = (cls) => {
|
||||
const classStart = getClassStart(cls)
|
||||
return new Date(classStart.getTime() + cls.duration * 60000)
|
||||
}
|
||||
|
||||
const hasClassEnded = (cls) => {
|
||||
const classEnd = getClassEnd(cls)
|
||||
const now = new Date()
|
||||
return now > classEnd
|
||||
}
|
||||
|
||||
const openAttendanceModal = (cls) => {
|
||||
if (!hasPermission()) return
|
||||
if (cls.attendees <= 0) return
|
||||
showAttendance.value = true
|
||||
attendanceFor.value = cls
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.short-introduction {
|
||||
|
||||
@@ -54,32 +54,34 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { getSidebarLinks } from '../utils'
|
||||
import { getSidebarLinks } from '@/utils'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { call } from 'frappe-ui'
|
||||
import { watch, ref, onMounted } from 'vue'
|
||||
import { sessionStore } from '@/stores/session'
|
||||
import { useSettings } from '@/stores/settings'
|
||||
import { usersStore } from '@/stores/user'
|
||||
import * as icons from 'lucide-vue-next'
|
||||
|
||||
const { logout, user, sidebarSettings } = sessionStore()
|
||||
const { logout, user } = sessionStore()
|
||||
let { isLoggedIn } = sessionStore()
|
||||
const { sidebarSettings } = useSettings()
|
||||
const router = useRouter()
|
||||
let { userResource } = usersStore()
|
||||
const sidebarLinks = ref(getSidebarLinks())
|
||||
const otherLinks = ref([])
|
||||
const showMenu = ref(false)
|
||||
const menu = ref(null)
|
||||
const isModerator = ref(false)
|
||||
const isInstructor = ref(false)
|
||||
|
||||
onMounted(() => {
|
||||
sidebarSettings.reload(
|
||||
{},
|
||||
{
|
||||
onSuccess(data) {
|
||||
filterLinksToShow(data)
|
||||
addOtherLinks()
|
||||
},
|
||||
}
|
||||
)
|
||||
// Вызываем addSideBar только если userResource уже загружен
|
||||
if (userResource.data) {
|
||||
addSideBar()
|
||||
}
|
||||
addOtherLinks()
|
||||
filterLinksToShow(data)
|
||||
})
|
||||
|
||||
const handleOutsideClick = (e) => {
|
||||
@@ -108,55 +110,196 @@ const filterLinksToShow = (data) => {
|
||||
})
|
||||
}
|
||||
|
||||
const addSideBar = () => {
|
||||
sidebarLinks.value = [] // Очищаем, чтобы избежать дублирования
|
||||
|
||||
// Проверяем роли пользователя
|
||||
const roles = userResource.data?.roles || []
|
||||
|
||||
sidebarLinks.value.push({
|
||||
label: __('Courses'),
|
||||
icon: 'BookOpen',
|
||||
to: 'Courses',
|
||||
activeFor: [
|
||||
'Courses',
|
||||
'CourseDetail',
|
||||
'Lesson',
|
||||
'CourseForm',
|
||||
'LessonForm',
|
||||
],
|
||||
})
|
||||
|
||||
sidebarLinks.value.push({
|
||||
label: __('Leader Board'),
|
||||
icon: 'Trophy',
|
||||
to: 'LeaderBoard',
|
||||
activeFor: [],
|
||||
})
|
||||
|
||||
if (roles.includes('LMS Student') || roles.includes('LMS Schoolchild')) {
|
||||
otherLinks.value.push({
|
||||
label: __('My points'),
|
||||
icon: 'Award',
|
||||
to: 'MyPoints',
|
||||
activeFor: [],
|
||||
})
|
||||
}
|
||||
|
||||
if (roles.includes('Parent')) {
|
||||
otherLinks.value.push({
|
||||
label: __('My Child'),
|
||||
icon: 'User',
|
||||
to: 'my-child',
|
||||
external: true,
|
||||
activeFor: [],
|
||||
})
|
||||
}
|
||||
|
||||
let chatGPTURL = ''
|
||||
let chatGPTLabel = ''
|
||||
|
||||
if (roles.includes('LMS Schoolchild')) {
|
||||
chatGPTURL = 'chatgpt-schoolchild'
|
||||
chatGPTLabel = __('ChatGPT for Schoolers')
|
||||
} else if (roles.includes('LMS Student')) {
|
||||
chatGPTURL = 'chatgpt-schoolchild'
|
||||
chatGPTLabel = __('ChatGPT for Students')
|
||||
} else if (roles.includes('Course Creator')) {
|
||||
chatGPTURL = 'ai-teachers'
|
||||
chatGPTLabel = __('ChatGPT for Teachers')
|
||||
}
|
||||
|
||||
if (chatGPTURL) {
|
||||
sidebarLinks.value.push({
|
||||
label: chatGPTLabel,
|
||||
icon: 'Cpu',
|
||||
to: chatGPTURL,
|
||||
external: true,
|
||||
activeFor: [],
|
||||
})
|
||||
}
|
||||
}
|
||||
const addOtherLinks = () => {
|
||||
otherLinks.value = []
|
||||
|
||||
if (user) {
|
||||
const roles = userResource.data?.roles || []
|
||||
|
||||
if (!userResource.data?.is_instructor && !userResource.data?.is_moderator) {
|
||||
otherLinks.value.push({
|
||||
label: __('Programs'),
|
||||
icon: 'Route',
|
||||
to: 'Programs',
|
||||
activeFor: ['Programs', 'ProgramForm', 'CourseDetail', 'Lesson'],
|
||||
})
|
||||
} else if (userResource.data?.is_instructor || userResource.data?.is_moderator) {
|
||||
otherLinks.value.push({
|
||||
label: __('Programs'),
|
||||
icon: 'Route',
|
||||
to: 'Programs',
|
||||
activeFor: ['Programs', 'ProgramForm'],
|
||||
})
|
||||
}
|
||||
|
||||
if (userResource.data?.is_moderator || userResource.data?.is_instructor) {
|
||||
otherLinks.value.push({
|
||||
label: __('Quizzes'),
|
||||
icon: 'CircleHelp',
|
||||
to: 'Quizzes',
|
||||
activeFor: [
|
||||
'Quizzes',
|
||||
'QuizForm',
|
||||
'QuizSubmissionList',
|
||||
'QuizSubmission',
|
||||
],
|
||||
})
|
||||
|
||||
otherLinks.value.push({
|
||||
label: __('Assignments'),
|
||||
icon: 'Pencil',
|
||||
to: 'Assignments',
|
||||
activeFor: [
|
||||
'Assignments',
|
||||
'AssignmentForm',
|
||||
'AssignmentSubmissionList',
|
||||
'AssignmentSubmission',
|
||||
],
|
||||
}),
|
||||
otherLinks.value.push({
|
||||
label: 'Programming Exercises',
|
||||
icon: 'Code',
|
||||
to: 'ProgrammingExercises',
|
||||
})
|
||||
}
|
||||
|
||||
if (roles.includes('LMS Student') || roles.includes('LMS Schoolchild')) {
|
||||
otherLinks.value.push({
|
||||
label: __('My points'),
|
||||
icon: 'Award',
|
||||
to: 'my_points',
|
||||
external: true,
|
||||
activeFor: [],
|
||||
})
|
||||
}
|
||||
|
||||
let chatGPTURL = ''
|
||||
let chatGPTLabel = ''
|
||||
|
||||
if (roles.includes('LMS Schoolchild')) {
|
||||
chatGPTURL = 'chatgpt-schoolchild'
|
||||
chatGPTLabel = __('ChatGPT for Schoolers')
|
||||
} else if (roles.includes('LMS Student')) {
|
||||
chatGPTURL = 'chatgpt-schoolchild'
|
||||
chatGPTLabel = __('ChatGPT for Students')
|
||||
} else if (roles.includes('Course Creator')) {
|
||||
chatGPTURL = 'ai-teachers'
|
||||
chatGPTLabel = __('ChatGPT for Teachers')
|
||||
}
|
||||
|
||||
if (chatGPTURL) {
|
||||
otherLinks.value.push({
|
||||
label: chatGPTLabel,
|
||||
icon: 'Cpu',
|
||||
to: chatGPTURL,
|
||||
external: true,
|
||||
activeFor: [],
|
||||
})
|
||||
}
|
||||
|
||||
otherLinks.value.push({
|
||||
label: 'Notifications',
|
||||
icon: 'Bell',
|
||||
to: 'Notifications',
|
||||
label: __('Leader Board'),
|
||||
icon: 'Trophy',
|
||||
to: 'leaderboardsample',
|
||||
external: true,
|
||||
activeFor: [],
|
||||
})
|
||||
|
||||
otherLinks.value.push({
|
||||
label: 'Profile',
|
||||
label: __('Profile'),
|
||||
icon: 'UserRound',
|
||||
to: 'Profile',
|
||||
params: { username: userResource.data?.username },
|
||||
})
|
||||
|
||||
otherLinks.value.push({
|
||||
label: 'Log out',
|
||||
label: __('Log out'),
|
||||
icon: 'LogOut',
|
||||
})
|
||||
} else {
|
||||
otherLinks.value.push({
|
||||
label: 'Log in',
|
||||
label: __('Log in'),
|
||||
icon: 'LogIn',
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
watch(userResource, () => {
|
||||
if (
|
||||
userResource.data &&
|
||||
(userResource.data.is_moderator || userResource.data.is_instructor)
|
||||
) {
|
||||
addQuizzes()
|
||||
addAssignments()
|
||||
if (userResource.data) {
|
||||
addSideBar() // Обновляем sidebarLinks при изменении userResource
|
||||
addOtherLinks() // Обновляем otherLinks
|
||||
}
|
||||
})
|
||||
|
||||
const addQuizzes = () => {
|
||||
otherLinks.value.push({
|
||||
label: 'Quizzes',
|
||||
icon: 'CircleHelp',
|
||||
to: 'Quizzes',
|
||||
})
|
||||
}
|
||||
|
||||
const addAssignments = () => {
|
||||
otherLinks.value.push({
|
||||
label: 'Assignments',
|
||||
icon: 'Pencil',
|
||||
to: 'Assignments',
|
||||
})
|
||||
}
|
||||
|
||||
let isActive = (tab) => {
|
||||
return tab.activeFor?.includes(router.currentRoute.value.name)
|
||||
}
|
||||
@@ -174,6 +317,7 @@ const handleClick = (tab) => {
|
||||
username: userResource.data?.username,
|
||||
},
|
||||
})
|
||||
else if (tab.external) window.location.href = `/${tab.to}`
|
||||
else router.push({ name: tab.to })
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
<div class="">
|
||||
<div class="mb-1.5 text-sm text-ink-gray-5">
|
||||
{{ __('Reply To') }}
|
||||
<span class="text-ink-red-3">*</span>
|
||||
</div>
|
||||
<Input type="text" v-model="announcement.replyTo" />
|
||||
</div>
|
||||
@@ -70,8 +71,8 @@ const announcementResource = createResource({
|
||||
url: 'frappe.core.doctype.communication.email.make',
|
||||
makeParams(values) {
|
||||
return {
|
||||
recipients: props.students.join(', '),
|
||||
cc: announcement.replyTo,
|
||||
recipients: announcement.replyTo,
|
||||
bcc: props.students.join(', '),
|
||||
subject: announcement.subject,
|
||||
content: announcement.announcement,
|
||||
doctype: 'LMS Batch',
|
||||
@@ -95,6 +96,9 @@ const makeAnnouncement = (close) => {
|
||||
if (!announcement.announcement) {
|
||||
return __('Announcement is required')
|
||||
}
|
||||
if (!announcement.replyTo) {
|
||||
return __('Reply To is required')
|
||||
}
|
||||
},
|
||||
onSuccess() {
|
||||
close()
|
||||
|
||||
@@ -99,6 +99,7 @@ const assessmentTypes = computed(() => {
|
||||
return [
|
||||
{ label: 'Quiz', value: 'LMS Quiz' },
|
||||
{ label: 'Assignment', value: 'LMS Assignment' },
|
||||
{ label: 'Programming Exercise', value: 'LMS Programming Exercise' },
|
||||
]
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -113,6 +113,14 @@ watch(
|
||||
{ flush: 'post' }
|
||||
)
|
||||
|
||||
watch(show, (newVal) => {
|
||||
if (newVal && props.assignmentID === 'new') {
|
||||
assignment.title = ''
|
||||
assignment.type = ''
|
||||
assignment.question = ''
|
||||
}
|
||||
})
|
||||
|
||||
const saveAssignment = () => {
|
||||
if (props.assignmentID == 'new') {
|
||||
assignments.value.insert.submit(
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<Avatar :image="student.user_image" size="3xl" />
|
||||
<div class="space-y-1">
|
||||
<div class="flex items-center space-x-2">
|
||||
<div class="text-xl font-semibold">
|
||||
<div class="text-xl font-semibold text-ink-gray-9">
|
||||
{{ student.full_name }}
|
||||
</div>
|
||||
<Badge
|
||||
@@ -36,7 +36,9 @@
|
||||
v-if="Object.keys(student.assessments).length"
|
||||
class="space-y-2 text-sm"
|
||||
>
|
||||
<div class="flex items-center border-b pb-1 font-medium">
|
||||
<div
|
||||
class="flex items-center border-b pb-1 font-medium text-ink-gray-9"
|
||||
>
|
||||
<span class="flex-1">
|
||||
{{ __('Assessment') }}
|
||||
</span>
|
||||
@@ -86,7 +88,9 @@
|
||||
v-if="Object.keys(student.courses).length"
|
||||
class="space-y-2 text-sm"
|
||||
>
|
||||
<div class="flex items-center border-b pb-1 font-medium">
|
||||
<div
|
||||
class="flex items-center border-b pb-1 font-medium text-ink-gray-9"
|
||||
>
|
||||
<span class="flex-1">
|
||||
{{ __('Courses') }}
|
||||
</span>
|
||||
|
||||