@@ -6,7 +6,7 @@ LANG_DEFAULT='it'
|
||||
MONGODB_HOST='http://localhost:3000'
|
||||
PAO_APP_ID='KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF'
|
||||
MASTER_KEY='KKPPSS5KJK435J3KSS9F9D8S9F8SD3CR3T'
|
||||
LOGO_REG='quasar-logo-full.svg'
|
||||
LOGO_REG='freeplanet-logo-full.svg'
|
||||
TEST_EMAIL='paolo.arena77@gmail.com'
|
||||
TEST_USERNAME='paoloar77'
|
||||
TEST_PASSWORD='mypassword@1A'
|
||||
|
||||
23
package-lock.json
generated
@@ -10611,6 +10611,11 @@
|
||||
"integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=",
|
||||
"dev": true
|
||||
},
|
||||
"gsap": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/gsap/-/gsap-2.0.2.tgz",
|
||||
"integrity": "sha512-WyT0uuDNb+5xMccx4SsVcI1CwvIL0BPgP8TyJJmMWT/btGXUNtKesnkXFMMshYs37renFhDo1P5NEoizeonviQ=="
|
||||
},
|
||||
"gzip-size": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.0.0.tgz",
|
||||
@@ -13267,6 +13272,11 @@
|
||||
"topo": "3.0.3"
|
||||
}
|
||||
},
|
||||
"jquery": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz",
|
||||
"integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg=="
|
||||
},
|
||||
"js-base64": {
|
||||
"version": "2.4.9",
|
||||
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.9.tgz",
|
||||
@@ -22397,6 +22407,11 @@
|
||||
"is-plain-obj": "1.1.0"
|
||||
}
|
||||
},
|
||||
"sortablejs": {
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.7.0.tgz",
|
||||
"integrity": "sha1-gKKyNwq9Vo4c7IwnETHvMKkE+ig="
|
||||
},
|
||||
"source-list-map": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz",
|
||||
@@ -24377,6 +24392,14 @@
|
||||
"integrity": "sha512-x3LV3wdmmERhVCYy3quqA57NJW7F3i6faas++pJQWtknWT+n7k30F4TVdHvCLn48peTJFRvCpxs3UuFPqgeELg==",
|
||||
"dev": true
|
||||
},
|
||||
"vuedraggable": {
|
||||
"version": "2.17.0",
|
||||
"resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.17.0.tgz",
|
||||
"integrity": "sha512-TAC5tJTSbHSINQCSB59qHnuzT0Ad+E3IgvSWuA1e9UaebD8DxKaY1tCdvL3XvuLoaM3wc1dhpP/NbjpdxYsrng==",
|
||||
"requires": {
|
||||
"sortablejs": "1.7.0"
|
||||
}
|
||||
},
|
||||
"vueify": {
|
||||
"version": "9.4.1",
|
||||
"resolved": "https://registry.npmjs.org/vueify/-/vueify-9.4.1.tgz",
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
"google-translate-api": "^2.3.0",
|
||||
"graphql": "^0.13.2",
|
||||
"graphql-tag": "^2.8.0",
|
||||
"gsap": "^2.0.2",
|
||||
"jquery": "^3.3.1",
|
||||
"js-cookie": "^2.2.0",
|
||||
"localforage": "^1.7.3",
|
||||
"normalize.css": "^8.0.0",
|
||||
@@ -44,6 +46,7 @@
|
||||
"vue-property-decorator": "^7.2.0",
|
||||
"vue-router": "^3.0.1",
|
||||
"vue-svgicon": "^3.1.0",
|
||||
"vuedraggable": "^2.17.0",
|
||||
"vuelidate": "^0.7.4",
|
||||
"vuex": "^3.0.1",
|
||||
"vuex-class": "^0.3.1",
|
||||
|
||||
@@ -118,11 +118,13 @@ module.exports = function (ctx) {
|
||||
'QToolbar',
|
||||
'QToolbarTitle',
|
||||
'QBtn',
|
||||
'QBtnDropdown',
|
||||
'QIcon',
|
||||
'QList',
|
||||
'QListHeader',
|
||||
'QItem',
|
||||
'QItemMain',
|
||||
'QItemTile',
|
||||
'QItemSide',
|
||||
'QCard',
|
||||
'QCardTitle',
|
||||
@@ -182,31 +184,16 @@ module.exports = function (ctx) {
|
||||
description: 'Social project in order to connecting people each others (working in progress...)',
|
||||
display: 'standalone',
|
||||
orientation: 'portrait',
|
||||
theme_color: '#ffffff',
|
||||
background_color: '#ffffff',
|
||||
theme_color: '#027be3',
|
||||
icons: [
|
||||
{
|
||||
'src': 'statics/icons/icon-128x128.png',
|
||||
'sizes': '128x128',
|
||||
'type': 'image/png'
|
||||
},
|
||||
{
|
||||
'src': 'statics/icons/icon-192x192.png',
|
||||
'src': 'statics/icons/android-chrome-192x192.png',
|
||||
'sizes': '192x192',
|
||||
'type': 'image/png'
|
||||
},
|
||||
{
|
||||
'src': 'statics/icons/icon-256x256.png',
|
||||
'sizes': '256x256',
|
||||
'type': 'image/png'
|
||||
},
|
||||
{
|
||||
'src': 'statics/icons/icon-384x384.png',
|
||||
'sizes': '384x384',
|
||||
'type': 'image/png'
|
||||
},
|
||||
{
|
||||
'src': 'statics/icons/icon-512x512.png',
|
||||
'src': 'statics/icons/android-chrome-512x512',
|
||||
'sizes': '512x512',
|
||||
'type': 'image/png'
|
||||
}
|
||||
|
||||
@@ -1,191 +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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="67.407623mm"
|
||||
height="62.908276mm"
|
||||
viewBox="0 0 238.84591 222.90334"
|
||||
id="svg3570"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="quasar-logo-full.svg">
|
||||
<defs
|
||||
id="defs3572" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.979899"
|
||||
inkscape:cx="-39.753589"
|
||||
inkscape:cy="27.706388"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="g4895-4-4"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1056"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata3575">
|
||||
<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 />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-277.71988,-312.33911)">
|
||||
<g
|
||||
id="g4895-4-4"
|
||||
transform="translate(1419.0442,398.9018)">
|
||||
<g
|
||||
transform="translate(-29.620665,-4)"
|
||||
id="g4579-2-20">
|
||||
<g
|
||||
id="g4445-2-0"
|
||||
transform="translate(12.499948,7.809312)">
|
||||
<g
|
||||
inkscape:export-ydpi="44.860481"
|
||||
inkscape:export-xdpi="44.860481"
|
||||
inkscape:export-filename="/home/emanuele/Desktop/logo1.png"
|
||||
transform="translate(-712.85583,-503.26814)"
|
||||
id="g4561-6-7-0">
|
||||
<g
|
||||
transform="translate(16.233481,0)"
|
||||
style="font-style:normal;font-weight:normal;font-size:50.25774765px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#2632AA;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="flowRoot4513-6-6-08">
|
||||
<path
|
||||
d="m -402.73125,631.46823 q -0.6125,0.0438 -1.3125,0.0875 -0.65625,0 -1.4,0 l -9.31875,0 q -12.81875,0 -12.81875,-8.44375 l 0,-13.475 q 0,-8.26875 12.6,-8.26875 l 9.75625,0 q 12.6,0 12.6,8.26875 l 0,13.475 q 0,5.03125 -4.4625,7.04375 l 3.10625,2.14375 q 1.35625,0.83125 1.35625,1.70625 0,0.875 -0.7,1.3125 -0.65625,0.48125 -1.88125,0.48125 -0.30625,0 -0.7875,-0.13125 -0.4375,-0.0875 -1.05,-0.48125 l -5.6875,-3.71875 z m 5.38125,-21.74375 q 0,-4.76875 -7.9625,-4.76875 l -9.58125,0 q -7.9625,0 -7.9625,4.76875 l 0,13.3875 q 0,4.94375 8.3125,4.94375 l 8.88125,0 q 8.3125,0 8.3125,-4.94375 l 0,-13.3875 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
|
||||
id="path3428" />
|
||||
<path
|
||||
d="m -368.0585,631.64323 q -11.2875,0 -11.2875,-6.9125 l 0,-12.73125 q 0,-1.8375 2.31875,-1.8375 2.31875,0 2.31875,1.8375 l 0,12.775 q 0,3.325 6.475,3.325 l 8.3125,0 q 6.475,0 6.475,-3.325 l 0,-12.775 q 0,-1.8375 2.31875,-1.8375 2.3625,0 2.3625,1.8375 l 0,12.73125 q 0,6.9125 -11.2875,6.9125 l -8.00625,0 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
|
||||
id="path3430" />
|
||||
<path
|
||||
d="m -327.2833,631.64323 q -9.3625,0 -9.3625,-5.81875 l 0,-2.49375 q 0,-5.775 9.3625,-5.775 l 18.59375,0 0,-0.65625 q 0,-3.0625 -5.38125,-3.0625 l -6.16875,0 q -2.1875,0 -2.1875,-1.70625 0,-1.75 2.1875,-1.75 l 6.16875,0 q 9.93125,0 9.93125,6.51875 l 0,8.575 q 0,6.16875 -9.5375,6.16875 l -13.60625,0 z m 13.34375,-3.4125 q 5.25,0 5.25,-2.8875 l 0,-4.76875 -18.24375,0 q -5.11875,0 -5.11875,2.66875 l 0,2.275 q 0,2.7125 5.11875,2.7125 l 12.99375,0 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
|
||||
id="path3432" />
|
||||
<path
|
||||
d="m -262.77031,626.74323 q 0,4.9 -9.975,4.9 l -17.0625,0 q -2.1875,0 -2.1875,-1.70625 0,-1.70625 2.1875,-1.70625 l 17.0625,0 q 5.38125,0 5.38125,-1.4875 l 0,-2.45 q 0,-1.4875 -5.38125,-1.4875 l -9.0125,0 q -9.975,0 -9.975,-4.76875 l 0,-2.05625 q 0,-5.6 10.28125,-5.6 l 5.99375,0 q 2.23125,0 2.23125,1.75 0,0.875 -0.6125,1.3125 -0.56875,0.39375 -1.61875,0.39375 l -5.99375,0 q -5.73125,0 -5.73125,2.14375 l 0,1.925 q 0,1.79375 5.6875,1.79375 l 9.0125,0 q 9.7125,0 9.7125,4.4625 l 0,2.58125 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
|
||||
id="path3434" />
|
||||
<path
|
||||
d="m -241.91709,631.64323 q -9.3625,0 -9.3625,-5.81875 l 0,-2.49375 q 0,-5.775 9.3625,-5.775 l 18.59375,0 0,-0.65625 q 0,-3.0625 -5.38125,-3.0625 l -6.16875,0 q -2.1875,0 -2.1875,-1.70625 0,-1.75 2.1875,-1.75 l 6.16875,0 q 9.93125,0 9.93125,6.51875 l 0,8.575 q 0,6.16875 -9.5375,6.16875 l -13.60625,0 z m 13.34375,-3.4125 q 5.25,0 5.25,-2.8875 l 0,-4.76875 -18.24375,0 q -5.11875,0 -5.11875,2.66875 l 0,2.275 q 0,2.7125 5.11875,2.7125 l 12.99375,0 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
|
||||
id="path3436" />
|
||||
<path
|
||||
d="m -205.62285,617.33698 q 0,-6.95625 11.2875,-6.95625 l 3.36875,0 q 2.23125,0 2.23125,1.79375 0,1.79375 -2.23125,1.79375 l -3.54375,0 q -6.475,0 -6.475,3.28125 l 0,12.775 q 0,1.8375 -2.31875,1.8375 -2.31875,0 -2.31875,-1.8375 l 0,-12.6875 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
|
||||
id="path3438" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g5443-0-1-5-1-9"
|
||||
transform="matrix(0.55595317,0,0,0.55595317,-521.93484,-328.66104)"
|
||||
inkscape:export-filename="/home/emanuele/Desktop/logo1.png"
|
||||
inkscape:export-xdpi="44.860481"
|
||||
inkscape:export-ydpi="44.860481">
|
||||
<g
|
||||
inkscape:export-ydpi="3.4165223"
|
||||
inkscape:export-xdpi="3.4165223"
|
||||
transform="matrix(0.09527033,0,0,0.09527033,-1695.2716,706.62921)"
|
||||
id="g8856-6-1-1-9-0-1-9">
|
||||
<circle
|
||||
r="1485"
|
||||
cy="-1361.2571"
|
||||
cx="8317.3574"
|
||||
id="circle8858-1-3-7-6-5-3-0"
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:50;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:export-xdpi="10.031387"
|
||||
inkscape:export-ydpi="10.031387" />
|
||||
<path
|
||||
inkscape:export-ydpi="10.031387"
|
||||
inkscape:export-xdpi="10.031387"
|
||||
style="opacity:1;fill:#263238;fill-opacity:1;stroke:none;stroke-width:10;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 8560.3823,-1361.3029 a 242.947,242.947 0 0 1 -242.947,242.948 242.947,242.947 0 0 1 -242.947,-242.948 242.947,242.947 0 0 1 242.947,-242.946 242.947,242.947 0 0 1 242.947,242.946 z"
|
||||
id="path8860-5-4-8-2-9-0-9"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
id="path8862-5-5-9-1-3-6-3"
|
||||
d="m 9395.8755,-1984.028 a 1245.372,1245.372 0 0 0 -190.8415,-249.4971 l -280.8618,162.1556 c -87.542,-74.7796 -187.0349,-132.0588 -293.2407,-169.9527 -95.8868,97.1766 -172.0602,205.7604 -226.9672,323.8487 312.6411,-21.2772 635.5313,91.8725 935.2898,326.0721 l 176.7612,-102.0532 a 1245.372,1245.372 0 0 0 -120.1398,-290.5734 z"
|
||||
clip-path="none"
|
||||
mask="none"
|
||||
style="fill:#1976d2;fill-opacity:1"
|
||||
inkscape:connector-curvature="0"
|
||||
inkscape:transform-center-x="-514.04855"
|
||||
inkscape:transform-center-y="-444.04649" />
|
||||
<path
|
||||
inkscape:transform-center-y="265.80217"
|
||||
inkscape:transform-center-x="-689.63727"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#42a5f5;fill-opacity:1"
|
||||
mask="none"
|
||||
clip-path="none"
|
||||
d="m 9395.9474,-738.70387 a 1245.372,1245.372 0 0 0 120.501,-290.02213 l -280.8618,-162.1557 c 20.99,-113.2034 20.8488,-228.0063 0.563,-338.9302 -232.1008,-34.4521 -264.2238,-46.1283 -393.9448,-34.635 174.7471,260.1165 238.2017,596.32248 185.2582,973.02076 l 176.7612,102.05309 a 1245.372,1245.372 0 0 0 191.5741,-249.33082 z"
|
||||
id="path8864-4-8-1-2-4-4-4" />
|
||||
<path
|
||||
id="path8866-7-5-5-0-6-4-7"
|
||||
d="m 8317.501,-115.97954 a 1245.372,1245.372 0 0 0 311.4916,-40.52501 l 0,-324.31131 c 108.5321,-38.42382 207.8837,-95.94755 293.8037,-168.97752 -36.214,-131.6287 -92.1636,-251.88868 -166.9776,-358.48372 -137.894,281.39369 -397.3296,504.44998 -750.0316,646.9487 l 0,204.10623 a 1245.372,1245.372 0 0 0 311.7139,41.24263 z"
|
||||
clip-path="none"
|
||||
mask="none"
|
||||
style="fill:#1976d2;fill-opacity:1"
|
||||
inkscape:connector-curvature="0"
|
||||
inkscape:transform-center-x="-117.49007"
|
||||
inkscape:transform-center-y="639.34029" />
|
||||
<path
|
||||
inkscape:transform-center-y="444.04652"
|
||||
inkscape:transform-center-x="514.04857"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#42a5f5;fill-opacity:1"
|
||||
mask="none"
|
||||
clip-path="none"
|
||||
d="m 7238.9827,-738.57936 a 1245.372,1245.372 0 0 0 190.8415,249.49714 l 280.8618,-162.15566 c 87.5421,74.77965 187.0349,132.05879 293.2407,169.95271 95.8868,-97.17659 172.0602,-205.76036 226.9672,-323.8487 -312.6411,21.27714 -635.5313,-91.87254 -935.2898,-326.07203 l -176.7612,102.0531 a 1245.372,1245.372 0 0 0 120.1398,290.57344 z"
|
||||
id="path8868-6-7-4-7-2-7-3" />
|
||||
<path
|
||||
id="path8870-5-3-9-3-5-5-1"
|
||||
d="m 7238.9108,-1983.9035 a 1245.372,1245.372 0 0 0 -120.6501,290.0221 l 280.8618,162.1557 c -20.99,113.2035 -20.8488,228.0063 -0.563,338.9302 132.1008,34.4521 264.2238,46.1283 393.9448,34.635 -174.7471,-260.1165 -238.2017,-596.3225 -185.2582,-973.0207 l -176.7612,-102.0532 a 1245.372,1245.372 0 0 0 -191.5741,249.3309 z"
|
||||
clip-path="none"
|
||||
mask="none"
|
||||
style="fill:#1976d2;fill-opacity:1"
|
||||
inkscape:connector-curvature="0"
|
||||
inkscape:transform-center-x="689.63729"
|
||||
inkscape:transform-center-y="-265.80221" />
|
||||
<path
|
||||
inkscape:transform-center-y="-639.34032"
|
||||
inkscape:transform-center-x="117.49005"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#42a5f5;fill-opacity:1"
|
||||
mask="none"
|
||||
clip-path="none"
|
||||
d="m 8317.3572,-2606.6279 a 1245.372,1245.372 0 0 0 -311.4915,40.525 l -1e-4,324.3113 c -108.5321,38.4239 -207.8837,95.9476 -293.8037,168.9776 36.214,131.6287 92.1637,251.8886 166.9776,358.4837 137.894,-281.3937 397.3296,-504.45 750.0316,-646.9487 l 1e-4,-204.1063 a 1245.372,1245.372 0 0 0 -311.714,-41.2426 z"
|
||||
id="path8872-6-3-2-1-3-3-7" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 13 KiB |
@@ -1,8 +1,6 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop } from 'vue-property-decorator'
|
||||
|
||||
require('./SingleCat.scss')
|
||||
|
||||
import { ICategory } from '../../../model/index'
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -17,3 +17,7 @@
|
||||
|
||||
<script lang="ts" src="./SingleCat.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './SingleCat.scss';
|
||||
</style>
|
||||
|
||||
@@ -4,8 +4,6 @@ import { Component, Watch } from 'vue-property-decorator'
|
||||
import { SingleCat } from '@components'
|
||||
import { ICategory } from '@src/model'
|
||||
|
||||
require('./category.scss')
|
||||
|
||||
|
||||
@Component({
|
||||
components: { SingleCat }
|
||||
@@ -25,13 +23,15 @@ export default class Category extends Vue {
|
||||
id: 0,
|
||||
descr_it: 'Frozen Yogurt',
|
||||
descr_en: '',
|
||||
descr_es: ''
|
||||
descr_es: '',
|
||||
campo2bool: true
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
descr_it: 'Secondo',
|
||||
descr_en: '',
|
||||
descr_es: ''
|
||||
descr_es: '',
|
||||
campo2bool: false
|
||||
}]
|
||||
|
||||
columns: any [] = [
|
||||
@@ -59,6 +59,14 @@ export default class Category extends Vue {
|
||||
field: 'descr_es',
|
||||
sortable: true,
|
||||
classes: 'my-class',
|
||||
},
|
||||
{
|
||||
name: 'campo2bool',
|
||||
label: 'campo2bool',
|
||||
align: 'left',
|
||||
field: 'campo2bool',
|
||||
sortable: true,
|
||||
classes: 'my-class',
|
||||
}
|
||||
]
|
||||
|
||||
@@ -82,7 +90,8 @@ export default class Category extends Vue {
|
||||
const objcat: ICategory = {
|
||||
descr_it: '',
|
||||
descr_en: '',
|
||||
descr_es: ''
|
||||
descr_es: '',
|
||||
campo2bool: true
|
||||
}
|
||||
return objcat
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</q-table>
|
||||
|
||||
|
||||
<!-- <SingleCat :itemcat='mycat' v-for="mycat of categories_arr" :key="mycat.id"/> -->
|
||||
<!-- <SingleTodo :itemcat='mycat' v-for="mycat of categories_arr" :key="mycat.id"/> -->
|
||||
</div>
|
||||
</q-page>
|
||||
|
||||
@@ -61,3 +61,7 @@
|
||||
</template>
|
||||
<script lang="ts" src="./category.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './category.scss';
|
||||
</style>
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
export * from './SingleCat'
|
||||
export * from './category'
|
||||
export * from './tabledata'
|
||||
|
||||
1
src/components/categories/tabledata/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export {default as TableData} from './tabledata.vue'
|
||||
0
src/components/categories/tabledata/tabledata.scss
Normal file
204
src/components/categories/tabledata/tabledata.ts
Normal file
@@ -0,0 +1,204 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { ICategory } from '@src/model'
|
||||
|
||||
@Component({
|
||||
})
|
||||
export default class Tabledata extends Vue {
|
||||
$q: any
|
||||
|
||||
filter: boolean = false
|
||||
title: string = ''
|
||||
category: string = ''
|
||||
categories_loc: any[] = [{}]
|
||||
categories_arr: any[] = [{}]
|
||||
selected: any [] = []
|
||||
selectedSecond: any [] = []
|
||||
|
||||
data: any [] = [{
|
||||
id: 0,
|
||||
descr_it: 'Frozen Yogurt',
|
||||
descr_en: '',
|
||||
descr_es: ''
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
descr_it: 'Secondo',
|
||||
descr_en: '',
|
||||
descr_es: ''
|
||||
}]
|
||||
|
||||
columns: any [] = [
|
||||
{
|
||||
name: 'descr_it',
|
||||
required: true,
|
||||
label: 'IT',
|
||||
align: 'left',
|
||||
field: 'descr_it',
|
||||
sortable: true,
|
||||
classes: 'my-class',
|
||||
},
|
||||
{
|
||||
name: 'descr_en',
|
||||
label: 'EN',
|
||||
align: 'left',
|
||||
field: 'descr_en',
|
||||
sortable: true,
|
||||
classes: 'my-class',
|
||||
},
|
||||
{
|
||||
name: 'descr_es',
|
||||
label: 'ES',
|
||||
align: 'left',
|
||||
field: 'descr_es',
|
||||
sortable: true,
|
||||
classes: 'my-class',
|
||||
},
|
||||
{
|
||||
name: 'campo2bool',
|
||||
label: 'campo2bool',
|
||||
align: 'left',
|
||||
field: 'campo2bool',
|
||||
sortable: true,
|
||||
classes: 'my-class',
|
||||
}
|
||||
]
|
||||
|
||||
@Watch('categories_loc') valueChanged() {
|
||||
this.updatetable()
|
||||
}
|
||||
|
||||
|
||||
created() {
|
||||
this.loadCat()
|
||||
}
|
||||
|
||||
async loadCat() {
|
||||
await this.$db.categories.toArray().then(ris => this.categories_loc = ris)
|
||||
|
||||
this.updatetable()
|
||||
}
|
||||
|
||||
initcat() {
|
||||
|
||||
const objcat: ICategory = {
|
||||
descr_it: '',
|
||||
descr_en: '',
|
||||
descr_es: '',
|
||||
campo2bool: false
|
||||
}
|
||||
return objcat
|
||||
|
||||
}
|
||||
|
||||
async insertCategory() {
|
||||
|
||||
const objcat = this.initcat()
|
||||
|
||||
let myid = 0
|
||||
objcat.descr_it = this.category
|
||||
|
||||
// Add to Indexdb
|
||||
await this.$db.categories.add(objcat
|
||||
).then(ris => {
|
||||
myid = ris
|
||||
})
|
||||
|
||||
objcat.id = myid
|
||||
|
||||
// Add into the memory
|
||||
this.categories_loc.push(objcat)
|
||||
|
||||
// empty the field
|
||||
this.category = ''
|
||||
}
|
||||
|
||||
async deleteCategory(myarrobj) {
|
||||
|
||||
await myarrobj.forEach(myobj => {
|
||||
|
||||
if (myobj.id !== undefined) {
|
||||
console.log('KEY = ', myobj.id)
|
||||
|
||||
// Delete item
|
||||
let deleteCount = this.$db.categories
|
||||
.where('id').equals(myobj.id)
|
||||
.delete()
|
||||
|
||||
console.log('deleteCount = ', deleteCount)
|
||||
if (deleteCount > 0) {
|
||||
// Remove into the memory
|
||||
this.categories_loc.splice(this.categories_loc.indexOf(myobj), 1)
|
||||
|
||||
this.updatetable()
|
||||
|
||||
return deleteCount
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
updatetable() {
|
||||
|
||||
this.filterCategories()
|
||||
this.categories_arr = [...this.categories_loc]
|
||||
|
||||
}
|
||||
|
||||
async filterCategories() {
|
||||
|
||||
if (this.filter) {
|
||||
// #Todo If need to filter the output database ...
|
||||
this.$db.categories
|
||||
.where('descr_it').notEqual('nonlovedi')
|
||||
.toArray()
|
||||
.then((response) => {
|
||||
Promise.all(response.map(key => key))
|
||||
.then((myarr) => {
|
||||
this.categories_loc = [...myarr]
|
||||
return this.categories_loc
|
||||
})
|
||||
})
|
||||
} else {
|
||||
return this.categories_loc
|
||||
}
|
||||
}
|
||||
|
||||
deleteRow() {
|
||||
console.log('SEL = ', this.selectedSecond)
|
||||
|
||||
const seldel = [...this.selectedSecond]
|
||||
if (this.deleteCategory(this.selectedSecond)) {
|
||||
this.$q.notify({
|
||||
color: 'primary',
|
||||
icon: 'delete',
|
||||
message: `Deleted ` + (seldel.length.toString()) + ' item'
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
await db.transaction('rw', [db.friends], async () => {
|
||||
const friend = await db.friends.get(1);
|
||||
++friend.age;
|
||||
await db.friends.put(friend);
|
||||
});
|
||||
*/
|
||||
|
||||
async modify() {
|
||||
// esempio da sistemare
|
||||
await this.$db.transaction('rw', [this.$db.categories], async () => {
|
||||
const friend = await this.$db.get(1)
|
||||
++friend.age
|
||||
await this.$db.put(friend)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
65
src/components/categories/tabledata/tabledata.vue
Normal file
@@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<q-page>
|
||||
<div class="panel">
|
||||
<p class="caption">Table Data:</p>
|
||||
|
||||
<q-input v-model="category" inverted float-label="Inserisci la Categoria"
|
||||
:after="[{icon: 'arrow_forward', content: true, handler () {}}]"
|
||||
v-on:keyup.enter="insertCategory"/>
|
||||
|
||||
<q-table
|
||||
title="Categories"
|
||||
:data="categories_arr"
|
||||
:columns="columns"
|
||||
row-key="id"
|
||||
selection="multiple"
|
||||
color="secondary"
|
||||
:selected.sync="selectedSecond">
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
<q-tr slot="body" slot-scope="props" :props="props">
|
||||
<q-td key="desc" :props="props">
|
||||
{{ props.row.name }}
|
||||
<q-popup-edit v-model="props.row.name">
|
||||
<q-field count>
|
||||
<q-input v-model="props.row.name" />
|
||||
</q-field>
|
||||
</q-popup-edit>
|
||||
</q-td>
|
||||
<q-td key="calories" :props="props">
|
||||
{{ props.row.calories }}
|
||||
<q-popup-edit v-model="props.row.calories" title="Update calories" buttons>
|
||||
<q-input type="number" v-model="props.row.calories" />
|
||||
</q-popup-edit>
|
||||
</q-td>
|
||||
<q-td key="fat" :props="props">{{ props.row.fat }}</q-td>
|
||||
<q-td key="carbs" :props="props">{{ props.row.carbs }}</q-td>
|
||||
<q-td key="protein" :props="props">{{ props.row.protein }}</q-td>
|
||||
<q-td key="sodium" :props="props">{{ props.row.sodium }}</q-td>
|
||||
<q-td key="calcium" :props="props">{{ props.row.calcium }}</q-td>
|
||||
<q-td key="iron" :props="props">{{ props.row.iron }}</q-td>
|
||||
</q-tr>
|
||||
-->
|
||||
|
||||
<!-- gets displayed only when there's at least one row selected -->
|
||||
<template slot="top-selection" slot-scope="props">
|
||||
<!--<q-btn color="secondary" flat label="Action 1" class="q-mr-sm"/>
|
||||
<q-btn color="secondary" flat label="Action 2"/>-->
|
||||
<div class="col"/>
|
||||
<q-btn color="negative" flat round delete icon="delete" @click="deleteRow"/>
|
||||
</template>
|
||||
</q-table>
|
||||
|
||||
</div>
|
||||
</q-page>
|
||||
|
||||
|
||||
</template>
|
||||
<script lang="ts" src="./tabledata.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './tabledata.scss';
|
||||
</style>
|
||||
@@ -1,2 +1,4 @@
|
||||
export * from './categories'
|
||||
export * from './todos'
|
||||
export * from './logo'
|
||||
|
||||
|
||||
1
src/components/logo/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export {default as Logo} from './logo.vue'
|
||||
29
src/components/logo/logo.scss
Normal file
@@ -0,0 +1,29 @@
|
||||
.svgclass{
|
||||
color: white;
|
||||
transform: translateY(0px);
|
||||
|
||||
}
|
||||
|
||||
.svgclass_animate {
|
||||
transform: translateY(-70px);
|
||||
color: red;
|
||||
}
|
||||
|
||||
#sun {
|
||||
animation: gravity 5s infinite;
|
||||
|
||||
}
|
||||
|
||||
@keyframes gravity{
|
||||
0%{
|
||||
transform: rotateY(0deg);
|
||||
}
|
||||
100%{
|
||||
transform: rotateY(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
#smile{
|
||||
opacity: 0.1 !important;
|
||||
fill: red;
|
||||
}
|
||||
53
src/components/logo/logo.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
import Vue from 'vue'
|
||||
import { Component } from 'vue-property-decorator'
|
||||
|
||||
import { TimelineLite, Back } from 'gsap'
|
||||
|
||||
import $ from 'jquery'
|
||||
import Timeout = NodeJS.Timeout
|
||||
|
||||
@Component({
|
||||
|
||||
})
|
||||
export default class Logo extends Vue {
|
||||
logoimg: string = ''
|
||||
|
||||
created() {
|
||||
this.logoimg = 'statics/' + process.env.LOGO_REG
|
||||
this.animate()
|
||||
}
|
||||
|
||||
animate () {
|
||||
const timeline = new TimelineLite()
|
||||
|
||||
/*
|
||||
|
||||
let mysmile = $('#smile')
|
||||
|
||||
mysmile.attr('class', 'smile_hide')
|
||||
|
||||
setTimeout(() => {
|
||||
mysmile.removeClass('smilevisible')
|
||||
mysmile.addClass('smile_hide')
|
||||
}, 1000)
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
mysmile.addClass('smilevisible')
|
||||
mysmile.removeClass('smile_hide')
|
||||
}, 10000)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
timeline.to('#smile', 5, {
|
||||
cy: 20,
|
||||
cx: 60,
|
||||
ease: Back.easeInOut // Specify an ease
|
||||
})
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
11
src/components/logo/logo.vue
Normal file
@@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<div id="logo">
|
||||
<img id="logoimg" alt="FreePlanet" :src=logoimg>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" src="./logo.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './logo.scss';
|
||||
</style>
|
||||
115
src/components/todos/SingleTodo/SingleTodo.scss
Normal file
@@ -0,0 +1,115 @@
|
||||
.flex-item{
|
||||
background-color: #d5e2eb;
|
||||
padding: 1px;
|
||||
margin: 1px;
|
||||
color: #000;
|
||||
font-size: 0.85rem;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.flex-container2 {
|
||||
flex-flow: row nowrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.btn-item {
|
||||
max-width: 24px;
|
||||
}
|
||||
|
||||
|
||||
.pos-item {
|
||||
max-width: 24px;
|
||||
min-width: 24px;
|
||||
margin: 0 auto;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.priority-item-popover {
|
||||
max-width: 24px;
|
||||
min-width: 24px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.priority-item {
|
||||
max-width: 24px;
|
||||
min-width: 24px;
|
||||
}
|
||||
|
||||
.completed-item {
|
||||
max-width: 24px;
|
||||
min-width: 24px;
|
||||
}
|
||||
|
||||
.myexpired {
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.data-item {
|
||||
max-width: 100px;
|
||||
min-width: 100px;
|
||||
display: block;
|
||||
visibility: initial;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
.data-item {
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.div_descr {
|
||||
// background-color: green;
|
||||
flex: 2 1 auto;
|
||||
}
|
||||
|
||||
|
||||
.appsingletodo {
|
||||
color: black;
|
||||
font-size: 1.0rem;
|
||||
// display: flex;
|
||||
margin: 1px;
|
||||
padding: 2px;
|
||||
border: 1px;
|
||||
background-color: #e1ebed;
|
||||
}
|
||||
|
||||
.mycols{
|
||||
margin: 1px;
|
||||
padding: 2px;
|
||||
//width: 40px;
|
||||
// border-color: #8a8484;
|
||||
// border-style: outset;
|
||||
margin: auto;
|
||||
// flex-grow: 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.mycols:hover{
|
||||
|
||||
}
|
||||
|
||||
.mybtn{
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.icon_completed {
|
||||
position: relative;
|
||||
transform: translateY(0%);
|
||||
}
|
||||
|
||||
.mydescr{
|
||||
}
|
||||
|
||||
|
||||
.icon_completed:hover {
|
||||
color: darkgreen;
|
||||
}
|
||||
79
src/components/todos/SingleTodo/SingleTodo.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { rescodes } from '../../../store/Modules/rescodes'
|
||||
import { UserStore } from '@modules'
|
||||
|
||||
import { ITodo } from '../../../model/index'
|
||||
|
||||
@Component({
|
||||
name: 'SingleTodo'
|
||||
})
|
||||
export default class SingleTodo extends Vue {
|
||||
public selectPriority: [] = []
|
||||
public iconCompleted: string = ''
|
||||
public iconPriority: string = ''
|
||||
public popover: boolean = false
|
||||
$q: any
|
||||
|
||||
@Prop({required: true}) itemtodo: ITodo
|
||||
|
||||
@Watch('itemtodo.completed') valueChanged() {
|
||||
this.$emit('eventupdate', this.itemtodo)
|
||||
}
|
||||
@Watch('itemtodo.expiring_at') valueChanged2() {
|
||||
this.$emit('eventupdate', this.itemtodo)
|
||||
}
|
||||
@Watch('itemtodo.priority') valueChanged3() {
|
||||
this.$emit('eventupdate', this.itemtodo)
|
||||
}
|
||||
|
||||
setCompleted () {
|
||||
// console.log('setCompleted')
|
||||
this.itemtodo.completed = !this.itemtodo.completed
|
||||
|
||||
this.updateicon()
|
||||
|
||||
this.updatedata()
|
||||
}
|
||||
|
||||
updatedata() {
|
||||
this.$emit('eventupdate', this.itemtodo)
|
||||
}
|
||||
|
||||
updateicon () {
|
||||
if (this.itemtodo.completed)
|
||||
this.iconCompleted = 'check_circle'
|
||||
else
|
||||
this.iconCompleted = 'check_circle_outline'
|
||||
|
||||
|
||||
if (this.itemtodo.priority === rescodes.Todos.PRIORITY_HIGH)
|
||||
this.iconPriority = 'expand_less' // expand_less
|
||||
else if (this.itemtodo.priority === rescodes.Todos.PRIORITY_NORMAL)
|
||||
this.iconPriority = 'remove'
|
||||
else if (this.itemtodo.priority === rescodes.Todos.PRIORITY_LOW)
|
||||
this.iconPriority = 'expand_more' // expand_more
|
||||
|
||||
}
|
||||
|
||||
created() {
|
||||
this.updateicon()
|
||||
|
||||
this.selectPriority = rescodes.selectPriority[UserStore.state.lang]
|
||||
|
||||
}
|
||||
|
||||
remove(id) {
|
||||
this.$emit('event', id)
|
||||
}
|
||||
|
||||
setPriority (newpriority) {
|
||||
|
||||
this.itemtodo.priority = newpriority
|
||||
|
||||
this.updatedata()
|
||||
|
||||
// this.$q.notify('setPriority: ' + elem)
|
||||
}
|
||||
}
|
||||
55
src/components/todos/SingleTodo/SingleTodo.vue
Normal file
@@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<div class="row flex-container2">
|
||||
<div class="flex-item pos-item">{{ itemtodo.pos }}ª</div>
|
||||
<div class="flex-item priority-item">
|
||||
<q-btn push
|
||||
class="priority-item-popover"
|
||||
:icon="iconPriority">
|
||||
<q-popover
|
||||
v-model="popover"
|
||||
self="top left"
|
||||
|
||||
>
|
||||
<q-list link>
|
||||
<q-item v-for="field in selectPriority" :key="field.value"
|
||||
@click.native="setPriority(field.value), popover = false">
|
||||
<q-item-side :icon="field.icon" inverted color="primary"/>
|
||||
<q-item-main>
|
||||
<q-item-tile label>{{field.label}}</q-item-tile>
|
||||
</q-item-main>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-popover>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div class="flex-item completed-item">
|
||||
<q-btn push
|
||||
class="priority-item-popover"
|
||||
:icon="iconCompleted"
|
||||
@click.native="setCompleted">
|
||||
</q-btn>
|
||||
<!--<q-icon class=" mycols allleft icon_completed ScheduleStatus" :name="iconCompleted"
|
||||
@click.native="setCompleted"/>-->
|
||||
</div>
|
||||
<div class="flex-item div_descr">
|
||||
{{ itemtodo.descr }}
|
||||
</div>
|
||||
|
||||
<div class="flex-item data-item">
|
||||
<q-datetime
|
||||
v-model="itemtodo.expiring_at"
|
||||
class="myexpired"/>
|
||||
</div>
|
||||
<div class="flex-item btn-item">
|
||||
<q-btn class="mybtn" round color="" icon="delete" @click="remove(itemtodo.id)"></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./SingleTodo.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './SingleTodo.scss';
|
||||
</style>
|
||||
1
src/components/todos/SingleTodo/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export {default as SingleTodo} from './SingleTodo.vue'
|
||||
2
src/components/todos/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './SingleTodo'
|
||||
export * from './todo'
|
||||
1
src/components/todos/todo/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export {default as Todo} from './todo.vue'
|
||||
13
src/components/todos/todo/todo.scss
Normal file
@@ -0,0 +1,13 @@
|
||||
.flex-container{
|
||||
background-color: #ccc;
|
||||
padding: 5px;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.mycard {
|
||||
visibility: hidden;
|
||||
}
|
||||
221
src/components/todos/todo/todo.ts
Normal file
@@ -0,0 +1,221 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { SingleTodo } from '@components'
|
||||
import { ITodo } from '@src/model'
|
||||
|
||||
import { rescodes } from '../../../store/Modules/rescodes'
|
||||
|
||||
import { UserStore } from '@modules'
|
||||
|
||||
import _ from 'lodash'
|
||||
|
||||
import draggable from 'vuedraggable'
|
||||
|
||||
@Component({
|
||||
components: { SingleTodo, draggable }
|
||||
})
|
||||
export default class Todo extends Vue {
|
||||
$q: any
|
||||
|
||||
filter: boolean = false
|
||||
title: string = ''
|
||||
todo: string = ''
|
||||
todos_arr: any[] = [{}]
|
||||
drag: boolean = true
|
||||
startpos: number = 0
|
||||
endpos: number = 0
|
||||
|
||||
@Watch('drag') changedrag() {
|
||||
console.log('drag = ' + this.drag)
|
||||
}
|
||||
|
||||
change(param) {
|
||||
console.log('Change... ' + param)
|
||||
}
|
||||
|
||||
onStart() {
|
||||
this.startpos = 0
|
||||
}
|
||||
|
||||
getpos(indelem) {
|
||||
return this.todos_arr[indelem].pos
|
||||
}
|
||||
|
||||
onEnd(myvar) {
|
||||
let oldpos = this.getpos(myvar.oldIndex)
|
||||
let newpos = this.getpos(myvar.newIndex)
|
||||
|
||||
console.log('onEnd old = ' + oldpos + ' new = ' + newpos)
|
||||
if (myvar.oldIndex < myvar.newIndex) {
|
||||
// c'è spazio
|
||||
newpos = oldpos - 1
|
||||
if (newpos <= 0)
|
||||
newpos = 1
|
||||
} else {
|
||||
newpos = newpos + 1
|
||||
}
|
||||
|
||||
console.log('newpos = ' + newpos)
|
||||
|
||||
if (newpos >= 0) {
|
||||
let myobj = this.todos_arr[myvar.oldIndex]
|
||||
console.log('posprec = ' + myobj.pos)
|
||||
myobj.pos = newpos
|
||||
this.modify(myobj)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
created() {
|
||||
this.loadCat()
|
||||
}
|
||||
|
||||
showlistaTodos(nomelista = '') {
|
||||
|
||||
// console.log('todos_arr: ')
|
||||
this.todos_arr.forEach((todo, key) => {
|
||||
console.log('Todo n"' + key + ': ' + todo)
|
||||
})
|
||||
}
|
||||
|
||||
loadCat() {
|
||||
this.updatetable()
|
||||
}
|
||||
|
||||
initcat() {
|
||||
|
||||
const mydateexp = new Date().setDate((new Date()).getDate() + 1)
|
||||
|
||||
const objtodo: ITodo = {
|
||||
userId: UserStore.state.userId,
|
||||
descr: '',
|
||||
pos: -1,
|
||||
priority: rescodes.Todos.PRIORITY_NORMAL,
|
||||
completed: false,
|
||||
created_at: new Date(),
|
||||
modify_at: new Date(),
|
||||
expiring_at: mydateexp
|
||||
}
|
||||
return objtodo
|
||||
|
||||
}
|
||||
|
||||
getLastPos() {
|
||||
let max = 0
|
||||
this.todos_arr.forEach(myobj => {
|
||||
if (myobj.pos > max)
|
||||
max = myobj.pos
|
||||
})
|
||||
|
||||
return max + 1
|
||||
|
||||
}
|
||||
|
||||
async insertTodo() {
|
||||
|
||||
const objtodo = this.initcat()
|
||||
|
||||
let myid = 0
|
||||
objtodo.descr = this.todo
|
||||
objtodo.pos = this.getLastPos()
|
||||
|
||||
// Add to Indexdb
|
||||
await this.$db.todos.add(objtodo
|
||||
).then(() => {
|
||||
this.updatetable()
|
||||
}).catch(err => {
|
||||
console.log('Errore: ' + err.message)
|
||||
})
|
||||
|
||||
// empty the field
|
||||
this.todo = ''
|
||||
}
|
||||
|
||||
getobjbyid(id) {
|
||||
let myobjtrov = null
|
||||
this.todos_arr.forEach(myobj => {
|
||||
if (myobj.id === id)
|
||||
myobjtrov = myobj
|
||||
})
|
||||
|
||||
return myobjtrov
|
||||
}
|
||||
|
||||
deleteitem(id) {
|
||||
// console.log('deleteitem: KEY = ', id)
|
||||
|
||||
let myobjtrov = this.getobjbyid(id)
|
||||
|
||||
if (myobjtrov !== null) {
|
||||
// Delete item
|
||||
this.$db.todos
|
||||
.where('id').equals(id)
|
||||
.delete()
|
||||
.then(() => {
|
||||
this.updatetable()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
async updatetable() {
|
||||
await this.filtertodos()
|
||||
}
|
||||
|
||||
async filtertodos() {
|
||||
|
||||
if (this.filter) {
|
||||
// #Todo If need to filter the output database ...
|
||||
await this.$db.todos
|
||||
.where('userId').equals(UserStore.state.userId)
|
||||
.toArray()
|
||||
.then((response) => {
|
||||
Promise.all(response.map(key => key))
|
||||
.then((ristodos) => {
|
||||
this.todos_arr = ristodos
|
||||
})
|
||||
})
|
||||
} else {
|
||||
|
||||
await this.$db.todos
|
||||
.where('userId').equals(UserStore.state.userId)
|
||||
|
||||
.toArray().then(ristodos => {
|
||||
this.todos_arr = ristodos
|
||||
})
|
||||
|
||||
this.todos_arr = _.orderBy(this.todos_arr, ['completed', 'priority', 'pos'], ['asc', 'desc', 'asc'])
|
||||
}
|
||||
|
||||
this.todos_arr.map((item, index) => {
|
||||
item.pos = (index * 2) + 1
|
||||
})
|
||||
return []
|
||||
}
|
||||
|
||||
updateitem(myobj) {
|
||||
console.log('updateitem')
|
||||
this.modify(myobj)
|
||||
}
|
||||
|
||||
|
||||
async modify(myobj) {
|
||||
await this.$db.transaction('rw', [this.$db.todos], async () => {
|
||||
const miorec = await this.$db.todos.get(myobj.id)
|
||||
|
||||
miorec.modify_at = new Date()
|
||||
miorec.completed = myobj.completed
|
||||
miorec.expiring_at = myobj.expiring_at
|
||||
miorec.priority = myobj.priority
|
||||
miorec.pos = myobj.pos
|
||||
|
||||
await this.$db.todos.put(miorec)
|
||||
|
||||
this.updatetable()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
32
src/components/todos/todo/todo.vue
Normal file
@@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<q-page>
|
||||
<div class="panel">
|
||||
<p class="caption"></p>
|
||||
|
||||
<q-input v-model="todo" inverted float-label="Inserisci il Todo"
|
||||
:after="[{icon: 'arrow_forward', content: true, handler () {}}]"
|
||||
v-on:keyup.enter="insertTodo"/>
|
||||
|
||||
|
||||
<div class="flex-container">
|
||||
<draggable v-model="todos_arr" :options="{draggable:'.myitemdrag'}" @start="onStart" @end="onEnd">
|
||||
<transition-group>
|
||||
<SingleTodo @event="deleteitem" @eventupdate="updateitem" :itemtodo='mytodo'
|
||||
v-for="mytodo of todos_arr" :key="mytodo.id" class="myitemdrag">
|
||||
</SingleTodo>
|
||||
</transition-group>
|
||||
</draggable>
|
||||
</div>
|
||||
|
||||
<!--<div v-for="element in todos_arr" :key="element.id">{{element.descr}}</div>-->
|
||||
|
||||
</div>
|
||||
</q-page>
|
||||
|
||||
|
||||
</template>
|
||||
<script lang="ts" src="./todo.ts">
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './todo.scss';
|
||||
</style>
|
||||
@@ -15,6 +15,7 @@ const messages = {
|
||||
vreg: 'Verifica Reg',
|
||||
Test: 'Test',
|
||||
Category: 'Categorie',
|
||||
Todo: 'Todo',
|
||||
},
|
||||
components: {
|
||||
authentication:{
|
||||
@@ -100,6 +101,7 @@ const messages = {
|
||||
vreg: 'Verify Reg',
|
||||
Test: 'Test',
|
||||
Category: 'Category',
|
||||
Todo: 'Todo',
|
||||
},
|
||||
components: {
|
||||
authentication:{
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<meta name="viewport"
|
||||
content="user-scalable=no, initial-scale=1, minimum-scale=1, width=device-width<% if (htmlWebpackPlugin.options.ctx.mode.cordova) { %>, viewport-fit=cover<% } %>">
|
||||
|
||||
<link rel="icon" href="statics/quasar-logo.png" type="image/x-icon">
|
||||
<link rel="icon" href="statics/freeplanet-logo.png" type="image/x-icon">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="statics/icons/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="statics/icons/favicon-16x16.png">
|
||||
<script defer src="statics/js/material.min.js"></script>
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
Dashboard: {
|
||||
routes: [
|
||||
{ route: '/', faIcon: 'fa fa-home', materialIcon: 'home', name: 'pages.home' },
|
||||
{ route: '/todo', faIcon: 'fa fa-list-alt', materialIcon: 'todo', name: 'pages.Todo' },
|
||||
{ route: '/category', faIcon: 'fa fa-list-alt', materialIcon: 'category', name: 'pages.Category' },
|
||||
{ route: '/signup', faIcon: 'fa fa-registered', materialIcon: 'home', name: 'pages.SignUp' },
|
||||
{ route: '/signin', faIcon: 'fa fa-anchor', materialIcon: 'home', name: 'pages.SignIn' },
|
||||
|
||||
@@ -3,13 +3,15 @@
|
||||
<div class="list no-border platform-delimiter light-paragraph">
|
||||
<q-icon name="action"/>
|
||||
<template v-for="(parent, index) in links">
|
||||
<q-list>
|
||||
<!--
|
||||
<div class="list-label cursor-pointer" @click="parent.show = !parent.show">
|
||||
{{replaceUnderlineToSpace(index)}} <div class="menu_freccina"><i aria-hidden="true" class="v-icon material-icons theme--light">keyboard_arrow_down</i></div>
|
||||
</div>
|
||||
-->
|
||||
<div class="q-list-header">{{replaceUnderlineToSpace(index)}}</div>
|
||||
<template v-for="child in parent.routes">
|
||||
<q-slide-transition :duration=200>
|
||||
<div v-show="parent.show">
|
||||
<div v-show="true">
|
||||
<q-item link :to="child.route" exact
|
||||
class="item item-link drawer-closer cursor-pointer">
|
||||
<i :class="child.faIcon" class="item-primary"></i>
|
||||
@@ -18,7 +20,6 @@
|
||||
</div>
|
||||
</q-slide-transition>
|
||||
</template>
|
||||
</q-list>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
@@ -61,6 +62,11 @@
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
.q-list-header {
|
||||
min-height: 12px;
|
||||
padding: 5px 8px;
|
||||
}
|
||||
|
||||
.menu-hr{
|
||||
border-color: #dedede;
|
||||
height: 0.5px;
|
||||
|
||||
@@ -3,4 +3,5 @@ export interface ICategory {
|
||||
descr_it?: string
|
||||
descr_en?: string
|
||||
descr_es?: string
|
||||
campo2bool: boolean
|
||||
}
|
||||
|
||||
15
src/model/Todos.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export interface ITodo {
|
||||
id?: number,
|
||||
userId: string
|
||||
pos: number,
|
||||
descr?: string,
|
||||
priority: number,
|
||||
completed: boolean,
|
||||
created_at: any,
|
||||
modify_at: any,
|
||||
expiring_at: any
|
||||
}
|
||||
|
||||
export interface ITodosState {
|
||||
visuOnlyUncompleted: boolean
|
||||
}
|
||||
@@ -9,7 +9,7 @@ export const DefaultUser = <IUserState>{
|
||||
}
|
||||
|
||||
export interface IUserState {
|
||||
_id?: string
|
||||
userId?: string
|
||||
email?: string
|
||||
username: string
|
||||
idapp?: any
|
||||
@@ -18,7 +18,6 @@ export interface IUserState {
|
||||
repeatPassword?: string
|
||||
|
||||
idToken?: string
|
||||
userId?: number
|
||||
|
||||
tokens?: IToken[]
|
||||
|
||||
|
||||
@@ -6,3 +6,4 @@ export * from './key-value'
|
||||
export * from './payload'
|
||||
|
||||
export * from './Categories'
|
||||
export * from './Todos'
|
||||
|
||||
@@ -6,11 +6,14 @@ export default ({ Vue }) => {
|
||||
|
||||
// Insert here the database for IndexDB
|
||||
new VueIdb({
|
||||
version: 1,
|
||||
database: 'test',
|
||||
schemas: [
|
||||
{ categories: '++id, sub_categ_id, descr_it' }
|
||||
]
|
||||
{ categories: '++id, sub_categ_id, descr_it, campo2bool, campo3bool' },
|
||||
{ todos: '++id, userId, pos, descr, priority, completed, created_at, modify_at, expiring_at' }
|
||||
],
|
||||
options: {
|
||||
todos: { type: 'list', primary: 'pos', label: 'label', updated_at: 'updated_at' },
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
28
src/root/home/animate.js
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
TweenMax.set('.vlogo', {
|
||||
opacity: 1
|
||||
})
|
||||
|
||||
TweenMax.set('#words', {
|
||||
visibility: 'visible'
|
||||
})
|
||||
|
||||
//repeating for all the birds, uses classes
|
||||
exports.anima = () => {
|
||||
alert("prova")
|
||||
const tl = new TimelineMax({
|
||||
repeat: 2,
|
||||
yoyo: true
|
||||
})
|
||||
|
||||
tl.add('start')
|
||||
|
||||
tl.to('.sun ', 1, {
|
||||
rotation: -45,
|
||||
y: -20,
|
||||
transformOrigin: '50% 90%'
|
||||
}, 'start')
|
||||
|
||||
tl.timeScale(2)
|
||||
return tl
|
||||
}
|
||||
@@ -2,16 +2,17 @@ import Vue from 'vue'
|
||||
import { Component } from 'vue-property-decorator'
|
||||
import { GlobalStore } from '@store'
|
||||
|
||||
require('./home.scss')
|
||||
import { Logo } from '@components'
|
||||
|
||||
@Component({
|
||||
|
||||
components: { Logo }
|
||||
})
|
||||
export default class Home extends Vue {
|
||||
text: string = ''
|
||||
visibile: boolean = false
|
||||
cardvisible: string = 'hidden'
|
||||
displaycard: string = 'block'
|
||||
svgclass: string = 'svgclass'
|
||||
$t: any
|
||||
|
||||
public $q
|
||||
|
||||
@@ -1,36 +1,6 @@
|
||||
<template >
|
||||
<q-page class="flex flex-center">
|
||||
<img alt="Quasar logo" src="~assets/quasar-logo-full.svg">
|
||||
|
||||
<q-btn round color="blue" icon="add" id="shareimagebutton" @click="openCreatePostModal">
|
||||
<q-spinner-facebook slot="loading"/>
|
||||
</q-btn>
|
||||
|
||||
<q-field
|
||||
icon="wifi"
|
||||
helper="Some helper"
|
||||
>
|
||||
<q-input
|
||||
v-model="conta"
|
||||
/>
|
||||
<br>{{$t('comp.Conta')}} = {{ conta }}
|
||||
</q-field>
|
||||
|
||||
<!--<q-btn
|
||||
@click="showNotification"
|
||||
color="primary"
|
||||
label="Mostra notifica"
|
||||
/>-->
|
||||
|
||||
<q-card id="mycard" class="mycard" :style="mystilecard">
|
||||
<q-card-title>
|
||||
Card Title
|
||||
</q-card-title>
|
||||
<q-card-separator/>
|
||||
<q-card-main>
|
||||
Card Content
|
||||
</q-card-main>
|
||||
</q-card>
|
||||
<logo></logo>
|
||||
|
||||
</q-page>
|
||||
|
||||
@@ -38,3 +8,6 @@
|
||||
</template>
|
||||
<script lang="ts" src="./home.ts">
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './home.scss';
|
||||
</style>
|
||||
|
||||
@@ -9,11 +9,6 @@ export const RouteConfig: VueRouteConfig[] = [
|
||||
path: '/',
|
||||
meta: { name: 'Home' }
|
||||
},
|
||||
{
|
||||
path: '/test',
|
||||
component: () => import('@/views/login/test.vue'),
|
||||
meta: { name: 'Test' }
|
||||
},
|
||||
{
|
||||
path: '/signup',
|
||||
component: () => import('@/views/login/signup/signup.vue'),
|
||||
@@ -29,6 +24,11 @@ export const RouteConfig: VueRouteConfig[] = [
|
||||
component: () => import('@/views/login/vreg/vreg.vue'),
|
||||
meta: { name: 'Verify Reg' }
|
||||
},
|
||||
{
|
||||
path: '/todo',
|
||||
component: () => import('@/components/todos/todo/todo.vue'),
|
||||
meta: { name: 'Todos' }
|
||||
},
|
||||
{
|
||||
path: '/category',
|
||||
component: () => import('@/components/categories/category/category.vue'),
|
||||
|
||||
482
src/statics/freeplanet-logo-full.svg
Normal file
|
After Width: | Height: | Size: 190 KiB |
BIN
src/statics/icons/android-chrome-192x192.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
src/statics/icons/android-chrome-512x512.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 13 KiB |
BIN
src/statics/icons/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.2 KiB |
BIN
src/statics/icons/favicon.ico
Normal file
|
After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 12 KiB |
61
src/store/Modules/Todos.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import { ITodosState } from 'model'
|
||||
import { storeBuilder } from './Store/Store'
|
||||
|
||||
|
||||
const state: ITodosState = {
|
||||
visuOnlyUncompleted: false
|
||||
}
|
||||
|
||||
const b = storeBuilder.module<ITodosState>('TodosModule', state)
|
||||
|
||||
// Getters
|
||||
namespace Getters {
|
||||
|
||||
const visuOnlyUncompleted = b.read(state => state.visuOnlyUncompleted, 'visuOnlyUncompleted')
|
||||
|
||||
export const getters = {
|
||||
get visuOnlyUncompleted() {
|
||||
return visuOnlyUncompleted
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Mutations {
|
||||
|
||||
function deleteItem(state: ITodosState, num: number) {
|
||||
// state.conta = num
|
||||
// Cancella Item
|
||||
}
|
||||
|
||||
export const mutations = {
|
||||
deleteItem: b.commit(deleteItem),
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace Actions {
|
||||
async function deleteItem(context, num: number) {
|
||||
Mutations.mutations.deleteItem(num)
|
||||
}
|
||||
|
||||
export const actions = {
|
||||
setConta: b.dispatch(deleteItem)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const stateGetter = b.state()
|
||||
|
||||
// Module
|
||||
const TodosModule = {
|
||||
get state() {
|
||||
return stateGetter()
|
||||
},
|
||||
getters: Getters.getters,
|
||||
mutations: Mutations.mutations,
|
||||
actions: Actions.actions
|
||||
}
|
||||
|
||||
|
||||
export default ITodosState
|
||||
|
||||
@@ -13,7 +13,7 @@ const bcrypt = require('bcryptjs')
|
||||
|
||||
// State
|
||||
const state: IUserState = {
|
||||
_id: '',
|
||||
userId: '',
|
||||
email: '',
|
||||
username: '',
|
||||
idapp: process.env.APP_ID,
|
||||
@@ -21,7 +21,6 @@ const state: IUserState = {
|
||||
lang: '',
|
||||
repeatPassword: '',
|
||||
idToken: '',
|
||||
userId: 0,
|
||||
tokens: [],
|
||||
verifiedEmail: false
|
||||
}
|
||||
@@ -66,8 +65,8 @@ namespace Getters {
|
||||
|
||||
namespace Mutations {
|
||||
function authUser(state, data: IUserState) {
|
||||
state.username = data.username
|
||||
state.userId = data.userId
|
||||
state.username = data.username
|
||||
state.idToken = data.idToken
|
||||
state.verifiedEmail = data.verifiedEmail
|
||||
// @ts-ignore
|
||||
@@ -102,10 +101,10 @@ namespace Mutations {
|
||||
}
|
||||
|
||||
function clearAuthData(state: IUserState) {
|
||||
state.userId = ''
|
||||
state.username = ''
|
||||
state.tokens = []
|
||||
state.idToken = ''
|
||||
state.userId = 0
|
||||
state.verifiedEmail = false
|
||||
}
|
||||
|
||||
@@ -308,16 +307,16 @@ namespace Actions {
|
||||
Mutations.mutations.setServerCode(myres.status)
|
||||
|
||||
if (myres.status === 200) {
|
||||
let iduser = body._id
|
||||
let userId = body.userId
|
||||
let username = authData.username
|
||||
if (process.env.DEV) {
|
||||
console.log('USERNAME = ' + username)
|
||||
console.log('IDUSER= ' + iduser)
|
||||
console.log('IDUSER= ' + userId)
|
||||
}
|
||||
|
||||
Mutations.mutations.authUser({
|
||||
userId: userId,
|
||||
username: username,
|
||||
userId: iduser,
|
||||
idToken: x_auth_token,
|
||||
verifiedEmail: false
|
||||
})
|
||||
@@ -325,9 +324,9 @@ namespace Actions {
|
||||
const now = new Date()
|
||||
// const expirationDate = new Date(now.getTime() + myres.data.expiresIn * 1000);
|
||||
const expirationDate = new Date(now.getTime() * 1000)
|
||||
localStorage.setItem(rescodes.localStorage.userId, userId)
|
||||
localStorage.setItem(rescodes.localStorage.username, username)
|
||||
localStorage.setItem(rescodes.localStorage.token, x_auth_token)
|
||||
localStorage.setItem(rescodes.localStorage.userId, iduser)
|
||||
localStorage.setItem(rescodes.localStorage.expirationDate, expirationDate.toString())
|
||||
localStorage.setItem(rescodes.localStorage.verifiedEmail, '0')
|
||||
// dispatch('storeUser', authData);
|
||||
@@ -407,15 +406,15 @@ namespace Actions {
|
||||
Mutations.mutations.setServerCode(myres.status)
|
||||
|
||||
if (myres.status === 200) {
|
||||
let iduser = body._id
|
||||
let userId = body.userId
|
||||
let username = authData.username
|
||||
let verifiedEmail = body.verified_email === 'true' || body.verified_email === true
|
||||
if (process.env.DEV) {
|
||||
console.log('USERNAME = ' + username)
|
||||
console.log('IDUSER= ' + iduser)
|
||||
console.log('IDUSER= ' + userId)
|
||||
Mutations.mutations.authUser({
|
||||
userId: userId,
|
||||
username: username,
|
||||
userId: iduser,
|
||||
idToken: x_auth_token,
|
||||
verifiedEmail: verifiedEmail
|
||||
})
|
||||
@@ -424,9 +423,9 @@ namespace Actions {
|
||||
const now = new Date()
|
||||
// const expirationDate = new Date(now.getTime() + myres.data.expiresIn * 1000);
|
||||
const expirationDate = new Date(now.getTime() * 1000)
|
||||
localStorage.setItem(rescodes.localStorage.userId, userId)
|
||||
localStorage.setItem(rescodes.localStorage.username, username)
|
||||
localStorage.setItem(rescodes.localStorage.token, x_auth_token)
|
||||
localStorage.setItem(rescodes.localStorage.userId, iduser)
|
||||
localStorage.setItem(rescodes.localStorage.expirationDate, expirationDate.toString())
|
||||
localStorage.setItem(rescodes.localStorage.isLogged, String(true))
|
||||
localStorage.setItem(rescodes.localStorage.verifiedEmail, Number(verifiedEmail).toString())
|
||||
@@ -513,15 +512,15 @@ namespace Actions {
|
||||
if (now >= expirationDate) {
|
||||
return false
|
||||
}
|
||||
const userId = Number(localStorage.getItem(rescodes.localStorage.userId))
|
||||
const userId = String(localStorage.getItem(rescodes.localStorage.userId))
|
||||
const username = String(localStorage.getItem(rescodes.localStorage.username))
|
||||
const verifiedEmail = localStorage.getItem(rescodes.localStorage.verifiedEmail) === '1'
|
||||
|
||||
setGlobal()
|
||||
|
||||
Mutations.mutations.authUser({
|
||||
username: username,
|
||||
userId: userId,
|
||||
username: username,
|
||||
idToken: token,
|
||||
verifiedEmail: verifiedEmail
|
||||
})
|
||||
|
||||
@@ -13,5 +13,56 @@ export const rescodes = {
|
||||
userId: 'uid',
|
||||
token: 'tk',
|
||||
username: 'uname'
|
||||
},
|
||||
|
||||
Todos: {
|
||||
PRIORITY_NORMAL: 0,
|
||||
PRIORITY_HIGH: 1,
|
||||
PRIORITY_LOW: -1
|
||||
},
|
||||
|
||||
|
||||
selectPriority: {
|
||||
'it': [
|
||||
{
|
||||
id: 1,
|
||||
label: 'Alta',
|
||||
value: 1,
|
||||
icon: 'expand_less'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
label: 'Normale',
|
||||
value: 0,
|
||||
icon: 'remove'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
label: 'Bassa',
|
||||
value: -1,
|
||||
icon: 'expand_more'
|
||||
}],
|
||||
'enUk': [
|
||||
{
|
||||
id: 1,
|
||||
label: 'High',
|
||||
value: 1,
|
||||
icon: 'expand_less'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
label: 'Normal',
|
||||
value: 0,
|
||||
icon: 'remove'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
label: 'Low',
|
||||
value: -1,
|
||||
icon: 'expand_more'
|
||||
}]
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
1
src/typings/libs/ambient.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
declare module 'vuedraggable'
|
||||
@@ -10,7 +10,8 @@ import { validations, TSignin } from './signin-validate'
|
||||
|
||||
import { validationMixin } from 'vuelidate'
|
||||
|
||||
import './signin.scss'
|
||||
import { Logo } from '@components'
|
||||
|
||||
import router from '@router'
|
||||
|
||||
// import {Loading, QSpinnerFacebook, QSpinnerGears} from 'quasar'
|
||||
@@ -18,7 +19,8 @@ import router from '@router'
|
||||
|
||||
@Component({
|
||||
mixins: [validationMixin],
|
||||
validations: validations
|
||||
validations: validations,
|
||||
components: { Logo }
|
||||
})
|
||||
|
||||
export default class Signin extends Vue {
|
||||
@@ -43,10 +45,6 @@ export default class Signin extends Vue {
|
||||
return process.env
|
||||
}
|
||||
|
||||
public logoimg() {
|
||||
return process.env.LOGO_REG
|
||||
}
|
||||
|
||||
showNotif(msg: any) {
|
||||
this.$q.notify(msg)
|
||||
}
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
<q-page padding class="signin">
|
||||
<div class="text-center">
|
||||
<p>
|
||||
<!--<img src="../../../assets/quasar-logo-full.svg">-->
|
||||
<img :src="`../../../assets/${logoimg()}`">
|
||||
<logo></logo>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -61,3 +60,7 @@
|
||||
|
||||
<script lang="ts" src="./signin.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './signin.scss';
|
||||
</style>
|
||||
|
||||
@@ -8,13 +8,14 @@ import { validations, TSignup } from './signup-validate'
|
||||
|
||||
import { validationMixin } from 'vuelidate'
|
||||
|
||||
import './signup.scss'
|
||||
import { Logo } from '@components'
|
||||
|
||||
// import {Loading, QSpinnerFacebook, QSpinnerGears} from 'quasar'
|
||||
|
||||
@Component({
|
||||
mixins: [validationMixin],
|
||||
validations: validations
|
||||
validations: validations,
|
||||
components: { Logo }
|
||||
})
|
||||
|
||||
export default class Signup extends Vue {
|
||||
@@ -41,10 +42,6 @@ export default class Signup extends Vue {
|
||||
mounted() {
|
||||
}
|
||||
|
||||
public logoimg() {
|
||||
return process.env.LOGO_REG
|
||||
}
|
||||
|
||||
get allowSubmit() {
|
||||
|
||||
let error = this.$v.$error || this.$v.$invalid
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
<q-page padding class="signup">
|
||||
<div class="text-center">
|
||||
<p>
|
||||
<!--<img src="../../../assets/quasar-logo-full.svg">-->
|
||||
<img :src="`../../../assets/${logoimg()}`">
|
||||
<logo></logo>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -98,3 +97,6 @@
|
||||
|
||||
<script lang="ts" src="./signup.ts">
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './signup.scss';
|
||||
</style>
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<q-page padding class="signup">
|
||||
<div class="text-center">
|
||||
<p>
|
||||
<!--<img src="../../../assets/quasar-logo-full.svg">-->
|
||||
<img :src="`../../../assets/`+`${env('LOGO_REG')}`">
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!--Prova URL : {{env('PROVA_PAOLO')}}-->
|
||||
|
||||
<q-field
|
||||
>
|
||||
<q-input
|
||||
v-validate="'required|email'"
|
||||
v-model="form.email"
|
||||
:value="form.email"
|
||||
/>
|
||||
</q-field>
|
||||
</q-page>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Vue, Watch } from 'vue-property-decorator';
|
||||
import { UserStore } from '@store';
|
||||
|
||||
|
||||
@Component({})
|
||||
export default class Login extends Vue {
|
||||
form = {
|
||||
email: 'prova@prova.com',
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||