Added regsiter page and styles (#8836)
* Added regsiter page and styles * Added style updates * Added login server connection and logout * Added login * Added social auth * Moved image assests * Added trasnlations * Added social icons * Removed duplicate * Updated shrinkwrap
701
npm-shrinkwrap.json
generated
@@ -4208,700 +4208,6 @@
|
|||||||
"from": "fs.realpath@>=1.0.0 <2.0.0",
|
"from": "fs.realpath@>=1.0.0 <2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
|
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
|
||||||
},
|
},
|
||||||
"fsevents": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"from": "fsevents@>=1.0.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.1.tgz",
|
|
||||||
"optional": true,
|
|
||||||
"dependencies": {
|
|
||||||
"abbrev": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"from": "abbrev@>=1.0.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"ansi-regex": {
|
|
||||||
"version": "2.1.1",
|
|
||||||
"from": "ansi-regex@>=2.0.0 <3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz"
|
|
||||||
},
|
|
||||||
"ansi-styles": {
|
|
||||||
"version": "2.2.1",
|
|
||||||
"from": "ansi-styles@>=2.2.1 <3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"aproba": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"from": "aproba@>=1.0.3 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.1.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"are-we-there-yet": {
|
|
||||||
"version": "1.1.2",
|
|
||||||
"from": "are-we-there-yet@>=1.1.2 <1.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"asn1": {
|
|
||||||
"version": "0.2.3",
|
|
||||||
"from": "asn1@>=0.2.3 <0.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"assert-plus": {
|
|
||||||
"version": "0.2.0",
|
|
||||||
"from": "assert-plus@>=0.2.0 <0.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"asynckit": {
|
|
||||||
"version": "0.4.0",
|
|
||||||
"from": "asynckit@>=0.4.0 <0.5.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"aws-sign2": {
|
|
||||||
"version": "0.6.0",
|
|
||||||
"from": "aws-sign2@>=0.6.0 <0.7.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"aws4": {
|
|
||||||
"version": "1.6.0",
|
|
||||||
"from": "aws4@>=1.2.1 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"balanced-match": {
|
|
||||||
"version": "0.4.2",
|
|
||||||
"from": "balanced-match@>=0.4.1 <0.5.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz"
|
|
||||||
},
|
|
||||||
"bcrypt-pbkdf": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"from": "bcrypt-pbkdf@>=1.0.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"block-stream": {
|
|
||||||
"version": "0.0.9",
|
|
||||||
"from": "block-stream@*",
|
|
||||||
"resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz"
|
|
||||||
},
|
|
||||||
"boom": {
|
|
||||||
"version": "2.10.1",
|
|
||||||
"from": "boom@>=2.0.0 <3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz"
|
|
||||||
},
|
|
||||||
"brace-expansion": {
|
|
||||||
"version": "1.1.6",
|
|
||||||
"from": "brace-expansion@>=1.0.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz"
|
|
||||||
},
|
|
||||||
"buffer-shims": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"from": "buffer-shims@>=1.0.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz"
|
|
||||||
},
|
|
||||||
"caseless": {
|
|
||||||
"version": "0.11.0",
|
|
||||||
"from": "caseless@>=0.11.0 <0.12.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"chalk": {
|
|
||||||
"version": "1.1.3",
|
|
||||||
"from": "chalk@>=1.1.1 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"code-point-at": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"from": "code-point-at@>=1.0.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz"
|
|
||||||
},
|
|
||||||
"combined-stream": {
|
|
||||||
"version": "1.0.5",
|
|
||||||
"from": "combined-stream@>=1.0.5 <1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz"
|
|
||||||
},
|
|
||||||
"commander": {
|
|
||||||
"version": "2.9.0",
|
|
||||||
"from": "commander@>=2.9.0 <3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"concat-map": {
|
|
||||||
"version": "0.0.1",
|
|
||||||
"from": "concat-map@0.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz"
|
|
||||||
},
|
|
||||||
"console-control-strings": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"from": "console-control-strings@>=1.1.0 <1.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz"
|
|
||||||
},
|
|
||||||
"core-util-is": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"from": "core-util-is@>=1.0.0 <1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz"
|
|
||||||
},
|
|
||||||
"cryptiles": {
|
|
||||||
"version": "2.0.5",
|
|
||||||
"from": "cryptiles@>=2.0.0 <3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"dashdash": {
|
|
||||||
"version": "1.14.1",
|
|
||||||
"from": "dashdash@>=1.12.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
|
|
||||||
"optional": true,
|
|
||||||
"dependencies": {
|
|
||||||
"assert-plus": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"from": "assert-plus@>=1.0.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"debug": {
|
|
||||||
"version": "2.2.0",
|
|
||||||
"from": "debug@>=2.2.0 <2.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"deep-extend": {
|
|
||||||
"version": "0.4.1",
|
|
||||||
"from": "deep-extend@>=0.4.0 <0.5.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.1.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"delayed-stream": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"from": "delayed-stream@>=1.0.0 <1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz"
|
|
||||||
},
|
|
||||||
"delegates": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"from": "delegates@>=1.0.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"ecc-jsbn": {
|
|
||||||
"version": "0.1.1",
|
|
||||||
"from": "ecc-jsbn@>=0.1.1 <0.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"escape-string-regexp": {
|
|
||||||
"version": "1.0.5",
|
|
||||||
"from": "escape-string-regexp@>=1.0.2 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"extend": {
|
|
||||||
"version": "3.0.0",
|
|
||||||
"from": "extend@>=3.0.0 <3.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"extsprintf": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"from": "extsprintf@1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz"
|
|
||||||
},
|
|
||||||
"forever-agent": {
|
|
||||||
"version": "0.6.1",
|
|
||||||
"from": "forever-agent@>=0.6.1 <0.7.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"form-data": {
|
|
||||||
"version": "2.1.2",
|
|
||||||
"from": "form-data@>=2.1.1 <2.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.2.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"fs.realpath": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"from": "fs.realpath@>=1.0.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
|
|
||||||
},
|
|
||||||
"fstream": {
|
|
||||||
"version": "1.0.10",
|
|
||||||
"from": "fstream@>=1.0.2 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.10.tgz"
|
|
||||||
},
|
|
||||||
"fstream-ignore": {
|
|
||||||
"version": "1.0.5",
|
|
||||||
"from": "fstream-ignore@>=1.0.5 <1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"gauge": {
|
|
||||||
"version": "2.7.3",
|
|
||||||
"from": "gauge@>=2.7.1 <2.8.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.3.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"generate-function": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"from": "generate-function@>=2.0.0 <3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"generate-object-property": {
|
|
||||||
"version": "1.2.0",
|
|
||||||
"from": "generate-object-property@>=1.1.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"getpass": {
|
|
||||||
"version": "0.1.6",
|
|
||||||
"from": "getpass@>=0.1.1 <0.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.6.tgz",
|
|
||||||
"optional": true,
|
|
||||||
"dependencies": {
|
|
||||||
"assert-plus": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"from": "assert-plus@>=1.0.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"glob": {
|
|
||||||
"version": "7.1.1",
|
|
||||||
"from": "glob@>=7.0.5 <8.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz"
|
|
||||||
},
|
|
||||||
"graceful-fs": {
|
|
||||||
"version": "4.1.11",
|
|
||||||
"from": "graceful-fs@>=4.1.2 <5.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz"
|
|
||||||
},
|
|
||||||
"graceful-readlink": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"from": "graceful-readlink@>=1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"har-validator": {
|
|
||||||
"version": "2.0.6",
|
|
||||||
"from": "har-validator@>=2.0.6 <2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"has-ansi": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"from": "has-ansi@>=2.0.0 <3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"has-unicode": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"from": "has-unicode@>=2.0.0 <3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"hawk": {
|
|
||||||
"version": "3.1.3",
|
|
||||||
"from": "hawk@>=3.1.3 <3.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"hoek": {
|
|
||||||
"version": "2.16.3",
|
|
||||||
"from": "hoek@>=2.0.0 <3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz"
|
|
||||||
},
|
|
||||||
"http-signature": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"from": "http-signature@>=1.1.0 <1.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"inflight": {
|
|
||||||
"version": "1.0.6",
|
|
||||||
"from": "inflight@>=1.0.4 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz"
|
|
||||||
},
|
|
||||||
"inherits": {
|
|
||||||
"version": "2.0.3",
|
|
||||||
"from": "inherits@>=2.0.1 <2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
|
|
||||||
},
|
|
||||||
"ini": {
|
|
||||||
"version": "1.3.4",
|
|
||||||
"from": "ini@>=1.3.0 <1.4.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"is-fullwidth-code-point": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"from": "is-fullwidth-code-point@>=1.0.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz"
|
|
||||||
},
|
|
||||||
"is-my-json-valid": {
|
|
||||||
"version": "2.15.0",
|
|
||||||
"from": "is-my-json-valid@>=2.12.4 <3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"is-property": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"from": "is-property@>=1.0.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"is-typedarray": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"from": "is-typedarray@>=1.0.0 <1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"isarray": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"from": "isarray@>=1.0.0 <1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
|
|
||||||
},
|
|
||||||
"isstream": {
|
|
||||||
"version": "0.1.2",
|
|
||||||
"from": "isstream@>=0.1.2 <0.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"jodid25519": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"from": "jodid25519@>=1.0.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"jsbn": {
|
|
||||||
"version": "0.1.1",
|
|
||||||
"from": "jsbn@>=0.1.0 <0.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"json-schema": {
|
|
||||||
"version": "0.2.3",
|
|
||||||
"from": "json-schema@0.2.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"json-stringify-safe": {
|
|
||||||
"version": "5.0.1",
|
|
||||||
"from": "json-stringify-safe@>=5.0.1 <5.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"jsonpointer": {
|
|
||||||
"version": "4.0.1",
|
|
||||||
"from": "jsonpointer@>=4.0.0 <5.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"jsprim": {
|
|
||||||
"version": "1.3.1",
|
|
||||||
"from": "jsprim@>=1.2.2 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.1.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"mime-db": {
|
|
||||||
"version": "1.26.0",
|
|
||||||
"from": "mime-db@>=1.26.0 <1.27.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.26.0.tgz"
|
|
||||||
},
|
|
||||||
"mime-types": {
|
|
||||||
"version": "2.1.14",
|
|
||||||
"from": "mime-types@>=2.1.7 <2.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.14.tgz"
|
|
||||||
},
|
|
||||||
"minimatch": {
|
|
||||||
"version": "3.0.3",
|
|
||||||
"from": "minimatch@>=3.0.2 <4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz"
|
|
||||||
},
|
|
||||||
"minimist": {
|
|
||||||
"version": "0.0.8",
|
|
||||||
"from": "minimist@0.0.8",
|
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz"
|
|
||||||
},
|
|
||||||
"mkdirp": {
|
|
||||||
"version": "0.5.1",
|
|
||||||
"from": "mkdirp@>=0.5.1 <0.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz"
|
|
||||||
},
|
|
||||||
"ms": {
|
|
||||||
"version": "0.7.1",
|
|
||||||
"from": "ms@0.7.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"node-pre-gyp": {
|
|
||||||
"version": "0.6.33",
|
|
||||||
"from": "node-pre-gyp@>=0.6.29 <0.7.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.33.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"nopt": {
|
|
||||||
"version": "3.0.6",
|
|
||||||
"from": "nopt@>=3.0.6 <3.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"npmlog": {
|
|
||||||
"version": "4.0.2",
|
|
||||||
"from": "npmlog@>=4.0.1 <5.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.0.2.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"number-is-nan": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"from": "number-is-nan@>=1.0.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz"
|
|
||||||
},
|
|
||||||
"oauth-sign": {
|
|
||||||
"version": "0.8.2",
|
|
||||||
"from": "oauth-sign@>=0.8.1 <0.9.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"object-assign": {
|
|
||||||
"version": "4.1.1",
|
|
||||||
"from": "object-assign@>=4.1.0 <5.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"once": {
|
|
||||||
"version": "1.4.0",
|
|
||||||
"from": "once@>=1.3.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz"
|
|
||||||
},
|
|
||||||
"path-is-absolute": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"from": "path-is-absolute@>=1.0.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz"
|
|
||||||
},
|
|
||||||
"pinkie": {
|
|
||||||
"version": "2.0.4",
|
|
||||||
"from": "pinkie@>=2.0.0 <3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"pinkie-promise": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"from": "pinkie-promise@>=2.0.0 <3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"process-nextick-args": {
|
|
||||||
"version": "1.0.7",
|
|
||||||
"from": "process-nextick-args@>=1.0.6 <1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz"
|
|
||||||
},
|
|
||||||
"punycode": {
|
|
||||||
"version": "1.4.1",
|
|
||||||
"from": "punycode@>=1.4.1 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"qs": {
|
|
||||||
"version": "6.3.1",
|
|
||||||
"from": "qs@>=6.3.0 <6.4.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.3.1.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"rc": {
|
|
||||||
"version": "1.1.7",
|
|
||||||
"from": "rc@>=1.1.6 <1.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/rc/-/rc-1.1.7.tgz",
|
|
||||||
"optional": true,
|
|
||||||
"dependencies": {
|
|
||||||
"minimist": {
|
|
||||||
"version": "1.2.0",
|
|
||||||
"from": "minimist@>=1.2.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"readable-stream": {
|
|
||||||
"version": "2.2.2",
|
|
||||||
"from": "readable-stream@>=2.0.0 <3.0.0||>=1.1.13 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.2.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"request": {
|
|
||||||
"version": "2.79.0",
|
|
||||||
"from": "request@>=2.79.0 <3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"rimraf": {
|
|
||||||
"version": "2.5.4",
|
|
||||||
"from": "rimraf@>=2.5.4 <2.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz"
|
|
||||||
},
|
|
||||||
"semver": {
|
|
||||||
"version": "5.3.0",
|
|
||||||
"from": "semver@>=5.3.0 <5.4.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"set-blocking": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"from": "set-blocking@>=2.0.0 <2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"signal-exit": {
|
|
||||||
"version": "3.0.2",
|
|
||||||
"from": "signal-exit@>=3.0.0 <4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"sntp": {
|
|
||||||
"version": "1.0.9",
|
|
||||||
"from": "sntp@>=1.0.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"sshpk": {
|
|
||||||
"version": "1.10.2",
|
|
||||||
"from": "sshpk@>=1.7.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.10.2.tgz",
|
|
||||||
"optional": true,
|
|
||||||
"dependencies": {
|
|
||||||
"assert-plus": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"from": "assert-plus@>=1.0.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"string_decoder": {
|
|
||||||
"version": "0.10.31",
|
|
||||||
"from": "string_decoder@>=0.10.0 <0.11.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz"
|
|
||||||
},
|
|
||||||
"string-width": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"from": "string-width@>=1.0.1 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz"
|
|
||||||
},
|
|
||||||
"stringstream": {
|
|
||||||
"version": "0.0.5",
|
|
||||||
"from": "stringstream@>=0.0.4 <0.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"strip-ansi": {
|
|
||||||
"version": "3.0.1",
|
|
||||||
"from": "strip-ansi@>=3.0.1 <4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz"
|
|
||||||
},
|
|
||||||
"strip-json-comments": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"from": "strip-json-comments@>=2.0.1 <2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"supports-color": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"from": "supports-color@>=2.0.0 <3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"tar": {
|
|
||||||
"version": "2.2.1",
|
|
||||||
"from": "tar@>=2.2.1 <2.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz"
|
|
||||||
},
|
|
||||||
"tar-pack": {
|
|
||||||
"version": "3.3.0",
|
|
||||||
"from": "tar-pack@>=3.3.0 <3.4.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.3.0.tgz",
|
|
||||||
"optional": true,
|
|
||||||
"dependencies": {
|
|
||||||
"once": {
|
|
||||||
"version": "1.3.3",
|
|
||||||
"from": "once@>=1.3.3 <1.4.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"readable-stream": {
|
|
||||||
"version": "2.1.5",
|
|
||||||
"from": "readable-stream@>=2.1.4 <2.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz",
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tough-cookie": {
|
|
||||||
"version": "2.3.2",
|
|
||||||
"from": "tough-cookie@>=2.3.0 <2.4.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"tunnel-agent": {
|
|
||||||
"version": "0.4.3",
|
|
||||||
"from": "tunnel-agent@>=0.4.1 <0.5.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"tweetnacl": {
|
|
||||||
"version": "0.14.5",
|
|
||||||
"from": "tweetnacl@>=0.14.0 <0.15.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"uid-number": {
|
|
||||||
"version": "0.0.6",
|
|
||||||
"from": "uid-number@>=0.0.6 <0.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"util-deprecate": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"from": "util-deprecate@>=1.0.1 <1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
|
|
||||||
},
|
|
||||||
"uuid": {
|
|
||||||
"version": "3.0.1",
|
|
||||||
"from": "uuid@>=3.0.0 <4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"verror": {
|
|
||||||
"version": "1.3.6",
|
|
||||||
"from": "verror@1.3.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"wide-align": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"from": "wide-align@>=1.1.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.0.tgz",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"wrappy": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"from": "wrappy@>=1.0.0 <2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz"
|
|
||||||
},
|
|
||||||
"xtend": {
|
|
||||||
"version": "4.0.1",
|
|
||||||
"from": "xtend@>=4.0.0 <5.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fstream": {
|
"fstream": {
|
||||||
"version": "1.0.11",
|
"version": "1.0.11",
|
||||||
"from": "fstream@>=1.0.2 <2.0.0",
|
"from": "fstream@>=1.0.2 <2.0.0",
|
||||||
@@ -6128,6 +5434,11 @@
|
|||||||
"from": "he@>=1.1.0 <1.2.0",
|
"from": "he@>=1.1.0 <1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz"
|
"resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz"
|
||||||
},
|
},
|
||||||
|
"hellojs": {
|
||||||
|
"version": "1.15.1",
|
||||||
|
"from": "hellojs@>=1.15.1 <2.0.0",
|
||||||
|
"resolved": "http://registry.npmjs.org/hellojs/-/hellojs-1.15.1.tgz"
|
||||||
|
},
|
||||||
"hmac-drbg": {
|
"hmac-drbg": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"from": "hmac-drbg@>=1.0.0 <2.0.0",
|
"from": "hmac-drbg@>=1.0.0 <2.0.0",
|
||||||
@@ -7717,7 +7028,7 @@
|
|||||||
"lazy-debug-legacy": {
|
"lazy-debug-legacy": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"from": "lazy-debug-legacy@>=0.0.0 <0.1.0",
|
"from": "lazy-debug-legacy@>=0.0.0 <0.1.0",
|
||||||
"resolved": "http://registry.npmjs.org/lazy-debug-legacy/-/lazy-debug-legacy-0.0.1.tgz"
|
"resolved": "https://registry.npmjs.org/lazy-debug-legacy/-/lazy-debug-legacy-0.0.1.tgz"
|
||||||
},
|
},
|
||||||
"lazy-req": {
|
"lazy-req": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
|
|||||||
@@ -69,6 +69,7 @@
|
|||||||
"gulp-uglify": "^1.4.2",
|
"gulp-uglify": "^1.4.2",
|
||||||
"gulp.spritesmith": "^4.1.0",
|
"gulp.spritesmith": "^4.1.0",
|
||||||
"habitica-markdown": "^1.3.0",
|
"habitica-markdown": "^1.3.0",
|
||||||
|
"hellojs": "^1.15.1",
|
||||||
"html-webpack-plugin": "^2.8.1",
|
"html-webpack-plugin": "^2.8.1",
|
||||||
"image-size": "~0.3.2",
|
"image-size": "~0.3.2",
|
||||||
"in-app-purchase": "^1.1.6",
|
"in-app-purchase": "^1.1.6",
|
||||||
|
|||||||
@@ -2,15 +2,18 @@
|
|||||||
|
|
||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
#app
|
#app
|
||||||
app-menu
|
app-menu(v-if="userLoggedIn")
|
||||||
.container-fluid
|
.container-fluid(v-if="userLoggedIn")
|
||||||
app-header
|
app-header
|
||||||
router-view
|
router-view
|
||||||
|
|
||||||
|
router-view(v-if="!userLoggedIn")
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import AppMenu from './components/appMenu';
|
import AppMenu from './components/appMenu';
|
||||||
import AppHeader from './components/appHeader';
|
import AppHeader from './components/appHeader';
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'app',
|
name: 'app',
|
||||||
@@ -18,6 +21,47 @@ export default {
|
|||||||
AppMenu,
|
AppMenu,
|
||||||
AppHeader,
|
AppHeader,
|
||||||
},
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
userLoggedIn: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
async beforeCreate () {
|
||||||
|
// Setup listener for title
|
||||||
|
this.$store.watch(state => state.title, (title) => {
|
||||||
|
document.title = title;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Mount the app when user and tasks are loaded
|
||||||
|
const userDataWatcher = this.$store.watch(state => [state.user.data, state.tasks.data], ([user, tasks]) => {
|
||||||
|
if (user && user._id && Array.isArray(tasks)) {
|
||||||
|
userDataWatcher(); // remove the watcher
|
||||||
|
// this.$mount('#app');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// @TODO: Move this to store?
|
||||||
|
let authSettings = localStorage.getItem('habit-mobile-settings');
|
||||||
|
if (!authSettings) return;
|
||||||
|
|
||||||
|
authSettings = JSON.parse(authSettings);
|
||||||
|
axios.defaults.headers.common['x-api-user'] = authSettings.auth.apiId;
|
||||||
|
axios.defaults.headers.common['x-api-key'] = authSettings.auth.apiToken;
|
||||||
|
|
||||||
|
// Load the user and the user tasks
|
||||||
|
await Promise.all([
|
||||||
|
this.$store.dispatch('user:fetch'),
|
||||||
|
this.$store.dispatch('tasks:fetchUserTasks'),
|
||||||
|
]).catch((err) => {
|
||||||
|
console.error('Impossible to fetch user. Copy into localStorage a valid habit-mobile-settings object.', err); // eslint-disable-line no-console
|
||||||
|
});
|
||||||
|
|
||||||
|
this.userLoggedIn = true;
|
||||||
|
},
|
||||||
|
mounted () { // Remove the loading screen when the app is mounted
|
||||||
|
let loadingScreen = document.getElementById('loading-screen');
|
||||||
|
if (loadingScreen) document.body.removeChild(loadingScreen);
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 13 KiB |
BIN
website/client/assets/images/auth/repeatinghill_leftslope.png
Normal file
|
After Width: | Height: | Size: 894 B |
BIN
website/client/assets/images/auth/repeatinghill_rightslope.png
Normal file
|
After Width: | Height: | Size: 882 B |
BIN
website/client/assets/images/auth/seamless_mountains_demo.png
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
8
website/client/assets/svg/google.svg
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path fill="#4285F4" d="M17.64 9.205c0-.639-.057-1.252-.164-1.841H9v3.481h4.844a4.14 4.14 0 0 1-1.796 2.716v2.259h2.908c1.702-1.567 2.684-3.875 2.684-6.615z"/>
|
||||||
|
<path fill="#34A853" d="M9 18c2.43 0 4.467-.806 5.956-2.18l-2.908-2.259c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H.957v2.332A8.997 8.997 0 0 0 9 18z"/>
|
||||||
|
<path fill="#FBBC05" d="M3.964 10.71A5.41 5.41 0 0 1 3.682 9c0-.593.102-1.17.282-1.71V4.958H.957A8.996 8.996 0 0 0 0 9c0 1.452.348 2.827.957 4.042l3.007-2.332z"/>
|
||||||
|
<path fill="#EA4335" d="M9 3.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C13.463.891 11.426 0 9 0A8.997 8.997 0 0 0 .957 4.958L3.964 7.29C4.672 5.163 6.656 3.58 9 3.58z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 834 B |
3
website/client/assets/svg/gryphon.svg
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="65" height="70" viewBox="0 0 65 70">
|
||||||
|
<path fill="#FFF" fill-rule="evenodd" d="M62.749 65.754c1.728 2.297 1.853 3.623.136 3.623H51.783c-3.344 0-4.038.396-3.985-1.056.072-2.024.725-2.103 2.851-2.696 1.763-.493 1.13-3.63-.869-6.376-1.392-1.91-4.216-4.134-7.929-2.405-2.41 1.122-3.828 2.27-4.943 3.815-1.823 2.53-1.724 4.927 1.115 4.927 2.683 0 5.843-1.626 6.76.69 1.134 2.867.355 3.133-.2 3.133H26.79l.012.017c-9.532 0-19.054-.075-21.262-6.099-3.056-8.334 8.063-11.546 8.404-16.775.138-2.116-1.051-3.096-2.536-3.096H4.885V39.49H.921V27.6h3.964v3.964H8.85v3.964h3.965v5.506s3.447 1.71 3.33 5.478c-.186 5.982-10.304 9.296-8.45 15.567 1.695 5.738 14.502 4.364 14.053.804l-.222-2.028c-.063-2.84-.506-6.64.087-10.005.934-5.289 4.224-9.865 9.956-9.907 1.045-.008 1.929-.222 1.929-1.1 0-.927-1.68-.906-2.863-1.025-4.09-.417-9.18-1.787-13.627-5.445-2.634-2.167-6.736-8.999-4.054-8.498 1.656.31 3.116.437 4.4.433 1.346-.004 4.82-.382 4.82-1.203 0-1.138-2.01-.453-4.955-.741-3.521-.344-10.988-1.853-14.84-13.215C.932 5.89-.02-2.075 2.324.503 15.84 15.367 20.433 12.947 28.184 18.029c3.412 2.237 5.633 7.58 7.622 7.135 1.296-.292.502-1.483.696-4.262.173-2.484 1.354-3.022-1.683-3.773-3.538-.873-7.07-4.752-4.76-4.697 2.307.056 3.977.048 6-.828 2.024-.875 6.97-4.641 9.962-3.133 2.992 1.509 5.507-.656 7.531-.272 2.938.557 3.694 4.6 3.313 6.965-.24 1.5-.24 1.498-2.153 1.386-3.921-.23-4.92 2.893-2.162 4.615 4.197 2.621 5.98 4.588 7.121 10.395.555 2.817.105 3.474-.83 2.956-.933-.519-2.539-.778-.31 4.356 2.23 5.133-1.4 11.15-2.592 11.825-1.194.674-.986 1.452-.986 1.452-.023 12.387 0 13.315 2.078 13.538 3.15.34 4.49-1.565 5.718.067z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
7
website/client/assets/svg/habitica-logo.svg
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="144" height="31" viewBox="0 0 144 31">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path fill="#FFF" d="M120.876 24.007a2.27 2.27 0 0 0-3.183.41 4.595 4.595 0 0 1-3.663 1.804 4.62 4.62 0 0 1-4.613-4.335c-.005-.35-.009-2.864-.009-3.19a4.627 4.627 0 0 1 4.622-4.622c1.28 0 2.47.51 3.353 1.44a2.269 2.269 0 0 0 3.29-3.125 9.2 9.2 0 0 0-6.643-2.853c-5.05 0-9.16 4.109-9.16 9.16 0 .03.002 3.175.014 3.406a9.158 9.158 0 0 0 9.146 8.657 9.1 9.1 0 0 0 7.257-3.57 2.27 2.27 0 0 0-.411-3.182M134.373 26.221a4.62 4.62 0 0 1-4.613-4.333c-.005-.353-.008-2.877-.008-3.193a4.627 4.627 0 0 1 4.621-4.622 4.627 4.627 0 0 1 4.622 4.622c0 .328-.003 2.84-.009 3.189a4.618 4.618 0 0 1-4.613 4.337m6.891-17.078a2.264 2.264 0 0 0-2.19 1.706 9.095 9.095 0 0 0-4.7-1.313c-5.051 0-9.16 4.109-9.16 9.16 0 .031.001 3.173.013 3.406a9.158 9.158 0 0 0 9.146 8.657 9.118 9.118 0 0 0 4.81-1.37 2.268 2.268 0 0 0 4.35-.899V11.412a2.27 2.27 0 0 0-2.269-2.269M30.546 26.221a4.62 4.62 0 0 1-4.613-4.335c-.006-.35-.01-2.863-.01-3.19a4.627 4.627 0 0 1 4.623-4.623 4.627 4.627 0 0 1 4.622 4.622c0 .328-.004 2.84-.01 3.189a4.618 4.618 0 0 1-4.612 4.337m6.89-17.078a2.264 2.264 0 0 0-2.19 1.706 9.095 9.095 0 0 0-4.7-1.313c-5.052 0-9.16 4.109-9.16 9.16 0 .031 0 3.174.013 3.406a9.158 9.158 0 0 0 9.147 8.657 9.118 9.118 0 0 0 4.809-1.37 2.268 2.268 0 0 0 4.35-.899V11.412a2.27 2.27 0 0 0-2.269-2.269M70.84 9.143a2.27 2.27 0 0 0-2.27 2.27V28.49a2.27 2.27 0 0 0 4.539 0V11.412a2.27 2.27 0 0 0-2.27-2.269M97.563 9.143a2.27 2.27 0 0 0-2.27 2.27V28.49a2.27 2.27 0 0 0 4.538 0V11.412a2.27 2.27 0 0 0-2.268-2.269M59.066 21.888a4.62 4.62 0 0 1-4.613 4.333 4.62 4.62 0 0 1-4.613-4.338c-.006-.35-.009-2.86-.009-3.187a4.627 4.627 0 0 1 4.622-4.622 4.627 4.627 0 0 1 4.622 4.622c0 .315-.004 2.84-.009 3.192M54.453 9.536a9.089 9.089 0 0 0-4.622 1.265V2.33a2.27 2.27 0 0 0-4.537 0V28.49a2.269 2.269 0 0 0 4.35.9 9.117 9.117 0 0 0 4.81 1.37 9.16 9.16 0 0 0 9.146-8.666c.011-.224.013-3.367.013-3.398 0-5.052-4.11-9.16-9.16-9.16M8.92 9.536a9.143 9.143 0 0 0-4.382 1.11V2.33A2.27 2.27 0 0 0 0 2.33v26.16a2.269 2.269 0 1 0 4.538 0V16.763c.173-.147.333-.314.46-.516a4.601 4.601 0 0 1 3.921-2.173 4.627 4.627 0 0 1 4.622 4.622c0 .415-.004 9.233-.01 9.738a2.27 2.27 0 0 0 4.535.172c.01-.225.012-9.814.012-9.91 0-5.052-4.108-9.16-9.159-9.16M88.95 9.143h-2.648V2.33a2.27 2.27 0 0 0-4.538 0v6.813h-2.647a2.27 2.27 0 0 0 0 4.538h2.647V28.49a2.27 2.27 0 0 0 4.538 0V13.681h2.647a2.27 2.27 0 0 0 0-4.538"/>
|
||||||
|
<path fill="#FF6066" d="M73.025 2.33a2.27 2.27 0 1 1-4.538 0 2.27 2.27 0 0 1 4.538 0"/>
|
||||||
|
<path fill="#4FB5E8" d="M99.748 2.33a2.27 2.27 0 1 1-4.539 0 2.27 2.27 0 0 1 4.539 0"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.6 KiB |
@@ -48,7 +48,7 @@ nav.navbar.navbar-inverse.fixed-top.navbar-toggleable-sm
|
|||||||
router-link.dropdown-item(:to="{name: 'stats'}") {{ $t('stats') }}
|
router-link.dropdown-item(:to="{name: 'stats'}") {{ $t('stats') }}
|
||||||
router-link.dropdown-item(:to="{name: 'achievements'}") {{ $t('achievements') }}
|
router-link.dropdown-item(:to="{name: 'achievements'}") {{ $t('achievements') }}
|
||||||
router-link.dropdown-item(:to="{name: 'settings'}") {{ $t('settings') }}
|
router-link.dropdown-item(:to="{name: 'settings'}") {{ $t('settings') }}
|
||||||
router-link.dropdown-item(to="/logout") {{ $t('logout') }}
|
a.nav-link.dropdown-item(to="/", @click.prevent='logout()') {{ $t('logout') }}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@@ -217,5 +217,11 @@ export default {
|
|||||||
}),
|
}),
|
||||||
...mapState({user: 'user.data'}),
|
...mapState({user: 'user.data'}),
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
logout () {
|
||||||
|
localStorage.removeItem('habit-mobile-settings');
|
||||||
|
this.$router.go('/');
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
230
website/client/components/auth/registerLogin.vue
Normal file
@@ -0,0 +1,230 @@
|
|||||||
|
<template lang="pug">
|
||||||
|
.form-wrapper
|
||||||
|
#top-background
|
||||||
|
.seamless_stars_varied_opacity_repeat
|
||||||
|
|
||||||
|
#login-form
|
||||||
|
.text-center
|
||||||
|
div
|
||||||
|
.svg-icon.gryphon(v-html="icons.gryphon")
|
||||||
|
div
|
||||||
|
.svg-icon.habitica-logo(v-html="icons.habiticaIcon")
|
||||||
|
.form-group.row.text-center
|
||||||
|
.col-6
|
||||||
|
.btn.btn-secondary.social-button(@click='socialAuth("facebook")', v-once)
|
||||||
|
.svg-icon.social-icon(v-html="icons.facebookIcon")
|
||||||
|
| {{this.registering ? $t('signUpWithSocial', {social: 'Facebook'}) : $t('loginWithSocial', {social: 'Facebook'})}}
|
||||||
|
.col-6
|
||||||
|
.btn.btn-secondary.social-button(@click='socialAuth("google")', v-once)
|
||||||
|
.svg-icon.social-icon(v-html="icons.googleIcon")
|
||||||
|
| {{this.registering ? $t('signUpWithSocial', {social: 'Google'}) : $t('loginWithSocial', {social: 'Google'})}}
|
||||||
|
.form-group
|
||||||
|
label(for='usernameInput', v-once) {{$t('username')}}
|
||||||
|
input#usernameInput.form-control(type='text', :placeholder='$t("usernamePlaceholder")', v-model='username')
|
||||||
|
.form-group(v-if='registering')
|
||||||
|
label(for='emailInput', v-once) {{$t('email')}}
|
||||||
|
input#emailInput.form-control(type='email', :placeholder='$t("emailPlaceholder")', v-model='email')
|
||||||
|
.form-group
|
||||||
|
label(for='passwordInput', v-once) {{$t('password')}}
|
||||||
|
input#passwordInput.form-control(type='password', :placeholder='$t("passwordPlaceholder")', v-model='password')
|
||||||
|
.form-group(v-if='registering')
|
||||||
|
label(for='confirmPasswordInput', v-once) {{$t('confirmPassword')}}
|
||||||
|
input#confirmPasswordInput.form-control(type='password', :placeholder='$t("confirmPasswordPlaceholder")', v-model='passwordConfirm')
|
||||||
|
small.form-text(v-once) {{$t('termsAndAgreement')}}
|
||||||
|
.text-center
|
||||||
|
.btn.btn-info(@click='register()', v-if='registering', v-once) {{$t('joinHabitica')}}
|
||||||
|
.btn.btn-info(@click='login()', v-if='!registering', v-once) {{$t('login')}}
|
||||||
|
|
||||||
|
#bottom-background
|
||||||
|
.seamless_mountains_demo_repeat
|
||||||
|
.midground_foreground_extended2
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import '~client/assets/scss/colors.scss';
|
||||||
|
|
||||||
|
.form-wrapper {
|
||||||
|
background-color: $purple-200;
|
||||||
|
}
|
||||||
|
|
||||||
|
#login-form {
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 40em;
|
||||||
|
padding-top: 5em;
|
||||||
|
padding-bottom: 22.5em;
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
|
||||||
|
.gryphon {
|
||||||
|
width: 63.2px;
|
||||||
|
height: 69.4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.habitica-logo {
|
||||||
|
width: 144px;
|
||||||
|
height: 31px;
|
||||||
|
margin-top: 2em;
|
||||||
|
margin-bottom: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
color: $white;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
margin-bottom: 2em;
|
||||||
|
border-radius: 2px;
|
||||||
|
background-color: #432874;
|
||||||
|
border-color: transparent;
|
||||||
|
height: 50px;
|
||||||
|
color: $purple-400;
|
||||||
|
|
||||||
|
::-webkit-input-placeholder { /* Chrome/Opera/Safari */
|
||||||
|
color: $purple-400;
|
||||||
|
}
|
||||||
|
::-moz-placeholder { /* Firefox 19+ */
|
||||||
|
color: $purple-400;
|
||||||
|
}
|
||||||
|
:-ms-input-placeholder { /* IE 10+ */
|
||||||
|
color: $purple-400;
|
||||||
|
}
|
||||||
|
:-moz-placeholder { /* Firefox 18- */
|
||||||
|
color: $purple-400;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-text {
|
||||||
|
font-size: 14px;
|
||||||
|
color: $white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-button {
|
||||||
|
width: 100%;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-icon {
|
||||||
|
margin-right: 1em;
|
||||||
|
width: 13px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#top-background {
|
||||||
|
.seamless_stars_varied_opacity_repeat {
|
||||||
|
background-image: url('~assets/images/auth/seamless_stars_varied_opacity.png');
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
position: absolute;
|
||||||
|
height: 500px;
|
||||||
|
width: 1600px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#bottom-background {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.seamless_mountains_demo_repeat {
|
||||||
|
background-image: url('~assets/images/auth/seamless_mountains_demo.png');
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
width: 1600px;
|
||||||
|
height: 500px;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.midground_foreground_extended2 {
|
||||||
|
background-image: url('~assets/images/auth/midground_foreground_extended2.png');
|
||||||
|
position: relative;
|
||||||
|
width: 1500px;
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import hello from 'hellojs';
|
||||||
|
|
||||||
|
import gryphon from 'assets/svg/gryphon.svg';
|
||||||
|
import habiticaIcon from 'assets/svg/habitica-logo.svg';
|
||||||
|
import facebookIcon from 'assets/svg/facebook.svg';
|
||||||
|
import googleIcon from 'assets/svg/google.svg';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
let data = {
|
||||||
|
username: '',
|
||||||
|
email: '',
|
||||||
|
password: '',
|
||||||
|
passwordConfirm: '',
|
||||||
|
registering: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
data.icons = Object.freeze({
|
||||||
|
gryphon,
|
||||||
|
habiticaIcon,
|
||||||
|
facebookIcon,
|
||||||
|
googleIcon,
|
||||||
|
});
|
||||||
|
|
||||||
|
return data;
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
if (this.$route.path.startsWith('/login')) {
|
||||||
|
this.registering = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
hello.init({
|
||||||
|
facebook: '',
|
||||||
|
// windows: WINDOWS_CLIENT_ID,
|
||||||
|
google: '',
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async register () {
|
||||||
|
if (this.password !== this.passwordConfirm) {
|
||||||
|
alert('Passwords must match');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// @TODO: implement langauge and invite accepting
|
||||||
|
// var url = ApiUrl.get() + "/api/v3/user/auth/local/register";
|
||||||
|
// if (location.search && location.search.indexOf('Invite=') !== -1) { // matches groupInvite and partyInvite
|
||||||
|
// url += location.search;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if($rootScope.selectedLanguage) {
|
||||||
|
// var toAppend = url.indexOf('?') !== -1 ? '&' : '?';
|
||||||
|
// url = url + toAppend + 'lang=' + $rootScope.selectedLanguage.code;
|
||||||
|
// }
|
||||||
|
|
||||||
|
await this.$store.dispatch('auth:register', {
|
||||||
|
username: this.username,
|
||||||
|
email: this.email,
|
||||||
|
password: this.password,
|
||||||
|
passwordConfirm: this.passwordConfirm,
|
||||||
|
});
|
||||||
|
|
||||||
|
this.$router.go('/tasks');
|
||||||
|
},
|
||||||
|
async login () {
|
||||||
|
await this.$store.dispatch('auth:login', {
|
||||||
|
username: this.username,
|
||||||
|
// email: this.email,
|
||||||
|
password: this.password,
|
||||||
|
});
|
||||||
|
|
||||||
|
this.$router.go('/tasks');
|
||||||
|
},
|
||||||
|
async socialAuth (network) {
|
||||||
|
let auth = await hello(network).login({scope: 'email'});
|
||||||
|
|
||||||
|
await this.$store.dispatch('auth:socialAuth', {
|
||||||
|
auth,
|
||||||
|
});
|
||||||
|
|
||||||
|
this.$router.go('/tasks');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
30
website/client/components/static/home.vue
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<template lang="pug">
|
||||||
|
nav
|
||||||
|
a(href='/login') Login
|
||||||
|
a(href='/register') Register
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
methods: {
|
||||||
|
play () {
|
||||||
|
// @TODO:
|
||||||
|
// Auth play click
|
||||||
|
},
|
||||||
|
// passwordReset (email) {
|
||||||
|
// if(email == null || email.length == 0) {
|
||||||
|
// alert(window.env.t('invalidEmail'));
|
||||||
|
// } else {
|
||||||
|
// $http.post(ApiUrl.get() + '/api/v3/user/reset-password', {email:email})
|
||||||
|
// .success(function(){
|
||||||
|
// alert(window.env.t('newPassSent'));
|
||||||
|
// })
|
||||||
|
// .error(function(data){
|
||||||
|
// alert(data.err);
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -36,33 +36,8 @@ if (authSettings) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default new Vue({
|
export default new Vue({
|
||||||
|
el: '#app',
|
||||||
router,
|
router,
|
||||||
store: generateStore(),
|
store: generateStore(),
|
||||||
render: h => h(AppComponent),
|
render: h => h(AppComponent),
|
||||||
beforeCreate () {
|
|
||||||
// Setup listener for title
|
|
||||||
this.$store.watch(state => state.title, (title) => {
|
|
||||||
document.title = title;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Mount the app when user and tasks are loaded
|
|
||||||
const userDataWatcher = this.$store.watch(state => [state.user.data, state.tasks.data], ([user, tasks]) => {
|
|
||||||
if (user && user._id && tasks && Array.isArray(tasks.habits)) {
|
|
||||||
userDataWatcher(); // remove the watcher
|
|
||||||
this.$mount('#app');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Load the user and the user tasks
|
|
||||||
Promise.all([
|
|
||||||
this.$store.dispatch('user:fetch'),
|
|
||||||
this.$store.dispatch('tasks:fetchUserTasks'),
|
|
||||||
]).catch((err) => {
|
|
||||||
console.error('Impossible to fetch user. Copy into localStorage a valid habit-mobile-settings object.', err); // eslint-disable-line no-console
|
|
||||||
});
|
|
||||||
},
|
|
||||||
mounted () { // Remove the loading screen when the app is mounted
|
|
||||||
let loadingScreen = document.getElementById('loading-screen');
|
|
||||||
if (loadingScreen) document.body.removeChild(loadingScreen);
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
@@ -7,6 +7,9 @@ import EmptyView from './components/emptyView';
|
|||||||
import ParentPage from './components/parentPage';
|
import ParentPage from './components/parentPage';
|
||||||
import Page from './components/page';
|
import Page from './components/page';
|
||||||
|
|
||||||
|
// Static Pages
|
||||||
|
const Home = () => import(/* webpackChunkName: "static" */'./components/static/home');
|
||||||
|
const RegisterLogin = () => import(/* webpackChunkName: "auth" */'./components/auth/registerLogin');
|
||||||
|
|
||||||
// All the main level
|
// All the main level
|
||||||
// components are loaded in separate webpack chunks.
|
// components are loaded in separate webpack chunks.
|
||||||
@@ -45,6 +48,9 @@ export default new VueRouter({
|
|||||||
return { x: 0, y: 0 };
|
return { x: 0, y: 0 };
|
||||||
},
|
},
|
||||||
routes: [
|
routes: [
|
||||||
|
{ name: 'home', path: '/home', component: Home },
|
||||||
|
{ name: 'register', path: '/register', component: RegisterLogin },
|
||||||
|
{ name: 'login', path: '/login', component: RegisterLogin },
|
||||||
{ name: 'tasks', path: '/', component: UserTasks },
|
{ name: 'tasks', path: '/', component: UserTasks },
|
||||||
{
|
{
|
||||||
path: '/inventory',
|
path: '/inventory',
|
||||||
|
|||||||
83
website/client/store/actions/auth.js
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
|
export async function register (store, params) {
|
||||||
|
let url = '/api/v3/user/auth/local/register';
|
||||||
|
let result = await axios.post(url, {
|
||||||
|
username: params.username,
|
||||||
|
email: params.email,
|
||||||
|
password: params.password,
|
||||||
|
confirmPassword: params.passwordConfirm,
|
||||||
|
});
|
||||||
|
|
||||||
|
let user = result.data.data;
|
||||||
|
|
||||||
|
let userLocalData = JSON.stringify({
|
||||||
|
auth: {
|
||||||
|
apiId: user._id,
|
||||||
|
apiToken: user.apiToken,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
localStorage.setItem('habit-mobile-settings', userLocalData);
|
||||||
|
|
||||||
|
// @TODO: I think we just need analytics here
|
||||||
|
// Auth.runAuth(res.data._id, res.data.apiToken);
|
||||||
|
// Analytics.register();
|
||||||
|
// $scope.registrationInProgress = false;
|
||||||
|
// Alert.authErrorAlert(data, status, headers, config)
|
||||||
|
// Analytics.login();
|
||||||
|
// Analytics.updateUser();
|
||||||
|
|
||||||
|
store.state.user.data = user;
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function login (store, params) {
|
||||||
|
let url = '/api/v3/user/auth/local/login';
|
||||||
|
let result = await axios.post(url, {
|
||||||
|
username: params.username,
|
||||||
|
// email: params.email,
|
||||||
|
password: params.password,
|
||||||
|
});
|
||||||
|
|
||||||
|
let user = result.data.data;
|
||||||
|
|
||||||
|
let userLocalData = JSON.stringify({
|
||||||
|
auth: {
|
||||||
|
apiId: user.id,
|
||||||
|
apiToken: user.apiToken,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
localStorage.setItem('habit-mobile-settings', userLocalData);
|
||||||
|
|
||||||
|
// @TODO: I think we just need analytics here
|
||||||
|
// Auth.runAuth(res.data._id, res.data.apiToken);
|
||||||
|
// Analytics.register();
|
||||||
|
// $scope.registrationInProgress = false;
|
||||||
|
// Alert.authErrorAlert(data, status, headers, config)
|
||||||
|
// Analytics.login();
|
||||||
|
// Analytics.updateUser();
|
||||||
|
|
||||||
|
// @TODO: Update the api to return the user?
|
||||||
|
// store.state.user.data = user;
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function socialAuth (store, params) {
|
||||||
|
let url = '/api/v3/user/auth/social';
|
||||||
|
let result = await axios.post(url, {
|
||||||
|
network: params.auth.network,
|
||||||
|
authResponse: params.auth.authResponse,
|
||||||
|
});
|
||||||
|
|
||||||
|
// @TODO: Analytics
|
||||||
|
|
||||||
|
let user = result.data.data;
|
||||||
|
|
||||||
|
let userLocalData = JSON.stringify({
|
||||||
|
auth: {
|
||||||
|
apiId: user.id,
|
||||||
|
apiToken: user.apiToken,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
localStorage.setItem('habit-mobile-settings', userLocalData);
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ import * as tasks from './tasks';
|
|||||||
import * as guilds from './guilds';
|
import * as guilds from './guilds';
|
||||||
import * as party from './party';
|
import * as party from './party';
|
||||||
import * as members from './members';
|
import * as members from './members';
|
||||||
|
import * as auth from './auth';
|
||||||
import * as quests from './quests';
|
import * as quests from './quests';
|
||||||
|
|
||||||
// Actions should be named as 'actionName' and can be accessed as 'namespace:actionName'
|
// Actions should be named as 'actionName' and can be accessed as 'namespace:actionName'
|
||||||
@@ -18,6 +19,7 @@ const actions = flattenAndNamespace({
|
|||||||
guilds,
|
guilds,
|
||||||
party,
|
party,
|
||||||
members,
|
members,
|
||||||
|
auth,
|
||||||
quests,
|
quests,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -112,6 +112,15 @@
|
|||||||
"guildInformationPlaceHolder": "This is our party’s description. It describes what we do in this party. If you want to learn more about what we do in this party, read the description. Party on.",
|
"guildInformationPlaceHolder": "This is our party’s description. It describes what we do in this party. If you want to learn more about what we do in this party, read the description. Party on.",
|
||||||
"updateParty": "Update Party",
|
"updateParty": "Update Party",
|
||||||
"upgrade": "Upgrade",
|
"upgrade": "Upgrade",
|
||||||
|
"signUpWithSocial": "Sign up with <%= social %>",
|
||||||
|
"loginWithSocial": "Login with <%= social %>",
|
||||||
|
"confirmPassword": "Confirm Password",
|
||||||
|
"usernamePlaceholder": "e.g., HabitRabbit",
|
||||||
|
"emailPlaceholder": "e.g., rabbit@habitica.com",
|
||||||
|
"passwordPlaceholder": "e.g., •••••••••••• ",
|
||||||
|
"confirmPasswordPlaceholder": "Make sure it’s the same password!",
|
||||||
|
"termsAndAgreement": "By clicking the button below, you are indicating that you have read and agree to the <a href=''>Terms of Service</a> and <a href=''>Privacy Policy</a>.",
|
||||||
|
"joinHabitica": "Join Habitica",
|
||||||
"showAllAnimals": "Show All <%= color %> <%= type %>",
|
"showAllAnimals": "Show All <%= color %> <%= type %>",
|
||||||
"showLessAnimals": "Show Less <%= color %> <%= type %>",
|
"showLessAnimals": "Show Less <%= color %> <%= type %>",
|
||||||
"quickInventory": "Quick Inventory",
|
"quickInventory": "Quick Inventory",
|
||||||
|
|||||||