Refactor router
This commit is contained in:
parent
d73f738b1b
commit
53cb39350a
142
js/package-lock.json
generated
142
js/package-lock.json
generated
|
@ -1833,7 +1833,7 @@
|
|||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "5.0.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz",
|
||||
"resolved": "http://registry.npmjs.org/semver/-/semver-5.0.3.tgz",
|
||||
"integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=",
|
||||
"dev": true
|
||||
}
|
||||
|
@ -2150,7 +2150,7 @@
|
|||
},
|
||||
"array-equal": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz",
|
||||
"integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -2282,7 +2282,7 @@
|
|||
},
|
||||
"async": {
|
||||
"version": "1.5.2",
|
||||
"resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
|
||||
"resolved": "http://registry.npmjs.org/async/-/async-1.5.2.tgz",
|
||||
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -2367,7 +2367,7 @@
|
|||
},
|
||||
"chalk": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||
"resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -2386,7 +2386,7 @@
|
|||
},
|
||||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -3038,7 +3038,7 @@
|
|||
},
|
||||
"camelcase-keys": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
|
||||
"integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -3164,11 +3164,6 @@
|
|||
"is-regex": "^1.0.3"
|
||||
}
|
||||
},
|
||||
"charenc": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz",
|
||||
"integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc="
|
||||
},
|
||||
"check-error": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
|
||||
|
@ -3196,7 +3191,7 @@
|
|||
"dependencies": {
|
||||
"css-select": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz",
|
||||
"integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=",
|
||||
"requires": {
|
||||
"boolbase": "~1.0.0",
|
||||
|
@ -3427,7 +3422,7 @@
|
|||
},
|
||||
"get-stream": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
|
||||
"integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=",
|
||||
"dev": true
|
||||
}
|
||||
|
@ -4010,11 +4005,6 @@
|
|||
"which": "^1.2.9"
|
||||
}
|
||||
},
|
||||
"crypt": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz",
|
||||
"integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs="
|
||||
},
|
||||
"crypto-browserify": {
|
||||
"version": "3.12.0",
|
||||
"resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz",
|
||||
|
@ -4042,7 +4032,7 @@
|
|||
},
|
||||
"css-color-names": {
|
||||
"version": "0.0.4",
|
||||
"resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz",
|
||||
"resolved": "http://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz",
|
||||
"integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -4149,7 +4139,7 @@
|
|||
},
|
||||
"jsesc": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
|
||||
"integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -4166,13 +4156,13 @@
|
|||
},
|
||||
"regjsgen": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
|
||||
"integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=",
|
||||
"dev": true
|
||||
},
|
||||
"regjsparser": {
|
||||
"version": "0.1.5",
|
||||
"resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",
|
||||
"resolved": "http://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",
|
||||
"integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -4412,7 +4402,7 @@
|
|||
},
|
||||
"deep-eql": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz",
|
||||
"resolved": "http://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz",
|
||||
"integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -4470,7 +4460,7 @@
|
|||
},
|
||||
"get-stream": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
|
||||
"integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=",
|
||||
"dev": true
|
||||
}
|
||||
|
@ -4774,7 +4764,7 @@
|
|||
},
|
||||
"duplexer": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
|
||||
"integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -5497,7 +5487,7 @@
|
|||
},
|
||||
"finalhandler": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz",
|
||||
"integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -6277,7 +6267,7 @@
|
|||
},
|
||||
"readable-stream": {
|
||||
"version": "1.1.14",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
|
||||
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
|
||||
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -6344,7 +6334,7 @@
|
|||
},
|
||||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -6495,7 +6485,7 @@
|
|||
},
|
||||
"globby": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/globby/-/globby-6.1.0.tgz",
|
||||
"integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -6508,7 +6498,7 @@
|
|||
"dependencies": {
|
||||
"pify": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
|
||||
"dev": true
|
||||
}
|
||||
|
@ -6843,7 +6833,7 @@
|
|||
},
|
||||
"html-webpack-plugin": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz",
|
||||
"integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -6872,7 +6862,7 @@
|
|||
},
|
||||
"htmlparser2": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz",
|
||||
"integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -6899,7 +6889,7 @@
|
|||
},
|
||||
"readable-stream": {
|
||||
"version": "1.0.34",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
|
||||
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
|
||||
"integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -6925,7 +6915,7 @@
|
|||
},
|
||||
"http-errors": {
|
||||
"version": "1.6.3",
|
||||
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
|
||||
"resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
|
||||
"integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -6982,7 +6972,7 @@
|
|||
},
|
||||
"http-proxy-middleware": {
|
||||
"version": "0.18.0",
|
||||
"resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz",
|
||||
"integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -8443,16 +8433,6 @@
|
|||
"resolved": "https://registry.npmjs.org/material-design-icons/-/material-design-icons-3.0.1.tgz",
|
||||
"integrity": "sha1-mnHEh0chjrylHlGmbaaCA4zct78="
|
||||
},
|
||||
"md5": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/md5/-/md5-2.2.1.tgz",
|
||||
"integrity": "sha1-U6s41f48iJG6RlMp6iP6wFQBJvk=",
|
||||
"requires": {
|
||||
"charenc": "~0.0.1",
|
||||
"crypt": "~0.0.1",
|
||||
"is-buffer": "~1.1.1"
|
||||
}
|
||||
},
|
||||
"md5.js": {
|
||||
"version": "1.3.5",
|
||||
"resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
|
||||
|
@ -8477,7 +8457,7 @@
|
|||
},
|
||||
"media-typer": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -8504,7 +8484,7 @@
|
|||
},
|
||||
"meow": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
|
||||
"integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -8729,7 +8709,7 @@
|
|||
},
|
||||
"mkdirp": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -8777,7 +8757,7 @@
|
|||
},
|
||||
"commander": {
|
||||
"version": "2.15.1",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz",
|
||||
"integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -8863,7 +8843,7 @@
|
|||
},
|
||||
"debug": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
|
||||
"integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -8892,7 +8872,7 @@
|
|||
},
|
||||
"ms": {
|
||||
"version": "0.7.1",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
|
||||
"integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -9284,7 +9264,7 @@
|
|||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
|
||||
"integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=",
|
||||
"dev": true
|
||||
}
|
||||
|
@ -9390,7 +9370,7 @@
|
|||
},
|
||||
"chalk": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||
"resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -9413,7 +9393,7 @@
|
|||
},
|
||||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -9755,7 +9735,7 @@
|
|||
},
|
||||
"os-homedir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
|
||||
"resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
|
||||
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -9772,7 +9752,7 @@
|
|||
},
|
||||
"os-tmpdir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
||||
"resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
||||
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -10074,7 +10054,7 @@
|
|||
},
|
||||
"path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -10794,7 +10774,7 @@
|
|||
},
|
||||
"pretty-bytes": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz",
|
||||
"resolved": "http://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz",
|
||||
"integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -10883,7 +10863,7 @@
|
|||
},
|
||||
"lru-cache": {
|
||||
"version": "2.6.5",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.5.tgz",
|
||||
"resolved": "http://registry.npmjs.org/lru-cache/-/lru-cache-2.6.5.tgz",
|
||||
"integrity": "sha1-5W1jVBSO3o13B7WNFDIg/QjfD9U=",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -11017,7 +10997,7 @@
|
|||
},
|
||||
"yargs": {
|
||||
"version": "3.10.0",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
|
||||
"integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
|
||||
"requires": {
|
||||
"camelcase": "^1.0.2",
|
||||
|
@ -11254,7 +11234,7 @@
|
|||
},
|
||||
"pify": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -11429,7 +11409,7 @@
|
|||
"dependencies": {
|
||||
"jsesc": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
|
||||
"integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
|
||||
"dev": true
|
||||
}
|
||||
|
@ -11468,7 +11448,7 @@
|
|||
},
|
||||
"css-select": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz",
|
||||
"integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -11490,7 +11470,7 @@
|
|||
},
|
||||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -11705,7 +11685,7 @@
|
|||
},
|
||||
"safe-regex": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
|
||||
"integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -11779,7 +11759,7 @@
|
|||
},
|
||||
"os-locale": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
|
||||
"integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -11799,7 +11779,7 @@
|
|||
},
|
||||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -11901,7 +11881,7 @@
|
|||
"dependencies": {
|
||||
"source-map": {
|
||||
"version": "0.4.4",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
|
||||
"resolved": "http://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
|
||||
"integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -12702,7 +12682,7 @@
|
|||
},
|
||||
"strip-eof": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
||||
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -12805,7 +12785,7 @@
|
|||
},
|
||||
"tar": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
|
||||
"integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -13762,14 +13742,6 @@
|
|||
"resolved": "https://registry.npmjs.org/vue-gettext/-/vue-gettext-2.1.2.tgz",
|
||||
"integrity": "sha512-issGZfHvGntflaoLd+46Ru305lWOVEG/0vTI7uB5zvq/4JVGoF7J/+DUrcYswowiCKpJluYqf6inILat2HNeRQ=="
|
||||
},
|
||||
"vue-gravatar": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/vue-gravatar/-/vue-gravatar-1.3.0.tgz",
|
||||
"integrity": "sha512-g22+v1bSR9HbDEkAeKznHowYHvdgfVzz8sd3w1zDH+C4g+d6xnwaj3Td7NzMwRxWYVkNaSrts/hpW+RjCLxe9Q==",
|
||||
"requires": {
|
||||
"md5": "^2.2.1"
|
||||
}
|
||||
},
|
||||
"vue-hot-reload-api": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.1.tgz",
|
||||
|
@ -14095,7 +14067,7 @@
|
|||
},
|
||||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -14278,7 +14250,7 @@
|
|||
"dependencies": {
|
||||
"acorn": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz",
|
||||
"integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo="
|
||||
},
|
||||
"acorn-globals": {
|
||||
|
@ -14354,7 +14326,7 @@
|
|||
"dependencies": {
|
||||
"hoek": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz",
|
||||
"integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -14371,7 +14343,7 @@
|
|||
},
|
||||
"topo": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/topo/-/topo-2.0.2.tgz",
|
||||
"resolved": "http://registry.npmjs.org/topo/-/topo-2.0.2.tgz",
|
||||
"integrity": "sha1-zVYVdSU5BXwNwEkaYhw7xvvh0YI=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -14498,7 +14470,7 @@
|
|||
},
|
||||
"wrap-ansi": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
|
||||
"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -14534,7 +14506,7 @@
|
|||
},
|
||||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -14689,7 +14661,7 @@
|
|||
},
|
||||
"get-stream": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
|
||||
"integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=",
|
||||
"dev": true
|
||||
},
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
"vue-apollo": "^3.0.0-beta.28",
|
||||
"vue-class-component": "^6.3.2",
|
||||
"vue-gettext": "^2.1.2",
|
||||
"vue-gravatar": "^1.3.0",
|
||||
"vue-markdown": "^2.2.4",
|
||||
"vue-property-decorator": "^7.3.0",
|
||||
"vue-router": "^3.0.2",
|
||||
|
|
|
@ -50,7 +50,8 @@ import { CURRENT_USER_CLIENT } from "@/graphql/user";
|
|||
import { onLogout } from "@/vue-apollo";
|
||||
import { deleteUserData } from "@/utils/auth";
|
||||
import { LOGGED_PERSON } from "@/graphql/actor";
|
||||
import { IPerson } from "../types/actor.model";
|
||||
import { IActor, IPerson } from '../types/actor.model';
|
||||
import { RouteName } from '@/router'
|
||||
|
||||
@Component({
|
||||
apollo: {
|
||||
|
@ -100,25 +101,26 @@ export default class NavBar extends Vue {
|
|||
});
|
||||
}
|
||||
|
||||
@Watch("model")
|
||||
@Watch('model')
|
||||
onModelChanged(val) {
|
||||
switch (val.__typename) {
|
||||
case "Event":
|
||||
this.$router.push({ name: "Event", params: { uuid: val.uuid } });
|
||||
case 'Event':
|
||||
this.$router.push({ name: RouteName.EVENT, params: { uuid: val.uuid } });
|
||||
break;
|
||||
case "Actor":
|
||||
|
||||
case 'Actor':
|
||||
this.$router.push({
|
||||
name: "Profile",
|
||||
params: { name: this.username_with_domain(val) }
|
||||
name: RouteName.PROFILE,
|
||||
params: { name: this.usernameWithDomain(val) },
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
username_with_domain(actor) {
|
||||
usernameWithDomain(actor: IActor) {
|
||||
return (
|
||||
actor.preferredUsername +
|
||||
(actor.domain === null ? "" : `@${actor.domain}`)
|
||||
(actor.domain === null ? '' : `@${actor.domain}`)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -128,7 +130,7 @@ export default class NavBar extends Vue {
|
|||
}
|
||||
|
||||
logout() {
|
||||
alert("logout !");
|
||||
alert('logout !');
|
||||
|
||||
deleteUserData();
|
||||
|
||||
|
|
48
js/src/router/actor.ts
Normal file
48
js/src/router/actor.ts
Normal file
|
@ -0,0 +1,48 @@
|
|||
import Profile from '@/views/Account/Profile.vue';
|
||||
import CreateGroup from '@/views/Group/Create.vue';
|
||||
import Group from '@/views/Group/Group.vue';
|
||||
import GroupList from '@/views/Group/GroupList.vue';
|
||||
import Identities from '@/views/Account/Identities.vue';
|
||||
|
||||
export enum ActorRouteName {
|
||||
IDENTITIES = 'Identities',
|
||||
GROUP_LIST = 'GroupList',
|
||||
GROUP = 'Group',
|
||||
CREATE_GROUP = 'CreateGroup',
|
||||
PROFILE = 'Profile',
|
||||
}
|
||||
|
||||
export const actorRoutes = [
|
||||
{
|
||||
path: '/identities',
|
||||
name: ActorRouteName.IDENTITIES,
|
||||
component: Identities,
|
||||
meta: { requiredAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/groups',
|
||||
name: ActorRouteName.GROUP_LIST,
|
||||
component: GroupList,
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
{
|
||||
path: '/groups/create',
|
||||
name: ActorRouteName.CREATE_GROUP,
|
||||
component: CreateGroup,
|
||||
meta: { requiredAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/~:name',
|
||||
name: ActorRouteName.GROUP,
|
||||
component: Group,
|
||||
props: true,
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
{
|
||||
path: '/@:name',
|
||||
name: ActorRouteName.PROFILE,
|
||||
component: Profile,
|
||||
props: true,
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
];
|
22
js/src/router/category.ts
Normal file
22
js/src/router/category.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
import CategoryList from '@/views/Category/List.vue';
|
||||
import CreateCategory from '@/views/Category/Create.vue';
|
||||
|
||||
export enum CategoryRouteName {
|
||||
CATEGORY_LIST = 'CategoryList',
|
||||
CREATE_CATEGORY = 'CreateCategory',
|
||||
}
|
||||
|
||||
export const categoryRoutes = [
|
||||
{
|
||||
path: '/category',
|
||||
name: CategoryRouteName.CATEGORY_LIST,
|
||||
component: CategoryList,
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
{
|
||||
path: '/category/create',
|
||||
name: CategoryRouteName.CREATE_CATEGORY,
|
||||
component: CreateCategory,
|
||||
meta: { requiredAuth: true },
|
||||
},
|
||||
];
|
47
js/src/router/event.ts
Normal file
47
js/src/router/event.ts
Normal file
|
@ -0,0 +1,47 @@
|
|||
import EventList from '@/views/Event/EventList.vue';
|
||||
import Location from '@/views/Location.vue';
|
||||
import CreateEvent from '@/views/Event/Create.vue';
|
||||
import Event from '@/views/Event/Event.vue';
|
||||
|
||||
export enum EventRouteName {
|
||||
EVENT_LIST = 'EventList',
|
||||
CREATE_EVENT = 'CreateEvent',
|
||||
EDIT_EVENT = 'EditEvent',
|
||||
EVENT = 'Event',
|
||||
LOCATION = 'Location',
|
||||
}
|
||||
|
||||
export const eventRoutes = [
|
||||
{
|
||||
path: '/events/list/:location?',
|
||||
name: EventRouteName.EVENT_LIST,
|
||||
component: EventList,
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
{
|
||||
path: '/events/create',
|
||||
name: EventRouteName.CREATE_EVENT,
|
||||
component: CreateEvent,
|
||||
meta: { requiredAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/events/:id/edit',
|
||||
name: EventRouteName.EDIT_EVENT,
|
||||
component: CreateEvent,
|
||||
props: true,
|
||||
meta: { requiredAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/location/new',
|
||||
name: EventRouteName.LOCATION,
|
||||
component: Location,
|
||||
meta: { requiredAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/events/:uuid',
|
||||
name: EventRouteName.EVENT,
|
||||
component: Event,
|
||||
props: true,
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
];
|
|
@ -2,111 +2,47 @@ import Vue from 'vue';
|
|||
import Router from 'vue-router';
|
||||
import PageNotFound from '@/views/PageNotFound.vue';
|
||||
import Home from '@/views/Home.vue';
|
||||
import Event from '@/views/Event/Event.vue';
|
||||
import EventList from '@/views/Event/EventList.vue';
|
||||
import Location from '@/views/Location.vue';
|
||||
import CreateEvent from '@/views/Event/Create.vue';
|
||||
import CategoryList from '@/views/Category/List.vue';
|
||||
import CreateCategory from '@/views/Category/Create.vue';
|
||||
import Profile from '@/views/Account/Profile.vue';
|
||||
import CreateGroup from '@/views/Group/Create.vue';
|
||||
import Group from '@/views/Group/Group.vue';
|
||||
import GroupList from '@/views/Group/GroupList.vue';
|
||||
import Identities from '@/views/Account/Identities.vue';
|
||||
import userRoutes from './user';
|
||||
import { UserRouteName, userRoutes } from './user';
|
||||
import { EventRouteName, eventRoutes } from '@/router/event';
|
||||
import { ActorRouteName, actorRoutes } from '@/router/actor';
|
||||
import { CategoryRouteName, categoryRoutes } from '@/router/category';
|
||||
|
||||
Vue.use(Router);
|
||||
|
||||
enum GlobalRouteName {
|
||||
HOME = 'Home',
|
||||
PAGE_NOT_FOUND = 'PageNotFound',
|
||||
}
|
||||
|
||||
// Hack to merge enums
|
||||
// tslint:disable:variable-name
|
||||
export const RouteName = {
|
||||
...GlobalRouteName,
|
||||
...UserRouteName,
|
||||
...EventRouteName,
|
||||
...CategoryRouteName,
|
||||
...ActorRouteName,
|
||||
};
|
||||
|
||||
const router = new Router({
|
||||
mode: 'history',
|
||||
base: '/',
|
||||
routes: [
|
||||
...userRoutes,
|
||||
...eventRoutes,
|
||||
...categoryRoutes,
|
||||
...actorRoutes,
|
||||
|
||||
{
|
||||
path: '/',
|
||||
name: 'Home',
|
||||
name: RouteName.HOME,
|
||||
component: Home,
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
{
|
||||
path: '/events/list/:location?',
|
||||
name: 'EventList',
|
||||
component: EventList,
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
{
|
||||
path: '/events/create',
|
||||
name: 'CreateEvent',
|
||||
component: CreateEvent,
|
||||
meta: { requiredAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/events/:id/edit',
|
||||
name: 'EditEvent',
|
||||
component: CreateEvent,
|
||||
props: true,
|
||||
meta: { requiredAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/location/new',
|
||||
name: 'Location',
|
||||
component: Location,
|
||||
meta: { requiredAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/category',
|
||||
name: 'CategoryList',
|
||||
component: CategoryList,
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
{
|
||||
path: '/category/create',
|
||||
name: 'CreateCategory',
|
||||
component: CreateCategory,
|
||||
meta: { requiredAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/identities',
|
||||
name: 'Identities',
|
||||
component: Identities,
|
||||
meta: { requiredAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/groups',
|
||||
name: 'GroupList',
|
||||
component: GroupList,
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
{
|
||||
path: '/groups/create',
|
||||
name: 'CreateGroup',
|
||||
component: CreateGroup,
|
||||
meta: { requiredAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/~:name',
|
||||
name: 'Group',
|
||||
component: Group,
|
||||
props: true,
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
{
|
||||
path: '/@:name',
|
||||
name: 'Profile',
|
||||
component: Profile,
|
||||
props: true,
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
{
|
||||
path: '/events/:uuid',
|
||||
name: 'Event',
|
||||
component: Event,
|
||||
props: true,
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
|
||||
{
|
||||
path: '*',
|
||||
name: 'PageNotFound',
|
||||
name: RouteName.PAGE_NOT_FOUND,
|
||||
component: PageNotFound,
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
|
|
|
@ -6,53 +6,63 @@ import ResendConfirmation from '@/views/User/ResendConfirmation.vue';
|
|||
import SendPasswordReset from '@/views/User/SendPasswordReset.vue';
|
||||
import PasswordReset from '@/views/User/PasswordReset.vue';
|
||||
|
||||
export default [
|
||||
export enum UserRouteName {
|
||||
REGISTER = 'Register',
|
||||
REGISTER_PROFILE = 'RegisterProfile',
|
||||
RESEND_CONFIRMATION = 'ResendConfirmation',
|
||||
SEND_PASSWORD_RESET = 'SendPasswordReset',
|
||||
PASSWORD_RESET = 'PasswordReset',
|
||||
VALIDATE = 'Validate',
|
||||
LOGIN = 'Login',
|
||||
}
|
||||
|
||||
export const userRoutes = [
|
||||
{
|
||||
path: '/register/user',
|
||||
name: 'Register',
|
||||
name: UserRouteName.REGISTER,
|
||||
component: RegisterUser,
|
||||
props: true,
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
{
|
||||
path: '/register/profile',
|
||||
name: 'RegisterProfile',
|
||||
name: UserRouteName.REGISTER_PROFILE,
|
||||
component: RegisterProfile,
|
||||
props: true,
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
{
|
||||
path: '/resend-instructions',
|
||||
name: 'ResendConfirmation',
|
||||
name: UserRouteName.RESEND_CONFIRMATION,
|
||||
component: ResendConfirmation,
|
||||
props: true,
|
||||
meta: { requiresAuth: false },
|
||||
},
|
||||
{
|
||||
path: '/password-reset/send',
|
||||
name: 'SendPasswordReset',
|
||||
name: UserRouteName.SEND_PASSWORD_RESET,
|
||||
component: SendPasswordReset,
|
||||
props: true,
|
||||
meta: { requiresAuth: false },
|
||||
},
|
||||
{
|
||||
path: '/password-reset/:token',
|
||||
name: 'PasswordReset',
|
||||
name: UserRouteName.PASSWORD_RESET,
|
||||
component: PasswordReset,
|
||||
meta: { requiresAuth: false },
|
||||
props: true,
|
||||
},
|
||||
{
|
||||
path: '/validate/:token',
|
||||
name: 'Validate',
|
||||
name: UserRouteName.VALIDATE,
|
||||
component: Validate,
|
||||
// We can only pass string values through params, therefore
|
||||
props: (route) => ({ email: route.params.email, userAlreadyActivated: route.params.userAlreadyActivated === 'true'}),
|
||||
props: (route) => ({ email: route.params.email, userAlreadyActivated: route.params.userAlreadyActivated === 'true' }),
|
||||
meta: { requiresAuth: false },
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
name: 'Login',
|
||||
name: UserRouteName.LOGIN,
|
||||
component: Login,
|
||||
props: true,
|
||||
meta: { requiredAuth: false },
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
import { FETCH_PERSON, LOGGED_PERSON } from "@/graphql/actor";
|
||||
import { Component, Prop, Vue, Watch } from "vue-property-decorator";
|
||||
import EventCard from "@/components/Event/EventCard.vue";
|
||||
import { RouteName } from '@/router'
|
||||
|
||||
@Component({
|
||||
apollo: {
|
||||
|
@ -101,7 +102,7 @@ export default class Profile extends Vue {
|
|||
|
||||
logoutUser() {
|
||||
// TODO : implement logout
|
||||
this.$router.push({ name: "Home" });
|
||||
this.$router.push({ name: RouteName.HOME });
|
||||
}
|
||||
|
||||
nl2br(text) {
|
||||
|
|
|
@ -80,17 +80,13 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Gravatar from "vue-gravatar";
|
||||
import { Component, Prop, Vue } from "vue-property-decorator";
|
||||
import { IPerson } from "@/types/actor.model";
|
||||
import { REGISTER_PERSON } from "@/graphql/actor";
|
||||
import { MOBILIZON_INSTANCE_HOST } from "@/api/_entrypoint";
|
||||
import { RouteName } from '@/router'
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
"v-gravatar": Gravatar
|
||||
}
|
||||
})
|
||||
@Component
|
||||
export default class Register extends Vue {
|
||||
@Prop({ type: String, required: true }) email!: string;
|
||||
@Prop({ type: Boolean, required: false, default: false }) userAlreadyActivated!: boolean;
|
||||
|
@ -98,20 +94,19 @@ export default class Register extends Vue {
|
|||
host: string = MOBILIZON_INSTANCE_HOST;
|
||||
|
||||
person: IPerson = {
|
||||
preferredUsername: "",
|
||||
name: "",
|
||||
summary: "",
|
||||
id: "",
|
||||
url: "",
|
||||
preferredUsername: '',
|
||||
name: '',
|
||||
summary: '',
|
||||
id: '',
|
||||
url: '',
|
||||
suspended: false,
|
||||
avatarUrl: "", // TODO : Use Gravatar here
|
||||
bannerUrl: "",
|
||||
avatarUrl: '',
|
||||
bannerUrl: '',
|
||||
domain: null,
|
||||
};
|
||||
errors: object = {};
|
||||
validationSent: boolean = false;
|
||||
sendingValidation: boolean = false;
|
||||
showGravatar: boolean = false;
|
||||
|
||||
async submit() {
|
||||
try {
|
||||
|
@ -124,7 +119,7 @@ export default class Register extends Vue {
|
|||
this.validationSent = true;
|
||||
|
||||
if (this.userAlreadyActivated) {
|
||||
this.$router.push({name: "Home"});
|
||||
this.$router.push({ name: RouteName.HOME });
|
||||
}
|
||||
} catch (error) {
|
||||
this.errors = error.graphQLErrors.reduce((acc, error) => {
|
||||
|
|
|
@ -99,6 +99,7 @@ import { LOGGED_PERSON } from '@/graphql/actor';
|
|||
import { IEvent, IParticipant } from '@/types/event.model';
|
||||
import { JOIN_EVENT } from '@/graphql/event';
|
||||
import { IPerson } from '@/types/actor.model';
|
||||
import { RouteName } from '@/router'
|
||||
|
||||
// No typings for this component, so we use require
|
||||
const VueMarkdown = require('vue-markdown');
|
||||
|
@ -140,7 +141,7 @@ export default class Event extends Vue {
|
|||
}
|
||||
});
|
||||
|
||||
router.push({ name: 'EventList' })
|
||||
router.push({ name: RouteName.EVENT })
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
|
|
@ -19,10 +19,13 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import ngeohash from "ngeohash";
|
||||
import VueMarkdown from "vue-markdown";
|
||||
import { Component, Prop, Vue, Watch } from "vue-property-decorator";
|
||||
import EventCard from "@/components/Event/EventCard.vue";
|
||||
import ngeohash from 'ngeohash';
|
||||
import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
|
||||
import EventCard from '@/components/Event/EventCard.vue';
|
||||
import { RouteName } from '@/router';
|
||||
|
||||
// VueMarkdown is untyped
|
||||
const VueMarkdown = require('vue-markdown');
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
|
@ -36,7 +39,7 @@ export default class EventList extends Vue {
|
|||
events = [];
|
||||
loading = true;
|
||||
locationChip = false;
|
||||
locationText = "";
|
||||
locationText = '';
|
||||
|
||||
created() {
|
||||
this.fetchData(this.$router.currentRoute.params["location"]);
|
||||
|
@ -50,7 +53,7 @@ export default class EventList extends Vue {
|
|||
@Watch("locationChip")
|
||||
onLocationChipChange(val) {
|
||||
if (val === false) {
|
||||
this.$router.push({ name: "EventList" });
|
||||
this.$router.push({ name: RouteName.EVENT_LIST });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,7 +89,7 @@ export default class EventList extends Vue {
|
|||
}
|
||||
|
||||
viewEvent(event) {
|
||||
this.$router.push({ name: "Event", params: { uuid: event.uuid } });
|
||||
this.$router.push({ name: RouteName.EVENT, params: { uuid: event.uuid } });
|
||||
}
|
||||
|
||||
downloadIcsEvent(event) {
|
||||
|
|
|
@ -26,9 +26,11 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import VueMarkdown from "vue-markdown";
|
||||
import { Component, Vue } from "vue-property-decorator";
|
||||
|
||||
// VueMarkdown is untyped
|
||||
const VueMarkdown = require('vue-markdown')
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
VueMarkdown
|
||||
|
@ -43,9 +45,9 @@ export default class CreateGroup extends Vue {
|
|||
summary: string;
|
||||
address?: any;
|
||||
} = {
|
||||
preferred_username: "",
|
||||
name: "",
|
||||
summary: ""
|
||||
preferred_username: '',
|
||||
name: '',
|
||||
summary: '',
|
||||
// category: null,
|
||||
};
|
||||
categories = [];
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Vue } from "vue-property-decorator";
|
||||
import { Component, Vue } from 'vue-property-decorator';
|
||||
import { RouteName } from '@/router';
|
||||
|
||||
@Component
|
||||
export default class GroupList extends Vue {
|
||||
|
@ -55,7 +56,7 @@ export default class GroupList extends Vue {
|
|||
|
||||
viewActor(actor) {
|
||||
this.$router.push({
|
||||
name: "Group",
|
||||
name: RouteName.GROUP,
|
||||
params: { name: this.usernameWithDomain(actor) }
|
||||
});
|
||||
}
|
||||
|
|
|
@ -37,15 +37,15 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import ngeohash from "ngeohash";
|
||||
import { AUTH_USER_ACTOR, AUTH_USER_ID } from "@/constants";
|
||||
import { FETCH_EVENTS } from "@/graphql/event";
|
||||
import { Component, Vue } from "vue-property-decorator";
|
||||
import EventCard from "@/components/Event/EventCard.vue";
|
||||
import { LOGGED_PERSON } from "@/graphql/actor";
|
||||
import { IPerson } from "@/types/actor.model";
|
||||
import { ICurrentUser } from "@/types/current-user.model";
|
||||
import { CURRENT_USER_CLIENT } from "@/graphql/user";
|
||||
import ngeohash from 'ngeohash';
|
||||
import { FETCH_EVENTS } from '@/graphql/event';
|
||||
import { Component, Vue } from 'vue-property-decorator';
|
||||
import EventCard from '@/components/Event/EventCard.vue';
|
||||
import { LOGGED_PERSON } from '@/graphql/actor';
|
||||
import { IPerson } from '@/types/actor.model';
|
||||
import { ICurrentUser } from '@/types/current-user.model';
|
||||
import { CURRENT_USER_CLIENT } from '@/graphql/user';
|
||||
import { RouteName } from '@/router';
|
||||
|
||||
@Component({
|
||||
apollo: {
|
||||
|
@ -95,40 +95,44 @@ export default class Home extends Vue {
|
|||
|
||||
geoLocalize() {
|
||||
const router = this.$router;
|
||||
const sessionCity = sessionStorage.getItem("City");
|
||||
const sessionCity = sessionStorage.getItem('City');
|
||||
|
||||
if (sessionCity) {
|
||||
router.push({ name: "EventList", params: { location: sessionCity } });
|
||||
} else {
|
||||
return router.push({ name: 'EventList', params: { location: sessionCity } });
|
||||
}
|
||||
|
||||
navigator.geolocation.getCurrentPosition(
|
||||
pos => {
|
||||
const crd = pos.coords;
|
||||
|
||||
const geohash = ngeohash.encode(crd.latitude, crd.longitude, 11);
|
||||
sessionStorage.setItem("City", geohash);
|
||||
router.push({ name: "EventList", params: { location: geohash } });
|
||||
const geoHash = ngeohash.encode(crd.latitude, crd.longitude, 11);
|
||||
sessionStorage.setItem('City', geoHash);
|
||||
router.push({ name: RouteName.EVENT_LIST, params: { location: geoHash } });
|
||||
},
|
||||
|
||||
err => console.warn(`ERROR(${err.code}): ${err.message}`),
|
||||
|
||||
{
|
||||
enableHighAccuracy: true,
|
||||
timeout: 5000,
|
||||
maximumAge: 0
|
||||
}
|
||||
maximumAge: 0,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
getAddressData(addressData) {
|
||||
const geohash = ngeohash.encode(
|
||||
const geoHash = ngeohash.encode(
|
||||
addressData.latitude,
|
||||
addressData.longitude,
|
||||
11
|
||||
);
|
||||
sessionStorage.setItem("City", geohash);
|
||||
this.$router.push({ name: "EventList", params: { location: geohash } });
|
||||
sessionStorage.setItem("City", geoHash);
|
||||
|
||||
this.$router.push({ name: RouteName.EVENT_LIST, params: { location: geoHash } });
|
||||
}
|
||||
|
||||
viewEvent(event) {
|
||||
this.$router.push({ name: "Event", params: { uuid: event.uuid } });
|
||||
this.$router.push({ name: RouteName.EVENT, params: { uuid: event.uuid } });
|
||||
}
|
||||
|
||||
ipLocation() {
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Gravatar from "vue-gravatar";
|
||||
import { Component, Prop, Vue } from "vue-property-decorator";
|
||||
import { LOGIN } from "@/graphql/auth";
|
||||
import { validateEmailField, validateRequiredField } from "@/utils/validators";
|
||||
|
@ -61,12 +60,9 @@ import { saveUserData } from "@/utils/auth";
|
|||
import { ILogin } from "@/types/login.model";
|
||||
import { UPDATE_CURRENT_USER_CLIENT } from "@/graphql/user";
|
||||
import { onLogin } from "@/vue-apollo";
|
||||
import { RouteName } from '@/router'
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
"v-gravatar": Gravatar
|
||||
}
|
||||
})
|
||||
@Component
|
||||
export default class Login extends Vue {
|
||||
@Prop({ type: String, required: false, default: "" }) email!: string;
|
||||
@Prop({ type: String, required: false, default: "" }) password!: string;
|
||||
|
@ -85,7 +81,7 @@ export default class Login extends Vue {
|
|||
|
||||
beforeCreate() {
|
||||
if (this.user) {
|
||||
this.$router.push("/");
|
||||
this.$router.push('/');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -119,7 +115,7 @@ export default class Login extends Vue {
|
|||
|
||||
onLogin(this.$apollo);
|
||||
|
||||
this.$router.push({ name: "Home" });
|
||||
this.$router.push({ name: RouteName.HOME });
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
err.graphQLErrors.forEach(({ message }) => {
|
||||
|
@ -127,11 +123,5 @@ export default class Login extends Vue {
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
validEmail() {
|
||||
return this.rules.email(this.credentials.email) === true
|
||||
? "v-gravatar"
|
||||
: "avatar";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -40,6 +40,7 @@ import { validateRequiredField } from "@/utils/validators";
|
|||
import { RESET_PASSWORD } from "@/graphql/auth";
|
||||
import { saveUserData } from "@/utils/auth";
|
||||
import { ILogin } from "@/types/login.model";
|
||||
import { RouteName } from '@/router'
|
||||
|
||||
@Component
|
||||
export default class PasswordReset extends Vue {
|
||||
|
@ -79,7 +80,7 @@ export default class PasswordReset extends Vue {
|
|||
});
|
||||
|
||||
saveUserData(result.data.resetPassword);
|
||||
this.$router.push({ name: "Home" });
|
||||
this.$router.push({ name: RouteName.HOME });
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
err.graphQLErrors.forEach(({ message }) => {
|
||||
|
|
|
@ -108,15 +108,11 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Gravatar from "vue-gravatar";
|
||||
import { CREATE_USER } from "@/graphql/user";
|
||||
import { Component, Prop, Vue } from "vue-property-decorator";
|
||||
import { UserRouteName } from '@/router/user'
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
"v-gravatar": Gravatar
|
||||
}
|
||||
})
|
||||
@Component
|
||||
export default class Register extends Vue {
|
||||
@Prop({ type: String, required: false, default: "" }) email!: string;
|
||||
@Prop({ type: String, required: false, default: "" }) password!: string;
|
||||
|
@ -124,29 +120,25 @@ export default class Register extends Vue {
|
|||
credentials = {
|
||||
email: this.email,
|
||||
password: this.password
|
||||
} as { email: string; password: string };
|
||||
}
|
||||
errors: object = {};
|
||||
sendingValidation: boolean = false;
|
||||
validationSent: boolean = false;
|
||||
showGravatar: boolean = false;
|
||||
|
||||
validEmail() {
|
||||
return this.credentials.email.includes("@") === true
|
||||
? "v-gravatar"
|
||||
: "avatar";
|
||||
}
|
||||
|
||||
async submit() {
|
||||
try {
|
||||
this.sendingValidation = true;
|
||||
this.errors = {};
|
||||
|
||||
await this.$apollo.mutate({
|
||||
mutation: CREATE_USER,
|
||||
variables: this.credentials
|
||||
});
|
||||
|
||||
this.validationSent = true;
|
||||
|
||||
this.$router.push({
|
||||
name: "RegisterProfile",
|
||||
name: UserRouteName.REGISTER_PROFILE,
|
||||
params: { email: this.credentials.email }
|
||||
});
|
||||
} catch (error) {
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
import { VALIDATE_USER } from "@/graphql/user";
|
||||
import { Component, Prop, Vue } from "vue-property-decorator";
|
||||
import { AUTH_TOKEN, AUTH_USER_ID } from "@/constants";
|
||||
import { RouteName } from '@/router'
|
||||
import { UserRouteName } from '@/router/user'
|
||||
|
||||
@Component
|
||||
export default class Validate extends Vue {
|
||||
|
@ -46,9 +48,9 @@ export default class Validate extends Vue {
|
|||
const user = data.validateUser.user;
|
||||
console.log(user);
|
||||
if (user.defaultActor) {
|
||||
this.$router.push({name: "Home"});
|
||||
this.$router.push({ name: RouteName.HOME });
|
||||
} else { // If the user didn't register any profile yet, let's create one for them
|
||||
this.$router.push({ name: 'RegisterProfile', params: {email: user.email, userAlreadyActivated: 'true'} });
|
||||
this.$router.push({ name: UserRouteName.REGISTER_PROFILE, params: { email: user.email, userAlreadyActivated: 'true' } });
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
|
|
Loading…
Reference in a new issue