forked from sagi/seepur
A bit of polish
This commit is contained in:
parent
e70d40dc1e
commit
09ff1e38a6
19 changed files with 413 additions and 775 deletions
|
@ -24,8 +24,7 @@ class AuthController {
|
|||
email: request.input('email'),
|
||||
name: request.input('name'),
|
||||
password: request.input('password'),
|
||||
avatar:
|
||||
`https://api.adorable.io/avatars/285/${request.input('email')}.png`
|
||||
avatar: `/images/default-user-avatar.png`
|
||||
});
|
||||
if (user.id == 1) {
|
||||
user.is_admin = true;
|
||||
|
|
|
@ -33,7 +33,7 @@ class ClientApiController {
|
|||
const validation = await validate(request.all(), rules);
|
||||
if (validation.fails()) {
|
||||
response.status(400);
|
||||
response.send(validation.messages());
|
||||
response.send({code: 400, message: validation.messages()});
|
||||
return false;
|
||||
}
|
||||
const body = request.body;
|
||||
|
@ -42,13 +42,13 @@ class ClientApiController {
|
|||
console.log(file);
|
||||
body.avatar = `/u/images/${file.fileName}`;
|
||||
} else {
|
||||
body.avatar =
|
||||
`https://api.adorable.io/avatars/285/${body.name.trim()}.png`;
|
||||
body.avatar = `/images/default-child-avatar.png`;
|
||||
}
|
||||
const child = await Child.create(body);
|
||||
const link = await Link.create(
|
||||
{user_id: auth.user.id, child_id: child.id, is_parent: true});
|
||||
return child;
|
||||
response.status(201);
|
||||
return {code: 201, child};
|
||||
}
|
||||
|
||||
async getBooks() {}
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="363.463px" height="430.464px" viewBox="0 0 363.463 430.464" enable-background="new 0 0 363.463 430.464"
|
||||
xml:space="preserve">
|
||||
<path fill="#EADB92" d="M186.201,42.361c-9.985,21.587-41.01,39.28-37.344,65.833c8.989,1.438,17.238-0.25,26.312-2.357
|
||||
c8.072-1.874,14.767-8.156,22.983-5.242c19.875,24.72,10.617,72.651,9.257,103.62c-1.594,36.245-7.923,71.565-11.283,106.723
|
||||
c-1.868,19.542-3.801,38.809-6.611,58.04c-2.062,14.107-13.104,46.153,5.291,47.687c5.12-15.648,1.916-35.013,5.797-51.04
|
||||
c3.989-16.467,8.262-34.476,16.279-49.025c8.516-15.448,25.159-19.376,42.077-19.372c16.544,0.002,37.801-4.289,54.172,0.054
|
||||
c41.949,11.123,15.855,84.95,26.613,115.906c2.562,0.672,7.314,1.194,9.547,1.163c2.072-36.722,6.218-71.551,7.915-106.828
|
||||
c0.901-18.771-2.215-36.536-1.351-54.88c0.757-16.019-1.618-35.228-15.202-44.125c-13.8-9.037-36.104-8.456-51.849-10.246
|
||||
c-15.589-1.771-37.751,1.317-44.128-15.959c-5.654-15.316-7.166-33.043-11.008-48.91c-4.16-17.17-9.729-32.768-14.428-48.876
|
||||
c-4.462-15.31-8.228-30.503-14.285-45.58c-6.651-16.551-13.036-20.954-25.51-32.545c7.676,10.25,4.63,23.513,16.236,31.52
|
||||
c-5.912-3.407-5.222-9.182-9.211-14.049c-3.568-4.354-9.405-7.64-14.447-10.924c1.904,11.014,5.743,22.273,17.103,26.883
|
||||
c-2.467,0.568-3.485,2.756-5.135,3.667"/>
|
||||
<ellipse fill="#2408F2" cx="187.385" cy="68.728" rx="2.034" ry="1.544"/>
|
||||
<path fill="#E2C0D0" d="M240.485,183.422c-8.163,2.673-7.586,10.538-3.068,16c2.853,3.452,6.46,1.875,9.693,4.915
|
||||
c3.629,3.41,1.94,7.064,6.638,9.504c11.404,5.923,31.148-6.271,38.222-14.092c-14.875-10.1-37.766,4.098-43.938-16.141
|
||||
c-2.086-1.11-4-1.392-6.44-1.272"/>
|
||||
<path fill="#E2C0D0" d="M220.598,126.924c-9.906,12.5,1.557,30.401,14.082,36.776c2.801-6.345-2.354-38.699-12.977-33.518"/>
|
||||
<path fill="#E2C0D0" d="M311.197,216.018c-2.562-0.976-9.464-7.54-9.089-14.042c-4.103,4.446,7.932,13.63,13.477,15.16
|
||||
c7.969,2.197,14.903-3.952,23.042-5.653c3.024-12.863-30.839-14.555-37.373-9.589"/>
|
||||
<path fill="#E2C0D0" d="M297.743,225.608c3.718-1.491-8.926-18.918-14-8.212C280.786,223.633,293.582,227.277,297.743,225.608z"/>
|
||||
<path fill="#E2C0D0" d="M222.809,168.211c-3.846,7.303,10.538,10.833,10.877,2.337c-3.261-0.74-6.271-1.404-9.773-1.25"/>
|
||||
<path fill="#E2C0D0" d="M213.969,98.674c-0.998,1.577-1.681,3.745-0.913,6.33c0.698,0.753,3.442,3.083,4.228,3.611
|
||||
c3.047-3.742,1.088-12.497-4.419-9.941"/>
|
||||
<path fill="#140F0F" d="M149.886,94.328c-1.639,4.51-3.619,8.798-3.122,13.935c6.54,4.284,17.573,1.917,12.877-7.23
|
||||
c-2.535-2.293-7.623-4.408-8.649-4.532"/>
|
||||
<path fill="#B8C8CC" d="M273.298,286.858c5.833-8.274,13.608-23.883,26.974-17.789c12.78,5.829,7.918,20.818,4.46,30.416
|
||||
c-5.217,14.48,1.028,19.353,5.347,32.775c6.523,20.277-15.798,11.838-26.584,10.537c0.062,0.289,0.08,2.494,0.025,2.77
|
||||
c13.237,4.509,12.628,15.843,14.276,27.041c1.464,9.934,12.853,23.209,4.734,32.276c-14.608,16.321-53.528,10.384-73.589,9.896
|
||||
c-1.953-4.365-3.022-9.137-2.228-14.104c7.835-2.823,14.928-3.803,16.513-12.576c1.433-7.928-2.563-13.113,1.362-21.694
|
||||
c2.641-5.776,9.486-11.914,8.657-18.591c-0.938-7.563-8.885-9.573-14.476-13.434c-12.737-8.801-14.78-23.833-12.308-38.278
|
||||
c1.242-7.262,4.688-16.739,12.25-15.159c11.505,2.404,3.126,10.055,2.286,17.278c-0.493,4.249-2.318,7.304,2.232,10.434
|
||||
c11.373-4.526,12.024-21.136,27.892-19.167c0.719-1.417,1.816-1.186,3.288-1.596"/>
|
||||
<path fill="none" d="M-66.537,574c1.286,2.191,2.268,4.482,3,7"/>
|
||||
<path fill="#0C0CE8" d="M276.639,234.172c-4.016,0.889-10.088,3.751-8.936,9.321c1.235,5.971,7.67,4.104,11.465,7.961
|
||||
c6.764,6.875,4.583,22.624,21.752,17.636c7.596-2.207,15.834-14.288,21.658-19.167c6.518-5.46,15.487-13.393,21.857-16.052
|
||||
c-10.403,5.685-26.13,6.486-37.668,8.593c-8.934,1.632-11.744,0.243-18.126-2.898c-4.703-2.315-8.16-6.248-13.116-4.363"/>
|
||||
<path fill="none" d="M-167.537,529c2.164,0.854,3.121,3.116,3,6"/>
|
||||
<path fill="#F70B54" d="M266.616,239.337c0.651,3.683-1.296,5.763,2.921,7.202c-8.357,3.348-17.877,2.077-27.034,4.208
|
||||
c6.094-5.231,17.145-9.536,24.113-12.442"/>
|
||||
<path fill="#EDABE4" d="M70.447,316.381c2.337,3.156,4.774,9.055-0.105,12.472c-5.231,3.664-8.659-1.724-14.261-1.219
|
||||
c-9.987,0.897-19.75,13.939-28.886-0.437c-4.042-6.361-1.426-20.447-2.223-27.689c-0.89-8.103-1.815-19.567-4.62-25.504
|
||||
c3.612,10.689,14.704,21.062,21.744,29.799c5.451,6.766,8.54,7.482,15.545,9.119c5.163,1.206,10.571,0.438,12.886,4.917"/>
|
||||
<path fill="#F4E806" d="M74.153,326.446c-3.145,2.327-3.203,5.081-7.373,3.528c3.783,7.68,11.767,12.655,17.021,19.931
|
||||
c-0.741-7.672-5.833-17.736-8.902-24.225"/>
|
||||
<path fill="none" d="M198.677,200.08c0.996,2.48-0.691-0.377-1.113-1.033"/>
|
||||
<path fill="#2D4F33" d="M214.244,411.879c-2.441-11.727-13.99-19.523-30.071-18.597c-14.764,0.851-22.911,12.057-35.247,18.649
|
||||
c11.189,0.437,21.67,4.064,34.133,4.079c7.187,0.008,28.877-4.718,30.071-3.1"/>
|
||||
<path fill="none" d="M-208.537,612c2.512,2.171,4.505,4.861,6,8"/>
|
||||
<path fill="#E5DFE4" d="M152.462,400.934c-1.621,2.071-7.15,15.783,4.703,12.97c11.196-2.656,3.206-14.687-4.703-10.903"/>
|
||||
<path opacity="0.4" fill="#706F6F" d="M40.523,331.88c0.012,26.16-5.698,50.683,0.189,76.269c13.771,8.346,31.526,5.96,46.34,6.146
|
||||
c15.186,0.192,32.769-2.9,47.853,0.077c0.406-0.388,0.817-0.769,1.236-1.146c-0.033-10.151-29.312-4.299-37.678-3.896
|
||||
c-12.342,0.591-31.866,2.269-43.461-1.003c-12.113-3.418-10.516-22.771-11.134-34.095c-0.712-13.036,4.193-27.684,2.059-41.161
|
||||
c-1.946,0.14-3.67-0.492-5.403-0.159"/>
|
||||
<ellipse fill="#2408F2" cx="262.463" cy="313" rx="2.488" ry="1.92"/>
|
||||
<path fill="#E2C0D0" d="M345.14,219.111c-10.007,5.452-2.073,19.87,3.997,24.571c6.942-6.781,3.131-16.763-2.646-23.22"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 5.8 KiB |
|
@ -1,587 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="1280"
|
||||
height="720"
|
||||
viewBox="0 0 338.66667 190.5"
|
||||
version="1.1"
|
||||
id="svg4113"
|
||||
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
|
||||
sodipodi:docname="clouds-bg.svg">
|
||||
<defs
|
||||
id="defs4107">
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient4926">
|
||||
<stop
|
||||
style="stop-color:#00b1ff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4922" />
|
||||
<stop
|
||||
style="stop-color:#00b1ff;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop4924" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4926"
|
||||
id="radialGradient4928"
|
||||
cx="166.75397"
|
||||
cy="94.998161"
|
||||
fx="166.75397"
|
||||
fy="94.998161"
|
||||
r="198.05951"
|
||||
gradientTransform="matrix(1.2938551,0.00491648,-0.00332137,0.87407286,-49.886391,40.03175)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.98994949"
|
||||
inkscape:cx="607.1895"
|
||||
inkscape:cy="377.96016"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer3"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
width="1280px"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1043"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata4110">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-106.5)"
|
||||
style="display:inline">
|
||||
<rect
|
||||
id="rect4115"
|
||||
width="396.11902"
|
||||
height="220.73808"
|
||||
x="-18.142857"
|
||||
y="98.184525"
|
||||
style="fill:url(#radialGradient4928);fill-opacity:1;stroke-width:0.26458332" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer2"
|
||||
inkscape:label="cloud1"
|
||||
style="display:inline">
|
||||
<g
|
||||
id="g5052">
|
||||
<g
|
||||
id="g4997-3"
|
||||
style="display:inline;fill:#d0e8f2;fill-opacity:1"
|
||||
transform="translate(0.75595352,-103.85416)">
|
||||
<ellipse
|
||||
style="fill:#d0e8f2;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4988-6"
|
||||
cx="302.38095"
|
||||
cy="148.83333"
|
||||
rx="24.190477"
|
||||
ry="6.0476193" />
|
||||
<ellipse
|
||||
style="fill:#d0e8f2;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4990-7"
|
||||
cx="295.95535"
|
||||
cy="143.91965"
|
||||
rx="10.205358"
|
||||
ry="6.4255953" />
|
||||
<ellipse
|
||||
style="fill:#d0e8f2;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4992-5"
|
||||
cx="308.42856"
|
||||
cy="140.51785"
|
||||
rx="9.0714283"
|
||||
ry="6.0476193" />
|
||||
</g>
|
||||
<g
|
||||
id="g4997"
|
||||
style="display:inline"
|
||||
transform="translate(0,-106.5)">
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4988"
|
||||
cx="302.38095"
|
||||
cy="148.83333"
|
||||
rx="24.190477"
|
||||
ry="6.0476193" />
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4990"
|
||||
cx="295.95535"
|
||||
cy="143.91965"
|
||||
rx="10.205358"
|
||||
ry="6.4255953" />
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4992"
|
||||
cx="308.42856"
|
||||
cy="140.51785"
|
||||
rx="9.0714283"
|
||||
ry="6.0476193" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
transform="translate(-273.09201,6.9432139)"
|
||||
style="display:inline"
|
||||
id="g5052-6">
|
||||
<g
|
||||
id="g4997-3-0"
|
||||
style="display:inline;fill:#d0e8f2;fill-opacity:1"
|
||||
transform="translate(0.75595352,-103.85416)">
|
||||
<ellipse
|
||||
style="fill:#d0e8f2;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4988-6-6"
|
||||
cx="302.38095"
|
||||
cy="148.83333"
|
||||
rx="24.190477"
|
||||
ry="6.0476193" />
|
||||
<ellipse
|
||||
style="fill:#d0e8f2;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4990-7-2"
|
||||
cx="295.95535"
|
||||
cy="143.91965"
|
||||
rx="10.205358"
|
||||
ry="6.4255953" />
|
||||
<ellipse
|
||||
style="fill:#d0e8f2;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4992-5-6"
|
||||
cx="308.42856"
|
||||
cy="140.51785"
|
||||
rx="9.0714283"
|
||||
ry="6.0476193" />
|
||||
</g>
|
||||
<g
|
||||
id="g4997-1"
|
||||
style="display:inline"
|
||||
transform="translate(0,-106.5)">
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4988-8"
|
||||
cx="302.38095"
|
||||
cy="148.83333"
|
||||
rx="24.190477"
|
||||
ry="6.0476193" />
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4990-79"
|
||||
cx="295.95535"
|
||||
cy="143.91965"
|
||||
rx="10.205358"
|
||||
ry="6.4255953" />
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4992-2"
|
||||
cx="308.42856"
|
||||
cy="140.51785"
|
||||
rx="9.0714283"
|
||||
ry="6.0476193" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(0.50502529,0,0,0.48995591,-48.26489,28.158275)"
|
||||
style="display:inline"
|
||||
id="g5052-61">
|
||||
<g
|
||||
id="g4997-3-06"
|
||||
style="display:inline;fill:#d0e8f2;fill-opacity:1"
|
||||
transform="translate(0.75595352,-103.85416)">
|
||||
<ellipse
|
||||
style="fill:#d0e8f2;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4988-6-3"
|
||||
cx="302.38095"
|
||||
cy="148.83333"
|
||||
rx="24.190477"
|
||||
ry="6.0476193" />
|
||||
<ellipse
|
||||
style="fill:#d0e8f2;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4990-7-20"
|
||||
cx="295.95535"
|
||||
cy="143.91965"
|
||||
rx="10.205358"
|
||||
ry="6.4255953" />
|
||||
<ellipse
|
||||
style="fill:#d0e8f2;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4992-5-61"
|
||||
cx="308.42856"
|
||||
cy="140.51785"
|
||||
rx="9.0714283"
|
||||
ry="6.0476193" />
|
||||
</g>
|
||||
<g
|
||||
id="g4997-5"
|
||||
style="display:inline"
|
||||
transform="translate(0,-106.5)">
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4988-5"
|
||||
cx="302.38095"
|
||||
cy="148.83333"
|
||||
rx="24.190477"
|
||||
ry="6.0476193" />
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4990-4"
|
||||
cx="295.95535"
|
||||
cy="143.91965"
|
||||
rx="10.205358"
|
||||
ry="6.4255953" />
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4992-7"
|
||||
cx="308.42856"
|
||||
cy="140.51785"
|
||||
rx="9.0714283"
|
||||
ry="6.0476193" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer3"
|
||||
inkscape:label="cloud2">
|
||||
<g
|
||||
id="g5110"
|
||||
transform="translate(68.955538,-48.108515)">
|
||||
<g
|
||||
id="g5060"
|
||||
style="display:inline;fill:#cee9fa;fill-opacity:1"
|
||||
transform="translate(0,-106.5)">
|
||||
<ellipse
|
||||
style="fill:#cee9fa;fill-opacity:1;stroke-width:0.27688962"
|
||||
id="path4978"
|
||||
cx="181.86272"
|
||||
cy="176.80357"
|
||||
rx="17.386101"
|
||||
ry="9.0714283" />
|
||||
<ellipse
|
||||
style="fill:#cee9fa;fill-opacity:1;stroke-width:0.27688962"
|
||||
id="path4980"
|
||||
cx="209.18375"
|
||||
cy="179.82738"
|
||||
rx="19.869829"
|
||||
ry="12.095239" />
|
||||
<ellipse
|
||||
style="fill:#cee9fa;fill-opacity:1;stroke-width:0.27688962"
|
||||
id="path4982"
|
||||
cx="183.51854"
|
||||
cy="191.16667"
|
||||
rx="17.386101"
|
||||
ry="8.3154764" />
|
||||
<ellipse
|
||||
style="fill:#cee9fa;fill-opacity:1;stroke-width:0.27688962"
|
||||
id="path4984"
|
||||
cx="207.52794"
|
||||
cy="190.7887"
|
||||
rx="11.590734"
|
||||
ry="6.4255953" />
|
||||
<ellipse
|
||||
style="fill:#cee9fa;fill-opacity:1;stroke-width:0.49272871"
|
||||
id="path4986"
|
||||
cx="204.21626"
|
||||
cy="168.11012"
|
||||
rx="15.73028"
|
||||
ry="7.1815476" />
|
||||
</g>
|
||||
<g
|
||||
id="g5060-3"
|
||||
style="display:inline"
|
||||
transform="translate(0.74708498,-109.70938)">
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.27688962"
|
||||
id="path4978-5"
|
||||
cx="181.86272"
|
||||
cy="176.80357"
|
||||
rx="17.386101"
|
||||
ry="9.0714283" />
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.27688962"
|
||||
id="path4980-6"
|
||||
cx="209.18375"
|
||||
cy="179.82738"
|
||||
rx="19.869829"
|
||||
ry="12.095239" />
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.27688962"
|
||||
id="path4982-2"
|
||||
cx="183.51854"
|
||||
cy="191.16667"
|
||||
rx="17.386101"
|
||||
ry="8.3154764" />
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.27688962"
|
||||
id="path4984-9"
|
||||
cx="207.52794"
|
||||
cy="190.7887"
|
||||
rx="11.590734"
|
||||
ry="6.4255953" />
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.49272871"
|
||||
id="path4986-1"
|
||||
cx="204.21626"
|
||||
cy="168.11012"
|
||||
rx="15.73028"
|
||||
ry="7.1815476" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
transform="translate(-18.068055,-76.440158)"
|
||||
id="g5110-0">
|
||||
<g
|
||||
id="g5060-2"
|
||||
style="display:inline;fill:#cee9fa;fill-opacity:1"
|
||||
transform="translate(0,-106.5)">
|
||||
<ellipse
|
||||
style="fill:#cee9fa;fill-opacity:1;stroke-width:0.27688962"
|
||||
id="path4978-3"
|
||||
cx="181.86272"
|
||||
cy="176.80357"
|
||||
rx="17.386101"
|
||||
ry="9.0714283" />
|
||||
<ellipse
|
||||
style="fill:#cee9fa;fill-opacity:1;stroke-width:0.27688962"
|
||||
id="path4980-7"
|
||||
cx="209.18375"
|
||||
cy="179.82738"
|
||||
rx="19.869829"
|
||||
ry="12.095239" />
|
||||
<ellipse
|
||||
style="fill:#cee9fa;fill-opacity:1;stroke-width:0.27688962"
|
||||
id="path4982-5"
|
||||
cx="183.51854"
|
||||
cy="191.16667"
|
||||
rx="17.386101"
|
||||
ry="8.3154764" />
|
||||
<ellipse
|
||||
style="fill:#cee9fa;fill-opacity:1;stroke-width:0.27688962"
|
||||
id="path4984-92"
|
||||
cx="207.52794"
|
||||
cy="190.7887"
|
||||
rx="11.590734"
|
||||
ry="6.4255953" />
|
||||
<ellipse
|
||||
style="fill:#cee9fa;fill-opacity:1;stroke-width:0.49272871"
|
||||
id="path4986-2"
|
||||
cx="204.21626"
|
||||
cy="168.11012"
|
||||
rx="15.73028"
|
||||
ry="7.1815476" />
|
||||
</g>
|
||||
<g
|
||||
id="g5060-3-8"
|
||||
style="display:inline"
|
||||
transform="translate(0.74708498,-109.70938)">
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.27688962"
|
||||
id="path4978-5-9"
|
||||
cx="181.86272"
|
||||
cy="176.80357"
|
||||
rx="17.386101"
|
||||
ry="9.0714283" />
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.27688962"
|
||||
id="path4980-6-7"
|
||||
cx="209.18375"
|
||||
cy="179.82738"
|
||||
rx="19.869829"
|
||||
ry="12.095239" />
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.27688962"
|
||||
id="path4982-2-3"
|
||||
cx="183.51854"
|
||||
cy="191.16667"
|
||||
rx="17.386101"
|
||||
ry="8.3154764" />
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.27688962"
|
||||
id="path4984-9-6"
|
||||
cx="207.52794"
|
||||
cy="190.7887"
|
||||
rx="11.590734"
|
||||
ry="6.4255953" />
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.49272871"
|
||||
id="path4986-1-1"
|
||||
cx="204.21626"
|
||||
cy="168.11012"
|
||||
rx="15.73028"
|
||||
ry="7.1815476" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer4"
|
||||
inkscape:label="cloud3"
|
||||
style="display:inline">
|
||||
<g
|
||||
id="g5161"
|
||||
transform="matrix(0.82978497,0,0,0.66108783,248.22218,23.474195)">
|
||||
<g
|
||||
id="g5117"
|
||||
style="display:inline;fill:#baeaff;fill-opacity:1"
|
||||
transform="translate(0,-106.5)">
|
||||
<ellipse
|
||||
style="fill:#baeaff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4970"
|
||||
cx="96.005951"
|
||||
cy="193.8125"
|
||||
rx="13.607142"
|
||||
ry="12.473214" />
|
||||
<ellipse
|
||||
style="fill:#baeaff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4972"
|
||||
cx="116.41666"
|
||||
cy="200.2381"
|
||||
rx="16.630953"
|
||||
ry="10.583333" />
|
||||
<ellipse
|
||||
style="fill:#baeaff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4974"
|
||||
cx="85.800591"
|
||||
cy="209.30952"
|
||||
rx="21.544643"
|
||||
ry="9.8273811" />
|
||||
<ellipse
|
||||
style="fill:#baeaff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4976"
|
||||
cx="109.23512"
|
||||
cy="210.82143"
|
||||
rx="15.497024"
|
||||
ry="6.0476193" />
|
||||
</g>
|
||||
<g
|
||||
id="g5117-2"
|
||||
style="display:inline"
|
||||
transform="translate(-0.29659219,-110.49871)">
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4970-7"
|
||||
cx="96.005951"
|
||||
cy="193.8125"
|
||||
rx="13.607142"
|
||||
ry="12.473214" />
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4972-0"
|
||||
cx="116.41666"
|
||||
cy="200.2381"
|
||||
rx="16.630953"
|
||||
ry="10.583333" />
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4974-9"
|
||||
cx="85.800591"
|
||||
cy="209.30952"
|
||||
rx="21.544643"
|
||||
ry="9.8273811" />
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4976-3"
|
||||
cx="109.23512"
|
||||
cy="210.82143"
|
||||
rx="15.497024"
|
||||
ry="6.0476193" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(0.86073316,0,0,0.46925075,3.4137306,-30.416344)"
|
||||
style="display:inline"
|
||||
id="g5161-2">
|
||||
<g
|
||||
id="g5117-9"
|
||||
style="display:inline;fill:#baeaff;fill-opacity:1"
|
||||
transform="translate(0,-106.5)">
|
||||
<ellipse
|
||||
style="fill:#baeaff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4970-3"
|
||||
cx="96.005951"
|
||||
cy="193.8125"
|
||||
rx="13.607142"
|
||||
ry="12.473214" />
|
||||
<ellipse
|
||||
style="fill:#baeaff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4972-1"
|
||||
cx="116.41666"
|
||||
cy="200.2381"
|
||||
rx="16.630953"
|
||||
ry="10.583333" />
|
||||
<ellipse
|
||||
style="fill:#baeaff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4974-94"
|
||||
cx="85.800591"
|
||||
cy="209.30952"
|
||||
rx="21.544643"
|
||||
ry="9.8273811" />
|
||||
<ellipse
|
||||
style="fill:#baeaff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4976-7"
|
||||
cx="109.23512"
|
||||
cy="210.82143"
|
||||
rx="15.497024"
|
||||
ry="6.0476193" />
|
||||
</g>
|
||||
<g
|
||||
id="g5117-2-8"
|
||||
style="display:inline"
|
||||
transform="translate(-0.29659219,-110.49871)">
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4970-7-4"
|
||||
cx="96.005951"
|
||||
cy="193.8125"
|
||||
rx="13.607142"
|
||||
ry="12.473214" />
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4972-0-5"
|
||||
cx="116.41666"
|
||||
cy="200.2381"
|
||||
rx="16.630953"
|
||||
ry="10.583333" />
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4974-9-0"
|
||||
cx="85.800591"
|
||||
cy="209.30952"
|
||||
rx="21.544643"
|
||||
ry="9.8273811" />
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.26458332"
|
||||
id="path4976-3-3"
|
||||
cx="109.23512"
|
||||
cy="210.82143"
|
||||
rx="15.497024"
|
||||
ry="6.0476193" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 17 KiB |
BIN
public/images/default-child-avatar.png
Normal file
BIN
public/images/default-child-avatar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.6 KiB |
128
public/images/default-child-avatar.svg
Normal file
128
public/images/default-child-avatar.svg
Normal file
|
@ -0,0 +1,128 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
|
||||
sodipodi:docname="default-child-avatar.svg"
|
||||
xml:space="preserve"
|
||||
enable-background="new 0 0 363.463 430.464"
|
||||
viewBox="0 0 175.47312 168.01812"
|
||||
height="168.01811"
|
||||
width="175.47313"
|
||||
y="0px"
|
||||
x="0px"
|
||||
id="Layer_1"
|
||||
version="1.1"><metadata
|
||||
id="metadata53"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs51" /><sodipodi:namedview
|
||||
inkscape:current-layer="Layer_1"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-x="0"
|
||||
inkscape:cy="144.63254"
|
||||
inkscape:cx="77.764259"
|
||||
inkscape:zoom="2.1325826"
|
||||
showgrid="false"
|
||||
id="namedview49"
|
||||
inkscape:window-height="1136"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
guidetolerance="10"
|
||||
gridtolerance="10"
|
||||
objecttolerance="10"
|
||||
borderopacity="1"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff" />
|
||||
|
||||
<ellipse
|
||||
style="stroke-width:0.836862"
|
||||
id="ellipse4"
|
||||
ry="1.310876"
|
||||
rx="1.6778166"
|
||||
cy="-132.10965"
|
||||
cx="47.937897"
|
||||
fill="#2408f2" />
|
||||
|
||||
<path
|
||||
style="stroke-width:0.836862"
|
||||
id="path8"
|
||||
d="m 75.334812,-82.700492 c -8.171314,10.612661 1.284346,25.810842 11.616034,31.223299 2.310504,-5.386987 -1.94178,-32.855955 -10.704536,-28.457215"
|
||||
fill="#e2c0d0" />
|
||||
|
||||
|
||||
|
||||
<path
|
||||
style="stroke-width:0.836862"
|
||||
id="path16"
|
||||
d="m 69.866647,-106.68511 c -0.823235,1.33889 -1.386632,3.17955 -0.75312,5.37425 0.57577,0.63931 2.839255,2.617512 3.487615,3.065792 2.513425,-3.177012 0.897475,-10.610122 -3.645168,-8.440042"
|
||||
fill="#e2c0d0" />
|
||||
<path
|
||||
style="stroke-width:0.836862"
|
||||
id="path18"
|
||||
d="m 17.005527,-110.37492 c -1.351986,3.82905 -2.985259,7.46962 -2.575291,11.831002 5.394749,3.63717 14.495709,1.62755 10.622047,-6.138372 -2.091084,-1.94678 -6.2881,-3.74245 -7.134432,-3.84772"
|
||||
fill="#140f0f" />
|
||||
<path
|
||||
style="stroke-width:0.836862"
|
||||
id="path20"
|
||||
d="m 118.80626,53.085546 c 4.81156,-7.024733 11.22505,-20.276976 22.25047,-15.103091 10.54203,4.948896 6.53144,17.674751 3.67899,25.823577 -4.30343,12.293704 0.84798,16.430944 4.41066,27.826396 5.38073,17.215432 -13.03154,10.050612 -21.92876,8.946052 0.0511,0.24536 0.066,2.11744 0.0206,2.35176 10.91901,3.8282 10.41665,13.45091 11.77607,22.95816 1.20763,8.43409 10.60225,19.70474 3.905,27.40274 -12.04993,13.85674 -44.154467,8.81615 -60.702491,8.40183 -1.611001,-3.70594 -2.492803,-7.75743 -1.837844,-11.97447 6.462976,-2.39677 12.313887,-3.2288 13.62133,-10.67719 1.182061,-6.73098 -2.11418,-11.13311 1.123494,-18.41849 2.178522,-4.9039 7.824861,-10.11514 7.141031,-15.784 C 101.4911,98.417739 94.935735,96.711223 90.323802,93.433185 79.817238,85.961022 78.131998,73.198659 80.171114,60.934671 c 1.024507,-6.165532 3.867062,-14.211628 10.104844,-12.870187 9.490306,2.041027 2.578592,8.536825 1.885688,14.669245 -0.406668,3.607456 -1.912084,6.201191 1.841144,8.858598 9.38142,-3.842629 9.91842,-17.944734 23.0077,-16.273028 0.59309,-1.203051 1.49799,-1.006929 2.71222,-1.355024"
|
||||
fill="#b8c8cc" />
|
||||
<path
|
||||
id="path22"
|
||||
d="m -170.50425,565.87825 c 1.286,2.191 2.268,4.482 3,7"
|
||||
fill="none" />
|
||||
<path
|
||||
style="stroke-width:0.836862"
|
||||
id="path24"
|
||||
d="m 121.56221,8.3544504 c -3.31274,0.7547725 -8.32145,3.1846476 -7.37118,7.9136496 1.01874,5.069456 6.32688,3.484349 9.45731,6.758992 5.57953,5.836964 3.78045,19.208069 17.94292,14.973192 6.26583,-1.873771 13.06123,-12.130697 17.86536,-16.273031 5.3766,-4.63561 12.775,-11.37083 18.02952,-13.6283555 -8.58128,4.8266385 -21.55425,5.5066985 -31.07178,7.2955685 -7.36952,1.385589 -9.68745,0.20631 -14.95187,-2.46044 -3.87944,-1.965465 -6.73107,-5.3046326 -10.8192,-3.7042432"
|
||||
fill="#0c0ce8" />
|
||||
<path
|
||||
id="path26"
|
||||
d="m -271.50425,520.87825 c 2.164,0.854 3.121,3.116 3,6"
|
||||
fill="none" />
|
||||
<path
|
||||
style="stroke-width:0.836862"
|
||||
id="path28"
|
||||
d="m 113.29438,12.739602 c 0.537,3.126915 -1.06905,4.892862 2.40949,6.114591 -6.89356,2.842496 -14.74647,1.7634 -22.299947,3.572647 5.026851,-4.441187 14.142657,-8.096187 19.890457,-10.563419"
|
||||
fill="#f70b54" />
|
||||
<path
|
||||
id="path30"
|
||||
d="m 40.033471,8.5456196 c 2.337,3.1560004 4.774,9.0550004 -0.105,12.4720004 -5.231,3.664 -8.659,-1.724 -14.261,-1.219 -9.987,0.897 -19.7500004,13.939 -28.8860008,-0.437 -4.042,-6.361 -1.4260001,-20.4470004 -2.2230001,-27.6890004 -0.8899999,-8.1029986 -1.8149999,-19.5669986 -4.6200001,-25.5039986 3.6120002,10.689 14.7040002,21.062 21.744001,29.7989986 5.451,6.766 8.54,7.482 15.545,9.119 5.163,1.206 10.571,0.438 12.886,4.9170004"
|
||||
fill="#edabe4" />
|
||||
<path
|
||||
id="path32"
|
||||
d="m 43.739471,18.61062 c -3.145,2.327 -3.203,5.081 -7.373,3.528 3.783,7.68 11.767,12.655 17.021,19.931 -0.741,-7.672 -5.833,-17.736 -8.902,-24.225"
|
||||
fill="#f4e806" />
|
||||
<path
|
||||
style="stroke-width:0.836862"
|
||||
id="path34"
|
||||
d="m 57.252505,-20.590102 c 0.821585,2.105553 -0.569996,-0.320077 -0.918098,-0.87703"
|
||||
fill="none" />
|
||||
|
||||
<path
|
||||
id="path38"
|
||||
d="m -312.50425,603.87825 c 2.512,2.171 4.505,4.861 6,8"
|
||||
fill="none" />
|
||||
|
||||
<path
|
||||
id="path42"
|
||||
d="m -63.444247,323.75825 c 0.012,26.16 -5.698,50.683 0.189,76.269 13.771,8.346 31.526,5.96 46.34,6.146 15.186,0.192 32.769,-2.9 47.853,0.077 0.406,-0.388 0.817,-0.769 1.236,-1.146 -0.033,-10.151 -29.312,-4.299 -37.678,-3.896 -12.342,0.591 -31.866,2.269 -43.461,-1.003 -12.113,-3.418 -10.516,-22.771 -11.134,-34.095 -0.712,-13.036 4.193,-27.684 2.059,-41.161 -1.946,0.14 -3.67,-0.492 -5.403,-0.159"
|
||||
fill="#706f6f"
|
||||
opacity="0.4" />
|
||||
<ellipse
|
||||
style="stroke-width:0.836862"
|
||||
id="ellipse44"
|
||||
ry="1.6301048"
|
||||
rx="2.0523145"
|
||||
cy="75.280441"
|
||||
cx="109.86864"
|
||||
fill="#2408f2" />
|
||||
|
||||
</svg>
|
After Width: | Height: | Size: 6 KiB |
BIN
public/images/default-user-avatar.png
Normal file
BIN
public/images/default-user-avatar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -7139,6 +7139,10 @@ h6 {
|
|||
.textarea {
|
||||
height: 2.534em; }
|
||||
|
||||
.image.is-light {
|
||||
background-color: whitesmoke;
|
||||
color: rgba(0, 0, 0, 0.7); }
|
||||
|
||||
.button {
|
||||
transition: all 200ms ease;
|
||||
font-weight: 500;
|
||||
|
@ -8047,3 +8051,31 @@ video {
|
|||
|
||||
.is-mirrored {
|
||||
transform: scaleX(-1); }
|
||||
|
||||
.is-relative {
|
||||
position: relative; }
|
||||
|
||||
.editable-image {
|
||||
cursor: pointer; }
|
||||
.editable-image:hover::after {
|
||||
opacity: 1;
|
||||
transform: scaleY(1);
|
||||
height: 54px; }
|
||||
.editable-image::after {
|
||||
opacity: 0;
|
||||
transform: scaleY(0);
|
||||
transition: all .3s;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
content: '\f093';
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
height: 0%;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
font: normal normal normal 14px/1 ForkAwesome;
|
||||
color: whitesmoke;
|
||||
font-size: 50px;
|
||||
padding-top: 2px; }
|
||||
|
|
|
@ -423,3 +423,37 @@ video{
|
|||
.is-mirrored{
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
.is-relative{
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.editable-image{
|
||||
|
||||
cursor: pointer;
|
||||
&:hover{
|
||||
&::after{
|
||||
opacity: 1;
|
||||
transform: scaleY(1);
|
||||
height: 54px;
|
||||
}
|
||||
}
|
||||
&::after{
|
||||
opacity: 0;
|
||||
transform: scaleY(0);
|
||||
transition: all .3s;
|
||||
position: absolute;
|
||||
bottom:0;
|
||||
left:0;
|
||||
content: '\f093';
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
height: 0%;
|
||||
background-color: rgba(0, 0, 0, .4);
|
||||
font: normal normal normal 14px/1 ForkAwesome;
|
||||
color: whitesmoke;
|
||||
font-size: 50px;
|
||||
padding-top: 2px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,11 @@ h6 {
|
|||
height: 2.534em;
|
||||
}
|
||||
|
||||
.image.is-light{
|
||||
background-color: whitesmoke;
|
||||
color: rgba(0, 0, 0, 0.7);
|
||||
}
|
||||
|
||||
.button {
|
||||
transition: all 200ms ease;
|
||||
font-weight: 500;
|
||||
|
|
137
resources/scripts/applications/home/components/AddChildModal.vue
Normal file
137
resources/scripts/applications/home/components/AddChildModal.vue
Normal file
|
@ -0,0 +1,137 @@
|
|||
<template>
|
||||
<Modal
|
||||
title="Add your child"
|
||||
:isActive="isActive"
|
||||
acceptText="Add"
|
||||
rejectText="Cancel"
|
||||
@accept="addChild()"
|
||||
@close="onColse()"
|
||||
>
|
||||
<h2 class="subtitle">I am the proud parent of:</h2>
|
||||
<form class="form" id="form-add-child">
|
||||
<div class="field">
|
||||
<label class="label">Name</label>
|
||||
<div class="control has-icons-left">
|
||||
<input
|
||||
:class="`input ${!!errors.name ? 'is-danger' : ''}`"
|
||||
required="true"
|
||||
name="name"
|
||||
type="text"
|
||||
placeholder="John Snow"
|
||||
:disabled="!childValidation.enableInput"
|
||||
v-model="childValidation.name"
|
||||
/>
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fa fa-id-card"></i>
|
||||
</span>
|
||||
</div>
|
||||
<p class="help is-danger" v-if="!!errors.name">{{ `${errors.name.message}` }}</p>
|
||||
<!-- TODO: Error messages -->
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label">Birthday</label>
|
||||
<div class="control has-icons-left">
|
||||
<input
|
||||
:class="`input ${!!errors.dob ? 'is-danger' : ''}`"
|
||||
required="true"
|
||||
name="dob"
|
||||
type="date"
|
||||
:disabled="!childValidation.enableInput"
|
||||
v-model="childValidation.dob"
|
||||
/>
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fa fa-gift"></i>
|
||||
</span>
|
||||
</div>
|
||||
<p class="help is-danger" v-if="!!errors.dob">{{ `${errors.dob.message}` }}</p>
|
||||
</div>
|
||||
<div style="width:40%">
|
||||
<figure class="image is-avatar is-1by1 is-light">
|
||||
<img :src="childValidation.avatar || '/images/default-child-avatar.png'" alt />
|
||||
</figure>
|
||||
</div>
|
||||
<file-select
|
||||
v-if="!childValidation.avatar"
|
||||
v-model="childValidation.avatar"
|
||||
accept="image/*"
|
||||
lable="Upload a photo (1:1)"
|
||||
></file-select>
|
||||
<button
|
||||
class="button is-rounded is-danger"
|
||||
v-else
|
||||
@click="childValidation.avatar = null"
|
||||
>Cleare image</button>
|
||||
</form>
|
||||
</Modal>
|
||||
</template>
|
||||
|
||||
|
||||
<script lang="ts">
|
||||
import Modal from "../../shared/components/Modal/Modal.vue";
|
||||
import Services from "../../services";
|
||||
import FileSelect from "../../shared/components/FileSelect/FileSelect.vue";
|
||||
export default {
|
||||
name: "AddChildModal",
|
||||
components: {
|
||||
Modal,
|
||||
FileSelect
|
||||
},
|
||||
props: ["isActive"],
|
||||
data() {
|
||||
return {
|
||||
errors: {},
|
||||
childValidation: {
|
||||
enableInput: true,
|
||||
name: null,
|
||||
dob: null,
|
||||
avatar: null
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
onColse() {
|
||||
this.$emit("onClose");
|
||||
this.childValidation.name = null;
|
||||
this.childValidation.dob = null;
|
||||
this.childValidation.avatar = null;
|
||||
},
|
||||
async addChild() {
|
||||
this.errors = {};
|
||||
this.childValidation.enableInput = false;
|
||||
const childData = {
|
||||
name: this.childValidation.name,
|
||||
dob: this.childValidation.dob,
|
||||
avatar: this.childValidation.avatar
|
||||
};
|
||||
|
||||
try {
|
||||
const response = await Services.ApiService.createChild(
|
||||
childData.name,
|
||||
childData.dob,
|
||||
childData.avatar
|
||||
);
|
||||
if (response.code === 201) this.$emit("onCreated", response.child);
|
||||
else if (response.code === 400) {
|
||||
response.message.forEach(m => {
|
||||
this.errors[m.field] = m;
|
||||
});
|
||||
console.log(!!this.errors.name);
|
||||
} else {
|
||||
this.$emit("onFail", response.message);
|
||||
this.childValidation.name = null;
|
||||
this.childValidation.dob = null;
|
||||
this.childValidation.avatar = null;
|
||||
}
|
||||
} catch (e) {
|
||||
this.$emit("onFail", e.message);
|
||||
this.childValidation.name = null;
|
||||
this.childValidation.dob = null;
|
||||
this.childValidation.avatar = null;
|
||||
}
|
||||
this.childValidation.enableInput = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -31,8 +31,8 @@
|
|||
<div class="columns is-fullheight m-t-md">
|
||||
<div class="column is-2">
|
||||
<div class="card">
|
||||
<div class="card-image p-md">
|
||||
<figure class="image is-1by1">
|
||||
<div class="card-image p-md is-relative">
|
||||
<figure :class="`image is-1by1 is-light ${isParent ? 'editable-image' : ''}`">
|
||||
<img :src="child.avatar" class="is-rounded is-avatar" />
|
||||
</figure>
|
||||
</div>
|
||||
|
@ -212,7 +212,7 @@ export default {
|
|||
} else {
|
||||
this.child.connections.push(connection.data.user);
|
||||
}
|
||||
console.log(connection);
|
||||
await this.getUser();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,13 @@
|
|||
<Loading />
|
||||
</div>
|
||||
<div class v-else>
|
||||
<!-- Add Child Modal -->
|
||||
<AddChildModal
|
||||
:isActive="showAddChildModal"
|
||||
@onFail="onCreateChildFailed($event)"
|
||||
@onCreated="onChildCreated($event)"
|
||||
@onClose="showAddChildModal=false"
|
||||
/>
|
||||
<!-- Profile Cover Modal -->
|
||||
<Modal
|
||||
title="Change Cover"
|
||||
|
@ -31,8 +38,11 @@
|
|||
<div class="columns is-fullheight m-t-md">
|
||||
<div class="column is-2">
|
||||
<div class="card">
|
||||
<div class="card-image p-md">
|
||||
<figure class="image is-1by1">
|
||||
<div class="card-image p-md is-relative">
|
||||
<figure
|
||||
class="image is-1by1 editable-image is-light"
|
||||
@click="onChangeAvatarClicked()"
|
||||
>
|
||||
<img :src="user.avatar" class="is-rounded is-avatar" />
|
||||
</figure>
|
||||
</div>
|
||||
|
@ -46,6 +56,9 @@
|
|||
></ChildCard>
|
||||
<br />
|
||||
</div>
|
||||
<div v-else>
|
||||
<p class="card-header-title">No Connections yet...</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -103,7 +116,12 @@
|
|||
<!-- <button class="button" @click="onAddClicked()">
|
||||
<i class="fa fa-fw fa-plus"></i> Add
|
||||
</button>-->
|
||||
<button class="button is-success m-l-md" @click="showCreateCallModal=true">
|
||||
<button
|
||||
class="button is-success m-l-md"
|
||||
@click="showCreateCallModal=true"
|
||||
:disabled="!user.connections.children.length"
|
||||
:title="user.connections.children.length ? 'Start a new call' : 'Only a parent of a child can start a call'"
|
||||
>
|
||||
<i class="fa fa-fw fa-phone"></i> Call
|
||||
</button>
|
||||
</div>
|
||||
|
@ -140,6 +158,7 @@ import ChildCard from "../components/Child_Card.vue";
|
|||
import Services from "../../services/index";
|
||||
import Loading from "../../shared/components/Loading/Loading.vue";
|
||||
import ProfileHeader from "../components/ProfileHeader.vue";
|
||||
import AddChildModal from "../components/AddChildModal.vue";
|
||||
import AddConnectionModal from "../components/AddConnectionModal.vue";
|
||||
import ConfigureNewCallModal from "../components/ConfigureNewCallModal.vue";
|
||||
import FileSelect from "../../shared/components/FileSelect/FileSelect.vue";
|
||||
|
@ -156,7 +175,8 @@ export default {
|
|||
AvatarBadge,
|
||||
AddConnectionModal,
|
||||
ConfigureNewCallModal,
|
||||
ChildCard
|
||||
ChildCard,
|
||||
AddChildModal
|
||||
},
|
||||
beforeCreate() {},
|
||||
async created() {
|
||||
|
@ -171,24 +191,51 @@ export default {
|
|||
inEditMode: false,
|
||||
showCoverModal: false,
|
||||
showCreateCallModal: false,
|
||||
showAddChildModal: false,
|
||||
showAddConnectionModal: false,
|
||||
childCoverModalImage: null,
|
||||
addMenuOpen: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
onAddClicked(action: string) {
|
||||
onAddClicked(action: "book" | "slideshow" | "puzzle" | "child") {
|
||||
switch (action) {
|
||||
case "child":
|
||||
this.showAddChildModal = true;
|
||||
break;
|
||||
default:
|
||||
this.notify({
|
||||
message: `Add ${action} button clicked. Still not working`
|
||||
});
|
||||
}
|
||||
this.addMenuOpen = false;
|
||||
},
|
||||
onChangeAvatarClicked() {
|
||||
this.notify({
|
||||
message: `Upload avatar clicked. Still not working`
|
||||
});
|
||||
},
|
||||
onDeleteClicked() {
|
||||
this.notify({ message: "Delete button clicked. Still not working" });
|
||||
},
|
||||
goChildProfile(connection) {
|
||||
this.$router.push({ path: `/child/${connection.id}` });
|
||||
},
|
||||
async onChildCreated(child) {
|
||||
this.loading = true;
|
||||
await this.getUser();
|
||||
this.loading = false;
|
||||
this.showAddChildModal = false;
|
||||
this.notify({
|
||||
message: `Woohoo! ${child.name} created!`,
|
||||
level: "success"
|
||||
});
|
||||
this.goChildProfile(child);
|
||||
},
|
||||
onCreateChildFailed(msg) {
|
||||
this.notify({ message: `ERROR: ${msg}`, level: "danger" });
|
||||
this.showAddChildModal = false;
|
||||
},
|
||||
async makeCall(event) {
|
||||
try {
|
||||
const response = await Services.ApiService.createCall(event);
|
||||
|
|
|
@ -4,103 +4,8 @@
|
|||
<Loading />
|
||||
</div>
|
||||
<div class v-else>
|
||||
<Modal
|
||||
title="Add A child"
|
||||
:isActive="enableChildModel"
|
||||
acceptText="Add"
|
||||
rejectText="Cancel"
|
||||
@accept="addChild()"
|
||||
@close="enableChildModel=false"
|
||||
>
|
||||
<form class="form register" id="form-register">
|
||||
<div class="field">
|
||||
<label class="label">Name</label>
|
||||
<div class="control has-icons-left">
|
||||
<input
|
||||
:class="['input']"
|
||||
required="true"
|
||||
name="name"
|
||||
type="text"
|
||||
placeholder="John Snow"
|
||||
:disabled="!childValidation.enableInput"
|
||||
v-model="childValidation.name"
|
||||
/>
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fa fa-id-card"></i>
|
||||
</span>
|
||||
</div>
|
||||
<p class="help is-danger">{{ '' }}</p>
|
||||
<!-- TODO: Error messages -->
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label">Birthday</label>
|
||||
<div class="control has-icons-left">
|
||||
<input
|
||||
:class="['input']"
|
||||
required="true"
|
||||
name="dob"
|
||||
type="date"
|
||||
:disabled="!childValidation.enableInput"
|
||||
v-model="childValidation.dob"
|
||||
/>
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fa fa-gift"></i>
|
||||
</span>
|
||||
</div>
|
||||
<p class="help is-danger">{{ '' }}</p>
|
||||
</div>
|
||||
<file-select v-model="childValidation.avatar" accept="image/*" lable="Upload Avatar:"></file-select>
|
||||
</form>
|
||||
</Modal>
|
||||
<div class="has-text-centered">
|
||||
<h3 class="title">Settings</h3>
|
||||
<h4 class="subtitle">{{user.name}}</h4>
|
||||
</div>
|
||||
<div class="columns">
|
||||
<div class="column is-3">
|
||||
<figure class="image is-128x128 m-auto">
|
||||
<img class="is-rounded is-avatar" :src="user.avatar" />
|
||||
</figure>
|
||||
<div class="card m-t-lg">
|
||||
<header class="card-header">
|
||||
<p class="card-header-title">My Children</p>
|
||||
</header>
|
||||
<div class="card-content">
|
||||
<ChildCard v-for="child in user.connections.children" :key="child.id" :child="child"></ChildCard>
|
||||
</div>
|
||||
<footer class="card-footer">
|
||||
<a
|
||||
:enabled="childValidation.enableInput"
|
||||
class="card-footer-item"
|
||||
@click="enableChildModel=true"
|
||||
>Add a New Child</a>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<form class="form">
|
||||
<div class="field">
|
||||
<label class="label">Name</label>
|
||||
<div class="control">
|
||||
<input
|
||||
:disabled="!childValidation.enableInput"
|
||||
class="input"
|
||||
type="text"
|
||||
placeholder="Text input"
|
||||
v-model="user.name"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label">Email</label>
|
||||
<div class="control">
|
||||
<input class="input" v-model="user.email" type="email" placeholder="Text input" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<h1 class="is-1">Under a complete remake.</h1>
|
||||
<h2 class="subtitle">Add a child from your homepage</h2>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -99,9 +99,7 @@ export default class ApiService {
|
|||
};
|
||||
try {
|
||||
const response = await fetch('/api/v1/client/child/', options);
|
||||
console.log(response);
|
||||
return response.json();
|
||||
|
||||
} catch (e) {
|
||||
console.error(`createChild ERROR: ${e.message}`);
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue