5htp 0.0.6 → 0.0.8-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -2
- package/readme.md +30 -0
- package/skeleton/.github/workflows/ci.yml +93 -0
- package/skeleton/.github/workflows/ecs-task.json +77 -0
- package/skeleton/Dockerfile +20 -0
- package/skeleton/docker-compose.yml +45 -0
- package/skeleton/identity.yaml +17 -0
- package/skeleton/package-lock.json +6139 -0
- package/skeleton/package.json +30 -0
- package/skeleton/src/client/assets/identity/logo.svg +64 -0
- package/skeleton/src/client/assets/identity/logoAndText.svg +105 -0
- package/skeleton/src/client/assets/illustration/launch.jpg +0 -0
- package/skeleton/src/client/assets/logos/google-play-store.svg +1 -0
- package/skeleton/src/client/assets/logos/googleauth.svg +9 -0
- package/skeleton/src/client/assets/patterns/interlaced.png +0 -0
- package/skeleton/src/client/assets/theme.less +278 -0
- package/skeleton/src/client/components/LoginModal.tsx +45 -0
- package/skeleton/src/client/pages/app/_layout/index.less +20 -0
- package/skeleton/src/client/pages/app/_layout/index.tsx +33 -0
- package/skeleton/src/client/pages/app/index.tsx +57 -0
- package/skeleton/src/client/pages/landing/_layout/index.less +145 -0
- package/skeleton/src/client/pages/landing/_layout/index.tsx +63 -0
- package/skeleton/src/client/pages/landing/index.tsx +73 -0
- package/skeleton/src/client/pages/preload.json +3 -0
- package/skeleton/src/client/tsconfig.json +32 -0
- package/skeleton/src/common/tsconfig.json +10 -0
- package/skeleton/src/server/config.ts +125 -0
- package/skeleton/src/server/index.ts +23 -0
- package/skeleton/src/server/routes/general.ts +66 -0
- package/skeleton/src/server/services/auth/index.ts +88 -0
- package/skeleton/src/server/tsconfig.json +34 -0
- package/src/{utils → app}/config.ts +20 -2
- package/src/app/index.ts +75 -0
- package/src/commands/build.ts +6 -1
- package/src/commands/deploy/web.ts +3 -3
- package/src/commands/dev.ts +11 -9
- package/src/commands/init.ts +85 -0
- package/src/compiler/client/identite.ts +7 -5
- package/src/compiler/client/index.ts +21 -18
- package/src/compiler/common/babel/index.ts +209 -201
- package/src/compiler/common/babel/plugins/injection-dependances/index.ts +2 -2
- package/src/compiler/common/babel/plugins/pages.ts +4 -2
- package/src/compiler/common/files/autres.ts +3 -1
- package/src/compiler/common/files/images.ts +2 -1
- package/src/compiler/common/files/style.ts +6 -4
- package/src/compiler/common/index.ts +13 -7
- package/src/compiler/common/plugins/indexage/icones-svg/index.ts +45 -37
- package/src/compiler/common/plugins/indexage/injection-dependances/index.ts +1 -1
- package/src/compiler/index.ts +33 -4
- package/src/compiler/server/index.ts +19 -19
- package/src/index.ts +4 -18
- package/src/paths.ts +12 -33
- package/tsconfig.json +1 -2
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{ PROJECT_NAME }}",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": ">=16.1.0",
|
|
7
|
+
"npm": ">=3.10.10"
|
|
8
|
+
},
|
|
9
|
+
"browserslist": [
|
|
10
|
+
">0.2%",
|
|
11
|
+
"not dead",
|
|
12
|
+
"not op_mini all"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"dev": "export NODE_ENV=development && 5htp dev",
|
|
16
|
+
"build": "5htp build",
|
|
17
|
+
"deploy": "docker compose up --build",
|
|
18
|
+
"start": "export NODE_ENV=production && node ./bin/server.js",
|
|
19
|
+
"update-ecs-tasks": "aws ecs describe-task-definition --task-definition run-app --query taskDefinition > .github/workflows/ecs-task.json"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"5htp-core": "^0.0.7",
|
|
23
|
+
"core-js": "^3.18.1",
|
|
24
|
+
"preact": "^10.5.15",
|
|
25
|
+
"tslog": "^3.2.2"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"ts-node": "^10.9.1"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg
|
|
3
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
4
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
|
5
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
6
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
9
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
10
|
+
viewBox="0 0 512 512"
|
|
11
|
+
version="1.1"
|
|
12
|
+
id="svg4"
|
|
13
|
+
sodipodi:docname="bolt_bg.svg"
|
|
14
|
+
width="512"
|
|
15
|
+
height="512"
|
|
16
|
+
inkscape:version="1.0.2 (e86c870879, 2021-01-15)">
|
|
17
|
+
<metadata
|
|
18
|
+
id="metadata10">
|
|
19
|
+
<rdf:RDF>
|
|
20
|
+
<cc:Work
|
|
21
|
+
rdf:about="">
|
|
22
|
+
<dc:format>image/svg+xml</dc:format>
|
|
23
|
+
<dc:type
|
|
24
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
25
|
+
<dc:title></dc:title>
|
|
26
|
+
</cc:Work>
|
|
27
|
+
</rdf:RDF>
|
|
28
|
+
</metadata>
|
|
29
|
+
<defs
|
|
30
|
+
id="defs8" />
|
|
31
|
+
<sodipodi:namedview
|
|
32
|
+
pagecolor="#ffffff"
|
|
33
|
+
bordercolor="#666666"
|
|
34
|
+
borderopacity="1"
|
|
35
|
+
objecttolerance="10"
|
|
36
|
+
gridtolerance="10"
|
|
37
|
+
guidetolerance="10"
|
|
38
|
+
inkscape:pageopacity="0"
|
|
39
|
+
inkscape:pageshadow="2"
|
|
40
|
+
inkscape:window-width="1817"
|
|
41
|
+
inkscape:window-height="1317"
|
|
42
|
+
id="namedview6"
|
|
43
|
+
showgrid="false"
|
|
44
|
+
inkscape:zoom="1.6738281"
|
|
45
|
+
inkscape:cx="235.66125"
|
|
46
|
+
inkscape:cy="253.90898"
|
|
47
|
+
inkscape:window-x="23"
|
|
48
|
+
inkscape:window-y="15"
|
|
49
|
+
inkscape:window-maximized="0"
|
|
50
|
+
inkscape:current-layer="svg4"
|
|
51
|
+
inkscape:document-rotation="0" />
|
|
52
|
+
<rect
|
|
53
|
+
style="fill:#ffb169;fill-opacity:1;stroke:#6d6afb;stroke-width:1.00157;stroke-linecap:round"
|
|
54
|
+
id="rect830"
|
|
55
|
+
width="512.65814"
|
|
56
|
+
height="514.03961"
|
|
57
|
+
x="-1.0011668"
|
|
58
|
+
y="-3.5215869"
|
|
59
|
+
ry="106.86349" />
|
|
60
|
+
<path
|
|
61
|
+
d="m 307.72506,219.49055 h -43.88742 l 16.20108,-49.36383 c 1.52124,-5.78066 -2.8523,-11.48527 -8.82312,-11.48527 h -54.76418 c -4.56369,0 -8.44282,3.38473 -9.05131,7.91039 l -12.16981,91.27364 c -0.72258,5.47641 3.53685,10.34434 9.0513,10.34434 h 45.14242 l -17.53214,73.96968 c -1.36911,5.78066 3.04245,11.21905 8.86114,11.21905 3.19458,0 6.23704,-1.67335 7.91039,-4.56368 L 315.59742,233.1816 c 3.53684,-6.04689 -0.83669,-13.69105 -7.87236,-13.69105 z"
|
|
62
|
+
id="path2"
|
|
63
|
+
style="stroke-width:0.380307" />
|
|
64
|
+
</svg>
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg
|
|
3
|
+
viewBox="0 0 2299.7934 515.0412"
|
|
4
|
+
version="1.1"
|
|
5
|
+
id="svg4"
|
|
6
|
+
sodipodi:docname="logoAndText.svg"
|
|
7
|
+
width="2299.7935"
|
|
8
|
+
height="515.0412"
|
|
9
|
+
inkscape:version="1.2.1 (9c6d41e, 2022-07-14)"
|
|
10
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
11
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
|
14
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
15
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
|
16
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
|
17
|
+
<metadata
|
|
18
|
+
id="metadata10">
|
|
19
|
+
<rdf:RDF>
|
|
20
|
+
<cc:Work
|
|
21
|
+
rdf:about="">
|
|
22
|
+
<dc:format>image/svg+xml</dc:format>
|
|
23
|
+
<dc:type
|
|
24
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
25
|
+
</cc:Work>
|
|
26
|
+
</rdf:RDF>
|
|
27
|
+
</metadata>
|
|
28
|
+
<defs
|
|
29
|
+
id="defs8">
|
|
30
|
+
<rect
|
|
31
|
+
x="661.95569"
|
|
32
|
+
y="74.08168"
|
|
33
|
+
width="1933.2928"
|
|
34
|
+
height="365.62894"
|
|
35
|
+
id="rect1642" />
|
|
36
|
+
<rect
|
|
37
|
+
x="721.69897"
|
|
38
|
+
y="54.963825"
|
|
39
|
+
width="1899.8365"
|
|
40
|
+
height="425.37222"
|
|
41
|
+
id="rect1636" />
|
|
42
|
+
<rect
|
|
43
|
+
x="698.23108"
|
|
44
|
+
y="67.033836"
|
|
45
|
+
width="2697.0457"
|
|
46
|
+
height="417.13885"
|
|
47
|
+
id="rect833" />
|
|
48
|
+
</defs>
|
|
49
|
+
<sodipodi:namedview
|
|
50
|
+
pagecolor="#ffffff"
|
|
51
|
+
bordercolor="#666666"
|
|
52
|
+
borderopacity="1"
|
|
53
|
+
objecttolerance="10"
|
|
54
|
+
gridtolerance="10"
|
|
55
|
+
guidetolerance="10"
|
|
56
|
+
inkscape:pageopacity="0"
|
|
57
|
+
inkscape:pageshadow="2"
|
|
58
|
+
inkscape:window-width="1900"
|
|
59
|
+
inkscape:window-height="962"
|
|
60
|
+
id="namedview6"
|
|
61
|
+
showgrid="false"
|
|
62
|
+
inkscape:zoom="0.41845703"
|
|
63
|
+
inkscape:cx="1504.3361"
|
|
64
|
+
inkscape:cy="277.20887"
|
|
65
|
+
inkscape:window-x="81"
|
|
66
|
+
inkscape:window-y="84"
|
|
67
|
+
inkscape:window-maximized="0"
|
|
68
|
+
inkscape:current-layer="svg4"
|
|
69
|
+
inkscape:document-rotation="0"
|
|
70
|
+
inkscape:snap-page="false"
|
|
71
|
+
fit-margin-top="0"
|
|
72
|
+
fit-margin-left="0"
|
|
73
|
+
fit-margin-right="0"
|
|
74
|
+
fit-margin-bottom="0"
|
|
75
|
+
inkscape:showpageshadow="2"
|
|
76
|
+
inkscape:pagecheckerboard="0"
|
|
77
|
+
inkscape:deskcolor="#d1d1d1" />
|
|
78
|
+
<rect
|
|
79
|
+
style="fill:#9125ff;fill-opacity:1;stroke:#9125ff;stroke-width:1.00157;stroke-linecap:round;stroke-opacity:1"
|
|
80
|
+
id="rect830"
|
|
81
|
+
width="512.65814"
|
|
82
|
+
height="514.03961"
|
|
83
|
+
x="0.50078499"
|
|
84
|
+
y="0.50078499"
|
|
85
|
+
ry="106.86349" />
|
|
86
|
+
<g
|
|
87
|
+
aria-label="MegaCharger"
|
|
88
|
+
transform="translate(1.5019518,2.8997169)"
|
|
89
|
+
id="text831"
|
|
90
|
+
style="font-style:normal;font-weight:normal;font-size:320px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect833);fill:#000000;fill-opacity:1;stroke:none" />
|
|
91
|
+
<text
|
|
92
|
+
xml:space="preserve"
|
|
93
|
+
id="text1634"
|
|
94
|
+
style="white-space:pre;shape-inside:url(#rect1636);fill:#9125ff;fill-opacity:1;stroke:#9125ff;stroke-opacity:1" />
|
|
95
|
+
<text
|
|
96
|
+
xml:space="preserve"
|
|
97
|
+
id="text1640"
|
|
98
|
+
style="font-size:320px;white-space:pre;shape-inside:url(#rect1642);fill:#9125ff;fill-opacity:1;stroke:#9125ff;stroke-opacity:1"
|
|
99
|
+
transform="translate(59.743291,-9.5589267)"><tspan
|
|
100
|
+
x="661.95508"
|
|
101
|
+
y="366.57148"
|
|
102
|
+
id="tspan1819"><tspan
|
|
103
|
+
style="font-weight:bold;font-family:Rubik;-inkscape-font-specification:'Rubik Bold';fill:#1a1a1a"
|
|
104
|
+
id="tspan1817">Your Logo</tspan></tspan></text>
|
|
105
|
+
</svg>
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 408 466.9" width="2185" height="2500"><style>.st0{fill:url(#SVGID_1_)}.st1{fill:url(#SVGID_2_)}.st2{fill:url(#SVGID_3_)}.st3{fill:url(#SVGID_4_)}</style><linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" y1="112.094" x2="261.746" y2="112.094"><stop offset="0" stop-color="#63be6b"/><stop offset=".506" stop-color="#5bbc6a"/><stop offset="1" stop-color="#4ab96a"/></linearGradient><path class="st0" d="M261.7 142.3L15 1.3C11.9-.5 8-.4 5 1.4c-3.1 1.8-5 5-5 8.6 0 0 .1 13 .2 34.4l179.7 179.7 81.8-81.8z"/><linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1=".152" y1="223.393" x2="179.896" y2="223.393"><stop offset="0" stop-color="#3ec6f2"/><stop offset="1" stop-color="#45afe3"/></linearGradient><path class="st1" d="M.2 44.4C.5 121.6 1.4 309 1.8 402.3L180 224.1.2 44.4z"/><linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="179.896" y1="229.464" x2="407.976" y2="229.464"><stop offset="0" stop-color="#faa51a"/><stop offset=".387" stop-color="#fab716"/><stop offset=".741" stop-color="#fac412"/><stop offset="1" stop-color="#fac80f"/></linearGradient><path class="st2" d="M402.9 223l-141.2-80.7-81.9 81.8 92.4 92.4L403 240.3c3.1-1.8 5-5.1 5-8.6 0-3.6-2-6.9-5.1-8.7z"/><linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="1.744" y1="345.521" x2="272.296" y2="345.521"><stop offset="0" stop-color="#ec3b50"/><stop offset="1" stop-color="#e7515b"/></linearGradient><path class="st3" d="M1.7 402.3c.2 33.3.3 54.6.3 54.6 0 3.6 1.9 6.9 5 8.6 3.1 1.8 6.9 1.8 10 0l255.3-148.9-92.4-92.4L1.7 402.3z"/></svg>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<svg viewBox="0 0 24 24" width="24" height="24" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<g transform="matrix(1, 0, 0, 1, 27.009001, -39.238998)">
|
|
4
|
+
<path fill="#4285F4" d="M -3.264 51.509 C -3.264 50.719 -3.334 49.969 -3.454 49.239 L -14.754 49.239 L -14.754 53.749 L -8.284 53.749 C -8.574 55.229 -9.424 56.479 -10.684 57.329 L -10.684 60.329 L -6.824 60.329 C -4.564 58.239 -3.264 55.159 -3.264 51.509 Z"/>
|
|
5
|
+
<path fill="#34A853" d="M -14.754 63.239 C -11.514 63.239 -8.804 62.159 -6.824 60.329 L -10.684 57.329 C -11.764 58.049 -13.134 58.489 -14.754 58.489 C -17.884 58.489 -20.534 56.379 -21.484 53.529 L -25.464 53.529 L -25.464 56.619 C -23.494 60.539 -19.444 63.239 -14.754 63.239 Z"/>
|
|
6
|
+
<path fill="#FBBC05" d="M -21.484 53.529 C -21.734 52.809 -21.864 52.039 -21.864 51.239 C -21.864 50.439 -21.724 49.669 -21.484 48.949 L -21.484 45.859 L -25.464 45.859 C -26.284 47.479 -26.754 49.299 -26.754 51.239 C -26.754 53.179 -26.284 54.999 -25.464 56.619 L -21.484 53.529 Z"/>
|
|
7
|
+
<path fill="#EA4335" d="M -14.754 43.989 C -12.984 43.989 -11.404 44.599 -10.154 45.789 L -6.734 42.369 C -8.804 40.429 -11.514 39.239 -14.754 39.239 C -19.444 39.239 -23.494 41.939 -25.464 45.859 L -21.484 48.949 C -20.534 46.099 -17.884 43.989 -14.754 43.989 Z"/>
|
|
8
|
+
</g>
|
|
9
|
+
</svg>
|
|
Binary file
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
/*----------------------------------
|
|
2
|
+
- SIZES
|
|
3
|
+
----------------------------------*/
|
|
4
|
+
|
|
5
|
+
@import (reference) "@client/assets/css/theme.less";
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
WARN: ALL MEASURES SHOULD BE IN EM
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
// Text
|
|
12
|
+
@sTxtPage: calc(16px + 0.10vw);
|
|
13
|
+
@sIcon: 1.3em;
|
|
14
|
+
|
|
15
|
+
// Components
|
|
16
|
+
@radius: 0.75rem;
|
|
17
|
+
@layoutRadius: @radius * 2rem;
|
|
18
|
+
@sizeComponent: 3.8em;
|
|
19
|
+
@sizeActiveIndicator: 6px;
|
|
20
|
+
|
|
21
|
+
// Spacing
|
|
22
|
+
@spacing: 1.2em;
|
|
23
|
+
@spacingComponent: @spacing;
|
|
24
|
+
@spacingLayout: @spacing * 2;
|
|
25
|
+
|
|
26
|
+
// Responsive
|
|
27
|
+
@layoutWidth: 60rem;
|
|
28
|
+
@pageWidth: 30rem;
|
|
29
|
+
@focusWidth: 40rem;
|
|
30
|
+
|
|
31
|
+
@responsive1: 50em;
|
|
32
|
+
@responsive2: 46em;
|
|
33
|
+
@responsive3: 36em;
|
|
34
|
+
@responsive4: 36em;
|
|
35
|
+
|
|
36
|
+
/*----------------------------------
|
|
37
|
+
- COLORS
|
|
38
|
+
----------------------------------*/
|
|
39
|
+
|
|
40
|
+
@cBgPage: #fff;
|
|
41
|
+
|
|
42
|
+
@c1: #9125FF;
|
|
43
|
+
@c1Light: #FFB169; // #64feda
|
|
44
|
+
@c1SuperLight: #FFEBD9;
|
|
45
|
+
@c2: #9125FF;
|
|
46
|
+
@c3: #f2eee9;
|
|
47
|
+
@c4: #f1dfde;
|
|
48
|
+
|
|
49
|
+
@cSuccess: #16f7e8 - #333;
|
|
50
|
+
@cError: #f67273;
|
|
51
|
+
@cWarn: #FFBA7B;
|
|
52
|
+
@cInfo: #4abdff;
|
|
53
|
+
|
|
54
|
+
@cDark: #333;//#2C0653;
|
|
55
|
+
|
|
56
|
+
:root {
|
|
57
|
+
|
|
58
|
+
--pageWidth: @pageWidth;
|
|
59
|
+
--focusWidth: @focusWidth;
|
|
60
|
+
|
|
61
|
+
--c1: @c1;
|
|
62
|
+
--c2: @c2;
|
|
63
|
+
|
|
64
|
+
--bgOverlay: fade(@c1 + #666, 70%);
|
|
65
|
+
|
|
66
|
+
--cSuccess: @cSuccess;
|
|
67
|
+
--cError: @cError;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
#githubRibbon {
|
|
71
|
+
position: fixed;
|
|
72
|
+
top: 0;
|
|
73
|
+
right: 0;
|
|
74
|
+
width: 149px;
|
|
75
|
+
height: 149px;
|
|
76
|
+
background: url(https://github.blog/wp-content/uploads/2008/12/forkme_right_darkblue_121621.png?resize=149%2C149);
|
|
77
|
+
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/*----------------------------------
|
|
81
|
+
- SKINS: PRIMARY COLORS
|
|
82
|
+
----------------------------------*/
|
|
83
|
+
|
|
84
|
+
// Light silver
|
|
85
|
+
body {
|
|
86
|
+
// Background
|
|
87
|
+
@cBgPage2: @cBgPage - #090909;
|
|
88
|
+
--cBg: @cBgPage;
|
|
89
|
+
--cBg2: @cBgPage2;
|
|
90
|
+
--cBgControl: #fff;
|
|
91
|
+
--cBgHover: #f5f5f5;
|
|
92
|
+
|
|
93
|
+
// Other
|
|
94
|
+
@cLine: #eee;
|
|
95
|
+
@cLine2: @cBgPage - #191919;
|
|
96
|
+
--cLine: @cLine;
|
|
97
|
+
--cLine2: @cLine2;
|
|
98
|
+
|
|
99
|
+
// Text
|
|
100
|
+
@cTxtBase: #8E8E8E;
|
|
101
|
+
@cTxtDesc: #B1B1B1;
|
|
102
|
+
@cTxtDiscret: #D6D6D6;
|
|
103
|
+
@cTxtImportant: @cDark;
|
|
104
|
+
|
|
105
|
+
--cTxtDiscret: @cTxtDiscret;
|
|
106
|
+
--cTxtDesc: @cTxtDesc;
|
|
107
|
+
--cTxtBase: @cTxtBase;
|
|
108
|
+
--cTxtImportant: @cTxtImportant;
|
|
109
|
+
|
|
110
|
+
::selection {
|
|
111
|
+
background: @cDark;
|
|
112
|
+
color: #fff;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// White
|
|
118
|
+
.white,
|
|
119
|
+
.corpsChamp,
|
|
120
|
+
.input,
|
|
121
|
+
.card,
|
|
122
|
+
i.solid {
|
|
123
|
+
|
|
124
|
+
// Background
|
|
125
|
+
--cBg: #fff;
|
|
126
|
+
--cBgControl: #fff;
|
|
127
|
+
--cBgHover: #f5f5f5;
|
|
128
|
+
|
|
129
|
+
// Other
|
|
130
|
+
@cLine: #eee;
|
|
131
|
+
@cLine2: #fff - #191919;
|
|
132
|
+
--cLine: @cLine;
|
|
133
|
+
--cLine2: @cLine2;
|
|
134
|
+
|
|
135
|
+
// Text
|
|
136
|
+
@cTxtBase: #8E8E8E;
|
|
137
|
+
@cTxtDesc: #B1B1B1;
|
|
138
|
+
@cTxtDiscret: #D6D6D6;
|
|
139
|
+
@cTxtImportant: @cDark;
|
|
140
|
+
|
|
141
|
+
--cTxtDiscret: @cTxtDiscret;
|
|
142
|
+
--cTxtDesc: @cTxtDesc;
|
|
143
|
+
--cTxtBase: @cTxtBase;
|
|
144
|
+
--cTxtImportant: @cTxtImportant;
|
|
145
|
+
|
|
146
|
+
border-radius: @radius;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&.c1,
|
|
150
|
+
&.primary {
|
|
151
|
+
.build-theme(@c1, @c1 + #aaa);
|
|
152
|
+
|
|
153
|
+
@cBgHighlight: @c1 + #111;
|
|
154
|
+
--cBgHighlight: @cBgHighlight;
|
|
155
|
+
|
|
156
|
+
&.card {
|
|
157
|
+
border-bottom: solid 3px @c1 - #222;
|
|
158
|
+
box-shadow: 0 2px 50px fade(@c1 + #333, 100%);
|
|
159
|
+
|
|
160
|
+
.btn {
|
|
161
|
+
border: solid 1px fade(#fff, 20%);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.btn.secondary {
|
|
167
|
+
border: solid 2px fade(#000, 10%);
|
|
168
|
+
color: @c1 - #222;
|
|
169
|
+
&:hover {
|
|
170
|
+
border-color: @c1;
|
|
171
|
+
background: transparent !important;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// Color
|
|
176
|
+
.color {
|
|
177
|
+
|
|
178
|
+
&.c1,
|
|
179
|
+
&.primary {
|
|
180
|
+
// Background
|
|
181
|
+
@cBgHighlight: @c1 + #333;
|
|
182
|
+
--cBg: @c1;
|
|
183
|
+
--cBgHighlight: @cBgHighlight;
|
|
184
|
+
--cBgControl: #fff;
|
|
185
|
+
|
|
186
|
+
// Other
|
|
187
|
+
@cLine: fade(#fff, 20%);
|
|
188
|
+
@cLine2: fade(#fff, 40%);
|
|
189
|
+
--cLine: @cLine;
|
|
190
|
+
--cLine2: @cLine2;
|
|
191
|
+
|
|
192
|
+
// Text
|
|
193
|
+
@cTxtDiscret: @c1 + #666;
|
|
194
|
+
@cTxtDesc: @c1 + #888;
|
|
195
|
+
@cTxtBase: @c1 + #888;
|
|
196
|
+
@cTxtImportant: #fff;
|
|
197
|
+
|
|
198
|
+
--cTxtDiscret: @cTxtDiscret;
|
|
199
|
+
--cTxtDesc: @cTxtDesc;
|
|
200
|
+
--cTxtBase: @cTxtBase;
|
|
201
|
+
--cTxtImportant: @cTxtImportant;
|
|
202
|
+
}
|
|
203
|
+
&.c2 { --color: @c2; }
|
|
204
|
+
&.c3 { --color: @c3; }
|
|
205
|
+
&.c4 { --color: @c4; }
|
|
206
|
+
|
|
207
|
+
&.dark {
|
|
208
|
+
// Background
|
|
209
|
+
--cBg: @cDark;
|
|
210
|
+
--cBgControl: #fff;
|
|
211
|
+
|
|
212
|
+
// Other
|
|
213
|
+
@cLine: fade(#fff, 20%);
|
|
214
|
+
@cLine2: fade(#fff, 40%);
|
|
215
|
+
--cLine: @cLine;
|
|
216
|
+
--cLine2: @cLine2;
|
|
217
|
+
|
|
218
|
+
// Text
|
|
219
|
+
@cTxtDiscret: fade(#fff, 30%);
|
|
220
|
+
@cTxtDesc: fade(#fff, 50%);
|
|
221
|
+
@cTxtBase: fade(#fff, 70%);
|
|
222
|
+
@cTxtImportant: #fff;
|
|
223
|
+
|
|
224
|
+
--cTxtDiscret: @cTxtDiscret;
|
|
225
|
+
--cTxtDesc: @cTxtDesc;
|
|
226
|
+
--cTxtBase: @cTxtBase;
|
|
227
|
+
--cTxtImportant: @cTxtImportant;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&.success { --color: @cSuccess; }
|
|
231
|
+
&.info { --color: @cInfo; }
|
|
232
|
+
&.warn { --color: @cWarn; }
|
|
233
|
+
&.error { --color: @cError; }
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/*----------------------------------
|
|
239
|
+
- APPLY SKINS TO ELEMENTS
|
|
240
|
+
----------------------------------*/
|
|
241
|
+
i {
|
|
242
|
+
&.color {
|
|
243
|
+
color: var(--color);
|
|
244
|
+
text-shadow: 0 0 20px var(--color);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.card {
|
|
249
|
+
box-shadow: 0 2px 4px fade(#000, 10%);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.card {
|
|
253
|
+
&.color {
|
|
254
|
+
background: var(--color);
|
|
255
|
+
|
|
256
|
+
&.gray {
|
|
257
|
+
@cBgGray: @cBgPage - #060606;
|
|
258
|
+
--color: @cBgGray;
|
|
259
|
+
background-color: var(--color);
|
|
260
|
+
box-shadow: inset 0 0 30px fade(#000, 10%);
|
|
261
|
+
|
|
262
|
+
@cTxtBase: @cBgGray - #666;
|
|
263
|
+
--cTxtBase: @cTxtBase;
|
|
264
|
+
color: var(--cTxtBase);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
&.glass {
|
|
268
|
+
--color: fade(#000, 85%);
|
|
269
|
+
background-color: var(--color);
|
|
270
|
+
box-sizing: 0;
|
|
271
|
+
backdrop-filter: blur(10px) saturate(180%);
|
|
272
|
+
|
|
273
|
+
h2 {
|
|
274
|
+
font-weight: 400;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*----------------------------------
|
|
2
|
+
- DEPENDANCES
|
|
3
|
+
----------------------------------*/
|
|
4
|
+
|
|
5
|
+
// Npm
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
// Core
|
|
9
|
+
import useContext from '@client/context';
|
|
10
|
+
import { Props as ModalProps } from '@client/components/Dialog/card';
|
|
11
|
+
|
|
12
|
+
// Core components
|
|
13
|
+
import Input from '@client/components/input';
|
|
14
|
+
import Button from '@client/components/button';
|
|
15
|
+
|
|
16
|
+
// App
|
|
17
|
+
|
|
18
|
+
/*----------------------------------
|
|
19
|
+
- CONTROLEUR
|
|
20
|
+
----------------------------------*/
|
|
21
|
+
export default ({ close }: ModalProps) => {
|
|
22
|
+
|
|
23
|
+
const { api, page } = useContext();
|
|
24
|
+
|
|
25
|
+
const [username, setUserName] = React.useState("");
|
|
26
|
+
|
|
27
|
+
const login = () => api.post('/login', { username }).then(() => {
|
|
28
|
+
close(true);
|
|
29
|
+
return page.go('/app');
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<div class="card col w-3-4">
|
|
34
|
+
<header>
|
|
35
|
+
<h2>Login</h2>
|
|
36
|
+
</header>
|
|
37
|
+
|
|
38
|
+
<Input title="Username" value={username} onChange={setUserName} />
|
|
39
|
+
|
|
40
|
+
<Button type="primary" iconR="long-arrow-right" async onClick={login}>
|
|
41
|
+
Let's go
|
|
42
|
+
</Button>
|
|
43
|
+
</div>
|
|
44
|
+
)
|
|
45
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@import (reference) "@/client/assets/theme.less";
|
|
2
|
+
|
|
3
|
+
@layoutWidth: 80em;
|
|
4
|
+
|
|
5
|
+
#layout.app {
|
|
6
|
+
|
|
7
|
+
background: #fff;
|
|
8
|
+
|
|
9
|
+
> .page {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
gap: 2em;
|
|
15
|
+
|
|
16
|
+
min-height: 100vh;
|
|
17
|
+
padding: 1.2em;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*----------------------------------
|
|
2
|
+
- DEPENDANCES
|
|
3
|
+
----------------------------------*/
|
|
4
|
+
|
|
5
|
+
// Npm
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
// Core
|
|
9
|
+
import { ClientContext } from '@client/context';
|
|
10
|
+
|
|
11
|
+
// Core components
|
|
12
|
+
import Router from '@client/router/component';
|
|
13
|
+
|
|
14
|
+
// Resources
|
|
15
|
+
import "./index.less";
|
|
16
|
+
|
|
17
|
+
/*----------------------------------
|
|
18
|
+
- TYPES
|
|
19
|
+
----------------------------------*/
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
/*----------------------------------
|
|
23
|
+
- COMPOSANT
|
|
24
|
+
----------------------------------*/
|
|
25
|
+
export default function App ({ context }: { context: ClientContext }) {
|
|
26
|
+
return (
|
|
27
|
+
<div id="layout" class="app">
|
|
28
|
+
|
|
29
|
+
<Router />
|
|
30
|
+
|
|
31
|
+
</div>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/*----------------------------------
|
|
2
|
+
- DEPENDANCES
|
|
3
|
+
----------------------------------*/
|
|
4
|
+
|
|
5
|
+
// Npm
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
// Core
|
|
9
|
+
import route from '@router';
|
|
10
|
+
import greetings from '@common/data/chaines/greetings';
|
|
11
|
+
|
|
12
|
+
// Core components
|
|
13
|
+
import Button from '@client/components/button';
|
|
14
|
+
|
|
15
|
+
// App
|
|
16
|
+
import useHeader from '@client/pages/useHeader';
|
|
17
|
+
|
|
18
|
+
/*----------------------------------
|
|
19
|
+
- CONTROLEUR
|
|
20
|
+
----------------------------------*/
|
|
21
|
+
route.page('/app', { }, ({}, { api }) => ({
|
|
22
|
+
|
|
23
|
+
// Get data from your API here
|
|
24
|
+
|
|
25
|
+
}), ({ }, { api, page, user, socket }) => {
|
|
26
|
+
|
|
27
|
+
/*----------------------------------
|
|
28
|
+
- INIT
|
|
29
|
+
----------------------------------*/
|
|
30
|
+
|
|
31
|
+
const [connected, setConnected] = React.useState(0);
|
|
32
|
+
React.useEffect(() => {
|
|
33
|
+
const client = socket.open("/user").on('connected', setConnected)
|
|
34
|
+
return () => client.close();
|
|
35
|
+
}, []);
|
|
36
|
+
|
|
37
|
+
useHeader({
|
|
38
|
+
title: "Megacharger: Rent your mobile Internet without compromise",
|
|
39
|
+
subtitle: "Get passive incomes by sharing your internet access to the world developpers. Low battery usage, fully transparent.",
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
/*----------------------------------
|
|
43
|
+
- ACTIONS
|
|
44
|
+
----------------------------------*/
|
|
45
|
+
const logout = () => api.post('/auth/logout').then(() => page.go('/'))
|
|
46
|
+
|
|
47
|
+
/*----------------------------------
|
|
48
|
+
- RENDER
|
|
49
|
+
----------------------------------*/
|
|
50
|
+
return <>
|
|
51
|
+
{greetings( user.name )}
|
|
52
|
+
|
|
53
|
+
<strong class="xxl">Connected users: {connected}</strong>
|
|
54
|
+
|
|
55
|
+
<Button onClick={logout}>Logout</Button>
|
|
56
|
+
</>
|
|
57
|
+
});
|