signup & download pages
signup and download pages behave the same way to the legacy site
This commit is contained in:
parent
04a45394a0
commit
1d0a01c7ee
|
|
@ -5,4 +5,6 @@ REACT_APP_CLIENT_BASE_URL=http://www.jamkazam.local:3000
|
|||
REACT_APP_API_BASE_URL=http://www.jamkazam.local:3000/api
|
||||
REACT_APP_BITBUCKET_BUILD_NUMBER=dev
|
||||
REACT_APP_BITBUCKET_COMMIT=dev
|
||||
REACT_APP_ENV=development
|
||||
REACT_APP_ENV=development
|
||||
REACT_APP_RECAPTCHA_ENABLED=false
|
||||
REACT_APP_SITE_KEY=6Let8dgSAAAAAFheKGWrs6iaq_hIlPOZ2f3Bb56B
|
||||
|
|
@ -3,4 +3,6 @@ PORT=4000
|
|||
REACT_APP_ORIGIN=jamkazam.com
|
||||
REACT_APP_CLIENT_BASE_URL=https://www.jamkazam.com
|
||||
REACT_APP_API_BASE_URL=https://www.jamkazam.com/api
|
||||
REACT_APP_ENV=production
|
||||
REACT_APP_ENV=production
|
||||
REACT_APP_RECAPTCHA_ENABLED=true
|
||||
REACT_APP_SITE_KEY=6Let8dgSAAAAAFheKGWrs6iaq_hIlPOZ2f3Bb56B
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -61,6 +61,7 @@
|
|||
"react-dropzone": "^10.2.2",
|
||||
"react-es6-progressbar.js": "^1.1.0",
|
||||
"react-flatpickr": "^3.10.6",
|
||||
"react-google-recaptcha": "^3.1.0",
|
||||
"react-hook-form": "^7.11.1",
|
||||
"react-https-redirect": "^1.1.0",
|
||||
"react-i18next": "^11.12.0",
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 158 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 158 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 158 KiB |
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 499 146" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
|
||||
<g>
|
||||
<g transform="matrix(1,0,0,1,-57.9807,-32.8429)">
|
||||
<path d="M556.58,69.309L556.58,142.277C556.58,162.413 540.232,178.761 520.096,178.761L94.466,178.761C74.33,178.761 57.982,162.413 57.982,142.277L57.982,69.309C57.982,49.173 74.33,32.825 94.466,32.825L520.096,32.825C540.232,32.825 556.58,49.173 556.58,69.309Z" style="fill:rgb(64,124,222);stroke:rgb(64,124,222);stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(0.735399,0,0,0.685712,16.2125,4.37876)">
|
||||
<use xlink:href="#_Image1" x="0" y="0" width="200px" height="200px"/>
|
||||
</g>
|
||||
<g transform="matrix(0.835193,0,0,0.769777,7.35556,11.1156)">
|
||||
<g transform="matrix(0,45.5199,41.8804,0,154.724,117.573)">
|
||||
<clipPath id="_clip2">
|
||||
<path d="M0.544,-0.515C0.828,-0.515 1.059,-0.285 1.059,-0C1.059,0.285 0.828,0.515 0.544,0.515C0.259,0.515 0.029,0.285 0.029,-0C0.029,-0.285 0.259,-0.515 0.544,-0.515Z" clip-rule="nonzero"/>
|
||||
</clipPath>
|
||||
<g clip-path="url(#_clip2)">
|
||||
<g transform="matrix(-0,0.0285892,0.0285387,-0,-2.90011,-3.90471)">
|
||||
<use xlink:href="#_Image3" x="118.559" y="102.621" width="37px" height="37px"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(0.0344151,0,0,0.0374059,147.879,151.575)">
|
||||
<path d="M0,-154.033C-2.474,-154.033 -5.313,-153.848 -8.173,-153.3L-9.523,-154.65L-31.649,-132.524C-3.542,-126.838 27.743,-109.611 54.701,-82.653C80.678,-56.677 97.623,-26.68 103.909,0.617L125.571,-21.044C126.606,-27.607 126.092,-35.629 123.906,-44.621C118.523,-66.773 103.788,-91.125 83.481,-111.433C69.838,-125.077 54.383,-136.259 38.787,-143.771C24.855,-150.484 11.443,-154.033 0.004,-154.033L0,-154.033Z" style="fill:white;fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(0.0344151,0,0,0.0374059,166.511,149.078)">
|
||||
<path d="M0,-507.546C-18,-523.546 -68,-504.459 -68,-504.459L-68,-475.459L-101,-475.459L-278.654,-297.806C-305.358,-307.529 -331.964,-304.975 -348.535,-288.403C-348.856,-288.083 -349.147,-287.739 -349.458,-287.411C-352.297,-285.827 -354.972,-283.839 -357.385,-281.425L-521.669,-117.142C-493.562,-111.455 -462.276,-94.229 -435.318,-67.271C-409.342,-41.294 -392.397,-11.297 -386.11,16L-223.034,-147.075C-223.021,-147.089 -223.009,-147.105 -222.995,-147.116C-219.827,-149.073 -216.869,-151.37 -214.186,-154.054C-196.466,-171.772 -194.776,-200.962 -206.983,-229.477L-24,-412.46L-30,-440.459L2,-446.459C2,-446.459 18,-491.546 0,-507.546" style="fill:white;fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(0.0344151,0,0,0.0374059,143.804,133.272)">
|
||||
<path d="M0,480.02C6.414,473.606 15.482,472.258 21.961,472.258L21.965,472.258C40.656,472.258 62.085,482.528 79.286,499.729C93.4,513.843 103.109,531.325 105.923,547.69C107.259,555.464 108.137,569.874 98.994,579.015C92.578,585.432 83.511,586.779 77.034,586.779C65.598,586.779 53.138,582.929 41.248,576.007C59.173,571.815 68.087,566.259 71.21,557.708C74.738,548.046 69.982,536.425 55.308,518.85C48.082,510.198 37.366,505.993 22.547,505.993C14.982,505.993 7.308,507.006 -0.115,507.987C-2.572,508.311 -4.976,508.628 -7.297,508.897C-8.341,500.815 -8.253,488.273 0,480.02M881.888,28.315C881.909,27.528 881.772,26.673 881.425,25.76L881.43,25.758L864.385,-14.544C864.338,-14.654 864.29,-14.768 864.24,-14.884C863.968,-15.528 863.808,-15.906 863.786,-15.957L863.754,-15.944C863.409,-16.629 862.982,-17.33 862.412,-17.934C814.184,-120.121 738.177,-205.502 641.446,-265.845C592.524,-296.364 539.249,-319.919 483.101,-335.857C427.332,-351.688 369.766,-359.714 312.001,-359.714C152.069,-359.714 2.72,-298.442 -108.537,-187.183C-174.663,-121.058 -225.269,-38.981 -254.883,50.173C-284.492,139.309 -293.085,235.418 -279.735,328.11C-269.758,397.378 -239.036,460.967 -193.227,507.163C-169.749,530.837 -143.033,549.315 -113.818,562.083C-83.092,575.512 -50.22,582.321 -16.116,582.321C-8.628,582.321 -1.049,581.981 6.571,581.318C28.379,601.205 54.305,611.779 77.034,611.779C92.498,611.779 106.484,606.881 116.672,596.693C118.715,594.65 120.52,592.438 122.141,590.109L192.627,519.623C193.661,513.059 193.147,505.039 190.962,496.046C185.579,473.894 170.844,449.543 150.536,429.234C136.893,415.59 121.439,404.409 105.843,396.896C91.91,390.183 78.499,386.634 67.06,386.634L67.056,386.634C64.582,386.634 61.742,386.819 58.883,387.368L57.532,386.017L-12.853,456.403C-14.665,458.214 -16.23,460.178 -17.573,462.243C-17.607,462.277 -17.644,462.308 -17.678,462.342C-29.263,473.928 -33.994,490.42 -32.477,508.418C-68.221,503.794 -101.782,488.342 -130.175,463.302C-160.397,436.651 -182.628,400.421 -192.773,361.29C-215.521,273.543 -212.216,178.442 -183.218,86.269C-169.219,41.772 -149.57,-0.79 -124.817,-40.235C-99.785,-80.125 -70.023,-116.034 -36.357,-146.966C12.265,-191.639 67.591,-225.83 128.083,-248.589C185.326,-270.125 246.008,-281.045 308.442,-281.045C370.17,-281.045 431.402,-270.437 490.438,-249.517C549.446,-228.607 603.681,-198.309 651.635,-159.465C701.102,-119.396 741.967,-71.723 773.098,-17.77C806.02,39.288 827.213,102.071 836.09,168.835C843.646,225.67 841.637,283.236 830.116,339.932C818.887,395.194 798.935,448.225 770.812,497.553C742.676,546.908 707.203,591.077 665.38,628.832C622.43,667.606 573.873,698.592 521.06,720.931C457.531,747.801 386.94,762.004 316.918,762.006C270.199,762.006 223.948,755.852 179.45,743.713C126.396,729.239 76.185,706.575 30.214,676.349C22.573,671.326 15.793,665.93 9.236,660.713C-8.354,646.716 -24.969,633.497 -51.561,633.497C-51.883,633.497 -52.202,633.499 -52.526,633.502C-53.249,633.51 -53.974,633.515 -54.695,633.515C-82.262,633.515 -110.339,627.374 -138.146,615.26L-161.46,605.105L-145.145,624.611C-116.379,659.002 -83.567,690.177 -47.623,717.269C-12.579,743.682 25.619,766.355 65.91,784.656C145.235,820.686 233.265,839.732 320.48,839.734L320.491,839.734C424.057,839.734 525.681,813.159 614.362,762.886C741.202,690.982 837.576,573.648 885.73,432.499C931.153,299.356 929.635,156.816 881.888,28.315" style="fill:white;fill-rule:nonzero;"/>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,-4.7583,-15.589)">
|
||||
<text x="181.54px" y="81.156px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:28px;fill:white;">Download JamKazam</text>
|
||||
<g transform="matrix(28,0,0,28,453.091,110.072)">
|
||||
</g>
|
||||
<text x="182.333px" y="110.072px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:28px;fill:white;">for Windows (Legacy)</text>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<image id="_Image1" width="200px" height="200px" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAyKADAAQAAAABAAAAyAAAAACbWz2VAAAFCElEQVR4Ae3bwU0bARiEUTaiDBqhkRQJhdAIfWzMBcvHDySLMC8nkGZZz/s1N+fhwT8CBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAwP8qcNzrg5/n+XR51/O93vfD3/N2HMd7+Yz8brSy383T4ZfHkP1u9GMcL9/9I7/k+b+XHq+xC78r2Ff8rk+Hn/6ErCiBOQEDmTu5wkXAQIqW7JyAgcydXOEiYCBFS3ZOwEDmTq5wETCQoiU7J2AgcydXuAgYSNGSnRMwkLmTK1wEDKRoyc4JGMjcyRUuAgZStGTnBAxk7uQKFwEDKVqycwIGMndyhYuAgRQt2TkBA5k7ucJFwECKluycgIHMnVzhImAgRUt2TsBA5k6ucBEwkKIlOydgIHMnV7gIGEjRkp0TMJC5kytcBAykaMnOCRjI3MkVLgIGUrRk5wQMZO7kChcBAylasnMCBjJ3coWLgIEULdk5AQOZO7nCRcBAipbsnICBzJ1c4SJgIEVLdk7AQOZOrnARMJCiJTsnYCBzJ1e4CBhI0ZKdEzCQuZMrXAQMpGjJzgkYyNzJFS4CBlK0ZOcEDGTu5AoXAQMpWrJzAgYyd3KFi4CBFC3ZOQEDmTu5wkXAQIqW7JyAgcydXOEiYCBFS3ZOwEDmTq5wETCQoiU7J2AgcydXuAgYSNGSnRMwkLmTK1wEDKRoyc4JGMjcyRUuAgZStGTnBAxk7uQKFwEDKVqycwIGMndyhYuAgRQt2TmB416Nz/N8urzr+V7v++HveTuO4718Rn43Wtnv5mm/ECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgMBdBXxZ8a7cny/LX7bzZcVPu48fst/N0+GXx5D9bvTjm7wv3/0jv+T5v5cer7ELvyvYV/yuT4ef/H+QgCW6J2AgezfXOAgYSMAS3RMwkL2baxwEDCRgie4JGMjezTUOAgYSsET3BAxk7+YaBwEDCViiewIGsndzjYOAgQQs0T0BA9m7ucZBwEACluiegIHs3VzjIGAgAUt0T8BA9m6ucRAwkIAluidgIHs31zgIGEjAEt0TMJC9m2scBAwkYInuCRjI3s01DgIGErBE9wQMZO/mGgcBAwlYonsCBrJ3c42DgIEELNE9AQPZu7nGQcBAApbonoCB7N1c4yBgIAFLdE/AQPZurnEQMJCAJbonYCB7N9c4CBhIwBLdEzCQvZtrHAQMJGCJ7gkYyN7NNQ4CBhKwRPcEDGTv5hoHAQMJWKJ7Agayd3ONg4CBBCzRPQED2bu5xkHAQAKW6J6AgezdXOMgYCABS3RPwED2bq5xEDCQgCW6J2AgezfXOAgYSMAS3RMwkL2baxwEDCRgie4JGMjezTUOAgYSsET3BAxk7+YaBwEDCViiewIGsndzjYOAgQQs0T0BA9m7ucZBwEACluiegIHs3VzjIGAgAUt0T8BA9m6ucRAwkIAluidw3KvyeZ5Pl3c93+t9P/w9b8dxvJfPyO9GK/vdPO0XAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgMCEwD8AEzCh1V2GrQAAAABJRU5ErkJggg=="/>
|
||||
<image id="_Image3" width="37px" height="37px" xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/2wBDAQUFBQcGBw4ICA4eFBEUHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh7/wAARCAAlACUDAREAAhEBAxEB/8QAGAABAAMBAAAAAAAAAAAAAAAABQQGBwH/xAAcEAACAwEBAQEAAAAAAAAAAAAAAwQhMQECIhH/xAAWAQEBAQAAAAAAAAAAAAAAAAABAAL/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwCus9c88NgfKdtgRUl22SFSnbYEY5/1pFoEp22LAqU7bIipT9siKlO2wIxz/vQTQJTts0yKlO2yIqU/bBCpT9sCMa3vfVEWgSnbZpgVKdtgRUp+2BFSG973850ijkl3lM9WLIqUz1YETKZ6siidsk4Sf//Z"/>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 9.5 KiB |
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 499 146" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
|
||||
<g>
|
||||
<g transform="matrix(1,0,0,1,-57.9807,-32.8429)">
|
||||
<path d="M556.58,69.309L556.58,142.277C556.58,162.413 540.232,178.761 520.096,178.761L94.466,178.761C74.33,178.761 57.982,162.413 57.982,142.277L57.982,69.309C57.982,49.173 74.33,32.825 94.466,32.825L520.096,32.825C540.232,32.825 556.58,49.173 556.58,69.309Z" style="fill:rgb(64,124,222);stroke:rgb(64,124,222);stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(0.735399,0,0,0.685712,16.2125,4.37876)">
|
||||
<use xlink:href="#_Image1" x="0" y="0" width="200px" height="200px"/>
|
||||
</g>
|
||||
<g transform="matrix(0.835193,0,0,0.769777,7.35556,11.1156)">
|
||||
<g transform="matrix(0,45.5199,41.8804,0,154.724,117.573)">
|
||||
<clipPath id="_clip2">
|
||||
<path d="M0.544,-0.515C0.828,-0.515 1.059,-0.285 1.059,-0C1.059,0.285 0.828,0.515 0.544,0.515C0.259,0.515 0.029,0.285 0.029,-0C0.029,-0.285 0.259,-0.515 0.544,-0.515Z" clip-rule="nonzero"/>
|
||||
</clipPath>
|
||||
<g clip-path="url(#_clip2)">
|
||||
<g transform="matrix(-0,0.0285892,0.0285387,-0,-2.90011,-3.90471)">
|
||||
<use xlink:href="#_Image3" x="118.559" y="102.621" width="37px" height="37px"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(0.0344151,0,0,0.0374059,147.879,151.575)">
|
||||
<path d="M0,-154.033C-2.474,-154.033 -5.313,-153.848 -8.173,-153.3L-9.523,-154.65L-31.649,-132.524C-3.542,-126.838 27.743,-109.611 54.701,-82.653C80.678,-56.677 97.623,-26.68 103.909,0.617L125.571,-21.044C126.606,-27.607 126.092,-35.629 123.906,-44.621C118.523,-66.773 103.788,-91.125 83.481,-111.433C69.838,-125.077 54.383,-136.259 38.787,-143.771C24.855,-150.484 11.443,-154.033 0.004,-154.033L0,-154.033Z" style="fill:white;fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(0.0344151,0,0,0.0374059,166.511,149.078)">
|
||||
<path d="M0,-507.546C-18,-523.546 -68,-504.459 -68,-504.459L-68,-475.459L-101,-475.459L-278.654,-297.806C-305.358,-307.529 -331.964,-304.975 -348.535,-288.403C-348.856,-288.083 -349.147,-287.739 -349.458,-287.411C-352.297,-285.827 -354.972,-283.839 -357.385,-281.425L-521.669,-117.142C-493.562,-111.455 -462.276,-94.229 -435.318,-67.271C-409.342,-41.294 -392.397,-11.297 -386.11,16L-223.034,-147.075C-223.021,-147.089 -223.009,-147.105 -222.995,-147.116C-219.827,-149.073 -216.869,-151.37 -214.186,-154.054C-196.466,-171.772 -194.776,-200.962 -206.983,-229.477L-24,-412.46L-30,-440.459L2,-446.459C2,-446.459 18,-491.546 0,-507.546" style="fill:white;fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(0.0344151,0,0,0.0374059,143.804,133.272)">
|
||||
<path d="M0,480.02C6.414,473.606 15.482,472.258 21.961,472.258L21.965,472.258C40.656,472.258 62.085,482.528 79.286,499.729C93.4,513.843 103.109,531.325 105.923,547.69C107.259,555.464 108.137,569.874 98.994,579.015C92.578,585.432 83.511,586.779 77.034,586.779C65.598,586.779 53.138,582.929 41.248,576.007C59.173,571.815 68.087,566.259 71.21,557.708C74.738,548.046 69.982,536.425 55.308,518.85C48.082,510.198 37.366,505.993 22.547,505.993C14.982,505.993 7.308,507.006 -0.115,507.987C-2.572,508.311 -4.976,508.628 -7.297,508.897C-8.341,500.815 -8.253,488.273 0,480.02M881.888,28.315C881.909,27.528 881.772,26.673 881.425,25.76L881.43,25.758L864.385,-14.544C864.338,-14.654 864.29,-14.768 864.24,-14.884C863.968,-15.528 863.808,-15.906 863.786,-15.957L863.754,-15.944C863.409,-16.629 862.982,-17.33 862.412,-17.934C814.184,-120.121 738.177,-205.502 641.446,-265.845C592.524,-296.364 539.249,-319.919 483.101,-335.857C427.332,-351.688 369.766,-359.714 312.001,-359.714C152.069,-359.714 2.72,-298.442 -108.537,-187.183C-174.663,-121.058 -225.269,-38.981 -254.883,50.173C-284.492,139.309 -293.085,235.418 -279.735,328.11C-269.758,397.378 -239.036,460.967 -193.227,507.163C-169.749,530.837 -143.033,549.315 -113.818,562.083C-83.092,575.512 -50.22,582.321 -16.116,582.321C-8.628,582.321 -1.049,581.981 6.571,581.318C28.379,601.205 54.305,611.779 77.034,611.779C92.498,611.779 106.484,606.881 116.672,596.693C118.715,594.65 120.52,592.438 122.141,590.109L192.627,519.623C193.661,513.059 193.147,505.039 190.962,496.046C185.579,473.894 170.844,449.543 150.536,429.234C136.893,415.59 121.439,404.409 105.843,396.896C91.91,390.183 78.499,386.634 67.06,386.634L67.056,386.634C64.582,386.634 61.742,386.819 58.883,387.368L57.532,386.017L-12.853,456.403C-14.665,458.214 -16.23,460.178 -17.573,462.243C-17.607,462.277 -17.644,462.308 -17.678,462.342C-29.263,473.928 -33.994,490.42 -32.477,508.418C-68.221,503.794 -101.782,488.342 -130.175,463.302C-160.397,436.651 -182.628,400.421 -192.773,361.29C-215.521,273.543 -212.216,178.442 -183.218,86.269C-169.219,41.772 -149.57,-0.79 -124.817,-40.235C-99.785,-80.125 -70.023,-116.034 -36.357,-146.966C12.265,-191.639 67.591,-225.83 128.083,-248.589C185.326,-270.125 246.008,-281.045 308.442,-281.045C370.17,-281.045 431.402,-270.437 490.438,-249.517C549.446,-228.607 603.681,-198.309 651.635,-159.465C701.102,-119.396 741.967,-71.723 773.098,-17.77C806.02,39.288 827.213,102.071 836.09,168.835C843.646,225.67 841.637,283.236 830.116,339.932C818.887,395.194 798.935,448.225 770.812,497.553C742.676,546.908 707.203,591.077 665.38,628.832C622.43,667.606 573.873,698.592 521.06,720.931C457.531,747.801 386.94,762.004 316.918,762.006C270.199,762.006 223.948,755.852 179.45,743.713C126.396,729.239 76.185,706.575 30.214,676.349C22.573,671.326 15.793,665.93 9.236,660.713C-8.354,646.716 -24.969,633.497 -51.561,633.497C-51.883,633.497 -52.202,633.499 -52.526,633.502C-53.249,633.51 -53.974,633.515 -54.695,633.515C-82.262,633.515 -110.339,627.374 -138.146,615.26L-161.46,605.105L-145.145,624.611C-116.379,659.002 -83.567,690.177 -47.623,717.269C-12.579,743.682 25.619,766.355 65.91,784.656C145.235,820.686 233.265,839.732 320.48,839.734L320.491,839.734C424.057,839.734 525.681,813.159 614.362,762.886C741.202,690.982 837.576,573.648 885.73,432.499C931.153,299.356 929.635,156.816 881.888,28.315" style="fill:white;fill-rule:nonzero;"/>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,-4.7583,-15.589)">
|
||||
<text x="181.54px" y="81.156px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:28px;fill:white;">Download JamKazam</text>
|
||||
<g transform="matrix(28,0,0,28,394.732,110.072)">
|
||||
</g>
|
||||
<text x="240.691px" y="110.072px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:28px;fill:white;">for Windows</text>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<image id="_Image1" width="200px" height="200px" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAyKADAAQAAAABAAAAyAAAAACbWz2VAAAFCElEQVR4Ae3bwU0bARiEUTaiDBqhkRQJhdAIfWzMBcvHDySLMC8nkGZZz/s1N+fhwT8CBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAwP8qcNzrg5/n+XR51/O93vfD3/N2HMd7+Yz8brSy383T4ZfHkP1u9GMcL9/9I7/k+b+XHq+xC78r2Ff8rk+Hn/6ErCiBOQEDmTu5wkXAQIqW7JyAgcydXOEiYCBFS3ZOwEDmTq5wETCQoiU7J2AgcydXuAgYSNGSnRMwkLmTK1wEDKRoyc4JGMjcyRUuAgZStGTnBAxk7uQKFwEDKVqycwIGMndyhYuAgRQt2TkBA5k7ucJFwECKluycgIHMnVzhImAgRUt2TsBA5k6ucBEwkKIlOydgIHMnV7gIGEjRkp0TMJC5kytcBAykaMnOCRjI3MkVLgIGUrRk5wQMZO7kChcBAylasnMCBjJ3coWLgIEULdk5AQOZO7nCRcBAipbsnICBzJ1c4SJgIEVLdk7AQOZOrnARMJCiJTsnYCBzJ1e4CBhI0ZKdEzCQuZMrXAQMpGjJzgkYyNzJFS4CBlK0ZOcEDGTu5AoXAQMpWrJzAgYyd3KFi4CBFC3ZOQEDmTu5wkXAQIqW7JyAgcydXOEiYCBFS3ZOwEDmTq5wETCQoiU7J2AgcydXuAgYSNGSnRMwkLmTK1wEDKRoyc4JGMjcyRUuAgZStGTnBAxk7uQKFwEDKVqycwIGMndyhYuAgRQt2TmB416Nz/N8urzr+V7v++HveTuO4718Rn43Wtnv5mm/ECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgMBdBXxZ8a7cny/LX7bzZcVPu48fst/N0+GXx5D9bvTjm7wv3/0jv+T5v5cer7ELvyvYV/yuT4ef/H+QgCW6J2AgezfXOAgYSMAS3RMwkL2baxwEDCRgie4JGMjezTUOAgYSsET3BAxk7+YaBwEDCViiewIGsndzjYOAgQQs0T0BA9m7ucZBwEACluiegIHs3VzjIGAgAUt0T8BA9m6ucRAwkIAluidgIHs31zgIGEjAEt0TMJC9m2scBAwkYInuCRjI3s01DgIGErBE9wQMZO/mGgcBAwlYonsCBrJ3c42DgIEELNE9AQPZu7nGQcBAApbonoCB7N1c4yBgIAFLdE/AQPZurnEQMJCAJbonYCB7N9c4CBhIwBLdEzCQvZtrHAQMJGCJ7gkYyN7NNQ4CBhKwRPcEDGTv5hoHAQMJWKJ7Agayd3ONg4CBBCzRPQED2bu5xkHAQAKW6J6AgezdXOMgYCABS3RPwED2bq5xEDCQgCW6J2AgezfXOAgYSMAS3RMwkL2baxwEDCRgie4JGMjezTUOAgYSsET3BAxk7+YaBwEDCViiewIGsndzjYOAgQQs0T0BA9m7ucZBwEACluiegIHs3VzjIGAgAUt0T8BA9m6ucRAwkIAluidw3KvyeZ5Pl3c93+t9P/w9b8dxvJfPyO9GK/vdPO0XAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgMCEwD8AEzCh1V2GrQAAAABJRU5ErkJggg=="/>
|
||||
<image id="_Image3" width="37px" height="37px" xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/2wBDAQUFBQcGBw4ICA4eFBEUHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh7/wAARCAAlACUDAREAAhEBAxEB/8QAGAABAAMBAAAAAAAAAAAAAAAABQQGBwH/xAAcEAACAwEBAQEAAAAAAAAAAAAAAwQhMQECIhH/xAAWAQEBAQAAAAAAAAAAAAAAAAABAAL/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwCus9c88NgfKdtgRUl22SFSnbYEY5/1pFoEp22LAqU7bIipT9siKlO2wIxz/vQTQJTts0yKlO2yIqU/bBCpT9sCMa3vfVEWgSnbZpgVKdtgRUp+2BFSG973850ijkl3lM9WLIqUz1YETKZ6siidsk4Sf//Z"/>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 9.5 KiB |
|
|
@ -1,20 +1,27 @@
|
|||
import React, { Fragment, useState, useEffect } from 'react';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Link, useHistory } from 'react-router-dom';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { toast } from 'react-toastify';
|
||||
import { Button, CustomInput, Form, FormGroup, Input, Label } from 'reactstrap';
|
||||
import Divider from '../common/Divider';
|
||||
import SocialAuthButtons from './SocialAuthButtons';
|
||||
import { Button, Form, FormGroup, Input, InputGroup, Label } from 'reactstrap';
|
||||
import withRedirect from '../../hoc/withRedirect';
|
||||
import { useAuth } from '../../context/UserAuth';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import ReCAPTCHA from "react-google-recaptcha";
|
||||
import useRecaptcha from '../../hooks/useRecaptcha';
|
||||
import useJamTrackShopping from '../../hooks/useJamTrackShopping';
|
||||
|
||||
const JKRegistrationForm = ({ setRedirect, setRedirectUrl, layout, hasLabel }) => {
|
||||
const JKRegistrationForm = ({ hasLabel, jamTrack, jamTrackArtistName }) => {
|
||||
// State
|
||||
const [firstName, setFirstName] = useState('');
|
||||
const [email, setEmail] = useState('');
|
||||
const [password, setPassword] = useState('');
|
||||
const [isDisabled, setIsDisabled] = useState(true);
|
||||
const [showPassword, setShowPassword] = useState(false);
|
||||
|
||||
const { capchaToken, recaptchaRef, handleRecaptcha } = useRecaptcha();
|
||||
|
||||
const { addToCart } = useJamTrackShopping();
|
||||
|
||||
// Context
|
||||
const { signUp, setCurrentUser } = useAuth();
|
||||
|
|
@ -22,73 +29,111 @@ const JKRegistrationForm = ({ setRedirect, setRedirectUrl, layout, hasLabel }) =
|
|||
const { t } = useTranslation('auth');
|
||||
|
||||
const history = useHistory();
|
||||
// let { from } = location.state || { from: { pathname: "/" } };
|
||||
|
||||
// Handler
|
||||
const handleSubmit = async e => {
|
||||
e.preventDefault();
|
||||
setIsDisabled(true);
|
||||
|
||||
try {
|
||||
const params = {
|
||||
first_name: firstName,
|
||||
email,
|
||||
password,
|
||||
password_confirmation: password,
|
||||
const params = {
|
||||
first_name: firstName,
|
||||
email,
|
||||
password,
|
||||
password_confirmation: password,
|
||||
terms: true
|
||||
};
|
||||
const response = await signUp(params);
|
||||
const user = await response.json();
|
||||
console.log('_DEBUG_ user', user);
|
||||
setCurrentUser(user);
|
||||
toast.success(`Successfully registered as ${firstName}`);
|
||||
setRedirect(true);
|
||||
history.push('/download');
|
||||
}catch (error) {
|
||||
toast.success(`${t('signupForm.successMessage')} ${firstName}`);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
toast.error('An error occurred. Please try again.');
|
||||
toast.error(`${t('signupForm.errorMessage')}`);
|
||||
setIsDisabled(false);
|
||||
}
|
||||
};
|
||||
console.log('_DEBUG_', jamTrack);
|
||||
console.log('_DEBUG_', jamTrackArtistName);
|
||||
if(jamTrack){
|
||||
try{
|
||||
await addToCart(jamTrack);
|
||||
}catch(error){
|
||||
console.error(error);
|
||||
}
|
||||
}else if(jamTrackArtistName){
|
||||
history.push(`/jamtracks?artist=${jamTrackArtistName}`);
|
||||
}else{
|
||||
history.push('/public/downloads');
|
||||
}
|
||||
|
||||
// useEffect(() => {
|
||||
// setRedirectUrl(`/authentication/${layout}/login`);
|
||||
// }, [setRedirectUrl, layout]);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
setIsDisabled(!firstName || !email || !password);
|
||||
}, [firstName, email, password]);
|
||||
|
||||
useEffect(() => {
|
||||
if (process.env.REACT_APP_RECAPTCHA_ENABLED === 'true') {
|
||||
setIsDisabled(!(capchaToken.length > 0));
|
||||
}
|
||||
}, [capchaToken]);
|
||||
|
||||
return (
|
||||
<Form onSubmit={handleSubmit}>
|
||||
<FormGroup>
|
||||
{hasLabel && <Label>Name</Label>}
|
||||
<Input placeholder={!hasLabel ? 'First Name' : ''} value={firstName} onChange={({ target }) => setFirstName(target.value)} />
|
||||
{hasLabel && <Label>{t('signupForm.firstName')}</Label>}
|
||||
<Input placeholder={!hasLabel ? t('signupForm.firstName') : ''} value={firstName} onChange={({ target }) => setFirstName(target.value)} />
|
||||
</FormGroup>
|
||||
<FormGroup>
|
||||
{hasLabel && <Label>Email address</Label>}
|
||||
{hasLabel && <Label>{t('signupForm.email')}</Label>}
|
||||
<Input
|
||||
placeholder={!hasLabel ? 'Email address' : ''}
|
||||
placeholder={!hasLabel ? t('signupForm.email') : ''}
|
||||
value={email}
|
||||
onChange={({ target }) => setEmail(target.value)}
|
||||
type="email"
|
||||
/>
|
||||
</FormGroup>
|
||||
{/* <div className="form-row"> */}
|
||||
<FormGroup>
|
||||
{hasLabel && <Label>Password</Label>}
|
||||
<FormGroup>
|
||||
{hasLabel && <Label>{t('signupForm.password')}</Label>}
|
||||
<InputGroup>
|
||||
<Input
|
||||
placeholder={!hasLabel ? 'Password' : ''}
|
||||
placeholder={!hasLabel ? t('signupForm.password') : ''}
|
||||
value={password}
|
||||
onChange={({ target }) => setPassword(target.value)}
|
||||
type="password"
|
||||
type={showPassword ? 'text' : 'password'}
|
||||
/>
|
||||
<div className="input-group-append">
|
||||
<span className="input-group-text">
|
||||
<a href="#" onClick={e => {
|
||||
e.preventDefault();
|
||||
setShowPassword(!showPassword);
|
||||
}}>
|
||||
{showPassword ? (
|
||||
<FontAwesomeIcon icon="eye-slash" onClick={() => setShowPassword(false)} />
|
||||
) : (
|
||||
<FontAwesomeIcon icon="eye" onClick={() => setShowPassword(true)} />
|
||||
)}
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</InputGroup>
|
||||
<div className='mt-2'>{t('signupForm.passwordRequirements')}</div>
|
||||
</FormGroup>
|
||||
{/* </div> */}
|
||||
{process.env.REACT_APP_RECAPTCHA_ENABLED === 'true' && (
|
||||
<FormGroup>
|
||||
<ReCAPTCHA
|
||||
sitekey={process.env.REACT_APP_SITE_KEY}
|
||||
ref={recaptchaRef}
|
||||
onChange={handleRecaptcha}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
{/* </div> */}
|
||||
)}
|
||||
|
||||
<FormGroup>
|
||||
<Button color="primary" block className="mt-3" disabled={isDisabled}>
|
||||
Register
|
||||
{t('signup')}
|
||||
</Button>
|
||||
</FormGroup>
|
||||
|
||||
|
|
@ -97,14 +142,12 @@ const JKRegistrationForm = ({ setRedirect, setRedirectUrl, layout, hasLabel }) =
|
|||
};
|
||||
|
||||
JKRegistrationForm.propTypes = {
|
||||
setRedirect: PropTypes.func.isRequired,
|
||||
setRedirectUrl: PropTypes.func.isRequired,
|
||||
layout: PropTypes.string,
|
||||
hasLabel: PropTypes.bool
|
||||
hasLabel: PropTypes.bool,
|
||||
jamTrack: PropTypes.object,
|
||||
jamTrackArtistName: PropTypes.string
|
||||
};
|
||||
|
||||
JKRegistrationForm.defaultProps = {
|
||||
layout: 'basic',
|
||||
hasLabel: false
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -20,9 +20,6 @@ const AuthBasicRoutes = ({ match: { url } }) => (
|
|||
{/* <Route path={`${url}/start`} exact component={Start} />
|
||||
<Route path={`${url}/logout`} exact component={Logout} />
|
||||
<Route path={`${url}/register`} exact component={Registration} />
|
||||
|
||||
|
||||
|
||||
<Route path={`${url}/lock-screen`} exact component={LockScreen} /> */}
|
||||
|
||||
{/*Redirect*/}
|
||||
|
|
|
|||
|
|
@ -1,24 +1,83 @@
|
|||
import React, { Fragment } from 'react';
|
||||
import React, { Fragment, useEffect, useMemo, useState } from 'react';
|
||||
import { Col, Row } from 'reactstrap';
|
||||
import { Link } from 'react-router-dom';
|
||||
import JKRegistrationForm from '../JKRegistrationForm';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
import { getJamTrack } from '../../../helpers/rest';
|
||||
import { useAuth } from '../../../context/UserAuth';
|
||||
|
||||
const Registration = () => {
|
||||
const { t } = useTranslation('auth');
|
||||
const search = useLocation().search;
|
||||
const [jamTrack, setJamTrack] = useState(null);
|
||||
const [jamTrackArtistName, setJamTrackArtistName] = useState("");
|
||||
const { currentUser } = useAuth();
|
||||
|
||||
//coming to signup page after clicking on jamtrack or artist
|
||||
useEffect(() => {
|
||||
|
||||
if (!search) return;
|
||||
|
||||
const params = new URLSearchParams(search);
|
||||
|
||||
|
||||
const jamtrackId = params.get('JamTrackId');
|
||||
const artistName = params.get('JamTrackArtistName');
|
||||
|
||||
console.log('_DEBUG_ jamtrackId', jamtrackId);
|
||||
|
||||
|
||||
if (artistName && artistName !== "") {
|
||||
setJamTrackArtistName(artistName);
|
||||
}else if (jamtrackId) {
|
||||
const fetchJamTrack = async (id) => {
|
||||
try {
|
||||
const response = await getJamTrack({id});
|
||||
const jamTrack = await response.json();
|
||||
setJamTrack(jamTrack);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
fetchJamTrack(jamtrackId);
|
||||
|
||||
// if (jt && jt.allow_free && currentUser && currentUser.show_free_jamtrack) {
|
||||
// setJamTrack(jt);
|
||||
// }
|
||||
}
|
||||
}, [search]);
|
||||
|
||||
const pageTitle = useMemo(() => {
|
||||
if (jamTrack || jamTrackArtistName) {
|
||||
return t('signupForm.jamtrack_signup_title');
|
||||
}
|
||||
return t('signupForm.signup_title');
|
||||
}, [jamTrack, jamTrackArtistName]);
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<Row className="text-left">
|
||||
<Row className="text-left mb-3">
|
||||
<Col>
|
||||
<h5 id="modalLabel">Register</h5>
|
||||
<h5 id="modalLabel">{pageTitle}</h5>
|
||||
{jamTrack?.id}
|
||||
</Col>
|
||||
</Row>
|
||||
<JKRegistrationForm jamTrack={jamTrack} jamTrackArtistName={jamTrackArtistName} />
|
||||
<Row className='justify-content-center mb-2'>
|
||||
<Col xs="auto">
|
||||
<p className="fs--1 text-600">
|
||||
Have an account? <Link to="/authentication/basic/login">Login</Link>
|
||||
JamKazam <Link to="/public/terms">{t('terms_of_service', { ns: 'common' })}</Link> {t('and', { ns: 'common' })} <Link to="/public/privacy">{t('privacy_policy', { ns: 'common' })}</Link> {t('apply', { ns: 'common' })}.
|
||||
</p>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row className='justify-content-center'>
|
||||
<Col xs="auto">
|
||||
<p className="fs--1 text-600">
|
||||
{t('signupForm.alreadyHaveAccount')} <Link to="/authentication/basic/login">{t('signin')}</Link>
|
||||
</p>
|
||||
</Col>
|
||||
</Row>
|
||||
<JKRegistrationForm />
|
||||
</Fragment>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useContext, useEffect, useRef, useState } from 'react';
|
||||
import { Switch, Route, Redirect } from 'react-router-dom';
|
||||
import { Switch, Redirect } from 'react-router-dom';
|
||||
import PrivateRoute from '../../helpers/privateRoute';
|
||||
|
||||
import NavbarTop from '../navbar/JKNavbarTop';
|
||||
|
|
@ -20,19 +20,12 @@ import { useLobbyChat } from '../sessions/JKLobbyChatContext';
|
|||
import { useAuth } from '../../context/UserAuth';
|
||||
import { truncate } from '../../helpers/utils';
|
||||
|
||||
import HomePage from '../page/JKHomePage';
|
||||
//import HomePage from '../page/JKHomePage';
|
||||
|
||||
import JKHelp from '../help/JKHelp';
|
||||
import JKKnowledgeBase from '../help/JKKnowledgeBase';
|
||||
import JKHelpDesk from '../help/JKHelpDesk';
|
||||
import JKForum from '../help/JKForum';
|
||||
import JKPrivacy from '../page/JKPrivacy';
|
||||
//import JKPeople from '../page/JKPeople';
|
||||
import JKPeopleFilter from '../page/JKPeopleFilter';
|
||||
import JKMyFriends from '../page/JKMyFriends';
|
||||
import JKNotifications from '../page/JKNotifications';
|
||||
import JKMessageModal from '../profile/JKMessageModal';
|
||||
import JKUnsubscribe from '../page/JKUnsubscribe';
|
||||
import JKAppLaunch from '../page/JKAppLaunch';
|
||||
|
||||
import JKMusicSessions from '../page/JKMusicSessions';
|
||||
|
|
@ -44,7 +37,6 @@ import JKEditProfile from '../page/JKEditProfile';
|
|||
import JKEditAccount from '../page/JKEditAccount';
|
||||
import JKAccountSubscription from '../page/JKAccountSubscription';
|
||||
import JKPaymentHistory from '../page/JKPaymentHistory';
|
||||
import JKDownload from '../page/JKDownload';
|
||||
|
||||
import JKAffiliateProgram from '../affiliate/JKAffiliateProgram';
|
||||
import JKAffiliatePayee from '../affiliate/JKAffiliatePayee';
|
||||
|
|
@ -60,7 +52,6 @@ import JKCheckoutSuccess from '../shopping-cart/JKCheckoutSuccess';
|
|||
import JKMyJamTracks from '../jamtracks/JKMyJamTracks';
|
||||
import JKJamTrackShow from '../jamtracks/JKJamTrackShow';
|
||||
|
||||
|
||||
//import loadable from '@loadable/component';
|
||||
//const DashboardRoutes = loadable(() => import('../../layouts/JKDashboardRoutes'));
|
||||
//const PublicRoutes = loadable(() => import('../../layouts/JKPublicRoutes'))
|
||||
|
|
@ -92,10 +83,10 @@ function JKDashboardMain() {
|
|||
goToBottom
|
||||
} = useLobbyChat();
|
||||
|
||||
useEffect(() => {
|
||||
//DashboardRoutes.preload();
|
||||
//PublicRoutes.preload();
|
||||
}, []);
|
||||
// useEffect(() => {
|
||||
// DashboardRoutes.preload();
|
||||
// PublicRoutes.preload();
|
||||
// }, []);
|
||||
|
||||
const [visibilityState, setVisibilityState] = useState('visible');
|
||||
|
||||
|
|
@ -289,12 +280,6 @@ function JKDashboardMain() {
|
|||
<div className="content">
|
||||
<NavbarTop />
|
||||
<Switch>
|
||||
<Route path="/privacy" component={JKPrivacy} />
|
||||
<Route path="/help" component={JKHelp} />
|
||||
<Route path="/knowledge-base" component={JKKnowledgeBase} />
|
||||
<Route path="/help-desk" component={JKHelpDesk} />
|
||||
<Route path="/forum" component={JKForum} />
|
||||
<Route path="/unsubscribe" exact component={JKUnsubscribe} />
|
||||
{/* <PrivateRoute path="/" exact component={HomePage} /> */}
|
||||
<PrivateRoute path="/" exact component={JKEditProfile} />
|
||||
<PrivateRoute path="/friends/my" component={JKMyFriends} />
|
||||
|
|
@ -320,7 +305,6 @@ function JKDashboardMain() {
|
|||
<PrivateRoute path="/shopping-cart" component={JKShoppingCart} />
|
||||
<PrivateRoute path="/checkout/success" component={JKCheckoutSuccess} />
|
||||
<PrivateRoute path="/checkout" component={JKCheckout} />
|
||||
<PrivateRoute path="/download" component={JKDownload} />
|
||||
<PrivateRoute path="/applaunch" component={JKAppLaunch} />
|
||||
{/*Redirect*/}
|
||||
<Redirect to="/errors/404" />
|
||||
|
|
|
|||
|
|
@ -1,67 +1,71 @@
|
|||
import React from 'react';
|
||||
import { Button } from 'reactstrap';
|
||||
import PropTypes from 'prop-types';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
//import { useHistory } from 'react-router-dom';
|
||||
import { useAuth } from '../../context/UserAuth';
|
||||
import { toast } from 'react-toastify';
|
||||
import { useShoppingCart } from '../../hooks/useShoppingCart';
|
||||
//import { toast } from 'react-toastify';
|
||||
//import { useShoppingCart } from '../../hooks/useShoppingCart';
|
||||
import useJamTrackShopping from '../../hooks/useJamTrackShopping';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import JKTooltip from '../common/JKTooltip';
|
||||
import { placeOrder, updateUser } from '../../helpers/rest';
|
||||
//import { placeOrder, updateUser } from '../../helpers/rest';
|
||||
|
||||
const JKJamTrackPurchaseButton = ({ jamTrack }) => {
|
||||
const history = useHistory();
|
||||
//const history = useHistory();
|
||||
const { currentUser } = useAuth();
|
||||
const { addCartItem, getCartItems, hasOnlyFreeItemsInShoppingCart } = useShoppingCart();
|
||||
//const { addCartItem, getCartItems, hasOnlyFreeItemsInShoppingCart } = useShoppingCart();
|
||||
const { t } = useTranslation('jamtracks');
|
||||
|
||||
const addToCart = async () => {
|
||||
if (!currentUser) {
|
||||
return;
|
||||
}
|
||||
const options = {
|
||||
id: jamTrack.id,
|
||||
variant: 'full'
|
||||
};
|
||||
// const addToCart = async () => {
|
||||
// if (!currentUser) {
|
||||
// return;
|
||||
// }
|
||||
// const options = {
|
||||
// id: jamTrack.id,
|
||||
// variant: 'full'
|
||||
// };
|
||||
|
||||
try {
|
||||
const resp = await addCartItem(options);
|
||||
if(resp.fast_reedem){ //if this is a free jamtrack
|
||||
//get shopping cart items and see if all are free
|
||||
if(!hasOnlyFreeItemsInShoppingCart()){
|
||||
history.push('/jamtracks');
|
||||
}else{
|
||||
const purchadeResp = await placeOrder();
|
||||
if(purchadeResp.ok){
|
||||
const userResp = await updateUser(currentUser.id);
|
||||
if(userResp.ok){
|
||||
history.push('/checkout/success?free=yes&jamtrackId=' + jamTrack.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}else{ //if this is a paid jamtrack
|
||||
toast.success(t('search.list.add_success_alert'));
|
||||
history.push('/shopping-cart');
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
toast.error(t('search.list.add_error_alert'));
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
// try {
|
||||
// const resp = await addCartItem(options);
|
||||
// if(resp.fast_reedem){ //if this is a free jamtrack
|
||||
// //get shopping cart items and see if all are free
|
||||
// if(!hasOnlyFreeItemsInShoppingCart()){
|
||||
// history.push('/jamtracks');
|
||||
// }else{
|
||||
// const purchadeResp = await placeOrder();
|
||||
// if(purchadeResp.ok){
|
||||
// const userResp = await updateUser(currentUser.id);
|
||||
// if(userResp.ok){
|
||||
// history.push('/checkout/success?free=yes&jamtrackId=' + jamTrack.id);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// }else{ //if this is a paid jamtrack
|
||||
// toast.success(t('search.list.add_success_alert'));
|
||||
// history.push('/shopping-cart');
|
||||
// }
|
||||
// } catch (error) {
|
||||
// console.log(error);
|
||||
// toast.error(t('search.list.add_error_alert'));
|
||||
|
||||
// }
|
||||
|
||||
// };
|
||||
const { addToCart } = useJamTrackShopping();
|
||||
|
||||
const handleAddToCart = () => {
|
||||
addToCart(jamTrack);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{jamTrack.purchased ? (
|
||||
|
||||
<span>{t('search.list.purchased')}</span>
|
||||
|
||||
<span>{t('search.list.purchased')}</span>
|
||||
) : jamTrack.allow_free && currentUser && currentUser.show_free_jamtrack ? (
|
||||
<>
|
||||
<Button color="primary" onClick={addToCart} size="sm" className="mr-1">
|
||||
<Button color="primary" onClick={handleAddToCart} size="sm" className="mr-1">
|
||||
{t('search.list.get_it_free')}
|
||||
</Button>
|
||||
<JKTooltip title={t('search.list.get_it_free_help_text')} />
|
||||
|
|
@ -71,7 +75,7 @@ const JKJamTrackPurchaseButton = ({ jamTrack }) => {
|
|||
) : (
|
||||
<>
|
||||
<div className="fs-1">$ {jamTrack.download_price}</div>
|
||||
<Button color="primary" size="sm" className="mr-1" onClick={addToCart}>
|
||||
<Button color="primary" size="sm" className="mr-1" onClick={handleAddToCart}>
|
||||
{t('search.list.add_to_cart')}
|
||||
</Button>
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
import React from 'react'
|
||||
|
||||
const JKDownload = () => {
|
||||
return (
|
||||
<div>JKDownload</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default JKDownload
|
||||
|
|
@ -0,0 +1,185 @@
|
|||
import React, { useState, useEffect } from 'react'
|
||||
import { detectOS, isAppleSilicon } from '../../helpers/utils'
|
||||
import { getClientDownloads } from '../../helpers/rest'
|
||||
import DownloadButtonMacAppleMx from '../../assets/img/downloads/Download-Button-Mac-Apple-Mx.svg'
|
||||
import DownloadButtonMacIntel from '../../assets/img/downloads/Download-Button-Mac-Intel.svg'
|
||||
import DownloadButtonWindows from '../../assets/img/downloads/Download-Button-Windows.svg'
|
||||
import DownloadButtonWindowsLegacy from '../../assets/img/downloads/Download-Button-Windows-Legacy.svg'
|
||||
import DownloadButtonMacLegacy from '../../assets/img/downloads/Download-Button-Mac-Legacy.svg'
|
||||
import { Link } from 'react-router-dom'
|
||||
|
||||
const JKDownloads = () => {
|
||||
const [currentOS, setCurrentOS] = useState(null)
|
||||
const [downloads, setDownloads] = useState({})
|
||||
|
||||
const availablePlatforms = React.useMemo(() => {
|
||||
const keys = Object.keys(downloads)
|
||||
//only show JamClientModern versions
|
||||
const sortedStrings = keys.filter(key => key.startsWith('JamClientModern') && key !== 'MacOSX').map(key => key.substring('JamClientModern/'.length))
|
||||
|
||||
return sortedStrings
|
||||
}, [downloads])
|
||||
|
||||
const detectAndSetOS = () => {
|
||||
let os = detectOS()
|
||||
|
||||
if (os == "MacOSX") {
|
||||
const silicon = isAppleSilicon();
|
||||
if (silicon == true) {
|
||||
os = "MacOSX-M";
|
||||
}
|
||||
else {
|
||||
os = "MacOSX-Intel";
|
||||
}
|
||||
}
|
||||
if (!os) {
|
||||
os = "Win32"
|
||||
}
|
||||
setCurrentOS(os)
|
||||
}
|
||||
|
||||
const fetchClientDownloads = () => {
|
||||
getClientDownloads()
|
||||
.then(resp => {
|
||||
if (resp.status === 200) {
|
||||
return resp.json()
|
||||
}
|
||||
}).then(data => {
|
||||
const platforms = Object.keys(data)
|
||||
const downloadUris = {}
|
||||
platforms.filter(p => p === 'JamClientModern/MacOSX-M' || p === 'JamClientModern/MacOSX-Intel' || p === 'JamClientModern/Win32' || 'JamClient/MacOSX' || 'JamClient/Win32').forEach(platform => {
|
||||
downloadUris[platform] = data[platform].uri
|
||||
})
|
||||
setDownloads(downloadUris)
|
||||
detectAndSetOS()
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err)
|
||||
})
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
fetchClientDownloads()
|
||||
}, [])
|
||||
|
||||
|
||||
const selectPlatform = (platform) => {
|
||||
console.log('_DEBUG_ platform', platform)
|
||||
setCurrentOS(platform)
|
||||
}
|
||||
|
||||
const downloadImageUrl = React.useMemo(() => {
|
||||
if (!currentOS) return null
|
||||
switch (currentOS) {
|
||||
case 'MacOSX-M':
|
||||
return DownloadButtonMacAppleMx
|
||||
case 'MacOSX-Intel':
|
||||
return DownloadButtonMacIntel
|
||||
case 'Win32':
|
||||
return DownloadButtonWindows
|
||||
}
|
||||
}, [currentOS])
|
||||
|
||||
const isMacOS = React.useMemo(() => {
|
||||
if (!currentOS) return false
|
||||
return currentOS.startsWith('MacOSX')
|
||||
}, [currentOS])
|
||||
|
||||
|
||||
const isWindows = React.useMemo(() => {
|
||||
if (!currentOS) return false
|
||||
return currentOS === 'Win32'
|
||||
}, [currentOS])
|
||||
|
||||
const platformDisplayName = (platform) => {
|
||||
switch (platform) {
|
||||
case 'MacOSX-M':
|
||||
return 'JamKazam for MacOSX (Apple M1,M2,...,MX)'
|
||||
case 'MacOSX-Intel':
|
||||
return 'JamKazam for MacOSX (Intel)'
|
||||
case 'Win32':
|
||||
return 'JamKazam for Windows'
|
||||
}
|
||||
}
|
||||
|
||||
const onClickPlatform = (event, platform) => {
|
||||
event.preventDefault()
|
||||
selectPlatform(platform)
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{Object.keys(downloads).length > 0 && currentOS ? (
|
||||
<div>
|
||||
<h5>Download the free JamKazam app</h5>
|
||||
{/* <p>{currentOS}</p> */}
|
||||
<p>
|
||||
You must use the JamKazam app to get into online sessions with other musicians. Our app also gives you the most feature-rich experience for JamTracks, recordings, live broadcasting, and other features. Click the button below to download the JamKazam app installer, then double click the installer to run it. For more detailed instructions,
|
||||
{isMacOS ? <a href="https://jamkazam.freshdesk.com/support/solutions/articles/66000130025">see this help article</a> : isWindows && <a href="https://jamkazam.freshdesk.com/support/solutions/articles/66000130024">see this help article</a>}.
|
||||
</p>
|
||||
<div className='mt-4 d-flex align-items-center'>
|
||||
<div className='mr-3' style={{ width: '20%' }}>
|
||||
<a href="">
|
||||
<img src={downloadImageUrl} alt="Download JamKazam" />
|
||||
</a>
|
||||
</div>
|
||||
<div className='ml-5' style={{ width: '80%' }}>
|
||||
<div>Need a different version?</div>
|
||||
<ul className='list-unstyled'>
|
||||
{availablePlatforms.filter(platform => platform !== currentOS).map(platform => (
|
||||
<li key={platform}><a href="#" onClick={(e) => onClickPlatform(e, platform)}>{platformDisplayName(platform)}</a></li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div className='mt-5'>
|
||||
<div><strong>System Requirements</strong></div>
|
||||
{isMacOS ? (
|
||||
<p>
|
||||
To play an online session on JamKazam, you will need the following:<br />
|
||||
- macOS 10.15 (Catalina) or higher <br />
|
||||
- 75MB hard disk space for app installation <br />
|
||||
- External audio interface for audio processing (<a href="https://jamkazam.freshdesk.com/support/solutions/articles/66000122513" target='_blank'>see recommendations if you don't have one</a>) <br />
|
||||
- Ability to connect computer to home router using Ethernet cable. WiFi not recommended (<a href='https://jamkazam.freshdesk.com/support/solutions/articles/66000124756' target='_blank'></a>learn how to do this) <br />
|
||||
- Broadband internet service with at least 1Mbps download and upload bandwidth (3-5Mbps preferred) <br />
|
||||
</p>
|
||||
) : isWindows ? (
|
||||
<p>
|
||||
To play an online session on JamKazam, you will need the following:<br />
|
||||
- Windows 10 or 11, 64-bit (32-bit not supported) <br />
|
||||
- Dual core processor or higher (quad or higher preferred) <br />
|
||||
- 75MB hard disk space for app installation <br />
|
||||
- External audio interface for audio processing (<a href='https://jamkazam.freshdesk.com/support/solutions/articles/66000122514' target='_blank'>see recommendations if you don't have one</a>) <br />
|
||||
- Ability to connect computer to home router using Ethernet cable, WiFi not recommended (<a href="https://jamkazam.freshdesk.com/support/solutions/articles/66000124756" target='_blank'>learn how to do this</a>) <br />
|
||||
- Broadband Internet service with at least 1Mbps download and upload bandwidth (3-5Mbps preferred)
|
||||
</p>
|
||||
) : null}
|
||||
|
||||
</div>
|
||||
|
||||
{isMacOS ? (
|
||||
<div>
|
||||
<div><strong>Instructions for Users With Older Macs</strong></div>
|
||||
<p>
|
||||
If your Mac cannot support macOS 10.15 (Catalina) or higher, you can still play with everyone else on JamKazam using our legacy app. To do this, <Link to="/public/downloads-legacy">click here</Link> to go to a page where you can download JamKazam legacy app for older Macs. Download and install legacy app on your computer. Then <a href="https://jamkazam.freshdesk.com/support/solutions/articles/66000526271" target='_blank'>read this help article</a> about how to use the legacy app.
|
||||
</p>
|
||||
</div>
|
||||
) : isWindows ? (
|
||||
<div>
|
||||
<div><strong>Instructions for Users With Older Windows PCs</strong></div>
|
||||
<p>
|
||||
If your Windows computer cannot support Win10 or Win11, you can still play with everyone else on JamKazam using our legacy app. To do this <Link to="/public/downloads-legacy">click here</Link> to go to a page where you can download the JamKazam legacy app for older Windows PCs. Download and install the legacy app on your Win7 computer. Then <a href="https://jamkazam.freshdesk.com/support/solutions/articles/66000526271" target='_blank'>read this help article</a> about how to use the legacy app.
|
||||
</p>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
|
||||
</div>
|
||||
) : (
|
||||
<div>Loading...</div>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default JKDownloads
|
||||
|
|
@ -0,0 +1,176 @@
|
|||
import React, { useState, useEffect } from 'react'
|
||||
import { detectOS, isAppleSilicon } from '../../helpers/utils'
|
||||
import { getClientDownloads } from '../../helpers/rest'
|
||||
import DownloadButtonWindowsLegacy from '../../assets/img/downloads/Download-Button-Windows-Legacy.svg'
|
||||
import DownloadButtonMacLegacy from '../../assets/img/downloads/Download-Button-Mac-Legacy.svg'
|
||||
import { Link } from 'react-router-dom'
|
||||
|
||||
const JKDownloadsLegacy = () => {
|
||||
const [currentOS, setCurrentOS] = useState(null)
|
||||
const [downloads, setDownloads] = useState({})
|
||||
const [selectedPlatform, setSelectedPlatform] = useState(null)
|
||||
|
||||
const availablePlatforms = React.useMemo(() => {
|
||||
const keys = Object.keys(downloads)
|
||||
//only show JamClientModern versions
|
||||
const sortedStrings = keys.filter(key => ['JamClient/Win32', 'JamClient/MacOSX'].includes(key)).map(key => key.substring('JamClient/'.length))
|
||||
|
||||
return sortedStrings
|
||||
}, [downloads])
|
||||
|
||||
const detectAndSetOS = () => {
|
||||
let os = detectOS()
|
||||
|
||||
if (os == "MacOSX") {
|
||||
const silicon = isAppleSilicon();
|
||||
if (silicon == true) {
|
||||
os = "MacOSX-M";
|
||||
}
|
||||
else {
|
||||
os = "MacOSX-Intel";
|
||||
}
|
||||
}
|
||||
if (!os) {
|
||||
os = "Win32"
|
||||
}
|
||||
setCurrentOS(os)
|
||||
}
|
||||
|
||||
const fetchClientDownloads = () => {
|
||||
getClientDownloads()
|
||||
.then(resp => {
|
||||
if (resp.status === 200) {
|
||||
return resp.json()
|
||||
}
|
||||
}).then(data => {
|
||||
const platforms = Object.keys(data)
|
||||
const downloadUris = {}
|
||||
platforms.filter(p => p === 'JamClientModern/MacOSX-M' || p === 'JamClientModern/MacOSX-Intel' || p === 'JamClientModern/Win32' || 'JamClient/MacOSX' || 'JamClient/Win32').forEach(platform => {
|
||||
downloadUris[platform] = data[platform].uri
|
||||
})
|
||||
setDownloads(downloadUris)
|
||||
detectAndSetOS()
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err)
|
||||
})
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
fetchClientDownloads()
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
if (currentOS) {
|
||||
if(isMacOS){
|
||||
selectPlatform('MacOSX')
|
||||
}else if(isWindows){
|
||||
selectPlatform('Win32')
|
||||
}
|
||||
}
|
||||
}, [currentOS])
|
||||
|
||||
const selectPlatform = (platform) => {
|
||||
setSelectedPlatform(platform)
|
||||
}
|
||||
|
||||
const downloadImageUrl = React.useMemo(() => {
|
||||
if (!selectedPlatform) return null
|
||||
if(selectedPlatform === 'MacOSX'){
|
||||
return DownloadButtonMacLegacy
|
||||
}else if(selectedPlatform === 'Win32'){
|
||||
return DownloadButtonWindowsLegacy
|
||||
}
|
||||
}, [selectedPlatform])
|
||||
|
||||
const isMacOS = React.useMemo(() => {
|
||||
if (!currentOS) return false
|
||||
return currentOS.startsWith('MacOSX')
|
||||
}, [currentOS])
|
||||
|
||||
|
||||
const isWindows = React.useMemo(() => {
|
||||
if (!currentOS) return false
|
||||
return currentOS === 'Win32'
|
||||
}, [currentOS])
|
||||
|
||||
const platformDisplayName = (platform) => {
|
||||
switch (platform) {
|
||||
case 'MacOSX':
|
||||
return 'JamKazam for MacOSX (Legacy)'
|
||||
case 'Win32':
|
||||
return 'JamKazam for Windows (Legacy)'
|
||||
}
|
||||
}
|
||||
|
||||
const onClickPlatform = (event, platform) => {
|
||||
event.preventDefault()
|
||||
selectPlatform(platform)
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{Object.keys(downloads).length > 0 && currentOS ? (
|
||||
<div>
|
||||
<h5>Download the older legacy JamKazam app</h5>
|
||||
{/* <p>{currentOS}</p>
|
||||
<p>{selectedPlatform}</p> */}
|
||||
<p>
|
||||
You must use the JamKazam app to get into online sessions with other musicians. Our app also gives you the most feature-rich experience for JamTracks, recordings, live broadcasting, and other features. Click the button below to download the JamKazam app installer, then double click the installer to run it. For more detailed instructions,
|
||||
{isMacOS ? <a href="https://jamkazam.freshdesk.com/support/solutions/articles/66000130025">see this help article</a> : isWindows && <a href="https://jamkazam.freshdesk.com/support/solutions/articles/66000130024">see this help article</a>}.
|
||||
</p>
|
||||
<div className='mt-4 d-flex align-items-center'>
|
||||
<div className='mr-3' style={{ width: '20%' }}>
|
||||
<a href="">
|
||||
<img src={downloadImageUrl} alt="Download JamKazam" />
|
||||
</a>
|
||||
</div>
|
||||
<div className='ml-5' style={{ width: '80%' }}>
|
||||
<div>Need a different version?</div>
|
||||
<ul className='list-unstyled'>
|
||||
{availablePlatforms.filter(platform => platform !== selectedPlatform).map(platform => (
|
||||
<li key={platform}><a href="#" onClick={(e) => onClickPlatform(e, platform)}>{platformDisplayName(platform)}</a></li>
|
||||
))}
|
||||
<li>
|
||||
<Link to="/public/downloads">Download page for current app version</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div className='mt-5'>
|
||||
<div><strong>System Requirements</strong></div>
|
||||
{selectedPlatform === 'MacOSX' ? (
|
||||
<p>
|
||||
To play an online session on JamKazam, you will need the following:<br />
|
||||
- macOS 10.8 (Mountain Lion) or higher <br />
|
||||
- 75MB hard disk space for app installation <br />
|
||||
- External audio interface for audio processing (<a href="https://jamkazam.freshdesk.com/support/solutions/articles/66000122513" target='_blank'>see recommendations if you don't have one</a>) <br />
|
||||
- Ability to connect computer to home router using Ethernet cable. WiFi not recommended (<a href='https://jamkazam.freshdesk.com/support/solutions/articles/66000124756' target='_blank'></a>learn how to do this) <br />
|
||||
- Broadband internet service with at least 1Mbps download and upload bandwidth (3-5Mbps preferred) <br />
|
||||
- Note that the audio interface and Ethernet links to same places as other Mac links above
|
||||
</p>
|
||||
) : selectedPlatform === 'Win32' ? (
|
||||
<p>
|
||||
To play an online session on JamKazam, you will need the following:<br />
|
||||
- Windows 7, 32-bit or 64-bit <br />
|
||||
- Dual core processor or higher <br />
|
||||
- 75MB hard disk space for app installation <br />
|
||||
- External audio interface for audio processing (<a href='https://jamkazam.freshdesk.com/support/solutions/articles/66000122514' target='_blank'>see recommendations if you don't have one</a>) <br />
|
||||
- Ability to connect computer to home router using Ethernet cable, WiFi not recommended (<a href="https://jamkazam.freshdesk.com/support/solutions/articles/66000124756" target='_blank'>learn how to do this</a>) <br />
|
||||
- Broadband Internet service with at least 1Mbps download and upload bandwidth (3-5Mbps preferred)
|
||||
- Note that the audio interface and Ethernet links to same places as other Windows links above
|
||||
</p>
|
||||
) : null}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
) : (
|
||||
<div>Loading...</div>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default JKDownloadsLegacy
|
||||
|
|
@ -43,8 +43,8 @@ export default function UserAuth({ children, path }) {
|
|||
setIsAuthenticated(false);
|
||||
};
|
||||
|
||||
const signUp = credentials =>
|
||||
authSignUp(credentials)
|
||||
const signUp = params =>
|
||||
authSignUp(params)
|
||||
.then(setIsAuthenticated(true))
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
|
|
|
|||
|
|
@ -632,4 +632,12 @@ export const createAlert = (subject, data) => {
|
|||
.then(response => resolve(response))
|
||||
.catch(error => reject(error));
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
export const getClientDownloads = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
apiFetch(`/artifacts/clients`)
|
||||
.then(response => resolve(response))
|
||||
.catch(error => reject(error));
|
||||
});
|
||||
}
|
||||
|
|
@ -274,4 +274,40 @@ const padString = (str, max) => {
|
|||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
export const detectOS = () => {
|
||||
let platform;
|
||||
|
||||
if(navigator.platform) {
|
||||
platform = navigator.platform.toLowerCase();
|
||||
}else if(navigator.userAgentData){
|
||||
platform = navigator.userAgentData.platform.toLowerCase();
|
||||
}
|
||||
|
||||
if (!platform) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (platform.indexOf('mac') !== -1) {
|
||||
return "MacOSX";
|
||||
}
|
||||
if (platform.indexOf('win') !== -1) {
|
||||
return "Win32"
|
||||
}
|
||||
if (platform.indexOf('linux') !== -1) {
|
||||
return "Unix"
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
export const isAppleSilicon = () => {
|
||||
const canvas = document.createElement('canvas');
|
||||
const gl = canvas.getContext('webgl');
|
||||
|
||||
// Best guess if the device is an Apple Silicon
|
||||
// https://stackoverflow.com/a/65412357
|
||||
// @ts-expect-error - Object is possibly 'null'
|
||||
return gl.getSupportedExtensions().indexOf('WEBGL_compressed_texture_etc') !== -1
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
// Desc: This file contains the custom hook for adding jamtracks to the shopping cart
|
||||
import { useAuth } from '../context/UserAuth';
|
||||
import { useShoppingCart } from './useShoppingCart';
|
||||
import { toast } from 'react-toastify';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { placeOrder, updateUser } from '../helpers/rest';
|
||||
|
||||
const useJamTrackShopping = () => {
|
||||
const { currentUser } = useAuth();
|
||||
const { addCartItem, hasOnlyFreeItemsInShoppingCart } = useShoppingCart();
|
||||
const { t } = useTranslation('jamtracks');
|
||||
const history = useHistory();
|
||||
|
||||
const addToCart = async (jamTrack) => {
|
||||
if (!currentUser) {
|
||||
return;
|
||||
}
|
||||
const options = {
|
||||
id: jamTrack.id,
|
||||
variant: 'full'
|
||||
};
|
||||
|
||||
try {
|
||||
const resp = await addCartItem(options);
|
||||
if (resp.fast_reedem) { //if this is a free jamtrack
|
||||
//get shopping cart items and see if all are free
|
||||
if (!hasOnlyFreeItemsInShoppingCart()) {
|
||||
history.push('/jamtracks');
|
||||
} else {
|
||||
const purchadeResp = await placeOrder();
|
||||
if (purchadeResp.ok) {
|
||||
const userResp = await updateUser(currentUser.id);
|
||||
if (userResp.ok) {
|
||||
history.push('/checkout/success?free=yes&jamtrackId=' + jamTrack.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else { //if this is a paid jamtrack
|
||||
toast.success(t('search.list.add_success_alert'));
|
||||
history.push('/shopping-cart');
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
toast.error(t('search.list.add_error_alert'));
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
addToCart,
|
||||
};
|
||||
};
|
||||
|
||||
export default useJamTrackShopping;
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
import { useState, useRef, useCallback, useEffect } from "react"
|
||||
|
||||
const useRecaptcha = () => {
|
||||
const [capchaToken, setCapchaToken] = useState("")
|
||||
const recaptchaRef = useRef(null)
|
||||
|
||||
const handleRecaptcha = useCallback(token => {
|
||||
setCapchaToken(token || "")
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
const refreshCaptcha = () => {
|
||||
if (recaptchaRef.current && capchaToken) {
|
||||
recaptchaRef.current.reset()
|
||||
setCapchaToken("")
|
||||
}
|
||||
}
|
||||
|
||||
let tokenRefreshTimeout = null
|
||||
|
||||
if (capchaToken) {
|
||||
tokenRefreshTimeout = setTimeout(refreshCaptcha, 110000) // 110 seconds
|
||||
}
|
||||
|
||||
return () => {
|
||||
if (tokenRefreshTimeout) {
|
||||
clearTimeout(tokenRefreshTimeout)
|
||||
}
|
||||
}
|
||||
}, [capchaToken])
|
||||
|
||||
return { capchaToken, setCapchaToken, recaptchaRef, handleRecaptcha }
|
||||
}
|
||||
|
||||
export default useRecaptcha
|
||||
|
|
@ -2,6 +2,19 @@
|
|||
"signup": "Sign Up",
|
||||
"signin": "Sign In",
|
||||
"signout": "Sign Out",
|
||||
"signupForm": {
|
||||
"signup_title": "Sign up to start playing, free!",
|
||||
"jamtrack_signup_title": "Sign up to get your free JamTrack!",
|
||||
"firstName": "First Name",
|
||||
"email": "Email Address",
|
||||
"password": "Password",
|
||||
"submit": "Sign Up",
|
||||
"submitting": "Signing Up...",
|
||||
"successMessage": "Successfully registered as",
|
||||
"errorMessage:": "An error occurred. Please try again.",
|
||||
"alreadyHaveAccount": "Already have an account?",
|
||||
"passwordRequirements": "Your password must be at least 8 characters"
|
||||
},
|
||||
"signinForm": {
|
||||
"email": "Email Address",
|
||||
"password": "Password",
|
||||
|
|
|
|||
|
|
@ -8,6 +8,10 @@
|
|||
"close": "Close",
|
||||
"cancel": "Cancel",
|
||||
"ok": "OK",
|
||||
"terms_of_service": "terms of service",
|
||||
"privacy_policy": "privacy policy",
|
||||
"and": "and",
|
||||
"apply": "apply",
|
||||
"month_name": {
|
||||
"january": "January",
|
||||
"february": "February",
|
||||
|
|
|
|||
|
|
@ -9,10 +9,12 @@ import BuildMeta from "./JKBuildMeta";
|
|||
|
||||
import loadable from '@loadable/component';
|
||||
const AuthBasicLayout = loadable(() => import('./JKAuthBasicLayout'));
|
||||
const PublicLayout = loadable(() => import('./JKPublicLayout'));
|
||||
|
||||
const Layout = () => {
|
||||
useEffect(() => {
|
||||
AuthBasicLayout.preload();
|
||||
PublicLayout.preload();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
|
@ -20,6 +22,7 @@ const Layout = () => {
|
|||
<Switch>
|
||||
<Route path="/errors" component={ErrorLayout} />
|
||||
<Route path="/authentication/basic" component={AuthBasicLayout} />
|
||||
<Route path="/public" component={PublicLayout} />
|
||||
<Route component={DashboardLayout} />
|
||||
</Switch>
|
||||
<ToastContainer transition={Fade} closeButton={<CloseButton />} position={toast.POSITION.BOTTOM_RIGHT} />
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
import React, { useContext } from 'react'
|
||||
import PublicRoutes from './JKPublicRoutes';
|
||||
import { BrowserQueryProvider } from '../context/BrowserQuery';
|
||||
import Logo from '../components/navbar/Logo';
|
||||
import AppContext from "../context/Context";
|
||||
import { topNavbarBreakpoint } from '../config';
|
||||
import { Navbar } from 'reactstrap';
|
||||
import Footer from '../components/footer/JKFooter';
|
||||
|
||||
const JKPublicLayout = () => {
|
||||
|
||||
const {
|
||||
isFluid,
|
||||
isTopNav,
|
||||
} = useContext(AppContext);
|
||||
|
||||
return (
|
||||
<div className={isFluid ? 'container-fluid' : 'container'}>
|
||||
<div className="content">
|
||||
<Navbar
|
||||
light
|
||||
color="white"
|
||||
className="navbar-glass fs--1 font-weight-semi-bold row navbar-top sticky-kit mb-3 py-3 px-6"
|
||||
expand={isTopNav && topNavbarBreakpoint}
|
||||
>
|
||||
<Logo at="navbar-top" id="topLogo" width={240} />
|
||||
</Navbar>
|
||||
<div className='px-6 pt-3 row'>
|
||||
<BrowserQueryProvider>
|
||||
<PublicRoutes />
|
||||
</BrowserQueryProvider>
|
||||
</div>
|
||||
{/* <div className='px-6 row'> */}
|
||||
<Footer />
|
||||
{/* </div> */}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default JKPublicLayout
|
||||
|
|
@ -1,17 +1,33 @@
|
|||
import React from 'react';
|
||||
import { Redirect, Route, Switch } from 'react-router-dom';
|
||||
import { Redirect, Route, Switch, withRouter } from 'react-router-dom';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import JKPrivacy from '../components/page/JKPrivacy';
|
||||
import JKPrivacy from '../components/public/JKPrivacy';
|
||||
import JKHelp from '../components/public/help/JKHelp';
|
||||
import JKKnowledgeBase from '../components/public/help/JKKnowledgeBase';
|
||||
import JKHelpDesk from '../components/public/help/JKHelpDesk';
|
||||
import JKForum from '../components/public/help/JKForum';
|
||||
import JKUnsubscribe from '../components/public/JKUnsubscribe';
|
||||
import JKDownloads from '../components/public/JKDownloads';
|
||||
import JKDownloadsLegacy from '../components/public/JKDownloadsLegacy';
|
||||
|
||||
const JKPublicRoutes = ({ match: { url } }) => (
|
||||
|
||||
const JKPublicRoutes = () => (
|
||||
|
||||
<Switch>
|
||||
<Route path="/privacy" component={JKPrivacy} />
|
||||
<Route path={`${url}/privacy`} component={JKPrivacy} />
|
||||
<Route path={`${url}/help`} component={JKHelp} />
|
||||
<Route path={`${url}/knowledge-base`} component={JKKnowledgeBase} />
|
||||
<Route path={`${url}/help-desk`} component={JKHelpDesk} />
|
||||
<Route path={`${url}/forum`} component={JKForum} />
|
||||
<Route path={`${url}/unsubscribe`} exact component={JKUnsubscribe} />
|
||||
<Route path={`${url}/downloads`} exact component={JKDownloads} />
|
||||
<Route path={`${url}/downloads-legacy`} exact component={JKDownloadsLegacy} />
|
||||
|
||||
{/*Redirect*/}
|
||||
<Redirect to="/errors/404" />
|
||||
</Switch>
|
||||
);
|
||||
|
||||
JKPublicRoutes.propTypes = { match: PropTypes.object.isRequired };
|
||||
|
||||
export default JKPublicRoutes;
|
||||
export default withRouter(JKPublicRoutes);
|
||||
|
|
|
|||
Loading…
Reference in New Issue